I would like to define an equation with an index. Unfortunately this does not work:

Code: Select all

```
k /"k1","k2","k3",/
EQUATIONS
ObjFunction(k) Objective functions;
ObjFunction("k1")..
SUM((p,s,m,i,j),(x_TR(p,s,m,i,j)*f_TR(s,m,i,j,"k1")*d(m,i,j)+x_TS(p,s,j)*f_TS(s,"k1"))*w(p,"k1"))=e=Z("k1");
ObjFunction("k2")..
SUM((p,s,m,i,j),(x_TR(p,s,m,i,j)*f_TR(s,m,i,j,"k2")*d(m,i,j)+x_TS(p,s,j)*f_TS(s,"k2"))*w(p,"k2"))+120=e=Z("k2");
ObjFunction("k3")..
SUM((p,s,m,i,j),(x_TR(p,s,m,i,j)*f_TR(s,m,i,j,"k3")*d(m,i,j)+x_TS(p,s,j)*f_TS(s,"k3"))*w(p,"k3"))=e=Z("k3");
```