Welcome to Penelopt.jl
Penelopt.Penelopt — Module
Penelopt.jl: A Large-Scale Equality-Constrained Optimization Solver.
- 📖 Documentation: https://MaxenceGollier.github.io/Penelopt.jl/stable
- 🗂️ Repository: github.com/MaxenceGollier/Penelopt.jl
- 💬 Discussions: github.com/MaxenceGollier/Penelopt.jl/discussions
- 🎯 Issues: github.com/MaxenceGollier/Penelopt.jl/issues
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.
If your NLP is represented in one of the following formats/sets, no worries, you can easily use our solver!
- AMPL: Use AmplNLReader.jl. You should read this tutorial.
- JuMP: Use NLPModelsJuMP.jl. You should read this tutorial.
- CUTEst: Use CUTEst.jl. You should read this tutorial.
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. ⚡
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:
- MUMPS: you should read this tutorial to use it.
- HSL-MA57: you should read this tutorial to use it.
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.