Generic SA Algorithm for Minimization Problem
Obtain an initial solution S.
Acquire an initial temperature T = Tα > 0.
Do the following whereas not yet frozen.
Perform the following loop L times.
Select a random number S′ neighbor of S.
Assume Δ = F (S′) - F (S)
IF (Δ ≤ 0) (down hill move) set S = S′.
IF (Δ > 0) (uphill move), set S = S′ with probability exp (- Δ/Tα).
Set Tα = r × Tα (reduced temperature).
where F (S′) = fitness function value of S′.
F (S) = fitness function value of S