altbacken.core.state
Classes
|
Represents the state of the simulated annealing process. |
- class altbacken.core.state.AnnealingState(iteration: int, temperature: float, current_solution: T, current_value: float, best_solution: T, best_value: float, improvement: bool = False)[source]
Bases:
GenericRepresents the state of the simulated annealing process.
This class contains information about the current state of the process, including details about the iteration, temperature, and solutions (both current and best). It is designed to encapsulate and track the progress of the annealing algorithm, allowing for monitoring and analysis.
- current_solution
The solution being evaluated at the current step.
- Type:
T
- best_solution
The best solution found so far.
- Type:
T
- improvement
A flag indicating whether the current solution is better than the best solution found so far.
- Type:
- current_solution: T
- best_solution: T
- classmethod initial(initial_solution: T, initial_value: float, temperature: float = 0.0) AnnealingState[T][source]