Table of Contents

Class ParticleSwarmOptimizationTopology

Namespace
NanoQL.Experimental
Assembly
NanoQL.dll

The topology that sets each particle's social best from the swarm's personal bests each iteration: QuantLib's ParticleSwarmOptimization::Topology.

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

Remarks

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

Constructors

ParticleSwarmOptimizationTopology()

Initializes a new instance of the ParticleSwarmOptimizationTopology class.

protected ParticleSwarmOptimizationTopology()

Properties

GlobalBestF

Gets each particle's social best value, which the topology sets, QuantLib's gBF_.

protected Vector GlobalBestF { get; }

Property Value

Vector

GlobalBestX

Gets each particle's social best position, which the topology sets, QuantLib's gBX_.

protected IReadOnlyList<Vector> GlobalBestX { get; }

Property Value

IReadOnlyList<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>

V

Gets each particle's velocity, 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 ParticleSwarmOptimizationTopology Clone()

Returns

ParticleSwarmOptimizationTopology

The copy.

FindSocialBest()

Sets each particle's social best for the iteration (QuantLib's findSocialBest).

public abstract void FindSocialBest()

RequireBound()

Refuses an unbound topology, as each read of the swarm does.

protected void RequireBound()

Exceptions

NanoQLException

The topology isn't bound to a minimization's swarm.

SetSize(int)

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

public abstract void SetSize(int M)

Parameters

M int

The swarm's size.

SetSocialBest(int, int, double)

Copies a personal best into a particle's social best, in place.

protected void SetSocialBest(int particle, int from, double value)

Parameters

particle int

The particle whose social best it sets.

from int

The personal best's particle.

value double

The social best's value.