|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectMain.State
Main.AbstractRun
public abstract class AbstractRun
AbstractRun class. Read the parameters. Some classes are dynamically loaded.
| Field Summary | |
|---|---|
protected Collector |
collector
|
protected Initialiser |
initialiser
|
protected java.util.Properties |
properties
|
protected java.lang.String |
propertiesFilePath
|
protected java.lang.String |
stdErr
|
protected java.lang.String |
stdOut
|
| Fields inherited from class Main.State |
|---|
algorithm, rng |
| Constructor Summary | |
|---|---|
AbstractRun()
Creates a new instance of AbstractRun |
|
| Method Summary | |
|---|---|
protected boolean |
commandLineArgs(java.lang.String[] args)
Read the commandline arguments. |
protected boolean |
foundOptimum(boolean stopWhenSolved,
StatCatcher stats)
Check if the global optimum value has been found |
protected IndividualCatcher |
getBestIndiv()
|
protected Collector |
getCollector()
helper method for getting the StatisticsCollectionOperation |
protected CrossoverOperation |
getCrossoverOperation(RandomNumberGenerator rng,
java.util.Properties p)
|
protected FitnessFunction |
getFitnessFunction(java.util.Properties p)
Load the fitness class according to the parameters |
protected GEGrammar |
getGEGrammar(java.util.Properties p)
Load a GEGrammar. |
protected Initialiser |
getInitialiser(GEGrammar g,
RandomNumberGenerator rng,
java.util.Properties p)
Load and initialise the initialiser class according to the parameters Defualt initialiser is the RandomInitialiser. |
protected JoinOperator |
getJoinOperator(java.util.Properties p,
RandomNumberGenerator rng,
Population incPop,
ReplacementOperation rO)
Load the fitness class according to the parameters |
protected MutationOperation |
getMutationOperation(RandomNumberGenerator rng,
java.util.Properties p)
|
protected SelectionOperation |
getSelectionOperation(java.util.Properties p,
RandomNumberGenerator rng)
Load the fitness class according to the parameters |
protected void |
init()
Runs the init pipeline. |
protected void |
printStuff()
Prints the collected statistics |
protected void |
readProperties(java.lang.String[] args)
Read the default properties. |
protected int |
run()
Run the loop pipeline. |
protected void |
setOutput()
|
abstract void |
setup(java.lang.String[] args)
Setup the algorithm. |
| Methods inherited from class Main.State |
|---|
experiment, getAlgorithm, load, save |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String propertiesFilePath
protected Initialiser initialiser
protected java.util.Properties properties
protected java.lang.String stdOut
protected java.lang.String stdErr
protected Collector collector
| Constructor Detail |
|---|
public AbstractRun()
| Method Detail |
|---|
public abstract void setup(java.lang.String[] args)
setup in class Stateargs - argumentsprotected FitnessFunction getFitnessFunction(java.util.Properties p)
p - Properties
protected GEGrammar getGEGrammar(java.util.Properties p)
p - properties file
protected Initialiser getInitialiser(GEGrammar g,
RandomNumberGenerator rng,
java.util.Properties p)
g - GEGrammarrng - RandomNumberGeneratorp - Properties
protected SelectionOperation getSelectionOperation(java.util.Properties p,
RandomNumberGenerator rng)
rng - RandomNumberGeneratorp - Properties
protected JoinOperator getJoinOperator(java.util.Properties p,
RandomNumberGenerator rng,
Population incPop,
ReplacementOperation rO)
p - Propertiesrng - RandomNumberGeneratorincPop - incomming populationrO - replacement operation
protected void init()
protected void printStuff()
protected IndividualCatcher getBestIndiv()
protected int run()
protected boolean foundOptimum(boolean stopWhenSolved,
StatCatcher stats)
stopWhenSolved - if algorithm should terminate when the global optimum is foundstats - stataistics collection
protected MutationOperation getMutationOperation(RandomNumberGenerator rng,
java.util.Properties p)
protected CrossoverOperation getCrossoverOperation(RandomNumberGenerator rng,
java.util.Properties p)
protected Collector getCollector()
protected boolean commandLineArgs(java.lang.String[] args)
args - Command-line arguments
protected void readProperties(java.lang.String[] args)
args - argumentsprotected void setOutput()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||