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 sub-optimal 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
-
Official comment
This post is more than three 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 why not try our AI Gurobot?. -
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
Post is closed for comments.
Comments
2 comments