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