es.udc.gii.common.eaf.plugin.stoptest
Class GenerationsPlugin

java.lang.Object
  extended by es.udc.gii.common.eaf.plugin.stoptest.StopTestPlugin
      extended by es.udc.gii.common.eaf.plugin.stoptest.GenerationsPlugin
All Implemented Interfaces:
Configurable, Plugin

public class GenerationsPlugin
extends StopTestPlugin

This class implements a plugin with the responsability of return the number of current generations executed by the algorithm and the maximum number of generations allowed to execute.

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

Field Summary
private  int generations
          Maximum number of generations
 
Constructor Summary
GenerationsPlugin()
           
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration conf)
          Configures the specific element that implements this method.
 int getCurrent(EvolutionaryAlgorithm algorithm)
          Return the current number of generations excuted by the algorithm
 int getMax(EvolutionaryAlgorithm algorithm)
           
 
Methods inherited from class es.udc.gii.common.eaf.plugin.stoptest.StopTestPlugin
getStopTestList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

generations

private int generations
Maximum number of generations

Constructor Detail

GenerationsPlugin

public GenerationsPlugin()
Method Detail

configure

public void configure(org.apache.commons.configuration.Configuration conf)
Description copied from interface: Configurable
Configures the specific element that implements this method.

Parameters:
conf - a Configuration object.
See Also:
Configuration

getCurrent

public int getCurrent(EvolutionaryAlgorithm algorithm)
Return the current number of generations excuted by the algorithm

Specified by:
getCurrent in class StopTestPlugin
Parameters:
algorithm - the algorithm that is in execution.
Returns:
the current number of FEs executed by the algorithm.

getMax

public int getMax(EvolutionaryAlgorithm algorithm)
Specified by:
getMax in class StopTestPlugin