当前位置: > lingo...
题目
lingo
联系 给题 帮着

提问时间:2021-03-26

答案
大概是下面这样 最重要的是transport两个量
model:
sets:
s/1..2/:;
w/1..2/:wcost1,wcost2,z;
c/1..3/:;
p/1..2/:;
link1(p,s,w):transportcost1,transport1;
link2(p,w,c):transportcost2,transport2;
link3(p,c):demand;
link4(p,s):cost;
link5(w,c):y;
endsets
data:
transportcost1=
1.8 1.6
1.7 1.5
1.9 1.7
1.8 1.6;
transportcost2=
2.5 2.3 2.7
2.2 1.8 2.4
2.6 2.4 2.8
2.3 1.9 2.5;
demand=
55 45 50
45 35 40;
cost=
28.5 28.5
38.5 39.5;
wcost1=
1.5 1.3;
wcost2=
20 85;
enddata
min=@sum(link1:transportcost1*transport1)*10000+@sum(link2:transportcost2*transport2)*10000
+@sum(link4(l,i):cost(l,i)*@sum(w(j):transport1(l,i,j)))*10000+@sum(w(j):wcost1(j)*@sum(s(i):@sum(p(l):transport1(l,i,j))))*10000
+@sum(w:z*wcost2);
@for(p(l):@for(w(j):@sum(s(i):transport1(l,i,j))=@sum(c(k):transport2(l,j,k))));
@for(link3(l,k):demand(l,k)=@sum(w(j):transport2(l,j,k)));
@sum(p(l):@sum(s(i):transport1(l,i,1)))<=100;
@sum(w(j):transport1(1,1,j))<=80;
@sum(w(j):transport1(2,1,j))<=75;
@for(w(j):z(j)=@if(@sum(p(l):@sum(s(i):transport1(l,i,j)))#eq#0,0,1));
@for(link5(j,k):y(j,k)=@if(@sum(p(l):transport2(l,j,k))#eq#0,0,1));
@for(c(k):@sum(w(j):y(j,k))<=1);
end
举一反三
我想写一篇关于奥巴马的演讲的文章,写哪一篇好呢?为什么好
奥巴马演讲不用看稿子.为什么中国领导演讲要看?
想找英语初三上学期的首字母填空练习……
英语翻译
1,人们染上烟瘾,最终因吸烟使自己丧命.
版权所有 CopyRight © 2012-2019 超级试练试题库 All Rights Reserved.