User Tools

Site Tools


Counting the number of discrete variables

Q: How can I pass the the number of discrete variables shown in the solve summary section to a parameter?

Please use the (undocumented) model attribute .numdvar. Find below an example for your reference.

$call gamslib prodsch
$include prodsch
parameter numint;
numint = prod1.numdvar;
display numint;
IMPRESSUM / LEGAL NOTICEPRIVACY POLICY solver/counting_the_number_of_discrete_variables.txt · Last modified: 2009/01/23 00:12 by support