03
2019
07

大师,错误在哪里?modelsets:dui/1,2,3,4,5,6,7,8,9,10/:s,t;che/1..7/;link(dui,che):x,m,g,h;endsetsdata:s=6.53.

来自ip:11.117.192.104的同学咨询

问题描述:

大师,错误在哪里?
model
sets:
dui /1,2,3,4,5,6,7,8,9,10/:s,t;
che /1..7/;
link(dui,che):x,m,g,h;
endsets
data:
s=6.5 3.8 8.3 14.7 11.2 21.4 29 5.3 17.6 19.1;
t(i)=s(i)*3600/40;
m=14 14 7 0 7 0 0
14 7 7 0 0 0 0
14 7 7 7 0 0 0
14 7 0 14 0 0 0
14 7 0 7 0 0 0
14 14 7 14 0 0 0
7 7 0 0 0 0 0
14 7 0 14 0 0 0
14 7 7 0 14 0 0
14 7 0 7 0 0 0;
g=0 0 0 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 1 0
0 0 0 1 0 0 0
0 0 0 0 1 0 0
0 0 0 1 1 0 0
0 0 0 1 0 0 0
0 0 0 0 1 0 0
0 0 0 1 0 0 0;
h=0 0 0 1 0 0 0
0 0 0 1 0 0 0
0 0 0 0 1 0 0
0 0 1 0 0 0 0
0 0 1 0 0 0 0
0 0 0 0 0 0 0
0 0 1 0 0 0 0
0 0 1 0 0 0 0
0 0 0 1 0 0 0
0 0 1 0 0 0 0;
enddata
[email protected](dui(i):
@sum(che(j):x(i,j)*t(i)));
@sum(link:x*m)>=2500*0.12;
@sum(link:x*g)>=6;
@sum(link:x*h)>=2;
@sum(link:x)>=49*4*2500^0.5/90 23*150/300 23*20/30 17 12
end

最佳答案:

g数据个数是不对的 自己点清楚写对
model:
sets:
dui/1..10/:s,t;
che/1..7/;
link(dui,che):x,m,g,h;
endsets
data:
s=6.5 3.8 8.3 14.7 11.2 21.4 29 5.3 17.6 19.1;
m=14 14 7 0 7 0 0
14 7 7 0 0 0 0
14 7 7 7 0 0 0
14 7 0 14 0 0 0
14 7 0 7 0 0 0
14 14 7 14 0 0 0
7 7 0 0 0 0 0
14 7 0 14 0 0 0
14 7 7 0 14 0 0
14 7 0 7 0 0 0;
!g=0 0 0 0 1 0 0
0 0 0 0 0 0 0
0 0 0 0 0 1 0
0 0 0 1 0 0 0
0 0 0 0 1 0 0
0 0 0 1 1 0 0
0 0 0 1 0 0 0
0 0 0 0 1 0 0
0 0 0 1 0 0 0;
h=0 0 0 1 0 0 0
0 0 0 1 0 0 0
0 0 0 0 1 0 0
0 0 1 0 0 0 0
0 0 1 0 0 0 0
0 0 0 0 0 0 0
0 0 1 0 0 0 0
0 0 1 0 0 0 0
0 0 0 1 0 0 0
0 0 1 0 0 0 0;
enddata
@for(dui(i):t(i)=s(i)*3600/40);
[email protected](dui(i):
@sum(che(j):x(i,j)*t(i)));
@sum(link:x*m)>=2500*0.12;
@sum(link:x*g)>=6;
@sum(link:x*h)>=2;
@sum(link:x)>=49*4*2500^0.5/90 23*150/300 23*20/30 17 12;
end

发表评论:

◎如果您对该问题有其他更好的理解,希望您回答出来,感谢您的奉献。