Class LevyFlightInertia
- Namespace
- NanoQL.Experimental
- Assembly
- NanoQL.dll
A Levy flight inertia: while a particle keeps improving its personal best the inertia is a random one, and after
more than threshold iterations without improvement its velocity is a Levy flight, u^(−1/α): QuantLib's
LevyFlightInertia.
[Experimental("NQL0001")]
public sealed class LevyFlightInertia : ParticleSwarmOptimizationInertia
- Inheritance
-
LevyFlightInertia
- Inherited Members
Remarks
The random factor's draws are a Mersenne Twister's and the flight an isotropic walk's on a std::mt19937, its
sphere an ellipsoid over the problem's bounds, all on the seed, which is required: QuantLib's default seeds from the
clock. Each minimization starts them from the seed.
Constructors
LevyFlightInertia(double, int, long)
Initializes a new instance of the LevyFlightInertia class.
public LevyFlightInertia(double alpha, int threshold, long seed)
Parameters
alphadoubleThe flight's exponent α, positive.
thresholdintThe iterations without improvement after which the flight starts.
seedlongThe seed, in [1, 4294967295].
Exceptions
- ArgumentException
alphaisn't positive, with QuantLib's text.- ArgumentOutOfRangeException
seedis outside [1, 4294967295].
Methods
Clone()
A copy for a minimization, unbound, its generators at their seeds.
public override ParticleSwarmOptimizationInertia Clone()
Returns
- ParticleSwarmOptimizationInertia
The copy.
Init()
Prepares the inertia once it is bound to a swarm, QuantLib's init; nothing by default.
protected override void Init()
SetSize(int, int, double, EndCriteria)
Initializes the state for the problem (QuantLib's setSize).
public override void SetSize(int M, int N, double c0, EndCriteria endCriteria)
Parameters
MintThe swarm's size.
NintThe dimension.
c0doubleThe optimizer's inertia.
endCriteriaEndCriteriaThe minimization's end criteria.
SetValues()
Changes the swarm's velocities for the iteration (QuantLib's setValues).
public override void SetValues()