?? result3.m
字號:
% the first running result
Best_tour_length = 1925;
besttour =[ 1 9 15 4 3 8 14 10 16 5 6 11 13 7 2 12 -1];
Temperature_of_best_tour_length =17.3385;
Solution_count = 629;
Search_stop_temperature = 4.0184;
Elapsed_time = 0.2030;
Solutions_generated =10272;
temp1 =[ 30.0000 30.0000 29.1000 27.3802 27.3802 25.7620 24.9892 24.2395 ...
22.1227 22.1227 21.4590 21.4590 20.8153 19.5851 18.4276 17.8748 ...
17.3385 16.3138 15.8244 15.3497 14.8892 14.4425 14.0092 13.5890 ...
13.1813 12.4023 12.4023 12.0302 11.3192 11.3192 10.9796 10.6503 ...
10.3308 9.7202 9.7202 9.4286 9.1457 8.8714 8.6052 8.3471 ...
8.0967 7.8538 7.6181 7.3896 7.1679 6.9529 6.7443 6.5420 ...
6.3457 6.1553 5.9707 5.7916 5.6178 5.4493 5.2858 5.1272 ...
4.9734 4.8242 4.6795 4.5391 4.4029 4.2708 4.1427 4.0184 ];%
lenn1=[2602 2551 2526 2540 2489 2227 2148 ...
2108 2222 2195 2121 2081 2075 2031 ...
2016 1976 1925 1925 1925 1929 1929 ...
1929 1929 1929 1929 1969 1929 1929 ...
2011 1929 1929 1929 1929 1933 1929 ...
1929 1929 1929 1929 1929 1929 1929 ...
1929 1929 1929 1929 1929 1929 1929 ...
1929 1929 1929 1929 1929 1929 1929 ...
1929 1929 1929 1929 1929 1929 1929 1929];
solnn1 =[ 1 14 32 46 59 78 92 ...
118 199 226 263 289 367 446 ...
523 549 629 806 1074 1155 1517 ...
1697 1877 2057 2237 2417 2443 2623 ...
2803 2850 3030 3210 3481 3598 3687 ...
3867 4047 4318 4498 4678 4858 5220 ...
5400 5580 5760 5940 6120 6300 6662 ...
6933 7204 7475 7837 8017 8197 8377 ...
8557 8828 9099 9279 9459 9639 9819 ...
9999];
% the second data
Best_tour_length = 1775;
besttour =[ 1 11 10 6 8 3 2 12 7 4 14 13 16 9 15 5 -1];
Temperature_of_best_tour_length = 7.6181;
Solution_count = 943;
Search_stop_temperature =5.7916;
Elapsed_time =0.3440;
Solutions_generated =2176;
temp2 =[ 30.0000 30.0000 28.2270 27.3802 26.5588 24.9892 24.2395 22.8069 ...
22.1227 22.1227 19.5851 19.5851 18.4276 17.8748 17.3385 16.8184 ...
16.3138 15.3497 14.8892 14.4425 13.5890 13.1813 12.7859 12.0302 ...
10.9796 10.9796 10.0208 10.0208 9.7202 9.4286 8.8714 8.8714 ...
8.3471 7.8538 7.6181 7.1679 6.7443 6.5420 6.5420 6.1553 ...
6.1553 5.7916 5.7916]
lenn2 =[ 2750 2742 2742 2676 2668 2624 2609 ...
2664 2689 2602 2636 2612 2614 2489 ...
2444 2425 2401 2336 2312 2304 2168 ...
2166 2148 2135 2139 2130 2156 2132 ...
2057 2028 2036 2005 1796 1785 1775 ...
1775 1806 1806 1788 1785 1775 1785 ...
1775];
solnn2 =[
1 2 5 9 35 52 66 ...
85 112 119 165 166 175 195 ...
200 212 213 250 251 291 304 ...
307 308 310 392 431 470 471 ...
512 583 665 702 786 872 943 ...
1287 1303 1397 1398 1490 1561 1832 ...
1903];
% the third running result
Best_tour_length = 1663;
besttour =[ 1 6 10 14 5 3 2 7 16 4 12 8 15 13 11 9 -1];
Temperature_of_best_tour_length = 30;
Solution_count =72;
Search_stop_temperature =24.2395;
Elapsed_time = 0.0310;
Solutions_generated = 926;
temp3 =[ 30.0000 30.0000 27.3802 26.5588 26.5588 24.9892 24.9892 24.2395];
lenn3 =[1692 1663 1793 1716 1663 1716 1663 1663];
solnn3 =[ 1 72 234 236 237 399 400 653];
plot(temp1,lenn1, '-*',temp2,lenn2, '-o',temp3,lenn3,'-^')
title('Simulated Annealing w/ 2-Opt local search')
xlabel('Temperature (not scaled)')
ylabel('Tour Lengths/Costs')
grid
figure,
plot(temp1,solnn1,'-*',temp2,solnn2,'-o',temp3,solnn3,'-^')
title('Simulated Annealing w/ 2-Opt local search')
xlabel('Number of Solutions')
ylabel('Tour Lengths/Costs')
grid
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -