pybop.optimisers._simulated_annealing#
Classes#
Simulated Annealing optimiser, implementing the classic temperature-based |
Module Contents#
- class pybop.optimisers._simulated_annealing.SimulatedAnnealingImpl(x0: numpy.ndarray, sigma0: list[float] | None, boundaries: pints.Boundaries | None)[source]#
Bases:
pints.OptimiserSimulated Annealing optimiser, implementing the classic temperature-based probabilistic optimisation method.
This method uses a temperature schedule to control the probability of accepting worse solutions as it explores the parameter space. As the temperature decreases, the algorithm becomes more selective, eventually converging to a local or global optimum.
The probability of accepting a worse solution is given by:
.. math::
P(accept) = exp(-(f_{ ext{new}} - fold)/T)
The temperature decreases according to the cooling schedule:
.. math::
T = T0 * lpha^k
where: - :math: T0 is the initial temperature - :math: lpha is the cooling rate (between 0 and 1) - :math: k is the iteration number
- Parameters:
x0 (numpy array) – Initial position
sigma0 (float) – Initial step size
boundaries (dict, optional) – Optional boundaries for parameters
- tell(reply)[source]#
Receives a list of function values from the cost function from points previously specified by self.ask(), and updates the optimiser state accordingly.
- _current#
- _current_f#
- _f_best#
- _iterations = 0#
- _proposed#
- _ready_for_tell = False#
- _running = False#
- _temperature = 1.0#
- _temperature_decay = 0.95#
- _x_best#
- property cooling_rate#
- property temperature#