eoConstrictedVelocity< POT > Class Template Reference

Constricted velocity performer. More...

#include <eoConstrictedVelocity.h>

Inheritance diagram for eoConstrictedVelocity< POT >:

eoVelocity< POT > eoBF< POT &, unsigned, void > eoFunctorBase List of all members.

Public Types

typedef POT::ParticleVelocityType VelocityType

Public Member Functions

 eoConstrictedVelocity (eoTopology< POT > &_topology, const VelocityType &_coeff, const VelocityType &_c1, const VelocityType &_c2, eoRealVectorBounds &_bounds, eoRealBoundModifier &_bndsModifier, eoRng &_gen=rng)
 Full constructor: Bounds and bound modifier required.
 eoConstrictedVelocity (eoTopology< POT > &_topology, const VelocityType &_coeff, const VelocityType &_c1, const VelocityType &_c2, eoRealVectorBounds &_bounds, eoRng &_gen=rng)
 Constructor: No bound updater required <-> fixed bounds.
 eoConstrictedVelocity (eoTopology< POT > &_topology, const VelocityType &_coeff, const VelocityType &_c1, const VelocityType &_c2, eoRng &_gen=rng)
 Constructor: Neither bounds nor bound updater required <-> free velocity.
void operator() (POT &_po, unsigned _indice)
 Evaluate the new velocities of the given particle.
void updateNeighborhood (POT &_po, unsigned _indice)
 Update the neighborhood of a particle.

Protected Attributes

eoTopology< POT > & topology
const VelocityTypec1
const VelocityTypec2
const VelocityTypecoeff
eoRnggen
eoRealVectorBoundsbounds
eoRealBoundModifierbndsModifier
eoDummyRealBoundModifier dummyModifier

Detailed Description

template<class POT>
class eoConstrictedVelocity< POT >

Constricted velocity performer.

Derivated from abstract eoVelocity, At step t+1 : v(t+1)= C * [ v(t) + c1*r1 * (xbest(t)-x(t)) + c2*r2 * (gbest(t) - x(t)) ] C is fixed for all the particles and all the generations. Default C = 2 * k / abs(2 - P - sqrt (P*(P-4))) (ci and C given;P=c1*r1 + c2*r2 ; Ri chosen at random * in [0;1])

Definition at line 29 of file eoConstrictedVelocity.h.


Constructor & Destructor Documentation

template<class POT>
eoConstrictedVelocity< POT >::eoConstrictedVelocity ( eoTopology< POT > &  _topology,
const VelocityType _coeff,
const VelocityType _c1,
const VelocityType _c2,
eoRealVectorBounds _bounds,
eoRealBoundModifier _bndsModifier,
eoRng _gen = rng 
) [inline]

Full constructor: Bounds and bound modifier required.

Parameters:
_topology - The topology to get the global/local/other best
_coeff - The constriction coefficient
_c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType
_c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType
_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 ?
_boundsModifier - An eoRealBoundModifier used to modify the bounds (for real bounds only).
_gen - The eo random generator, default=rng

Definition at line 49 of file eoConstrictedVelocity.h.

template<class POT>
eoConstrictedVelocity< POT >::eoConstrictedVelocity ( eoTopology< POT > &  _topology,
const VelocityType _coeff,
const VelocityType _c1,
const VelocityType _c2,
eoRealVectorBounds _bounds,
eoRng _gen = rng 
) [inline]

Constructor: No bound updater required <-> fixed bounds.

Parameters:
_topology - The topology to get the global/local/other best
_coeff - The constriction coefficient
_c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType
_c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType
_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 ?
_gen - The eo random generator, default=rng

Definition at line 74 of file eoConstrictedVelocity.h.

template<class POT>
eoConstrictedVelocity< POT >::eoConstrictedVelocity ( eoTopology< POT > &  _topology,
const VelocityType _coeff,
const VelocityType _c1,
const VelocityType _c2,
eoRng _gen = rng 
) [inline]

Constructor: Neither bounds nor bound updater required <-> free velocity.

Parameters:
_topology - The topology to get the global/local/other best
_coeff - The constriction coefficient
_c1 - The first learning factor used for the particle's best. Type must be POT::ParticleVelocityType
_c2 - The second learning factor used for the local/global best(s). Type must be POT::ParticleVelocityType
_gen - The eo random generator, default=rng

Definition at line 96 of file eoConstrictedVelocity.h.


Member Function Documentation

template<class POT>
void eoConstrictedVelocity< POT >::operator() ( POT &  _po,
unsigned  _indice 
) [inline, virtual]

Evaluate the new velocities of the given particle.

Need an indice to identify the particle into the topology. Steps are :

Implements eoBF< POT &, unsigned, void >.

Definition at line 119 of file eoConstrictedVelocity.h.

References eoRealVectorBounds::adjust_size(), eoConstrictedVelocity< POT >::bndsModifier, eoConstrictedVelocity< POT >::bounds, eoConstrictedVelocity< POT >::c1, eoConstrictedVelocity< POT >::c2, eoConstrictedVelocity< POT >::coeff, eoRealBaseVectorBounds::isMaxBounded(), eoRealBaseVectorBounds::isMinBounded(), eoRealBaseVectorBounds::maximum(), eoRealBaseVectorBounds::minimum(), eoConstrictedVelocity< POT >::topology, and eoRng::uniform().


The documentation for this class was generated from the following file:
Generated on Fri Jun 22 10:17:02 2007 for EO-PSO by  doxygen 1.4.7