I am trying to code the following inequality in GAMS for an assignment:
Where the D^p is the minkowski distance between two points. Hence, I tried to code this equation in gams as follows:
Code: Select all
constraint1(k,n,t)$(ord(n)<>ord(t))..rPower(sum(j,w(j)*power(((a(k,j))-y(n,j)),p)),(1/p))-e(k)=l=rPower(sum(j,w(j)*power(((a(k,j))-m(t,j)),p)),(1/p))-r;
In this example, there are 4 w values, p=2, and largest a_kj-y_nj=2.75. However the output is like this. I also attach the gams code in a txt file.
Would appreciate if someone could help me out.
Best wishes