Hi!!
Thanks for the reply. One more question please. What do you mean with Mymodelparameter = myparameter(iter); in the loop statement? Mymodelparameter is not defined anywhere.
cheers
Sérgio
2012/6/4 Renger van Nieuwkoop
Hi Sergio
You can define your parameter over your set of iterations
set iter /iter1*iter4/;
parameter
myparameter(iter) Parameter that changes in each iteration;
myparameter(“iter1”) = 4;
etc.
Loop(iter,
Mymodelparameter = myparameter(iter);
Solve mymodel;
);
The other problem you can solve by defining a second parameter and change its value after the solve
Parameter
Myparameter2 Parameter that changes after solve;
- Initialize the parameter for the first loop
Myparameter2 = 2;
Loop(iter,
Solve mymodel;
- Set the value of myparameter2 to the solution for the variable X
Myparameter2 = X.L
);
Cheers
Renger
-----Original Message-----
From: gamsworld@googlegroups.com [mailto:gamsworld@googlegroups.com] On Behalf Of Sérgio
Sent: Monday, June 04, 2012 1:02 PM
To: gamsworld
Subject: Parameters values
Hi everyone!!!
In need to know if it is possible to define one parameter with different values. For example, I need to run my solve statement in a loop with 4 iterations, however for each loop iteration, parameter “x”
must be initialized with different values. Furthermore, I need to initialize in iteration 2, 3 and 4 some variables with the values obtained in the previous ones. Can some one help me with that???
Regards
Sérgio
–
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.
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.