User Tools

Site Tools


This is an old revision of the document!

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.1232665921.txt.gz ยท Last modified: 2009/01/23 00:12 by support