mini_opt
is a small C++ implementation of constrained non-linear least squares. I implemented this for fun, and use it to solve toy problems that interest me. The solver supports:
- Non-linear cost functions and equality constraints.
- Box inequality constraints via interior-point method.
- Line search using polynomial approximation or armijo backtracking.
- Levenberg marquardt.
To build and run tests:
git submodule update --init
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build .
ctest
Optional serialization of optimization outputs (using nlohmann) is enabled by passing -DMINI_OPT_SERIALIZATION=ON
.
The reference used for this project is:
"Numerical Optimization, Second Edition", Jorge Nocedal and Stephen J. Wright
The implementation is mostly based on Chapters 18 and 19 of this book.
- Add support for non-linear inequality constraints. Only diagonal box constraints are supported at the moment.
- Add sparse versions of the solvers. For now I only support dense problems.
Project is licensed under MIT License.