es.udc.gii.common.eaf.algorithm.operator.selection
Class LinearRankingSelection

java.lang.Object
  extended by es.udc.gii.common.eaf.algorithm.operator.selection.SelectionOperator
      extended by es.udc.gii.common.eaf.algorithm.operator.selection.LinearRankingSelection
All Implemented Interfaces:
Operator, Configurable

public class LinearRankingSelection
extends SelectionOperator

In linear ranking selection, the selection probability of each individual is defined as a linear function of the individuals' rank. Linear ranking may implemented by specifying the expected number of offspring of the best individual of each generation.

Let us denote as max the expected number of offspring of the best individual in the population and min the expected number of offspring of the worst individual in the population. If the population size is constant, we have:

min=2-max

From the condition:

min≥0

we obtaint: max≤2

Since it is natural to suppose that:

min≤max

so it follows:

max≥1

The user has to define the value of max taking into account that 1≤max≥2.

The xml code for this operator in the config file is:

<Operator>

<Class>es.udc.gii.common.eaf.algorithm.operator.selection.LinearRankingSelection</Class>

<Max>2</Max>

<Comparator>es.udc.gii.common.eaf.algorithm.fitness.comparator.LessFitnessComparator</Comparator>

</Operator>

Author:
pilar

Field Summary
private  double max
           
 
Constructor Summary
LinearRankingSelection()
          Creates a new instance of LinearRankingSelection
 
Method Summary
 void configure(org.apache.commons.configuration.Configuration conf)
           
protected  Individual select(EvolutionaryAlgorithm algorithm, java.util.List<Individual> individuals)
           
 
Methods inherited from class es.udc.gii.common.eaf.algorithm.operator.selection.SelectionOperator
operate, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

max

private double max
Constructor Detail

LinearRankingSelection

public LinearRankingSelection()
Creates a new instance of LinearRankingSelection

Method Detail

configure

public void configure(org.apache.commons.configuration.Configuration conf)
Specified by:
configure in interface Configurable
Overrides:
configure in class SelectionOperator

select

protected Individual select(EvolutionaryAlgorithm algorithm,
                            java.util.List<Individual> individuals)
Specified by:
select in class SelectionOperator