public class EvolutionaryAlgorithmModule
extends org.opt4j.core.optimizer.OptimizerModule
EvolutionaryAlgorithmModule
configures the
EvolutionaryAlgorithm
.Modifier and Type | Class and Description |
---|---|
static class |
EvolutionaryAlgorithmModule.CrossoverRateType
The
EvolutionaryAlgorithmModule.CrossoverRateType allows to choose between different types of
crossover rates. |
Modifier and Type | Field and Description |
---|---|
protected int |
alpha |
protected double |
crossoverRate |
protected EvolutionaryAlgorithmModule.CrossoverRateType |
crossoverRateType |
protected int |
generations |
protected int |
lambda |
protected int |
mu |
Constructor and Description |
---|
EvolutionaryAlgorithmModule() |
Modifier and Type | Method and Description |
---|---|
void |
config() |
int |
getAlpha()
Returns the population size
alpha . |
double |
getCrossoverRate()
Returns the used crossover rate.
|
EvolutionaryAlgorithmModule.CrossoverRateType |
getCrossoverRateType()
Returns the type of crossover rate that is used.
|
int |
getGenerations()
Returns the number of generations.
|
int |
getLambda()
Returns the number of children
lambda . |
int |
getMu()
Returns the number of parents
mu . |
void |
setAlpha(int alpha)
Sets the population size
alpha . |
void |
setCrossoverRate(double crossoverRate)
Sets the crossover rate.
|
void |
setCrossoverRateType(EvolutionaryAlgorithmModule.CrossoverRateType crossoverRateType)
Sets the type of crossover rate to use.
|
void |
setGenerations(int generations)
Sets the number of generations.
|
void |
setLambda(int lambda)
Sets the number of children
lambda . |
void |
setMu(int mu)
Sets the number of parents
mu . |
bindIterativeOptimizer, bindOptimizer
addControlListener, addIndividualStateListener, addOptimizerIterationListener, addOptimizerStateListener, bindConstant, bindConstant, bindConstant, bindConstant, configure, constant, multi
addError, addError, addError, bind, bind, bind, bindConstant, binder, bindInterceptor, bindListener, bindListener, bindScope, configure, convertToTypes, currentStage, getMembersInjector, getMembersInjector, getProvider, getProvider, install, requestInjection, requestStaticInjection, requireBinding, requireBinding
protected int generations
protected int alpha
protected int mu
protected int lambda
protected double crossoverRate
protected EvolutionaryAlgorithmModule.CrossoverRateType crossoverRateType
public int getAlpha()
alpha
.setAlpha(int)
public void setAlpha(int alpha)
alpha
.alpha
- the population size to setgetAlpha()
public int getGenerations()
setGenerations(int)
public void setGenerations(int generations)
generations
- the number of generationsgetGenerations()
public int getLambda()
lambda
.setLambda(int)
public void setLambda(int lambda)
lambda
.lambda
- the number of childrengetLambda()
public int getMu()
mu
.setMu(int)
public void setMu(int mu)
mu
.mu
- the number of parentsgetMu()
public EvolutionaryAlgorithmModule.CrossoverRateType getCrossoverRateType()
setCrossoverRateType(org.opt4j.optimizers.ea.EvolutionaryAlgorithmModule.CrossoverRateType)
public void setCrossoverRateType(EvolutionaryAlgorithmModule.CrossoverRateType crossoverRateType)
crossoverRateType
- the crossoverRateType to setgetCrossoverRateType()
public double getCrossoverRate()
setCrossoverRate(double)
public void setCrossoverRate(double crossoverRate)
crossoverRate
- the crossoverRate to setgetCrossoverRate()
public void config()
config
in class org.opt4j.core.start.Opt4JModule