Generated on Sat Jul 28 2018 17:24:22 for Gecode by doxygen 1.8.14
Gecode::PBS< T, E > Class Template Reference

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. More...
 
 PBS (T *s, SEBs &sebs, const Search::Options &o=Search::Options::def)
 Initialize with engine builders sebs. More...
 
 PBS (T *s, SEB seb0, SEB seb1, const Search::Options &o=Search::Options::def)
 Initialize with engine builders seb0 and seb1. More...
 
 PBS (T *s, SEB seb0, SEB seb1, SEB seb2, const Search::Options &o=Search::Options::def)
 Initialize with engine builders seb0, seb1, and seb2. More...
 
 PBS (T *s, SEB seb0, SEB seb1, SEB seb2, SEB seb3, const Search::Options &o=Search::Options::def)
 Initialize with engine builders seb0, seb1, seb2, and seb3. More...
 
- 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) More...
 
virtual Statistics statistics (void) const
 Return statistics. More...
 
virtual bool stopped (void) const
 Check whether engine has been stopped. More...
 
virtual ~Base (void)
 Destructor. More...
 

Static Public Attributes

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

Protected Member Functions

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

Additional Inherited Members

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

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)

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 939 of file search.hh.

Constructor & Destructor Documentation

◆ PBS() [1/5]

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 213 of file pbs.hpp.

◆ PBS() [2/5]

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 295 of file pbs.hpp.

◆ PBS() [3/5]

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

Initialize with engine builders seb0 and seb1.

Definition at line 300 of file pbs.hpp.

◆ PBS() [4/5]

template<class T , template< class > class E>
Gecode::PBS< T, E >::PBS ( T *  s,
SEB  seb0,
SEB  seb1,
SEB  seb2,
const Search::Options o = Search::Options::def 
)
inline

Initialize with engine builders seb0, seb1, and seb2.

Definition at line 307 of file pbs.hpp.

◆ PBS() [5/5]

template<class T , template< class > class E>
Gecode::PBS< T, E >::PBS ( T *  s,
SEB  seb0,
SEB  seb1,
SEB  seb2,
SEB  seb3,
const Search::Options o = Search::Options::def 
)
inline

Initialize with engine builders seb0, seb1, seb2, and seb3.

Definition at line 314 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 254 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 959 of file search.hh.


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