Beispiel #1
0
 @Override
 public void createNextGenerationPerformed(
     PopulationInterface pop,
     InterfaceOptimizer opt,
     List<InterfaceAdditionalPopulationInformer> informerList) {
   LinkedHashMap<String, Object> generation = new LinkedHashMap<>();
   generation.put("generation", currentGeneration);
   generation.put("bestFitness", pop.getBestFitness().clone());
   generation.put("meanFitness", pop.getMeanFitness().clone());
   generation.put("functionCalls", pop.getFunctionCalls());
   this.currentGenerations.add(generation);
   this.currentGeneration++;
 }
Beispiel #2
0
 @Override
 public void createNextGenerationPerformed(
     PopulationInterface pop,
     InterfaceOptimizer opt,
     List<InterfaceAdditionalPopulationInformer> informerList) {
   bestCurrentIndividual = (AbstractEAIndividual) pop.getBestIndividual();
   if ((bestIndividualAllover == null)
       || (AbstractStatistics.secondIsBetter(bestIndividualAllover, bestCurrentIndividual))) {
     bestIndividualAllover = bestCurrentIndividual;
   }
   if ((bestIndividualAllover == null)
       || (AbstractStatistics.secondIsBetter(bestIndividualAllover, bestCurrentIndividual))) {
     bestIndividualAllover = bestCurrentIndividual;
   }
 }