Accessing Results for Continuous Models

Solution query methods and routines are used to access information about the results of applying an optimization method to a problem object. For LP and QP problem objects, you can access the values of variables, constraint slacks, reduced costs, and dual variables. Additionally, for an LP or QP problem object solved with a simplex method, you can query the simplex basis. For QCP problem objects, you can access the values of variables and constraint slacks. Methods and routines are also available to retrieve other information about the optimization process, for example the iteration count.

Note: Names of classes, methods, and symbolic constants in the .NET API correspond very closely to those in the Java API with these systematic exceptions:

Purpose

Java API

C++ API

C API

Accesses optimal solution values

Use IloCplex methods getValues, etc.

Use IloCplex methods getValues, etc.

CPXsolution

Accesses algorithmic status information

IloCplex.getCplexStatus

IloCplex::getCplexStatus

CPXgetstat

Accesses solution status

IloCplex.getStatus

IloCplex::getStatus

----

Accesses whether solution can be queried or is basic or nonbasic try/catch IloException try/catch IloCplex::Exception CPXsolninfo
Accesses indicator for primal feasibility of solution IloCplex.isPrimalFeasible IloCplex::isPrimalFeasible CPXsolninfo
Accesses indicator for dual feasibility of solution IloCplex.isDualFeasible IloCplex::isDualFeasible CPXsolninfo

Accesses string corresponding to algorithmic status

IloCplex.getCplexStatus.toString

IloCplex::getCplexStatus output operators

CPXgetstatstring

Accesses string version of solution status.

IloCplex.getStatus.toString

IloCplex::getStatus output operator

----

Accesses solution objective value

IloCplex.getObjValue

IloCplex::getObjValue

CPXgetobjval

Accesses optimal variable values

IloCplex.getValues

IloCplex::getValues

CPXgetx

Accesses constraint dual values

IloCplex.getDuals

IloCplex::getDuals

CPXgetpi

Accesses constraint slacks

IloCplex.getSlacks

IloCplex::getSlacks

CPXgetslack

Accesses variable reduced-costs

IloCplex.getReducedCosts

IloCplex::getReducedCosts

CPXgetdj

Accesses a basis

IloCplex.getBasisStatuses

IloCplex::getBasisStatuses

CPXgetbase

Accesses total number of simplex iterations

IloCplex.getNiterations

IloCplex::getNiterations

CPXgetitcnt

Accesses total number of barrier iterations

IloCplex.getNbarrierIterations

IloCplex::getNbarrierIterations

CPXgetbaritcnt

Accesses number of Phase I simplex iterations

IloCplex.getNphaseOneIterations

IloCplex::getNphaseOneIterations

CPXgetphase1cnt

Accesses number of primal crossover push iterations

IloCplex.getNcrossPPush

IloCplex::getNcrossPPush

CPXgetcrossppushcnt

Accesses number of primal crossover exchange iterations

IloCplex.getNcrossPExch

IloCplex::getNcrossPExch

CPXgetcrosspexchcnt

Accesses number of dual crossover push iterations

IloCplex.getNcrossDPush

IloCplex::getNcrossDPush

CPXgetcrossdpushcnt

Accesses number of dual crossover exchange iterations

IloCplex.getNcrossDExch

IloCplex::getNcrossDExch

CPXgetcrossdexchcnt

Accesses the number of sifting iterations IloCplex.getNsiftingIterations IloCplex::getNsiftingIterations

CPXgetsiftitcnt
Accesses the number of Phase I sifting iterations IloCplex.getNsiftingPhaseOneIterations IloCplex::getNsiftingPhaseOneIterations CPXgetsiftphase1cnt

Accesses number of primal superbasic variables in solution

IloCplex.getNprimalSuperbasics

IloCplex::getNprimalSuperbasics

CPXgetpsbcnt

Accesses number of dual superbasic variables in solution

IloCplex.getNdualSuperbasics

IloCplex::getNdualSuperbasics

CPXgetdsbcnt

Accesses row activity levels for a range of constraints

IloCplex.getAX

IloCplex::getAX

CPXgetax

Accesses the solution algorithm used

IloCplex.getAlgorithm

IloCplex::getAlgorithm

CPXgetmethod or CPXsolninfo

Accesses vector demonstrating indefiniteness of QP Q matrix IloCplex.qpIndefCertificate IloCplex::qpIndefCertificate CPXqpindefcertificate