Skip to contents

The multiobjective optimizers of Metaheuristics.jl that OptimizationMetaheuristics makes available, ported to R, for problems built from a MultiObjectiveOptimizationFunction() with box bounds. The objective returns the vector of the costs, or a list (F, g, h) with the inequality (g <= 0) and equality (h = 0) constraints as in Metaheuristics.jl; constraints given to the problem are appended.

Usage

NSGA3(
  N = 100L,
  eta_cr = 20,
  p_cr = 0.9,
  eta_m = 20,
  p_m = -1,
  partitions = 12L,
  reference_points = list(),
  information = NULL,
  options = NULL,
  termination = NULL
)

SPEA2(
  N = 100L,
  eta_cr = 20,
  p_cr = 0.9,
  eta_m = 20,
  p_m = -1,
  information = NULL,
  options = NULL,
  termination = NULL
)

SMS_EMOA(
  N = 100L,
  eta_cr = 20,
  p_cr = 0.9,
  eta_m = 20,
  p_m = -1,
  n_samples = 10000L,
  information = NULL,
  options = NULL,
  termination = NULL
)

MOEAD_DE(
  weights,
  F = 0.5,
  CR = 1,
  lambda = list(),
  eta = 20,
  p_m = -1,
  T = min(max(round(0.2 * length(weights)), 2), length(weights) - 1),
  delta = 0.9,
  n_r = max(1, round(0.02 * length(weights))),
  z = numeric(0),
  B = list(),
  s1 = 0.01,
  s2 = 20,
  information = NULL,
  options = NULL,
  termination = NULL
)

CCMO(base_algorithm, information = NULL, options = NULL, termination = NULL)

Arguments

N

Population size.

eta_cr, p_cr, eta_m, p_m

Distribution index and probability of the simulated binary crossover and of the polynomial mutation (p_m < 0 means 1 / n).

partitions, reference_points

Partitions of the simplex for the reference points of NSGA3, or the points themselves (a list).

information, options, termination

As for metaheuristics_single.

n_samples

Monte Carlo samples of SMS_EMOA beyond three objectives.

weights

The weight vectors of MOEAD_DE (a list); the population has one solution per weight.

F, CR

Step size and crossover rate of MOEAD_DE.

lambda

Ignored, as in Metaheuristics.jl (the weights are used).

eta

Distribution index of the MOEAD_DE mutation.

T, delta, n_r

Neighborhood size, probability of mating in the neighborhood and maximal number of replaced solutions.

z, B

Initial ideal point and neighborhoods (computed when empty).

s1, s2

Penalty factors of the constraint violation.

base_algorithm

The NSGA2 algorithm wrapped by CCMO.

Value

An algorithm object for solve().

Details

  • NSGA3(): reference point based nondominated sorting.

  • SPEA2(): strength Pareto evolutionary algorithm.

  • SMS_EMOA(): hypervolume selection (exact contributions for two and three objectives, Monte Carlo with n_samples points beyond).

  • MOEAD_DE(): decomposition with differential evolution for the given weight vectors (see Metaheuristics$gen_ref_dirs()).

  • CCMO(): coevolutionary constrained optimization around an NSGA2 (Metaheuristics$NSGA2() or NSGA2()).

The solution's u is the set of the nondominated solutions of the final population and objective their costs; original is the final state.

Examples

f <- function(x, p) c(sum(x^2), sum((x - 2)^2))
prob <- OptimizationProblem(MultiObjectiveOptimizationFunction(f), c(0, 0),
  lb = c(0, 0), ub = c(2, 2))
set.seed(1)
sol <- solve(prob, SPEA2(N = 20), maxiters = 20)
dim(sol$u)
#> [1] 20  2