getsol
getsol |
Purpose
Synopsis
function getsol(c:nlctr):real
Argument
c
|
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