highprecisionpso::DimensionIndependentUpdater Class Reference

This class implements an update procedure, which acts independent to the coordinate axes. More...

#include <dimension_independent_updater.h>

Inheritance diagram for highprecisionpso::DimensionIndependentUpdater:

Public Member Functions

 DimensionIndependentUpdater (double reduction, int max_directions)
 The constructor. More...
 
std::string GetName ()
 Returns a string representation of this object. More...
 
void Update (Particle *p)
 Processes a single movement of the specified particle. More...
 
- Public Member Functions inherited from highprecisionpso::PositionAndVelocityUpdater
virtual ~PositionAndVelocityUpdater ()
 
virtual void LoadData (std::ifstream *input_stream, ProgramVersion *version_of_stored_data)
 Loads data to reset the state of the position and velocity updater to the state which was stored. More...
 
virtual void StoreData (std::ofstream *output_stream)
 Stores the current state of this position and velocity updater such that it can completely restore the current state with this data. More...
 

Detailed Description

This class implements an update procedure, which acts independent to the coordinate axes.

See update function for detailed information about the update process.

Constructor & Destructor Documentation

highprecisionpso::DimensionIndependentUpdater::DimensionIndependentUpdater ( double  reduction,
int  max_directions 
)

The constructor.

Parameters
reductionThe random proportion in each processed direction.
max_directionsThe maximal number of processed direction in each update process.

Member Function Documentation

std::string highprecisionpso::DimensionIndependentUpdater::GetName ( )
virtual

Returns a string representation of this object.

Returns
The name of the object.

Implements highprecisionpso::PositionAndVelocityUpdater.

void highprecisionpso::DimensionIndependentUpdater::Update ( Particle p)
virtual

Processes a single movement of the specified particle.

Each update is performed in at most max_directions directions. Each update direction is calculated orthogonally to the previous directions and is performed in main movement direction plus some random direction scaled by the specified reduction. The smaller the value of reduction is the greater is the portion of the main movement direction belonging to the first sampled direction.

Formally:

First the previous velocity is scaled by the specified swarm parameter. The main movement direction is the difference vector of local and global attractor if they are not equal. Otherwise the main movement direction is the difference vector of position and any of the equal attractors. If this vector is a zero vector then position and attractors are equal and therefore there is no vector to local/global attractor, which can be scaled randomly.

The directions are sampled iteratively:

Initially there are no used directions.

For d from 1 to (max_directions - 1) do the following:

Choose a direction uniformly at random orthogonal to used directions. The remaining main direction is the part of main movement direction which is orthogonal to used directions. Normalize both directions to unit length. The next direction is then the random direction * reduction + remaining main direction. The smaller the value of reduction is the more of the remaining main direction will be covered by the next direction. Perform standard PSO velocity update with local/global attractor in this direction. Add the next direction to used directions.

After that calculate the orthogonal part of difference vector to attractors and perform standard PSO velocity update in this directions.

Parameters
pThe particle, which should be updated.

Implements highprecisionpso::PositionAndVelocityUpdater.


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