38 namespace Gecode {
namespace Search {
namespace Seq {
40 template<
class Tracer>
46 tracer.engine(SearchTracer::EngineType::BAB, 1U);
59 template<
class Tracer>
86 cur = path.recompute(d,opt.
a_d,*
this,*best,mark,tracer);
93 if (tracer && (path.entries() > 0)) {
97 unsigned int nid = tracer.nid();
98 switch (cur->
status(*
this)) {
102 tracer.wid(), nid, *cur);
114 tracer.wid(), nid, *cur);
123 mark = path.entries();
125 return best->
clone();
129 if ((d == 0) || (d >= opt.
c_d)) {
136 const Choice* ch = path.push(*
this,cur,c,nid);
139 tracer.wid(), nid, *cur, ch);
153 template<
class Tracer>
159 template<
class Tracer>
173 mark = path.entries();
176 template<
class Tracer>
195 template<
class Tracer>
201 template<
class Tracer>
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)
Node representing a branch.
unsigned int c_d
Create a clone after every c_d commits (commit distance)
BAB(Space *s, const Options &o)
Initialize with space s and search options o.
const Choice * choice(void) const
Return choice.
void path(Home home, int offset, const IntVarArgs &x, IntVar s, IntVar e, IntPropLevel ipl)
Post propagator such that x forms a Hamiltonian path.
unsigned long int fail
Number of failed nodes in search tree.
Node representing failure.
unsigned int nid(void) const
Return node identifier.
void constrain(const Space &b)
Constrain future solutions to be better than b.
void * mark(void *p)
Return marked pointer for unmarked pointer p.
unsigned int truealt(void) const
Return true number for alternatives (excluding lao optimization)
void start(void)
Reset stop information.
Gecode::FloatVal c(-8, 8)
void init(unsigned int wid, unsigned int nid, unsigned int a)
Initialize.
Space * clone(CloneStatistics &stat=unused_clone) const
Clone space.
Node representing a solution.
void commit(const Choice &c, unsigned int a, CommitStatistics &stat=unused_commit)
Commit choice c for alternative a.
virtual void constrain(const Space &best)
Constrain function for best solution search.
struct Gecode::@593::NNF::@62::@63 b
For binary nodes (and, or, eqv)
Search tree edge for recomputation
bool clone
Whether engines create a clone when being initialized.
NoGoods & nogoods(void)
Return no-goods.
Choice for performing commit
No-goods recorded from restarts.
Statistics statistics(void) const
Return statistics.
SpaceStatus status(StatusStatistics &stat=unused_status)
Query space status.
Space * next(void)
Search for next better solution
Gecode toplevel namespace
unsigned long int node
Number of nodes expanded.
const unsigned int nogoods_limit
Depth limit for no-good generation during search.
Space * snapshot(Space *s, const Options &o)
Clone space s dependening on options o.
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.
Space is solved (no brancher left)