How do I find length of a set?
For example:
Set
itemList ‘Elements in the set’ /n5 * n23/
Parameter
tot ‘Total elements in the list’
tot = card(itemList)
What’s wrong with this statement? Is there another command to find the
length of a set? Does anyone who a link to list of GAMS common
commands?
thanks.
\
Hi Crystal
Nothing is wrong, except that you have forgotten semicolons at the end of the statements
Renger
Set
itemList ‘Elements in the set’ /n5 * n23/;
Parameter
tot ‘Total elements in the list’;
tot = card(itemList);
display tot;
-----Original Message-----
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Crystal
Sent: Friday, May 25, 2012 9:24 AM
To: gamsworld
Subject: Finding Length of Set
How do I find length of a set?
For example:
Set
itemList ‘Elements in the set’ /n5 * n23/
Parameter
tot ‘Total elements in the list’
tot = card(itemList)
What’s wrong with this statement? Is there another command to find the length of a set? Does anyone who a link to list of GAMS common commands?
thanks.
–
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.
\