sets:yuanqu/I1 .. I6 /:f,z,d,g;
peisong/J1 ..J12 /:q;
links(yuanqu,peisong):a,x;
endsets
data:
f=8000,8000,6000,6800,8000,7500;
d=600,600,400,450,600,550;
g=0.9,0.9,1.2,1.1,0.9,1;
q=4696,4100,6678,4686,3264,11459,10819,6024,6541,5670,2947,5000;
a=5 6 10 20 25 21 15 10 12 18 20 18 8 6 4 10 15 20 18 11 7 6 17 20 22 20 15 6 10 16 20 16 13 10 16 21 20 18 14 7 4 15 19 22 16 15 12 16 12 15 20 18 9 4 7 13 15 20 8 10 6 10 15 22 20 8 44 8 11 18 17 7;
enddata
min=@sum(links:a*x^1/2)+@sum(yuanqu(i):f(i)*z(i))+@sum(yuanqu(i):g(i)*@sum(peisong(j):x(i,j)));
@sum(yuanqu(i):z(i))=p;
@for(peisong(j):@sum(yuanqu(i):x(i,j))=q(j));
@for(yuanqu(i):@sum(peisong(j):x(i,j))