Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Simulated annealing

4,090 views

Published on

Published in: Technology
  • Be the first to comment

Simulated annealing

  1. 1. Simulated Annealing Netreba Kirill Theoretical electrical engineering department, SPbSPU
  2. 2. 30/01/15 2 Outline 1. Introduction 2. SA algorithm 3. Example 4. Tuning algorithm 5. Conclusion Нетреба Кирилл, СПбГПУ Simulated Annealing Netreba Kirill, SPbSPU
  3. 3. 30/01/15 3 Formal definition  Simulated annealing – is a technique of optimization based on the analogy between the way the metal cools and freezes in a minimum energy of the crystalline structure (the annealing process) and the search for a minimum in a more general system. Netreba Kirill, SPbSPU Simulated AnnealingIntroduction
  4. 4. 30/01/15 4 Natural motivation  Properties of structure depend on cooling factor after the substance was heated to melting point. Slow cooling – large crystals are formed, that is useful for a substance structure. Spasmodic cooling– the weak structure is formed.  «Agitation» at a heat is accompanied by high molecular activity in physical system. Disturbance Disturbance Netreba Kirill, SPbSPU Introduction Simulated Annealing
  5. 5. 30/01/15 5 SA algorithm  The initial solution  For the majority of problems the initial solution is casual.  Solution estimation  The solution estimation consists of decoding of the current solution and performance of the necessary act, allowing to fathom its expediency for the solution of the given problem.  Casual search of the solution  Solution search begins with copying of the current solution in the working solution which is any way inoculated further. Create the initial solution Evaluate the solution Change the solution in a random way Evaluate the new solution Criterion of the admission Reduce temperature The current solution The working solution The best solution Netreba Kirill, SPbSPU Simulated Annealing
  6. 6. 30/01/15 6  Criterion of the admission At this stage of algorithm two solutions are available. First - the current solution, second - the working solution. Certain energy (E) is connected with each solution and represents its efficiency. The working solution is accepted as the current solution if : In the beginning of search the temperature has the greatest value and ξ is close to 1. Therefore the sampling probability of the solution increasing value of energy is great. Taking of such solutions corresponds to movement to saddle point B, instead of to minimum A. As approaching a global minimum the temperature decreases and probability of increase in energy drops. Create the initial solution Evaluate the solution Change the solution in a random way Evaluate the new solution Criterion of the admission Reduce temperature The current solution The working solution The current solution ð ò /T E E E 0 0 & r, e ,r [0,1]−∆ ∆ = − ≤ ∆ > ξ > ξ = ∈ Netreba Kirill, SPbSPU SA algorithm Simulated Annealing
  7. 7. 30/01/15 7  Temperature decrease  After a number of iterations on algorithm at the given temperature we reduce it. There are a lot of alternatives of decrease in temperature. Simple function T=αT, 0<α<1 is usually used. Other strategy of decrease in temperature, including linear and nonlinear functions are also possible.  Iteration  Several iterations are carried out at one temperature. After iteration is finished temperature reduceed. The process continues until the temperature will not attain null.. Create the initial solution Evaluate the solution Change the solution in a random way Evaluate the new solution Criterion of the admission Reduce temperature The current solution The working solution The current solution Netreba Kirill, SPbSPU SA algorithm Simulated Annealing
  8. 8. 30/01/15 8  The N queens puzzle is the problem of placing N chess queens on an N×N chessboard so that none of them is able to capture any other using the standard chess queen's moves.: Netreba Kirill, SPbSPU One of 92 solutions of 8 queens puzzle Example Simulated Annealing
  9. 9. 30/01/15 9  Energy  Energy of the solution is defined as quantity of conflicts which appear in the coding. The problem consists in finding the coding at which energy is equal to null (that is on a board there are no conflicts).  Temperature  For the given problem solution search began with temperature 100° and gradually decreased it to null, using formula T=αT. Thus value α = 0,98. Apparently from the schedule the temperature shows at first sweeping decrease, and then a slow convergence to final temperature - to null.  At each change of temperature we will execute 100 iterations. It will allow algorithm to carry out some operations of search at each level. Netreba Kirill, SPbSPU Example of SA's realization for a problem with 40 queens 100 80 60 40 20 0 0 50 100 150 200 250 300 Accepted Energy Temperature Example Simulated Annealing
  10. 10. 30/01/15 10 Example of solution of 40 queens puzzle Netreba Kirill, SPbSPU Example Simulated Annealing
  11. 11. 30/01/15 11 Temperature  The initial temperature should be enough high to make possible sampling of other areas of a range of solutions. If the maximum distance between the next solutions is known it is easy to count initial temperature:  The initial temperature also can be changed dynamically. If the statistics on criterion of the admission of the worst solutions and a finding of new best solutions is set, it is possible to raise temperature until the necessary quantity of admission (opening of new solutions) will be attained. This process is analogous to heating of substance to its transition in the liquid form then already there is no sense to raise temperature.  Final temperature. Though the zero is convenient final temperature, geometrical function which is used in an instance, shows, that the algorithm will work much longer, than it is really necessary. Therefore the final temperature usually is accepted hardly more null (for example, 0.5) Netreba Kirill, SPbSPU /T e r (r [0,1], 0)−∆ ξ = > ∈ ∆ > Настройка алгоритмаSimulated Annealing
  12. 12. 30/01/15 12 Advantages of annealing  absence of restrictions of the form of the minimizing function;  search of a global minimum;  efficiency in a solving of the various classes of problems demanding optimization. Annealing deficiencies  the demand of infinitely slow cooling, in practice meaning slow work of algorithm;  complexity of tuning Netreba Kirill, SPbSPU Conclusion Simulated Annealing
  13. 13. 30/01/15 13 Ranges of application  way creation  image reconstruction  assignment routine and planning  network placement  global routing  detection and recognition of visual targets  design of special digital filters Netreba Kirill, SPbSPU Conclusion Simulated Annealing
  14. 14. 30/01/15 14Netreba Kirill, SPbSPU Thanks for your attention!

×