getcsol


Purpose
Return the activity or reduced cost of a variable
Synopsis
function 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 value
The 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.
Example
The 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 information
The column index can be obtained by getvarnum or SLPgetindex.
Related topics
getact, getrsol, getsol


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