public class MOPSO
extends java.lang.Object
implements org.opt4j.core.optimizer.IterativeOptimizer
MOPSO
is an implementation of a multi-objective particle swarm
optimizer, see "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". This
implementation is based on the OMOPSO. Thus, this MOPSO is restricted to
problems that are based on the DoubleGenotype
.Modifier and Type | Field and Description |
---|---|
protected org.opt4j.operators.algebra.AlgebraDouble |
algebra |
protected org.opt4j.core.optimizer.Archive |
leaders |
protected org.opt4j.operators.mutate.MutationRate |
mutationRate |
protected MutateDoubleUniform |
nonUniform |
protected ParticleFactory |
particleFactory |
protected org.opt4j.operators.algebra.Term |
positionTerm |
protected java.util.Random |
random |
protected int |
size |
protected MutateDoubleUniform |
uniform |
protected VelocityTerm |
velocityTerm |
Constructor and Description |
---|
MOPSO(org.opt4j.core.optimizer.Population population,
org.opt4j.core.IndividualFactory individualFactory,
org.opt4j.core.optimizer.IndividualCompleter completer,
org.opt4j.core.common.random.Rand random,
MutateDoubleUniform uniform,
MutateDoubleNonUniform nonUniform,
org.opt4j.operators.mutate.MutationRate mutationRate,
int size,
int archiveSize)
Constructs a
MOPSO . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
dominates(Particle old,
Particle current)
Returns
true if the old particle position dominates the new one. |
protected java.util.Map<Particle,Particle> |
getLeaders(org.opt4j.core.optimizer.Archive leaders,
org.opt4j.core.optimizer.Population population)
Assigns each
Particle a leader. |
void |
initialize() |
protected java.util.Map<Particle,Particle> |
move(org.opt4j.core.optimizer.Population population,
java.util.Map<Particle,Particle> leaders)
Determine the new positions for the
Particle s in the
Population . |
void |
next() |
protected void |
updateLeaders(org.opt4j.core.optimizer.Archive leaders,
org.opt4j.core.optimizer.Population population)
Update the global leaders
Archive . |
protected void |
updatePersonalBest(java.util.Map<Particle,Particle> next)
Update the personal best of each
Particle . |
protected final int size
protected final org.opt4j.core.optimizer.Archive leaders
protected final ParticleFactory particleFactory
protected final org.opt4j.operators.algebra.AlgebraDouble algebra
protected final java.util.Random random
protected final VelocityTerm velocityTerm
protected final org.opt4j.operators.algebra.Term positionTerm
protected final MutateDoubleUniform uniform
protected final MutateDoubleUniform nonUniform
protected final org.opt4j.operators.mutate.MutationRate mutationRate
@Inject public MOPSO(org.opt4j.core.optimizer.Population population, org.opt4j.core.IndividualFactory individualFactory, org.opt4j.core.optimizer.IndividualCompleter completer, org.opt4j.core.common.random.Rand random, MutateDoubleUniform uniform, MutateDoubleNonUniform nonUniform, org.opt4j.operators.mutate.MutationRate mutationRate, int size, int archiveSize)
MOPSO
.population
- the populationindividualFactory
- the individual (particle) factorycompleter
- the completerrandom
- the random number generatoruniform
- the uniform mutationnonUniform
- the non-uniform mutationmutationRate
- the mutation ratesize
- the number of particlesarchiveSize
- the size of the archive for the global leaderspublic 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 java.util.Map<Particle,Particle> move(org.opt4j.core.optimizer.Population population, java.util.Map<Particle,Particle> leaders)
Particle
s in the
Population
.population
- the populationleaders
- the map for the global leadersprotected void updateLeaders(org.opt4j.core.optimizer.Archive leaders, org.opt4j.core.optimizer.Population population)
Archive
.leaders
- the archivepopulation
- the populationprotected void updatePersonalBest(java.util.Map<Particle,Particle> next)
Particle
.next
- the old and new positionsprotected boolean dominates(Particle old, Particle current)
true
if the old particle position dominates the new one.old
- the old particlecurrent
- the new particletrue
if the old particle position dominates the new oneprotected java.util.Map<Particle,Particle> getLeaders(org.opt4j.core.optimizer.Archive leaders, org.opt4j.core.optimizer.Population population)
Particle
a leader.leaders
- the archive of available leaderpopulation
- the population