es.udc.gii.common.eaf.algorithm
Class EvolutionaryAlgorithm
java.lang.Object
java.util.Observable
es.udc.gii.common.eaf.algorithm.EvolutionaryAlgorithm
- All Implemented Interfaces:
- Configurable
- Direct Known Subclasses:
- CMAEvolutionaryAlgorithm, EvolutionaryStrategy, GeneticAlgorithm, MacroevolutionaryAlgorithm, NSGA2Algorithm, ParallelEvolutionaryAlgorithm
public abstract class EvolutionaryAlgorithm
- extends java.util.Observable
- implements Configurable
This class represents an evolutionary algorithm. This algorithm it will be used
to resolve a problem.
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
INIT_STATE
public static final int INIT_STATE
- See Also:
- Constant Field Values
INIT_EVALUATE_STATE
public static final int INIT_EVALUATE_STATE
- See Also:
- Constant Field Values
SELECT_STATE
public static final int SELECT_STATE
- See Also:
- Constant Field Values
REPRODUCTION_STATE
public static final int REPRODUCTION_STATE
- See Also:
- Constant Field Values
EVALUATE_STATE
public static final int EVALUATE_STATE
- See Also:
- Constant Field Values
REPLACE_STATE
public static final int REPLACE_STATE
- See Also:
- Constant Field Values
FINAL_STATE
public static final int FINAL_STATE
- See Also:
- Constant Field Values
CLOSE_LOGS_STATE
public static final int CLOSE_LOGS_STATE
- See Also:
- Constant Field Values
state
protected int state
population
private Population population
evaluationStrategy
private EvaluationStrategy evaluationStrategy
selectionChain
private OperatorChain<SelectionOperator> selectionChain
reproductionChain
private OperatorChain<ReproductionOperator> reproductionChain
replaceChain
private OperatorChain<ReplaceOperator> replaceChain
evalChain
private OperatorChain<EvaluationOperator> evalChain
problem
private Problem problem
generations
protected int generations
FEs
private int FEs
finish
private boolean finish
maxGenerations
private int maxGenerations
comparator
private FitnessComparator<Individual> comparator
stopTest
private StopTest stopTest
userTag
private java.lang.String userTag
EvolutionaryAlgorithm
public EvolutionaryAlgorithm()
getUserTag
public java.lang.String getUserTag()
setUserTag
public void setUserTag(java.lang.String userTag)
getPopulation
public Population getPopulation()
setPopulation
public void setPopulation(Population population)
getEvaluationStrategy
public EvaluationStrategy getEvaluationStrategy()
setEvaluationStrategy
public void setEvaluationStrategy(EvaluationStrategy evaluationStrategy)
getSelectionChain
public OperatorChain<SelectionOperator> getSelectionChain()
setSelectionChain
public void setSelectionChain(OperatorChain<SelectionOperator> selectionChain)
getReproductionChain
public OperatorChain<ReproductionOperator> getReproductionChain()
setReproductionChain
public void setReproductionChain(OperatorChain<ReproductionOperator> reproductionChain)
getReplaceChain
public OperatorChain<ReplaceOperator> getReplaceChain()
setReplaceChain
public void setReplaceChain(OperatorChain<ReplaceOperator> replaceChain)
getEvalChain
public OperatorChain<EvaluationOperator> getEvalChain()
setEvalChain
public void setEvalChain(OperatorChain<EvaluationOperator> evalChain)
getGenerations
public int getGenerations()
getMaxGenerations
public int getMaxGenerations()
setMaxGenerations
protected void setMaxGenerations(StopTest objective)
setProblem
public void setProblem(Problem problem)
getProblem
public Problem getProblem()
getState
public int getState()
resolve
public void resolve(StopTest objective,
int maxGenerations)
resolve
public void resolve(StopTest objective)
- Parameters:
population
-
init
protected void init()
evaluate
protected void evaluate(Problem problem,
Population population)
select
protected void select(Population toPopulation)
reproduce
protected void reproduce(Population population)
replace
protected void replace(Population toPopulation)
evaluate
public void evaluate(Individual individual)
evaluate
public void evaluate(java.util.List<Individual> individuals)
getFEs
public int getFEs()
setFEs
public void setFEs(int FEs)
setFinish
public void setFinish(boolean finish)
configure
public void configure(org.apache.commons.configuration.Configuration conf)
- Specified by:
configure
in interface Configurable
getFinish
public boolean getFinish()
updateParameters
public void updateParameters()
getAlgorithmID
public java.lang.String getAlgorithmID()
getComparator
public FitnessComparator<Individual> getComparator()
setComparator
public void setComparator(FitnessComparator<Individual> comparator)
getStopTest
public StopTest getStopTest()
getBestIndividual
public Individual getBestIndividual()