- Procedure GMP::Coefficient::SetQuadratic(GMP, column1, Column2, value)
GMP::Coefficient::SetQuadratic
The procedure GMP::Coefficient::SetQuadratic
sets the value of a
quadratic product between two columns in a generated mathematical
program.
GMP::Coefficient::SetQuadratic(
GMP, ! (input) a generated mathematical program
column1, ! (input) a scalar value or column number
column2, ! (input) a scalar value or column number
value ! (input) a scalar numerical value
)
Arguments
- GMP
An element in
AllGeneratedMathematicalPrograms
.- column1,column2
A scalar reference to an existing column in the model or the number of that column in the range \(\{ 0 .. n-1 \}\) where \(n\) is the number of columns in the matrix.
- value
A scalar numerical value indicating the value for the quadratic term.
Return Value
The procedure returns 1 on success, or 0 otherwise.
Note
If column1 equals column2 then AIMMS multiplies the quadratic coefficient by 0.5 before it is stored (and passed to the solver).
This procedure operates on the objective. To set a quadratic coefficient in a row the procedure
GMP::QuadraticCoefficient::Set
should be used.
See also
The routines GMP::Coefficient::GetQuadratic
and GMP::QuadraticCoefficient::Set
.