numra-optim
Optimization for the Numra workspace — unconstrained, bound-constrained, general constrained, global, multi-objective, and LP / MILP solvers behind a single OptimProblem builder with automatic algorithm selection.
Ten-plus algorithms unified under one declarative API. Hand a problem to OptimProblem, optionally with a gradient, and the auto-selector picks BFGS / L-BFGS / L-BFGS-B / SQP / augmented Lagrangian / Nelder-Mead / CMA-ES / NSGA-II based on the constraint structure. For known patterns (nonlinear least squares, linear programs, mixed-integer linear programs), call the specialized solvers directly.
Example
use OptimProblem;
// Minimize Rosenbrock: f(x, y) = (1-x)² + 100(y-x²)²
let r = new
.x0
.objective
.solve
.unwrap;
assert!;
assert!;
What's in this crate
| Family | Solvers |
|---|---|
| Unconstrained (quasi-Newton) | Bfgs, Lbfgs, bfgs_minimize, lbfgs_minimize |
| Bound-constrained | Lbfgsb, lbfgsb_minimize |
| Nonlinear least squares | lm_minimize (Levenberg-Marquardt) |
| Constrained (general) | sqp_minimize, augmented_lagrangian_minimize |
| Derivative-free | nelder_mead, powell |
| Global | de_minimize (Differential Evolution), cmaes_minimize |
| Multi-objective | nsga2_optimize |
| Quadratic / Linear | active_set_qp_solve, simplex_solve, milp_solve |
| Declarative builder | OptimProblem (auto solver choice via ProblemHint) |
Extras: RobustProblem / StochasticProblem for uncertainty-aware optimization; compute_param_sensitivity for post-solve parameter-sensitivity analysis.
Composes with
numra-autodiff— supplies analytical gradients / Jacobiansnumra-nonlinear— Newton inner solves inside SQP and augmented Lagrangiannumra-linalg— Hessian factorizations and QP subproblemsnumra-fit— Levenberg-Marquardt as the curve-fitting backendnumra-ocp— outer optimizer for parameter estimation, shooting, and collocation
See interop workflows for the verified autodiff → optim → fit workflow.
Install
[]
= "0.1"
Or via the umbrella crate:
[]
= "0.1"
Documentation
- API: https://docs.rs/numra-optim
- Book: Unconstrained · Constrained · Global
- Source: https://github.com/moussaoutlook/numra-rs/tree/main/numra-optim
License
Numra Academic & Research License (Non-Commercial). Academic and research use is free; commercial use requires a separate license — contact contact@spectralautomata.com. See LICENSE.