public class DifferentialEvolution
extends java.lang.Object
implements org.opt4j.core.optimizer.IterativeOptimizer
Modifier and Type | Class and Description |
---|---|
protected static class |
DifferentialEvolution.Triple
The
DifferentialEvolution.Triple is a container for three individuals. |
Modifier and Type | Field and Description |
---|---|
protected org.opt4j.operators.algebra.Algebra<org.opt4j.core.Genotype> |
algebra |
protected int |
alpha |
protected org.opt4j.operators.crossover.Crossover<org.opt4j.core.Genotype> |
crossover |
protected java.util.Random |
random |
protected double |
scalingFactor |
protected Selector |
selector |
Constructor and Description |
---|
DifferentialEvolution(org.opt4j.core.optimizer.Population population,
org.opt4j.core.IndividualFactory individualFactory,
org.opt4j.core.optimizer.IndividualCompleter completer,
org.opt4j.operators.algebra.Algebra<org.opt4j.core.Genotype> algebra,
Selector selector,
org.opt4j.core.common.random.Rand random,
org.opt4j.operators.crossover.Crossover<org.opt4j.core.Genotype> crossover,
int alpha,
double scalingFactor)
Constructs a
DifferentialEvolution . |
Modifier and Type | Method and Description |
---|---|
protected org.opt4j.core.Individual |
createOffspring(org.opt4j.core.Individual parent,
java.util.List<org.opt4j.core.Individual> individuals,
org.opt4j.operators.algebra.Term term) |
protected DifferentialEvolution.Triple |
getTriple(org.opt4j.core.Individual parent,
java.util.List<org.opt4j.core.Individual> individuals)
Returns three different
Individual s from the individuals
list. |
void |
initialize() |
void |
next() |
protected final double scalingFactor
protected final int alpha
protected final org.opt4j.operators.algebra.Algebra<org.opt4j.core.Genotype> algebra
protected final org.opt4j.operators.crossover.Crossover<org.opt4j.core.Genotype> crossover
protected final Selector selector
protected final java.util.Random random
@Inject public DifferentialEvolution(org.opt4j.core.optimizer.Population population, org.opt4j.core.IndividualFactory individualFactory, org.opt4j.core.optimizer.IndividualCompleter completer, org.opt4j.operators.algebra.Algebra<org.opt4j.core.Genotype> algebra, Selector selector, org.opt4j.core.common.random.Rand random, org.opt4j.operators.crossover.Crossover<org.opt4j.core.Genotype> crossover, int alpha, double scalingFactor)
DifferentialEvolution
.population
- the populationindividualFactory
- the individual factorycompleter
- the completeralgebra
- the algebra operatorselector
- the selectorrandom
- the random number generatorcrossover
- the crossover operatoralpha
- the population sizescalingFactor
- the scaling factor Fpublic void initialize()
initialize
in interface org.opt4j.core.optimizer.IterativeOptimizer
public void next() throws org.opt4j.core.optimizer.TerminationException
next
in interface org.opt4j.core.optimizer.IterativeOptimizer
org.opt4j.core.optimizer.TerminationException
protected org.opt4j.core.Individual createOffspring(org.opt4j.core.Individual parent, java.util.List<org.opt4j.core.Individual> individuals, org.opt4j.operators.algebra.Term term)
protected DifferentialEvolution.Triple getTriple(org.opt4j.core.Individual parent, java.util.List<org.opt4j.core.Individual> individuals)
Individual
s from the individuals
list. Each Individual
is not equal to the parent.parent
- the parent Individualindividuals
- the population