Sat Oct 29 19:58:54 2022 tsp_random_test(): Python version: 3.6.9 Test tsp_random(). tsp_random(): Solve small traveling salesperson problems using a sampling method. The city-to-city distance matrix D: [[0. 3. 4. 2. 9.] [3. 0. 4. 6. 3.] [4. 4. 0. 5. 8.] [2. 6. 5. 0. 6.] [9. 3. 8. 6. 0.]] Number of samples requested is 500 Sample 0: cost = 19 Number of samples tried was 500 The best itinerary found: Step From To Distance 0 0 3 2 1 3 4 6 2 4 1 3 3 1 2 4 4 2 0 4 ---- -- -- -------------- cost: 19 tsp_random(): Normal end of execution. tsp_random(): Solve small traveling salesperson problems using a sampling method. The city-to-city distance matrix D: [[ 0. 29. 82. 46. 68. 52. 72. 42. 51. 55. 29. 74. 23. 72. 46.] [29. 0. 55. 46. 42. 43. 43. 23. 23. 31. 41. 51. 11. 52. 21.] [82. 55. 0. 68. 46. 55. 23. 43. 41. 29. 79. 21. 64. 31. 51.] [46. 46. 68. 0. 82. 15. 72. 31. 62. 42. 21. 51. 51. 43. 64.] [68. 42. 46. 82. 0. 74. 23. 52. 21. 46. 82. 58. 46. 65. 23.] [52. 43. 55. 15. 74. 0. 61. 23. 55. 31. 33. 37. 51. 29. 59.] [72. 43. 23. 72. 23. 61. 0. 42. 23. 31. 77. 37. 51. 46. 33.] [42. 23. 43. 31. 52. 23. 42. 0. 33. 15. 37. 33. 33. 31. 37.] [51. 23. 41. 62. 21. 55. 23. 33. 0. 29. 62. 46. 29. 51. 11.] [55. 31. 29. 42. 46. 31. 31. 15. 29. 0. 51. 21. 41. 23. 37.] [29. 41. 79. 21. 82. 33. 77. 37. 62. 51. 0. 65. 42. 59. 61.] [74. 51. 21. 51. 58. 37. 37. 33. 46. 21. 65. 0. 61. 11. 55.] [23. 11. 64. 51. 46. 51. 51. 33. 29. 41. 42. 61. 0. 62. 23.] [72. 52. 31. 43. 65. 29. 46. 31. 51. 23. 59. 11. 62. 0. 59.] [46. 21. 51. 64. 23. 59. 33. 37. 11. 37. 61. 55. 23. 59. 0.]] Number of samples requested is 100000 Sample 0: cost = 626 Sample 5: cost = 617 Sample 11: cost = 594 Sample 13: cost = 576 Sample 16: cost = 557 Sample 45: cost = 548 Sample 51: cost = 508 Sample 364: cost = 489 Sample 692: cost = 481 Sample 784: cost = 468 Sample 1539: cost = 452 Sample 9402: cost = 450 Sample 11482: cost = 448 Sample 22242: cost = 391 Number of samples tried was 100000 The best itinerary found: Step From To Distance 0 6 4 23 1 4 14 23 2 14 0 46 3 0 12 23 4 12 1 11 5 1 8 23 6 8 11 46 7 11 13 11 8 13 10 59 9 10 3 21 10 3 5 15 11 5 7 23 12 7 9 15 13 9 2 29 14 2 6 23 ---- -- -- -------------- cost: 391 tsp_random(): Normal end of execution. tsp_random(): Solve small traveling salesperson problems using a sampling method. The city-to-city distance matrix D: [[ 0. 633. 257. 91. 412. 150. 80. 134. 259. 505. 353. 324. 70. 211. 268. 246. 121.] [633. 0. 390. 661. 227. 488. 572. 530. 555. 289. 282. 638. 567. 466. 420. 745. 518.] [257. 390. 0. 228. 169. 112. 196. 154. 372. 262. 110. 437. 191. 74. 53. 472. 142.] [ 91. 661. 228. 0. 383. 120. 77. 105. 175. 476. 324. 240. 27. 182. 239. 237. 84.] [412. 227. 169. 383. 0. 267. 351. 309. 338. 196. 61. 421. 346. 243. 199. 528. 297.] [150. 488. 112. 120. 267. 0. 63. 34. 264. 360. 208. 329. 83. 105. 123. 364. 35.] [ 80. 572. 196. 77. 351. 63. 0. 29. 232. 444. 292. 297. 47. 150. 207. 332. 29.] [134. 530. 154. 105. 309. 34. 29. 0. 249. 402. 250. 314. 68. 108. 165. 349. 36.] [259. 555. 372. 175. 338. 264. 232. 249. 0. 495. 352. 95. 189. 326. 383. 202. 236.] [505. 289. 262. 476. 196. 360. 444. 402. 495. 0. 154. 578. 439. 336. 240. 685. 390.] [353. 282. 110. 324. 61. 208. 292. 250. 352. 154. 0. 435. 287. 184. 140. 542. 238.] [324. 638. 437. 240. 421. 329. 297. 314. 95. 578. 435. 0. 254. 391. 448. 157. 301.] [ 70. 567. 191. 27. 346. 83. 47. 68. 189. 439. 287. 254. 0. 145. 202. 289. 55.] [211. 466. 74. 182. 243. 105. 150. 108. 326. 336. 184. 391. 145. 0. 57. 426. 96.] [268. 420. 53. 239. 199. 123. 207. 165. 383. 240. 140. 448. 202. 57. 0. 483. 153.] [246. 745. 472. 237. 528. 364. 332. 349. 202. 685. 542. 157. 289. 426. 483. 0. 336.] [121. 518. 142. 84. 297. 35. 29. 36. 236. 390. 238. 301. 55. 96. 153. 336. 0.]] Number of samples requested is 100000 Sample 0: cost = 4471 Sample 3: cost = 4070 Sample 12: cost = 3897 Sample 18: cost = 3865 Sample 39: cost = 3689 Sample 216: cost = 3609 Sample 436: cost = 3422 Sample 722: cost = 3092 Sample 11940: cost = 3032 Sample 18136: cost = 2902 Sample 21283: cost = 2718 Sample 93266: cost = 2562 Number of samples tried was 100000 The best itinerary found: Step From To Distance 0 1 4 227 1 4 5 267 2 5 16 35 3 16 0 121 4 0 12 70 5 12 7 68 6 7 6 29 7 6 3 77 8 3 15 237 9 15 11 157 10 11 8 95 11 8 13 326 12 13 2 74 13 2 10 110 14 10 14 140 15 14 9 240 16 9 1 289 ---- -- -- -------------- cost: 2562 tsp_random(): Normal end of execution. tsp_random(): Solve small traveling salesperson problems using a sampling method. The city-to-city distance matrix D: [[ 0. 4727. 1205. ... 1542. 2379. 3744.] [4727. 0. 3588. ... 5461. 4390. 2088.] [1205. 3588. 0. ... 2023. 1867. 2560.] ... [1542. 5461. 2023. ... 0. 1644. 3928.] [2379. 4390. 1867. ... 1644. 0. 2532.] [3744. 2088. 2560. ... 3928. 2532. 0.]] Number of samples requested is 10000 Sample 0: cost = 152902 Sample 1: cost = 136311 Sample 152: cost = 129320 Sample 202: cost = 128987 Sample 495: cost = 128705 Sample 819: cost = 123537 Sample 1221: cost = 120868 Sample 3212: cost = 120132 Sample 4435: cost = 110135 Number of samples tried was 10000 The best itinerary found: Step From To Distance 0 0 37 1029 1 37 38 3952 2 38 16 4752 3 16 18 477 4 18 35 1061 5 35 43 600 6 43 30 440 7 30 17 794 8 17 5 881 9 5 12 3407 10 12 4 1924 11 4 7 4200 12 7 40 2544 13 40 9 4318 14 9 13 3501 15 13 10 1029 16 10 22 503 17 22 33 1148 18 33 25 3938 19 25 3 320 20 3 42 7987 21 42 24 3935 22 24 31 1448 23 31 44 3296 24 44 1 3472 25 1 41 1591 26 41 8 4993 27 8 14 970 28 14 39 554 29 39 46 1563 30 46 6 2432 31 6 15 3382 32 15 26 4396 33 26 2 3954 34 2 21 652 35 21 45 2012 36 45 11 827 37 11 27 1907 38 27 32 1377 39 32 29 1624 40 29 36 420 41 36 19 2130 42 19 20 1430 43 20 47 2042 44 47 34 3013 45 34 23 1716 46 23 28 2569 47 28 0 3625 ---- -- -- -------------- cost: 110135 tsp_random(): Normal end of execution. tsp_random_test(): Normal end of execution. Sat Oct 29 19:58:57 2022