Presentation is loading. Please wait.

Presentation is loading. Please wait.

MAE 552 – Heuristic Optimization Lecture 8 February 8, 2002.

Similar presentations


Presentation on theme: "MAE 552 – Heuristic Optimization Lecture 8 February 8, 2002."— Presentation transcript:

1 MAE 552 – Heuristic Optimization Lecture 8 February 8, 2002

2 http://www.statslab.cam.ac.uk/~richard/tmp/mcp/java/ANNEAL/ annealing.html

3 A B C Start with a ball at point A. Shake it up and it might jump out of A and into B. Give it another shake (adding energy) and it might go to C. This is the general idea behind SAs.

4 The SA Algorithm T 0 :m 10, m 20, m 30, m 40, …………………………………m m0 T 1 :m 11, m 21, m 31, m 41, …………………………………m m1 T 2 :m 12, m 22, m 32, m 42, …………………………………m m2 T 3 :m 13, m 23, m 33, m 43, …………………………………m m3 T 4 :m 14, m 24, m 34, m 44, …………………………………m m4 T 5 :m 15, m 25, m 35, m 45, …………………………………m m5 ….. T n :m 1n, m 2n, m 3n, m 4n, …………………………………m mn n=number of levels in cooling schedule m=number of transitions in each Markov chain

5 Simulated Annealing – Parts of the SA The following musty be specified in implementing SA: 1.An unambiguous description for the objective function f (analogous to energy) and possible constraints. 2.A clear representation of the design vector (analogous to the configuration of a solid) over which an optimum is sought. 3.A ‘cooling schedule’ – this includes the starting value of the control parameter, T o, and rules to determine when the current value of the control parameter should be reduced and by how much (‘the decrement rule’) and a stopping criterion to determine when the optimization process should be terminated.

6 Simulated Annealing – Parts of the SA 4.A ‘move set generator’ which generates candidate points. 5.An ‘acceptance criterion; which decides whether or not a new move is accepted. 4 and 5 together are called a ‘transition mechanism’ which results in the transformation of a current state into a subsequent one.

7 Simulated Annealing – Cooling Schedule SA generates a series of points towards the optimum as it proceeds X 0, X 1, X 2, X 3 ………. With corresponding function values f(X 0 ), f(X 1 ), f(X 2 ), f(X 3 )……. Because of the stochastic nature of SA, the sequence of the f’s is random and not monotonic. However it does drift towards the optimum because of the gradual reduction in the control parameter.

8 A cooling schedule is used to achieve convergence to a global optimum in function optimization. Cooling schedule describes how control parameter T changes during optimization process. First let us look at the concept of acceptance ratio, X(T k ). X(T k ) = (# of Accepted Moves / # of Attempted Moves) If T is large almost all moves are accepted –X(T k )->1 As T decreases: –X(T k )->1 For maximum efficiency, it is important to set the proper value of T o. Cooling Schedules

9 Simulated Annealing – Cooling Schedule 3 Parts in a cooling schedule: 1.Choose the starting value of the control parameter, T 0. It should be large enough to melt the objective function, to leap over all peaks. This is accomplished by ensuring that the initial X(T 0 ) is close to 1.0 (most random moves are accepted). 2.Start the SA Algorithm At some T 0 and execute for some number of transitions and check X(T 0 ). If not close to 1.0 multiply T k by a factor greater than 1.0 and execute again. Repeat until X(T 0 ) close to 1.0.

10 Simulated Annealing – Cooling Schedule 2. The decrement rule. Two parts to this - the time when the control parameter reduction should occur and the rate by which it should be reduced. If using fixed length Markov Chains of fixed length, that is once the total number of attempted moves at each value of the control parameter (i.e. inner loop) reaches a predetermined value, it is time to reduce the control parameter. A frequently used decrement function is: T k+1 =rT k k=0,1,2,........ r= control parameter reduction coefficient. Generally this is a constant between.8 and.99.

11 Simulated Annealing – Cooling Schedule r t can also be set based on the problem size and characteristics. SPEARS set r = 1/(Num_dvs*k) k = current step in the cooling schedule All settings of Simulated Annealing will entail a tradeoff between searching thoroughly at a particular level of T and the number of steps in the cooling schedule.

12 The SA Algorithm T 0 :m 10, m 20, m 30, m 40, …………………………………m m0 T 1 :m 11, m 21, m 31, m 41, …………………………………m m1 T 2 :m 12, m 22, m 32, m 42, …………………………………m m2 T 3 :m 13, m 23, m 33, m 43, …………………………………m m3 T 4 :m 14, m 24, m 34, m 44, …………………………………m m4 T 5 :m 15, m 25, m 35, m 45, …………………………………m m5 n=number of levels in cooling schedule m=number of transitions in each Markov chain Increase the number of transitions in each Markov Chain Number of steps in the Cooling Schedule

13 Simulated Annealing – Cooling Schedule No matter how sophisticated the decrement rule - important to reach a balance between rapid decrement of the control parameter and short length of Markov Chains. 3.Stopping criterion. Rule of thumb : if the improvement in objective function after a period of execution remains fairly constant then stop the algorithm. If the last configuration of several consecutive inner loops have been very close to each other then it is time to stop

14 Simulated Annealing – Transition Mechanism A transition mechanism transforms a current state into a subsequent one. It consists of two parts: –(a) move set generator and –(b) an acceptance criterion

15 Simulated Annealing – Move Set Generator (a)a move set generator –Generates a random point X’ from the neighborhood of x c. –Its move (step) generation depends on the data type and the corresponding value of the control parameter T k. –For high values of T k, almost all attempted moves are accepted and it is inefficient to use a small neighborhood because it will cause slow progress of the algorithm. –On the contrary, for small values of T k, more attempted moves are rejected if a neighborhood is used. –The size of the move should decrease as the control parameter is reduced. This improves computational efficiency.

16 Simulated Annealing – Move Set Generator Large Value of T, large neighborhood. vcvc x1x1 x2x2

17 Simulated Annealing – Move Set Generator Small Value of T, small neighborhood. g 1: x1x1 x2x2

18 Simulated Annealing – Move Set Generator Gaussian Neighborhoods g 1: x1x1 x2x2 Choose a candidate from the neighborhood based on a gaussian distribution.

19 Simulated Annealing – Move Set Generator Depending on the type of representation controlling the size of the neighborhood is going to entail different things. For the SAT problem the representation is a string on binary numbers {TRUE, FALSE} A one-flip neighborhood is defined as all of the points that could be arrived at by flipping one of the bits. X={0 10111100011 }->X={1 10111100011 } Two-flip neighborhood: X={01 0111100011 }->X={10 0111100011 } Less than one-flip neighborhood: X={ 01011{ 1100011 } }->X={ 10011{ 1100011 } }

20 Simulated Annealing – Move Set Generator For the NLP there are an infinite choice of move directions and magnitudes. One approach is to generate a random move each time along a single design variable keeping all others constant. X c =[x 1,x 2,x 3,x 4 ]-> X n =[x 1new,x 2,x 3,x 4 ] Another approach is to change all design variables simultaneously. X c =[x 1,x 2,x 3,x 4 ]-> X n =[x 1new, x 2new, x 3new, x 4new ]

21 Exterior Penalty Function Where r p generally starts small and is gradually increased to ensure feasibility. Interior Penalty Function Here r p for the second term is the same as before but for the first terms it starts large and is gradually decreased. Simulated Annealing - Constraint Handling


Download ppt "MAE 552 – Heuristic Optimization Lecture 8 February 8, 2002."

Similar presentations


Ads by Google