Welcome to Penelopt.jl

Penelopt.jl is a software package for large-scale, equality-constrained, nonlinear programming. It is designed to find (local) solutions of mathematical optimization problems of the form

\[ \underset{x \in \mathbb{R}^n}{\textup{minimize}} \ f(x) \quad \textup{subject to} \ c(x) = 0,\]

where $f: \mathbb{R}^n \to \mathbb{R}$ and $c : \mathbb{R}^n \to \mathbb{R}^m$ are the objective and the constraint function, respectively. Both $f$ and $c$ can be nonlinear and nonconvex but they are assumed to be continuously differentiable. Moreover, it is assumed that $m \leq n$.

Our solver is based on the exact penalty method. It consists in transforming the equality-constrained problem above into a sequence of unconstrained penalized problems

\[ \underset{x \in \mathbb{R}^n}{\textup{minimize}} \ f(x) + \tau_k g(c(x)).\]

where $\tau_k > 0$ is the penalty parameter and $g$ is the penalty function. In this package, we use $g = \|\cdot\|_2$.

Main Features

On a practical level, the package uses the standardized NLPModels.jl API to represent the non-linear programming (NLP) problem. If you want to figure out how to interface your NLP problem with NLPModels.jl, we refer to their documentation.

Using Other Modelling Languages

If your NLP is represented in one of the following formats/sets, no worries, you can easily use our solver!

Once the problem has been modeled, you can simply install Penelopt.jl and solve your problem! 🚀

# Interface your problem with the NLPModels.jl API
julia> nlp = ...

# Install
julia> using Pkg
julia> Pkg.add("Penelopt")
julia> using Penelopt

# Solve
julia> L2Penalty(nlp)

The example above uses the solver with its default settings. Penelopt.jl also provides a variety of options for customizing the optimization process, and returns a result object containing the computed solution together with diagnostic information. 📖

For more advanced use cases, you can monitor or customize the optimization process through callbacks. 🔧

Finally, if performance is critical, you can find tips in the performance section. ⚡

Choosing A Linear Solver Library

Our algorithm solves multiple linear systems. By default, the linear system solver we use is LDLFactorizations.jl. Our solver is interfaced with the following solvers too:

Credit

This documentation is largely inspired by the excellent documentation of Ipopt, Krylov.jl, and Manopt.jl. We gratefully acknowledge the work of the contributors to these projects, whose efforts have provided valuable examples of clear and comprehensive software documentation.

For anyone looking for inspiration when writing documentation for their own packages, we highly recommend referring to these projects as excellent examples.