downhill_simplex module

Define the Downhill simplex (or Nelder-Mead) algorihm.

class DownhillSimplex(*, compensating_elements, elts, objectives, variables, compute_beam_propagation, compute_residuals, cavity_settings_factory, reference_simulation_output, constraints=None, compute_constraints=None, optimisation_algorithm_kwargs=None, history_kwargs=None, **kwargs)[source]

Bases: OptimisationAlgorithm

Downhill simplex method, which does not use derivatives.

All the attributes but solution are inherited from the Abstract Base Class OptimisationAlgorithm.

Parameters:
supports_constraints: bool = False
optimize()[source]

Set up the optimization and solve the problem.

Returns:

opti_sol – Gives list of solutions, corresponding objective, convergence violation if applicable, etc.

Return type:

OptiSol

property _default_kwargs: dict[str, Any]

Create the kwargs for the optimisation.

_generate_opti_sol(result)[source]

Store the optimization results.

Parameters:

result (OptimizeResult)

Return type:

OptiSol

_format_variables()[source]

Convert the Variable to an array and Bounds.

Return type:

tuple[ndarray, Bounds]

_abc_impl = <_abc._abc_data object at 0x73dca6b67600>