Skip to main content

Proximal augmented Lagrangian method for nonconvex optimization with equality and inequality constraints.

Project description

pbalm

pbalm logo

Documentation arXiv PyPI License

A Python package providing a proximal augmented Lagrangian method for solving nonlinear programming problems with equality and inequality constraints.

Problem structure

pbalm solves optimization problems of the form:

$$ \begin{aligned} \min_{x} \quad & f_1(x) + f_2(x) \ \text{s.t.} \quad & g(x) \leq 0 \ & h(x) = 0 \end{aligned} $$

where $f_1$ is smooth (possibly nonconvex), $f_2$ is possibly nonsmooth but prox-friendly, and $g$, $h$ define smooth inequality and equality constraints, respectively.

Key Features

  • Nonconvex optimization: handles nonconvex objectives and constraints
  • Composite objectives: supports smooth + nonsmooth terms
  • Flexible constraints: both equality and inequality constraints
  • JAX-powered: automatic differentiation and JIT compilation

Quick Example

import jax.numpy as jnp
import pbalm

# smooth part of the objective
def f1(x):
    return jnp.sum(x**2)

# L1 regularization (nonsmooth)
lbda = 0.1
f2 = pbalm.L1Norm(lbda)

# inequality constraint g_j(x) <= 0; j=1
def g_1(x):
    return x[0] - 0.8

# equality constraints h_i(x) = 0; i=1,2
def h_1(x):
    return x[0] + x[1] - 1.0

def h_2(x):
    return x[1] * x[2] - 2.0

x0 = jnp.array([1.0, 1.0, 2.0])

# create problem and solve
problem = pbalm.Problem(f1=f1, f2=f2, g=[g_1], h=[h_1, h_2])
result = pbalm.solve(problem, x0=x0, tol=1e-6)

print(f"Solution: {result.x}")

Installation

python3 -m pip install pbalm

For development:

git clone https://github.com/adeyemiadeoye/p-balm.git
cd p-balm
python3 -m pip install -e .

Documentation

Full documentation is available at adeyemiadeoye.github.io/p-balm.

Citation

If you use pbalm in your research, please cite:

@article{adeoye2025pbalm,
  title={A proximal augmented Lagrangian method for nonconvex optimization with equality and inequality constraints},
  author={Adeoye, Adeyemi D. and Latafat, Puya and Bemporad, Alberto},
  journal={arXiv preprint arXiv:2509.02894},
  year={2025}
}

Acknowledgements

The authors acknowledge the funding received from the European Union (ERC Advanced Research Grant COMPACT, No. 101141351). Views and opinions expressed are however those of the authors only and do not necessarily reflect those of the European Union or the European Research Council. Neither the European Union nor the granting authority can be held responsible for them.

pbalm depends on the efficient implementation of PANOC provided by alpaqa, as well as its regularizers module.

License

See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pbalm-0.1.2.tar.gz (63.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pbalm-0.1.2-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file pbalm-0.1.2.tar.gz.

File metadata

  • Download URL: pbalm-0.1.2.tar.gz
  • Upload date:
  • Size: 63.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for pbalm-0.1.2.tar.gz
Algorithm Hash digest
SHA256 7f66f22af36fcfbccf6c02f9c8bb468a2bbc7f2e3cab39c4b19e0d166cb102ee
MD5 28d45ce79ec010e9829268605f3b0488
BLAKE2b-256 18cac7e814a974467a7f6df75c9634ede638d3e83b93bf004e44143e005e0acd

See more details on using hashes here.

File details

Details for the file pbalm-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pbalm-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.2

File hashes

Hashes for pbalm-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2b45339949171e3e1be26f34fb102c585a052683703b70c24a85675daad2f83e
MD5 d51a2b599ff09b91b01cace71921cf26
BLAKE2b-256 12cc4cacf06be5b08f93f21dac6afaea6c2d1d0af474bcf80cbb54e306dd4096

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page