All Projects → cvxgrp → Cvxpy

cvxgrp / Cvxpy

Licence: other
A Python-embedded modeling language for convex optimization problems.

Programming Languages

python
139335 projects - #7 most used programming language
C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language
Makefile
30231 projects
shell
77523 projects
SWIG
194 projects

Projects that are alternatives of or similar to Cvxpy

gams.jl
A MathOptInterface Optimizer to solve JuMP models using GAMS
Stars: ✭ 27 (-99.26%)
Mutual labels:  optimization, modeling-language
Svgo
⚙️ Node.js tool for optimizing SVG files
Stars: ✭ 17,050 (+367.76%)
Mutual labels:  optimization
PEPit
PEPit is a package enabling computer-assisted worst-case analyses of first-order optimization methods.
Stars: ✭ 41 (-98.88%)
Mutual labels:  optimization
Stringsareevil
Reducing memory allocations from 7.5GB to 32KB
Stars: ✭ 260 (-92.87%)
Mutual labels:  optimization
RBP
Recurrent Back Propagation, Back Propagation Through Optimization, ICML 2018
Stars: ✭ 35 (-99.04%)
Mutual labels:  optimization
Imager
Automated image compression for efficiently distributing images on the web.
Stars: ✭ 266 (-92.7%)
Mutual labels:  optimization
simsopt
Simons Stellarator Optimizer Code
Stars: ✭ 28 (-99.23%)
Mutual labels:  optimization
Platypus
A Free and Open Source Python Library for Multiobjective Optimization
Stars: ✭ 313 (-91.41%)
Mutual labels:  optimization
Simpeg
Simulation and Parameter Estimation in Geophysics - A python package for simulation and gradient based parameter estimation in the context of geophysical applications.
Stars: ✭ 283 (-92.24%)
Mutual labels:  optimization
Ccodashboard
Welcome to the Continuous Cloud Optimization Power BI Dashboard GitHub Project. In this repository you will find all the guidance and files needed to deploy the Dashboard in your environment to take benefit of a single pane of glass to get insights about your Azure resources and services.
Stars: ✭ 256 (-92.98%)
Mutual labels:  optimization
ForBES
Generic and efficient MATLAB solver for nonsmooth optimization problems
Stars: ✭ 19 (-99.48%)
Mutual labels:  optimization
scipydirect
Python wrapper to the DIRECT global optimization algorithm with scipy.optimize compatible call syntax
Stars: ✭ 26 (-99.29%)
Mutual labels:  optimization
Topy
Topology Optimization using Python
Stars: ✭ 278 (-92.37%)
Mutual labels:  optimization
elm-prepack-experiments
Experimenting with running built Elm programs through Prepack
Stars: ✭ 18 (-99.51%)
Mutual labels:  optimization
Statically
⚡️ The best free and fast CDN for images, CSS, JavaScript, and open source.
Stars: ✭ 299 (-91.8%)
Mutual labels:  optimization
least-squares-cpp
A single header-only C++ library for least squares fitting.
Stars: ✭ 46 (-98.74%)
Mutual labels:  optimization
pmap
Process Map Visualization of event analysis in R
Stars: ✭ 19 (-99.48%)
Mutual labels:  optimization
Deeplearning.ai Notes
These are my notes which I prepared during deep learning specialization taught by AI guru Andrew NG. I have used diagrams and code snippets from the code whenever needed but following The Honor Code.
Stars: ✭ 262 (-92.81%)
Mutual labels:  optimization
React Scope
Visualize your React components as you interact with your application.
Stars: ✭ 316 (-91.33%)
Mutual labels:  optimization
Libfirm
graph based intermediate representation and backend for optimising compilers
Stars: ✭ 305 (-91.63%)
Mutual labels:  optimization

CVXPY

Build Status PyPI - downloads Conda - downloads

The CVXPY documentation is at cvxpy.org.

We are building a CVXPY community on Discord. Join the conversation! For issues and long-form discussions, use Github Issues and Github Discussions.

Contents

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

For example, the following code solves a least-squares problem where the variable is constrained by lower and upper bounds:

import cvxpy as cp
import numpy

# Problem data.
m = 30
n = 20
numpy.random.seed(1)
A = numpy.random.randn(m, n)
b = numpy.random.randn(m)

# Construct the problem.
x = cp.Variable(n)
objective = cp.Minimize(cp.sum_squares(A @ x - b))
constraints = [0 <= x, x <= 1]
prob = cp.Problem(objective, constraints)

# The optimal objective is returned by prob.solve().
result = prob.solve()
# The optimal value for x is stored in x.value.
print(x.value)
# The optimal Lagrange multiplier for a constraint
# is stored in constraint.dual_value.
print(constraints[0].dual_value)

With CVXPY, you can model

  • convex optimization problems,
  • mixed-integer convex optimization problems,
  • geometric programs, and
  • quasiconvex programs.

CVXPY is not a solver. It relies upon the open source solvers ECOS, SCS, and OSQP. Additional solvers are available, but must be installed separately.

CVXPY began as a Stanford University research project. It is now developed by many people, across many institutions and countries.

Installation

CVXPY is available on PyPI, and can be installed with

pip install cvxpy

CVXPY can also be installed with conda, using

conda install -c conda-forge cvxpy

CVXPY has the following dependencies:

  • Python >= 3.6
  • OSQP >= 0.4.1
  • ECOS >= 2
  • SCS >= 1.1.6
  • NumPy >= 1.15
  • SciPy >= 1.1.0

For detailed instructions, see the installation guide.

Getting started

To get started with CVXPY, check out the following:

Issues

We encourage you to report issues using the Github tracker. We welcome all kinds of issues, especially those related to correctness, documentation, performance, and feature requests.

For basic usage questions (e.g., "Why isn't my problem DCP?"), please use StackOverflow instead.

Community

The CVXPY community consists of researchers, data scientists, software engineers, and students from all over the world. We welcome you to join us!

  • To chat with the CVXPY community in real-time, join us on Discord.
  • To have longer, in-depth discussions with the CVXPY community, use Github Discussions.
  • To share feature requests and bug reports, use Github Issues.

Please be respectful in your communications with the CVXPY community, and make sure to abide by our code of conduct.

Contributing

We appreciate all contributions. You don't need to be an expert in convex optimization to help out.

You should first install CVXPY from source. Here are some simple ways to start contributing immediately:

If you'd like to add a new example to our library, or implement a new feature, please get in touch with us first to make sure that your priorities align with ours.

Contributions should be submitted as pull requests. A member of the CVXPY development team will review the pull request and guide you through the contributing process.

Before starting work on your contribution, please read the contributing guide.

Team

CVXPY is a community project, built from the contributions of many researchers and engineers.

CVXPY is developed and maintained by Steven Diamond, Akshay Agrawal, Riley Murray, and Bartolomeo Stellato, with many others contributing significantly. A non-exhaustive list of people who have shaped CVXPY over the years includes Stephen Boyd, Eric Chu, Robin Verschueren, Philipp Schiele, Michael Sommerauer, Jaehyun Park, Enzo Busseti, AJ Friend, Judson Wilson, and Chris Dembia.

For more information about the team and our processes, see our governance document.

Citing

If you use CVXPY for academic work, we encourage you to cite our papers. If you use CVXPY in industry, we'd love to hear from you as well, on Discord or over email.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].