Question & Answer
Question
How do I access the MIP relative optimality gap programmatically?
Answer
Starting version ILOG CPLEX 11.2 you can query the MIP relative optimality gap using one of the following methods based on the CPLEX API used:
* C Callable Library, CPXgetmiprelgap
* C++ API, IloCplex::getMIPRelativeGap
* Java API, IloCplex.getMIPRelativeGap
* .NET API, Cplex.MIPRelativeGap, this is Cplex class property
You can also query the value using callbacks:
* C Callable Library, use .CPXgetcallbackinfo with the symbolic value CPX_CALLBACK_INFO_MIP_REL_GAP as its argument for "whichinfo".
* C++ API, MIPInfoCallbackI::getMIPRelativeGap
* Java API, MIPInfoCallback.getMIPRelativeGap
* .Net API, MIPInfoCallback.MIPRelativeGap, this is MipInfoCallback class property
Historical Number
cplex/FAQ/129
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21400046