예제 #1
0
파일: Main.java 프로젝트: openea/eva2
 @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++;
 }
예제 #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;
   }
 }