- Procedure GMP::Row::Add(GMP, row)
GMP::Row::Add
The procedure GMP::Row::Add
adds an empty row to the matrix of a
generated mathematical program.
GMP::Row::Add(
GMP, ! (input) a generated mathematical program
row ! (input) a scalar reference
)
Arguments
- GMP
An element in
AllGeneratedMathematicalPrograms
.- row
A scalar reference to a row.
Return Value
The procedure returns 1 on success, or 0 otherwise.
Note
Use
GMP::Row::AddMulti
if many rows corresponding to some constraint have to be added, because that will be more efficient.Coefficients for this row can be added to the matrix by using the procedure
GMP::Coefficient::Set
.After calling
GMP::Row::Add
the type and the left-hand-side and right-hand-side values are set according to the definition of the corresponding symbolic constraint. By using the proceduresGMP::Row::SetType
,GMP::Row::SetLeftHandSide
andGMP::Row::SetRightHandSide
the row type and row bounds can be changed.Use procedure
GMP::Row::Generate
to generate a (non-empty) row according to the definition of its associated symbolic constraint.