Wed Jul 22 10:10:16 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([30, 3, 16, 22, 32, 10, 9, 38, 20, 34, 17, 40, 27, 33, 26, 36, 5, 37, 2, 6, 31, 39, 19, 0, 18, 25, 11, 28, 7, 24, 8, 14, 15, 13, 1, 29, 35, 41, 23, 21, 12, 4]) Path cost = 2958.262483211626 temperature = 10.0 array([24, 0, 36, 31, 28, 26, 18, 17, 15, 41, 5, 33, 27, 21, 7, 3, 4, 37, 38, 39, 1, 11, 12, 8, 2, 34, 29, 20, 14, 30, 32, 35, 40, 6, 9, 13, 16, 19, 22, 10, 23, 25]) Path cost = 1879.327567023172 temperature = 100.0 array([16, 14, 13, 22, 32, 34, 37, 23, 15, 18, 19, 20, 33, 40, 41, 0, 2, 8, 7, 5, 25, 11, 12, 17, 21, 26, 24, 6, 3, 1, 39, 38, 4, 36, 35, 31, 30, 29, 28, 27, 9, 10]) Path cost = 1336.6168653495556 temperature = 1000.0 array([ 4, 5, 6, 24, 10, 14, 13, 23, 26, 41, 1, 2, 15, 17, 18, 19, 20, 25, 33, 34, 22, 16, 11, 9, 3, 0, 40, 39, 38, 37, 35, 36, 7, 8, 12, 21, 27, 28, 32, 31, 29, 30]) Path cost = 1370.9922528656195 temperature = 10000.0 array([ 5, 36, 30, 24, 13, 14, 20, 28, 26, 25, 23, 2, 1, 4, 32, 31, 3, 0, 41, 40, 39, 38, 37, 35, 34, 33, 7, 29, 27, 21, 22, 16, 19, 18, 17, 15, 12, 11, 10, 9, 8, 6]) Path cost = 1150.804280797236 temperature = 100000.0 array([32, 35, 23, 21, 22, 12, 9, 0, 40, 41, 1, 4, 7, 8, 6, 29, 27, 28, 20, 17, 14, 13, 15, 11, 5, 2, 3, 39, 38, 37, 36, 34, 33, 24, 10, 16, 18, 19, 26, 25, 30, 31]) Path cost = 1169.2305576383767 Graphics saved as "tsp_anneal.png" tsp_anneal_test(): Normal end of execution. Wed Jul 22 10:14:23 2026