JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.core
Class Run

java.lang.Object
  extended bygov.nasa.javaGenes.core.AbstractCheckpointable
      extended bygov.nasa.javaGenes.core.Run
All Implemented Interfaces:
gov.nasa.javaGenes.core.Checkpointable, java.io.Serializable
Direct Known Subclasses:
Run, RunChromosome, runEOSscheduling, RunMolecule, RunPermutation

public abstract class Run
extends AbstractCheckpointable

run JavaGenes under control of a Checkpointer object

See Also:
Serialized Form

Field Summary
protected  Timer checkpointTimer
           
protected  LogFile checkpointTimesFile
           
protected  boolean foundPerfection
           
protected  int generation
           
protected  Timer generationTimer
           
protected  Parameters parameters
           
protected  Population population
           
protected  Reporter reporter
           
 
Fields inherited from class gov.nasa.javaGenes.core.AbstractCheckpointable
checkpointer
 
Constructor Summary
Run()
           
 
Method Summary
 void afterCheckpoint()
          will be called just after a checkpoint.
protected  void afterNextGeneration()
           
protected  void atEnd()
           
 void beforeCheckpoint()
          will be called just before a checkpoint.
protected  void beforeNextGeneration()
           
protected  void checkpoint()
           
 Parameters getParameters()
           
protected  void report()
           
 void restart()
          start the run after having read any checkpoint file
protected  void run()
          called by start and restart to run the genetic algorithm
protected  boolean shouldStop()
           
 void start(java.lang.String[] arguments)
          start a run.
protected abstract  void startSpecialized(java.lang.String[] arguments)
          used to do the special processing necessary at startup by subclasses
 
Methods inherited from class gov.nasa.javaGenes.core.AbstractCheckpointable
setCheckpointer, stateSave
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parameters

protected Parameters parameters

population

protected Population population

foundPerfection

protected boolean foundPerfection

generationTimer

protected Timer generationTimer

generation

protected int generation

reporter

protected Reporter reporter

checkpointTimesFile

protected transient LogFile checkpointTimesFile

checkpointTimer

protected transient Timer checkpointTimer
Constructor Detail

Run

public Run()
Method Detail

getParameters

public Parameters getParameters()

start

public void start(java.lang.String[] arguments)
start a run.

Specified by:
start in interface gov.nasa.javaGenes.core.Checkpointable
Specified by:
start in class AbstractCheckpointable
Parameters:
arguments - usually the arguments to main()

startSpecialized

protected abstract void startSpecialized(java.lang.String[] arguments)
used to do the special processing necessary at startup by subclasses


restart

public void restart()
start the run after having read any checkpoint file

Specified by:
restart in interface gov.nasa.javaGenes.core.Checkpointable
Specified by:
restart in class AbstractCheckpointable

run

protected void run()
called by start and restart to run the genetic algorithm


beforeNextGeneration

protected void beforeNextGeneration()

afterNextGeneration

protected void afterNextGeneration()

shouldStop

protected boolean shouldStop()

atEnd

protected void atEnd()

beforeCheckpoint

public void beforeCheckpoint()
Description copied from interface: gov.nasa.javaGenes.core.Checkpointable
will be called just before a checkpoint. Can be overridden to gain control to set timers, clean up state, etc.

Specified by:
beforeCheckpoint in interface gov.nasa.javaGenes.core.Checkpointable
Overrides:
beforeCheckpoint in class AbstractCheckpointable

afterCheckpoint

public void afterCheckpoint()
Description copied from interface: gov.nasa.javaGenes.core.Checkpointable
will be called just after a checkpoint. Complements beforeCheckpoint()

Specified by:
afterCheckpoint in interface gov.nasa.javaGenes.core.Checkpointable
Overrides:
afterCheckpoint in class AbstractCheckpointable

report

protected void report()

checkpoint

protected void checkpoint()

JavaGenes, NASA Ames. Written largely by Al Globus