# \[ANN\] Penelopt.jl: A Large-Scale (Equality-Constrained) Nonlinear Optimization Solver

**URL:** <https://discourse.julialang.org/t/ann-penelopt-jl-a-large-scale-equality-constrained-nonlinear-optimization-solver/143134>\
**Category:** Optimization (Mathematical)\
**Tags:** announcement\
**Created:** [November 23, 2026, 5:16pm UTC](https://discourse.julialang.org/t/ann-penelopt-jl-a-large-scale-equality-constrained-nonlinear-optimization-solver/143134 "2026-11-23T17:16:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mgollier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mgollier/32/219551_2.png) [@mgollier](https://discourse.julialang.org/u/mgollier)\
**Post date:** [November 23, 2026, 5:16pm UTC](https://discourse.julialang.org/t/ann-penelopt-jl-a-large-scale-equality-constrained-nonlinear-optimization-solver/143134/1 "2026-11-23T17:16:23Z")

</div>

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](https://github.com/JuliaSmoothOptimizers/Penelopt.jl), a large-scale equality-constrained optimization solver.  
This package is part of the [JuliaSmoothOptimizers](https://github.com/JuliaSmoothOptimizers) ecosystem and is joint work with [Youssef Diouane](https://www.polymtl.ca/expertises/diouane-youssef) and @dpo (GERAD and Polytechnique Montreal).  
For all the mathematical details, we have just released a [preprint](https://www.researchgate.net/publication/418181953_An_Exact_Penalty_Method_for_Large-Scale_Equality-Constrained_Nonlinear_Optimization) 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

\min\_x \ f(x) \quad \text{subject to} \ c(x) = 0,

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

\min\_x \ f(x) + \tau\_k \|c(x)\|\_2,

for increasing values of \tau\_k.

## Code Features

- Our solver is based on the [NLPModels.jl](https://github.com/JuliaSmoothOptimizers/NLPModels.jl) API; problems modeled with **AMPL** or **JuMP** can be interfaced through [AmplNLReader.jl](https://github.com/JuliaSmoothOptimizers/AmplNLReader.jl) or [NLPModelsJuMP.jl](https://github.com/JuliaSmoothOptimizers/NLPModelsJuMP.jl), respectively. You can also model problems with automatic differentiation through [ADNLPModels.jl](https://github.com/JuliaSmoothOptimizers/ADNLPModels.jl).
- The SQP-like KKT systems arising in the step computation are solved with [MUMPS.jl](https://github.com/JuliaSmoothOptimizers/MUMPS.jl) by default. The code is also interfaced with the more lightweight [LDLFactorizations.jl](https://github.com/JuliaSmoothOptimizers/LDLFactorizations.jl) and **HSL MA57** (requires a license) through [HSL.jl](https://github.com/JuliaSmoothOptimizers/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](https://link.springer.com/book/10.1007/978-3-642-48320-2) collection:

 \min\_{x\_1, x\_2} {(1 - x\_1)}^2 \quad \text{subject to } 10(x\_2 - x\_1^2) = 0.

We can model the problem using automatic differentiation through [ADNLPModels.jl](https://github.com/JuliaSmoothOptimizers/ADNLPModels.jl):

```julia
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:

```julia
using Penelopt
stats = L2Penalty(nlp; print_level = 1)

```

which outputs

```plaintext
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](https://jso.dev/Penelopt.jl/stable/).

## CUTEst benchmarks

Currently, on the 224 problems from the [CUTEst](https://github.com/JuliaSmoothOptimizers/CUTEst.jl) 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](https://link.springer.com/article/10.1007/s101070100263) (the higher, the better) from the preprint.

 ![image](https://global.discourse-cdn.com/julialang/original/3X/8/9/894bd4d6559059d7f0c16a41992e817a5506a34a.png)

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](https://github.com/MaxenceGollier/Benchmark-runners).

## 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 😃

---

<div class="post-metadata">

**Author:** ![cvanaret](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cvanaret/32/11594_2.png) [@cvanaret](https://discourse.julialang.org/u/cvanaret)\
**Post date:** [November 23, 2026, 5:54pm UTC](https://discourse.julialang.org/t/ann-penelopt-jl-a-large-scale-equality-constrained-nonlinear-optimization-solver/143134/2 "2026-11-23T17:54:47Z")

</div>

Great work @mgollier! Glad to see such a strong contender!
