求助这题lingo结果怎么看(TSP最短路径问题)
Model:SETS:CITY/1..10/:U;!U(I)=sequenceno.ofcity;LINK(CITY,CITY):DIST,!THEDISTANCEMAT...
Model:SETS:CITY /1..10/:U;!U(I)=sequence no. of city;LINK(CITY,CITY):DIST,!THE DISTANCE MATRIX;X;!X(I,J)=1 IF WE USE LINK I,J;ENDSETSDATA:!DISTANCE MARTRIX,IT NEED NOT BE SYMMETRIC;DIST=0 8 5 9 12 14 12 16 17 22 8 0 9 15 17 8 11 18 14 22 5 9 0 7 9 11 7 12 12 17 9 15 7 0 3 17 10 7 15 18 12 17 9 3 0 8 10 6 15 15 14 8 11 17 8 0 9 14 8 16 12 11 7 10 10 9 0 8 6 11 16 18 12 7 6 14 8 0 11 11 17 14 12 15 15 8 6 11 0 10 22 22 17 18 15 16 11 11 10 0;ENDDATA!THE MODEL:REF.DESROCHERS&LAPORTE,OR LETTERS,FEB.91;N=@SIZE(CITY);MIN=@SUM(LINK:DIST*X);@FOR(CITY(K):!IT MUST BE ENTERED;@SUM(CITY(I)|I#NE#K:X(I,K))=1;!IT MUST BE DEPARTED;@SUM(CITY(J)|J#NE#K:X(K,J))=1;!WEAK FORM OF THE SUBTOUR BREAKING CONSTRAINTS;!THESE ARE NOT VERYPOWERFUL FOR LARGE PROBLEMS;@FOR(CITY(J)|j#GT#1 #AND#J #NE#K:U(J)>=U(K)+X(K,J)-(N-2)*(1-X(K,J))+(N-3)*X(J,K)));!MAKE THE X'S 0??;@FOR(LINK:@BIN(X));!FOR THE FIRST AND THE LAST STOP WE KNOW...;@FOR(CITY(K)|K#GT#1:U(K)<=N-1-(N-2)*X(1,K);U(K)>=1+(N-2)*X(K,1));END运行结果Global optimal solution found. Objective value: 73.00000 Objective bound: 73.00000 Infeasibilities: 0.000000 Extended solver steps: 0 Total solver iterations: 114 Variable Value Reduced Cost N 10.00000 0.000000 U( 1) 0.000000 0.000000 U( 2) 9.000000 0.000000 U( 3) 1.000000 0.000000 U( 4) 6.000000 0.000000 U( 5) 7.000000 0.000000 U( 6) 8.000000 0.000000 U( 7) 2.000000 0.000000 U( 8) 5.000000 0.000000 U( 9) 3.000000 0.000000 U( 10) 4.000000 0.000000 后面还有很多放不上。。谢啦
展开
2个回答
展开全部
最优解为:73
路径如下:
1→3→7→9→10→8→4→5→6→2→1
路径如下:
1→3→7→9→10→8→4→5→6→2→1
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
你好~这道题的最优解为:73
路径如下:
1→3→7→9→10→8→4→5→6→2→1
有什么不懂得欢迎提问~蟹蟹😃😃😃😃😃
路径如下:
1→3→7→9→10→8→4→5→6→2→1
有什么不懂得欢迎提问~蟹蟹😃😃😃😃😃
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询