#optimization #math #science #nonlinear-equations

gomez

A pure Rust framework and implementation of (derivative-free) methods for solving nonlinear (bound-constrained) systems of equations

5 unstable releases

Uses new Rust 2021

0.3.1 May 8, 2022
0.3.0 May 8, 2022
0.2.1 Feb 7, 2022
0.2.0 Jan 27, 2022
0.1.0 Dec 20, 2021

#146 in Math

Download history 9/week @ 2022-03-10 16/week @ 2022-03-17 16/week @ 2022-04-07 6/week @ 2022-04-14 24/week @ 2022-04-28 92/week @ 2022-05-05 93/week @ 2022-05-12 83/week @ 2022-05-19 306/week @ 2022-05-26 106/week @ 2022-06-02 5/week @ 2022-06-16

459 downloads per month

MIT license

150KB
3K SLoC

Gomez

A pure Rust framework and implementation of (derivative-free) methods for solving nonlinear (bound-constrained) systems of equations.

Warning: The code and API are still quite rough. Expect changes.

This library provides a variety of solvers of nonlinear equation systems with n equations and n unknowns written entirely in Rust. Bound constraints for variables are supported first-class, which is useful for engineering applications. All solvers implement the same interface which is designed to give full control over the process and allows to combine different components to achieve the desired solution. The implemented methods are historically-proven numerical methods or global optimization algorithms.

The convergence of the numerical methods is tested on several problems and the implementation is benchmarked against with GSL library.

Algorithms

  • Trust region -- Recommended method to be used as a default and it will just work in most of the cases.
  • Cuckoo search -- A global optimization algorithm useful for initial guesses search in combination with a numerical solver.
  • Steffensen -- Fast and lightweight method for one-dimensional systems.
  • Nelder-Mead -- Not generally recommended, but may be useful for low-dimensionality problems with ill-defined Jacobian matrix.

Roadmap

Listed not in order of priority.

  • Homotopy continuation method to compare the performance with Trust region method.
  • Conjugate gradient method
  • Experimentation with various global optimization techniques for initial guesses search
    • Evolutionary/nature-inspired algorithms
    • Bayesian optimization
  • Focus on initial guesses search and tools in general
  • High-level drivers encapsulating the low-level API for users that do not need the fine-grained control.

License

Licensed under MIT.

There are gsl-wrapper and gsl-sys crates which are licensed under the GPLv3 identically as GSL itself. This code is part of the repository, but is not part of the Gomez library. Its purpose is solely for comparison in Gomez benchmarks.

Dependencies

~4.5MB
~92K SLoC