JGAP

org.jgap.impl.job
Class EvolveJob

java.lang.Object
  extended by org.jgap.impl.job.JobBase
      extended by org.jgap.impl.job.EvolveJob
All Implemented Interfaces:
java.io.Serializable, java.lang.Runnable, IEvolveJob, IJob

public class EvolveJob
extends JobBase
implements IEvolveJob

A job that evolves a population. The evolution takes place as given by the configuration. It operates on a population also provided. This class utilizes sub jobs to perform its sub-tasks. Each sub job may either be a local implementation satisfying the IJob interface. Or it may be a job that eventually is put onto the grid and returns with a result!

Since:
3.2
See Also:
Serialized Form

Constructor Summary
EvolveJob(JobData a_data)
           
 
Method Summary
protected  void applyGeneticOperators(Configuration a_config, Population a_pop)
          Applies all GeneticOperators registered with the Configuration.
protected  Population applyNaturalSelectors(Configuration a_config, Population a_pop, boolean a_processBeforeGeneticOperators)
          Applies all NaturalSelectors registered with the Configuration.
 EvolveResult evolve(EvolveData a_evolveData)
          Does the genetic evolution.
 JobResult execute(JobData a_data)
          Execute the evolution via JGAP.
 
Methods inherited from class org.jgap.impl.job.JobBase
getJobData, getResult, isFinished, run, setFinished
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jgap.impl.job.IJob
getJobData, getResult, isFinished, run
 

Constructor Detail

EvolveJob

public EvolveJob(JobData a_data)
Method Detail

execute

public JobResult execute(JobData a_data)
                  throws java.lang.Exception
Execute the evolution via JGAP.

Specified by:
execute in interface IJob
Parameters:
a_data - input parameter of type EvolveData
Returns:
result of the evolution
Throws:
java.lang.Exception - in case of any error
Since:
3.2

evolve

public EvolveResult evolve(EvolveData a_evolveData)
Does the genetic evolution.

Parameters:
a_evolveData - parameters for the evolution
Returns:
result of the evolution
Since:
3.2

applyNaturalSelectors

protected Population applyNaturalSelectors(Configuration a_config,
                                           Population a_pop,
                                           boolean a_processBeforeGeneticOperators)
Applies all NaturalSelectors registered with the Configuration.

Parameters:
a_processBeforeGeneticOperators - true apply NaturalSelectors applicable before GeneticOperators, false: apply the ones applicable after GeneticOperators
Since:
3.2

applyGeneticOperators

protected void applyGeneticOperators(Configuration a_config,
                                     Population a_pop)
Applies all GeneticOperators registered with the Configuration.

Since:
3.2

JGAP