eoExtendedVelocity< POT > Class Template Reference

Extended velocity performer for particle swarm optimization. More...

#include <eoExtendedVelocity.h>

Inheritance diagram for eoExtendedVelocity< POT >:

eoVelocity< POT > eoBF< POT &, unsigned, void > eoFunctorBase

List of all members.

Public Types

typedef POT::ParticleVelocityType VelocityType

Public Member Functions

 eoExtendedVelocity (eoTopology< POT > &_topology, const VelocityType &_w, const VelocityType &_c1, const VelocityType &_c2, const VelocityType &_c3, eoRealVectorBounds &_bounds, eoRealBoundModifier &_bndsModifier, eoRng &_gen=rng)
 Full constructor: Bounds and bound modifier required.
 eoExtendedVelocity (eoTopology< POT > &_topology, const VelocityType &_w, const VelocityType &_c1, const VelocityType &_c2, const VelocityType &_c3, eoRealVectorBounds &_bounds, eoRng &_gen=rng)
 Constructor: No bound updater required <-> fixed bounds.
 eoExtendedVelocity (eoTopology< POT > &_topology, const VelocityType &_w, const VelocityType &_c1, const VelocityType &_c2, const VelocityType &_c3, 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.
eoTopology< POT > & getTopology ()
 eoTopology<POT> getTopology

Protected Attributes

eoTopology< POT > & topology
const VelocityType & omega
const VelocityType & c1
const VelocityType & c2
const VelocityType & c3
eoRealVectorBounds bounds
eoRealBoundModifierbndsModifier
eoRnggen
eoDummyRealBoundModifier dummyModifier


Detailed Description

template<class POT>
class eoExtendedVelocity< POT >

Extended 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 * ( lbest(t) - x(t) ) + c3 * r3 * ( gbest(t) - x(t) ) It includes both a "topology" best and a global best in the social knowledge. Each topology provides a method to retrieve the global best <=> the best of all the neighborhood the topology contains.

Definition at line 43 of file eoExtendedVelocity.h.


Constructor & Destructor Documentation

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

Full constructor: Bounds and bound modifier required.

Parameters:
_topology - The topology
_w - The weight factor.
_c1 - Learning factor used for the particle's best. Type must be POT::ParticleVelocityType
_c2 - Learning factor used for the local best
_c3 - Learning factor used for the global best
_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 64 of file eoExtendedVelocity.h.

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

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

Parameters:
_topology - The topology
_w - The weight factor.
_c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType
_c2 - The third learning factor used for the local best. Type must be POT::ParticleVelocityType
_c3 - Learning factor used for the global best
_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 92 of file eoExtendedVelocity.h.

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

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

Parameters:
_topology - The topology
_w - The weight factor.
_c1 - The second learning factor used for the particle's best. Type must be POT::ParticleVelocityType
_c2 - The third learning factor used for the local best. Type must be POT::ParticleVelocityType
_c3 - Learning factor used for the global best
_gen - The eo random generator, default=rng

Definition at line 117 of file eoExtendedVelocity.h.


Member Function Documentation

template<class POT>
void eoExtendedVelocity< 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.

Parameters:
_po - A particle
_indice - The indice (into the topology) of the given particle

Implements eoBF< POT &, unsigned, void >.

Definition at line 140 of file eoExtendedVelocity.h.

References eoRealVectorBounds::adjust_size(), eoRealBaseVectorBounds::isMaxBounded(), eoRealBaseVectorBounds::isMinBounded(), eoRealBaseVectorBounds::maximum(), eoRealBaseVectorBounds::minimum(), and eoRng::uniform().

template<class POT>
eoTopology<POT>& eoExtendedVelocity< POT >::getTopology (  )  [inline, virtual]

eoTopology<POT> getTopology

Returns:
topology

Implements eoVelocity< POT >.

Definition at line 185 of file eoExtendedVelocity.h.


The documentation for this class was generated from the following file:

Generated on Thu Jan 1 23:19:45 2009 for EvolvingObjects by  doxygen 1.5.5