Accesses the relative objective gap for a MIP optimization.

Namespace: ILOG.CPLEX
Assembly: ILOG.CPLEX (in ILOG.CPLEX.dll) Version: 22.1.1.0

Syntax

C#
public virtual double GetMIPRelativeGap()
Visual Basic
Public Overridable Function GetMIPRelativeGap As Double

Return Value

The relative objective gap.

Remarks

For a minimization problem, this value is computed by

             (bestinteger - bestobjective) / (1e-10 + |bestinteger|)
             
where bestinteger is the value returned by Cplex.GetObjValue and bestobjective is the value returned by Cplex.GetBestObjValue. For a maximization problem, the value is computed by:
             (bestobjective - bestinteger) / (1e-10 + |bestinteger|)
             

ILOG.Concert.Exception If the method fails, an exception of type ILOG.Concert.Exception, or one of its derived classes, is thrown.

See Also