Making MIP converge faster
AnsweredHello,
I am trying to solve a MIP in Gurobi, but it is taking a long time (see screenshot).

I know the exact optimal solution is 31827.39074. As you see, the solution is very close to the exact optimal. I want to terminate at this stage but Gurobi is still running even after 30000 seconds and all it has done is reduce the objective by a very small amount.
My question is how do I terminate early when a quality solution is received. I wanted to play around with the MIPGap parameter, but nothing has changed and I am not sure what exactly MIPGap means in Gurobi and what are the practical implications of it.
Any help is much appreciated.
-
Official comment
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. -
Hi Tanvir,
recently Matthias wrote a great note about the MIP Gap. It should be able to clarify most of your questions.
Best regards
Jonasz0 -
This helps indeed. However, I am still wondering if there is any way to terminate early, especially in cases where I know that the current optimal objective is good enough for me. I tried increasing the MIPGap for early termination, but it does not work. For example, in the above screenshot, I see that 44.5% gap gives me a good enough solution. So I tried MIPGap = 50% so that it terminates early. But it then gets stuck at 58% for a long time probably because the solver takes a different path according to the article you mentioned.
Is there anything I can do to terminate early?
0 -
Hi Tanvir,
maybe changing MIPFocus to 1 could help?
Best regards
Jonasz0 -
Thank you Jonasz, I will try it.
0
Post is closed for comments.
Comments
5 comments