Cover of Swarm Intelligence Book

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 [ Show ]
  • Swarm Initialization [ Show ]
  • Stopping Conditions [ Hide ]

    Implementation of Different Stopping Conditions (section 12.1.2, pages 103-105)

    Where are stopping conditions implemented? All stopping conditions are implemented in the stoppingcondition package, which is a global package accessible to all optimization algorithms, and not just PSO.

    How is the stopping condition specified for a simulation? Within the XML file, stopping conditions are specified using the addStoppingCondition tag.

    Which stopping conditions are currently available? The following have already been implemented in the stoppingcondition package:

    • MaximumFitnessEvaluations: If the specified number of fitness function evaluations has been exceeded, the optimization algorithm terminates. The default maximum number of fitness evaluations is 200000, but can be changed via the addStoppingCondition tag by assigning a value to variable maximumFitnessEvaluations. Therefor, assuming the standard PSO implementations, and the default number of particles of 20, the algorithm terminates after 10000 iterations.
    • MaximumIterations: If the specified number of iterations of the optimization algorithm has been exceeded, the search process terminates. The default is set as 1000 iterations, but can be changed via the XML file using the addStoppingCondition tag, assigning a different value to the variable maximumIterations.
    • MaximumRestarts: This stopping condition is used by algorithms that allows total reinitialisation of the algorithm, by reinitialising the particles in the swarm. The search process terminates when the maximum number of restarts has been exceeded. The default value is 10, but can be changed by assigning a different value to the maximumRestarts variable, using the addStoppingCondition tag.
    • MinimumFunctionMinimisationError: This condition terminates the search as soon as the fitness of the best solution (particle) reaches a given tolerance. The default is an error of 1e-10, but can be changed by assigning a different value to the variable minimumError using the addStoppingCondition tag.
    • MinimumSwarmDiameter: This stopping condition terminates the search when the diameter of the swarm is smaller than a specified threshold. The diameter is calculated as the Euclidean distance (the default, which can be changed by assigning a different distance measure) between the two furthest apart particles. The default threshold is 0.0001, but can be changed by assigning a new value to variable minimumSwarmDiameter using the addStoppingCondition tag.
    • OptimiserStalled: Using this stopping condition the search process will stop if the change in the global best solution is less than a specified threshold over a given number of iterations. The change in the best position is measured as the distance between the previous best position, and the new best position. The default distance measure is the AbsoluteDistanceMeasure, implemented in the util package. It simply calculates the sum of absolute difference between the dimensions of the two vectors. The measure used can be changed via the distMeasure variable. The default change threshold is 0.05, and the default number of iterations is 5. These defaults can be changed by assigning new values to variables minChange and maxConsecutiveMinChange respectively, using the addStoppingCondition tag.
    • SingleIteration: This will terminate the search after a single iteration.

  • Neighborhood Topologies [ Show ]