How do can I stop and get the result when the MIP gap is smaller than 5%?
AnsweredDuring the solving process, often the gap between Incumbent and BestBd is good enough for me, say, at 2%. But since the OptimalityTol has to be at 0.01 or lower, it won't stop. Is there a way to tell the solver to stop so I can use the suboptimal result?
I use Yalmip and Matlab to model the MILP problem.
Here is my code to build solve problem
ops = sdpsettings('solver', 'gurobi');
result=solvesdp(constraints,objective,ops);
How do I achieve my purpose?
0

If you change the Gurobi MIPGap setting to 0.02, Gurobi will terminate when the Incumbent and BestBd are within 2%. It's worth noting that OptimalityTol is the dual feasibility tolerance.
0
Please sign in to leave a comment.
Comments
1 comment