what's the difference between optimal solution of cplex and the optimaltol solution of cplex? 1、When I solve a integer programming model with CPLEX solver, the result status of some instances show as “optimal”,however,the result status of some instances show as “optimalTol”. I want to konw the difference between optimal solution of cplex and the optimaltol solution of cplex? 2、My integer programming model is minimize the objective. when I solve the integer programming model with CPLEX solver,the result status is “optimalTol” and the objective value of the model is 1000 for example. When I add cplex.setParam(IloCplex::EpGap,0.0) for the solver. Then solve the model with CPLEX solver again. I want to know whether the value of the objective function will become larger or smaller?
-
Thank you very much for answering my questions. – transportation111 Apr 26 '21 at 01:23
1 Answers
This is relevant for any MIP solver.
A solver can stop for different reasons:
- time limit or some other limit (iteration, node limit, etc.)
- the gap tolerance has been met
- the solution is proven optimal
The default gap tolerance is not zero, but rather something like 1e-4 (for the relative gap) and 1e-6 (for the absolute gap). That means that Cplex can stop while not being 100% sure that there are no better solutions. However, the gap tolerance will bound how much better the solution can be. E.g. if the relative gap tolerance is 1% and the absolute gap tolerance is 0 then the best possible solution cannot be farther away than 1%. If you set both to zero Cplex will need more time but always will deliver OPTIMAL (unless you hit a limit). If you allow a small gap, Cplex will most likely return OPTIMAL_TOL (we stopped because we met the gap tolerance) but in some case can be sure there is no better solution, in which case it will return OPTIMAL. For large, practical models we often are happy with a solution that is better than say 5% from the best possible.

- 15,677
- 2
- 14
- 39