Class EvolutionaryAlgorithm<S extends Solution<?>>
java.lang.Object
org.uma.jmetal.component.algorithm.EvolutionaryAlgorithm<S>
- Type Parameters:
S- Generic type representing the encoding of the solutions
- All Implemented Interfaces:
Serializable,Runnable,Algorithm<List<S>>,ObservableEntity<Map<String,Object>>
public class EvolutionaryAlgorithm<S extends Solution<?>>
extends Object
implements Algorithm<List<S>>, ObservableEntity<Map<String,Object>>
Template for evolutionary algorithms. Its mains features are:
- The steps of the algorithm are carried out by objects (components)
- The algorithms are
ObservableEntity, which can be observed by Observer objects.
- The observable element is a map of pairs (String, Object), which is initialized and
updated by the initProgress() and updateProgress() methods.- Author:
- Antonio J. Nebro (ajnebro@uma.es)
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionEvolutionaryAlgorithm(String name, SolutionsCreation<S> initialPopulationCreation, Evaluation<S> evaluation, Termination termination, Selection<S> selection, Variation<S> variation, Replacement<S> replacement) Constructor -
Method Summary
Modifier and TypeMethodDescriptionlongvoidevaluation(Evaluation<S> evaluation) protected voidname()intresult()voidrun()voidtermination(Termination termination) longvoidupdatePopulation(List<S> newPopulation) protected void
-
Constructor Details
-
EvolutionaryAlgorithm
public EvolutionaryAlgorithm(String name, SolutionsCreation<S> initialPopulationCreation, Evaluation<S> evaluation, Termination termination, Selection<S> selection, Variation<S> variation, Replacement<S> replacement) Constructor- Parameters:
name- Algorithm nameinitialPopulationCreation-evaluation-termination-selection-variation-replacement-
-
-
Method Details
-
run
-
initProgress
protected void initProgress() -
updateProgress
protected void updateProgress() -
currentComputingTime
public long currentComputingTime() -
numberOfEvaluations
public int numberOfEvaluations() -
totalComputingTime
public long totalComputingTime() -
result
-
updatePopulation
-
name
-
description
- Specified by:
descriptionin interfaceAlgorithm<S extends Solution<?>>
-
attributes
-
population
-
observable
- Specified by:
observablein interfaceObservableEntity<S extends Solution<?>>
-
termination
-
termination
-
evaluation
-
evaluation
-