logo

A nonlinear programming solver based on the filter line-search interior point method (as in Ipopt) that can handle/exploit diverse classes of data structures, either on host or device memories.


LicenseDocumentationBuild StatusCoverageDOI
[![License: MIT][license-img]][license-url][![docs-stable][docs-stable-img]][docs-stable-url] [![docs-dev][docs-dev-img]][docs-dev-url][![build-gh][build-gh-img]][build-gh-url][![codecov][codecov-img]][codecov-url][![doi][doi-img]][doi-url]

[license-img]: https://img.shields.io/badge/License-MIT-yellow.svg [license-url]: https://github.com/MadNLP/MadNLP.jl/blob/master/LICENSE [docs-stable-img]: https://img.shields.io/badge/docs-stable-blue.svg [docs-stable-url]: https://madnlp.github.io/MadNLP.jl/stable [docs-dev-img]: https://img.shields.io/badge/docs-dev-purple.svg [docs-dev-url]: https://madnlp.github.io/MadNLP.jl/dev [build-gh-img]: https://github.com/MadNLP/MadNLP.jl/actions/workflows/test.yml/badge.svg [build-gh-url]: https://github.com/MadNLP/MadNLP.jl/actions/workflows/test.yml [codecov-img]: https://codecov.io/gh/MadNLP/MadNLP.jl/branch/master/graph/badge.svg?token=MBxH2AAu8Z [codecov-url]: https://codecov.io/gh/MadNLP/MadNLP.jl [doi-img]: https://zenodo.org/badge/DOI/10.5281/zenodo.5825776.svg [doi-url]: https://doi.org/10.5281/zenodo.5825776

Quickstart

The following example shows how to solve the HS15 problem with JuMP and MadNLP:

using JuMP, MadNLP
model = Model()
@variable(model, x1 <= 0.5)
@variable(model, x2)
@objective(model, Min, 100.0 * (x2 - x1^2)^2 + (1.0 - x1)^2)
@constraint(model, x1 * x2 >= 1.0)
@constraint(model, x1 + x2^2 >= 0.0)
JuMP.set_optimizer(model, MadNLP.Optimizer)
JuMP.set_optimizer_attribute(model, "max_iter", 100)
JuMP.set_optimizer_attribute(model, "print_level", MadNLP.INFO)
optimize!(model)

Installation

MadNLP can be installed directly via the Julia package manager:

pkg> add MadNLP

Furthermore, MadNLP comes with several extensions:

  • MadNLPGPU: import GPU-accelerated linear solvers in MadNLP
  • MadNLPHSL: import the HSL linear solvers in MadNLP
  • MadNLPPardiso: import the Pardiso linear solver in MadNLP

Citing MadNLP.jl

If you use MadNLP.jl in your research, we would greatly appreciate your citing it.

@article{shin2024accelerating,
  title     = {Accelerating optimal power flow with {GPU}s: {SIMD} abstraction of nonlinear programs and condensed-space interior-point methods},
  author    = {Shin, Sungho and Anitescu, Mihai and Pacaud, Fran{\c{c}}ois},
  journal   = {Electric Power Systems Research},
  volume    = {236},
  pages     = {110651},
  year      = {2024},
  publisher = {Elsevier}
}

@article{shin2021graph,
  title     = {Graph-based modeling and decomposition of energy infrastructures},
  author    = {Shin, Sungho and Coffrin, Carleton and Sundar, Kaarthik and Zavala, Victor M},
  journal   = {IFAC-PapersOnLine},
  volume    = {54},
  number    = {3},
  pages     = {693--698},
  year      = {2021},
  publisher = {Elsevier}
}

Supporting MadNLP.jl