Skip to main content

Why does MIPGap not give me the actual optimality gap?

Answered

Comments

2 comments

  • Official comment
    Simranjit Kaur
    • Gurobi Staff
    This post is more than two 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 try Gurobot, our chatbot interface offering instant, expert-level support.
  • Eli Towle
    • Gurobi Staff

    This is a good question. The MIPGap parameter defines the relative optimality gap at which Gurobi will terminate the solve. The default value of this parameter is 0.0001 (0.01%). Parameters control the solver's behavior and are not changed during the optimization process.

    You are looking for the MIPGap attribute, which stores the relative optimality gap for the current solution:

    model.MIPGap
    0

Post is closed for comments.