Hello together,
I’m new here and very new to GAMS, too. Please excuse me if my question would be answered very easily, somehow I struggle a lot. But I’d be happy about some advise, as I do not understand how GAMS functions quiet well enough.
I have to add an equation to an existing model. It’s about costs, meaning that a new variable (eg ‘price(t)’) shall be equal to another variable ‘price2(t-1)’. This shall be calculated for each period t. The problem that I struggle with it that the starting value of price(t) shall be given, and price2 shall be calculated using the model in which I implement this equation. So price2 depends on price(t), which is given for the first period, and in the second period, price(t) shall depend on price2(t-1).
My first idea is the following:
Scalar price /7/;
Equation eq1;
eq1 .. price(t)$ord(t)>1) =e= price2(t-1)
But I’m not sure if it would be better to work with a loop?
Please excuse me if there is some information missing, I really do not have a feeling for this program yet, so I cannot say which information bits are important and which are not. I’d be very happy if someone could give me at least some starting information, or a hint on what basics I am missing and I should revise. I already took an online course and have former experience with MATLAB, but I feel completely lost.
Thank you!