Bug in CMAES.java
Brought to you by:
ajnebro,
juanjo_durillo
Hi!
In the file "jmetal/metaheuristics/singleObjective/cmaes/CMAES.java", in the iteration loop of the method "execute()", the line "counteval += populationSize;" should be outside the loop over the individuals of the population. The corrected piece of source code would be:
for(int i = 0; i < populationSize; i++) {
if (!isFeasible(population_.get(i))) {
//System.out.println("RESAMPLING!");
population_.replace(i, resampleSingle(i));
}
problem_.evaluate(population_.get(i));
}
counteval += populationSize;
storeBest(comparator);
instead of:
for(int i = 0; i < populationSize; i++) {
if (!isFeasible(population_.get(i))) {
//System.out.println("RESAMPLING!");
population_.replace(i, resampleSingle(i));
}
problem_.evaluate(population_.get(i));
counteval += populationSize;
}
storeBest(comparator);
Best regards,
Julien