48 rbsengine(Space* master, Stop* stop, Engine* slave,
49 const Search::Statistics& stat,
const Options& opt,
60 rbsengine(Space* master, Stop* stop, Engine* slave,
61 const Search::Statistics& stat,
const Options& opt,
62 bool best,
bool complete);
69 template<
class T,
template<
class>
class E>
79 template<
class T,
template<
class>
class E>
84 template<
class T,
template<
class>
class E>
94 template<
class T,
template<
class>
class E>
97 if (m_opt.
cutoff ==
nullptr)
102 e_opt.
stop = stop.get();
115 std::unique_ptr<Space> master(m_opt.
clone ? s->clone() : s);
116 std::unique_ptr<Space> slave(master->clone());
118 bool complete = slave->slave(mi);
119 std::unique_ptr<Search::Engine> leaf(
122 stat,m_opt,E<T>::best,complete);
130 template<
class T,
template<
class>
class E>
137 template<
class T,
template<
class>
class E>
static NoGoods eng
Empty no-goods.
Meta-engine performing restart-based search.
RBS(T *s, const Search::Options &o)
Initialize engine for space s and options o.
@ RBS
Engine is a RBS engine.
Engine * e
The actual search engine.
Options opt
Stored and already expanded options.
Builder(const Options &opt, bool best)
Initialize with options opt and best solution search support.
bool best(void) const
Whether engine is a best solution search engine.
Search engine implementation interface
bool clone
Whether engines create a clone when being initialized.
Cutoff * cutoff
Cutoff for restart-based search.
Options expand(void) const
Expand with real number of threads.
Stop * stop
Stop object for stopping search.
SearchTracer * tracer
Tracer object for tracing search.
virtual Engine * operator()(Space *s) const
The actual build function.
RbsBuilder(const Options &opt)
The constructor.
unsigned long long int fail
Number of failed nodes in search tree.
Exception: Uninitialized cutoff for restart-based search
static void engine(SearchTracer *tracer, SearchTracer::EngineType t, unsigned int n)
Register engine.
T * rbs(T *s, const Search::Options &o)
Perform restart-based search.
@ SS_FAILED
Space is failed
Engine * dead(const Options &o, const Statistics &stat)
Stop * rbsstop(Stop *stop)
Create stop object.
Engine * rbsengine(Space *master, Stop *stop, Engine *slave, const Search::Statistics &stat, const Options &opt, bool best)
Create restart engine whose first slave search yields valid no-goods.
Engine * build(Space *s, const Options &opt)
Build an engine of type E for a script T.
Gecode toplevel namespace
Search::Builder * SEB
Type for a search engine builder.
#define GECODE_SEARCH_EXPORT