Runtime until certain optimality gap had been reached

Answered

Comments

2 comments

  • Jaromił Najman

    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
    Comment actions Permalink
  • Yuriy Zinchenko

    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
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk