12.07.2015 Views

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

ILOG CPLEX 11.0 User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

where A is a sparse matrix. A sparse matrix is one in which a significant portion of thecoefficients are zero, so algorithms and data structures can be designed to take advantage ofit by storing and working with the substantially smaller subset of nonzero coefficients.Objects of type IloLPMatrix are provided for use with IloCplex to express constraintmatrices rather than individual constraints. An IloLPMatrix object allows you to view aset of ranged constraints and the variables used by them as a matrix, that is, as: L ≤ Ax ≤ UEvery row of an IloLPMatrix object corresponds to an IloRange constraint, and everycolumn of an IloLPMatrix object corresponds to a modeling variable (an instance ofIloNumVar).An IloLPMatrix object is created with the method LPMatrix defined in IloMPModelerlike this:IloLPMatrix lp = cplex.LPMatrix();(or cplex.addLPMatrix to add it immediately to the active model). The rows and columnsare then added to it by specifying the non-zero matrix coefficients. Alternatively, you canadd complete IloRange and IloNumVar objects to it to create new rows and columns.When adding ranged constraints, columns will be implicitly added for all the variables in theconstraint expression that do not already correspond to a column of the IloLPMatrix. TheIloLPMatrix object will make sure of consistency between the mapping of rows toconstraints and columns to variables. For example, if a ranged constraint that uses variablesnot yet part of the IloLPMatrix is added to the IloLPMatrix, new columns willautomatically be added and associated to those variables.See the online <strong>ILOG</strong> <strong>CPLEX</strong> Java Reference <strong>Manual</strong> for more information aboutIloLPMatrix methods.Modeling by ColumnThe concept of modeling by column modeling comes from the matrix view of mathematicalprogramming problems. Starting from a (degenerate) constraint matrix with all its rows butno columns, you populate it by adding columns to it. The columns of the constraint matrixcorrespond to variables.Modeling by column in <strong>ILOG</strong> <strong>CPLEX</strong> is not limited to IloLPMatrix, but can beapproached through IloObjective and IloRange objects as well. In short, for<strong>ILOG</strong> <strong>CPLEX</strong>, modeling by column can be more generally understood as using columns tohold a place for new variables to install in modeling objects, such as an objective or row. Thevariables are created as explained in the procedure.Procedure for Modeling by ColumnStart by creating a description of how to install a new variable into existing modelingobjects. Such a description is represented by IloColumn objects. Individual IloColumn<strong>ILOG</strong> <strong>CPLEX</strong> <strong>11.0</strong> — USER’ S MANUAL 91

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!