Go to the documentation of this file.
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())};
126 parent = {
static_cast<int>(ei.
nid()),
128 static_cast<int>(ei.
wid())};
141 auto node = connector->
createNode(this_node, parent, alt, alts, ns)
void connect(void)
connect to a socket via port specified in the construction (6565 by default)
virtual ~CPProfilerSearchTracer(void)
Delete.
void start(const std::string &file_path="", int execution_id=-1, bool has_restarts=false)
Node & set_info(const std::string &info)
unsigned int alternatives(void) const
Return number of alternatives.
NodeType type(void) const
Return node type.
unsigned int nid(void) const
Return parent node id.
const Space & space(void) const
Return corresponding space.
virtual void init(void)
The search engine initializes.
EngineType type(void) const
Return engine type.
unsigned int alternative(void) const
Return number of alternative.
unsigned int wid(void) const
Return worker id.
Gecode toplevel namespace
virtual std::string getInfo(const Space &home) const =0
Return info for a space.
Unique identifier for a node.
const Choice & choice(void) const
Return corresponding choice.
void sendNode(const Node &node)
Node & set_label(const std::string &label)
Node createNode(NodeUID node, NodeUID parent, int alt, int kids, NodeStatus status)
virtual void node(const EdgeInfo &ei, const NodeInfo &ni)
The engine creates a new node with information ei and ni.
std::string string(void) const
Return string for alternative.
unsigned int wid(void) const
Return parent worker id.
@ BRANCH
Node representing a branch.
#define GECODE_NEVER
Assert that this command is never executed.
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 void skip(const EdgeInfo &ei)
The engine skips an edge.
unsigned int eid(unsigned int wid) const
Return the engine id of a worker with id wid.
NodeStatus
Types of nodes for CP Profiler.
@ SKIPPED
Node skipped by backjumping.
unsigned int nid(void) const
Return node id.
CPProfilerSearchTracer(int eid, std::string name, unsigned int port=Search::Config::cpprofiler_port, const GetInfo *pgi=nullptr)
Initialize.
void restart(int restart_id=-1)
@ FAILED
Node representing failure.
const EngineInfo & engine(unsigned int eid) const
Provide access to engine with id eid.
virtual ~GetInfo(void)
Delete.
unsigned int engines(void) const
Return number of engines.
void disconnect(void)
disconnect from a socket
@ SOLVED
Node representing a solution.
Class to send solution information to CPProfiler.