Skip to content

cvxgrp/DNLP

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DNLP — Disciplined Nonlinear Programming

The DNLP package is an extension of CVXPY to general nonlinear programming (NLP). DNLP allows smooth functions to be freely mixed with nonsmooth convex and concave functions, with some rules governing how nonsmooth convex and concave functions can appear. For details, see our paper Disciplined Nonlinear Programming.


Installation

The installation consists of two steps.

Step 1: Install IPOPT via Conda

DNLP requires an NLP solver. The recommended solver is Ipopt, which can be installed together with its Python interface cyipopt:

conda install -c conda-forge cyipopt

Installing cyipopt via pip may lead to issues, so we strongly recommend using the Conda installation above, even if the rest of your environment uses pip.

Step 2: Install DNLP

DNLP is installed by cloning this repository and installing it locally:

git clone https://github.com/cvxgrp/DNLP.git
cd DNLP
pip install .

Example

Below we give a toy example. Many more examples, including the ones in the paper, can be found at DNLP-examples.

import cvxpy as cp

Supported Solvers

Solver License Installation
IPOPT EPL-2.0 conda install -c conda-forge cyipopt
Knitro Commercial pip install knitro (requires license)

About

Disciplined nonlinear programming extension of CVXPY.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 64.6%
  • Python 28.8%
  • Jupyter Notebook 5.0%
  • C 1.4%
  • Linear Programming 0.1%
  • Makefile 0.1%