Procedure GMP::Column::SetUpperBoundRaw(GMP, colSet, value)

GMP::Column::SetUpperBoundRaw

The procedure GMP::Column::SetUpperBoundRaw changes the upper bounds of a group of columns in a generated mathematical program.

GMP::Column::SetUpperBoundRaw(
     GMP,            ! (input) a generated mathematical program
     colSet,         ! (input) a subset of Integers
     value           ! (input) a parameter
     )

Arguments

GMP

An element in AllGeneratedMathematicalPrograms.

colSet

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

value

A parameter defining a new upper bound for each column in colSet.

Return Value

The procedure returns 1 on success, and 0 otherwise.

Note

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.

Example

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

ElementParameter myGMP {
    Range: AllGeneratedMathematicalPrograms;
}
Set VariableSet {
    SubsetOf: AllVariables;
}
Set ColumnSet {
    SubsetOf: Integers;
    Index: cc;
}
Parameter UB {
    IndexDomain: cc;
}

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

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

VariableSet := { 'x' };
ColumnSet := GMP::Instance::GetColumnNumbers( myGMP, VariableSet );

UB(cc) := 1.0;

GMP::Column::SetUpperBoundRaw( myGMP, ColumnSet, UB );