How to Retrieve a Unique Identifier for a Node in Gurobi Callbacks?
AnsweredHi everyone,
I'm currently working with Gurobi and trying to extract specific information about the optimization process during a callback.
I was wondering if there is a way to retrieve a unique identifier for a given node. For example:
-
In the MIPSOL (where) callback, I would like to determine which node the new incumbent solution originates from.
-
In the MIPNODE (where) callback, I’d like to obtain an identifier that tells me exactly which node is currently being examined.
Would it be possible to use the NODCNT parameter, assuming it provides a sequential identifier for each node? Or is there another method to track nodes uniquely?
Thanks in advance for your help!
Best regards,
Enrico Calandrini
-
Hi Enrico,
This might be a bit late, but NODCNT is a good choice for a unique identifier. Just to let you know, there might be multiple callbacks for the same node, as processing a node involves numerous steps that all perform a callback.
Best regards,
Martin
0
Please sign in to leave a comment.
Comments
1 comment