38namespace Gecode {
namespace Search {
namespace Seq {
40 template<
class Tracer>
43 : tracer(o.tracer), opt(o),
path(opt.nogoods_limit), d(0), mark(0),
55 cur = snapshot(s,opt);
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);
118 (void) cur->choice();
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>
struct Gecode::@603::NNF::@65::@66 b
For binary nodes (and, or, eqv)
Choice for performing commit
No-goods recorded from restarts.
void init(unsigned int wid, unsigned int nid, unsigned int a)
Initialize.
unsigned int nid(void) const
Return parent node id.
@ BAB
Engine is a BAB engine.
BAB(Space *s, const Options &o)
Initialize with space s and search options o.
NoGoods & nogoods(void)
Return no-goods.
Space * next(void)
Search for next better solution
void constrain(const Space &b)
Constrain future solutions to be better than b.
Statistics statistics(void) const
Return statistics.
Search tree edge for recomputation
unsigned int truealt(void) const
Return true number for alternatives (excluding lao optimization)
unsigned int nid(void) const
Return node identifier.
const Choice * choice(void) const
Return choice.
void reset(void)
Reset information.
SpaceStatus status(StatusStatistics &stat=unused_status)
Query space status.
@ SS_BRANCH
Space must be branched (at least one brancher left)
@ SS_SOLVED
Space is solved (no brancher left)
@ SS_FAILED
Space is failed
Gecode toplevel namespace
void path(Home home, const IntVarArgs &x, IntVar s, IntVar e, IntPropLevel ipl=IPL_DEF)
Post propagator such that x forms a Hamiltonian path.
#define GECODE_NEVER
Assert that this command is never executed.