Originally posted by: SystemAdmin
[akshayg said:]
Hi,
I am having trouble attaching node data to branches using branch callback in Concert Technology. I have the following piece of code
myNode* downNode = new myNode(getEnv(),T);
myNode* upNode = new myNode(getEnv(),T+1);
makeBranch(downcons,getObjValue(),(NodeData*) downNode);
getEnv().out() << endl << "child1 created.";
makeBranch(upcons,getObjValue(),(NodeData*) upNode);
getEnv().out() << " child2 created." << endl;<br />
<myNode> is my derived class from the Concert base class NodeData.
class RSD::MIP::myNode : public IloCplex::MIPCallbackI::NodeData
{
public:
const IloInt NumBranchUp;
IloIntArray NonBranchVar;
myNode(const IloEnv& env,const IloInt num_br_up);
~myNode();
};
CPLEX will branch at the root node and it displays that the two children are created. However, it gives a Segmentation fault after the two child nodes are created. I have employed a destructor that calls NonBranchVar.end().
Any suggestions where the segmentation fault might occur ?
#CPLEXOptimizers#DecisionOptimization