This code solves the Travelling Salesman Problem using simulated annealing in C++. For generating a new path , I swapped 2 cities randomly and then reversed all the cities between them. I did a random restart of the code 20 times. Annealing schedules tested : 1) Starting temperature 9000000000, cooling rate : 0.1 In this case very few paths were searched , and i could not get the optimal value of the path of even 7 city problem. 2) Starting temperature 999999999999999999, cooling rate : 0.5 With this I was able to solve upto 8 City problem optimally but nothing beyond that. 3)Starting temperature 99999999999999999999999999999999999999999.0, cooling rate : 0.9 With this configuration I was able to solve 10 City problem and upto 12 city almost optimally. The third schedule is the best among the rest as it has a slow cooling rate and higher temperature. I ran the 36 City Problem with 100 random restarts and configuration 3. The best path cost that the algorithm found was 1233. The plot below shows how the cost function changes during each random restart.