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
Modifier and TypeFieldDescriptionprotected final AlgebraDouble
protected final Archive
protected final MutationRate
protected final MutateDoubleUniform
protected final ParticleFactory
protected final Term
protected final Random
protected final int
protected final MutateDoubleUniform
protected final VelocityTerm
Fields inherited from class org.opt4j.core.optimizer.AbstractOptimizer
archive, completer, control, iteration, iterationListeners, optimizing, population, stateListeners
-
Constructor Summary
ConstructorDescriptionMOPSO
(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 boolean
Returnstrue
if the old particle position dominates the new one.getLeaders
(Archive leaders, Population population) Assigns eachParticle
a leader.protected void
Initialize thePopulation
.move
(Population population, Map<Particle, Particle> leaders) Determine the new positions for theParticle
s in thePopulation
.void
optimize()
Starts the optimization process.protected void
updateLeaders
(Archive leaders, Population population) Update the global leadersArchive
.protected void
updatePersonalBest
(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:Optimizer
Starts the optimization process.- Throws:
StopException
- if the optimization is stoppedTerminationException
- if the optimization is terminated
-
move
Determine the new positions for theParticle
s 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
Returnstrue
if the old particle position dominates the new one.- Parameters:
old
- the old particlecurrent
- the new particle- Returns:
true
if the old particle position dominates the new one
-
getLeaders
Assigns eachParticle
a leader.- Parameters:
leaders
- the archive of available leaderpopulation
- the population- Returns:
- the map of each particle to its leader
-