Create a list with cmaes_gen class. Basically, the function transform the population into a class that is accepted by the MOCMAES and SMOCMAES function.
population: The number of objective functions. A scalar value.
ps_target: The target success rate. Used to initialize cmaes_gen$averageSuccessRate.
stepSize: The initial step size.
evoPath: A vector of numbers indicating evolution path of each variable.
covarianceMatrix: Covariance matrix of the variables.
Returns
An object of cmaes_gen class. It can be used as MO-CMA-ES parent. It is a 5 tuple: x (the design point, length = number of variable),averageSuccessRate (scalar),stepSize (scalar), evoPath (evolution path, vector, length = number of variable ),covarianceMatrix (square matrix with ncol = nrow = number of variable).
Examples
nVar <-14nObjective <-5nIndividual <-100crossoverProbability <-1ps_target <-1/(5+(1/2)^0.5)pop <- matrix(stats::runif(nIndividual*nVar), nrow = nVar)# create the populationa_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 examplenewGeneration <- MOCMAES(a_list,nObjective,WFG8,control,nObjective)