frontier.hh
Go to the documentation of this file.
Guidance for heuristic search engines (experimental).
Definition search.hh:1259
Support::Terminator * terminator(void) const override
Return terminator.
Node leased by a worker, or partially expanded node.
Definition frontier.hh:56
unsigned long long int revision
Incumbent revision the node is constrained with.
Definition frontier.hh:63
bool stopped(void) const override
Whether search has been stopped.
void reset(Space *s) override
Reset engine to restart at space s.
virtual Entry select(void)=0
Remove and return the next open node.
Space * next(void) override
Return next better solution (nullptr if none or stopped).
void constrain(const Space &s) override
Constrain future solutions to be better than s.
void publish(Space *s, std::int64_t b)
Make s with bound b the incumbent, if it improves.
void terminate(void)
Stop all workers (must be called by subclass destructors).
bool enabled(unsigned int id)
Whether worker id is currently enabled.
void initialize(Space *s, bool clone)
Start search from root s.
virtual bool advance(void)=0
Called when all work is done, return whether there is new work.
Search::Statistics statistics(void) const override
Return statistics.
virtual void submit(const Entry &e, bool leased)=0
Add child e, or delete it; leased tells whether its parent is still leased.
bool limited(void) const override
Whether search stopped at the width or frontier limit.
bool running
Whether search is running, being shut down, stopped, or limited.
Definition frontier.hh:112
static const unsigned int max_batch
Maximal number of children a worker collects before submitting.
Definition frontier.hh:132
virtual void started(const Space &r)
Called with the root r when search starts.
Node whose alternatives are expanded one at a time.
Definition choice-expansion.hh:62
Queue with arbitrary number of elements.
Definition dynamic-queue.hpp:42
An interface for objects that can be run by a thread.
Definition thread.hpp:181
An interface for objects that can be called after a thread has terminated (after running the thread's...
Definition thread.hpp:168
Definition bab.hh:39
Search engines
Gecode toplevel namespace
