Purpose
Return the current value of the nonlinear part of a constraint
Synopsis
function getnlcoeff(c:genctr) :real
Argument
Return value
The current value of the nonlinear coefficient term in the constraint
Example
The following example solves a problem and retrieves the optimal value
of the nonlinear coefficient of a constraint:
declarations
c1, c2: genctr
x, y: mpvar
end-declarations
x <= 10
y <= 10
c1:= x^2 + y^2 <= 4 - x
c2:= x*y >= 1
SLPloadprob(x+y)
SLPmaximize
writeln("c1 nonlinear coefficient value=",getnlcoeff(c1))
Further information
See the discussion on
General Constraint
Expressions for more details on the way in which the formulation of a constraint
affects the way it is loaded into the problem.
Related topics
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.