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

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.DimensionFEsStopTest
All Implemented Interfaces:
Configurable, StopTest

public class DimensionFEsStopTest
extends FEsStopTest
implements Configurable

The maximum numbers of FEs that has to run an algorithm depends on the dimension of the individuals. 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.DimensionFEsStopTest;/Class>
      <Factor>value</Factor>
 </StopTest>
 
 

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

Field Summary
private  int dimension
          Dimension of the problem
private  int factor
          Factor that multiply the dimension of the algorithm and establish the maximum number of function evaluations
 
Constructor Summary
DimensionFEsStopTest()
          Creates a new instance of DimensionFEsStopTest
DimensionFEsStopTest(int factor)
          Create a new instance of DimensionFEsStopTest.
 
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 number of function evaluations 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

factor

private int factor
Factor that multiply the dimension of the algorithm and establish the maximum number of function evaluations


dimension

private int dimension
Dimension of the problem

Constructor Detail

DimensionFEsStopTest

public DimensionFEsStopTest()
Creates a new instance of DimensionFEsStopTest


DimensionFEsStopTest

public DimensionFEsStopTest(int factor)
Create a new instance of DimensionFEsStopTest.

Parameters:
factor - factor that multiply the dimension of the algorithm and establish the maximum number of function evaluations.
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.
See Also:
Configuration

isReach

public boolean isReach(EvolutionaryAlgorithm algorithm)
Returns true if the problem had done the number of function evaluations 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 function evaluations, 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.