Table of Contents

Class ParticleSwarmOptimizationInertia

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

The inertia that alters the swarm's velocities each iteration: QuantLib's ParticleSwarmOptimization::Inertia.

[Experimental("NQL0001")]
public abstract class ParticleSwarmOptimizationInertia
Inheritance
ParticleSwarmOptimizationInertia
Derived
Inherited Members

Remarks

An extension point, as in QuantLib. The optimizer copies its inertia (Clone()) for each minimization, so each starts from its seeds, where QuantLib's continues from the last; it calls SetSize(int, int, double, EndCriteria), binds the copy to that minimization's swarm, which the protected members read and change, and calls Init().

Constructors

ParticleSwarmOptimizationInertia()

Initializes a new instance of the ParticleSwarmOptimizationInertia class.

protected ParticleSwarmOptimizationInertia()

Properties

GlobalBestF

Gets each particle's social best value, QuantLib's gBF_.

protected Vector GlobalBestF { get; }

Property Value

Vector

GlobalBestX

Gets each particle's social best position, QuantLib's gBX_.

protected IReadOnlyList<Vector> GlobalBestX { get; }

Property Value

IReadOnlyList<Vector>

LowerBound

Gets the problem's lower bounds, QuantLib's lX_.

protected Vector LowerBound { get; }

Property Value

Vector

PersonalBestF

Gets each particle's personal best value, QuantLib's pBF_.

protected Vector PersonalBestF { get; }

Property Value

Vector

PersonalBestX

Gets each particle's personal best position, QuantLib's pBX_.

protected IReadOnlyList<Vector> PersonalBestX { get; }

Property Value

IReadOnlyList<Vector>

UpperBound

Gets the problem's upper bounds, QuantLib's uX_.

protected Vector UpperBound { get; }

Property Value

Vector

V

Gets each particle's velocity, which the inertia scales, QuantLib's V_.

protected IReadOnlyList<Vector> V { get; }

Property Value

IReadOnlyList<Vector>

X

Gets each particle's position, QuantLib's X_.

protected IReadOnlyList<Vector> X { get; }

Property Value

IReadOnlyList<Vector>

Methods

Clone()

A copy for a minimization, unbound, its generators at their seeds.

public abstract ParticleSwarmOptimizationInertia Clone()

Returns

ParticleSwarmOptimizationInertia

The copy.

Init()

Prepares the inertia once it is bound to a swarm, QuantLib's init; nothing by default.

protected virtual void Init()

SetSize(int, int, double, EndCriteria)

Initializes the state for the problem (QuantLib's setSize).

public abstract 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 abstract void SetValues()