|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cilib.pso.velocityupdatestrategies.StandardVelocityUpdate
public class StandardVelocityUpdate
Implementation of the standard / default velocity update equation.
Field Summary | |
---|---|
protected ControlParameter |
cognitiveAcceleration
|
protected ControlParameter |
inertiaWeight
|
protected ControlParameter |
socialAcceleration
|
protected ControlParameter |
vMax
|
Constructor Summary | |
---|---|
StandardVelocityUpdate()
Creates a new instance of StandardVelocityUpdate. |
|
StandardVelocityUpdate(StandardVelocityUpdate copy)
Copy constructor. |
Method Summary | |
---|---|
protected void |
clamp(Vector velocity,
int i)
TODO: Need to have a VMax strategy. |
StandardVelocityUpdate |
getClone()
Clone the VelocityUpdateStrategy object. |
ControlParameter |
getCognitiveAcceleration()
Gets the ControlParameter representing the cognitive component within this VelocityUpdateStrategy . |
ControlParameter |
getInertiaWeight()
Get the ControlParameter representing the inerti weight of the VelocityUpdateStrategy. |
ControlParameter |
getSocialAcceleration()
Get the ControlParameter representing the social component of the velocity update equation. |
ControlParameter |
getVMax()
Get the ControlParameter representing the vMax component. |
void |
setCognitiveAcceleration(ControlParameter cognitiveComponent)
Set the cognitive component ControlParameter . |
void |
setInertiaWeight(ControlParameter inertiaWeight)
Set the ControlParameter for the inertia weight of the velocity update equation. |
void |
setSocialAcceleration(ControlParameter socialComponent)
Set the ControlParameter for the social component. |
void |
setVMax(ControlParameter max)
Set the ControlParameter for the vMax parameter. |
void |
updateControlParameters(Particle particle)
Update the associated ControlParameters for the VelocityUpdateStrategy. |
void |
updateVelocity(Particle particle)
Perform the velocity update for the given Particle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ControlParameter inertiaWeight
protected ControlParameter socialAcceleration
protected ControlParameter cognitiveAcceleration
protected ControlParameter vMax
Constructor Detail |
---|
public StandardVelocityUpdate()
public StandardVelocityUpdate(StandardVelocityUpdate copy)
copy
- The object to copy.Method Detail |
---|
public StandardVelocityUpdate getClone()
getClone
in interface VelocityUpdateStrategy
getClone
in interface Cloneable
Object.clone()
public void updateVelocity(Particle particle)
updateVelocity
in interface VelocityUpdateStrategy
particle
- The Particle velocity that should be updated.public void updateControlParameters(Particle particle)
updateControlParameters
in interface VelocityUpdateStrategy
particle
- The particle for whom the VelocityUpdateStrategy parameters need to be updated.protected void clamp(Vector velocity, int i)
velocity
- The Vector
to be clamped.i
- The dimension index to be clampedpublic ControlParameter getCognitiveAcceleration()
VelocityUpdateStrategy
.
public void setCognitiveAcceleration(ControlParameter cognitiveComponent)
ControlParameter
.
cognitiveComponent
- The cognitiveComponent to set.public ControlParameter getInertiaWeight()
ControlParameter
representing the inerti weight of the VelocityUpdateStrategy.
public void setInertiaWeight(ControlParameter inertiaWeight)
inertiaComponent
- The inertiaComponent to set.public ControlParameter getSocialAcceleration()
public void setSocialAcceleration(ControlParameter socialComponent)
socialComponent
- The socialComponent to set.public ControlParameter getVMax()
ControlParameter
representing the vMax component.
ControlParameter
for the vMax.public void setVMax(ControlParameter max)
max
- The ControlParameter to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |