es.udc.gii.common.eaf.algorithm.mga
Class MMGAAlgorithm

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.GeneticAlgorithm
              extended by es.udc.gii.common.eaf.algorithm.mga.AbstractMGAAlgorithm
                  extended by es.udc.gii.common.eaf.algorithm.mga.MMGAAlgorithm
All Implemented Interfaces:
Configurable

public class MMGAAlgorithm
extends AbstractMGAAlgorithm

This class is an implementation of a micro-genetic algorithm for problems with multiple objectives. This algorithm uses an external memory for saving the Pareto-optimal solutions and a population memory which is meant to provide the necessary diversity. See "Multiobjective optimization using a genetic algorithm", Carlos A. Coello Coello, Gregorio Toscano Pulido, for further details.

The user has to provide the following: - a stoptest defining nominal convergence - the number of individuals that are preserved among micro-generations (elitism) - a replace operator for replacing the external memory (Pareto-front) - a replace operator for replacing the population memory - the size of the population memory

Configuration example:

 <ParetoFrontReplaceOperator>
    <Class> es.udc.gii.common.eaf.algorithm.operator.replace.mmga.ParetoFrontReplaceOperator </Class>
    ...
 </ParetoFrontReplaceOperator>
 <PopulationMemorySize> 33 </PopulationMemorySize>
 <PopulationMemoryReplaceOperator>
    <Class> es.udc.gii.common.eaf.algorithm.operator.replace.mmga.PopulationMemoryReplaceOperator </Class>
    ...
 </PopulationMemoryReplaceOperator>

 
Other configuration parameters depend on the concrete operators used and on those inherit by AbstractMGAAlgorithm.

The Class tags show the default values. Omitting those tags will create instances of those classes. The PopulationMemorySize might also be omitted. In such a case, the population size will be a third of the maximum Pareto front size configured for the replace operator of the Pareto front.

The user might provide some initial solutions that will be used as a startpoint for the search (not available for configuration with xml files).

Since:
1.0
Author:
Grupo Integrado de IngenierĂ­a (www.gii.udc.es)
See Also:
AbstractMGAAlgorithm

Field Summary
private  Population paretoFront
          The current Pareto-front.
private  ParetoFrontReplaceOperator paretoFrontReplaceOperator
          Replace operator for the external memory, i.e. the Pareto-front.
private  Population populationMemory
          The population memory.
private  PopulationMemoryReplaceOperator populationMemoryReplaceOperator
          Replace operator for the population memory.
private  int populationMemorySize
          The size of the population memory.
 
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
MMGAAlgorithm()
          Creates a new instance of MMGAAlgorithm
 
Method Summary
protected  void afterMicroEvolution()
          Performs the operations need after a micro-evolution.
protected  void beforeMicroEvolution()
          Performs the operations needed before each micro-evolution.
 void configure(org.apache.commons.configuration.Configuration conf)
          Configures the algorithm.
 java.lang.String getAlgorithmID()
           
 Population getParetoFront()
           
 ParetoFrontReplaceOperator getParetoFrontReplaceOperator()
           
 Population getPopulationMemory()
           
 PopulationMemoryReplaceOperator getPopulationMemoryReplaceOperator()
           
 int getPopulationMemorySize()
           
 void setParetoFront(Population paretoFront)
           
 void setParetoFrontReplaceOperator(ParetoFrontReplaceOperator paretoFrontReplaceOperator)
           
 void setPopulationMemory(Population populationMemory)
           
 void setPopulationMemoryReplaceOperator(PopulationMemoryReplaceOperator populationMemoryReplaceOperator)
           
 void setPopulationMemorySize(int populationMemorySize)
           
 java.lang.String toString()
           
 
Methods inherited from class es.udc.gii.common.eaf.algorithm.mga.AbstractMGAAlgorithm
getElitism, getInitialSolutions, getMicrogenerations, getNominalConvergence, init, resolve, setElitism, setInitialSolutions, setMicrogenerations, setNominalConvergence
 
Methods inherited from class es.udc.gii.common.eaf.algorithm.EvolutionaryAlgorithm
evaluate, evaluate, evaluate, getBestIndividual, getComparator, getEvalChain, getEvaluationStrategy, getFEs, getFinish, getGenerations, getMaxGenerations, getPopulation, getProblem, getReplaceChain, getReproductionChain, getSelectionChain, getState, getStopTest, getUserTag, replace, reproduce, resolve, select, setComparator, setEvalChain, setEvaluationStrategy, setFEs, setFinish, setMaxGenerations, setPopulation, 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, wait, wait, wait
 

Field Detail

paretoFrontReplaceOperator

private ParetoFrontReplaceOperator paretoFrontReplaceOperator
Replace operator for the external memory, i.e. the Pareto-front.


populationMemoryReplaceOperator

private PopulationMemoryReplaceOperator populationMemoryReplaceOperator
Replace operator for the population memory.


populationMemory

private Population populationMemory
The population memory.


paretoFront

private Population paretoFront
The current Pareto-front.


populationMemorySize

private int populationMemorySize
The size of the population memory.

Constructor Detail

MMGAAlgorithm

public MMGAAlgorithm()
Creates a new instance of MMGAAlgorithm

Method Detail

afterMicroEvolution

protected void afterMicroEvolution()
Performs the operations need after a micro-evolution.

Specified by:
afterMicroEvolution in class AbstractMGAAlgorithm

beforeMicroEvolution

protected void beforeMicroEvolution()
Performs the operations needed before each micro-evolution.

Specified by:
beforeMicroEvolution in class AbstractMGAAlgorithm

configure

public void configure(org.apache.commons.configuration.Configuration conf)
Configures the algorithm.

Specified by:
configure in interface Configurable
Overrides:
configure in class AbstractMGAAlgorithm
Parameters:
conf - a Configuration object.
See Also:
Configuration

getParetoFrontReplaceOperator

public ParetoFrontReplaceOperator getParetoFrontReplaceOperator()

setParetoFrontReplaceOperator

public void setParetoFrontReplaceOperator(ParetoFrontReplaceOperator paretoFrontReplaceOperator)

getPopulationMemoryReplaceOperator

public PopulationMemoryReplaceOperator getPopulationMemoryReplaceOperator()

setPopulationMemoryReplaceOperator

public void setPopulationMemoryReplaceOperator(PopulationMemoryReplaceOperator populationMemoryReplaceOperator)

getPopulationMemory

public Population getPopulationMemory()

setPopulationMemory

public void setPopulationMemory(Population populationMemory)

getParetoFront

public Population getParetoFront()

setParetoFront

public void setParetoFront(Population paretoFront)

getPopulationMemorySize

public int getPopulationMemorySize()

setPopulationMemorySize

public void setPopulationMemorySize(int populationMemorySize)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getAlgorithmID

public java.lang.String getAlgorithmID()
Overrides:
getAlgorithmID in class GeneticAlgorithm