added eoExtendedvelocity (+doc + test) that takes both the local best and the global of a PSO topology into account. Also updated the doc tags for the other topologies and velocities
This commit is contained in:
parent
aaa8df129b
commit
78a798d169
7 changed files with 110 additions and 46 deletions
|
|
@ -37,8 +37,9 @@
|
|||
|
||||
|
||||
/** Standard velocity performer for particle swarm optimization. Derivated from abstract eoVelocity,
|
||||
* At step t: v(t+1)= w * v(t) + c1 * r1 * ( xbest(t)-x(t) ) + c2 * r2 * ( gbest(t) - x(t) )
|
||||
* (ci given and Ri chosen at random in [0;1]).
|
||||
* At step t: v(t+1)= w * v(t) + c1 * r1 * ( xbest(t)-x(t) ) + c2 * r2 * ( lbest(t) - x(t) )
|
||||
* lbest depends on the topology evolved, when using eoStarTopology, lbest corresponds to the
|
||||
* global. Otherwise, lbest is a "local best", i.e the best in a neighborhood.
|
||||
*/
|
||||
template < class POT > class eoStandardVelocity:public eoVelocity < POT >
|
||||
{
|
||||
|
|
@ -53,8 +54,8 @@ public:
|
|||
/** Full constructor: Bounds and bound modifier required
|
||||
* @param _topology - The topology to get the global/local/other best
|
||||
* @param _w - The weight factor.
|
||||
* @param _c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType
|
||||
* @param _c2 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType
|
||||
* @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType
|
||||
* @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType
|
||||
* @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities.
|
||||
* If the velocities are not real, they won't be bounded by default. Should have a eoBounds ?
|
||||
* @param _boundsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only).
|
||||
|
|
@ -79,8 +80,8 @@ public:
|
|||
/** Constructor: No bound updater required <-> fixed bounds
|
||||
* @param _topology - The topology to get the global/local/other best
|
||||
* @param _w - The weight factor.
|
||||
* @param _c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType
|
||||
* @param _c2 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType
|
||||
* @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType
|
||||
* @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType
|
||||
* @param _bounds - An eoRealBaseVectorBounds: real bounds for real velocities.
|
||||
* If the velocities are not real, they won't be bounded by default. Should have a eoBounds ?
|
||||
* @param _gen - The eo random generator, default=rng
|
||||
|
|
@ -101,9 +102,10 @@ public:
|
|||
|
||||
|
||||
/** Constructor: Neither bounds nor bound updater required <-> free velocity
|
||||
* @param _topology - The topology to get the global/local/other best
|
||||
* @param _w - The weight factor.
|
||||
* @param _c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType
|
||||
* @param _c2 - The third learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType
|
||||
* @param _c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType
|
||||
* @param _c2 - Learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType
|
||||
* @param _gen - The eo random generator, default=rng
|
||||
*/
|
||||
eoStandardVelocity (eoTopology < POT > & _topology,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue