Cover of Swarm Intelligence Book
Andries P Engelbrecht Fundamentals of Computational Swarm Intelligence

Particle Swarm Optimisation Algorithms

The following classes are available (all discussions assume CIlib version 0.5, and therefor assumes the same directory structure as used in CIlib):

  • gbest PSO [ Show ]
  • lbest PSO [ Hide ]

    Find below the XML specification for a standard Local Best PSO implementation (section 12.1.2).

    <simulator>
      <algorithms>
        <algorithmid="lbest-pso"class="pso.PSO">
          <topologyclass="entity.topologies.LBestTopology">
            <neighbourhoodSizeclass="controlparameter.ConstantControlParameter"parameter="3"/>
          </topology>
          <iterationStrategyclass="pso.iterationstrategies.ASynchronousIterationStrategy"/>
          <initialisationStrategyclass="algorithm.initialisation.ClonedPopulationInitialisationStrategy">
            <prototypeEntityclass="pso.particle.StandardParticle">
              <positionUpdateStrategyclass="pso.positionupdatestrategies.StandardPositionUpdateStrategy"/>
              <velocityUpdateStrategyclass="pso.velocityupdatestrategies.StandardVelocityUpdate">
                <inertiaWeightclass="controlparameter.ConstantControlParameter"parameter="0.729844"/>
                <cognitiveAccelerationclass="controlparameter.RandomizingControlParameter"parameter="1.496180"/>
                <socialAccelerationclass="controlparameter.RandomizingControlParameter"parameter="1.496180"/>
                <vMaxclass="controlparameter.ConstantControlParameter"parameter="2.0"/>
              </velocityUpdateStrategy>
              <velocityInitialisationStrategyclass="pso.particle.initialisation.RandomInitialVelocityStrategy"/>
            </prototypeEntity>
            <entityNumbervalue="30"/>
          </initialisationStrategy>
        </algorithm>
      </algorithms>
      <problems>
        <problemid="griewank"class="problem.FunctionMinimisationProblem">
          <functionclass="functions.continuous.Griewank"domain="R(-600, 600)^30"/>
        </problem>
      </problems>
      <measurementsid="measurements"class="simulator.MeasurementSuite"resolution="1"samples="30">
        <addMeasurementclass="measurement.single.Fitness"/>
        <addMeasurementclass="measurement.single.Diversity"/>
        <addMeasurementclass="measurement.single.FitnessEvaluations"/>
      </measurements>
      <simulations>
        <simulation>
          <algorithmidref="lbest-pso">
            <addStoppingConditionclass="stoppingcondition.MaximumIterations"maximumIterations=" 1000 "/>
          </algorithm>
          <problemidref="griewank"/>
          <measurementsidref="measurements"file="data/griewank.lbest.p_30.w_0_72.c1_1_49.c2_1_49.vmax_2.txt"/>
        </simulation>
      </simulations>
    </simulator>

    Click here to download this file.

    The XML file above provides a specification for a simulation which executes a standard local best (lbest) PSO (Algorithm 12.2 on page 97) on the spherical (page 25) and bohachevksy functions. Results of the simulations are written to the data/spherical.lbest.defaults.txt and data/bohachevksy1.lbest.defaults.txt files respectively.

    Using the defaults The XML specification above is not as detailed as that given for the gbest PSO. Here the defaults as specified in the implementation of the algorithm are used. These defaults are as given in the discussion on gbest PSO.

    How to specify the neighborhood size? The size of neighborhoods, which are currently only determined based on particle indices (equation 12.8, page 96), is specified via the neighbourhoodSize attribute (3 is the default). The size is the total number of particles including the particle itself.

    Can any of the parameters and behaviours of the algorithm be changed? Certainly! Have a look at the gbest PSO discussion. Any of the parameters/behaviours mentioned there can be changed using any of the classes available in the corresponding package.

    Which velocity update is used? The velocity update (equation 12.6, page 96) for lbest PSO is used as default.

  • Swarm Initialization [ Show ]
  • Stopping Conditions [ Show ]
  • Neighborhood Topologies [ Show ]