# Percival.jl

an Augmented Lagrangian method

## Description

This package implements a JSO-compliant augmented Lagrangian method based on the paper

S. Arreckx, A. Lambe, Martins, J. R. R. A., & Orban, D. (2016).
A Matrix-Free Augmented Lagrangian Algorithm with Application to Large-Scale Structural Design Optimization.
Optimization And Engineering, 17, 359–384. doi:10.1007/s11081-015-9287-9

It was implemented as part of the Master's dissertation of Egmara Antunes.

### JSO-compliant solver

The percival method expects a single mandatory argument - an AbstractNLPModel - and returns a GenericExecutionStats from SolverCore.jl.

We refer to juliasmoothoptimizers.github.io for tutorials on the NLPModel API. The functions used to access the NLPModel in general, are defined in NLPModels.jl. So, for instance, you can access the objective function's documentation as follows

using NLPModels
? obj

or visit directly NLPModels.jl's documentation. This framework allows the usage of models from Ampl (using AmplNLReader.jl), CUTEst (using CUTEst.jl), JuMP (using NLPModelsJuMP.jl), PDE-constrained optimization problems (using PDENLPModels.jl) and models defined with automatic differentiation (using ADNLPModels.jl).

## Installation

Percival is a registered package. To install this package, open the Julia REPL (i.e., execute the julia binary), type ] to enter package mode, and install Percival as follows

add Percival

## Example

How to solve the simple problem

$$$\min_{(x_1,x_2)} \quad (x_1 - 1)^2 + 100 (x_2 - x_1^2)^2 \quad \text{s.to} \quad x_1^2 + x_2^2 \leq 1.$$$

The problem is modeled using ADNLPModels.jl with [-1.2; 1.0] as default initial point, and then solved using percival.

using ADNLPModels, Percival

x -> (x[1] - 1)^2 + 100 * (x[2] - x[1]^2)^2,
[-1.2; 1.0],
x -> [x[1]^2 + x[2]^2],
[-Inf],
[1.0]
)

output = percival(nlp)
print(output)
Generic Execution stats
status: first-order stationary
objective value: 0.04567480870735006
primal feasibility: 1.0000422712153068e-10
dual feasibility: 2.3041857093134093e-13
solution: [0.7864151541968352  0.6176983125681761]
multipliers: [-0.12149655697399275]
multipliers_L: [0.0  6.92596594105416e-310  0.0]
multipliers_U: [0.0  6.92610496795223e-310  1.27e-321]
iterations: 6
elapsed time: 5.759799003601074

# Bug reports and discussions

If you think you found a bug, feel free to open an issue. Focused suggestions and requests can also be opened as issues. Before opening a pull request, start an issue or a discussion on the topic, please.

If you want to ask a question not suited for a bug report, feel free to start a discussion here. This forum is for general discussion about this repository and the JuliaSmoothOptimizers, so questions about any of our packages are welcome.