JSwarm-PSO: Particle swarm optimization

SourceForge.net Logo

JSwarm-PSO is a Particle swarm optimization package written in Java. PSO is an optimization technique used to find global optimum for complex problems. Roughly stated, it's in the same 'category' as Genetic algorithms or Simmilated annealing. If you don't know what PSO is, I recommend you to start reading wikipedia's definition.
JSwarm-PSO is designed to require minimum effort to use while also highly modular.

Optimization example

This example tries to minimize Rastrigin's function which has infinie local minimum and maximum (see Matlab's page for definitions).
You can run the example just typing the command (on unix like enviroments):

	java -jar jswarm-pso_1_0_3.jar 
On Windows it sohuld be enough to just double click on jar file.

How to optimize your own function / model

This is a simple description of the code you'll find in jswarm-pso.example1:

Usuall / Deafult settings

Optimization type:

Particle's velocity update (to understand next settings, you'll probably need to read "Particle position and velocity update") Position restrictions (these restrictions must always be setted): Velocity restrictions:

Particle position and velocity update

Each time the swarm evolves, updates every particle's position and velocity (see jswarm-pso.Particle.update() for details).
Particle's position is updated (for each dimention i):
// Update position
position[i] = position[i] + velocity[i]

While particle's velocity is updated (for each dimention i):
// Update velocity
velocity[i] = inertia * velocity[i] // Inertia
		+ randLocal * particleIncrement * (bestPosition[i] - position[i]) // Local best
		+ randGlobal * globalIncrement * (globalBestPosition[i] - position[i]); // Global best
where randLocal and randGlobal are two random number, uniformly distributted on the interval [0,1].

Frequently asked questions

To do: Future releases


Please send your comments to: Pablo Cingolani <pcingola@users.sourceforge.net> .