- Procedure GMP::Column::FreezeRaw(GMP, colSet, value)
GMP::Column::FreezeRaw
The procedure GMP::Column::FreezeRaw
freezes a group of columns
in a generated mathematical program.
GMP::Column::FreezeRaw(
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 over colSet, defining the value for each column to which it should be frozen.
Return Value
The procedure returns 1 on success, and 0 otherwise.
Note
The columns remain visible in the constraint listing and math program inspector. In addition, it will be retained in solver maintained copies of the generated math program.
Use
GMP::Column::UnfreezeRaw
to undo the freezing.During a call to procedure
GMP::Column::FreezeRaw
AIMMS stores the upper and lower bound of the columns before the procedure was called. This information is used when procedureGMP::Column::UnfreezeRaw
is called thereafter. This information is not copied by the functionGMP::Instance::Copy
.
Example
Assume that ‘MP’ is a mathematical program. To use
GMP::Column::FreezeRaw
we declare the following identifiers (in ams format):ElementParameter myGMP { Range: AllGeneratedMathematicalPrograms; } Set VariableSet { SubsetOf: AllVariables; } Set ColumnSet { SubsetOf: Integers; Index: cc; } Parameter FixVal { IndexDomain: cc; }To freeze the variable
x(i)
we can use:myGMP := GMP::Instance::Generate( MP ); VariableSet := { 'x' }; ColumnSet := GMP::Instance::GetColumnNumbers( myGMP, VariableSet ); FixVal(cc) := 20.0; GMP::Column::FreezeRaw( myGMP, ColumnSet, FixVal );
See also
The routines GMP::Instance::Generate
, GMP::Instance::GetColumnNumbers
, GMP::Column::Freeze
, GMP::Column::UnfreezeRaw
and GMP::Instance::Copy
.