User Tools

Site Tools


solver:counting_the_number_of_discrete_variables

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;
solver/counting_the_number_of_discrete_variables.txt · Last modified: 2009/01/22 23:12 by support