pso

Class PSOEngine

java.lang.Object
  extended by pso.PSOEngine

public class PSOEngine
extends java.lang.Object

Engine for Particle Swarm Optimisation a special kind of stochastic optimisation using particles exploring the state space implements contraction, ring or random topology see www.swarmintelligence.org for additional information


Field Summary
static float c1
          'cognitive'component weight in speed formula parameter (default 2.0)
static float c2
          'social' component weight in speed formula parameter (default 2.0)
static float c3
          'social' component weight in speed formula parameter (default 0.1)
static boolean contract
          flag for contraction variant in PSO set to true if contraction is desired (default false)
static float contractDelta
          contraction step delta (default .01)
static float contraction
          contraction current value (default 1.0)
static int contractStep
          step after which contraction is applied (default 100)
 PsoParticle currParticle
          current particle being evaluated
static int dimension
          parameter space dimension
static Candidate globalBest
          best solution found
static int nRandNeighbour
          number of random neighbours (default 3)
static int nStep
          algorithm step counter
static float omega
          inertia in speed formula parameter (default 0.9)
static boolean ringNeighbour
          flag for ring topology
static int size
          number of particle in swarm (default 10)
static boolean stochastic
          flag for stochastic variant in PSO set to true if stochasticity is desired (default false)
 java.util.ArrayList<PsoParticle> swarm
          array of particles
 
Constructor Summary
PSOEngine(int _dim, Performance _perf)
           
 
Method Summary
 void add(PsoParticle _p)
           
 void computeCurrParticle()
           
 void initialise()
          initialises the pso engine
 void updateCurrParticle(float _perform)
          updates the current particle with the performance result and prepares the evaluation of a new particle
 void updateSwarm()
          performs operations needed when closing a step of the PSO algorithm: 1.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

swarm

public java.util.ArrayList<PsoParticle> swarm
array of particles


size

public static int size
number of particle in swarm (default 10)


dimension

public static int dimension
parameter space dimension


nStep

public static int nStep
algorithm step counter


currParticle

public PsoParticle currParticle
current particle being evaluated


globalBest

public static Candidate globalBest
best solution found


ringNeighbour

public static boolean ringNeighbour
flag for ring topology


nRandNeighbour

public static int nRandNeighbour
number of random neighbours (default 3)


omega

public static float omega
inertia in speed formula parameter (default 0.9)


c1

public static float c1
'cognitive'component weight in speed formula parameter (default 2.0)


c2

public static float c2
'social' component weight in speed formula parameter (default 2.0)


contract

public static boolean contract
flag for contraction variant in PSO set to true if contraction is desired (default false)


contraction

public static float contraction
contraction current value (default 1.0)


contractDelta

public static float contractDelta
contraction step delta (default .01)


contractStep

public static int contractStep
step after which contraction is applied (default 100)


stochastic

public static boolean stochastic
flag for stochastic variant in PSO set to true if stochasticity is desired (default false)


c3

public static float c3
'social' component weight in speed formula parameter (default 0.1)

Constructor Detail

PSOEngine

public PSOEngine(int _dim,
                 Performance _perf)
Method Detail

initialise

public void initialise()
initialises the pso engine


updateCurrParticle

public void updateCurrParticle(float _perform)
updates the current particle with the performance result and prepares the evaluation of a new particle

Parameters:
_perf -

computeCurrParticle

public void computeCurrParticle()

updateSwarm

public void updateSwarm()
performs operations needed when closing a step of the PSO algorithm: 1. get best positions from neighbours 2. compute new position and speed for each particle (3.) contraction


add

public void add(PsoParticle _p)