34#ifndef GECODE_SEARCH_SEQ_PBS_HH
35#define GECODE_SEARCH_SEQ_PBS_HH
47 unsigned long long int l;
129 virtual bool stopped(
void)
const;
Search engine implementation interface
Engine(void)
Construct a meta engine without worker control.
bool incomplete
Whether a slave stopped at a local limit.
SharedStopInfo ssi
Shared slave information.
unsigned int n_slaves
Number of slave engines.
bool slave_stop
Whether a slave has been stopped.
unsigned int slice
Size of a slice.
virtual Space * next(void)
Return next solution (nullptr, if none exists or search has been stopped).
Statistics stat
Master statistics.
virtual bool stopped(void) const
Check whether engine has been stopped.
virtual Statistics statistics(void) const
Return statistics.
unsigned int cur
Current slave to run.
virtual void constrain(const Space &b)
Constrain future solutions to be better than b.
PBS(Engine **slaves, Stop **stops, unsigned int n, const Statistics &stat, const Search::Options &opt)
Initialize.
virtual bool stop(const Statistics &s, const Options &o)
Return true if portfolio engine must be stopped.
void share(SharedStopInfo *ssi)
Initialize shared stop information.
PortfolioStop(Stop *so, Stop *po=nullptr)
Initialize with slave stop so and portfolio stop po.
unsigned long long int l
The current failure limit, incremented for each slice.
bool done
Whether search stopped because the slice is done.
Runnable slave of a portfolio master.
bool stopped(void) const
Check whether slave has been stopped.
Space * next(void)
Return next solution.
Slave & operator=(const Slave &s)=default
Assignment operator.
Engine * slave
The slave engine.
Slave(void)
Default constructor.
void constrain(const Space &b)
Constrain with better solution b.
bool limited(void) const
Check whether slave stopped at a local limit.
void init(Engine *s, Stop *so)
Initialize with slave s and its stop object so.
Statistics statistics(void) const
Return statistics of slave.
Slave(const Slave &s)=default
Copy constructor.
~Slave(void)
Delete slave.
void run(void)
Perform one run.
Base-class for Stop-object.
Stop(void)
Default constructor.
Gecode toplevel namespace
#define GECODE_SEARCH_EXPORT