Hello,
I would like to store and query the parent sequence number from which children sequence numbers are generated within a branch callback.
Allowing CPLEX to determine the branching by itself, I follow https://www.ibm.com/docs/ro/icos/20.1.0?topic=b-cpxxbranchcallbackbranchascplex-cpxbranchcallbackbranchascplex for this.
int cplex_node_number;// this is the sequence number of the node where the user written branch callback is invoked.
status = CPXgetcallbacknodeinfo(env, cbdata, wherefrom, 0, CPX_CALLBACK_INFO_NODE_SEQNUM, &cplex_node_number);// obtains the sequence number
int seqnum_p; // Child node index that will be created.
status = CPXbranchcallbackbranchasCPLEX(env, cbdata, wherefrom, nd, &cplex_node_number, &seqnum_p);
Does the above code guarantee that the parent of seqnum_p will be cplex_node_number ?
If yes, how can I query the parent of seqnum_p when it is subsequently being processed and I am in the branch callback of seqnum_p? Is it via the following?
int parent;
status = CPXgetcallbacknodeinfo(env, cbdata, wherefrom, 0, CPX_CALLBACK_INFO_NODE_USERHANDLE, &parent);
Does the answers to the above questions change if I implement my own branching as opposed to letting CPLEX do the branching? For this case, I follow https://www-eio.upc.es/lceio/manuals/cplex-11/html/refcallablelibrary/html/functions/CPXbranchcallbackbranchbds.html
status = CPXbranchcallbackbranchbds (env, cbdata, wherefrom, 1, &bestj, varlu, varbd, objval, cplex_node_number, &seqnum1);
In the above case also, is it true that seqnum1's parent will be cplex_node_number ?
Thank you.
------------------------------
CPLEX User
------------------------------