CVXlab documentation#

CVXlab is an open-source Python laboratory for creating and solving convex optimization models from low-level settings, structured data, and symbolic expressions. It combines YAML or Excel-based model setup, SQLite-backed data management, and CVXPY-based numerical solving in a single reproducible workflow. Beyond single-problem modeling, it can orchestrate linked optimization sub-models with managed data exchange in parallel, sequential, and integrated solution modes.

Version: 1.1.0 Date: Oct 12, 2026

Useful links: PyPI | Source code | Issue tracker | GitHub discussions

How it works#

The figure below summarizes the package workflow. The detailed step-by-step explanation is in the User Guide, while runnable examples are collected in the Resources section.

CVXlab modeling process in a nutshell CVXlab modeling process in a nutshell

Why CVXlab#

  • General-purpose model generator. Build a wide range of convex optimization models.

  • Almost no code required. Define model structure through YAML or Excel templates instead of hand-coding every object.

  • Centralized data management. Organize data in a SQLite database for traceable, reusable data handling.

  • Linked-model orchestration. Coordinate multiple optimization sub-models and exchange data across independent, chained, or iterative solving workflows.

  • Powerful engine embedded. Build convex and decomposed optimization workflows on top of CVXPY.

Start here#

Section

What you will find

Installation

How to install CVXlab and verify that the environment is ready.

Quick Start

Build, solve, and inspect a small multi-scenario model in a few minutes.

User Guide

The full modeling workflow, from conceptual model definition to results export.

Resources

Tutorials, models gallery, related publications and how to cite CVXlab.

API reference

Technical reference for cvxlab.Model, utilities, operators, constants, and defaults.

Note

CVXlab is developed by Matteo V. Rocco, Associate Professor at SESAM group, Department of Energy, Politecnico di Milano. The project is released under the Apache License 2.0.