Accessing general problem data

These problem query routines and methods access information about a problem object after it has been created.

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 C#.NET API correspond very closely to those in the Java API with these systematic exceptions:

  • In the Java API, the names of classes begin with the prefix Ilo, whereas in C#.NET they do not.

  • In the Java API, the names of methods conventionally begin with a lowercase letter, for example, addCols, whereas in the C#.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 name of problem IloModel. getName. IloModel implements the interface IloAddable and thus inherits its method. IloModel:: getName CPXXgetprobname and CPXgetprobname
Accesses name of objective function IloObjective. getName. IloObjective implements the interface IloAddable and thus inherits its method. IloObjective:: getName CPXXgetobjname and CPXgetobjname
Accesses variable (column) names IloNumVar. getName IloNumVar:: getName CPXXgetcolname and CPXgetcolname
Accesses constraint (row) names IloRange. getName. IloRange implements the interface IloAddable and thus inherits its method. IloRange:: getName CPXXgetrowname and CPXgetrowname
Accesses variable (column) index number with a specific name IloLPMatrix. getIndex accesses an index for an instance of IloNumVar ---- CPXXgetcolindex and CPXgetcolindex
Accesses constraint (row) index number with a specified name IloLPMatrix. getIndex accesses an index for an instance of IloRange ---- CPXXgetrowindex and CPXgetrowindex
Accesses number of variables in the problem IloCplex. getNcols or IloLPMatrix. getNcols IloCplex:: getNcols CPXXgetnumcols and CPXgetnumcols
Accesses number of constraints in the problem IloCplex. getNrows or IloLPMatrix. getNrows IloCplex:: getNrows CPXXgetnumrows and CPXgetnumrows
Accesses number of nonzeros in the problem IloCplex. getNNZs or IloLPMatrix. getNNZs IloCplex:: getNNZs CPXXgetnumnz and CPXgetnumnz
Accesses objective sense IloObjective. getSense IloObjective:: getSense CPXXgetobjsen and CPXgetobjsen
Accesses objective coefficient values IloObjective. getExpr IloObjective:: getExpr CPXXgetobj and CPXgetobj
Accesses righthand side values IloRange. getLB or IloRange. getUB IloRange:: getLB or IloRange:: getUB CPXXgetrhs and CPXgetrhs
Accesses sense of constraint Compare IloRange. getLB and IloRange. getUB Compare IloRange:: getLB and IloRange:: getUB CPXXgetsense and 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 CPXXgetlb and CPXgetlb
Accesses a range of upper bounds IloNumVar. getUB or IloIntVar. getUB or IloSemiContVar. getUB IloNumVar, IloIntVar, IloBoolVar, or IloSemiContVar method getUB CPXXgetub and CPXgetub
Accesses a range of columns IloLPMatrix.getCols(int, int, int[][], double[][]) ---- CPXXgetcols and CPXgetcols
Accesses a range of rows IloLPMatrix.getRows(int, int, double[], double[], int[][], double[][]) or IloRange. getExpr IloRange:: getExpr CPXXgetrows and CPXgetrows
Accesses a coefficient value IloRange. getExpr or IloLPMatrix.getNZ(int, int) IloRange:: getExpr CPXXgetcoef and CPXgetcoef
Accesses values for RHS ranged constraints IloRange. getLB, IloRange. getUB IloRange:: getLB, getUB CPXXgetrngval and CPXgetrngval
Accesses the kind of problem

IloCplex. isMIP

IloCplex. isQO

IloCplex. isQC

IloCplex:: isMIP

IloCplex:: isQO

IloCplex:: isQC

CPXXgetprobtype and CPXgetprobtype