Help with writing equation after solve

Problems with syntax of GAMS
Post Reply
frds17
User
User
Posts: 22
Joined: 7 months ago

Help with writing equation after solve

Post by frds17 » 3 months ago

Hi all

I am trying to update variable D(t) using equation D(t+1)=(1+n)*G(t)+(1+r)*D(t) so that D(t+2)=(1+n)*G(t) +(1+r) *((1+n)*G(t)+(1+r)*D(t))

Thanks for your help

Code: Select all

set t /0*300/
;
scalar
r /0.05/
n /0.0148/
;
Variables
G(t)
D(t);

G.fx(t)=0.5;
D.fx('0')=0.01;


D.fx(t+1)=(1+n)*G.l(t)+(1+r)*D.l(t);
display D.l

Post Reply