set already undercontrol

Problems with syntax of GAMS
Post Reply
Abich1414.
User
User
Posts: 7
Joined: 3 months ago

set already undercontrol

Post by Abich1414. » 3 months ago

Dear GAMS familly,
I want to run the following command,but it says set is already under control. I know the problem comes as the indexes I use for SUM in the first overlaps the one I used in the second. But don't know how to fix it. I appreciate if you help me.

AAVEt(i,r,s) =SUM((i_org,r_org,s_org)$(aggI(I,I_org)*aggR(R,R_org)*aggS(S,S_org)), AVEt(i_org, r_org,s_org)* trade(i_org,r_org,s_org)/SUM(i_org,r_org,s_org)$(aggI(I,I_org)*aggR(R,R_org)*aggS(S,S_org)),trade(i_org,r_org,s_org)));

User avatar
bussieck
Moderator
Moderator
Posts: 832
Joined: 6 years ago

Re: set already undercontrol

Post by bussieck » 3 months ago

Has nothing to do with i. You just have wrong parenthesis. Close the first sum before you open the division sum.

-Michael

Post Reply