MCScheduling 1.0
Set of Algorithms for Solving Mixed-Criticality Scheduling
Public Member Functions
MCScheduling.GeneticAlgorithm.CRandomTournamentSelector Class Reference

The random tournament selection operator implementation. More...

Inheritance diagram for MCScheduling.GeneticAlgorithm.CRandomTournamentSelector:
MCScheduling.GeneticAlgorithm.CBaseSelectionOperator MCScheduling.GeneticAlgorithm.IConfigurationDependent MCScheduling.GeneticAlgorithm.CGeneticOperator MCScheduling.GeneticAlgorithm.ISelectionOperator

List of all members.

Public Member Functions

 CRandomTournamentSelector (CConfiguration configuration, int tournamentSize, double fitterWinProbability)
 Instantiates a new random tournament selector.
void notify (CConfiguration configuration)
 Invoked when the genetic algorithm is about to be executed.
void setFitterWinProbability (double fitterWinProbability)
 Sets the probability of a fitter chromosome winning a match.
double getFitterWinProbability ()
 Returns the probability of a fitter chromosome winning a match.
void setTournamentSize (int tournamentSize)
 Sets the size of the tournament.
int getTournamentSize ()
 Returns the tournament size.
void getCompetitorIndices ()
 Fills the array this.m_selected with indices of individuals in the population that have been selected for the tournament.
override void select (CPopulation population, CPopulation matingPool, int toSelectCount)
 Selects a chromosome from the specified population according to its fitness.

Detailed Description

The random tournament selection operator implementation.

Author:
Tomas Tunys

Constructor & Destructor Documentation

MCScheduling.GeneticAlgorithm.CRandomTournamentSelector.CRandomTournamentSelector ( CConfiguration  configuration,
int  tournamentSize,
double  fitterWinProbability 
)

Instantiates a new random tournament selector.

Parameters:
configurationThe configuration of the genetic algorithm that will utilize this selector.
tournamentSizeThe size of the tournament.
fitterWinProbabilityThe probability of fitter chromosome winning a match in the tournament.
Exceptions:
NullReferenceExceptionIf confuguration is null.

Member Function Documentation

double MCScheduling.GeneticAlgorithm.CRandomTournamentSelector.getFitterWinProbability ( )

Returns the probability of a fitter chromosome winning a match.

Returns:
The probability of a fitter chromosome winning a match.
int MCScheduling.GeneticAlgorithm.CRandomTournamentSelector.getTournamentSize ( )

Returns the tournament size.

Returns:
The tournament size.
void MCScheduling.GeneticAlgorithm.CRandomTournamentSelector.notify ( CConfiguration  configuration)

Invoked when the genetic algorithm is about to be executed.

Parameters:
configurationThe configuration of the genetic algorithm that uses this selector.

Implements MCScheduling.GeneticAlgorithm.IConfigurationDependent.

override void MCScheduling.GeneticAlgorithm.CRandomTournamentSelector.select ( CPopulation  population,
CPopulation  matingPool,
int  toSelectCount 
) [virtual]

Selects a chromosome from the specified population according to its fitness.

See the description of the algorithm in the description of this class.

Parameters:
populationThe population the chromosome will be selected from.
matingPoolThe mating pool the chromosome will be inserted into.
toSelectCountThe total number of chromosomes to select.

Implements MCScheduling.GeneticAlgorithm.CBaseSelectionOperator.

void MCScheduling.GeneticAlgorithm.CRandomTournamentSelector.setFitterWinProbability ( double  fitterWinProbability)

Sets the probability of a fitter chromosome winning a match.

Parameters:
fitterWinProbabilityThe probability that a fitter chromosome wins a match.
Exceptions:
ArgumentOutOfRangeExceptionIf fitterWinProbability is not in the [0,1] interval.
void MCScheduling.GeneticAlgorithm.CRandomTournamentSelector.setTournamentSize ( int  tournamentSize)

Sets the size of the tournament.

Parameters:
tournamentSizeThe size of the tournament.
 All Classes Namespaces Functions Variables Properties