MCScheduling 1.0
Set of Algorithms for Solving Mixed-Criticality Scheduling
|
The random tournament selection operator implementation. More...
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. |
The random tournament selection operator implementation.
MCScheduling.GeneticAlgorithm.CRandomTournamentSelector.CRandomTournamentSelector | ( | CConfiguration | configuration, |
int | tournamentSize, | ||
double | fitterWinProbability | ||
) |
Instantiates a new random tournament selector.
configuration | The configuration of the genetic algorithm that will utilize this selector. |
tournamentSize | The size of the tournament. |
fitterWinProbability | The probability of fitter chromosome winning a match in the tournament. |
NullReferenceException | If confuguration is null. |
double MCScheduling.GeneticAlgorithm.CRandomTournamentSelector.getFitterWinProbability | ( | ) |
Returns the probability of a fitter chromosome winning a match.
int MCScheduling.GeneticAlgorithm.CRandomTournamentSelector.getTournamentSize | ( | ) |
Returns the tournament size.
void MCScheduling.GeneticAlgorithm.CRandomTournamentSelector.notify | ( | CConfiguration | configuration | ) |
Invoked when the genetic algorithm is about to be executed.
configuration | The 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.
population | The population the chromosome will be selected from. |
matingPool | The mating pool the chromosome will be inserted into. |
toSelectCount | The 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.
fitterWinProbability | The probability that a fitter chromosome wins a match. |
ArgumentOutOfRangeException | If fitterWinProbability is not in the [0,1] interval. |
void MCScheduling.GeneticAlgorithm.CRandomTournamentSelector.setTournamentSize | ( | int | tournamentSize | ) |
Sets the size of the tournament.
tournamentSize | The size of the tournament. |