nsga module
Define NSGA, a genetic algorithm for optimisation.
- class NSGA
Bases:
OptimisationAlgorithmNon-dominated Sorted Genetic Algorithm.
- optimise(keep_history: bool = False, save_history: bool = False) tuple[bool, SetOfCavitySettings | None, OptiInfo]
Set up the optimisation and solve the problem.
- 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.
- _wrapper_residuals(var: ndarray) tuple[ndarray, ndarray]
Compute residuals from an array of variable values.
- _set_algorithm(*args, **kwargs) Algorithm
Set
pymoo`s `Algorithmobject.
- _set_termination() DefaultMultiObjectiveTermination
Set the termination condition.
- _set_population(problem: Problem, n_pop: int) Population
Set population, with some predefined individuals.
- _best_solution(result: Result) tuple[SetOfCavitySettings, dict[str, ndarray]]
Take the “best” solution.
- _abc_impl = <_abc._abc_data object at 0x7fd3c804cd00>