Hey there,
I have a model that includes (among other constraints) constraints v1-v3 below:
v1(i,inp)$p1(i).. x(inp,i)=G=sum(p1,lambda1(i,p1)*x(inp,p1));
v2(i,inp)$p1(i).. x(inp,i))=G=sum(p1,lambda2(i,p1)*x(inp,p1));
v3(i,inp)$p1(i).. x(inp,i)=G=sum(p1,lambda3(i,p1)*x(inp,p1));
I’d like to include in the model an interdependence constraint that is essentially a three-way equality of the right-hand side terms of constraints v1-v3 as follows:
inter(i,inp)$p1(i).. sum(p1,lambda1(i,p1)*x(inp,p1))=E=sum(p1,lambda2(i,p1)*x(inp,p1))=E=sum(p1,lambda3(i,p1)*x(inp,p1));
When I include such a constraint in the model I get the following error (related to the newly added constraint):
Error 409. Unrecognizable item - skip to find a new statement
looking for a ‘;’ or a key word to get started again.
Is there a way to define such a three-way equality constraint in GAMS? If not, then will the solution be to use the transitivity rule and break down the above three-way equality constraint into two separate equalities as below?
sum(p1,lambda1(i,p1)*x(inp,p1))=E=sum(p1,lambda2(i,p1)*x(inp,p1));
sum(p1,lambda2(i,p1)*x(inp,p1))=E=sum(p1,lambda3(i,p1)*x(inp,p1));
Thank you in advance for your help.
Teo