42 #ifndef __GECODE_SEARCH_SEQUENTIAL_BAB_HH__
43 #define __GECODE_SEARCH_SEQUENTIAL_BAB_HH__
50 namespace Gecode {
namespace Search {
namespace Sequential {
85 d(0),
mark(0), best(NULL) {
119 while (cur == NULL) {
128 switch (cur->
status(*
this)) {
143 return best->
clone();
147 if ((d == 0) || (d >= opt.
c_d)) {
unsigned int a_d
Create a clone during recomputation if distance is greater than a_d (adaptive distance) ...
Space must be branched (at least one brancher left)
unsigned int c_d
Create a clone after every c_d commits (commit distance)
Space * clone(bool share=true, CloneStatistics &stat=unused_clone) const
Clone space.
const Choice * push(Worker &stat, Space *s, Space *c)
Push space c (a clone of s or NULL)
Depth-first path (stack of edges) supporting recomputation.
unsigned long int fail
Number of failed nodes in search tree.
void path(Home home, int offset, const IntVarArgs &x, IntVar s, IntVar e, IntConLevel icl)
Post propagator such that x forms a Hamiltonian path.
void * mark(void *p)
Return marked pointer for p.
BAB(Space *s, const Options &o)
Initialize with space s and search options o.
Implementation of depth-first branch-and-bound search engine.
NoGoods & nogoods(void)
Return no-goods.
int entries(void) const
Return number of entries on stack.
void start(void)
Reset stop information.
Gecode::FloatVal c(-8, 8)
Space * next(void)
Search for next better solution
Statistics statistics(void) const
Return statistics.
Space * recompute(unsigned int &d, unsigned int a_d, Worker &s)
Recompute space according to path.
void commit(const Choice &c, unsigned int a, CommitStatistics &stat=unused_commit)
Commit choice c for alternative a.
bool clone
Whether engines create a clone when being initialized.
void reset(void)
Reset stack.
Choice for performing commit
No-goods recorded from restarts.
void next(void)
Generate path for next node.
SpaceStatus status(StatusStatistics &stat=unused_status)
Query space status.
Space * snapshot(Space *s, const Options &o, bool share=true)
Clone space s dependening on options o.
Gecode toplevel namespace
unsigned long int node
Number of nodes expanded.
const unsigned int nogoods_limit
Depth limit for no-good generation during search.
const Choice * choice(void)
Create new choice for current brancher.
#define GECODE_NEVER
Assert that this command is never executed.
bool stop(const Options &o)
Check whether engine must be stopped.
bool empty(void) const
Test whether path is empty.
Space is solved (no brancher left)