Hello all
My problem is to use the loop statement in a dynamic recursive CGE model.
What I learnt from such a model is that it consists of building a dynamic model by looping over the same static model two things over two periods. That is saving firstly the benchmark data after each loop statement which should be used for simulation whose results are store for the next period and so on.
Now, how to program a time-loop is not a matter. What I don’t know is how to get GAMS to save the data results from the previous loop in order to use them for the next loop. (In my looping attempts I had the impression that GAMS uses the original benchmark data as starting point in each loop. consequently, the variation results at each period are the same).
This is an illustration of what I have done.
Set t time / 2016*2040 /
*some variables are
C(Tr,H), CI(J), D(TR), DI(TR, J), DIT(TR), EX(TR), INV(TR)
*parameters linked to those variables for storing the results are
C1(Tr, H, t), CI1(J,t), D1(TR, t), DI1(TR, J, t), DIT1(TR, t), EX(1TR, t), INV1(TR, t)
*in the model and solve statement i made this
Model megcdycam /all/;
Solve megcdycam using mcp;
*For dynamic recursive simulations I made this after the previous solve statement
Loop (t,
Solve megcdycam using mcp;
CI1(J,t) = CI.L(J) *(1 + pop)(ord(t) - 1);
D1(TR,t) = D.L(TR) *(1 + pop)(ord(t) - 1);
DIT1(TR,t) = DIT.L(TR) *(1 + pop)(ord(t) - 1);
EX1(TR,t) = EX.L(TR) *(1 + pop)(ord(t) - 1);
INV1(TR,t) = INV.L(TR) *(1 + pop)**(ord(t) - 1);
) ;
Can someone gives me a good way to overcome that?
Thank you in advance
Rodrigue