jeco.kernel.algorithm.moga
Class SPEA2

java.lang.Object
  extended by jeco.kernel.algorithm.Algorithm
      extended by jeco.kernel.algorithm.moga.SPEA2

public class SPEA2
extends Algorithm

Input parameters: - MAX_GENERATIONS - MAX_POPULATION_SIZE Operators: - CROSSOVER: Crossover operator - MUTATION: Mutation operator - SELECTION: Selection operator

Author:
José L. Risco-Martín

Field Summary
protected  Solutions archive
           
protected  CrossoverOperator crossoverOperator
           
protected  int currentGeneration
           
protected  java.util.Comparator<Solution> dominance
           
protected  int K
           
protected  int maxGenerations
           
protected  int maxPopulationSize
           
protected  MutationOperator mutationOperator
           
protected  Solutions population
           
protected  SelectionOperator selectionOperator
           
 
Fields inherited from class jeco.kernel.algorithm.Algorithm
name, problem
 
Constructor Summary
SPEA2(Problem problem, int maxPopulationSize, int maxGenerations, MutationOperator mutationOperator, CrossoverOperator crossoverOperator, SelectionOperator selectionOperator)
           
 
Method Summary
 void assignFitness(Solutions solutions)
           
 Solutions execute()
           
 void expand(Solutions pop, Solutions all, int nElems)
           
 void initialize()
           
 Solutions reduce(Solutions pop, int maxSize)
           
 Solutions reduceByFitness(Solutions pop)
           
 void setCrossoverOperator(CrossoverOperator crossoverOperator)
           
 void setMaxGenerations(int maxGenerations)
           
 void setMaxPopulationSize(int maxPopulationSize)
           
 void setMutationOperator(MutationOperator mutationOperator)
           
 void setSelectionOperator(SelectionOperator selectionOperator)
           
 void step()
           
 
Methods inherited from class jeco.kernel.algorithm.Algorithm
getName, getProblem, setLevel, setProblem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

maxGenerations

protected int maxGenerations

maxPopulationSize

protected int maxPopulationSize

dominance

protected java.util.Comparator<Solution> dominance

currentGeneration

protected int currentGeneration

population

protected Solutions population

archive

protected Solutions archive

mutationOperator

protected MutationOperator mutationOperator

crossoverOperator

protected CrossoverOperator crossoverOperator

selectionOperator

protected SelectionOperator selectionOperator

K

protected int K
Constructor Detail

SPEA2

public SPEA2(Problem problem,
             int maxPopulationSize,
             int maxGenerations,
             MutationOperator mutationOperator,
             CrossoverOperator crossoverOperator,
             SelectionOperator selectionOperator)
Method Detail

initialize

public void initialize()
Specified by:
initialize in class Algorithm

execute

public Solutions execute()
Specified by:
execute in class Algorithm

step

public void step()
Specified by:
step in class Algorithm

assignFitness

public void assignFitness(Solutions solutions)

reduceByFitness

public Solutions reduceByFitness(Solutions pop)

expand

public void expand(Solutions pop,
                   Solutions all,
                   int nElems)

reduce

public Solutions reduce(Solutions pop,
                        int maxSize)

setMutationOperator

public void setMutationOperator(MutationOperator mutationOperator)

setCrossoverOperator

public void setCrossoverOperator(CrossoverOperator crossoverOperator)

setSelectionOperator

public void setSelectionOperator(SelectionOperator selectionOperator)

setMaxGenerations

public void setMaxGenerations(int maxGenerations)

setMaxPopulationSize

public void setMaxPopulationSize(int maxPopulationSize)