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’


func – Function to be optimized x0 – Parameters to be optimized over args – Extra parameters to function schedule – Annealing schedule to use (a class) full_output – Return optional outputs T0 – Initial Temperature (estimated as 1.2 times the largest

cost-function deviation over random points in the range)

Tf – Final goal temperature maxeval – Maximum function evaluations maxaccept – Maximum changes to accept maxiter – Maximum cooling iterations learn_rate – scale constant for adjusting guesses boltzmann – Boltzmann constant in acceptance test

(increase for less stringent test at each temperature).
feps – Stopping relative error tolerance for the function value in
last four coolings.

quench, m, n – Parameters to alter fast_sa schedule lower, upper – lower and upper bounds on x0 (scalar or array). dwell – The number of times to search the space at each temperature.

Outputs: (xmin, {Jmin, T, feval, iters, accept,} retval)

xmin – Point giving smallest value found retval – 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 – Minimum value of function found T – final temperature feval – Number of function evaluations iters – Number of cooling iterations accept – Number of tests accepted.

See also:

fmin, fmin_powell, fmin_cg,
fmin_bfgs, fmin_ncg – multivariate local optimizers

leastsq – nonlinear least squares minimizer

fmin_l_bfgs_b, fmin_tnc,
fmin_cobyla – constrained multivariate optimizers

anneal, brute – global optimizers

fminbound, brent, golden, bracket – local scalar minimizers

fsolve – n-dimenstional root-finding

brentq, brenth, ridder, bisect, newton – one-dimensional root-finding

fixed_point – scalar fixed-point finder

Previous topic


Next topic


This Page

Quick search