Depth-first restart best solution search engine implementation. More...
#include <restart.hh>
Public Member Functions | |
Restart (Space *s, size_t sz, const Search::Options &o) | |
Initialize engine for space s (with size sz) and options o. | |
Space * | next (void) |
Return next better solution (NULL, if none exists or search has been stopped) | |
~Restart (void) | |
Destructor. | |
![]() | |
DFS (Space *s, size_t sz, const Options &o) | |
Initialize for space s (of size sz) with options o. | |
Statistics | statistics (void) const |
Return statistics. | |
~DFS (void) | |
Destructor. | |
![]() | |
Worker (size_t sz) | |
Initialize with space size sz. | |
void | start (void) |
Reset stop information. | |
bool | stop (const Options &o, size_t sz) |
Check whether engine must be stopped (with additional stackspace sz) | |
bool | stopped (void) const |
Check whether engine has been stopped. | |
void | push (const Space *s, const Choice *c) |
New space s and choice c get pushed on stack. | |
void | constrained (const Space *s1, const Space *s2) |
Space s1 is replaced by space s2 due to constraining. | |
void | adapt (const Space *s) |
New space s is added for adaptive recomputation. | |
void | pop (const Space *s, const Choice *c) |
Space s and choice c get popped from stack. | |
void | lao (const Space *s) |
Space s gets used for LAO (removed from stack) | |
void | current (const Space *s) |
Space s becomes current space (s = NULL: current space deleted) | |
void | reset (const Space *s, unsigned long int d=0) |
Reset statistics for space s with root depth d. | |
void | reset (void) |
Reset statistics for failed space. | |
void | stack_depth (unsigned long int d) |
Record stack depth d. | |
unsigned long int | steal_depth (unsigned long int d) const |
Return steal depth. | |
![]() | |
Statistics (void) | |
Initialize. | |
Statistics | operator+ (const Statistics &s) |
Return sum with s. | |
Statistics & | operator+= (const Statistics &s) |
Increment by statistics s. | |
![]() | |
StatusStatistics (void) | |
Initialize. | |
StatusStatistics | operator+ (const StatusStatistics &s) |
Return sum with s. | |
StatusStatistics & | operator+= (const StatusStatistics &s) |
Increment by statistics s. |
Protected Attributes | |
Space * | root |
Root node. | |
Space * | best |
So-far best solution. |
Additional Inherited Members | |
![]() | |
unsigned long int | fail |
Number of failed nodes in search tree. | |
unsigned long int | node |
Number of nodes expanded. | |
unsigned long int | depth |
Maximum depth of search stack. | |
size_t | memory |
Peak memory allocated. | |
![]() | |
Space * | reset (Space *s) |
Reset engine to restart at space s and return new root. |
Depth-first restart best solution search engine implementation.
Definition at line 46 of file restart.hh.
|
inline |
Initialize engine for space s (with size sz) and options o.
Definition at line 62 of file restart.hh.
|
inline |
Destructor.
Definition at line 80 of file restart.hh.
|
inline |
Return next better solution (NULL, if none exists or search has been stopped)
Reimplemented from Gecode::Search::Sequential::DFS.
Definition at line 67 of file restart.hh.
|
protected |
Root node.
Definition at line 49 of file restart.hh.
|
protected |
So-far best solution.
Definition at line 51 of file restart.hh.