42#ifdef GECODE_HAS_CPPROFILER
57 connector(new
CPProfiler::Connector(port)), execution_id(
eid), name(name0), restart(0),
64 bool restarts = ((
engines() == 2U) &&
67 connector->start(name, execution_id, restarts);
73 connector->restart(restart);
84 parent.
nid =
static_cast<int>(ei.
nid());
85 parent.
tid =
static_cast<int>(ei.
wid());
86 dummy_node.
tid =
static_cast<int>(ei.
wid());
91 auto node = connector->createNode(dummy_node, parent,
95 connector->sendNode(
node);
102 static_cast<int>(ni.
wid())};
115 alts =
static_cast<int>(ni.
choice().alternatives());
126 parent = {
static_cast<int>(ei.
nid()),
128 static_cast<int>(ei.
wid())};
138 info = pgi->getInfo(ni.
space());
141 auto node = connector->createNode(this_node, parent, alt, alts, ns)
144 connector->sendNode(
node);
149 connector->disconnect();
Class to send solution information to CPProfiler.
virtual ~GetInfo(void)
Delete.
virtual void node(const EdgeInfo &ei, const NodeInfo &ni)
The engine creates a new node with information ei and ni.
virtual void init(void)
The search engine initializes.
virtual void skip(const EdgeInfo &ei)
The engine skips an edge.
virtual void round(unsigned int eid)
The engine with id eid goes to a next round (restart or next iteration in LDS)
virtual void done(void)
All workers are done.
virtual ~CPProfilerSearchTracer(void)
Delete.
CPProfilerSearchTracer(int eid, std::string name, unsigned int port=Search::Config::cpprofiler_port, const GetInfo *pgi=nullptr)
Initialize.
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.
const Space & space(void) const
Return corresponding space.
unsigned int eid(unsigned int wid) const
Return the engine id of a worker with id wid.
@ RBS
Engine is a RBS engine.
unsigned int engines(void) const
Return number of engines.
Code that is specific to the CPProfiler.
NodeStatus
Types of nodes for CP Profiler.
@ SOLVED
Node representing a solution.
@ BRANCH
Node representing a branch.
@ SKIPPED
Node skipped by backjumping.
@ FAILED
Node representing failure.
Gecode toplevel namespace
Unique identifier for a node.
#define GECODE_NEVER
Assert that this command is never executed.