Package org.opt4j.optimizer.de
Class DifferentialEvolution
java.lang.Object
org.opt4j.core.optimizer.AbstractOptimizer
org.opt4j.optimizer.de.DifferentialEvolution
- All Implemented Interfaces:
Optimizer
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classTheDifferentialEvolution.Tripleis a container for three individuals. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final intprotected final Randomprotected final doubleprotected final SelectorFields inherited from class org.opt4j.core.optimizer.AbstractOptimizer
archive, completer, control, iteration, iterationListeners, optimizing, population, stateListeners -
Constructor Summary
ConstructorsConstructorDescriptionDifferentialEvolution(Population population, Archive archive, IndividualFactory individualFactory, IndividualCompleter completer, Control control, Algebra<Genotype> algebra, Selector selector, Rand random, Crossover<Genotype> crossover, Iteration iteration, int alpha, double scalingFactor) Constructs aDifferentialEvolution. -
Method Summary
Modifier and TypeMethodDescriptionprotected IndividualcreateOffspring(Individual parent, List<Individual> individuals, Term term) protected DifferentialEvolution.TriplegetTriple(Individual parent, List<Individual> individuals) Returns three differentIndividuals from theindividualslist.voidoptimize()Starts the optimization process.Methods inherited from class org.opt4j.core.optimizer.AbstractOptimizer
addOptimizerIterationListener, addOptimizerStateListener, getIteration, injectListeners, isRunning, nextIteration, removeOptimizerIterationListener, removeOptimizerStateListener, startOptimization, stopOptimization
-
Field Details
-
scalingFactor
protected final double scalingFactor -
alpha
protected final int alpha -
algebra
-
crossover
-
selector
-
random
-
-
Constructor Details
-
DifferentialEvolution
@Inject public DifferentialEvolution(Population population, Archive archive, IndividualFactory individualFactory, IndividualCompleter completer, Control control, Algebra<Genotype> algebra, Selector selector, Rand random, Crossover<Genotype> crossover, Iteration iteration, int alpha, double scalingFactor) Constructs aDifferentialEvolution.- Parameters:
population- the populationarchive- the archiveindividualFactory- the individual factorycompleter- the completercontrol- the controlalgebra- the algebra operatorselector- the selectorrandom- the random number generatorcrossover- the crossover operatoriteration- the iteration counteralpha- the population sizescalingFactor- the scaling factor F
-
-
Method Details
-
optimize
Description copied from interface:OptimizerStarts the optimization process.- Throws:
StopException- if the optimization is stoppedTerminationException- if the optimization is terminated
-
createOffspring
-
getTriple
Returns three differentIndividuals from theindividualslist. EachIndividualis not equal to the parent.- Parameters:
parent- the parent Individualindividuals- the population- Returns:
- the three individuals as a Triple
-