早教吧作业答案频道 -->数学-->
大师,错误在哪里?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...的网友还看了以下:
lingo一直长时间的运行,不出结果,怎么办?求大师指导.model:sets:gongdian/ 2020-04-26 …
lingo线性规划问题sets:jbxq/1..4/:a;zgxq/1..4/:b;xz/1..4 2020-05-13 …
lingo问题,谁帮我运行下这个程序,有错误的话帮我看看model:sets:xcs/1..20/ 2020-05-13 …
lingo 提示 :missing right parenthesismodel:sets:sup 2020-05-14 …
急求运行LINGO出现unexpectedjacobianoverflow错误,代码如下,希望大牛 2020-06-03 …
为什么老是@bin那句出错model:sets:course/1..40/:a,b,c,d,t;t 2020-07-15 …
lingo程序模型错误请大虾帮忙看看~MODEL:sets:i5/1..5/:a,d1,d2;j10 2020-10-31 …
大师,错误在哪里?MODELSETS:dui/1,2,3,4,5,6,7,8,9,10/:s,t;c 2020-11-01 …