Function GMP::Instance::GetObjectiveColumnNumber(GMP)


The function GMP::Instance::GetObjectiveColumnNumber returns the column number corresponding to the objective variable of a generated mathematical program.

     GMP             ! (input) a generated mathematical program


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.


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.


Let ColNo be an element parameter with range Integers.

ColNo := GMP::Instance::GetObjectiveColumnNumber( myGMP );

value := GMP::Solution::GetColumnValue( myGMP, 1, ColNo );