- Procedure MatrixAddRow(MP, row)
MatrixAddRow
The procedure MatrixAddRow
adds a row to the matrix.
MatrixAddRow(
MP, ! (input) a mathematical program
row ! (input) a scalar value
)
Arguments
- MP
A mathematical program that was previously solved. The mathematical program should be a linear or mixed-integer linear programming model.
- row
A scalar reference to an existing row name in the model.
Return Value
The procedure returns 1 on success, or 0 otherwise.
Note
Initially, the row will added with zero coefficients, regardless of whether the symbolic AIMMS constraint has a definition or not. Regeneration of all of the coefficients of the row according to its definition can be achieved through the procedure
MatrixRegenerateRow
. Individual coefficients of the row can be added by calling the procedureMatrixModifyCoefficient
.After calling
MatrixAddRow
the type of the row is set to'<='
and the right-hand-side value toINF
(the left-hand-side value is set to-INF
). By using the proceduresMatrixModifyRowType
andMatrixModifyRightHandSide
the row type and right-hand-side value can be changed.After a call to
MatrixAddRow
orMatrixRegenerateRow
for a certain row it is not allowed to do another call toMatrixAddRow
for that row.As of AIMMS release 3.5, the matrix manipulation procedures have become deprecated. New projects should use the GMP library instead. Please refer to Table 5 for a mapping of the matrix manipulation procedures to corresponding GMP procedures.
See also
The procedures MatrixModifyCoefficient
, MatrixModifyLeftHandSide
, MatrixModifyRightHandSide
, MatrixModifyRowType
, MatrixRegenerateRow
.
Matrix manipulation routines are discussed in more detail in Implementing Advanced Algorithms for Mathematical Programs
of the Language Reference.