61 return slave->statistics();
65 return slave->stopped();
89 for (
unsigned int i=0U; i<n; i++) {
99 unsigned int n_exhausted = 0;
104 for (
unsigned int i=0U; i<
cur; i++)
113 cur++; n_exhausted++;
148 for (
unsigned int i=0U; i<
n_slaves; i++)
157 throw NoBest(
"PBS::constrain");
158 for (
unsigned int i=0U; i<
n_slaves; i++)
164 for (
unsigned int i=0U; i<
n_slaves; i++)
Search engine implementation interface
Exception: Best solution search is not supported
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 (NULL, 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 controling slaves in a portfolio.
void share(SharedStopInfo *ssi)
Intialize shared stop information.
PortfolioStop(Stop *so)
Initialize.
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.
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