es.udc.gii.common.eaf.stoptest.mga
Class MicroGenerationsConvergence

java.lang.Object
  extended by es.udc.gii.common.eaf.stoptest.SimpleStopTest
      extended by es.udc.gii.common.eaf.stoptest.EvolveGenerationsStopTest
          extended by es.udc.gii.common.eaf.stoptest.mga.MicroGenerationsConvergence
All Implemented Interfaces:
Configurable, StopTest

public class MicroGenerationsConvergence
extends EvolveGenerationsStopTest

This class implements a simple stop test for the internal cycle of micro-genetic algorithms. The objective is reached after a number of evaluations (given by the user). Thus, the convergence of the population of the micro-genetic algorithm is defined in terms of a number of generations.

For population sizes of 5 individuals (MGA algorithm) good results have been achieved using 2 generations. To use and configure this stop test, you must add the following xml code in the appropriate section of the configuration file:

 <StopTest> 
      <Class>es.udc.gii.common.eaf.stoptest.MicroGenerationsConvergence</Class>
 </StopTest>
 
 

Author:
Grupo Integrado de IngenierĂ­a (www.gii.udc.es)

Constructor Summary
MicroGenerationsConvergence()
          Creates a new instance of MicroGenerationsConvergence
MicroGenerationsConvergence(int generation)
          Creates a new instance of MicroGenerationsConvergence
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration conf)
          Configure this stop test.
 boolean isReach(EvolutionaryAlgorithm algorithm)
          Returns true if the problem had done the generation's number determined by this concrete objective.
 
Methods inherited from class es.udc.gii.common.eaf.stoptest.EvolveGenerationsStopTest
getGenerations, setGenerations, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MicroGenerationsConvergence

public MicroGenerationsConvergence()
Creates a new instance of MicroGenerationsConvergence


MicroGenerationsConvergence

public MicroGenerationsConvergence(int generation)
Creates a new instance of MicroGenerationsConvergence

Parameters:
generation - number of generations.
Method Detail

isReach

public boolean isReach(EvolutionaryAlgorithm algorithm)
Description copied from class: EvolveGenerationsStopTest
Returns true if the problem had done the generation's number determined by this concrete objective.

Specified by:
isReach in interface StopTest
Overrides:
isReach in class EvolveGenerationsStopTest
Parameters:
algorithm - the algorithm wich has to reach the objective
Returns:
true if the problem do a number of generations, false in other case.

configure

public void configure(org.apache.commons.configuration.Configuration conf)
Description copied from class: EvolveGenerationsStopTest
Configure this stop test.

Specified by:
configure in interface Configurable
Overrides:
configure in class EvolveGenerationsStopTest
Parameters:
conf - Configuration object which contains the configuration values.