50 os <<
"trace<Search>::init()" << std::endl;
51 for (
unsigned int e=0U; e<
engines(); e++) {
52 os <<
"\t" << e <<
": "
53 <<
t2s[engine(e).type()];
54 if (engine(e).meta()) {
56 for (
unsigned int i=engine(e).efst(); i<engine(e).elst(); i++) {
57 os << i;
if (i+1 < engine(e).elst())
os <<
",";
61 for (
unsigned int i=engine(e).wfst(); i<engine(e).wlst(); i++) {
62 os << i;
if (i+1 < engine(e).wlst())
os <<
",";
65 os <<
"}" << std::endl;
71 os <<
"trace<Search>::round(e:" <<
eid <<
")" << std::endl;
76 os <<
"trace<Search>Search::skip(w:" << ei.
wid()
83 os <<
"trace<Search>::node(";
97 os <<
",w:" << ni.
wid() <<
',';
99 os <<
"p:" << ei.
nid() <<
',';
100 os <<
"n:" << ni.
nid() <<
')';
103 os <<
" [stolen from w:" << ei.
wid() <<
"]";
114 os <<
"trace<Search>::done()" << std::endl;
unsigned int alternatives(void) const
Return number of alternatives.
unsigned int alternative(void) const
Return number of alternative.
unsigned int wid(void) const
Return parent worker id.
std::string string(void) const
Return string for alternative.
unsigned int nid(void) const
Return parent node id.
NodeType type(void) const
Return node type.
const Choice & choice(void) const
Return corresponding choice.
unsigned int nid(void) const
Return node id.
unsigned int wid(void) const
Return worker id.
unsigned int eid(unsigned int wid) const
Return the engine id of a worker with id wid.
@ AOE
Unspecified engine (any other engine)
unsigned int engines(void) const
Return number of engines.
static const char * t2s[EngineType::AOE+1]
Map engine type to string.
StdSearchTracer(std::ostream &os=std::cerr)
Initialize with output stream os.
virtual void done(void)
All workers are done.
virtual void init(void)
The search engine initializes.
virtual ~StdSearchTracer(void)
Delete.
virtual void node(const EdgeInfo &ei, const NodeInfo &ni)
The engine creates a new node with information ei and ni.
static StdSearchTracer def
Default tracer (printing to std::cerr)
virtual void round(unsigned int eid)
The engine with id eid goes to a next round (restart or next iteration in LDS)
std::ostream & os
Output stream to use.
virtual void skip(const EdgeInfo &ei)
The engine skips an edge.
Gecode toplevel namespace