Download presentation
Presentation is loading. Please wait.
Published byRoger Dalton Modified over 8 years ago
1
1 Simulated Annealing Contents 1. Basic Concepts 2. Algorithm 3. Practical considerations
2
2 Basic Concepts U is a random number from (0, 1) interval t is a cooling parameter: t is initially high - many moves are accepted t is decreasing - inferior moves are nearly always rejected * Allows moves to inferior solutions in order not to get stuck in a poor local optimum. c = F(S new ) - F(S old ) F has to be minimised c > 0 inferior solution - c < 0 t As the temperature decreases, the probability of accepting worse moves decreases. inferior solution ( c > 0) still accepted if
3
3 Algorithm Step 1. k=1 Select an initial schedule S 1 using some heuristic and set S best = S 1 Select an initial temperature t 0 > 0 Select a temperature reduction function (t) Step 2. Select S c N(S k ) If F(S best ) < F(S c ) If F(S c ) < F(S k ) then S k+1 = S c else generate a random uniform number U k If U k < then S k+1 = S c else S k+1 = S k else S best = S c S k+1 = S c
4
4 Step 3. t k = (t) k = k+1 ; If stopping condition = true then STOP else go to Step 2
5
5 Exercise. Consider the following scheduling problem for minimizing the total Weighted tardiness (tardiness is amount a job exceeds deadline). Apply the simulated annealing to the problem starting out with the 3, 1, 4, 2 as an initial sequence. Neighbourhood: all schedules that can be obtained through adjacent pairwise interchanges. Select neighbours within the neigbourhood at random. Choose (t) = 0.9 * t t 0 = 0.9 Use the following numbers as random numbers: 0.17, 0.91,...
6
6 S best = S 1 = 3, 1, 4, 2 F(S 1 ) = w j T j = 1·7 + 14·11 + 12·0+ 12 ·25 = 461 = F(S best ) t 0 = 0.9 S c = 1, 3, 4, 2 F(S c ) = 316 < F(S best ) S best = 1, 3, 4, 2 F(S best ) = 316 S 2 = 1, 3, 4, 2 t = 0.9 · 0.9 = 0.81 S c = 1, 3, 2, 4 F(S c ) = 340 > F(S best ) U 1 = 0.17 > = 1.35*10 -13 S 3 = 1, 3, 4, 2 t = 0.729
7
7 S c = 1, 4, 3, 2 F(S c ) = 319 > F(S best ) U 3 = 0.91 > = 0.016 S 4 = S 4 = 1, 3, 4, 2 t = 0.6561...
8
8 Practical considerations Initial temperature must be "high" acceptance rate: 40%-60% seems to give good results in many situations Cooling schedule a number of moves at each temperature one move at each temperature t = ·t is typically in the interval [0.9, 0.99] is typically close to 0 Stopping condition given number of iterations no improvement has been obtained for a given number of iteration
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.