Originally posted by: UserCplex
Daniel,
I am encountering another issue.
Node '0', the root node obtained whose number of 0 (stored in variable cplexnodeno) is obtained at the start of the branch callback via:
int cplexnodeno;
status = CPXgetcallbacknodeinfo(env, cbdata, wherefrom, 0, CPX_CALLBACK_INFO_NODE_SEQNUM, &cplexnodeno);
returns a nodecnt of 2, bdcnt of 2 indices[0] = indices[1] of the same variable, let us call it x1, lu[0]='U', lu[1]='L', bd[0] = 0 and bd[1] = 1
I take this to mean that from root node, (node number 0), node N1 is created where x1 is Upperbounded at 0, and node N2 is created where x1 is Lowerbounded at 1.
My data structure to store CPLEX's BBTREE is an std::vector<> bbtree
where bbtree[0] refers to root node, while bbtree[1] refers to node N1 referenced above, and in general, bbtree[k] will refer to the node Nk
So far, so good.
CPLEX then takes up to solve node N1. I am able to verify within this callback via:
int cplexnodeno;
status = CPXgetcallbacknodeinfo(env, cbdata, wherefrom, 0, CPX_CALLBACK_INFO_NODE_SEQNUM, &cplexnodeno);
that cplexnodeno is indeed 1.
In the branch callback of node N1, I get a nodecnt of 2, bdcnt of 2 indices[0] = indices[1] of the same variable, let us call it x2, lu[0]='L', lu[1]='U', bd[0] = 1 and bd[1] = 0
As before, I take this to mean that from N1, node N3 is created where x2 is Lowerbounded at 1, and node N4 is created where x2 isUpperbounded at 0.
Now, CPLEX then takes up solving node '4' where this 4 is the value obtained of cplexnodeno in that branch callback.
int cplexnodeno;
status = CPXgetcallbacknodeinfo(env, cbdata, wherefrom, 0, CPX_CALLBACK_INFO_NODE_SEQNUM, &cplexnodeno);
I would have expected that in this node, x2 is upper bounded to 0, but it is actually lower bounded at 1.
Is there a way to resolve this discrepancy?
In other words, can the user rely on any one to one correspondence between which node's branching information is displayed in indices[], lu[] and bd[] data structure first and which node's comes next?
#CPLEXOptimizers#DecisionOptimization