SETS
u /110/
g /110/
r /1*10/
alias (u, uu)
PARAMETERS
X(g)
/1 7833.9
2 7878.4
3 7923.1
4 7967.9
5 8012.8
6 8057.9
7 8103.1
8 8148.4
9 8193.8
10 8239.4/
TABLE K(u,r)
1 2 3 4 5 6 7 8 9 10
1 110.9400 14.9427 21.7730 107.2948 86.9236 125.0415 77.2769 6.1595 65.2744 69.2062
2 72.1302 29.9665 21.6391 68.1248 51.2225 104.7691 38.0046 45.6546 89.4309 96.1623
3 51.6516 85.7474 77.7240 45.9884 12.5615 68.0209 29.3910 104.6288 124.8867 133.6660
4 18.6930 87.6248 79.0042 12.9272 36.0464 102.6715 23.7207 104.0261 140.1129 148.1111
5 149.9144 51.5421 58.7101 145.1611 109.8199 117.6701 110.0344 47.8352 14.6947 17.2627
6 57.2379 63.7732 55.7863 51.4801 9.4583 71.6139 18.8240 82.6829 105.7415 114.2755
7 16.7268 94.6529 86.0239 11.2187 38.6391 102.8906 29.8788 111.2612 146.0569 154.1810
8 120.0266 109.5562 105.3934 114.3869 68.6970 1.4035 89.8570 126.8826 111.1759 119.8896
9 163.6616 72.2187 77.9784 158.4782 117.7992 110.2387 122.4623 72.2097 10.9076 13.8980
10 98.5979 4.8997 7.0084 94.6127 72.1435 112.3654 63.2092 20.1245 67.6600 73.2183
PARAMETER Mat(u,g,r); Mat(u,g,r) = 1/(X(g)*power(K(u,r),3));
VARIABLES
B(u,g,r)
OBJ
nonnegative VARIABLE B
EQUATIONS
CONSTRAINT1
CONSTRAINT2(u)
OBJECTIVE;
CONSTRAINT1… SUM((u,g,r),B(u,g,r)) =L= 3;
CONSTRAINT2(u) … prod(g$(SUM(r,B(u,g,r)) ne 0),0.0024+SUM(r,SUM(uu$(ORD(uu) NE ORD(u)),B(uu,g,r)*Mat(uu,g,r))) /(SUM(r,B(u,g,r)*Mat(u,g,r))) ) =L= 1;
OBJECTIVE … OBJ =E= prod(u, prod(g,0.0024+SUM(r,SUM(uu$(ORD(uu) NE ORD(u)),B(uu,g,r)*Mat(uu,g,r))) /(SUM(r,B(u,g,r)*Mat(u,g,r))) ));
MODEL Untitled_6 / CONSTRAINT1, CONSTRAINT2, OBJECTIVE /
SOLVE Untitled_6 USING NLP Minimizing OBJ
I get this error:
endogenous relational operations require model type “dnlp”
and I know that’s because I shouldn’t include a variable in the dollar sign, however it’s crucial to me that for any u and g whenever this term:
SUM(r,B(u,g,r)*Mat(u,g,r)) is equal 0
this whole term:
0.0024+SUM(r,SUM(uu$(ORD(uu) NE ORD(u)),B(uu,g,r)*Mat(uu,g,r))) /(SUM(r,B(u,g,r)*Mat(u,g,r))) is excluded from the product