jeco.kernel.algorithm.moge
Class TournamentSelectMO

java.lang.Object
  extended by Operator.Operations.SelectionOperation
      extended by jeco.kernel.algorithm.moge.TournamentSelectMO
All Implemented Interfaces:
Operator.Operations.Operation, Parameter.ParameterI, Util.Random.Stochastic

public class TournamentSelectMO
extends Operator.Operations.SelectionOperation
implements Util.Random.Stochastic

The operation of this class is tournament selection. The individual with the best fitness from a randomly selected tournament of size tournamentSize is cloned to the selected population.

Author:
J. M. Colmenar

Field Summary
protected  double pressureModifier
           
protected  Util.Random.RandomNumberGenerator rng
           
protected  java.util.List<Individuals.Individual> tour
           
protected  int tournamentSize
           
 
Fields inherited from class Operator.Operations.SelectionOperation
selectedPopulation, size
 
Constructor Summary
TournamentSelectMO()
          New instantion
TournamentSelectMO(Util.Random.RandomNumberGenerator rand, java.util.Properties p)
          Creates a new instance of TournamentSelect
 
Method Summary
 void doOperation(Individuals.Individual indvdl)
           
 void doOperation(java.util.List<Individuals.Individual> operands)
          Individuals from operands will be added to the selected population if they win their tournament.
 Util.Random.RandomNumberGenerator getRNG()
           
 void getTour(java.util.List<Individuals.Individual> operands)
          Adds individual to the tournament by randomly selecting from the operands untill the touramentSize is reached.
 void selectFromTour()
          Select a winner from the tournament and add to the selected population.
 void setProperties(java.util.Properties p)
           
 void setRNG(Util.Random.RandomNumberGenerator m)
           
 
Methods inherited from class Operator.Operations.SelectionOperation
getSelectedPopulation, getSize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rng

protected Util.Random.RandomNumberGenerator rng

tournamentSize

protected int tournamentSize

pressureModifier

protected double pressureModifier

tour

protected java.util.List<Individuals.Individual> tour
Constructor Detail

TournamentSelectMO

public TournamentSelectMO(Util.Random.RandomNumberGenerator rand,
                          java.util.Properties p)
Creates a new instance of TournamentSelect

Parameters:
rand - random number generator
p - properties (including tournament size)

TournamentSelectMO

public TournamentSelectMO()
New instantion

Method Detail

setProperties

public final void setProperties(java.util.Properties p)
Specified by:
setProperties in interface Parameter.ParameterI
Overrides:
setProperties in class Operator.Operations.SelectionOperation

doOperation

public void doOperation(java.util.List<Individuals.Individual> operands)
Individuals from operands will be added to the selected population if they win their tournament.

Specified by:
doOperation in interface Operator.Operations.Operation
Specified by:
doOperation in class Operator.Operations.SelectionOperation
Parameters:
operands - Individuals to be selected from

getTour

public void getTour(java.util.List<Individuals.Individual> operands)
Adds individual to the tournament by randomly selecting from the operands untill the touramentSize is reached.

Parameters:
operands - Individuals that can be selected to the tournament

selectFromTour

public void selectFromTour()
Select a winner from the tournament and add to the selected population.


setRNG

public void setRNG(Util.Random.RandomNumberGenerator m)
Specified by:
setRNG in interface Util.Random.Stochastic

getRNG

public Util.Random.RandomNumberGenerator getRNG()
Specified by:
getRNG in interface Util.Random.Stochastic

doOperation

public void doOperation(Individuals.Individual indvdl)
Specified by:
doOperation in interface Operator.Operations.Operation
Specified by:
doOperation in class Operator.Operations.SelectionOperation