Input: Distance matrix D, Initial temperature T 0 , Cooling rate γ , Maximum iteration Maxit

Output: Best Solution

1: Generate n feasible routes randomly, X = { x 1 , x 2 , ⋯ , x n } , compute the Euclidean distance/fitness value of each route, f ( X ) = { f ( x 1 ) , f ( x 2 ) , ⋯ , f ( x n ) } , assign the value of Maxit and the initial value of T 0 and γ

2: For each iteration, it = 1 to maximum iteration

3: For each route x i , i = 1 to n

4: Generate a new route x ′ i by adopting neighborhood structure (described in Section 3.2.1)

5: Compute Euclidean distance/fitness value of the new route f ( x ′ i )

6: Calculate Δ f on the basis of Equation (11)

7: If Δ f ≤ 0 , then update the current route x i by assigning x i ← x ′ i

8: If Δ f ≻ 0 , then compute the acceptance probability p by using Equation (10). If p ≥ u , then update the current route x i by assigning x i ← x ′ i , where u is the random number between 0 and 1

9: End for

10: Decrease the temperature based on Equation (12)

11: Update the best solution ever found

12: End for