Tue Jul 28 19:25:49 2026 tsp_anneal_test(): numpy version: 1.26.4 python version: 3.10.12 Test tsp_anneal(), which solves a traveling salesperson problem (TSP) using simulated annealing. temperature = 1.0 array([ 8, 15, 18, 38, 14, 21, 24, 30, 10, 4, 39, 2, 34, 23, 12, 5, 27, 6, 11, 22, 36, 1, 40, 19, 7, 28, 26, 32, 41, 16, 3, 9, 37, 29, 0, 13, 31, 20, 33, 17, 35, 25]) Path cost = 3146.5986869356084 temperature = 10.0 array([ 9, 11, 12, 15, 18, 28, 24, 30, 36, 37, 38, 41, 7, 23, 26, 21, 10, 8, 2, 1, 40, 39, 3, 14, 17, 16, 27, 35, 19, 13, 0, 4, 6, 25, 22, 20, 29, 31, 32, 33, 34, 5]) Path cost = 1699.988498922975 temperature = 100.0 array([ 4, 0, 1, 8, 5, 33, 31, 23, 12, 14, 17, 38, 39, 13, 15, 24, 7, 30, 29, 27, 28, 32, 35, 36, 9, 11, 10, 16, 18, 19, 20, 21, 22, 26, 25, 6, 2, 3, 41, 40, 37, 34]) Path cost = 1422.1709560865015 temperature = 1000.0 array([12, 11, 24, 39, 40, 0, 41, 37, 35, 34, 32, 33, 30, 6, 7, 8, 2, 3, 4, 38, 36, 5, 28, 26, 25, 23, 10, 21, 20, 19, 18, 17, 14, 15, 22, 9, 1, 31, 29, 27, 16, 13]) Path cost = 1167.7273146156417 temperature = 10000.0 array([30, 31, 29, 23, 21, 22, 1, 0, 39, 38, 35, 32, 27, 20, 19, 18, 17, 14, 13, 15, 16, 12, 10, 9, 26, 28, 33, 34, 36, 37, 40, 41, 3, 2, 4, 5, 6, 7, 8, 11, 24, 25]) Path cost = 1054.8105621266475 temperature = 100000.0 array([ 6, 4, 38, 7, 11, 22, 16, 18, 17, 12, 10, 9, 3, 5, 34, 35, 27, 20, 19, 26, 24, 31, 33, 37, 39, 1, 0, 41, 40, 2, 8, 36, 32, 29, 25, 23, 21, 13, 14, 15, 28, 30]) Path cost = 1293.4237537864014 Graphics saved as "tsp_anneal.png" tsp_anneal_test(): Normal end of execution. Tue Jul 28 19:29:50 2026