Procedure GMP::Row::SetTypeRaw(GMP, rowSet, type)


The procedure GMP::Row::SetTypeRaw changes the types of a group of rows in a generated mathematical program.

     GMP,            ! (input) a generated mathematical program
     rowSet,         ! (input) a subset of Integers
     type            ! (input) an element parameter in AllRowTypes



An element in AllGeneratedMathematicalPrograms.


A subset of the set Integers, representing a set of row numbers.


An element parameter in AllRowTypes, defined over the binding domain.

Return Value

The procedure returns 1 on success, or 0 otherwise.


Assume that ‘MP’ is a mathematical program. To use GMP::Row::SetTypeRaw we declare the following identifiers (in ams format):

ElementParameter myGMP {
    Range: AllGeneratedMathematicalPrograms;
Set ConstraintSet {
    SubsetOf: AllConstraints;
Set RowSet {
    SubsetOf: Integers;
    Index: rr;
ElementParameter RowType {
    IndexDomain: rr;
    Range: AllRowTypes;

To change the constraint c(i) in a less-than-or-equal-to constraint we can use:

myGMP := GMP::Instance::Generate( MP );

ConstraintSet := { 'c' };
RowSet := GMP::Instance::GetRowNumbers( myGMP, ConstraintSet );

RowType(rr) := '<=';

GMP::Row::SetTypeRaw( myGMP, RowSet, RowType );