net.sourceforge.cilib.pso.velocityupdatestrategies
Class ConstrictionVelocityUpdate

java.lang.Object
  extended by net.sourceforge.cilib.pso.velocityupdatestrategies.ConstrictionVelocityUpdate
All Implemented Interfaces:
Serializable, VelocityUpdateStrategy, Cloneable

public class ConstrictionVelocityUpdate
extends Object
implements VelocityUpdateStrategy

A velocity update strategy that utilizes the constriction coefficient as developed by Clerc.

References:

Note, this strategy does not the inertia control parameter. Certain constraints are imposed on the other control parameters in order to calculate the constriction coefficient, namely: $c1r1 + c2r2 \leq 4$ , and $\kappa \in [0, 1]$

Author:
andrich
See Also:
Serialized Form

Constructor Summary
ConstrictionVelocityUpdate()
          Default constructor.
ConstrictionVelocityUpdate(ConstrictionVelocityUpdate copy)
          Copy constructor.
 
Method Summary
protected  void clamp(Vector velocity, int i)
          Clamp to maximum velocity.
 ConstrictionVelocityUpdate getClone()
          Clone the VelocityUpdateStrategy object.
 ControlParameter getCognitiveAcceleration()
          Get the coginitive acceleration parameter.
 ControlParameter getKappa()
          Get the Kappa control parameter.
 ControlParameter getSocialAcceleration()
          Get the social acceleration parameter.
 ControlParameter getVMax()
          Get the maximum velocity parameter.
 void setCognitiveAcceleration(ControlParameter cognitiveAcceleration)
          Set the coginitive acceleration parameter.
 void setKappa(ControlParameter kappa)
          Set the Kappa control parameter.
 void setSocialAcceleration(ControlParameter socialAcceleration)
          Set the social acceleration parameter.
 void setVMax(ControlParameter vMax)
          Set the maximum velocity parameter.
 void updateControlParameters(Particle particle)
          Update the needed control parameters for the VelocityUpdate, if needed.
 void updateVelocity(Particle particle)
          Perform the velocity update operation on the specified Particle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstrictionVelocityUpdate

public ConstrictionVelocityUpdate()
Default constructor. The values given to the control parameters attempt to adhere to the constraints of calculating the constriction constant, but do not necessarily represent good values.


ConstrictionVelocityUpdate

public ConstrictionVelocityUpdate(ConstrictionVelocityUpdate copy)
Copy constructor.

Parameters:
copy - the ConstrictionVelocityUpdate to copy.
Method Detail

getClone

public ConstrictionVelocityUpdate getClone()
Clone the VelocityUpdateStrategy object.

Specified by:
getClone in interface VelocityUpdateStrategy
Specified by:
getClone in interface Cloneable
Returns:
A cloned VelocityUpdateStrategy
See Also:
Object.clone()

updateVelocity

public void updateVelocity(Particle particle)
Perform the velocity update operation on the specified Particle.

Specified by:
updateVelocity in interface VelocityUpdateStrategy
Parameters:
particle - The Particle to apply the operation on.

clamp

protected void clamp(Vector velocity,
                     int i)
Clamp to maximum velocity.

Parameters:
velocity - The Vector to be clamped.
i - The dimension index to be clamped

updateControlParameters

public void updateControlParameters(Particle particle)
Update the needed control parameters for the VelocityUpdate, if needed.

Specified by:
updateControlParameters in interface VelocityUpdateStrategy
Parameters:
particle - The particle for whom the VelocityUpdateStrategy parameters need to be updated.

getCognitiveAcceleration

public ControlParameter getCognitiveAcceleration()
Get the coginitive acceleration parameter.

Returns:
the cognitive acceleration control parameter .

setCognitiveAcceleration

public void setCognitiveAcceleration(ControlParameter cognitiveAcceleration)
Set the coginitive acceleration parameter.

Parameters:
cognitiveAcceleration - the new cognitive acceleration control parameter .

getKappa

public ControlParameter getKappa()
Get the Kappa control parameter.

Returns:
the kappa control parameter .

setKappa

public void setKappa(ControlParameter kappa)
Set the Kappa control parameter.

Parameters:
kappa - the new kappa control parameter .

getSocialAcceleration

public ControlParameter getSocialAcceleration()
Get the social acceleration parameter.

Returns:
the social acceleration control parameter .

setSocialAcceleration

public void setSocialAcceleration(ControlParameter socialAcceleration)
Set the social acceleration parameter.

Parameters:
socialAcceleration - the new social accerelation control parameter .

getVMax

public ControlParameter getVMax()
Get the maximum velocity parameter.

Returns:
the maximum velocity control parameter .

setVMax

public void setVMax(ControlParameter vMax)
Set the maximum velocity parameter.

Parameters:
vMax - the new maximum velocity control parameter .


Copyright © 2009 CIRG. All Rights Reserved.