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
GlobalBestX
Gets each particle's social best position, QuantLib's gBX_.
protected IReadOnlyList<Vector> GlobalBestX { get; }
Property Value
LowerBound
Gets the problem's lower bounds, QuantLib's lX_.
protected Vector LowerBound { get; }
Property Value
PersonalBestF
Gets each particle's personal best value, QuantLib's pBF_.
protected Vector PersonalBestF { get; }
Property Value
PersonalBestX
Gets each particle's personal best position, QuantLib's pBX_.
protected IReadOnlyList<Vector> PersonalBestX { get; }
Property Value
UpperBound
Gets the problem's upper bounds, QuantLib's uX_.
protected Vector UpperBound { get; }
Property Value
V
Gets each particle's velocity, which the inertia scales, QuantLib's V_.
protected IReadOnlyList<Vector> V { get; }
Property Value
X
Gets each particle's position, QuantLib's X_.
protected IReadOnlyList<Vector> X { get; }
Property Value
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
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 abstract void SetValues()