早教吧 育儿知识 作业答案 考试题库 百科 知识分享

还是lingo问题road(country,country):length,xie,c;endsetsdata:length=0 0 5 9 12 0 12 16 0 228 0 9 15 17 0 11 18 14 220 0 0 7 9 0 7 12 0 170 0 0 0 3 0 0 7 0 00 0 0 0 0 0 0 6 0 014 18 11 17 8 0 9 14 8 160 0 0 10 10 0 0 8 0 110 0 0 0 0 0 0 0 0 00 0 12

题目详情
还是lingo问题
road(country,country):length,xie,c;
endsets
data:
length=
0 0 5 9 12 0 12 16 0 22
8 0 9 15 17 0 11 18 14 22
0 0 0 7 9 0 7 12 0 17
0 0 0 0 3 0 0 7 0 0
0 0 0 0 0 0 0 6 0 0
14 18 11 17 8 0 9 14 8 16
0 0 0 10 10 0 0 8 0 11
0 0 0 0 0 0 0 0 0 0
0 0 12 15 15 0 6 11 0 10
0 0 0 0 15 0 0 11 0 0;
enddata
min=@sum(road:0.66*xie^0.51*length*c );
liu(6)=100; liu(8)=1000;
c(1,1)=0;c(1,2)=0;c(1,6)=0;c(1,9)=0;
c(2,2)=0;c(2,6)=0;
c(3,1)=0;c(3,2)=0;c(3,3)=0;c(3,6)=0;c(3,9)=0;
c(4,1)=0;c(4,2)=0;c(4,3);c(4,4)=0;c(4,6)=0;c(4,7)=0;c(4,9)=0;c(4,10)=0;
c(5,1)=0;c(5,2)=0;c(5,3)=0;c(5,5)=0;c(5,5)=0;c(5,6)=0;c(5,7)=0;c(5,9)=0;c(5,10)=0;
c(6,6)=0;
c(7,1)=0;c(7,2)=0;c(7,3)=0;c(7,6)=0;c(7,7)=0;c(7,9)=0;
c(8,1)=0;c(8,2)=0;c(8,3)=0;c(8,4)=0;c(8,5)=0;c(8,6)=0;c(8,7)=0;c(8,8)=0;c(8,9)=0;c(8,10)=0;
c(9,1)=0;c(9,2)=0;c(9,6)=0;c(9,9)=0;
c(10,1)=0;c(10,2)=0;c(10,3)=0;c(10,4)=0;c(10,6)=0;c(10,7)=0;c(10,9)=0;c(10,10)=0;
@sum(road(i,j)|i#eq#6:xie(i,j)*c(i,j))>100;
@for(country(i)|(i#ne#6)#and#(i#ne#8):liu(i)=@sum(road(j,i):xie(j,i)*c(j,i)+100));
@for(country(i)|(i#ne#6)#and#(i#ne#8):liu(i)=@sum(road(i,j):xie(i,j)*c(i,j)));
@for( road:@bin(c) );
end
▼优质解答
答案和解析
说实在的,我看不出你要算什么
liu(6)=100; liu(8)=1000;
这个liu什么用,有什么约束?
还有,你的约束条件是什么,感觉就只有
@sum(road(i,j)|i#eq#6:xie(i,j)*c(i,j))>100;