Skip to main content

Is it possible to retrieve the best (lower) bound of a MILP problem that did not reach the optimal solution?

Answered

Comments

4 comments

  • Official comment
    Simranjit Kaur
    Gurobi Staff Gurobi Staff
    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?.
  • Jaromił Najman
    Gurobi Staff Gurobi Staff

    Hi Efrain,

    You can access the best bound via the ObjBound attribute.

    Best regards,
    Jaromił

    0
  • Efrain Ruiz
    Gurobi-versary
    First Comment
    First Question

    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
  • Efrain Ruiz
    Gurobi-versary
    First Comment
    First Question

    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.