Research Article
A Hybrid Cellular Genetic Algorithm for the Traveling Salesman Problem
Algorithm 4
The pseudocode of simulated annealing (SA) algorithm for solving TSP.
| | Simulated annealing (SA) algorithm for solving TSP | | | Begin | | | Input: city coordinates: , . Initial temperature T0, Markov chain length L, cooling rate R, and termination temperature Tt | | | Initialization: using ordinal coding to generate the initial solution S, current temperature T = T0 | | | while T ≤ Tt | | | for i = 1 to L | | | Generate a neighbor solution S1 | | | Metropolis criterion | | | End for | | | Save the optimal solution in the iteration | | | T = TR | | | End while | | | Output: | | | End |
|