ILOG CPLEX .NET Reference Manual

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

Adds a new row to the LP matrix.

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

Parameters

lb
The lower bound for the newly created range constraint added as a new row to the invoking LP matrix.
ub
The upper bound for the newly created range constraint added as a new row to the invoking LP matrix.
ind
An array of column indices for the nonzeros of the new row. An index must appear at most one time, and must be in the range 0 through getNcols()-1.
val
An array of the corresponding values of the nonzeros of the row to be added.

Return Value

The row index of the new row.

Remarks

The row being added is represented in sparse matrix notation. That is, the nonzero coefficients of the new row are given as an array ind of column indices, and an array of corresponding values val. These arrays must match in length.

A new range constraint is implicitly constructed for the added row. Its lower and upper bound values are provided as parameters lb and ub. The expression of the implicitly added range constraint is the scalar product of the values specified by parameter val and the variables corresponding to the columns specified by parameter ind.

See Also

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