14 July 2026 10:53:19 PM tsp_nearest_test(): C++ version Test tsp_nearest(),, which uses the nearest neighbor method to construct a round trip for the traveling salesman problem. Order best: 0 8 37 30 43 17 6 27 35 29 5 36 18 26 42 16 45 32 14 11 10 22 13 24 12 20 46 19 39 2 21 15 40 33 28 4 47 38 31 23 9 41 25 3 34 44 1 7 Route starting at city 0 has cost = 40526.4 Order best: 1 28 4 47 38 31 20 46 10 22 13 24 12 11 14 32 45 43 17 6 27 35 29 5 36 18 26 42 16 19 39 8 0 7 37 30 21 15 2 33 40 41 9 23 44 34 25 3 Route starting at city 1 has cost = 39236.9 Order best: 41 9 23 44 34 25 3 1 28 4 47 38 31 20 46 10 22 13 24 12 11 14 32 45 43 17 6 27 35 29 5 36 18 26 42 16 19 39 8 0 7 37 30 21 15 2 33 40 Route starting at city 41 has cost = 39236.9 Order: 41 9 23 44 34 25 3 1 28 4 47 38 31 20 46 10 22 13 24 12 11 14 32 45 43 17 6 27 35 29 5 36 18 26 42 16 19 39 8 0 7 37 30 21 15 2 33 40 The best itinerary found: Step From To Distance 0 41 9 936.385 1 9 23 921.434 2 23 44 1628.44 3 44 34 460.184 4 34 25 1374.48 5 25 3 319.845 6 3 1 2011.66 7 1 28 1203.18 8 28 4 893.067 9 4 47 303.784 10 47 38 999.645 11 38 31 532.632 12 31 20 1239.65 13 20 46 710.721 14 46 10 710.769 15 10 22 502.132 16 22 13 605.126 17 13 24 418.801 18 24 12 532.076 19 12 11 1298.34 20 11 14 405.295 21 14 32 496.328 22 32 45 421.38 23 45 43 743.855 24 43 17 354.133 25 17 6 167.92 26 6 27 266.925 27 27 35 355.883 28 35 29 734.401 29 29 5 260.461 30 5 36 206.119 31 36 18 131.469 32 18 26 201.358 33 26 42 286.4 34 42 16 436.791 35 16 19 2358.32 36 19 39 1473.47 37 39 8 675.003 38 8 0 462.082 39 0 7 562.304 40 7 37 984.228 41 37 30 577.631 42 30 21 2223.65 43 21 15 441.041 44 15 2 950.239 45 2 33 949.294 46 33 40 1123.16 47 40 41 3385.38 ---- -- -- -------------- cost: 78473.8 Created data file 'att48_data.txt' Created command file 'att48_commands.txt' tsp_nearest_test(): Normal end of execution. 14 July 2026 10:53:19 PM