Stop conditions =============== Stop conditions are essential components of the simulated annealing algorithm that determine when the optimization process should terminate. Without a properly defined stop condition, the simulation might run indefinitely or terminate prematurely before finding a satisfactory solution. In this framework, a stop condition is implemented as a callable (function or object) that monitors the progress of the annealing process. It receives the current :class:`~altbacken.core.state.AnnealingState` as an argument and returns a boolean value: * **True**: The simulation should end immediately. * **False**: The simulation should continue to the next iteration. The :class:`~altbacken.core.state.AnnealingState` provides rich information for decision-making, including the current iteration count, current temperature, and details about the best solution found so far. This allows for various strategies, such as stopping after a certain number of iterations, when a specific fitness threshold is reached, or when the temperature drops below a certain level. .. include:: solution.rst .. include:: time.rst .. include:: temperature.rst .. include:: special.rst