38#ifndef GECODE_SEARCH_SEQ_RBS_HH
39#define GECODE_SEARCH_SEQ_RBS_HH
49 template<
class,
template<
class>
class>
friend class ::Gecode::RBS;
50 friend class ::Gecode::Search::Seq::RBS;
55 unsigned long long int l;
68 unsigned long int restarts(
void)
const;
72 void nogood(
unsigned long int n);
Base class for cutoff generators for restart-based meta engine.
Search engine implementation interface
Engine for restart-based search.
RestartStop * stop
The stop control object.
bool best
Whether the engine performs best solution search.
Space * master
The master space to restart from.
virtual ~RBS(void)
Destructor.
bool restart
Whether a restart must be performed when next is called.
bool complete
Whether search for the next solution will be complete.
Engine * e
The actual engine.
Space * last
The last solution space (possibly nullptr).
unsigned long int sslr
How many solutions since the last restart.
RBS(Space *s, RestartStop *stop0, Engine *e0, const Search::Statistics &stat, const Options &o, bool best)
Constructor.
virtual void constrain(const Space &b)
Constrain future solutions to be better than b.
Cutoff * co
The cutoff object.
virtual bool stopped(void) const
Check whether engine has been stopped.
virtual Space * next(void)
Return next solution (nullptr, if none exists or search has been stopped).
virtual Statistics statistics(void) const
Return statistics.
Stop-object for restart engine
unsigned long int restarts(void) const
Return current restart count.
virtual bool stop(const Statistics &s, const Options &o)
Return true if meta engine must be stopped.
Statistics metastatistics(void) const
Return statistics for the meta engine.
void limit(const Statistics &s, unsigned long long int l)
Set current limit for the engine to l fails.
void nogood(unsigned long int n)
Add no-goods to meta statistics.
void restart(void)
Increment current restart count.
RestartStop(Stop *s)
Stop the meta engine if indicated by the stop object s.
SpaceStatus status(Space *s)
Test master status with meta statistics.
void update(const Search::Statistics &s)
Update statistics.
bool enginestopped(void) const
Return whether the engine has been stopped.
Stop(void)
Default constructor.
A mutex for mutual exclausion among several threads.
Gecode toplevel namespace
#define GECODE_SEARCH_EXPORT