Class MOPSO

  • All Implemented Interfaces:
    org.opt4j.core.optimizer.IterativeOptimizer

    public class MOPSO
    extends java.lang.Object
    implements org.opt4j.core.optimizer.IterativeOptimizer
    The 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.
    • Field Detail

      • size

        protected final int size
      • leaders

        protected final org.opt4j.core.optimizer.Archive leaders
      • algebra

        protected final org.opt4j.operators.algebra.AlgebraDouble algebra
      • random

        protected final java.util.Random random
      • positionTerm

        protected final org.opt4j.operators.algebra.Term positionTerm
      • mutationRate

        protected final org.opt4j.operators.mutate.MutationRate mutationRate
    • Constructor Detail

      • MOPSO

        @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)
        Constructs a MOPSO.
        Parameters:
        population - the population
        individualFactory - the individual (particle) factory
        completer - the completer
        random - the random number generator
        uniform - the uniform mutation
        nonUniform - the non-uniform mutation
        mutationRate - the mutation rate
        size - the number of particles
        archiveSize - the size of the archive for the global leaders
    • Method Detail

      • initialize

        public void initialize()
        Specified by:
        initialize in interface org.opt4j.core.optimizer.IterativeOptimizer
      • next

        public void next()
                  throws org.opt4j.core.optimizer.TerminationException
        Specified by:
        next in interface org.opt4j.core.optimizer.IterativeOptimizer
        Throws:
        org.opt4j.core.optimizer.TerminationException
      • move

        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 Particles in the Population.
        Parameters:
        population - the population
        leaders - the map for the global leaders
        Returns:
        the map of the old to the new particle
      • updateLeaders

        protected void updateLeaders​(org.opt4j.core.optimizer.Archive leaders,
                                     org.opt4j.core.optimizer.Population population)
        Update the global leaders Archive.
        Parameters:
        leaders - the archive
        population - the population
      • updatePersonalBest

        protected void updatePersonalBest​(java.util.Map<Particle,​Particle> next)
        Update the personal best of each Particle.
        Parameters:
        next - the old and new positions
      • dominates

        protected boolean dominates​(Particle old,
                                    Particle current)
        Returns true if the old particle position dominates the new one.
        Parameters:
        old - the old particle
        current - the new particle
        Returns:
        true if the old particle position dominates the new one
      • getLeaders

        protected java.util.Map<Particle,​Particle> getLeaders​(org.opt4j.core.optimizer.Archive leaders,
                                                                    org.opt4j.core.optimizer.Population population)
        Assigns each Particle a leader.
        Parameters:
        leaders - the archive of available leader
        population - the population
        Returns:
        the map of each particle to its leader