altbacken.core.state

Classes

AnnealingState(iteration, temperature, ...)

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: Generic

Represents 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.

iteration

The current iteration number of the annealing process.

Type:

int

temperature

The current temperature in the annealing schedule.

Type:

float

current_solution

The solution being evaluated at the current step.

Type:

T

current_value

The evaluation value of the current solution.

Type:

float

best_solution

The best solution found so far.

Type:

T

best_value

The evaluation value of the best solution found so far.

Type:

float

improvement

A flag indicating whether the current solution is better than the best solution found so far.

Type:

bool

iteration: int
temperature: float
current_solution: T
current_value: float
best_solution: T
best_value: float
improvement: bool = False
classmethod initial(initial_solution: T, initial_value: float, temperature: float = 0.0) AnnealingState[T][source]
__init__(iteration: int, temperature: float, current_solution: T, current_value: float, best_solution: T, best_value: float, improvement: bool = False) None