Page 1 of 1

set already undercontrol

Posted: Tue Jun 21, 2022 10:18 am
by Abich1414.
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)));

Re: set already undercontrol

Posted: Tue Jun 21, 2022 10:28 am
by bussieck
Has nothing to do with i. You just have wrong parenthesis. Close the first sum before you open the division sum.

-Michael