# NOT RUN {
nVar <- 14
nObjective <- 5
nIndividual <- 100
crossoverProbability <- 1
ps_target <- 1 / (5 + ( 1 / 2 )^0.5 )
pop <- matrix(stats::runif(nIndividual*nVar), nrow = nVar) # create the population
a_list <- cmaes_gen(pop)
control <- list(successProbTarget=ps_target,crossoverProbability=crossoverProbability)
# run a generation of MO-CMA-ES with standard WFG8 test function.
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
newGeneration <- MOCMAES(a_list,nObjective,WFG8,control,nObjective)
# }
Run the code above in your browser using DataLab