Package org.opt4j.optimizer.mopso
Class MOPSO
- java.lang.Object
-
- org.opt4j.core.optimizer.AbstractOptimizer
-
- org.opt4j.optimizer.mopso.MOPSO
-
- All Implemented Interfaces:
Optimizer
public class MOPSO extends AbstractOptimizer
TheMOPSOis 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 theDoubleGenotype.- 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
Fields Modifier and Type Field Description protected AlgebraDoublealgebraprotected Archiveleadersprotected MutationRatemutationRateprotected MutateDoubleUniformnonUniformprotected ParticleFactoryparticleFactoryprotected TermpositionTermprotected Randomrandomprotected intsizeprotected MutateDoubleUniformuniformprotected VelocityTermvelocityTerm-
Fields inherited from class org.opt4j.core.optimizer.AbstractOptimizer
archive, completer, control, iteration, iterationListeners, optimizing, population, stateListeners
-
-
Constructor Summary
Constructors Constructor Description 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleandominates(Particle old, Particle current)Returnstrueif the old particle position dominates the new one.protected Map<Particle,Particle>getLeaders(Archive leaders, Population population)Assigns eachParticlea leader.protected voidinitPopulation()Initialize thePopulation.protected Map<Particle,Particle>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 Detail
-
size
protected final int size
-
leaders
protected final Archive leaders
-
particleFactory
protected final ParticleFactory particleFactory
-
algebra
protected final AlgebraDouble algebra
-
random
protected final Random random
-
velocityTerm
protected final VelocityTerm velocityTerm
-
positionTerm
protected final Term positionTerm
-
uniform
protected final MutateDoubleUniform uniform
-
nonUniform
protected final MutateDoubleUniform nonUniform
-
mutationRate
protected final MutationRate mutationRate
-
-
Constructor Detail
-
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 Detail
-
optimize
public void optimize() throws StopException, TerminationExceptionDescription copied from interface:OptimizerStarts the optimization process.- Throws:
StopException- if the optimization is stoppedTerminationException- if the optimization is terminated
-
move
protected Map<Particle,Particle> move(Population population, Map<Particle,Particle> leaders)
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
protected void updateLeaders(Archive leaders, Population population)
Update the global leadersArchive.- Parameters:
leaders- the archivepopulation- the population
-
updatePersonalBest
protected void updatePersonalBest(Map<Particle,Particle> next)
Update the personal best of eachParticle.- Parameters:
next- the old and new positions
-
dominates
protected boolean dominates(Particle old, Particle current)
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
-
-