Procedure GMP::Column::SetAsObjective(GMP, column)

GMP::Column::SetAsObjective

The procedure GMP::Column::SetAsObjective sets a column as the new objective of a generated mathematical program.

GMP::Column::SetAsObjective(
     GMP,            ! (input) a generated mathematical program
     column          ! (input) a scalar reference or column number
     )

Arguments

GMP

An element in AllGeneratedMathematicalPrograms.

column

A scalar reference to an existing column in the matrix or the number of that column in the range \(\{ 0 .. n-1 \}\) where \(n\) is the number of columns in the matrix.

Return Value

The procedure returns 1 on success, and 0 otherwise.

Note

  • The column should be linear and have at least one coefficient in the matrix.

  • The column should be free, i.e., not have a lower or upper bound.

  • After a call to GMP::Column::SetAsObjective the old objective column will be treated as a normal column.

See also

The routines GMP::Column::Add and GMP::Instance::CreateDual.