I'm trying to solve models with different indices, but somehow get multiple erros.

Code: Select all

```
1: EQdp(i) .. dp(i) =e= x(i,'P_gen')-P_L(i)-sum(j,(x(i,'theta')-x(j,'theta'))*B(i,j))
2: EQg(i) .. 0 =e= EQdp(i)
3: EQcost(i) .. cost(i) =e= sum(gen,co(gen,'a')+co(gen,'b')*x(gen,'P')+co(gen,'c')*x(gen,'P')**2)+sum(l ne i,lambda(l)*EQdp(l));
4: Model Reg1 /EQg('b1')/;
5: solve Reg1 using NLP minimizing EQcost('b1');
6: Model Reg2 /EQg('b3')/;
7: solve Reg2 using NLP minimizing EQcost('b2');
8: Model Reg3 /EQg('b3')/;
9: solve Reg3 using NLP minimizing EQcost('b3');
```

The error messages are in the model definition and are always the same in each line:

Code: Select all

```
Line2: 409 Unrecognizable item - skip to find a new statement
looking for a ';' or a key word to get started again
Line4+6+8: 2 Identifier expected
140 Unknown symbol
182 Closing '/' missing in a set, parameter or model statement
Line5+7+9:243 Objective is not a variable
257 Solve statement not checked because of previous errors
```