- Procedure GMP::Column::SetTypeRaw(GMP, colSet, type)
GMP::Column::SetTypeRaw
The procedure GMP::Column::SetTypeRaw changes the types of a
group of columns in a generated mathematical program.
GMP::Column::SetTypeRaw(
GMP, ! (input) a generated mathematical program
colSet, ! (input) a subset of Integers
type ! (input) an element parameter in AllColumnTypes
)
Arguments
- GMP
An element in
AllGeneratedMathematicalPrograms.- colSet
A subset of the set
Integers, representing a set of column numbers.- type
An element parameter in
AllColumnTypes, defined over colSet.
Return Value
The procedure returns 1 on success, or 0 otherwise.
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;
}
ElementParameter ColType {
IndexDomain: cc;
Range: AllColumnTypes;
}
To change integer variable x(i) into a continuous variable we can use:
myGMP := GMP::Instance::Generate( MP );
VariableSet := { 'x' };
ColumnSet := GMP::Instance::GetColumnNumbers( myGMP, VariableSet );
ColType(cc) := 'continuous';
GMP::Column::FreezeRaw( myGMP, ColumnSet, ColType );
See also
The functions
GMP::Instance::Generate,GMP::Instance::GetColumnNumbers,GMP::Column::GetTypeandGMP::Column::SetType.