getrsol
PurposeReturn the slack or dual solution value of a constraintSynopsisfunction 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 valueThe 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.ExampleThe 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 informationThe constraint index can be obtained from the constraint name by using SLPgetindex.Related topics
If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.