|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object ilog.concert.IloColumn
Objects of class IloColumn
are used to create a variable
using column-wise modeling.
In column-wise modeling, newly constructed variables are inserted into existing modeling objects. The term column-wise comes from linear programming, where the constraints are typically represented as a matrix. Adding new variables to the optimization problem corresponds to adding columns to the constraint matrix.
The procedure for column-wise modeling is as follows. Start from an existing set of modeling objects of these classes:
IloObjective
,IloRange
, andIloLPMatrix
For each modeling object affected by the addition of the new variable,
call the method IloMPModeler.column
with the object as an argument,
along with the other arguments needed to install a new variable in the
existing modeling objects. See the documentation of the
IloMPModeler.column
methods for the details of
these arguments. Each of these methods returns an object of type
IloColumn
that contains information about how to add a new
variable to the modeling object for which the
IloMPModeler.column
method has been called.
The column objects can then be linked to an aggregate
column object by the method
IloColumn.and
.
This aggregate object contains information about how to add a new variable
to all of the modeling objects represented by its parts. If the new
variable is to be installed in only one modeling object, there is no need
to use the method
and
.
The column object constructed this way is now ready to be
used to create a new variable. This is done by passing the
column object as an argument 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
to construct the column object.
The following example function shows how to create a variable with bounds 0 (zero) and 1 (one) and how to install it in an objective and a range constraint, with linear coefficients 2 and 3:
IloNumVar newColumn(IloMPModeler modeler, IloObjective obj, IloRange rng) { IloColumn objcol = modeler.column(obj, 2.0); IloColumn rngcol = modeler.column(rng, 3.0); return modeler.numVar(objcol.and(rngcol), 0.0, 1.0); }
IloMPModeler.column(IloObjective, double)
,
IloMPModeler.column(IloLPMatrix)
,
IloMPModeler.column(IloRange, double)
,
IloMPModeler.numVar(IloColumn, double, double)
,
IloMPModeler.intVar(IloColumn, int, int)
,
IloMPModeler.boolVar(IloColumn)
,
IloMPModeler.semiContVar(IloColumn, double, double, IloNumVarType)
Constructor Summary | |
IloColumn()
|
Method Summary | |
IloColumn |
and(IloColumn column)
Links two column objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public IloColumn()
Method Detail |
public IloColumn and(IloColumn column)
When you use the returned
column object for constructing a new variable, the new
variable will be installed in the modeling objects handled by the invoking
column object as well as the modeling objects handled by the
column passed as the argument column
.
column
- The column object to be linked with the invoking
column.
column
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |