simulated_annealing module
Define the simulated annealing algorithm.
- class SimulatedAnnealing(*, compensating_elements, objective_factory, design_space, compute_beam_propagation, cavity_settings_factory, reference_simulation_output, optimisation_algorithm_kwargs=None, history_kwargs=None, **kwargs)[source]
Bases:
OptimisationAlgorithmSimulated Annealing method for global optimization.
- Parameters:
compensating_elements (
Collection[FieldMap])objective_factory (
ObjectiveFactory)design_space (
DesignSpace)compute_beam_propagation (
Callable[[Mapping[FieldMap,CavitySettings]],SimulationOutput])cavity_settings_factory (
CavitySettingsFactory)reference_simulation_output (
SimulationOutput)optimisation_algorithm_kwargs (
dict[str,Any] |None, default:None)
- optimize()[source]
Set up and run the simulated annealing algorithm.
- Return type:
- Returns:
Contains solution(s), objective value(s), status, etc.
- _generate_opti_sol(result)[source]
Package the results into an OptiSol dictionary.
- Parameters:
result (
OptimizeResult)- Return type:
- _abc_impl = <_abc._abc_data object at 0x7318f8d5f5c0>