- Function GMP::Linearization::GetWeight(GMP, row, linNo)
GMP::Linearization::GetWeight
The function GMP::Linearization::GetWeight
returns the weight of a
linearization of a row in a generated mathematical program. The weight
of a linearization is defined as the objective coefficient of the column
that was added to the generated mathematical program when the
linearization was added and if a deviation was permitted.
GMP::Linearization::GetWeight(
GMP, ! (input) a generated mathematical program
row, ! (input) a scalar reference or row number
linNo ! (input) a linearization number
)
Arguments
- GMP
An element in
AllGeneratedMathematicalPrograms
.- row
A scalar reference to an existing nonlinear row in the matrix or the number of that row in the range \(\{ 0 .. m-1 \}\) where \(m\) is the number of rows in the matrix.
- linNo
An integer scalar reference to the rows and columns of the linearization.
Return Value
The function returns the weight of the linearization.
Note
This function returns 0 if no extra column was added for the linearization.
If the objective coefficient of the deviation column (if any) was not changed, the weight equals the penalty multiplier multiplied with the marginal value of the row that was used when the linearization was added with
GMP::Linearization::Add
orGMP::Linearization::AddSingle
.
See also
The procedures GMP::Linearization::Add
, GMP::Linearization::AddSingle
and GMP::Linearization::SetWeight
.