Procedure GMP::Row::SetRightHandSideRaw(GMP, rowSet, value)


The procedure GMP::Row::SetRightHandSideRaw changes the right-hand-sides of a group of rows in a generated mathematical program.

     GMP,            ! (input) a generated mathematical program
     rowSet,         ! (input) a subset of Integers
     value           ! (input) a parameter



An element in AllGeneratedMathematicalPrograms.


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


A parameter defining a new right-hand-side for each row in rowSet.

Return Value

The procedure returns 1 on success, and 0 otherwise.


If the constraint has a unit then value should have the same unit. If value has no unit then you should multiply it by the row scale, as returned by the function GMP::Row::GetScale. See GMP::Row::SetRightHandSide for an example with units.


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

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

To change the right-hand-side values of the constraint c(i) we can use:

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

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

RHS(rr) := 5.0;

GMP::Row::SetRightHandSideRaw( myGMP, RowSet, RHS );