Skip to main content

CVXlab - Open-source Python laboratory for convex algebraic modeling

Project description

CVXlab Logo

PyPI version PyPI - Python Version Documentation Status

Beta Release - CVXlab is currently in beta (v1.0.0b1). The API may change before the stable 1.0.0 release. Documentation is under active development.

CVXlab is an open-source Python laboratory for modeling and solving convex optimization problems. It extends cvxpy with user-friendly interfaces, integrated data management and support for multiple, interconnected optimization models.

Table of Contents

Installation

From PyPI (once published):

pip install cvxlab

From source (for development):

git clone https://github.com/cvxlab/cvxlab.git
cd cvxlab
pip install -e .[docs]

See the Installation Guide for detailed instructions.

Quick Overview

CVXlab allows you to define optimization problems using:

  • General-purpose model generator: Model problems as you would mathematically, without restrictive solver forms.
  • Almost no-code required: Build models using Excel or YAML—no coding required.
  • Centralized data management: Centralized data input/output via SQLite database.
  • Multi-Model Support: Generate and solve multiple integrated or decomposed optimization problems.
  • Powerful engine embedded: Built on cvxpy package, leveraging its extensive solver support.

Typical workflow:

The figure below provides a synthetic and simplified overview of the CVXlab modeling process.

CVXlab workflow

In generating and handling a CVXlab model, the user must follow the five fundamental activities summarized below:

  • The user defines the model settings and the related structure: model scope, structure of variables, and list of mathematical expressions, including equalities, inequalities and (eventually) objective function. This activity requires almost no coding, as model definition can be performed via Excel files or YAML configuration files.
  • The user proceeds by generating a CVXlab Model object, consisting in a Python class instance embedding all the model settings and the methods useful to manage the model. At the same time, other items are generated, including the SQLite database file (to store all model data), and the Excel files serving as blank templates for collecting exogenous data from the user.
  • The user feeds input data to SQLite database through blank Excel template files. Specifically, user defines the data input required to characterize exogenous model variables.
  • The numerical problem is generated, exogenous data fetched from the database, and the problem is solved through CVXPY engine.
  • If problem is successfuly solved, results are finally exported to the database. Due to the structure of the relational database, it can be easily linked and inspected via Excel or SQL queries, or imported into Business Intelligence tools (such as PowerBI or Tableau) for more elaborated data visualization and analysis.

Documentation

Full documentation is available at cvxlab.readthedocs.io. You can also browse the source documentation in the docs/source directory.

Changelog

See CHANGELOG.md for a detailed history of changes.

Contributing

We welcome contributions from the community! Please see CONTRIBUTING.md for guidelines.

Community & Support

Submit issues and ideas for improvements in GitHub GitHub Issues

License

Licensed under the Apache License 2.0. See LICENSE for details.

Citing

If you use CVXlab in academic work, please cite our papers. For industry use, we'd love to hear your feedback—reach out via email (matteovincenzo.rocco@polimi.it).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cvxlab-1.0.0b1.tar.gz (123.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cvxlab-1.0.0b1-py3-none-any.whl (132.6 kB view details)

Uploaded Python 3

File details

Details for the file cvxlab-1.0.0b1.tar.gz.

File metadata

  • Download URL: cvxlab-1.0.0b1.tar.gz
  • Upload date:
  • Size: 123.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for cvxlab-1.0.0b1.tar.gz
Algorithm Hash digest
SHA256 bada0c86152a87465b95c51839905c3b99b69604d5c3d4a1b98a74b57d7ca4f0
MD5 0b1e3cf7cf9dfccaee6d4c00348ac01e
BLAKE2b-256 946f9288289d972dab20403eb0a7a62853f8d76e24a91ae524028b4b5a5acbb6

See more details on using hashes here.

File details

Details for the file cvxlab-1.0.0b1-py3-none-any.whl.

File metadata

  • Download URL: cvxlab-1.0.0b1-py3-none-any.whl
  • Upload date:
  • Size: 132.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for cvxlab-1.0.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 0cfcc9c6ca6fdd63e74099d4adc8d5353fdccdfad39146bc2992fee9dd6a48cb
MD5 52f1f6f1f0d8bec49878db3417c8307a
BLAKE2b-256 e750e79ed93f4a0ba42239429a6ef46da04cf5ce08588e98abe5e5b7740f3ce0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page