Skip to main content

Runtime until certain optimality gap had been reached

Answered

Comments

3 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 Caroline,

    It is currently not possible to query the times you mentioned.

    However, you can use callbacks to determine the values you are looking for. With that, you can avoid re-running the model. You could, e.g., use the message callback to retrieve the logging messages and filter them for the information you seek. Other callbacks such as the MIPSOL callback could also come in handy. Note that the MIPGap is not directly accessible, but you can compute the currently reached Gap by the formula provided in our knowledge base article on changing MIPGap values.

    Best regards,
    Jaromił

    0
  • Yuriy Zinchenko
    Gurobi Staff Gurobi Staff

    One more note is that in Python, as you have mentioned, you can simply set MIPgap to 10%, record your time, then reset it to 5% etc., while Gurobi will actually resume the solution process from the previous point.  It is indeed a suboptimal approach, but the overhead to restart the optimization should not be that huge.

    0

Post is closed for comments.