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.

  • The procedure GMP::Row::Add sets the row type to '<=' and the right-hand-side value to INF. By using the procedures GMP::Row::SetType and GMP::Row::SetRightHandSide the row type and the right-hand-side value can be changed.

  • Use procedure GMP::Row::Generate to generate a (non-empty) row according to the definition of its associated symbolic constraint.