eaLib API Docs
Last Modified : January 7 2002

mss.ea.trm
Class MaxGenTermination

java.lang.Object
  |
  +--mss.ea.trm.Termination
        |
        +--mss.ea.trm.MaxGenTermination
All Implemented Interfaces:
Condition

public class MaxGenTermination
extends Termination

Termination after reaching a specified number of generations. The break condition is fulfilled in case of ( current number of generations > maximal number of generations). The maximal number is specified in the constructor. To gather information about the number of generations it is necessary to specify a statistic operator.

Since:
0.1
Version:
0.1 (06-11-2001)
Author:
Andreas Rummler

Field Summary
protected  long breakValue
          Maximal number of generations.
protected  Counter counter
          Generation counter to use for break condition testing.
 
Fields inherited from class mss.ea.trm.Termination
pop
 
Constructor Summary
MaxGenTermination(long generations)
          Constructor with maximal number of generations.
MaxGenTermination(long generations, AbstractPopulation p)
          Constructor with maximal number of generations and appropriate population.
MaxGenTermination(long generations, Counter c)
          Constructor with maximal number of generations and counter to gather information from.
 
Method Summary
 boolean isTrue()
          Test of break condition.
 void setCounter(Counter c)
          Sets the generation counter.
 
Methods inherited from class mss.ea.trm.Termination
getPopulation, setPopulation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

breakValue

protected long breakValue
Maximal number of generations.

counter

protected Counter counter
Generation counter to use for break condition testing.
Constructor Detail

MaxGenTermination

public MaxGenTermination(long generations)
Constructor with maximal number of generations.
Parameters:
generations - maximal number of generations

MaxGenTermination

public MaxGenTermination(long generations,
                         Counter c)
Constructor with maximal number of generations and counter to gather information from.
Parameters:
generations - maximal number of generations
c - counter with current number of generations

MaxGenTermination

public MaxGenTermination(long generations,
                         AbstractPopulation p)
Constructor with maximal number of generations and appropriate population.
Parameters:
generations - maximal number of generations
p - population to use for break condition testing
Method Detail

setCounter

public void setCounter(Counter c)
Sets the generation counter.
Parameters:
c - new generation counter

isTrue

public boolean isTrue()
Test of break condition.
Overrides:
isTrue in class Termination
Returns:
result of the test of break condition

eaLib API Docs
Last Modified : January 7 2002

Copyright © 2000-2001 Technical University of Ilmenau, Department ESS