This class implements the bound handling strategy hyperbolic for the particle swarm optimization. More...
#include <hyperbolic.h>
Public Member Functions | |
std::string | GetName () |
Returns a string representation of this object. More... | |
void | SetParticleUpdate (Particle *p) |
Updates the position of the particle p according to the current position and the new (already calculated) velocity. More... | |
Public Member Functions inherited from highprecisionpso::BoundHandling | |
virtual | ~BoundHandling () |
The destructor. More... | |
virtual std::vector< mpf_t * > | GetDirectionVector (const std::vector< mpf_t * > &position, const std::vector< mpf_t * > &aim) |
Calculates the difference vector between the position and the aim. More... | |
Detailed Description
This class implements the bound handling strategy hyperbolic for the particle swarm optimization.
This bound handling strategy applies at each step. For each dimension the new velocity vel[i] is scaled by 1/(|vel[i]/av| +1), where av is the distance to the search space bound in direction of the velocity. As this bound handling strategy already adjusts the velocity no further velocity adjustment is applied. The new position is calculated by adding the adjusted new velocity to the old position.
Member Function Documentation
|
virtual |
Returns a string representation of this object.
- Returns
- The name of the object.
Implements highprecisionpso::BoundHandling.
|
virtual |
Updates the position of the particle p according to the current position and the new (already calculated) velocity.
First the new velocity vel[i] is scaled by 1/(|vel[i]/av| +1), where av is the distance to the search space bound in direction of the velocity. As this bound handling strategy already adjusts the velocity no further velocity adjustment is applied. The new position is calculated by adding the adjusted new velocity to the old position.
- Parameters
-
p The particle, which should be updated.
Implements highprecisionpso::BoundHandling.
The documentation for this class was generated from the following file:
- src/bound_handling/hyperbolic.h