The NSGA-II merges the current population and the generated offspring and reduces it by means of the following procedure: It first applies the non dominated sorting algorithm to obtain the nondominated fronts. Starting with the first front, it fills the new population until the i-th front does not fit. It then applies the secondary crowding distance criterion to select the missing individuals from the i-th front.

nsga2(fitness.fun, n.objectives = NULL, n.dim = NULL, minimize = NULL,
  lower = NULL, upper = NULL, mu = 100L, lambda = mu,
  mutator = setup(mutPolynomial, eta = 25, p = 0.2, lower = lower, upper =
  upper), recombinator = setup(recSBX, eta = 15, p = 0.7, lower = lower, upper
  = upper), terminators = list(stopOnIters(100L)), ...)

Arguments

fitness.fun

[function] The fitness function.

n.objectives

[integer(1)] Number of objectives of obj.fun. Optional if obj.fun is a benchmark function from package smoof.

n.dim

[integer(1)] Dimension of the decision space.

minimize

[logical(n.objectives)] Logical vector with ith entry TRUE if the ith objective of fitness.fun shall be minimized. If a single logical is passed, it is assumed to be valid for each objective.

lower

[numeric] Vector of minimal values for each parameter of the decision space in case of float or permutation encoding. Optional if obj.fun is a benchmark function from package smoof.

upper

[numeric] Vector of maximal values for each parameter of the decision space in case of float or permutation encoding. Optional if obj.fun is a benchmark function from package smoof.

mu

[integer(1)] Number of individuals in the population. Default is 100.

lambda

[integer(1)] Offspring size, i.e., number of individuals generated by variation operators in each iteration. Default is 100.

mutator

[ecr_mutator] Mutation operator of type ecr_mutator.

recombinator

[ecr_recombinator] Recombination operator of type ecr_recombinator.

terminators

[list] List of stopping conditions of type “ecr_terminator”. Default is to stop after 100 iterations.

...

[any] Further arguments passed down to fitness function.

Value

[ecr_multi_objective_result]

Note

This is a pure R implementation of the NSGA-II algorithm. It hides the regular ecr interface and offers a more R like interface while still being quite adaptable.

References

Deb, K., Pratap, A., and Agarwal, S. A Fast and Elitist Multiobjective Genetic Algorithm: NSGA-II. IEEE Transactions on Evolutionary Computation, 6 (8) (2002), 182-197.