Loop Statements

Hi All,

I want run the Gams model two times. In the first run a dummy district demand is 0 and in the second run the dummy district demand is 68% of total allocation in first run of a particular plant.
I tried to use the loop condition to solve this but could not find the right code.
Can Any body share some idea or code regarding this.

Thanks and regards.
Dharmender Y.


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/7925Kp300UQJ.
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.

can you post your code for reference, since I don’t really understand what you need.

Yanyi

On Tuesday, July 24, 2012 2:21:12 AM UTC-7, dharmender yadav wrote:

Hi All,

I want run the Gams model two times. In the first run a dummy district demand is 0 and in the second run the dummy district demand is 68% of total allocation in first run of a particular plant.
I tried to use the loop condition to solve this but could not find the right code.
Can Any body share some idea or code regarding this.

Thanks and regards.
Dharmender Y.


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/UfAs-h8Fx90J.
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.

dharmender yadav,

try something like this:

set run / 1*2 / ;
parameter dummy(run);

dummy(‘1’) := 0;
dummy(‘2’) := 0.68;

loop(run,
solve MODEL using NLP minimizing objective
);

Em terça-feira, 24 de julho de 2012 06h21min12s UTC-3, dharmender yadav escreveu:

Hi All,

I want run the Gams model two times. In the first run a dummy district demand is 0 and in the second run the dummy district demand is 68% of total allocation in first run of a particular plant.
I tried to use the loop condition to solve this but could not find the right code.
Can Any body share some idea or code regarding this.

Thanks and regards.
Dharmender Y.


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/SWCAnGtJptoJ.
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.

Thanks Rafael and Jose your valuable suggestions. It really helped me alot to solve my problem.
Regards,
Dharmender Y
On Tuesday, 24 July 2012 14:51:12 UTC+5:30, dharmender yadav wrote:

Hi All,

I want run the Gams model two times. In the first run a dummy district demand is 0 and in the second run the dummy district demand is 68% of total allocation in first run of a particular plant.
I tried to use the loop condition to solve this but could not find the right code.
Can Any body share some idea or code regarding this.

Thanks and regards.
Dharmender Y.


To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/RH-7x3exv68J.
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.