Modelname.Optcr=X;

Option Optcr=X;

Top  Previous  Next

This specifies the relative optimality criterion for a MIP problem.  In general GAMS tells the solvers to stop trying to improve upon the integer solution when

 

(|BP - BF|)/(|BP|) < Optcr ,

 

where BF is the objective function value of the current best integer solution while BP is the best possible integer solution. However some solvers, in particular CPLEX use slightly different definitions.  The Optcr option is used in CPLEX to stop when (|BP - BF|)/(1.0e-10 + |BF|) < Optcr.

In turn the solver stops after finding a solution proven to be "close enough" (within the Optcr tolerance) to optimal.  This reduces solution time as the solver stops not looking for better solutions.  However, setting this option at a positive value (0.1 is the default) can cause the true integer optimum to be missed if it's value is within Optcr of the best solution on hand when the problem stops.  The final solution could be the best but is guaranteed only to be within the tolerance of the "true optimal".

The Optcr parameter is specified in proportional terms relative to the objective value thus a value of 0.10 means the objective value will be within the 10% of the true objective value.

Use of this parameter is done using a command like (basint.gms)

 

iptest.optcr=0.012;

or

Option optcr=0.012;

 

where the model being solved is named iptest and optcr is set to 0.012 or 1.2%.  The default value for Optcr is large being 0.10 or 10%.