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);
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());
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())};
141 auto node = connector->
createNode(this_node, parent, alt, alts, ns)
Class to send solution information to CPProfiler.
virtual ~GetInfo(void)
Delete.
virtual std::string getInfo(const Space &home) const =0
Return info for a space.
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.
Node createNode(NodeUID node, NodeUID parent, int alt, int kids, NodeStatus status)
void sendNode(const Node &node)
void start(const std::string &file_path="", int execution_id=-1, bool has_restarts=false)
void disconnect(void)
disconnect from a socket
void connect(void)
connect to a socket via port specified in the construction (6565 by default)
void restart(int restart_id=-1)
Node & set_info(const std::string &info)
Node & set_label(const std::string &label)
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.
EngineType type(void) const
Return engine type.
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.
const EngineInfo & engine(unsigned int eid) const
Provide access to engine with id eid.
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.