Simulatedannealing Ranak Ghosh Sep 2010

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Simulated Annealing

● Presented By:
Ranak Ghosh
Septembar,2010
For more contact-
08013835148
CONTENT
●Motivation
●The algorithm
●Its applications
●Examples
●Conclusion
Introduction
●Various algorithms proposed for
placement in circuits.
●Constructive placement vs Iterative
improvement.
●Simulated Annealing – an iterative
improvement algorithm.
Motivation
●Annealing in metals
●Heat the solid state metal to a high
temperature
●Cool it down very slowly according to a
specific schedule.
●If the heating temperature is sufficiently high
to ensure random state and the cooling
process is slow enough to ensure thermal
equilibrium, then the atoms will place
themselves in a pattern that corresponds to
Motivation
● The connection between this algorithm and
mathematical minimization was first noted by
Pincus.
● He proposed that it forms the basis of an
optimization technique for combinatorial (and other)
problems.
● SA's major advantage over other methods is an
ability to avoid becoming trapped at local minima.
● The algorithm employs a random search which not
only accepts changes that decrease objective
function f, but also some changes that increase it.
● The latter is accepted with a probability P=exp(-
df/T), where df is the increase in f and T is a
Simulated Annealing-The
Algorithm
●Analogy

Cntnd
.
Analogy
● Slowly cool down a heated solid, so that all particles
arrange in the ground energy state
● At each temperature wait until the solid reaches its
thermal equilibrium
● Probability of being in a state with energy E :

Pr { E = E } = 1/Z(T) . exp (-E / kB.T)

E Energy
T Temperature
kB Boltzmann constant
Z(T) Normalization factor (temperature dependant)
PROCEDURE OF
SIMULATED ANNEALING
Cooling schedule
Convergence of simulated
annealing
Ball on terrain example – Simulated Annealing
vs Greedy Algorithms

● The ball is initially placed at a random position on the


terrain. From the current position, the ball should be
fired such that it can only move one step left or
right.What algorithm should we follow for the ball to
finally settle at the lowest point on the terrain?
Ball on terrain example – SA vs Greedy
Algorithms
Example: Travel Salesperson Problem (TSP)

How to transverse n cities once and only


once with a minimal total distance?
Traveling Salesperson Problem (TSP)

● TSP is famous discrete optimization problem


● Many successful uses of SAN with TSP
● Basic problem is to find best way for salesperson to hit
every city in territory once and only once
o Setting arises in many problems of optimization on
networks (communications, transportation, etc.)
● If tour involves n cities, there are (n–1) ! /2 possible
solutions
o Extremely rapid growth in solution space as n
increases
o Problem is “NP hard”
● Perturbations in SAN steps based on three operations on
network: inversion, translation, and switching
TSP
●Move sets for TSP
Inversion reverses order 6-7-8-9; translation removes section 6-7-8-9 and
places 8-7 in place of 5-9; switching interchanges order of 3 and 11.
12 12
10 10
3 3
1 6 Inversio 1 6 Translatio
2 7 n 2 7 n
11 8 9 11 8 9

4 5 4 5

1-2-3-4-5-6-7-8-9-10-11-12 1-2-3-4-5-9-8-7-6-10-11-12
12 12
10 10
3 3
1 Switching 1
6 6

2 7 2 7
11 9 11 9
8 8
4 5 4 5
9/8/2010
1-2-11-4-8-7-5-9-6-10-3-12 1-2-3-4-8-7-5-9-6-10-11-12
Small-Scale TSP

● 10-city tour (very small by industrial standards)


o Know by enumeration that minimum cost of tour =
440
● Randomly chose inversion, translation, or switching
at each iteration
o Tuning required to choose “good” probabilities of
selecting these operators
● 8 of 10 SA runs find minimum cost tour
o Sample mean cost of initial tour is 700; sample
mean of final tour is 444
● Essential to success is adequate use of inversion
operator; 0 of 10 SA runs find optimal tour if
probability of inversion is 0.50
● SA successfully used in much larger TSPs
Simulated Annealing for TSP-
ANALOGY
● Initial configuration: permutation =>1, 2, 3, 4, …, N
temperature T = 2
cooling rate α = 0.99
energy = d(1,2)+d(2,3)+…+d(N,1)
● Generate a new configuration from the current one
at random
● Evaluate ΔE = current energy – previous energy
● If ΔE < 0 accept the current configuration (downhill)
Else accept configuration with probability :
P=exp (-∆E / kB.T)
● T= αT
● Stopping criteria if energy < threshold or number of
Case Study: 20-city problem
Applications
●Circuit partitioning and placement.
●Strategy scheduling for capital
products with complex product
structure.
●Umpire scheduling in US Open Tennis
tournament!
●Event-based learning situations.
Jigsaw puzzles – Intuitive usage of Simulated
Annealing
●Given a jigsaw puzzle
such that one has to
obtain the final shape
using all pieces together.
●Starting with a random
configuration, the human
brain unconditionally
chooses certain moves
that tend to the solution.
●However, certain moves
that may or may not lead
to the solution are
accepted or rejected with
a certain small probability.
●The final shape is
obtained as a result of a
Performance
● SA is a general solution method that is easily
applicable to a large number of problems
● "Tuning" of the parameters (initial T, decrement of T,
stop criterion) is relatively easy
● 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)
● Proven to find the optimum under certain conditions;
Thank You!

You might also like