downhill_simplex module

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

class DownhillSimplex(*, 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: 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.

Return type:

OptiSol

Returns:

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

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[tuple[Any, ...], dtype[double]], Bounds]

_abc_impl = <_abc._abc_data object at 0x7318f9140d00>