[][src]Module optlib::particleswarm::velocitycalc

Structs

CanonicalVelocityCalculator

CanonicalVelocityCalculator implements the "canonical" equation: v_i = xi * (v_i + phi_p * r_p * (p_i - x_i) + phi_g * r_g * (g_i - x_i)) v_i - velocity projection for dimension i, p_i - personal best coordinate, g_i - global best coordinate, x_i - current coordinate, phi_p, phi_g - parameters, r_p, r_g - random values in (0, 1), xi = 2 * alpha / (phi - 2), phi = phi_p + phi_g alpha in (0, 1), phi must be greater than 4

ClassicVelocityCalculator

ClassicVelocityCalculator implements the equation from the article Kennedy, J.; Eberhart, R. (1995). "Particle Swarm Optimization". Proceedings of IEEE International Conference on Neural Networks IV, pp.1942-1948. v_i = v_i + phi_p * r_p * (p_i - x_i) + phi_g * r_g * (g_i - x_i) v_i - velocity projection for dimension i, p_i - personal best coordinate, g_i - global best coordinate, x_i - current coordinate, phi_p, phi_g - parameters, r_p, r_g - random values in (0, 1)

ConstInertia

The inertia coefficient (w) does not depend on the iteration number

InertiaVelocityCalculator

InertiaVelocityCalculator implements the equation with itertia coefficient w(t) v_i = w(t) * v_i + phi_personal * r_p * (p_i - x_i) + phi_global * r_g * (g_i - x_i) v_i - velocity projection for dimension i, p_i - personal best coordinate, g_i - global best coordinate, x_i - current coordinate, phi_personal, phi_global - parameters, r_p, r_g - random values in (0, 1), w(t) calculate with the Inertia trait, t - iteration number,

LinearInertia

The inertia coefficient decreases linearly from w_max to w_min

NegativeReinforcement

Velocity update with negative reinforcement, global and current best and worst positions. v_i = xi * (v_i + phi_best_personal * rb_p * (p_best_i - x_i) + phi_best_current * rb_c * (c_best_i - x_i) + phi_best_global * rb_g * (g_best_i - x_i) - phi_worst_personal * rw_p * (p_worst_i - x_i) - phi_worst_current * rw_c * (c_worst_i - x_i) - phi_worst_global * rw_g * (g_worst_i - x_i))

Traits

Inertia

The trait to calculate the inertia coefficient (w) for InertiaVelocityCalculator