Iterative modeling GAMS

Problems with modeling
Post Reply
navidsamare
User
User
Posts: 1
Joined: 6 years ago

Iterative modeling GAMS

Post by navidsamare »

Hello to all,
I have written a GAMS code in DEA literature, but I have some problems.
in my code I need to for one of the parameters (called: Gama), which will increased from 0 to 5 by a step length (for example 0.1), the model be implemented for each Gama and the results are presented to excel file in different sheets. Please help me to I can solve these problems.
My code is attached.
Sincerely.
Attachments
Gams-Forum.gms
(1.89 KiB) Downloaded 164 times
User avatar
bussieck
Moderator
Moderator
Posts: 1033
Joined: 7 years ago

Re: Iterative modeling GAMS

Post by bussieck »

Not sure if you were looking for this solution, but you can just use a for loop around your solve that iterates a range of gama values:

Code: Select all

for (gamax=0 to 5 by 0.5,
gama = gamax;
Solve  Rmodel using LP Minimizing eff;
...
)
The entire model is attached.

-Michael
Attachments
forloop.gms
(1.96 KiB) Downloaded 191 times
Post Reply