lio.search.pso.contchain
Class StdContParticle

java.lang.Object
  extended by lio.search.pso.Particle
      extended by lio.search.pso.contchain.StdContParticle

public class StdContParticle
extends Particle

Implements the particle used in PSO algorithms. Notice that it combines both inertial and Clerc's constraint for velocity updating.


Field Summary
(package private) static double cognitive
          Cognitive component of velocity updating.
(package private) static double constraint
          Constraint for velocity updating
(package private) static double inertia
          Inertia
(package private) static double[][] ranges
          Ranges for each variable.
(package private) static int size
           
(package private) static double social
          Social component of velocity updating.
(package private) static double vmax
          Factor for max velocity according to range.
 
Fields inherited from class lio.search.pso.Particle
bestNeighbour, bestPosition, currentPosition
 
Constructor Summary
StdContParticle(ContChain pCurrentPos)
          Constructor
 
Method Summary
static void calculateConstraint()
          Calculates the constraint in case the parameter is equal to 0 by using clerc's formula.
static void calculateMaxVelocities()
          Calculates the maxVelocity for each component of the particle as a proportion of the range.
 void newPoint()
          Calculates the new point Notice that both constraint(k) and inertia are used.
static void setRanges(double[][] pRanges)
           
 
Methods inherited from class lio.search.pso.Particle
bestValue, getBestNeighbour, getBestPosition, getCurrentPosition, move, setBestNeighbour, setBestPosition, setCurrentPosition, value
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

size

static int size

inertia

static double inertia
Inertia


cognitive

static double cognitive
Cognitive component of velocity updating.


social

static double social
Social component of velocity updating.


constraint

static double constraint
Constraint for velocity updating


vmax

static double vmax
Factor for max velocity according to range. It is the same for each variable.


ranges

static double[][] ranges
Ranges for each variable. Necessary to keep particles in the right domain.

Constructor Detail

StdContParticle

public StdContParticle(ContChain pCurrentPos)
Constructor

Method Detail

setRanges

public static void setRanges(double[][] pRanges)
Parameters:
ranges - the ranges to set

calculateConstraint

public static void calculateConstraint()
Calculates the constraint in case the parameter is equal to 0 by using clerc's formula.


calculateMaxVelocities

public static void calculateMaxVelocities()
Calculates the maxVelocity for each component of the particle as a proportion of the range.


newPoint

public void newPoint()
Calculates the new point Notice that both constraint(k) and inertia are used. They can be fixed so as to use only one of them. If the constraint=1, it has no effect. If the constraint=0, k is calculated with Clerc's formula.

Specified by:
newPoint in class Particle