Files
heuropt/src/algorithms/mod.rs
T
swaits 6368ca5f3d feat(async): AsyncProblem trait + run_async on RandomSearch and DifferentialEvolution
Adds the headline async/await capability for IO-bound evaluations
(HTTP services, RPC clients, spawned subprocesses) — the
differentiator vs pymoo / hyperopt / MOEA Framework.

No public-API breaks for synchronous users. The new surface is
gated behind a new `async` feature flag.

- core::async_problem::AsyncProblem trait (async fn evaluate_async).
- algorithms::parallel_eval_async::evaluate_batch_async helper using
  futures::stream::FuturesOrdered with concurrency-bounded chunks;
  preserves input order so seeded determinism holds when evaluations
  are themselves deterministic.
- run_async on RandomSearch and DifferentialEvolution.
- examples/async_eval.rs: simulated 20 ms remote service. concurrency=1
  → 4.2 s, concurrency=4 → 2.1 s (2× speedup).

Bumps Cargo.toml to 0.8.0; CHANGELOG entry covers the above plus a
note that 0.6.0/0.7.0 on crates.io are yanked experimentals and 0.8
picks up cleanly from 0.5.
2026-05-06 07:55:56 -06:00

73 lines
1.4 KiB
Rust

//! Built-in reference optimizers.
pub mod age_moea;
pub mod ant_colony_tsp;
pub mod bayesian_opt;
pub mod cma_es;
pub mod differential_evolution;
pub mod epsilon_moea;
pub mod genetic_algorithm;
pub mod grea;
pub mod hill_climber;
pub mod hype;
pub mod hyperband;
pub mod ibea;
pub mod ipop_cma_es;
pub mod knea;
pub mod moead;
pub mod mopso;
pub mod nelder_mead;
pub mod nsga2;
pub mod nsga3;
pub mod one_plus_one_es;
pub mod paes;
pub(crate) mod parallel_eval;
#[cfg(feature = "async")]
pub(crate) mod parallel_eval_async;
pub mod particle_swarm;
pub mod pesa2;
pub mod random_search;
pub mod rvea;
pub mod simulated_annealing;
pub mod sms_emoa;
pub mod snes;
pub mod spea2;
pub mod tabu_search;
pub mod tlbo;
pub mod tpe;
pub mod umda;
pub use age_moea::*;
pub use ant_colony_tsp::*;
pub use bayesian_opt::*;
pub use cma_es::*;
pub use differential_evolution::*;
pub use epsilon_moea::*;
pub use genetic_algorithm::*;
pub use grea::*;
pub use hill_climber::*;
pub use hype::*;
pub use hyperband::*;
pub use ibea::*;
pub use ipop_cma_es::*;
pub use knea::*;
pub use moead::*;
pub use mopso::*;
pub use nelder_mead::*;
pub use nsga2::*;
pub use nsga3::*;
pub use one_plus_one_es::*;
pub use paes::*;
pub use particle_swarm::*;
pub use pesa2::*;
pub use random_search::*;
pub use rvea::*;
pub use simulated_annealing::*;
pub use sms_emoa::*;
pub use snes::*;
pub use spea2::*;
pub use tabu_search::*;
pub use tlbo::*;
pub use tpe::*;
pub use umda::*;