Package org.opt4j.optimizer.mopso
Class MOPSO
java.lang.Object
org.opt4j.core.optimizer.AbstractOptimizer
org.opt4j.optimizer.mopso.MOPSO
- All Implemented Interfaces:
Optimizer
The
MOPSO is an implementation of a multi-objective particle swarm
optimizer. This implementation is based on the OMOPSO. Thus, this MOPSO is
restricted to problems that are based on the DoubleGenotype.- See Also:
-
- "Improving PSO-based Multi-Objective Optimization using Crowding, Mutation and e-Dominance, M. Reyes Sierra and C. A. Coello Coello, In Proceedings of Evolutionary Multi-Criterion Optimization, 2005"
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AlgebraDoubleprotected final Archiveprotected final MutationRateprotected final MutateDoubleUniformprotected final ParticleFactoryprotected final Termprotected final Randomprotected final intprotected final MutateDoubleUniformprotected final VelocityTermFields inherited from class org.opt4j.core.optimizer.AbstractOptimizer
archive, completer, control, iteration, iterationListeners, optimizing, population, stateListeners -
Constructor Summary
ConstructorsConstructorDescriptionMOPSO(Population population, Archive archive, IndividualFactory individualFactory, IndividualCompleter completer, Control control, Rand random, MutateDoubleUniform uniform, MutateDoubleNonUniform nonUniform, MutationRate mutationRate, Iteration iteration, int size, int archiveSize) Constructs aMOPSO. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanReturnstrueif the old particle position dominates the new one.getLeaders(Archive leaders, Population population) Assigns eachParticlea leader.protected voidInitialize thePopulation.move(Population population, Map<Particle, Particle> leaders) Determine the new positions for theParticles in thePopulation.voidoptimize()Starts the optimization process.protected voidupdateLeaders(Archive leaders, Population population) Update the global leadersArchive.protected voidupdatePersonalBest(Map<Particle, Particle> next) Update the personal best of eachParticle.Methods inherited from class org.opt4j.core.optimizer.AbstractOptimizer
addOptimizerIterationListener, addOptimizerStateListener, getIteration, injectListeners, isRunning, nextIteration, removeOptimizerIterationListener, removeOptimizerStateListener, startOptimization, stopOptimization
-
Field Details
-
size
protected final int size -
leaders
-
particleFactory
-
algebra
-
random
-
velocityTerm
-
positionTerm
-
uniform
-
nonUniform
-
mutationRate
-
-
Constructor Details
-
MOPSO
@Inject public MOPSO(Population population, Archive archive, IndividualFactory individualFactory, IndividualCompleter completer, Control control, Rand random, MutateDoubleUniform uniform, MutateDoubleNonUniform nonUniform, MutationRate mutationRate, Iteration iteration, int size, int archiveSize) Constructs aMOPSO.- Parameters:
population- the populationarchive- the archiveindividualFactory- the individual (particle) factorycompleter- the completercontrol- the controlrandom- the random number generatoruniform- the uniform mutationnonUniform- the non-uniform mutationmutationRate- the mutation rateiteration- the iteration countersize- the number of particlesarchiveSize- the size of the archive for the global leaders
-
-
Method Details
-
optimize
Description copied from interface:OptimizerStarts the optimization process.- Throws:
StopException- if the optimization is stoppedTerminationException- if the optimization is terminated
-
move
Determine the new positions for theParticles in thePopulation.- Parameters:
population- the populationleaders- the map for the global leaders- Returns:
- the map of the old to the new particle
-
initPopulation
protected void initPopulation()Initialize thePopulation. -
updateLeaders
Update the global leadersArchive.- Parameters:
leaders- the archivepopulation- the population
-
updatePersonalBest
Update the personal best of eachParticle.- Parameters:
next- the old and new positions
-
dominates
Returnstrueif the old particle position dominates the new one.- Parameters:
old- the old particlecurrent- the new particle- Returns:
trueif the old particle position dominates the new one
-
getLeaders
Assigns eachParticlea leader.- Parameters:
leaders- the archive of available leaderpopulation- the population- Returns:
- the map of each particle to its leader
-