I have a variable xij, and I want to code essentially: ∑xi(j=n)=∑x(i=n)j for all values of n. I tried using the line eq6(i,j)… sum(i, Q(i,j)) =e= sum(j, Q(i,j)); which is not correct.
Another way of saying this is that I want to code Input = Output

Often, if you have a square matrix Q(i,j), the sets i and j are the same, e.g. you have alias(i,j). In this case, to force Q to be symmetric, you could do: