
Parallel portfolio engine implementation. More...
#include <pbs.hh>
Public Member Functions | |
| PBS (Engine **s, Stop **so, unsigned int n, const Statistics &stat) | |
| Initialize. More... | |
| virtual Space * | next (void) |
| Return next solution (NULL, if none exists or search has been stopped) More... | |
| virtual Statistics | statistics (void) const |
| Return statistics. More... | |
| virtual bool | stopped (void) const |
| Check whether engine has been stopped. More... | |
| virtual void | constrain (const Space &b) |
| Constrain future solutions to be better than b. More... | |
| virtual | ~PBS (void) |
| Destructor. More... | |
Protected Member Functions | |
| bool | report (Slave< Collect > *slave, Space *s) |
| Process report from slave, return false if solution was ignored. More... | |
Protected Attributes | |
| Statistics | stat |
| Master statistics. More... | |
| Slave< Collect > ** | slaves |
| Slave engines. More... | |
| unsigned int | n_slaves |
| Number of slave engines. More... | |
| unsigned int | n_active |
| Number of active slave engines. More... | |
| bool | slave_stop |
| Whether a slave has been stopped. More... | |
| volatile bool | tostop |
| Shared stop flag. More... | |
| Collect | solutions |
| Collect solutions in this. More... | |
| Support::Mutex | m |
| Mutex for synchronization. More... | |
| unsigned int | n_busy |
| Number of busy slaves. More... | |
| Support::Event | idle |
| Signal that number of busy slaves becomes zero. More... | |
Parallel portfolio engine implementation.
|
inline |
Initialize.
The key invariant of the engine is as follows:
|
virtual |
|
inlineprotected |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |