- Procedure GMP::Column::SetLowerBoundRaw(GMP, colSet, value)
GMP::Column::SetLowerBoundRaw
The procedure GMP::Column::SetLowerBoundRaw
changes the lower
bounds of a group of columns in a generated mathematical program.
GMP::Column::SetLowerBoundRaw(
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 lower 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::SetLowerBound
for an example with units.
Example
Assume that MP
is a mathematical program. To use
GMP::Column::SetLowerBoundRaw
we declare the following identifiers
(in ams format):
ElementParameter myGMP {
Range: AllGeneratedMathematicalPrograms;
}
Set VariableSet {
SubsetOf: AllVariables;
}
Set ColumnSet {
SubsetOf: Integers;
Index: cc;
}
Parameter LB {
IndexDomain: cc;
}
To set the lower bounds of the variable x(i)
we can use:
myGMP := GMP::Instance::Generate( MP );
VariableSet := { 'x' };
ColumnSet := GMP::Instance::GetColumnNumbers( myGMP, VariableSet );
LB(cc) := 0.0;
GMP::Column::SetLowerBoundRaw( myGMP, ColumnSet, LB );