es.udc.gii.common.eaf.algorithm
Class NSGA2Algorithm
java.lang.Object
java.util.Observable
es.udc.gii.common.eaf.algorithm.EvolutionaryAlgorithm
es.udc.gii.common.eaf.algorithm.NSGA2Algorithm
- All Implemented Interfaces:
- Configurable
public class NSGA2Algorithm
- extends EvolutionaryAlgorithm
This class implements the NSGA2 algorithm. It's an algorithm for
multiobjective problems.
The crowding and ranking might be configured by the user
(see Crowding
and NSGA2Ranking
). If nothing is configured,
then ObjectiveSpaceCrowding
for crowding and NSGA2Ranking
for
ranking are used as defaults.
Configuration example:
<Crowding>
<Class> ... </Class>
...
</Crowding>
<Ranking>
<Class> ... </Class>
...
</Ranking>
Crowding
must be an instance of Crowding
and Ranking
must be and instance of NSGA2Ranking
.
- Since:
- 1.0
- Author:
- Grupo Integrado de IngenierĂa (www.gii.udc.es)
Methods inherited from class es.udc.gii.common.eaf.algorithm.EvolutionaryAlgorithm |
evaluate, evaluate, getBestIndividual, getComparator, getEvalChain, getEvaluationStrategy, getFEs, getFinish, getGenerations, getMaxGenerations, getPopulation, getProblem, getReplaceChain, getReproductionChain, getSelectionChain, getState, getStopTest, getUserTag, init, replace, reproduce, resolve, resolve, select, setComparator, setEvalChain, setEvaluationStrategy, setFEs, setFinish, setMaxGenerations, setProblem, setReplaceChain, setReproductionChain, setSelectionChain, setStopTest, setUserTag, updateParameters |
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 |
crowding
private Crowding crowding
ranking
private NSGA2Ranking ranking
NSGA2Algorithm
public NSGA2Algorithm()
configure
public void configure(org.apache.commons.configuration.Configuration conf)
- Description copied from interface:
Configurable
- Configures the specific element that implements this method.
- Specified by:
configure
in interface Configurable
- Overrides:
configure
in class EvolutionaryAlgorithm
- Parameters:
conf
- a Configuration object.- See Also:
Configuration
evaluate
protected void evaluate(Problem problem,
Population population)
- Overrides:
evaluate
in class EvolutionaryAlgorithm
setPopulation
public void setPopulation(Population population)
- Overrides:
setPopulation
in class EvolutionaryAlgorithm
getAlgorithmID
public java.lang.String getAlgorithmID()
- Overrides:
getAlgorithmID
in class EvolutionaryAlgorithm
getCrowding
public Crowding getCrowding()
- Returns:
- The crowding plugin used for computing the crowding distances.
setCrowding
public void setCrowding(Crowding crowding)
- Sets the crowding plugin for computing the crowding distances.
- Parameters:
crowding
- The new crowding plugin.
getRanking
public NSGA2Ranking getRanking()
- Returns:
- The plugin used for calculating the rank of each individual.
setRanking
public void setRanking(NSGA2Ranking ranking)
- Sets the plugin used for calculating the rank of each individual.
- Parameters:
ranking
- The new ranking plugin.