Accessing General Problem Data

Problem query routines and methods access information about a problem object after it has been created. They can be used at any time, even after problem modifications.

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 name of problem

IloModel.getName IloModel implements the interface IloAddable and thus inherits its method.

IloModel::getName

CPXgetprobname

Accesses name of objective function

IloObjective.getName IloObjective implements the interface IloAddable and thus inherits its method.

IloObjective::getName

CPXgetobjname

Accesses variable (column) names

IloNumVar.getName

IloNumVar::getName

CPXgetcolname

Accesses constraint (row) names

IloRange.getName IloRange implements the interface IloAddable and thus inherits its method.

IloRange::getName

CPXgetrowname

Accesses variable (column) index number with a specific name

IloLPMatrix.getIndex accesses an index for an instance of IloNumVar

----

CPXgetcolindex

Accesses constraint (row) index number with a specific name

IloLPMatrix.getIndex accesses an index for an instance of IloRange

----

CPXgetrowindex

Accesses number of variables in the problem

IloCplex.getNcols or IloLPMatrix.getNcols

IloCplex::getNcols

CPXgetnumcols

Accesses number of constraints in the problem

IloCplex.getNrows or IloLPMatrix.getNrows

IloCplex::getNrows

CPXgetnumrows

Accesses number of non-zeros in the problem

IloCplex.getNNZs or IloLPMatrix.getNNZs

IloCplex::getNNZs

CPXgetnumnz

Accesses objective sense

IloObjective.getSense

IloObjective::getSense

CPXgetobjsen

Accesses objective coefficient values

IloObjective.getExpr

IloObjective::getExpr

CPXgetobj

Accesses righthand side values

IloRange.getLB or IloRange.getUB

IloRange::getLB or IloRange::getUB

CPXgetrhs

Accesses sense of constraint

Compare IloRange.getLB and IloRange.getUB

Compare IloRange::getLB and IloRange::getUB

CPXgetsense

Accesses a range of lower bounds

IloNumVar.getLB,
IloIntVar.getLB,
IloSemiContVar.getLB,
IloSemiContVar.getSemiContLB

IloNumVar, IloIntVar, IloBoolVar, or IloSemiContVar method getLB
also IloSemiContVar::getSemiContLB

CPXgetlb

Accesses a range of upper bounds

IloNumVar.getUB or
IloIntVar.getUB or IloSemiContVar.getUB

IloNumVar, IloIntVar, IloBooVar or IloSemiContVar method getUB

CPXgetub

Accesses a range of columns

IloLPMatrix.getCols

----

CPXgetcols

Accesses a range of rows

IloLPMatrix.getRows or IloRange.getExpr

IloRange::getExpr

CPXgetrows

Accesses a coefficient value

IloRange.getExpr or IloLPMatrix.getNZ

IloRange::getExpr

CPXgetcoef

Accesses values for RHS ranged constraints

IloRange.getLB, IloRange.getUB

IloRange::getLB, getUB

CPXgetrngval

Accesses the kind of problem

IloCplex.isMIP

IloCplex.isQO

IloCplex.isQC

IloCplex::isMIP

IloCplex::isQO

IloCplex::isQC

CPXgetprobtype