Skip to main content

basin/
solver.rs

1/// Augmented-Lagrangian method for linear equality constraints `A x = b`
2/// (penalty + multiplier updates over any unconstrained inner solver;
3/// tolerates infeasible starts).
4pub mod augmented_lagrangian_method;
5/// Two-phase log-barrier method for linear inequality constraints `A x ≤ b`;
6/// automatically finds a strictly feasible start when one exists.
7pub mod barrier_method;
8/// Basin-hopping (Wales & Doye 1997): Metropolis Monte-Carlo walk over the
9/// `Ẽ(x) = min{f(x)}` transform, wrapping any [`WarmStart`](crate::core::inner::WarmStart)
10/// local solver with a pluggable step taker and acceptance test.
11pub mod basin_hopping;
12/// Box-constrained CMA-ES with adaptive quadratic boundary penalty
13/// (Hansen `BoundPenalty`, the default in pycma).
14pub mod bounded_cma_es;
15/// Memetic [`BoundedCmaEs`] with
16/// Hansen-2011 injection: sibling of [`cma_inject`] over the bounded
17/// outer. Inners: Nelder-Mead, Levenberg-Marquardt, L-BFGS-B.
18pub mod bounded_cma_inject;
19/// Levenberg-Marquardt with Coleman-Li box scaling.
20pub mod bounded_levenberg_marquardt;
21/// Brent's method (1D root or minimum bracketing).
22pub mod brent;
23/// Brent's method using first derivatives ("dbrent", 1D minimization).
24pub mod brent_derivative;
25/// Hansen 2016 (µ/µ_W, λ)-CMA-ES with negative weights.
26pub mod cma_es;
27/// Memetic CMA-ES with Hansen-2011 injection. Inners: Nelder-Mead,
28/// Levenberg-Marquardt. For L-BFGS-B inner with consistent bound
29/// handling, see [`bounded_cma_inject`].
30pub mod cma_inject;
31/// Configurable differential evolution: Storn-Price 1997 global
32/// optimizer on a feasible box, fully backend-generic.
33pub mod de;
34/// Memetic [`De`] with per-generation top-k local refinement: the
35/// DE-flavored sibling of [`cma_inject`]. Inners: Nelder-Mead,
36/// Levenberg-Marquardt, L-BFGS-B.
37pub mod de_inject;
38/// Original DIRECT: deterministic global optimization over finite box bounds.
39pub mod direct;
40/// Pure Gauss-Newton solver for nonlinear least squares.
41pub mod gauss_newton;
42/// Globalized Bounded Nelder-Mead with probabilistic restarts.
43pub mod gbnm;
44/// Synchronous global-best particle swarm optimization.
45pub mod global_best_pso;
46/// Golden-section search (1D minimization on a bracketed interval).
47pub mod golden_section;
48/// Steepest-descent solver with a pluggable line search and optional
49/// heavy-ball momentum.
50pub mod gradient_descent;
51/// L-BFGS family: unconstrained `Lbfgs<V, F, Unbounded>` (two-loop
52/// recursion) and box-constrained `Lbfgs<V, F, Bounded>` (faithful port of
53/// Nocedal's L-BFGS-B v3.0). `Lbfgsb` is a type alias for
54/// `Lbfgs<V, F, Bounded>`.
55pub mod lbfgs;
56pub mod least_squares_diagnostics;
57/// Levenberg-Marquardt solver for nonlinear least squares with
58/// scaled trust-region damping by default and an optional Nielsen 1999 update.
59pub mod levenberg_marquardt;
60/// Generic MA-LSCh memetic framework: SSGA + local-search chains,
61/// generic over the resumable LS operator.
62pub mod ma_ls_ch;
63/// MA-LSCh-CMA: memetic algorithm with LS chains (inner: CMA-ES).
64pub mod ma_ls_ch_cma;
65/// MA-SW-Chains: memetic algorithm with LS chains (inner: Solis-Wets).
66pub mod ma_ls_ch_sw;
67/// MADS (Audet & Dennis 2006): mesh adaptive direct search (deterministic
68/// OrthoMADS instance) for nonsmooth or non-continuous objectives.
69pub mod mads;
70/// Nelder-Mead derivative-free simplex solver.
71pub mod nelder_mead;
72/// NEWUOA (Powell 2006): model-based derivative-free trust-region solver
73/// (quadratic surrogate + least-Frobenius-norm update).
74pub mod newuoa;
75/// Nonlinear conjugate gradient with selectable updates and a pluggable line search.
76pub mod nonlinear_cg;
77mod population;
78/// Shared core of the Powell-family DFO solvers (NEWUOA, BOBYQA, …): the
79/// least-Frobenius-norm [`QuadraticModel`](powell::QuadraticModel), its `H`
80/// update and origin shift, and the swappable
81/// [`TrustRegionSubproblem`](powell::TrustRegionSubproblem) seam.
82pub(crate) mod powell;
83/// Projected gradient descent for box-constrained problems.
84pub mod projected_gradient_descent;
85/// Elitist (1+λ) random search over a feasible box.
86pub mod random_search;
87/// Mini-batch stochastic gradient descent with constant learning rate
88/// and optional Polyak heavy-ball momentum.
89pub mod sgd;
90/// Generic simulated annealing with classical Metropolis acceptance and
91/// explicit cooling schedules.
92pub mod simulated_annealing;
93/// Solis-Wets (1981) adaptive random local search: biased normal
94/// mutations with success/failure step-size control.
95pub mod solis_wets;
96/// Steady-state real-coded GA with BLX-α + NAM + BGA + replace-worst.
97pub mod ssga;
98
99/// BFGS quasi-Newton solver (dense inverse Hessian; `Vec`, nalgebra, ndarray,
100/// and faer, with `f32` or `f64`).
101pub mod bfgs;
102
103/// BOBYQA (Powell 2009): bound-constrained model-based derivative-free
104/// trust-region solver (shared Powell core + TRSBOX + ALTMOV + RESCUE).
105pub mod bobyqa;
106
107/// LINCOA (Powell 2015): linearly-constrained model-based derivative-free
108/// trust-region solver (shared Powell core + TRSTEP projected-CG + GETACT).
109pub mod lincoa;
110
111/// COBYLA (Powell 1994): nonlinearly-constrained derivative-free solver
112/// (simplex linear models + L-infinity merit + `trstlp`).
113pub mod cobyla;
114
115/// Trust-region Newton solver (Nocedal & Wright Algorithm 4.1) with
116/// pluggable subproblem strategies (Steihaug-CG, dogleg, Moré–Sorensen,
117/// Cauchy point).
118pub mod trust_region;
119/// Dense trust-region-reflective least squares with rank-aware subproblems.
120pub mod trust_region_reflective;
121
122pub use augmented_lagrangian_method::AugmentedLagrangianMethod;
123pub use barrier_method::BarrierMethod;
124pub use basin_hopping::{
125    AcceptanceTest, BasinHopping, Metropolis, RandomDisplacement, StepTaker,
126};
127pub use bfgs::Bfgs;
128pub use bobyqa::Bobyqa;
129pub use bounded_cma_es::BoundedCmaEs;
130pub use bounded_cma_inject::BoundedCmaInject;
131pub use bounded_levenberg_marquardt::BoundedLevenbergMarquardt;
132pub use brent::Brent;
133pub use brent_derivative::BrentDerivative;
134pub use cma_es::CmaEs;
135pub use cma_inject::{ClosureInner, CmaInject, MemeticInner};
136pub use cobyla::Cobyla;
137pub use de::{De, DeCrossover, DeMutation};
138pub use de_inject::DeInject;
139pub use direct::Direct;
140pub use gauss_newton::GaussNewton;
141pub use gbnm::Gbnm;
142pub use global_best_pso::{
143    GlobalBestPso, PsoBoundaryHandling, PsoVelocityLimit,
144};
145pub use golden_section::GoldenSection;
146pub use gradient_descent::GradientDescent;
147pub use levenberg_marquardt::{
148    LevenbergMarquardt, LevenbergMarquardtQr, LmDamping,
149};
150pub use lincoa::Lincoa;
151pub use ma_ls_ch::MaLsCh;
152pub use ma_ls_ch_cma::MaLsChCma;
153pub use ma_ls_ch_sw::MaLsChSw;
154pub use mads::{Bounded, Constrained, Mads};
155pub use nelder_mead::{NelderMead, Projected, Unbounded};
156pub use newuoa::Newuoa;
157pub use nonlinear_cg::{CgUpdate, NonlinearCg};
158pub use projected_gradient_descent::ProjectedGradientDescent;
159pub use random_search::RandomSearch;
160pub use sgd::Sgd;
161pub use simulated_annealing::{
162    Neighbor, Reannealing, SimulatedAnnealing, TemperatureSchedule,
163};
164pub use solis_wets::SolisWets;
165pub use ssga::Ssga;
166pub use trust_region::{
167    CauchyPoint, Dogleg, ExactHessian, MatrixFree, MoreSorensen, Steihaug,
168    TrustRegion,
169};
170pub use trust_region_reflective::TrustRegionReflective;
171
172/// Sequential least-squares programming.
173pub mod slsqp;
174pub use slsqp::{Slsqp, SlsqpFailure};