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 delta100.075.056.342.231.623.717.813.310.0 01.00 50.950.940.910.890.850.810.760.690.61 100.900.880.840.790.730.660.570.470.37 150.860.820.770.700.620.530.430.330.22 200.820.770.700.620.530.430.330.220.14 250.780.720.640.550.450.350.250.150.08 300.740.670.590.490.390.280.190.110.05 350.700.630.540.440.330.230.140.070.03 400.670.590.490.390.280.190.110.050.02 450.640.550.450.340.240.150.080.030.01 500.610.510.410.310.210.120.060.020.01 550.580.480.380.270.180.100.050.020.00 600.550.450.340.240.150.080.030.010.00 650.520.420.310.210.130.060.030.010.00 700.500.390.290.190.110.050.020.010.00 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 > 0. 3. While not yet frozen do the following: 3.1 Perform the following loop l time. 3.1.1 Pick a random neighbor S’ of S. 3.1.2 Let = cost(S’) – cost(S) 3.1.3 If <= 0 (downhill move), Set S = S’. 3.1.4 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