Maths

CVXPY – framework for mathematical optimization

CVXPY is a mathematical modelling framework designed to make optimization problems easier to formulate and solve. It allows users to describe objectives and constraints using expressions that closely resemble their mathematical definitions.

Rather than requiring problems to be manually transformed into the standard representations expected by numerical solvers, CVXPY handles much of that transformation automatically.

The framework is used in scientific research, engineering, finance, machine learning, and other disciplines where decisions must be optimized subject to mathematical constraints. It provides the modelling layer while relying on specialized solvers to carry out the numerical calculations.

This is free and open source software.

Key Features

  • Expressive modelling interface for convex optimization problems.
  • Supports mixed-integer convex optimization involving discrete and continuous decision variables.
  • Models geometric programming and quasiconvex programming problems.
  • Includes support for additional classes of nonlinear optimization problems.
  • Defines objective functions, optimization variables, parameters, and mathematical constraints.
  • Automatically transforms supported problem formulations into representations accepted by numerical solvers.
  • Disciplined convex programming rules help verify that expressions satisfy convexity requirements.
  • Supports matrix and vector expressions commonly encountered in numerical optimization.
  • Integrates with solvers including Clarabel, OSQP, SCS, and HiGHS.
  • Additional interfaces allow users to select specialized optimization solvers.
  • Provides access to optimal objective values, decision variables, and available dual-variable information.
  • Parameters allow problem data to be changed without reconstructing the mathematical formulation.
  • Supports applications in portfolio optimization, signal processing, control, and statistical modelling.
  • Cross-platform support – runs on Linux, macOS, and Windows.

Website: github.com/cvxpy/cvxpy
Support:
Developer: CVXPY development team
License: Apache License 2.0

CVXPY is written in C++ and Python. Learn C++ with our recommended free books and free tutorials. Learn Python with our recommended free books and free tutorials.


Related Software

Python Mathematics Tools
scikit-learnMachine learning library for Python
NumPyCore package for scientific computing with Python
SciPyEcosystem for mathematics, science, and engineering.
statsmodelsStatistical modeling and econometrics
JAXPython library for high-performance numerical computing
SageMathComputer algebra system
SymPyLibrary for symbolic mathematics
PyMCBayesian statistical modeling and probabilistic programming
PyomoObject-oriented algebraic modeling language
patsyPackage for describing statistical models and to build design matrices
mpmathLibrary for arbitrary-precision floating-point arithmetic
SfePyFinite element software package

Read our verdict in the software roundup.


Best Free and Open Source Software LinuxLinks helps you discover the best free and open source software for Linux. Explore our extensive collection of recommended applications, including alternatives to popular proprietary software.

We also publish software reviews, Linux tutorials, hardware reviews, free programming books and articles covering the wider open source community. Browse our Linux resources to discover more.

Know a useful free and open source Linux application we haven't covered? Suggest a program for inclusion.

Has your software been featured on LinuxLinks? Display one of our Featured on LinuxLinks badges on your website or GitHub README.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted