es.udc.gii.common.eaf.algorithm
Class NSGA2Algorithm

java.lang.Object
  extended by java.util.Observable
      extended by es.udc.gii.common.eaf.algorithm.EvolutionaryAlgorithm
          extended by 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)

Field Summary
private  Crowding crowding
           
private  NSGA2Ranking ranking
           
 
Fields inherited from class es.udc.gii.common.eaf.algorithm.EvolutionaryAlgorithm
CLOSE_LOGS_STATE, EVALUATE_STATE, FINAL_STATE, generations, INIT_EVALUATE_STATE, INIT_STATE, REPLACE_STATE, REPRODUCTION_STATE, SELECT_STATE, state
 
Constructor Summary
NSGA2Algorithm()
           
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration conf)
          Configures the specific element that implements this method.
protected  void evaluate(Problem problem, Population population)
           
 java.lang.String getAlgorithmID()
           
 Crowding getCrowding()
           
 NSGA2Ranking getRanking()
           
 void setCrowding(Crowding crowding)
          Sets the crowding plugin for computing the crowding distances.
 void setPopulation(Population population)
           
 void setRanking(NSGA2Ranking ranking)
          Sets the plugin used for calculating the rank of each individual.
 
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
 

Field Detail

crowding

private Crowding crowding

ranking

private NSGA2Ranking ranking
Constructor Detail

NSGA2Algorithm

public NSGA2Algorithm()
Method Detail

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.