turboswarm-core
The Rust core of turboswarm — a Particle Swarm Optimization library. Pure Rust, no FFI, zero-cost generics.
The PSO loop knows nothing about any concrete variant: everything that changes
lives behind three traits — SearchSpace, Velocity and Topology. Adding a
variant means implementing one trait, without touching the core.
Features
- Velocity variants: inertia, constriction (Clerc-Kennedy) and FIPS.
- Topologies: global, ring, Von Neumann and random.
- Spaces: continuous, integer (with discretization) and mixed.
- Multi-objective optimization (MOPSO) in
turboswarm_core::mopso. - Parallel objective evaluation (
minimize_parallel, viarayon). - Run control: target / evaluation / time budgets, stagnation, callback.
- Benchmarks with metadata (sphere, rastrigin, rosenbrock, ackley, griewank, schwefel).
Example
use *;
use rastrigin;
let space = uniform;
let velocity = new;
let params = PsoParams ;
let result = new.minimize;
assert!;
The Python bindings live in the turboswarm package
(pip install turboswarm). Full docs: https://turboswarm.github.io/.
License
MIT