ILOG CPLEX .NET Reference Manual

ILPMatrix.AddRows Method (Double[], Double[], Int32[][], Double[][])

Adds a set of new rows to LP matrix.

int AddRows(
   double[] lb,
   double[] ub,
   int[][] ind,
   double[][] val
);

Parameters

lb
An array of double values containing the lower bounds for the range constraints to be created and added as rows to the invoking LP matrix.
ub
An array of double values containing the upper bounds for the range constraints to be created and added as rows to the invoking LP matrix.
ind
An array or arrays of column indices for the nonzeros of the new rows. An index must appear at most one time for each new row and must be in the range 0 through getNcols()-1.
val
An array or arrays of the corresponding values of the nonzeros of the rows to be added.

Return Value

The row index of the first new row.

Remarks

The rows being added are represented in sparse matrix notation. That is, the nonzero coefficients of the new rows are given as arrays of column indices and corresponding arrays of values. Each pair of corresponding arrays must match in length.

For each of the added rows, a new range constraint is implicitly constructed. The lower and upper bound value of the i-th newly created range constraint are provided in the arguments lb[i] and ub[i]. Its expression is the scalar product of the values specified in the array val[i] and the variables corresponding to the columns specified in the array ind[i].

See Also

ILPMatrix Interface | ILOG.Concert Namespace | ILPMatrix.AddRows Overload List