ParticleSwarmSolver

constructor(problemDefinition: ProblemDefinition, evaluator: EvaluatorIfc, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = RNStreamProvider(), swarmSize: Int = defaultSwarmSize, inertiaSchedule: InertiaWeightScheduleIfc? = null, cognitiveCoefficient: Double = defaultCognitiveCoefficient, socialCoefficient: Double = defaultSocialCoefficient, boundaryHandler: BoundaryHandlerIfc = ClampToBounds(), velocityInitializer: VelocityInitializerIfc = ZeroVelocity(), maximumIterations: Int = psoDefaultMaxIterations, replicationsPerEvaluation: ReplicationPerEvaluationIfc, solutionEqualityChecker: SolutionEqualityIfc = InputsAndConfidenceIntervalEquality(), name: String? = null)(source)

Parameters

problemDefinition

the problem being solved

evaluator

the evaluator responsible for assessing the quality of solutions

streamNum

the random number stream number; 0 (the default) means the next available stream

streamProvider

the provider of random number streams; defaults to a fresh RNStreamProvider

swarmSize

the number of particles in the swarm

inertiaSchedule

the inertia-weight schedule; when omitted (null) a LinearDecreasingInertia is created whose horizon matches maximumIterations, so the weight decays across the whole run (raising maximumIterations without also passing a schedule no longer leaves the tail at floor inertia)

cognitiveCoefficient

the cognitive acceleration coefficient c1 (pull toward personal best)

socialCoefficient

the social acceleration coefficient c2 (pull toward global best)

boundaryHandler

how out-of-range positions are handled; defaults to ClampToBounds

velocityInitializer

how initial velocities are set; defaults to ZeroVelocity

maximumIterations

the maximum number of iterations

replicationsPerEvaluation

strategy to determine the number of replications per evaluation

solutionEqualityChecker

used to detect no-improvement convergence. The default is InputsAndConfidenceIntervalEquality.

name

an optional name for the solver


constructor(problemDefinition: ProblemDefinition, evaluator: EvaluatorIfc, streamNum: Int = 0, streamProvider: RNStreamProviderIfc = RNStreamProvider(), swarmSize: Int = defaultSwarmSize, inertiaSchedule: InertiaWeightScheduleIfc? = null, cognitiveCoefficient: Double = defaultCognitiveCoefficient, socialCoefficient: Double = defaultSocialCoefficient, boundaryHandler: BoundaryHandlerIfc = ClampToBounds(), velocityInitializer: VelocityInitializerIfc = ZeroVelocity(), maximumIterations: Int = psoDefaultMaxIterations, replicationsPerEvaluation: Int = defaultReplicationsPerEvaluation, solutionEqualityChecker: SolutionEqualityIfc = InputsAndConfidenceIntervalEquality(), name: String? = null)(source)

Constructs a particle swarm solver using a fixed number of replications per evaluation.

Parameters

replicationsPerEvaluation

the fixed number of replications per evaluation