- Function GMP::Instance::GetObjectiveColumnNumber(GMP)
GMP::Instance::GetObjectiveColumnNumber
The function GMP::Instance::GetObjectiveColumnNumber
returns the
column number corresponding to the objective variable of a generated
mathematical program.
GMP::Instance::GetObjectiveColumnNumber(
GMP ! (input) a generated mathematical program
)
Arguments
- GMP
An element in
AllGeneratedMathematicalPrograms
.
Return Value
The function returns the column number as an element of the set
Integers
. If the generated mathematical program does not contain an objective then -1 is returned.
Note
You should assign the return value of this function to an element
parameter with range Integers
if you want to use it as (column)
argument to call other GMP routines.
Example
Let
ColNo
be an element parameter with rangeIntegers
.ColNo := GMP::Instance::GetObjectiveColumnNumber( myGMP ); value := GMP::Solution::GetColumnValue( myGMP, 1, ColNo );
See also
The functions GMP::Instance::Generate
, GMP::Instance::GetColumnNumbers
, GMP::Instance::GetObjectiveRowNumber
and GMP::Instance::GetRowNumbers
.