MIP stopping criteria - Rate of objective value change
AnsweredHi Gurus,
Traditionally for MIPs either a time limit or a MIP gap is enforced if we want quality feasible solution and not solve to full optimality within a time limit . Is there any way for Gurobi MIP to exit instead based of "rate of change in objective" i.e. if the objective has not improved by x% since the last minute etc.?
Understand that MIP objective improvement might not be very continuous due to branching but we want to exit if over a "minute" of runtime the MIP does not improve the last feasible/best known objective to a large extent. Any way to accomplish that?
Thanks in anticipation.
-
Hi Kalyana,
You could achieve this using callbacks.
See "How do I use callbacks to terminate the solver?"
You would use the MIPSOL callback and store the solution value and current time when it is called, so that you can compare against them next time the callback is triggered to calculate a "rate". You would also update the TimeLimit parameter so that if no further solutions are found within a certain time frame then the solve is terminated.
See also:
callback.py (there are equivalents in other APIs found here).
Callback codesPlease let me know if anything needs clarification.
- Riley
0 -
Thanks Riley. Appreciate the insights.
0
Please sign in to leave a comment.
Comments
2 comments