nsga module
Define NSGA, a genetic algorithm for optimisation.
Warning
Implementation not modified since v0.0.0.0.0.1 or so
- class NSGA(*args, history_kwargs=None, **kwargs)[source]
Bases:
OptimisationAlgorithmNon-dominated Sorted Genetic Algorithm.
- optimize()[source]
Set up the optimization and solve the problem.
- Return type:
- Returns:
success (bool) – Tells if the optimisation algorithm managed to converge.
optimized_cavity_settings (SetOfCavitySettings) – Best solution found by the optimization algorithm.
info (dict[str, list[float]]] | None) – Gives list of solutions, corresponding objective, convergence violation if applicable, etc.
- property _problem_arguments: dict[str, int | ndarray]
Gather arguments required for
ElementwiseProblem.
- property x_0: ndarray
Return initial value used in
LeastSquares.
- _set_termination()[source]
Set the termination condition.
- Return type:
DefaultMultiObjectiveTermination
- _set_population(problem, n_pop)[source]
Set population, with some predefined individuals.
- Parameters:
problem (
Problem)n_pop (
int)
- Return type:
Population
- _abc_impl = <_abc._abc_data object at 0x73dca6614b00>