Hello everybody.

I have some equations with different dimension and variable A is used in both of them. For example. The first equation has one dimension (A(i)). but the second equation has two dimension (i and j).

eq1(i)… A(i) =e= x(i)+y(i);

eq2(i,j)… B(i,j) =e= A(i,j)+c(i,j);

(if i=1:3, j=1,2 and A(i)=[6,7,8] then A(i,j)=[6,7,8;6,7,8] )

Actually, values of variable A are same for different values of the second dimension (j). The dimensions of variable A are different

in two equations, Then GAMS can’t solve the problem. How can I solve this problem?

I added another equation and solve this problem but I think It’s not a good idea for that. GAMS didn’t give me any error for my solution.

My solution:

eq1(i)… A(i) =e= x(i)+y(i);

eq2(i,j)… B(i,j) =e= A2(i,j)+c(i,j);

eq3(i)… A2(i,j) =e=A(i);

Thank you for your help.