getvars


Purpose
Get the set of variables of a constraint.
Synopsis
procedure getvars(c:linctr,s:set of mpvar)
Arguments
A linear constraint
A set of decision variables
Example
The following returns the set of variables in a linear constraint to the set variable vset, and then loops through them to find their solution values:
declarations
 c:linctr
 vset: set of mpvar
end-declarations

getvars(c,vset)
forall(x in vset) writeln(getsol(x))
Further information
This procedure returns in the parameter s the set of variables of a constraint. Note that this procedure replaces the content of the set.


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