Hello everyone
,
I am very happy to announce my first Julia package on which I have been working intensely over the last year. We have released Penelopt, a large-scale equality-constrained optimization solver.
This package is part of the JuliaSmoothOptimizers ecosystem and is joint work with Youssef Diouane and @dpo (GERAD and Polytechnique Montreal).
For all the mathematical details, we have just released a preprint describing our implementation and establishing its convergence.
Penalty Method
In a few words, Penelopt (which stands for penalty optimization) solves nonlinear, nonconvex, equality-constrained optimization problems of the form
where both f : \mathbb{R}^n \to \mathbb{R} and c: \mathbb{R}^n \to \mathbb{R}^m are continuously differentiable functions. It does so by solving a finite sequence of penalized problems
for increasing values of \tau_k.
Code Features
- Our solver is based on the NLPModels.jl API; problems modeled with AMPL or JuMP can be interfaced through AmplNLReader.jl or NLPModelsJuMP.jl, respectively. You can also model problems with automatic differentiation through ADNLPModels.jl.
- The SQP-like KKT systems arising in the step computation are solved with MUMPS.jl by default. The code is also interfaced with the more lightweight LDLFactorizations.jl and HSL MA57 (requires a license) through HSL.jl.
- If the Hessian of the Lagrangian is dense or inaccessible, our code allows for L-BFGS approximations.
- An automatic local infeasibility detection mechanism is implemented for problems where the constraints have no feasible points.
- For multiple solves, it is possible to preallocate a workspace and reuse it.
- Our solver can be customized through callbacks.
Basic Example
Here is how to solve problem HS6 from the Hock-Schittkowski collection:
We can model the problem using automatic differentiation through ADNLPModels.jl:
using ADNLPModels
f(x) = (1 - x[1])^2
c(x) = [10 * (x[2] - x[1]^2)]
lcon = [0.0]
ucon = [0.0]
x0 = [-1.2, 1.0]
nlp = ADNLPModel(f, x0, c, lcon, ucon)
Then, after installing Penelopt through pkg> add Penelopt, you can call the solver L2Penalty with all default parameters:
using Penelopt
stats = L2Penalty(nlp; print_level = 1)
which outputs
This is Penelopt.jl v1.0.0.
Running with linear solver MUMPS v5.9.1.
------------------------------------------------------------------------------------------------------
Iter sIter Objective pfeas dfeas τ ptol dtol ‖x‖
------------------------------------------------------------------------------------------------------
0 0 +4.8400000e+00 4.40e+00 1.56e+00 1.00e+00 1.00e+00 1.56e-02 1.56e+00
1 8 +1.4515287e-04 4.25e-02 9.71e-03 1.00e+00 4.25e-04 9.71e-05 1.39e+00
2 2 +9.9022550e-11 3.91e-06 7.88e-06 1.00e+00 8.05e-08 7.88e-08 1.41e+00
3 1 +2.3024446e-15 9.81e-10 3.85e-08 1.00e+00 8.05e-08 3.82e-08 1.41e+00
4 1 +5.7937134e-21 2.22e-14 6.09e-11 1.00e+00 8.05e-08 3.82e-08 1.41e+00
Number of Iterations: 4
Objective...........: +5.793713424604307e-21
Primal Feasibility..: 2.220446049250313e-14
Dual Feasibility....: 6.090412449872034e-11
EXIT: first_order.
For more information, you can check our documentation.
CUTEst benchmarks
Currently, on the 224 problems from the CUTEst collection that have at least one equality constraint and no bounds/inequalities, our solver is on par with Ipopt in terms of robustness but still falls somewhat behind in terms of speed.
Below are the Dolan and Moré performance profiles (the higher, the better) from the preprint.
In the benchmark problem set, the largest problem in terms of variables has n = 132{,}098 and m = 65{,}025 while the largest in terms of constraints has n = 123{,}200 and m = 123{,}200. Both problems are successfully solved by Penelopt.
Both solvers used MUMPS as the linear solver and an absolute tolerance of 10^{-6}. The script to reproduce these benchmarks can be found here.
Work In Progress
- The generalization of Penelopt to bounds/inequalities is my top priority.
- We are working on making the implementation faster while retaining our current robustness. In particular, a LAPACK interface for small and dense NLP problems is on its way.
- Precisions other than Float64 are not currently supported, though porting it to Float32 or others should not be too hard.
- Other quasi-Newton methods such as L-SR1 are on their way.
Any feedback is welcome! Thank you for your attention to this post ![]()
