Description Usage Arguments Value Examples
Main interface for the many-objective optimization evolutionary algorithm (MaOEA) package.
| 1 2 3 4 5 6 7 8 9 10 11 12 | 
| 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  | 
| populationSize | Number of individuals in the population, will be used if  | 
| seed | random number seed for reproduction of code | 
| control | A list, containing the following:
 | 
| ... | Further arguments to be passed to  | 
Returns a list for the next generation
population The new generation design points.
populationObjective The new generation's objective values.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | 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
}
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.