Download presentation

Presentation is loading. Please wait.

Published byHector Tuthill Modified about 1 year ago

1
Simulated Annealing General Idea: 1) Start with an initial solution 2) Generate a neighboring solution. -If the neighbor is better, move to it. -If the neighbor is not better move to it with some probability, else stay put. 3) Repeat step 2 for n iterations, however continually reduce the probability of moving to a poorer neighbor over time. The continuous reduction in the probability of moving to a poorer neighbor over time effectively reduces the annealing process to a local improvement in the end.

2
Simulated Annealing Issue 1: What to use as the initial solution x? Options: a) Heuristic b) Randomly generated Issue 2: What defines a neighbor or neighborhood? Same as local improvement. Issue 3: Search strategy. Randomly generate a neighbor or simple programmatic approach.

3
Simulated Annealing Issue 4: Evaluation Function – How do you know the adjacent (or neighboring) solution is better or not? Speed – need efficient mechanism to evaluate solutions.

4
Simulated Annealing Issue 5: Probability Function - What probability function to use for determining whether to move to a poorer solution or not? Let V be the value of the current solution and V’ the value of the neighboring solution. Then Johnson et al proposed using the following: for minimization problem, let = V’ – V if <= 0, then downhill move, so take it. if > 0, then uphill move, move with probability e - /T, where T is some value referred to as the temperature.

5
"e (-d/T) Temp delta Simulated Annealing

6
Issue 6: Cooling Function – How to reduce the temperature as the annealing process runs. After n iterations, set T =rT, where r < 1. r is typically set somewhere between.95 and.8

7
Simulated Annealing The classic Johnson, et al. simulated annealing algorithm: 1. Get an initial solution S. 2. Get an initial temperature T > While not yet frozen do the following: 3.1 Perform the following loop l time Pick a random neighbor S’ of S Let = cost(S’) – cost(S) If <= 0 (downhill move), Set S = S’ If > 0 (uphill move), Set S = S’ with probability e - /T. 3.2 Set T = rT (reduce temperature). 4. Return S.

8
Simulated Annealing Issue 7: What should the initial temperature T be? Large enough to make some uphill moves. This becomes problem instance specific. Could be found programmatically by finding comparing the value of S to the value of several neighboring solutions and then ensuring that: where X is some value say 0.8 or 0.9

9
Simulated Annealing Issue 8: How do you perform the probability test to see if an uphill move is to be made? Generate a random number R between 0 and 1. If, then set S = S, move uphill. else, do not move. Sample C++ code: x = (rand( )%1000)/1000.0; if(x BestLmax)/Temp)) { Accepted++; newjoblist = true; } else { rev_seq_switch(Mach_1,Seq_1,CenterList,offset,n); NotAccepted++; }

10
Simulated Annealing Issue 9: How do you know if the process if frozen? Rules of thumb – - If loop 3 completes 3 times without any move being accepted (uphill or downhill). - No move being accepted after M iterations. -Minimum temperature reached. Issue 10: How many iterations per temperature, or what is the value of l? Use experimentation to determine good value. Possible numbers are 50,000 or 100,000, or 200,000, etc…

11
Simulated Annealing Extensions to Johnson et al. algorithm – A)Alternately heat up and cool down the process. B)Use a re-centering approach. For example when the process has become frozen, replace the current solution with the best solution found so far, S = S*, then restart the annealing process by setting the T back to the original temperature. C)Use a different probability function. D)Vary the number of iterations l as a function of temperature T. E)Others?

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google