早教吧作业答案频道 -->数学-->
大师,错误在哪里?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.88.314.711.221.4295.317.619.1;t(i)=s(i)*3600/40;m=14147070014770000147770001470140001470700014
题目详情
大师,错误在哪里?
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
min=@sum(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
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
min=@sum(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);
min=@sum(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
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);
min=@sum(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
看了大师,错误在哪里?MODELS...的网友还看了以下: