Home About
Courses Concepts Tools
GitHub

CVXPY

According to the CVXPY website,

CVXPY is an open source Python-embedded modeling language for convex optimization problems. It lets you express your problem in a natural way that follows the math, rather than in the restrictive standard form required by solvers.

CVXPY is a more versatile piece of optimization software than OR-Tools or GurobiPy, but we still tend to use it for ILP (and LP) formulation and solving.

CVXPY is not widely used in the ORIE department, although it has been used in ORIE 3300. If you're looking to use an ILP (or LP) package within the department, you should probably use either OR-Tools or GurobiPy instead.

Installation

You can install CVXPY with the following command in your terminal: python -m pip install cvxpy. Alternatively, follow the instructions here: CVXPY website

If you don't have pip installed, read instructions on installing it here: pip website.

If you don't have Python installed, download it here (Python website), or use Anaconda instead.

Usage

Documentation on CVXPY can be found here: https://www.cvxpy.org/tutorial/index.html.

Examples

Examples of CVXPY can be found on the CVXPY website: https://www.cvxpy.org/examples/index.html. The examples are already in Jupyter Notebook files, so they should be easy to look through if you already have Jupyter Notebook installed, or are familiar with how to use Google Colab.