Problem modification routines change a problem object after it has been created. Modifications that can be made include:
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 |
---|---|---|---|
Deletes row and column names |
---- |
---- |
|
Adds constraints without matrix coefficients |
IloModel.add(IloRange) or IloMPModeler.addRange, or IloCplex.addLe, or IloCplex.addGe, or IloCplex.addEq or IloLPMatrix.addRows |
IloModel::add(IloRange) |
|
Adds constraints |
IloModel.add(IloRange) or IloMPModeler.addRange, or IloCplex.addLe, or IloCplex.addGe, or IloCplex.addEq, or IloLPMatrix.addRows |
IloModel::add(IloRange) |
|
Deletes range of constraints |
IloModel.remove or IloCplex.delete or IloLPMatrix.removeRows |
||
Deletes set of constraints |
IloModel.remove or IloCplex.delete or IloLPMatrix.removeRows |
||
Adds variables without matrix coefficients |
Create IloNumVar, IloIntVar, IloSemiContVar objects or use IloLPMatrix.addCols |
Create IloNumVar, IloIntVar, IloSemiContVar objects |
|
Adds variables |
Create IloNumVar, IloIntVar, IloSemiContVar objects or use IloLPMatrix.addCols |
Create IloNumVar, IloIntVar, IloSemiContVar objects |
|
Deletes range of variables |
IloCplex.delete |
||
Deletes set of variables |
IloCplex.delete |
||
Changes objective sense |
IloObjective.setSense |
IloObjective::setSense |
|
Changes a matrix, rhs, or objective coefficient |
IloMPModeler.setLinearCoef (for matrix) IloMPModeler.addToExpr (for matrix) IloLPMatrix.setNZ (for matrix) IloRange.setLB, setUB, setBounds (for rhs) IloMPModeler.setLinearCoef (for objective) |
IloRange::setLinearCoef (for matrix) IloRange::setLB, setUB, setBounds (for rhs) IloObjective::setLinearCoef (for objective) |
|
Changes a list of matrix coefficients |
IloMPModeler.setLinearCoefs or IloLPMatrix.setNZs |
IloRange::setLinearCoef |
|
Changes a coefficient in the Q matrix |
IloObjective::setExpr |
||
Changes bounds |
For IloNumVar, IloIntVar, and IloSemiContVar objects, use the methods setLB, setUB and IloSemiContVar.setSemiContLB |
For IloNumVar, IloIntVar, IloBoolVar, and IloSemiContVar objects, use the methods setLB, setUB, setBounds, and IloSemiContVar::setSemiContLB |
|
Changes constraint sense |
|||
Changes coefficient in objective function |
IloMPModeler.setLinearCoef or IloObjective.setExpr |
IloObjective::setLinearCoef, setExpr |
|
Changes coefficient in righthand side |
|||
Changes range coefficients of a set of constraints |
|||
Changes name of a variable or constraint |
IloRange.setName. (IloRange implements the interface IloAddable and thus inherits this method.) For IloNumVar, IloIntVar, IloSemiContVar, use the method setName |
IloRange::setName For IloNumVar, IloIntVar, IloBoolVar, IloSemiContVar, use the method setName |
|
Changes names of constraints |
IloRange.setName |
IloRange::setName |
|
Changes names of variables |
For IloNumVar, IloIntVar, IloSemiContVar, use the method setName |
For IloNumVar, IloIntVar, IloBoolVar, IloSemiContVar, use the method setName |
|
Changes variable type |
Use IloConversion objects |
Use IloConversion objects |
|
Changes problem name |
IloModel.setName |
IloModel::setName |
|
Changes problem type |
Use IloConversion objects or IloCplex.solveFixed |
IloConversion objects or IloCplex::solveFixed |
|
Adds an indicator constraint to a Callable Library application |
Use logical constraints in a Java application. |
Use logical constraints in a C++ application. |
|
Adds Special Ordered Set |
Create and add IloSOS1 or IloSOS2 objects or use IloMPModeler.addSOS1, addSOS2 |
||
Removes Special Ordered Set |
IloModel.remove (IloSOS classes implement the interface IloAddable, both individual objects and arrays of objects). |
||
Removes MIP priority order |
IloCplex.delPriorities and IloCplex.delDirections |
IloCplex::delPriorities and IloCplex::delDirections |
CPXcopyorder with item count set to 0 or set CPX_PARAM_MIPORDIND to 0 and order will be ignored |
Removes cuts |
IloCplex.clearCuts |
IloCplex::clearCuts |