有一lingo求解问题啊,谁能帮我看看哪里有问题啊?
发布网友
发布时间:2024-10-24 03:44
我来回答
共1个回答
热心网友
时间:2024-11-13 22:44
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,32,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))<=z(i)*d(i));
@for(links:@gin(x));
@for(yuanqu:@bin(z));
程序是改对了,但你的约束条件也许有问题,因为运行结果是0,显示的是,没能约束住