balance(i).. Sum(k,X(k,i)) - Sum(j,X(i,j)) =G= 0
I have this equation in GAMS, I understand why this is a domain violation. Yet I need to express this. I can not think of any other way of expressing this constraint in GAMS. Any help would be great.
I think your error comes from the fact that you have X(k,i) and then X(i,j). You can't have two same-name variables "X" with different indices.
Unless you have aliased j and k with alias(j,k): but then I cannot see why you'd do an equation like that, so I assume you meant to use another variable instead of X in one of the Xs.
If you were doing balance(i).. sum(k,X(k,i)) - sum(j,Y(j,i)) =G= 0, that would be fine.