LinearDecreasingInertia

class LinearDecreasingInertia(initialInertia: Double = ParticleSwarmSolver.defaultInitialInertia, finalInertia: Double = ParticleSwarmSolver.defaultFinalInertia, horizon: Int = ParticleSwarmSolver.psoDefaultMaxIterations) : InertiaWeightSchedule(source)

A linearly decreasing inertia-weight schedule. The inertia weight decreases linearly from initialInertia toward finalInertia over horizon iterations, then is held at finalInertia. This is the most common PSO inertia schedule.

Parameters

initialInertia

the starting inertia weight. Defaults to ParticleSwarmSolver.defaultInitialInertia.

finalInertia

the floor inertia weight reached at horizon. Must be positive and no greater than initialInertia. Defaults to ParticleSwarmSolver.defaultFinalInertia.

horizon

the number of iterations over which the decrease occurs. Must be >= 1. Defaults to ParticleSwarmSolver.psoDefaultMaxIterations; set it to match the solver's maximum number of iterations for a full decrease across a run.

Constructors

Link copied to clipboard
constructor(initialInertia: Double = ParticleSwarmSolver.defaultInitialInertia, finalInertia: Double = ParticleSwarmSolver.defaultFinalInertia, horizon: Int = ParticleSwarmSolver.psoDefaultMaxIterations)

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun nextInertia(iteration: Int): Double

Computes the inertia weight for the given iteration.

Link copied to clipboard
open override fun toString(): String