Initializing help system before first use

getsol

getsol


Purpose
Get the solution value of a nonlinear constraint.
Synopsis
function getsol(c:nlctr):real
Argument
A nonlinear constraint
Return value
Solution value or 0.
Example
The following prints the solution values of a nonlinear constraint and a nonlinear expression.
uses "mmnl"
declarations
 x,y,z: mpvar
 Ctr: nlctr
end-declarations
  ...                         ! (Define and solve the problem)
writeln("Evalution of Ctr: ", getsol(Ctr))
writeln("Evaluation of an expression: ", getsol(abs(x*y)+5*z^3)) 
Further information
This function returns the evaluation of a nonlinear constraint using the current solution values of its variables. Note that the solution value of a variable is 0 if the problem has not been solved or the variable is not contained in the problem that has been solved.
Related topics
Module