Is it possible to retrieve the best (lower) bound of a MILP problem that did not reach the optimal solution?
AnsweredI have a MILP model, which I solve using time_limit. Many times the optimal solution is not reached. I can retrieve the incumbent solution, but I want to retrieve the fractional solution of the best (lower) bound generated during the Branch and Bound process. Is there a way to get it? I am using C++ API.
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
Hi Efrain,
You can access the best bound via the ObjBound attribute.
Best regards,
Jaromił0 -
Sorry, I was not clear enough I want to retrieve the value of the variables of the best lower bound solution, not the value of the objective function.
0 -
I have just found how to do it using a callback. You have to use
if (where ==GRB_CB_MIPNODE && getIntInfo(GRB_CB_MIPNODE_STATUS) == GRB_OPTIMAL)
to find out if the node is optimal for the LR of the problem
then use
getNodeRel () to obtain the value on the variables. Thank you Jaromil, for your help
0
Post is closed for comments.
Comments
4 comments