CaNNOLeS - Constrained and NoNlinear Optimizer of Least Squares

documentationdocumentationCICirrus CI - Base Branch Build StatuscodecovGitHub

CaNNOLeS is a solver for equality-constrained nonlinear least-squares problems, i.e., optimization problems of the form

min ¹/₂‖F(x)‖²      s. to     c(x) = 0.

It uses other JuliaSmoothOptimizers packages for development. In particular, NLPModels.jl is used for defining the problem, and SolverCore for the output. It also uses HSL.jl's MA57 as main solver, but you can pass linsolve=:ldlfactorizations to use LDLFactorizations.jl.


Orban, D., & Siqueira, A. S. A Regularization Method for Constrained Nonlinear Least Squares. Computational Optimization and Applications 76, 961–989 (2020). 10.1007/s10589-020-00201-2

If you use CaNNOLeS.jl in your work, please cite using the format given in CITATION.cff.


  1. Follow HSL.jl's MA57 installation if possible. Otherwise LDLFactorizations.jl will be used.
  2. pkg> add CaNNOLeS


using CaNNOLeS, ADNLPModels

# Rosenbrock
nls = ADNLSModel(x -> [x[1] - 1; 10 * (x[2] - x[1]^2)], [-1.2; 1.0], 2)
stats = cannoles(nls)
"Execution stats: first-order stationary"
# Constrained
nls = ADNLSModel(
  x -> [x[1] - 1; 10 * (x[2] - x[1]^2)],
  [-1.2; 1.0],
  x -> [x[1] * x[2] - 1],
stats = cannoles(nls)
"Execution stats: first-order stationary"

Bug reports and discussions

If you think you found a bug, feel free to open an issue. Focused suggestions and requests can also be opened as issues. Before opening a pull request, start an issue or a discussion on the topic, please.

If you want to ask a question not suited for a bug report, feel free to start a discussion here. This forum is for general discussion about this repository and the JuliaSmoothOptimizers, so questions about any of our packages are welcome.