getrsol


Purpose
Return the slack or dual solution value of a constraint
Synopsis
function getcsol(rIndex:integer, vType:integer) :real
Arguments
rIndex 
the index of a constraint in the problem
vType 
integer indicating the type of information returned:
0
slack value
1
dual solution value
Return value
The slack (if vType=0) or the dual solution value (if vType=1) of the constraint whose index is given as rIndex. Zero will be returned if there is no solution or if rIndex is outside the range of valid indices.
Example
The following code fragment solves a problem and retrieves the values of constraint number 42:
SLPmaximize
writeln("Constraint 42 slack=",getrsol(42,0))
writeln("Constraint 42 dual value=",getrsol(42,1))
Further information
The constraint index can be obtained from the constraint name by using SLPgetindex.
Related topics
getslack, getcsol, getsol


If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.