thanks a lot for your help. it works for my model.
On Thu, Oct 11, 2012 at 12:53 PM, Dax wrote:
Well yes this is indeed quite simple.
Define a set which will be the loop index -- for instance
SET ITER /i01 * i10/;" for 10 iterations.
Define the values of your parameter in some data structure indexed over "ITER"
PARAMETER MYDATA(..., ITER)
(where ... represent whatever indices you need in your model)
and define a parameter structure which will be able to "host" the results :
PARAMETER MYRESULTS(..., ITER)
Then you just need to use something like:
loop (iter,
modeldata(...) = mydata(..., iter) ;
solve mymodel using ... minimising ... ;
myresults(..., iter) = X.l(...) ;
);
where "modeldata" is the parameter you want to change in your model, and "X" is the name of the variable you want to keep track of.
Hope this helps
cheers
Le mercredi 10 octobre 2012 11:13:28 UTC+2, parul mathuria a écrit :
Dear friends,
I am writing a program in GAMS, in which I need to change a parameter to a certain range, and for each value of this parameter i am evaluating results.
For this sensitivity analysis is it possible to use solve statement in a loop, so that for each input I can get results.
--
With Regards,
Parul Mathuria
Research Scholar
--
To view this discussion on the web visit
https://groups.google.com/d/msg/gamswor ... 53XwosttMJ.
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.
--
With Regards,
Parul Mathuria
Research Scholar
--
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.