how to display the current value of a set

Problems with syntax of GAMS
Post Reply
Manassaldi
User
User
Posts: 118
Joined: 7 years ago
Location: Rosario - Argentina

Re: how to display the current value of a set

Post by Manassaldi »

Hi, you can try this..

set Yr /1*14/;
scalar YrOrd;
loop(Yr,
YrOrd=ord(Yr);
display YrOrd;
);

or

set Yr /1*14/;
parameter YrOrd(Yr);
loop(Yr,
YrOrd(Yr)=ord(Yr);
);

display YrOrd;
Vickery
User
User
Posts: 1
Joined: 6 years ago

Re: how to display the current value of a set

Post by Vickery »

Manassaldi that did not work for me. :(
Here's an interesting ZQuiet review that goes into detail.
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: how to display the current value of a set

Post by bussieck »

Manassaldi code had no issues and addresses your original question. Why don't you tell us what does not work for you.

-Michael
Post Reply