Annealing is the process of heating and cooling a metal to change its internal structure for modifying its physical properties. When the metal cools, its new structure is seized, and the metal retains its newly obtained properties. In simulated annealing process, the temperature is kept variable.

We initially set the temperature high and then allow it to ‘cool’ slowly as the algorithm proceeds. When the temperature is high, the algorithm is allowed to accept worse solutions with high frequency.

Start
5. Initialize k = 0; L = integer number of variables;

6. From i -> j, search the performance difference ∆.

7. If ∆ <= 0 then accept else if exp(-/T(k)) > random(0,1) then accept;

8. Repeat steps 1 and 2 for L(k) steps.

9. k = k + 1;
Repeat steps 1 through 4 till the criteria is met.
End