feat(algorithms): add MOPSO (Multi-Objective Particle Swarm)

Coello, Pulido & Lechuga 2004 MOPSO: PSO adapted for multi-objective
optimization via an external Pareto archive used as the source of
swarm leaders.

Each generation:
- Evaluate every particle's current position
- Insert non-dominated members into the archive (using ParetoArchive)
- For each particle, pick a leader from the archive (uniform random
  among archive members)
- Update velocity using inertia + cognitive (toward pbest) + social
  (toward leader)
- Update positions, clamp to bounds
- Refresh personal bests using Pareto comparison: pbest is replaced
  only when the new position dominates it; on non-dominated, keep
  with 50/50 random tiebreak

Vec<f64> decisions only. Truncates the archive to `archive_size` via
the existing simple-tail truncation. Tests: produces a non-empty
front on Schaffer N.1, deterministic reruns, panic on
single-objective.
This commit is contained in:
2026-05-05 09:51:11 -06:00
parent c04420851e
commit d16e0379a3
3 changed files with 232 additions and 1 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ pub use crate::operators::{
pub use crate::algorithms::{
CmaEs, CmaEsConfig, DifferentialEvolution, DifferentialEvolutionConfig,
GeneticAlgorithm, GeneticAlgorithmConfig, HillClimber, HillClimberConfig, Moead,
MoeadConfig, Nsga2, Nsga2Config, Nsga3, Nsga3Config, Paes, PaesConfig, ParticleSwarm,
MoeadConfig, Mopso, MopsoConfig, Nsga2, Nsga2Config, Nsga3, Nsga3Config, Paes, PaesConfig, ParticleSwarm,
ParticleSwarmConfig, RandomSearch, RandomSearchConfig, SimulatedAnnealing,
SimulatedAnnealingConfig, Spea2, Spea2Config, TabuSearch, TabuSearchConfig,
};