public class MultiNicheCrowder<T extends Chromosome> extends Crowder<T>
Modifier and Type | Class and Description |
---|---|
static class |
MultiNicheCrowder.CrossoverMethod
Provides the available crossover methods
|
static class |
MultiNicheCrowder.MutationMethod
Provides standard mutation methods
|
static class |
MultiNicheCrowder.SelectionMethod
Provides the available selection methods
|
Operator.Statistics
Modifier and Type | Field and Description |
---|---|
protected Crossover<T> |
crossover
Crossover operator
|
protected int |
crowdingFactor
Crowding factor
|
static MultiNicheCrowder.CrossoverMethod |
DEFAULT_CROSSOVER_METHOD
The default crossover method
|
static double |
DEFAULT_CROSSOVER_PROBABILITY
The default crossover probability
|
static int |
DEFAULT_CROWDING_FACTOR
The default crowding factor
|
static double |
DEFAULT_MUTATION_PROBABILITY
The default mutation probability
|
static int |
DEFAULT_REPLACEMENT_FACTOR
The default replacement factor
|
static int |
DEFAULT_SELECTION_FACTOR
The default selection factor
|
static MultiNicheCrowder.SelectionMethod |
DEFAULT_SELECTION_METHOD
The default selection method
|
protected int |
replacementFactor
Replacement factor
|
protected int |
selectionFactor
Selection factor
|
protected Selector<T> |
selector
Selector operator
|
random, statistics
biggerIsBetter, fitness, ga
Constructor and Description |
---|
MultiNicheCrowder()
Creates MultiNicheCrowder using default options.
|
MultiNicheCrowder(MultiNicheCrowder.SelectionMethod selection)
Creates a MultiNicheCrowder instance
|
MultiNicheCrowder(MultiNicheCrowder.SelectionMethod selection,
MultiNicheCrowder.CrossoverMethod crossmethod)
Creates a MultiNicheCrowder instance
|
MultiNicheCrowder(MultiNicheCrowder.SelectionMethod selection,
MultiNicheCrowder.CrossoverMethod crossmethod,
double crossover,
double mutation)
Creates a MultiNicheCrowder instance
|
MultiNicheCrowder(MultiNicheCrowder.SelectionMethod selectionmethod,
MultiNicheCrowder.CrossoverMethod crossmethod,
double crossover,
double mutation,
int sf,
int cf,
int rf)
Creates a MultiNicheCrowder instance
|
Modifier and Type | Method and Description |
---|---|
int |
getCrowdingFactor()
Returns the crowding factor
|
int |
getReplacementFactor()
Returns the replacement factor
|
int |
getSelectionFactor()
Return the selection factor
|
protected void |
preselect(Population<T> in,
Population<T> out)
Preselection of individuals before processing.
|
protected void |
replace(Population<T> initial,
Population<T> preselected,
Population<T> evolved,
Population<T> out)
Implements the replacement policy.
|
void |
setCrowdingFactor(int crowdingFactor)
Sets the crowding factor
|
void |
setReplacementFactor(int replacementFactor)
Sets the replacement factor
|
void |
setSelectionFactor(int selectionFactor)
Sets the replacement factor
|
getBody, init, isElitist, process, setBiggerIsBetter, setElitist, setFitness, similarity
getStatistics, updateStatistics
dispose, getFitness, isBiggerBetter, isFitnessChanged, setBiggerIsBetter, setFitness
public static final MultiNicheCrowder.SelectionMethod DEFAULT_SELECTION_METHOD
public static final MultiNicheCrowder.CrossoverMethod DEFAULT_CROSSOVER_METHOD
public static final double DEFAULT_CROSSOVER_PROBABILITY
public static final double DEFAULT_MUTATION_PROBABILITY
public static final int DEFAULT_SELECTION_FACTOR
public static final int DEFAULT_CROWDING_FACTOR
public static final int DEFAULT_REPLACEMENT_FACTOR
protected int selectionFactor
protected int crowdingFactor
protected int replacementFactor
protected Crossover<T extends Chromosome> crossover
protected Selector<T extends Chromosome> selector
public MultiNicheCrowder()
public MultiNicheCrowder(MultiNicheCrowder.SelectionMethod selection)
crossmethod
- crossover methodpublic MultiNicheCrowder(MultiNicheCrowder.SelectionMethod selection, MultiNicheCrowder.CrossoverMethod crossmethod)
crossmethod
- crossover methodpublic MultiNicheCrowder(MultiNicheCrowder.SelectionMethod selection, MultiNicheCrowder.CrossoverMethod crossmethod, double crossover, double mutation)
crossmethod
- crossover methodcrossover
- crossover probabilitymutation
- mutation probabilitypublic MultiNicheCrowder(MultiNicheCrowder.SelectionMethod selectionmethod, MultiNicheCrowder.CrossoverMethod crossmethod, double crossover, double mutation, int sf, int cf, int rf)
crossmethod
- crossover methodcrossover
- crossover probabilitymutation
- mutation probabilitysf
- selection factorcf
- crowding factorrf
- replacement factorpublic final int getCrowdingFactor()
public void setCrowdingFactor(int crowdingFactor)
crowdingFactor
- the factorpublic final int getReplacementFactor()
public void setReplacementFactor(int replacementFactor)
replacementFactor
- the factorpublic final int getSelectionFactor()
public void setSelectionFactor(int selectionFactor)
selectionFactor
- the factorprotected void preselect(Population<T> in, Population<T> out)
Crowder
preselect
in class Crowder<T extends Chromosome>
in
- input populationout
- output populationprotected void replace(Population<T> initial, Population<T> preselected, Population<T> evolved, Population<T> out)
Crowder
replace
in class Crowder<T extends Chromosome>
initial
- - the initial populationpreselected
- - the population resulting from preselectionevolved
- - the part of population that has evolvedout
- - the output population