I have a GAMS model where I have
Set i / 1*6 /;
Alias (i,ip,il) ;
Variables
x(i,ip) ;
And I want to generate equations which operates on the scalar products of all vectors in x, excluding the product of the same vector. Something like:
scalarProduct(i)..
sum(ip,x(i,ip)x(i,il)) =e= someConstant;
However this does not exclude the product of identical vectors. How to add this? Can I do it with a dollar statement somehow? There's probably a few bugs in that statement anyway, I didn't try it because I think the exclusion I want is missing.