ilog.concert
Class IloColumn
java.lang.Object
|
+--ilog.concert.IloColumn
- public abstract class IloColumn
- extends java.lang.Object
Objects of class IloColumn
are used for creating a variable
using column-wise modeling. Column-wise modeling means that at the
time of construction, the variable is inserted into existing
modeling objects. The term column-wise comes from linear
programing, where the constraints are typically represented as a matrix.
Adding a new variable to the optimization problem is equivalent to
adding a column to the constraint matrix.
The procedure for column-wise modeling is as follows.
Start from a set of modeling objects of these classes:
IloObjective
,
IloRange
, and
IloLPMatrix
Call method IloMPModeler.column()
with the object as parameter,
along with the other parameters needed to install a new variable in the
existing modeling objects. See the documentation of the
IloMPModeler.column method for the details of
these parameters.
The methods in this class return objects of type IloColumnArray
,
and each of these methods contains the parameters required to install a new
array of variables to the modeling object the IloColumnArray
.
All the IloColumn
objects can then be linked to one
IloColumn
object. This object includes all the individual
objects with the method IloColumn.add()
. If the new
variables are to be installed in only one modeling object, there is no need
to use the method add()
.
The IloColumn
object constructed this way is now ready to be
used to create a new variable and install it in the existing modeling
objects as described by the IloColumn
object. This is done by
passing the IloColumn
object as a parameter to the constructor
methods for variables, for example IloMPModeler.numVar()
or
IloMPModeler.intVar()
. The newly created variable will
immediately be part of the existing modeling objects that have been used for
constructing the IloColumn
object.
The following example function shows how to create a variable with bounds
0
and 1
and install it in an objective and a range
constraint, with linear coefficients all set to 1
:
IloNumVar newColumn(IloMPModeler modeler, IloObjective obj, IloRange rng) {
IloColumn objcol = modeler.column(obj, 1.0);
IloColumn rngcol = modeler.column(rng, 1.0);
return modeler.numVar(objcol.and(rngcol), 0.0, 1.0);
}
- See Also:
IloMPModeler.column(IloObjective, double)
,
IloMPModeler.column(IloLPMatrix)
,
IloMPModeler.column(IloRange, double)
,
IloMPModeler.numVar(IloColumn, double, double)
,
IloMPModeler.intVar(IloColumn, int, int)
,
IloMPModeler.semiContVar(IloColumn, double, double, IloNumVarType)
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
IloColumn
public IloColumn()
and
public IloColumn and(IloColumn column)
- Links two
IloColumn
objects. When using the returned
IloColumn
object for constructing a new variable, the new
variable will be installed in the modeling objects handled by the invoking
IloColumn
object as well as the modeling objects handled by
IloColumn
passed as the parameter column
.
- Parameters:
column
- The IloColumn
object to be linked with the invoking
IloColumn
.- Returns:
- An
IloColumn
object describing the addition of a
newly created variable to the modeling objects handled by the
invoking IloColumn
, and the modeling objects handled
by the argument column.