Hello.

I’m trying to put a if statement in a constraint but i can’t

I’m trying with:

economic31(MW12, I1)(FM2_2.L>0).. OpC31(MW12,I1)=E= (g*((HI1(I1)-HMW12(MW12))))+(OpF4*Dist31(MW12,I1)*(FM2_2(MW12,I1)**2));
** Error 148 Dimension different
economic31(MW12, I1)((FM2_2(MW12,I1).L)>0)… OpC31(MW12,I1)=E= (g*((HI1(I1)-HMW12(MW12))))+(OpF4*Dist31(MW12,I1)*(FM2_2(MW12,I1)**2)); (this one is illogical but i have to try)

** Error 8 ‘)’ expected, Error 36

economic31(MW12, I1)(FM2_2(MW12, I1)>0).. OpC31(MW12,I1)=E=(g*((HI1(I1)-HMW12(MW12))))+(OpF4*Dist31(MW12,I1)*(FM2_2(MW12,I1)**2));
** Error 52 Endogenous '- control operations not allowed

HELP!

Thanks