Generated on Tue Feb 11 2025 17:33:26 for Gecode by doxygen 1.12.0

Meta engine using a portfolio of search engines. More...

#include <search.hh>

Public Member Functions

 PBS (T *s, const Search::Options &o=Search::Options::def)
 Initialize with engines running copies of s with options o.
 
 PBS (T *s, SEBs &sebs, const Search::Options &o=Search::Options::def)
 Initialize with engine builders sebs.
 
- Public Member Functions inherited from Gecode::Search::Base< T >
virtual T * next (void)
 Return next solution (NULL, if none exists or search has been stopped)
 
virtual Statistics statistics (void) const
 Return statistics.
 
virtual bool stopped (void) const
 Check whether engine has been stopped.
 
virtual ~Base (void)
 Destructor.
 

Static Public Attributes

static const bool best = E<T>::best
 Whether engine does best solution search.
 

Protected Member Functions

void build (T *s, SEBs &sebs, const Search::Options &o)
 The actual build function.
 
- Protected Member Functions inherited from Gecode::Search::Base< T >
 Base (Engine *e=NULL)
 Constructor.
 

Additional Inherited Members

- Static Public Member Functions inherited from Gecode::HeapAllocated
static void * operator new (size_t s)
 Memory management.
 
static void operator delete (void *p)
 Free memory allocated from heap.
 
- Protected Attributes inherited from Gecode::Search::Base< T >
Enginee
 The actual search engine.
 

Detailed Description

template<class T, template< class > class E = DFS>
class Gecode::PBS< T, E >

Meta engine using a portfolio of search engines.

The engine will run a portfolio with a number of assets as defined by the options o. The engine supports parallel execution of assets by using the number of threads as defined by the options.

The class T can implement member functions

virtual bool master(const MetaInfo& mi)
Information passed by meta search engines.
Definition core.hpp:1613

and

virtual bool slave(const MetaInfo& mi)

When the assets are created, these functions are executed. For more details, consult "Modeling and Programming with Gecode".

Definition at line 1236 of file search.hh.

Constructor & Destructor Documentation

◆ PBS() [1/2]

template<class T , template< class > class E>
Gecode::PBS< T, E >::PBS ( T * s,
const Search::Options & o = Search::Options::def )

Initialize with engines running copies of s with options o.

Definition at line 221 of file pbs.hpp.

◆ PBS() [2/2]

template<class T , template< class > class E>
Gecode::PBS< T, E >::PBS ( T * s,
SEBs & sebs,
const Search::Options & o = Search::Options::def )
inline

Initialize with engine builders sebs.

Definition at line 303 of file pbs.hpp.

Member Function Documentation

◆ build()

template<class T , template< class > class E>
void Gecode::PBS< T, E >::build ( T * s,
SEBs & sebs,
const Search::Options & o )
protected

The actual build function.

Definition at line 262 of file pbs.hpp.

Member Data Documentation

◆ best

template<class T , template< class > class E = DFS>
const bool Gecode::PBS< T, E >::best = E<T>::best
static

Whether engine does best solution search.

Definition at line 1247 of file search.hh.


The documentation for this class was generated from the following files: