you define equation for"every" j and n. Inside that equation, you are again summing over all b and n. Now when GAMS sees sum(j, v(b,m,i,j,t)), it does not understand if the “j” you are referring to the one over which you define equation, or the one over which you define the sum.

First thing in your case is to make sure if you want to write this equation for all j and n. If not, you can change the statement to cstr35(b,m,i,t)…

If you are sure that you want to write equation over all j and n and you also want to sum over j and n, you have to use alias.

alias(j, jj);

alias(n, nn);

cstr35(b,m,i,j,n,t)… sum(jj, v(b,m,i,jj,t)) + sum(nn, v1(b,m,i,nn,t)) =e= sum(k, o(b,m,j,k,t)) + sum(k, o1(b,m,n,k,t));

notice how alias can help GAMS differentiate between the ‘j’ used for sum and ‘j’ used for equation.

\