|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectec.Evolve
com.parabon.ec.Evolve
public class Evolve
ORIGIN evolution main program.
Sets up the evolution state and executes a new evolutionary run or
restarts an existing run from a checkpoint file.
To programmatically create an instance of ORIGIN do:
Evolve e = new Evolve();
e.addParameters(paramfile); // or e.restartFromCheckpoint(checkpointfile)
e.evolve();
| Field Summary | |
|---|---|
static java.lang.String |
A_PARAMETER
Deprecated. Use -D to set system properties instead. |
protected static org.apache.commons.logging.Log |
log
|
| Fields inherited from class ec.Evolve |
|---|
A_CHECKPOINT, A_FILE, P_BREEDTHREADS, P_EVALTHREADS, P_FLUSH, P_JOBS, P_PRINTACCESSEDPARAMETERS, P_PRINTALLPARAMETERS, P_PRINTUNACCESSEDPARAMETERS, P_PRINTUNUSEDPARAMETERS, P_PRINTUSEDPARAMETERS, P_SEED, P_STATE, P_STORE, P_VERBOSITY, V_SEED_TIME |
| Constructor Summary | |
|---|---|
Evolve()
Constructs evolver. |
|
| Method Summary | |
|---|---|
void |
addParameters(org.apache.commons.configuration.AbstractConfiguration config)
|
void |
addParameters(java.io.File parameterFile)
Appends the parameters in the specified file to the parameter database. |
void |
addParameters(java.lang.String parameterFilename)
Appends the parameters in the specified file to the parameter database. |
void |
createEvolutionState()
|
void |
createEvolutionState(java.lang.String[] args)
Creates the evolution state for this evolve object from command line arguments. |
void |
evolve()
Initializes, executes, and finishes an evolutionary run. |
void |
finishJob()
Cleans up at the end of a job. |
void |
finishJob(java.io.PrintWriter pw)
Prints parameter statistics and cleans up evolution state at end of job. |
int |
getCurrentJob()
Gets the evolutionary run job number. |
int |
getNumberOfJobs()
|
CollectionsParameterDatabase |
getParameterDatabase()
Gets the current parameter database. |
EvolutionState |
getState()
Gets the evolution state |
boolean |
isRestartedFromCheckpoint()
|
static void |
main(java.lang.String[] args)
Main program. |
static void |
processCommandLineArguments(Evolve evolver,
java.lang.String[] args)
Processes command line arguments. |
void |
restartFromCheckpoint(java.lang.String checkpointFile)
|
void |
run()
Executes a new run, or restarts an existing one from a checkpoint |
void |
setParameterDatabase(CollectionsParameterDatabase parameters)
Sets the parameter database used for the run. |
void |
setState(EvolutionState state)
Sets the evolution state |
void |
startJob(int randomSeedOffset)
Starts an evolutionary run. |
| Methods inherited from class ec.Evolve |
|---|
cleanup, determineSeed, initialize, loadParameterDatabase, possiblyRestoreFromCheckpoint |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log log
public static final java.lang.String A_PARAMETER
| Constructor Detail |
|---|
public Evolve()
| Method Detail |
|---|
public void setState(EvolutionState state)
state - Evolution statepublic EvolutionState getState()
public void restartFromCheckpoint(java.lang.String checkpointFile)
throws java.io.IOException,
org.apache.commons.configuration.ConfigurationException
java.io.IOException
org.apache.commons.configuration.ConfigurationExceptionpublic boolean isRestartedFromCheckpoint()
public void setParameterDatabase(CollectionsParameterDatabase parameters)
throws org.apache.commons.configuration.ConfigurationException
parameters - Parameter database.
org.apache.commons.configuration.ConfigurationExceptionpublic CollectionsParameterDatabase getParameterDatabase()
public void addParameters(org.apache.commons.configuration.AbstractConfiguration config)
throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
public void addParameters(java.io.File parameterFile)
throws java.io.IOException,
org.apache.commons.configuration.ConfigurationException
parameterFile -
java.io.IOException
org.apache.commons.configuration.ConfigurationException
public void addParameters(java.lang.String parameterFilename)
throws java.io.IOException,
org.apache.commons.configuration.ConfigurationException
parameterFilename -
java.io.IOException
org.apache.commons.configuration.ConfigurationExceptionpublic int getCurrentJob()
public int getNumberOfJobs()
public void startJob(int randomSeedOffset)
throws org.apache.commons.configuration.ConfigurationException
randomSeedOffset - Offset value for random number generator seed. Ensures that
consecutive jobs don't use identical random number sequences.
org.apache.commons.configuration.ConfigurationException
public void createEvolutionState(java.lang.String[] args)
throws org.apache.commons.configuration.ConfigurationException
args - Command line arguments.
org.apache.commons.configuration.ConfigurationException
public void createEvolutionState()
throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
public void run()
throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
public void evolve()
throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationExceptionpublic void finishJob(java.io.PrintWriter pw)
public void finishJob()
public static void main(java.lang.String[] args)
public static void processCommandLineArguments(Evolve evolver,
java.lang.String[] args)
throws org.apache.commons.configuration.ConfigurationException,
java.io.IOException
evolver - Evolve objectargs - Command line arguments.
org.apache.commons.configuration.ConfigurationException
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||