getcsol
PurposeReturn the activity or reduced cost of a variableSynopsisfunction getcsol(cIndex:integer, vType:integer) :real
Arguments
cIndex the index of an mpvar or a column in the problem vType integer indicating the type of information returned:
- 0
- activity
- 1
- reduced cost
Return valueThe activity (if vType=0) or the reduced cost (if vType=1) of the mpvar or column whose index is given as cIndex. Zero will be returned if there is no solution or if cIndex is outside the range of valid indices.ExampleThe following code fragment solves a problem and retrieves the values of column number 42:SLPmaximize writeln("Column 42 activity=",getcsol(42,0)) writeln("Column 42 reduced cost=",getcsol(42,1))Further informationRelated topics
If you have any comments or suggestions about these pages, please send mail to docs@dashoptimization.com.