Get a constraint
coefficient or constant term.
function getcoeff(c:linctr, x:mpvar):real
A linear constraint
A decision variable
Coefficient of the variable or the constant term.
In this example a single constraint with three variables is defined. The calls to getcoeff result in r taking the value -1 and s taking the value -12.
c:= 4*x + y -z <= 12
r:= getcoeff(c, z)
This function returns the coefficient of a given variable
in a constraint, or if no variable is given, the constant term
(= -RHS) of the constraint. The returned values correspond to a
normalised constraint representation with all variable and constant
terms on the left side of the (in)equality sign.
If you have any comments or suggestions about these pages,
please send mail to email@example.com.
© Copyright 2001-2013 Fair Isaac Corporation. All rights reserved.