Procedure GMP::Column::SetUpperBoundMulti(GMP, binding, column, value)


The procedure GMP::Column::SetUpperBoundMulti changes the upper bound of a group of columns, belonging to a variable, in the generated mathematical program.

     GMP,            ! (input) a generated mathematical program
     binding,        ! (input) an index binding
     column,         ! (input) a variable expression
     value           ! (input) a numerical expression



An element in AllGeneratedMathematicalPrograms.


An index binding that specifies and possibly limits the scope of indices.


A variable that, combined with the binding domain, specifies the columns.


The new upper bound for each column, defined over the binding domain binding.

Return Value

The procedure returns 1 on success, and 0 otherwise.


If the variable has a unit then value should have the same unit. If value has no unit then you should multiply it by the column scale, as returned by the function GMP::Column::GetScale. See GMP::Column::SetUpperBound for an example with units.


To set the upper bounds of variable x(i) to ub(i) we can use:

for (i) do
    GMP::Column::SetUpperBound( myGMP, x(i), ub(i) );

It is more efficient to use:

GMP::Column::SetUpperBoundMulti( myGMP, i, x(i), ub(i) );

If we only want to set the upper bounds of those x(i) for which dom(i) is unequal to zero, then we use:

GMP::Column::SetUpperBoundMulti( myGMP, i | dom(i), x(i), ub(i) );