CaNNOLeS.jl tutorial

by Abel S. Siqueira

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.

Fine-tune CaNNOLeS

CaNNOLeS.jl exports the function cannoles:

cannoles(nlp :: AbstractNLPModel; kwargs...)

Find below a list of the main options of cannoles.

Tolerances on the problem

unbounded_thresholdAbstractFloat-1e5below this threshold the problem is unbounded.
max_fInteger100000evaluation limit, e.g. sum_counters(nls) > max_f
max_timeAbstractFloat30.maximum number of seconds.
max_innerInteger10000maximum number of iterations.

Algorithmic parameters

xAbstractVectorcopy(nls.meta.x0)initial guess.
λAbstractVectoreltype(x)[]initial guess for the Lagrange mutlipliers.
methodSymbol:Newtonmethod to compute direction, :Newton, :LM, :Newton_noFHess, or :Newton_vanishing.
meritSymbol:auglagmerit function: :norm1, :auglag
linsolveSymbol:ma57solver use to compute the factorization: :ma57, :ma97, :ldlfactorizations


using CaNNOLeS, ADNLPModels

# Rosenbrock
nls = ADNLSModel(x -> [x[1] - 1; 10 * (x[2] - x[1]^2)], [-1.2; 1.0], 2)
stats = cannoles(nls, ϵtol = 1e-5, x = ones(2))
"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, max_time = 10., merit = :auglag)
"Execution stats: first-order stationary"