Scen-Opt

Data-driven convex optimization using the scenario approach.

Scen-Opt solves Linear Programs (LP), Quadratic Programs (QP), and Semidefinite Programs (SDP) using only sampled uncertainty realizations, providing rigorous probabilistic guarantees on out-of-sample performance — no distributional assumptions required.

Solvers

LP, QP, and SDP solvers with scenario constraints, slack variables, and regularization.

Solvers
Risk Bounds

Distribution-free violation probability bounds via the Campi–Garatti theory.

Risk Quantification
CVXPY Solvers

Installed solvers on the server and the full CVXPY compatibility matrix.

CVXPY Solvers
Utilities

Solver discovery, active constraint detection, and file I/O helpers.

Utilities

Getting Started

pip install -r requirements.txt
python3 app.py              # start the web interface at http://127.0.0.1:5000

Or with Docker:

docker run -p 5000:5000 ghcr.io/kiguli/scen-opt:latest

How It Works

  1. Collect N random scenarios \(\delta_1, \ldots, \delta_N\)

  2. Formulate a convex program with soft scenario constraints relaxed by slack variables \(\zeta\)

  3. Solve the optimization problem using any of 27+ supported CVXPY solvers

  4. Identify the k active (support) constraints

  5. Compute distribution-free risk bounds \([\varepsilon_L, \varepsilon_U]\) on violation probability