61 return slave->statistics();
65 return slave->stopped();
69#ifdef GECODE_HAS_EXPERIMENTAL
70 return slave->limited();
97 for (
unsigned int i=0U; i<n; i++) {
107 unsigned int n_exhausted = 0;
113 for (
unsigned int i=0U; i<
cur; i++)
122 cur++; n_exhausted++;
161 for (
unsigned int i=0U; i<
n_slaves; i++)
170 throw NoBest(
"PBS::constrain");
171 for (
unsigned int i=0U; i<
n_slaves; i++)
177 for (
unsigned int i=0U; i<
n_slaves; i++)
Search engine implementation interface
Engine(void)
Construct a meta engine without worker control.
virtual bool limited(void) const
Whether the engine stopped at a local limit (such as a CABS width limit) and cannot continue.
Exception: Best solution search is not supported
bool incomplete
Whether a slave stopped at a local limit.
SharedStopInfo ssi
Shared slave information.
virtual ~PBS(void)
Destructor.
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.
Stop object used for controlling slaves in a portfolio.
void share(SharedStopInfo *ssi)
Initialize shared stop information.
PortfolioStop(Stop *so, Stop *po=nullptr)
Initialize with slave stop so and portfolio stop po.
Runnable slave of a portfolio master.
bool stopped(void) const
Check whether slave has been stopped.
Space * next(void)
Return next solution.
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(void)
Delete slave.
Base-class for Stop-object.
Stop(void)
Default constructor.
Heap heap
The single global heap.
Gecode toplevel namespace