Table of Contents

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

alpha double

The flight's exponent α, positive.

threshold int

The iterations without improvement after which the flight starts.

seed long

The seed, in [1, 4294967295].

Exceptions

ArgumentException

alpha isn't positive, with QuantLib's text.

ArgumentOutOfRangeException

seed is 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

M int

The swarm's size.

N int

The dimension.

c0 double

The optimizer's inertia.

endCriteria EndCriteria

The minimization's end criteria.

SetValues()

Changes the swarm's velocities for the iteration (QuantLib's setValues).

public override void SetValues()