JGAP

org.jgap.audit
Class FitnessImprovementMonitor

java.lang.Object
  extended by org.jgap.audit.FitnessImprovementMonitor
All Implemented Interfaces:
IEvolutionMonitor

public class FitnessImprovementMonitor
extends java.lang.Object
implements IEvolutionMonitor

Monitors the evolution and stops it if evolution does not make a progress as desired.

Since:
3.4.4

Constructor Summary
FitnessImprovementMonitor(int a_initialWaitSeconds, int a_checkIntervalSeconds, double a_improvedFitnessExpected)
          Constructor.
 
Method Summary
 boolean nextCycle(Population a_pop, java.util.List<java.lang.String> a_messages)
          Called after another evolution cycle has been executed.
 void start(Configuration a_config)
          Called just before the evolution starts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FitnessImprovementMonitor

public FitnessImprovementMonitor(int a_initialWaitSeconds,
                                 int a_checkIntervalSeconds,
                                 double a_improvedFitnessExpected)
Constructor.

Parameters:
a_initialWaitSeconds - number of seconds to wait until first check
a_checkIntervalSeconds - number of seconds to wait after the previous check (except for the first check, where a_initialWaitSeconds is taken)
a_improvedFitnessExpected - number of fitness units the current best solution evolved is better than the best solution from the previously check
Since:
3.4.4
Method Detail

nextCycle

public boolean nextCycle(Population a_pop,
                         java.util.List<java.lang.String> a_messages)
Called after another evolution cycle has been executed.

Specified by:
nextCycle in interface IEvolutionMonitor
Parameters:
a_pop - the currently evolved population
a_messages - the monitor can append messages here to indicate why it asks evolution to stop
Returns:
true: continue with the evolution; false: stop evolution
Since:
3.4.4

start

public void start(Configuration a_config)
Called just before the evolution starts.

Specified by:
start in interface IEvolutionMonitor
Parameters:
a_config - the configuration used
Since:
3.4.4

JGAP