| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Genetic Algorithm and Direct Search Toolbox |
| Contents | Index |
| Learn more about Genetic Algorithm and Direct Search Toolbox |
| On this page… |
|---|
The following is an outline of the steps performed for the simulated annealing algorithm:
The algorithm begins by randomly generating a new point. The distance of the new point from the current point, or the extent of the search, is determined by a probability distribution with a scale proportional to the current temperature.
The algorithm determines whether the new point is better or worse than the current point. If the new point is better than the current point, it becomes the next point. If the new point is worse than the current point, the algorithm may still make it the next point. The algorithm accepts a worse point based on an acceptance probability.
The algorithm systematically lowers the temperature, storing the best point found so far.
Reannealing is performed after a certain number of points (ReannealInterval) are accepted by the solver. Reannealing raises the temperature in each dimension, depending on sensitivity information. The search is resumed with the new temperature values.
The algorithm stops when the average change in the objective function is very small, or when any other stopping criteria are met. See Stopping Conditions for the Algorithm.
The simulated annealing algorithm uses the following conditions to determine when to stop:
TolFun — The algorithm runs until the average change in value of the objective function in StallIterLim iterations is less than TolFun. The default value is 1e-6.
MaxIter — The algorithm stops if the number of iterations exceeds this maximum number of iterations. You can specify the maximum number of iterations as a positive integer or Inf. Inf is the default.
MaxFunEval specifies the maximum number of evaluations of the objective function. The algorithm stops if the number of function evaluations exceeds the maximum number of function evaluations. The default maximum is 3000*numberofvariables.
TimeLimit specifies the maximum time in seconds the algorithm runs before stopping.
ObjectiveLimit — The algorithm stops if the best objective function value is less than or equal to the value of ObjectiveLimit.
![]() | Some Simulated Annealing Terminology | Examples | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |