### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.9 Reference Guide (DRAFT) »
- Optimization and root finding (`scipy.optimize`) »

# scipy.optimize.anneal

`scipy.optimize.``anneal`(func, x0, args=(), schedule='fast', full_output=0, T0=None, Tf=9.9999999999999998e-13, maxeval=None, maxaccept=None, maxiter=400, boltzmann=1.0, learn_rate=0.5, feps=9.9999999999999995e-07, quench=1.0, m=1.0, n=1.0, lower=-100, upper=100, dwell=50)

  Minimize a function using simulated annealing.

  Schedule is a schedule class implementing the annealing schedule. Available ones are ‘fast’, ‘cauchy’, ‘boltzmann’

  Parameters : | func : callable f(x, *args) Function to be optimized. x0 : ndarray Initial guess. args : tuple Extra parameters to func. schedule : base_schedule Annealing schedule to use (a class). full_output : bool Whether to return optional outputs. T0 : float Initial Temperature (estimated as 1.2 times the largest cost-function deviation over random points in the range). Tf : float Final goal temperature. maxeval : int Maximum function evaluations. maxaccept : int Maximum changes to accept. maxiter : int Maximum cooling iterations. learn_rate : float Scale constant for adjusting guesses. boltzmann : float Boltzmann constant in acceptance test (increase for less stringent test at each temperature). feps : float Stopping relative error tolerance for the function value in last four coolings. quench, m, n : float Parameters to alter fast_sa schedule. lower, upper : float or ndarray Lower and upper bounds on x. dwell : int The number of times to search the space at each temperature.
  > Returns : | xmin : ndarray Point giving smallest value found. retval : int Flag indicating stopping condition:
  >     0 : Cooled to global optimum
  >     1 : Cooled to final temperature
  >     2 : Maximum function evaluations
  >     3 : Maximum cooling iterations reached
  >     4 : Maximum accepted query locations reached
  Jmin : float Minimum value of function found. T : float Final temperature. feval : int Number of function evaluations. iters : int Number of cooling iterations. accept : int Number of tests accepted.

### Navigation

- index
- modules |
- modules |
- next |
- previous |
- SciPy v0.9 Reference Guide (DRAFT) »
- Optimization and root finding (`scipy.optimize`) »