0% found this document useful (0 votes)
51 views4 pages

Simulated Annealing

Simulated annealing is an algorithm that mimics the physical process of annealing in solids. It begins with a random solution at a high "temperature" and iteratively moves to solutions with lower cost, accepting some moves that increase cost probabilistically. The temperature is slowly decreased until the system reaches equilibrium, ideally at the global minimum. The algorithm generates neighbor solutions, calculates the change in cost, and accepts worse solutions with probability that decreases over time based on the temperature. This allows escaping local optima to potentially find better solutions.

Uploaded by

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

Simulated Annealing

Simulated annealing is an algorithm that mimics the physical process of annealing in solids. It begins with a random solution at a high "temperature" and iteratively moves to solutions with lower cost, accepting some moves that increase cost probabilistically. The temperature is slowly decreased until the system reaches equilibrium, ideally at the global minimum. The algorithm generates neighbor solutions, calculates the change in cost, and accepts worse solutions with probability that decreases over time based on the temperature. This allows escaping local optima to potentially find better solutions.

Uploaded by

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

Simulated Annealing

1. Physical Analogy

• Physical Annealing refers to the process of finding low energy states of a solid by
initially melting the substance, and then lowing the temperature slowly, spending a long
time at temperatures closely to the freezing point.
• In a liquid, the particles are arranged randomly.
• The ground state of the solid corresponds to the minimum energy configuration, will have
a particular structure, such as seen in a crystal.
• If the cooling is not done slowly, the resulting solid will be frozen into a metastable,
locally optimal structure, such as a glass or a crystal with several defects in the structure.
• The different states of the substance correspond to different feasible solutions to the
combinatorial optimization problem.
• Ground state = global optimal solutions
• Metastable = local optimal; feasible solutions
• The energy of the system corresponds to the function to be minimized.
2. Hill Climbing Search Strategy
3. Difficulty in Searching Local Optima

4. Simulated Annealing Flowchart


5. Algorithm :

Select an objective function E(x);


Select an initial temperature T>0;
Set a cooling factor α=0.9;
Repeat
Generate state xnew, a neighbor of xold;
Calculate ∆E=E(xnew)-E(xold);
If ∆E<0 then xold=xnew; (*accept new solution)
else if random(0,1)<exp(-∆E/T) then xold=xnew; (*accept new solution even it is worse)
T=α.T;
Until stopping criterion true
6. Cooling mechanisms

7. Specifications
• The problem must be clearly formulated.
• The set of feasible solutions is defined.
• The neighborhood of any solution must be defined.
• A way of determining objective to be minimized.
• An initial solution must be generated.
• The cooling factor must be chosen carefully: fast cooling (0.5) leads to premature
convergence (metastable state). Slow cooling (0.99999) leads to long search.
8. Advantages
• SA is a general solution method that is easily applicable to a large number of problems.
• "Tuning" of the parameters (initial temperature, cooling factor, stop criterion) is relatively
easy.
9. Disadvantages
• Generally the quality of the results of SA is good, although it can take a lot of time.
• Results are generally not reproducible: another run can give a different result.
• SA can leave an optimal solution and not find it again (so try to remember the best
solution found so far)

You might also like