com.parabon.ec.steadystate
Class SteadyStateEvolutionState

java.lang.Object
  extended by ec.EvolutionState
      extended by ec.steadystate.SteadyStateEvolutionState
          extended by com.parabon.ec.steadystate.SteadyStateEvolutionState
All Implemented Interfaces:
Setup, Singleton, java.io.Serializable

public class SteadyStateEvolutionState
extends SteadyStateEvolutionState

ORIGIN steady-state and opportunistic evolution state.

Author:
Curt Larock
See Also:
Serialized Form

Field Summary
protected  boolean didFlush_
          Ensure that the entire initial population is launched.
protected  boolean flushAtMax_
          Flush whenever the max number of individuals evaluating is reached.
protected static org.apache.commons.logging.Log log
           
protected  int maxIndsEvaluating_
           
protected  int maxIndsToCreate_
           
protected  int numIndsCreated_
          Number of new individuals created
protected  int numIndsEvaluating_
          Number of individuals currently being evaluated in all active tasks.
protected  float overgeneratePercent_
           
static java.lang.String P_MAX_EVALUATING
          Max number of individuals that can be in the process of asynchronous evaluation
static java.lang.String P_OVERGENERATE_PERCENT
          Additional individuals to generate beyond population size
static java.lang.String P_PREF_JOBS
          Preferred number of individuals to be executed by each slave task.
static long POLL_TIMEOUT_MSEC
          Poll interval for returning tasks.
protected  int populationSize_
          Total number of individuals in all subpopulations.
protected  int prefJobsPerSlave_
           
 
Fields inherited from class ec.steadystate.SteadyStateEvolutionState
evaluations, firstTime, generationBoundary, generationSize, individualCount, individualHash, numEvaluations, P_NUMEVALUATIONS, P_STEADYSTATE, UNDEFINED, whichSubpop
 
Fields inherited from class ec.EvolutionState
breeder, breedthreads, C_STARTED_FRESH, C_STARTED_FROM_CHECKPOINT, checkpoint, checkpointModulo, checkpointPrefix, context_, evalthreads, evaluator, exchanger, finisher, generation, initializer, job, numGenerations, output, P_BREEDER, P_CHECKPOINT, P_CHECKPOINTMODULO, P_CHECKPOINTPREFIX, P_EVALUATOR, P_EXCHANGER, P_FINISHER, P_GENERATIONS, P_INITIALIZER, P_QUITONRUNCOMPLETE, P_STATISTICS, parameters, population, quitOnRunComplete, R_FAILURE, R_NOTDONE, R_SUCCESS, random, randomSeedOffset, runtimeArguments, statistics
 
Constructor Summary
SteadyStateEvolutionState()
           
 
Method Summary
 int evolve()
          Sends individuals to be evaluated and collects evaluation results.
 void finish(int result)
           
 void setup(EvolutionState state, Parameter base)
          Sets up the object by reading it from the parameters stored in state, built off of the parameter base base.
 void startFresh()
           
 void startFromCheckpoint()
          Resets the number of individuals currently evaluating after a checkpoint.
 
Methods inherited from class ec.EvolutionState
performCheckpoint, resetFromCheckpoint, run
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.commons.logging.Log log

P_MAX_EVALUATING

public static final java.lang.String P_MAX_EVALUATING
Max number of individuals that can be in the process of asynchronous evaluation

See Also:
Constant Field Values

P_OVERGENERATE_PERCENT

public static final java.lang.String P_OVERGENERATE_PERCENT
Additional individuals to generate beyond population size

See Also:
Constant Field Values

P_PREF_JOBS

public static final java.lang.String P_PREF_JOBS
Preferred number of individuals to be executed by each slave task.

See Also:
Constant Field Values

POLL_TIMEOUT_MSEC

public static final long POLL_TIMEOUT_MSEC
Poll interval for returning tasks.

See Also:
Constant Field Values

maxIndsEvaluating_

protected int maxIndsEvaluating_

numIndsEvaluating_

protected int numIndsEvaluating_
Number of individuals currently being evaluated in all active tasks.


numIndsCreated_

protected int numIndsCreated_
Number of new individuals created


prefJobsPerSlave_

protected int prefJobsPerSlave_

didFlush_

protected boolean didFlush_
Ensure that the entire initial population is launched.


flushAtMax_

protected boolean flushAtMax_
Flush whenever the max number of individuals evaluating is reached.


populationSize_

protected int populationSize_
Total number of individuals in all subpopulations.


overgeneratePercent_

protected float overgeneratePercent_

maxIndsToCreate_

protected int maxIndsToCreate_
Constructor Detail

SteadyStateEvolutionState

public SteadyStateEvolutionState()
Method Detail

setup

public void setup(EvolutionState state,
                  Parameter base)
Description copied from interface: Setup
Sets up the object by reading it from the parameters stored in state, built off of the parameter base base. If an ancestor implements this method, be sure to call super.setup(state,base); before you do anything else.

Specified by:
setup in interface Setup
Overrides:
setup in class SteadyStateEvolutionState

startFresh

public void startFresh()
Overrides:
startFresh in class SteadyStateEvolutionState

startFromCheckpoint

public void startFromCheckpoint()
Resets the number of individuals currently evaluating after a checkpoint. We could make these fields transient, but this would change the serialization format.

Overrides:
startFromCheckpoint in class EvolutionState

evolve

public int evolve()
Sends individuals to be evaluated and collects evaluation results.

Overrides:
evolve in class SteadyStateEvolutionState

finish

public void finish(int result)
Overrides:
finish in class SteadyStateEvolutionState
Parameters:
result -