es.udc.gii.common.eaf.stoptest
Class MaxFEsStopTest

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

public class MaxFEsStopTest
extends FEsStopTest
implements Configurable

Concrete simple objective. The problem must complete a number of given function evaluations.

 <StopTest>
      <Class>es.udc.gii.common.eaf.stoptest.MaxFEsStopTest</Class>
      <MaxFEs>value</MaxFEs>
 </StopTest>
 
 

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

Field Summary
private  int fes
          Number of FEs that a problem has to reach.
 
Constructor Summary
MaxFEsStopTest()
          Creates a new instance of MaxFEsStopTest
MaxFEsStopTest(int fes)
          Create a new instance of MaxFEsStopTest.
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration conf)
          Configure this stop test.
 int getFEs()
          Returns the maximun nunmber of function evaluations that the algorithm will perform.
 boolean isReach(EvolutionaryAlgorithm algorithm)
          Returns true if the problem had done the generation's number determined by this concrete objective.
 java.lang.String toString()
          Returns a String representing this objective.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fes

private int fes
Number of FEs that a problem has to reach.

Constructor Detail

MaxFEsStopTest

public MaxFEsStopTest()
Creates a new instance of MaxFEsStopTest


MaxFEsStopTest

public MaxFEsStopTest(int fes)
Create a new instance of MaxFEsStopTest.

Parameters:
fes - FEs' number that a concrete problem has to reach.
Method Detail

configure

public void configure(org.apache.commons.configuration.Configuration conf)
Configure this stop test.

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

isReach

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

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

toString

public java.lang.String toString()
Returns a String representing this objective.

Overrides:
toString in class java.lang.Object
Returns:
a String representing this objective.

getFEs

public int getFEs()
Returns the maximun nunmber of function evaluations that the algorithm will perform.

Specified by:
getFEs in class FEsStopTest
Returns:
maximum number of function evaluations.