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

Post on 31-Dec-2015

22 views

Category:

## Documents

Embed Size (px)

DESCRIPTION

MAE 552 Heuristic Optimization Lecture 8 February 8, 2002. http://www.statslab.cam.ac.uk/~richard/tmp/mcp/java/ANNEAL/annealing.html. A. B. C. Start with a ball at point A. Shake it up and it might jump out of A and into B. - PowerPoint PPT Presentation

TRANSCRIPT

<ul><li><p>MAE 552 Heuristic OptimizationLecture 8February 8, 2002</p></li><li><p>http://www.statslab.cam.ac.uk/~richard/tmp/mcp/java/ANNEAL/annealing.html</p></li><li><p> 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. </p></li><li><p>The SA AlgorithmT0:m10, m20, m30, m40, mm0T1:m11, m21, m31, m41, mm1T2:m12, m22, m32, m42, mm2T3:m13, m23, m33, m43, mm3T4:m14, m24, m34, m44, mm4T5:m15, m25, m35, m45, mm5..Tn:m1n, m2n, m3n, m4n, mmnn=number of levels in cooling schedulem=number of transitions in each Markov chain</p></li><li><p>Simulated Annealing Parts of the SAThe 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, To, 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.</p></li><li><p>Simulated Annealing Parts of the SA4.A move set generator which generates candidate points.5.An acceptance criterion; which decides whether or not a new move is accepted.</p><p>4 and 5 together are called a transition mechanism which results in the transformation of a current state into a subsequent one.</p></li><li><p>Simulated Annealing Cooling ScheduleSA generates a series of points towards the optimum as it proceedsX0, X1, X2, X3.</p><p>With corresponding function valuesf(X0), f(X1), f(X2), f(X3).</p><p>Because of the stochastic nature of SA, the sequence of the fs is random and not monotonic.</p><p>However it does drift towards the optimum because of the gradual reduction in the control parameter. </p></li><li><p>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(Tk). X(Tk) = (# of Accepted Moves / # of Attempted Moves)</p><p>If T is large almost all moves are acceptedX(Tk)-&gt;1As T decreases:X(Tk)-&gt;1For maximum efficiency, it is important to set the proper value of To. Cooling Schedules</p></li><li><p>Simulated Annealing Cooling Schedule3 Parts in a cooling schedule:1.Choose the starting value of the control parameter, T0. It should be large enough to melt the objective function, to leap over all peaks. This is accomplished by ensuring that the initial X(T0) is close to 1.0 (most random moves are accepted).Start the SA Algorithm At some T0 and execute for some number of transitions and check X(T0). If not close to 1.0 multiply Tk by a factor greater than 1.0 and execute again. Repeat until X(T0) close to 1.0. </p></li><li><p>Simulated Annealing Cooling Schedule2. 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. </p><p>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.</p><p>A frequently used decrement function is:Tk+1=rTkk=0,1,2,........r= control parameter reduction coefficient. Generally this is a constant between.8 and .99.</p></li><li><p>Simulated Annealing Cooling Schedulert can also be set based on the problem size and characteristics.</p><p>SPEARS set r = 1/(Num_dvs*k)k = current step in the cooling schedule</p><p>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.</p></li><li><p>The SA AlgorithmT0:m10, m20, m30, m40, mm0T1:m11, m21, m31, m41, mm1T2:m12, m22, m32, m42, mm2T3:m13, m23, m33, m43, mm3T4:m14, m24, m34, m44, mm4T5:m15, m25, m35, m45, mm5n=number of levels in cooling schedulem=number of transitions in each Markov chainIncrease the number of transitions in each Markov ChainNumber of steps in the Cooling Schedule</p></li><li><p>Simulated Annealing Cooling ScheduleNo matter how sophisticated the decrement rule - important to reach a balance between rapid decrement of the control parameter and short length of Markov Chains.</p><p>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</p></li><li><p>Simulated Annealing Transition Mechanism</p><p>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</p></li><li><p>Simulated Annealing Move Set Generator</p><p>a move set generatorGenerates a random point X from the neighborhood of xc.Its move (step) generation depends on the data type and the corresponding value of the control parameter Tk. For high values of Tk, 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 Tk, 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. </p></li><li><p>Simulated Annealing Move Set GeneratorLarge Value of T, large neighborhood.</p><p>vcx1x2</p></li><li><p>Simulated Annealing Move Set GeneratorSmall Value of T, small neighborhood.</p><p>g1:x1x2</p></li><li><p>Simulated Annealing Move Set GeneratorGaussian Neighborhoodsg1:x1x2Choose a candidate from the neighborhood based on a gaussian distribution.</p></li><li><p>Simulated Annealing Move Set GeneratorDepending 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={010111100011}-&gt;X={110111100011}Two-flip neighborhood:X={010111100011}-&gt;X={100111100011}Less than one-flip neighborhood:X={01011{1100011}}-&gt;X={10011{1100011}}</p></li><li><p>Simulated Annealing Move Set GeneratorFor 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. Xc=[x1,x2,x3,x4]-&gt; Xn=[x1new,x2,x3,x4]Another approach is to change all design variables simultaneously.Xc=[x1,x2,x3,x4]-&gt; Xn=[x1new, x2new, x3new, x4new]</p></li><li><p>Exterior Penalty Function</p><p>Where rp generally starts small and is gradually increased to ensure feasibility. Interior Penalty Function</p><p>Here rp 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</p></li></ul>