optimMaOEA {MaOEA}R Documentation

Elitist Non-dominated Sorting Genetic Algorithm version III

Description

Main interface for the many-objective optimization evolutionary algorithm (MaOEA) package.

Usage

optimMaOEA(
  x = NULL,
  fun,
  solver = NSGA3,
  nObjective,
  nGeneration = 1,
  nVar = nrow(x),
  populationSize = ncol(x),
  seed = 2000,
  control = list(),
  ...
)

Arguments

x

The initial population. If not supplied, will be generated using LHS. Column major, each column contain one entry.

fun

Objective function being solved.

solver

Function name of the solver. Currently available: SMSEMOA, MOCMAES, SMOCMAES, and NSGA3.

nObjective

The number of objective functions. A scalar value.

nGeneration

Optional, the number of generation the solver should run.

nVar

Number of variables, will be used if x is not given.

populationSize

Number of individuals in the population, will be used if x is not given.

seed

random number seed for reproduction of code

control

A list, containing the following: weightVectorSet A set of weight vector for the optimizer. The weight vector can be any point in the objective space. If not supplied, 5*nObjective points are generated from a sobol sequence. Size: nrow = nObjective,ncol = number of weight vectors crossoverProbability The probability of doing crossover. Should be between 0-1. Negative value will behave like a zero, and values larger than 1 will behave like 1. Default to 1. mutationProbability The probability of doing mutation. Should be between 0-1. Negative value will behave like a zero, and values larger than 1 will behave like 1. Default to 1 WFGScaling The use of scaling factor in WFG. Will be ignored in DTLZ problems. Without the scaling, the Pareto front would be on the all-positive portion of hypersphere with radius 1. mutationDistribution The distribution index for polynomial mutation. Larger index makes the distribution sharper around the parent. crossoverDistribution The distribution index for SBX. Larger index makes the distribution sharper around each parent.

...

Further arguments to be passed to fun

Value

Returns a list for the next generation population The new generation design points. populationObjective The new generation's objective values.

Examples


nVar <- 14
nObjective <- 5
nIndividual <- 100
#control for NSGA3
ctrl <- list(crossoverProbability = 1,
             mutationProbability = 1/nVar)
#Initial population can be supplied, like below but for this example, we skip it
#population <- matrix(runif(nIndividual*nVar), nrow = nVar)

numpyready <- reticulate::py_module_available('numpy')
pygmoready <- reticulate::py_module_available('pygmo')
py_module_ready <- numpyready && pygmoready
if(py_module_ready){ # prevent error on testing the example
# Hybrid NSGA-III and SMSEMOA example
# 2 calls for nObjective. 1 for optimMaOEA, 1 for WFG8
# generate initial population and run 10 gen. NSGA-III with standard WFG8 test function.
newPop <- optimMaOEA( , WFG8,NSGA3,nObjective,10,nVar,nIndividual,,ctrl,nObjective)$x

# run 5 generations of SMSEMOA with standard WFG8 test function starting with newPop.
result <- optimMaOEA( newPop, WFG8,SMSEMOA,nObjective,5,,,1000,ctrl,nObjective)
finalPop <- result$x
finalObjective <- result$y
}


[Package MaOEA version 0.6.2 Index]