Skip to main content

NSGA2

Module: opytimizer.optimizers.multi_objective.evolutionary.nsga2

NSGA2 class, inherited from MultiObjectiveOptimizer.

References: K. Deb, A. Pratap, S. Agarwal, and T. Meyarivan, "A fast and elitist multiobjective genetic algorithm: NSGA-II," IEEE Trans. Evol. Comput., vol. 6, no. 2, pp. 182-197, 2002.

Constructor​

NSGA2(params: 'Dict' = None, crossover_operator=None, mutation_operator=None) -> 'None'

Parameters​

ParameterTypeDefaultDescription
paramsDictNoneContains key-value parameters to the meta-heuristics.
crossover_operatorNoneCrossover operator applied to pairs of parents.
mutation_operatorNoneMutation operator applied to every child.

Methods​

compile​

compile(self, space: '_MultiObjectiveSpace') -> 'None'

Compiles additional information that is used by this optimizer.

Parameters​

ParameterTypeDefaultDescription
space_MultiObjectiveSpaceA MultiObjectiveSpace object.

evaluate​

evaluate(self, space, function)

Evaluates the initial population and computes its ranks and crowding.

Offspring are evaluated inside update, so this method replaces itself with a no-op after its first call.

Parameters​

ParameterTypeDefaultDescription
spaceA MultiObjectiveSpace object.
functionA Function object that will be used as the objective function.

update​

update(self, space: '_MultiObjectiveSpace', function) -> 'None'

Performs one generation: creates, evaluates and selects the offspring.

Parameters​

ParameterTypeDefaultDescription
space_MultiObjectiveSpaceA MultiObjectiveSpace object.
functionA Function object that will be used as the objective function.