es.udc.gii.common.eaf.algorithm.operator.replace
Class ElitismOperator

java.lang.Object
  extended by java.util.Observable
      extended by es.udc.gii.common.eaf.algorithm.operator.replace.ReplaceOperator
          extended by es.udc.gii.common.eaf.algorithm.operator.replace.ElitismOperator
All Implemented Interfaces:
Operator, Configurable

public class ElitismOperator
extends ReplaceOperator

This operator implements a replace operator with elitism. From the i-population the operator choose the elitism best individuals and change it from the elitism worst individuals of the (i+1)-population. So the parameter elitism indicates the number of individuals that survive to the next generation.

The code to config this operator is:

 <Operator>
      <Class>es.udc.gii.common.eaf.algorithm.operator.replace.ElitismOperator</Class>
      <Elitism>value</Elitism>
 </Operator>
 
 
Where Elitism is an integer that indicates the number of individuals that survive from one generation to the next one. If this parameter does not appear in the configuration, it is set to its default value.

Default values:

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

Field Summary
private  int elitism
           
 
Constructor Summary
ElitismOperator()
          Creates a new instance of ElitismOperator
ElitismOperator(int elitism)
           
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration conf)
          Configures the specific element that implements this method.
protected  java.util.List<Individual> replace(EvolutionaryAlgorithm algorithm, java.util.List<Individual> toPopulation)
           
 
Methods inherited from class es.udc.gii.common.eaf.algorithm.operator.replace.ReplaceOperator
operate
 
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

elitism

private int elitism
Constructor Detail

ElitismOperator

public ElitismOperator()
Creates a new instance of ElitismOperator


ElitismOperator

public ElitismOperator(int elitism)
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 ReplaceOperator
Parameters:
conf - a Configuration object.
See Also:
Configuration

replace

protected java.util.List<Individual> replace(EvolutionaryAlgorithm algorithm,
                                             java.util.List<Individual> toPopulation)
Specified by:
replace in class ReplaceOperator