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:
Ilo
, whereas in .NET they do not.
addCols
,
whereas in the .NET API, the names of methods conventionally
begin with an uppercase (that is, capital) letter, for example,
AddCols
according to Microsoft practice.
Purpose |
Java API |
C++ API |
C API |
---|---|---|---|
Accesses optimal solution values |
Use IloCplex methods getValues, etc. |
Use IloCplex methods getValues, etc. |
|
Accesses algorithmic status information |
IloCplex.getCplexStatus |
IloCplex::getCplexStatus |
|
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 |
|
Accesses string version of solution status. |
IloCplex.getStatus.toString |
IloCplex::getStatus output operator |
---- |
Accesses solution objective value |
IloCplex.getObjValue |
IloCplex::getObjValue |
|
Accesses optimal variable values |
IloCplex.getValues |
IloCplex::getValues |
|
Accesses constraint dual values |
IloCplex.getDuals |
IloCplex::getDuals |
|
Accesses constraint slacks |
IloCplex.getSlacks |
IloCplex::getSlacks |
|
Accesses variable reduced-costs |
IloCplex.getReducedCosts |
IloCplex::getReducedCosts |
|
Accesses a basis |
IloCplex.getBasisStatuses |
IloCplex::getBasisStatuses |
|
Accesses total number of simplex iterations |
IloCplex.getNiterations |
IloCplex::getNiterations |
|
Accesses total number of barrier iterations |
IloCplex.getNbarrierIterations |
IloCplex::getNbarrierIterations |
|
Accesses number of Phase I simplex iterations |
IloCplex.getNphaseOneIterations |
IloCplex::getNphaseOneIterations |
|
Accesses number of primal crossover push iterations |
IloCplex.getNcrossPPush |
IloCplex::getNcrossPPush |
|
Accesses number of primal crossover exchange iterations |
IloCplex.getNcrossPExch |
IloCplex::getNcrossPExch |
|
Accesses number of dual crossover push iterations |
IloCplex.getNcrossDPush |
IloCplex::getNcrossDPush |
|
Accesses number of dual crossover exchange iterations |
IloCplex.getNcrossDExch |
IloCplex::getNcrossDExch |
|
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 |
|
Accesses number of dual superbasic variables in solution |
IloCplex.getNdualSuperbasics |
IloCplex::getNdualSuperbasics |
|
Accesses row activity levels for a range of constraints |
IloCplex.getAX |
IloCplex::getAX |
|
Accesses the solution algorithm used |
IloCplex.getAlgorithm |
IloCplex::getAlgorithm |
|
Accesses vector demonstrating indefiniteness of QP Q matrix | IloCplex.qpIndefCertificate | IloCplex::qpIndefCertificate | CPXqpindefcertificate |