求高手帮忙找一下这段lingo程序的错误 报错1017
sets:jingdian/1..11/:c,t,l;links(jingdian,jingdian):r,cc,tt;endsetsdata:t=72418123630...
sets:
jingdian/1..11/:c,t,l;
links(jingdian,jingdian):r,cc,tt;
endsets
data:
t=7 24 18 12 36 30 12 9 15 24 17;
c=120 423 300 135 378 390 175 90 148 303 241;
tt=0 8.54 4.74 2.82 3.44 5.08 8.4 1.32 1.54 6.14 6.6
8.54 0 1.22 11.52 12.14 10.9 13.1 8.84 8.98 14.84 15.54
4.74 1.22 0 11.22 11.82 9.38 11.58 7.66 7.46 13.44 13.9
2.82 11.52 11.22 0 0.88 7.78 8.08 4.02 4.24 5.84 6.3
3.44 12.14 11.82 0.88 0 8.42 8.24 4.66 4.88 6 6.46
5.08 10.9 9.38 7.78 8.42 0 2.18 4.24 4.04 5.98 6.74
8.4 13.1 11.58 8.08 8.24 2.18 0 6.08 6.22 3.86 2.86
1.32 8.84 7.66 4.02 4.66 4.24 6.08 0 0.3 6.28 6.74
1.54 8.98 7.46 4.24 4.88 4.04 6.22 0.3 0 6.08 6.54
6.14 14.84 13.44 5.84 6 5.98 3.86 6.28 6.08 0 2.08
6.6 15.54 13.9 6.3 6.46 6.74 2.86 6.74 6.54 2.08 0;
cc=0 128.1 71.1 42.3 51.6 76.2 126 19.8 23.1 92.1 99
128.1 0 18.3 172.8 182.1 163.5 196.5 132.6 134.7 222.6 233.1
71.1 18.3 0 13.2 116.7 121.2 60.3 63.6 87.6 94.5
51.6 182.1 177.3 13.2 0 126.3 123.6 69.9 73.2 90 96.9
76.2 163.5 140.7 116.7 126.3 0 32.7 63.6 60.6 89.7 101.1
126 196.5 173.7 121.2 123.6 32.7 0 91.2 93.3 57.9 42.9
19.8 132.6 114.9 60.3 69.9 63.6 91.2 0 4.5 94.2 101.1
23.1 134.7 111.9 63.6 73.2 60.6 93.3 4.5 0 91.2 98.1
92.1 222.6 201.6 87.6 90 89.7 57.9 94.2 91.2 0 31.2
99 233.1 208.5 94.5 96.9 101.1 42.9 101.1 98.1 31.2 0;
n=?;
enddata
min=@sum(jingdian(j):@sum(jingdian(i):r(i,j)*(cc(i,j)+0.5*(c(i)+c(j)))));
@for(jingdian(i):r(i,i)=0);
@for(jingdian(i)|i#ge#2:@for(jingdian(j)|j#ge#2:r(i,j)+r(j,i)<1));
a=@sum(jingdian(j):@sum(jingdian(i):r(i,j)*(tt(i,j)+0.5*(t(i)+t(j)))));
@sum(jingdian(j):@sum(jingdian(i):r(i,j)*(tt(i,j)+0.5*(t(i)+t(j)))))<120;
@for(jingdian(i):@sum(jingdian(j):r(i,j))=@sum(jingdian(j):r(j,i)));
@for(jingdian(i)|i#eq#1:@sum(jngdian(j):r(i,j))=1);
@for(jingdian(i)|i#ne#1:@sum(jingdian(j):r(i,j))<1);
@for(links:@bin(r));
@sum(jingdian(j):@sum(jingdian(i):r(i,j)))=n;
@for(jingdian(i):@for(jingdian(j)|j#gt#1#and#j#ne#i:l(i)+r(i,j)-(n-2)*(1-r(i,j))+(n-3)*r(j,i)));
@for(jingdian(i)|i#gt#1:l(i)<n-1-(n-2)*r(l,i);l(i)>l+(n-2)*r(i,l));
少打了一行,应该是:
cc=0 128.1 71.1 42.3 51.6 76.2 126 19.8 23.1 92.1 99
128.1 0 18.3 172.8 182.1 163.5 196.5 132.6 134.7 222.6 233.1
71.1 18.3 0 168.3 177.3 140.7 173.7 114.9 111.9 201.6 208.5
42.3 172.8 168.3 0 13.2 116.7 121.2 60.3 63.6 87.6 94.5
51.6 182.1 177.3 13.2 0 126.3 123.6 69.9 73.2 90 96.9
76.2 163.5 140.7 116.7 126.3 0 32.7 63.6 60.6 89.7 101.1
126 196.5 173.7 121.2 123.6 32.7 0 91.2 93.3 57.9 42.9
19.8 132.6 114.9 60.3 69.9 63.6 91.2 0 4.5 94.2 101.1
23.1 134.7 111.9 63.6 73.2 60.6 93.3 4.5 0 91.2 98.1
92.1 222.6 201.6 87.6 90 89.7 57.9 94.2 91.2 0 31.2
99 233.1 208.5 94.5 96.9 101.1 42.9 101.1 98.1 31.2 0; 展开
jingdian/1..11/:c,t,l;
links(jingdian,jingdian):r,cc,tt;
endsets
data:
t=7 24 18 12 36 30 12 9 15 24 17;
c=120 423 300 135 378 390 175 90 148 303 241;
tt=0 8.54 4.74 2.82 3.44 5.08 8.4 1.32 1.54 6.14 6.6
8.54 0 1.22 11.52 12.14 10.9 13.1 8.84 8.98 14.84 15.54
4.74 1.22 0 11.22 11.82 9.38 11.58 7.66 7.46 13.44 13.9
2.82 11.52 11.22 0 0.88 7.78 8.08 4.02 4.24 5.84 6.3
3.44 12.14 11.82 0.88 0 8.42 8.24 4.66 4.88 6 6.46
5.08 10.9 9.38 7.78 8.42 0 2.18 4.24 4.04 5.98 6.74
8.4 13.1 11.58 8.08 8.24 2.18 0 6.08 6.22 3.86 2.86
1.32 8.84 7.66 4.02 4.66 4.24 6.08 0 0.3 6.28 6.74
1.54 8.98 7.46 4.24 4.88 4.04 6.22 0.3 0 6.08 6.54
6.14 14.84 13.44 5.84 6 5.98 3.86 6.28 6.08 0 2.08
6.6 15.54 13.9 6.3 6.46 6.74 2.86 6.74 6.54 2.08 0;
cc=0 128.1 71.1 42.3 51.6 76.2 126 19.8 23.1 92.1 99
128.1 0 18.3 172.8 182.1 163.5 196.5 132.6 134.7 222.6 233.1
71.1 18.3 0 13.2 116.7 121.2 60.3 63.6 87.6 94.5
51.6 182.1 177.3 13.2 0 126.3 123.6 69.9 73.2 90 96.9
76.2 163.5 140.7 116.7 126.3 0 32.7 63.6 60.6 89.7 101.1
126 196.5 173.7 121.2 123.6 32.7 0 91.2 93.3 57.9 42.9
19.8 132.6 114.9 60.3 69.9 63.6 91.2 0 4.5 94.2 101.1
23.1 134.7 111.9 63.6 73.2 60.6 93.3 4.5 0 91.2 98.1
92.1 222.6 201.6 87.6 90 89.7 57.9 94.2 91.2 0 31.2
99 233.1 208.5 94.5 96.9 101.1 42.9 101.1 98.1 31.2 0;
n=?;
enddata
min=@sum(jingdian(j):@sum(jingdian(i):r(i,j)*(cc(i,j)+0.5*(c(i)+c(j)))));
@for(jingdian(i):r(i,i)=0);
@for(jingdian(i)|i#ge#2:@for(jingdian(j)|j#ge#2:r(i,j)+r(j,i)<1));
a=@sum(jingdian(j):@sum(jingdian(i):r(i,j)*(tt(i,j)+0.5*(t(i)+t(j)))));
@sum(jingdian(j):@sum(jingdian(i):r(i,j)*(tt(i,j)+0.5*(t(i)+t(j)))))<120;
@for(jingdian(i):@sum(jingdian(j):r(i,j))=@sum(jingdian(j):r(j,i)));
@for(jingdian(i)|i#eq#1:@sum(jngdian(j):r(i,j))=1);
@for(jingdian(i)|i#ne#1:@sum(jingdian(j):r(i,j))<1);
@for(links:@bin(r));
@sum(jingdian(j):@sum(jingdian(i):r(i,j)))=n;
@for(jingdian(i):@for(jingdian(j)|j#gt#1#and#j#ne#i:l(i)+r(i,j)-(n-2)*(1-r(i,j))+(n-3)*r(j,i)));
@for(jingdian(i)|i#gt#1:l(i)<n-1-(n-2)*r(l,i);l(i)>l+(n-2)*r(i,l));
少打了一行,应该是:
cc=0 128.1 71.1 42.3 51.6 76.2 126 19.8 23.1 92.1 99
128.1 0 18.3 172.8 182.1 163.5 196.5 132.6 134.7 222.6 233.1
71.1 18.3 0 168.3 177.3 140.7 173.7 114.9 111.9 201.6 208.5
42.3 172.8 168.3 0 13.2 116.7 121.2 60.3 63.6 87.6 94.5
51.6 182.1 177.3 13.2 0 126.3 123.6 69.9 73.2 90 96.9
76.2 163.5 140.7 116.7 126.3 0 32.7 63.6 60.6 89.7 101.1
126 196.5 173.7 121.2 123.6 32.7 0 91.2 93.3 57.9 42.9
19.8 132.6 114.9 60.3 69.9 63.6 91.2 0 4.5 94.2 101.1
23.1 134.7 111.9 63.6 73.2 60.6 93.3 4.5 0 91.2 98.1
92.1 222.6 201.6 87.6 90 89.7 57.9 94.2 91.2 0 31.2
99 233.1 208.5 94.5 96.9 101.1 42.9 101.1 98.1 31.2 0; 展开
1个回答
展开全部
中间有一个集名写错了 最后两句都有问题 倒数第二句不是等式或者不等式关系 最后一句里面的l用在下标里面是什么意思
sets:
jingdian/1..11/:c,t,l;
links(jingdian,jingdian):r,cc,tt;
endsets
data:
t=7 24 18 12 36 30 12 9 15 24 17;
c=120 423 300 135 378 390 175 90 148 303 241;
tt=0 8.54 4.74 2.82 3.44 5.08 8.4 1.32 1.54 6.14 6.6
8.54 0 1.22 11.52 12.14 10.9 13.1 8.84 8.98 14.84 15.54
4.74 1.22 0 11.22 11.82 9.38 11.58 7.66 7.46 13.44 13.9
2.82 11.52 11.22 0 0.88 7.78 8.08 4.02 4.24 5.84 6.3
3.44 12.14 11.82 0.88 0 8.42 8.24 4.66 4.88 6 6.46
5.08 10.9 9.38 7.78 8.42 0 2.18 4.24 4.04 5.98 6.74
8.4 13.1 11.58 8.08 8.24 2.18 0 6.08 6.22 3.86 2.86
1.32 8.84 7.66 4.02 4.66 4.24 6.08 0 0.3 6.28 6.74
1.54 8.98 7.46 4.24 4.88 4.04 6.22 0.3 0 6.08 6.54
6.14 14.84 13.44 5.84 6 5.98 3.86 6.28 6.08 0 2.08
6.6 15.54 13.9 6.3 6.46 6.74 2.86 6.74 6.54 2.08 0;
cc=0 128.1 71.1 42.3 51.6 76.2 126 19.8 23.1 92.1 99
128.1 0 18.3 172.8 182.1 163.5 196.5 132.6 134.7 222.6 233.1
71.1 18.3 0 168.3 177.3 140.7 173.7 114.9 111.9 201.6 208.5
42.3 172.8 168.3 0 13.2 116.7 121.2 60.3 63.6 87.6 94.5
51.6 182.1 177.3 13.2 0 126.3 123.6 69.9 73.2 90 96.9
76.2 163.5 140.7 116.7 126.3 0 32.7 63.6 60.6 89.7 101.1
126 196.5 173.7 121.2 123.6 32.7 0 91.2 93.3 57.9 42.9
19.8 132.6 114.9 60.3 69.9 63.6 91.2 0 4.5 94.2 101.1
23.1 134.7 111.9 63.6 73.2 60.6 93.3 4.5 0 91.2 98.1
92.1 222.6 201.6 87.6 90 89.7 57.9 94.2 91.2 0 31.2
99 233.1 208.5 94.5 96.9 101.1 42.9 101.1 98.1 31.2 0;
n=?;
enddata
min=@sum(jingdian(j):@sum(jingdian(i):r(i,j)*(cc(i,j)+0.5*(c(i)+c(j)))));
@for(jingdian(i):r(i,i)=0);
@for(jingdian(i)|i#ge#2:@for(jingdian(j)|j#ge#2:r(i,j)+r(j,i)<1));
a=@sum(jingdian(j):@sum(jingdian(i):r(i,j)*(tt(i,j)+0.5*(t(i)+t(j)))));
@sum(jingdian(j):@sum(jingdian(i):r(i,j)*(tt(i,j)+0.5*(t(i)+t(j)))))<120;
@for(jingdian(i):@sum(jingdian(j):r(i,j))=@sum(jingdian(j):r(j,i)));
@for(jingdian(i)|i#eq#1:@sum(jingdian(j):r(i,j))=1);
@for(jingdian(i)|i#ne#1:@sum(jingdian(j):r(i,j))<1);
@for(links:@bin(r));
@sum(jingdian(j):@sum(jingdian(i):r(i,j)))=n;
!@for(jingdian(i):@for(jingdian(j)|j#gt#1#and#j#ne#i:l(i)+r(i,j)-(n-2)*(1-r(i,j))+(n-3)*r(j,i)));
!@for(jingdian(i)|i#gt#1:l(i)<n-1-(n-2)*r(l,i);!l(i)>l+(n-2)*r(i,l));
sets:
jingdian/1..11/:c,t,l;
links(jingdian,jingdian):r,cc,tt;
endsets
data:
t=7 24 18 12 36 30 12 9 15 24 17;
c=120 423 300 135 378 390 175 90 148 303 241;
tt=0 8.54 4.74 2.82 3.44 5.08 8.4 1.32 1.54 6.14 6.6
8.54 0 1.22 11.52 12.14 10.9 13.1 8.84 8.98 14.84 15.54
4.74 1.22 0 11.22 11.82 9.38 11.58 7.66 7.46 13.44 13.9
2.82 11.52 11.22 0 0.88 7.78 8.08 4.02 4.24 5.84 6.3
3.44 12.14 11.82 0.88 0 8.42 8.24 4.66 4.88 6 6.46
5.08 10.9 9.38 7.78 8.42 0 2.18 4.24 4.04 5.98 6.74
8.4 13.1 11.58 8.08 8.24 2.18 0 6.08 6.22 3.86 2.86
1.32 8.84 7.66 4.02 4.66 4.24 6.08 0 0.3 6.28 6.74
1.54 8.98 7.46 4.24 4.88 4.04 6.22 0.3 0 6.08 6.54
6.14 14.84 13.44 5.84 6 5.98 3.86 6.28 6.08 0 2.08
6.6 15.54 13.9 6.3 6.46 6.74 2.86 6.74 6.54 2.08 0;
cc=0 128.1 71.1 42.3 51.6 76.2 126 19.8 23.1 92.1 99
128.1 0 18.3 172.8 182.1 163.5 196.5 132.6 134.7 222.6 233.1
71.1 18.3 0 168.3 177.3 140.7 173.7 114.9 111.9 201.6 208.5
42.3 172.8 168.3 0 13.2 116.7 121.2 60.3 63.6 87.6 94.5
51.6 182.1 177.3 13.2 0 126.3 123.6 69.9 73.2 90 96.9
76.2 163.5 140.7 116.7 126.3 0 32.7 63.6 60.6 89.7 101.1
126 196.5 173.7 121.2 123.6 32.7 0 91.2 93.3 57.9 42.9
19.8 132.6 114.9 60.3 69.9 63.6 91.2 0 4.5 94.2 101.1
23.1 134.7 111.9 63.6 73.2 60.6 93.3 4.5 0 91.2 98.1
92.1 222.6 201.6 87.6 90 89.7 57.9 94.2 91.2 0 31.2
99 233.1 208.5 94.5 96.9 101.1 42.9 101.1 98.1 31.2 0;
n=?;
enddata
min=@sum(jingdian(j):@sum(jingdian(i):r(i,j)*(cc(i,j)+0.5*(c(i)+c(j)))));
@for(jingdian(i):r(i,i)=0);
@for(jingdian(i)|i#ge#2:@for(jingdian(j)|j#ge#2:r(i,j)+r(j,i)<1));
a=@sum(jingdian(j):@sum(jingdian(i):r(i,j)*(tt(i,j)+0.5*(t(i)+t(j)))));
@sum(jingdian(j):@sum(jingdian(i):r(i,j)*(tt(i,j)+0.5*(t(i)+t(j)))))<120;
@for(jingdian(i):@sum(jingdian(j):r(i,j))=@sum(jingdian(j):r(j,i)));
@for(jingdian(i)|i#eq#1:@sum(jingdian(j):r(i,j))=1);
@for(jingdian(i)|i#ne#1:@sum(jingdian(j):r(i,j))<1);
@for(links:@bin(r));
@sum(jingdian(j):@sum(jingdian(i):r(i,j)))=n;
!@for(jingdian(i):@for(jingdian(j)|j#gt#1#and#j#ne#i:l(i)+r(i,j)-(n-2)*(1-r(i,j))+(n-3)*r(j,i)));
!@for(jingdian(i)|i#gt#1:l(i)<n-1-(n-2)*r(l,i);!l(i)>l+(n-2)*r(i,l));
更多追问追答
追问
恩,我错了
中间那个应该是:
@for(jingdian(i)|i#eq#1:@sum(jingdian(j):r(i,j))=1);
最后两行应该是:
@for(jingdian(i):@for(jingdian(j)|j#gt#1#and#j#ne#i:l(j)>=l(i)+r(i,j)-(n-2)*(1-r(i,j))+(n-3)*r(j,i)));
@for(jingdian(i)|i#gt#1:l(i)l+(n-2)*r(i,1));
不过运行后,比如N取5,它还是报错1017
追答
没有可行解 最好换个版本吧 lingo9破解版有问题
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询