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
+2
View File
@@ -5,6 +5,7 @@ pub mod differential_evolution;
pub mod genetic_algorithm;
pub mod hill_climber;
pub mod moead;
pub mod mopso;
pub mod nsga2;
pub mod nsga3;
pub mod paes;
@@ -20,6 +21,7 @@ pub use differential_evolution::*;
pub use genetic_algorithm::*;
pub use hill_climber::*;
pub use moead::*;
pub use mopso::*;
pub use nsga2::*;
pub use nsga3::*;
pub use paes::*;