thank you for your answer
I have one more question about this case
scalars
k /0/;
positive variables x;
variables obj;
equations
objective;
objective… obj=e=x+k;
model case /all/;
repeat (
k=k+1;
solve case using lp minimizing obj;
Until k=200
);
Now I need to collect all of the solutions into one solution pool, create a new parameter, and use the solution pool as the new parameter for the following calculation, how can I do?
Sincerely
在 2014å¹´8月20日星期三UTC-4上åˆ2æ—¶29分32秒,Renger van Nieuwkoop写é“:
Hi Songming
You could do as follows:
Set overall /n1*n1000/,
k(overall) ;
Loop(overall$(ord(overall) < 101),
k(overall) = YES;
);
Cheers
Renger
\
Modelworks
Gewerbestrasse 15
3600 Thun – Switzerland
+41 79 818 53 73
In…@modelworks.ch
blog.modelworks.ch
From: gams...@googlegroups.com [mailto:gams...@googlegroups.com] On Behalf Of Songming Zhu
Sent: Dienstag, 19. August 2014 16:27
To: gams...@googlegroups.com
Subject: got problem on set definition in Gams, how to model this simple case in Gams?
initialize k=0, R is an empty set;
repeat
k=k+1;
R is R∪{k};
Until k=100;
can any1 show me the example code in Gams for this case?
Thank you
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+...@googlegroups.com.
To post to this group, send email to gams...@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.