Procedure GMP::Row::SetIndicatorCondition(GMP, row, column, value)

GMP::Row::SetIndicatorCondition

The procedure GMP::Row::SetIndicatorCondition assigns an indicator column and condition to a row in a generated mathematical program.

GMP::Row::SetIndicatorCondition(
     GMP,            ! (input) a generated mathematical program
     row,            ! (input) a scalar reference or row number
     column,         ! (input) a scalar reference or column number
     value           ! (input) a numerical expression
     )

Arguments

GMP

An element in AllGeneratedMathematicalPrograms.

row

A scalar reference to an existing row in the matrix or an element in the set Integers in the range \(\{ 0 .. m-1 \}\) where \(m\) is the number of rows in the matrix.

column

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

value

A binary value that will be used as indicator condition.

Return Value

The procedure returns 1 on success, and 0 otherwise.

Note

  • Assigning an indicator column and condition to a row means that the row must (only) be satisfied if the level value of the indicator column equals the indicator condition.

  • This procedure fails if the row is nonlinear or if the column is not binary.