07-Jul-2026 22:00:47 tsp_nearest_test(): MATLAB/Octave version 11.3.0 Test tsp_nearest(), which seeks a shortest round trip for the traveling salesperson problem, by starting at an arbitrary city, and always moving next to the nearest unvisited city. Route from city 1 has best cost = 40526.4 Route from city 2 has best cost = 39236.9 Route from city 42 has best cost = 39236.9 The best itinerary found: Step From To Distance 1 42 10 936.385 2 10 24 921.434 3 24 45 1628.44 4 45 35 460.184 5 35 26 1374.48 6 26 4 319.845 7 4 2 2011.66 8 2 29 1203.18 9 29 5 893.067 10 5 48 303.784 11 48 39 999.645 12 39 32 532.632 13 32 21 1239.65 14 21 47 710.721 15 47 11 710.769 16 11 23 502.132 17 23 14 605.126 18 14 25 418.801 19 25 13 532.076 20 13 12 1298.34 21 12 15 405.295 22 15 33 496.328 23 33 46 421.38 24 46 44 743.855 25 44 18 354.133 26 18 7 167.92 27 7 28 266.925 28 28 36 355.883 29 36 30 734.401 30 30 6 260.461 31 6 37 206.119 32 37 19 131.469 33 19 27 201.358 34 27 43 286.4 35 43 17 436.791 36 17 20 2358.32 37 20 40 1473.47 38 40 9 675.003 39 9 1 462.082 40 1 8 562.304 41 8 38 984.228 42 38 31 577.631 43 31 22 2223.65 44 22 16 441.041 45 16 3 950.239 46 3 34 949.294 47 34 41 1123.16 48 41 42 3385.38 ---- -- -- -------------- cost: 39236.9 Graphics saved as "tsp_nearest_test.png" tsp_nearest_test(): Normal end of execution. 07-Jul-2026 22:00:49