0% found this document useful (0 votes)
532 views14 pages

Simulated Annealing (SA) : Metaheuristics

Simulated annealing is a metaheuristic algorithm inspired by the physical annealing process. It is mainly used to solve discrete optimization problems. The algorithm simulates the cooling of materials by slowly decreasing the temperature and evaluating the solutions at each temperature step according to the Metropolis criterion to determine whether changing to a worse solution. The best solution found is then output.

Uploaded by

Achmad P. Rifai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
532 views14 pages

Simulated Annealing (SA) : Metaheuristics

Simulated annealing is a metaheuristic algorithm inspired by the physical annealing process. It is mainly used to solve discrete optimization problems. The algorithm simulates the cooling of materials by slowly decreasing the temperature and evaluating the solutions at each temperature step according to the Metropolis criterion to determine whether changing to a worse solution. The best solution found is then output.

Uploaded by

Achmad P. Rifai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Simulated Annealing

(SA)

METAHEURISTICS
Achmad P. Rifai
Evolutionary algorithms Physics-based Swarm Based Other algorithms
algorithms algorithms
Genetic Algorithms (GA) Simulated Annealing Particle Swarm Variable Neighborhood
(Holland 1992) (SA) (Kirkpatrick et al. Optimization (PSO) Search (VNS)
1983; Cerný 1985) (Kennedy and Eberhart (Mladenovic and Hansen,
1995) 1997)
Evolution Strategy (ES) Gravitational Search Ant Colony Optimization Large Neighborhood
(Rechenberg, 1978) Algorithm (GSA) (ACO) (Dorigo and Search (LNS) (Pisinger
(Rashedi et al. 2009) Stützle, 2004) and Ropke, 2010)

Genetic Programming Charged System Search Grey Wolf Optimizer Stochastic Fractal Search
(GP) (Koza 1992) (CSS) (Kaveh and (GWO) (Mirjalili et al. (SFS) (Salimi 2015)
Talatahari 2010) 2014)

Biogeography Based Central Force Dragonfly Algorithm Sine Cosine Algorithm


Optimizer (BBO) (Simon Optimization (CFO) (DA) (Mirjalili 2016) (SCA) (Mirjalili2016)
2008) (Formato 2007)

.…. and many more methods


Type of optimization problem

Discrete SA, VNS, LNS GA, BBO, ACO

PSO, GWO, SCA,


Continuous SA, ILS, VNS ABC (artificial bee
colony)

Trajectory Population

Type of metaheuristics
Simulated Annealing (SA)
• Simulated annealing is named because of its analogy to the process of
physical annealing with solids, in which a crystalline solid is heated and
then allowed to cool very slowly until it achieves its most regular possible
crystal lattice configuration (i.e., its minimum lattice energy state), and
thus is free of crystal defects.
• Mainly used to solve discrete problem.
Pseudocode of LNS
1 Input:  =initial
2 Generate an initial solution temperature
3 Calculate the fitness values of the solution = final
4 Initialize current temperature temperature
5 While = cooling rate
6 Perform solution modification
7 Calculate the fitness
8 Compute
9 Metropolis criterion for acceptance
10 Adjust current temperature
11 End while
12 Output: and

Best solution (solution with


minimum/maximum objectives value) Minimum objective value
Example 3
• Travelling salesman problem (TSP) with node = 8

4 1
5
depot
6
2

8 3
Example 3
1. Set the parameters
 

= 10 4 1
= 0.1 5
depot
= 0.99 6
2

2. Create an initial solution 7

All nodes are only visited


once 8 3

7 4 5 1 6 3 2 8
Example 3

3. Calculate the fitness


 

The total time needed by the vehicle to visit all nodes, counted
from the depot until returning to the depot again
4. Initialize current temperature
5. Set iteration procedure
6. Perform solution modification using local searches
Example 3
6. Perform solution modification using local searches
 

Generate a random variable


If
Swap operation
Randomly select 2 nodes, and swap its sequence order
7 4 5 1 6 3 2 8 7 4 3 1 6 5 2 8
Elseif
Insert operation
Elseif
Reverse operation
End
Example 3
 
If
Swap operation
Elseif
Insert operation
Randomly select 2 nodes, the 1st selected node is then placed just
before the 2nd node
7 4 5 1 6 3 2 8 7 4 1 6 5 3 2 8
Elseif
Reverse operation
End
Example 3
 
If
Swap operation
Elseif
Insert operation
Elseif
Reverse operation
Randomly select 2 nodes, reverse the value of all nodes in between
those 2 nodes
7 4 5 1 6 3 2 8 7 4 3 6 1 5 2 8
End
Example 3
7. Calculate the fitness values of the solution
 

8. Calculate
9. Perform metropolis criterion for solution acceptance
If

Else

If

Else
Example 3

10. Adjust current temperature


 

11. Repeat the iteration until the stopping criteria is met


End iteration when
12. Record the best solution, and the minimum objective
References

• Gendreau, M., & Potvin, J. Y. (2010). Handbook of


metaheuristics. Springer, Boston, MA.
• Martí, R., Pardalos, P. M., & Resende, M. G. (2018).
Handbook of heuristics. Springer International Publishing.

You might also like