How to terminate once gap% is small?
AnsweredI am solving a large MLP with Gurobi. An accuracy of 0.5% gap in determining the objective function value is sufficient for my purposes. However, Gurobi is taking a long time to go from 0.5% to an exact solution.
Is there a way to terminate model.optimize() and retrieve upper and lower bounds once the gap% reaches a specified threshold?
My output looks like the table below. Once Gap is small, how do I automatically terminate the calculation?
Objective Bounds
Incumbent BestBd Gap
7478.4 1247.71731 83.30%
1280.13 1247.71731 2.53%
1279.8658 1247.71731 2.51%
1264.3452 1247.71731 1.32%
1263.5402 1247.71731 1.25%
1263.4653 1247.71731 1.25%
1263.3875 1247.71731 1.24%
1263.3722 1247.71731 1.24%
1262.1739 1247.71731 1.15%
1262.102 1247.72661 1.14%
-
Thank you. I found the answer I need on this post:
0
Please sign in to leave a comment.
Comments
2 comments