Purpose
Return the index of an mpvar in the problem
Synopsis
function getvarnum(v:mpvar) :integer
Argument
Return value
The index number of the mpvar or -1 if the problem has not been loaded
or the variable is not in the current problem.
Example
The following code fragment obtains the index for variable v(3) and then
uses it to obtain the SLP status of the variable:
declarations
vNum, Status: integer
v: array(1..10) of mpvar
OBJ: linctr
end-declarations
...
SLPloadprob(OBJ)
SLPmaximize
vNum := getvarnum(v(3))
Status := getstatus(vNum)
Related topics
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.