Scen-Opt: A Scenario Optimization Toolbox for Data-Driven Convex Programming
Authors: Ben Wooding, Simone Garatti, Marco C. Campi, Abolfazl Lavaei
Organizations: Institute for Convergent Software Integrated Systems, Vanderbilt University, USA · Department of Electronics, Information and Bioengineering, Politecnico di Milano, Italy · Department of Information Engineering, University of Brescia, Italy · School of Computing, Newcastle University, UK
The scenario approach is a well-established statistical framework for data-driven decision-making. In particular, in data-driven optimization, the scenario approach unveils how the problem structure governs out-of-sample generalization, and offers a principled basis for assessing and certifying the reliability of the optimal solution as per constraint satisfaction. Despite its strong theoretical development and wide applicability, no software toolbox has been available to date that enables user-friendly, data-driven convex optimization within the scenario-approach framework. In this paper, we introduce Scen-Opt, an open-source software tool that integrates convex programming with data samples while providing statistical guarantees grounded in scenario theory. Scen-Opt is implemented in Python, supporting data-driven linear, quadratic, and semidefinite programming, and offers a Python-based web application with an intuitive and reactive graphical user interface (GUI) built using modern web technologies. Scen-Opt can be used directly through its online interface or installed locally, accommodating both manual input and data-file uploads (CSV, JSON, TXT, TSV, MAT, Excel, NPY, NPZ, Parquet). Built on a Python backend with a modern JavaScript frontend, Scen-Opt offers a highly user-friendly experience and efficient usability across desktops, laptops, tablets, and mobile devices. In this paper, Scen-Opt is applied to a set of representative benchmarks, demonstrating its practical effectiveness for data-driven convex optimization with guaranteed performance.
Figure 2 : Robust QP: Support vector machine example.
Figure 3 : Robust SDP: LPV System Example.
Figure 4 : Web interface of Scen-Opt illustrating the relaxed and regularized LP.
Figure 5 : Scen-Opt web interface displaying the results table for the relaxed and regularized LP set up in Fig. 4 ( d=1 , N=9 scenarios, β=0.1 ), with one column for each pair (ρ,τ) , ρ,τ∈{0.2,0.3} .
Figure 6 : Example graphical output from Scen-Opt for cases involving relaxation or regularization, for the run of Figs. 4 and 5 .
Benchmark
d
q
ms
mh
ρ
τ
N
k
ε
εˉ
Time (s)
Linear Programs (LP)
Half Width
2
1
2
0
0
0
100
2
0
0.2085
1.2
Growth Bound
12
6
3
6
0
0
3127
6
N/A
0.0103
1276.8
Inventory
11
15
6
17
100†
0
500
7
0
0.0666
4.0
Portfolio CVaR
13
12
4
27
0.016†
0
1255
3
0
0.0203
22.0
Power Dispatch
120
48
48
330
100†
0
150
34
0.0791
0.4496
2.9
Table 1 : Summary of all twelve benchmark case studies solved with Scen-Opt , grouped by program type. d = decision variables, q = uncertainty dimension, ms = scenario constraints (rows of A(δ) for LP/QP, LMI dimension for SDP), mh = hard constraints (rows of G for LP/QP, LMI dimension for SDP), N = number of sampled scenarios, k = complexity (number of support constraints). All benchmarks use the confidence parameter β=10−6 . Solve times are wall-clock seconds on a desktop with an Intel Core Ultra 9 285K (24 cores) and 64 GB RAM running Windows 11. † Power Dispatch, Inventory and Portfolio CVaR use an augmented formulation in which the slack penalty is embedded in the objective coefficient c ; the value of rho passed to the solver is therefore 0 , while the displayed value reflects the user-facing penalty weight. N/A = degeneracy detected, so the lower risk bound is not certified. Scenario data come from Yahoo Finance (Portfolio CVaR) and the UCI repository (Iris SVM Fisher (1936) , Covariance Estimation Aeberhard and Forina (1992) , Min. Encl. Ellipsoid Wolberg et al. (1993) ); Radiation Therapy uses synthetic data inspired by TROTS Breedveld and Heijmen (2019) , and the scenarios of all other benchmarks are generated as described in Appendix A .
Appendix figures & tables15 assets
Supplementary material from the paper’s appendix.
Appendix
Figure 7 : Left. Comparison of optimal order against mean demand. Center. Quantified risk bounds for N=500 and confidence 99% . Right. Graphic of scenario samples for different produce.
Product
Cost ($)
Mean Demand (cases)
Yield ( % )
Space (cu. ft)
Strawberries
18.50
85
75 (25 loss)
1.2
Tomatoes
14.25
120
88 (12 loss)
1.5
Lettuce
12.00
95
82 (18 loss)
2.0
Avocados
32.00
60
90 (10 loss)
0.8
Bell Peppers
22.50
75
85 (15 loss)
1.3
Appendix
Table 2 : Produce purchasing details. The data is synthetic but calibrated to real data Buzby et al. (2014) ; Perez et al. (2017) , along with USDA Terminal Market Prices for highest grade products.
Product
Order (cases)
Mean Demand
Service Level ( % )
Strawberries
150
83.9
85.8
Tomatoes
155.2
118.9
72.4
Lettuce
40.4
94.3
0.2
Avocados
118.9
59.8
99.8
Bell Peppers
121.0
74.1
90.0
Appendix
Table 3 : Optimal Purchasing Order
Generator
Capacity
Min Output
Cost
Ramp Rate
Gas 1
400 MW
100 MW
40 $/MW
200 MW/h
Gas 2
300 MW
75 MW
50 $/MW
150 MW/h
Coal
500 MW
200 MW
30 $/MW
100 MW/h
Appendix
Table 4 : Thermal generator parameters. Costs and capacities are synthetic but calibrated against standard values.
Figure 8 : Left. Stacked generation dispatch over 24 hours: coal provides baseload, gas ramps for the evening peak. Center. Quantified risk bounds for N=150 and confidence 99% . Right. Wind and solar scenario variability (median with 25−75 th and 10−90 th percentile bands).
Ticker
Asset
Class
Role
SPY
S&P 500 ETF
US Equity
Core Growth
AGG
US Aggregate Bond
Fixed Income
Stability
VNQ
Real Estate REIT
Real Assets
Inflation Hedge
GLD
Gold
Commodities
Crisis Hedge
EFA
Intl Developed
Intl Equity
Diversification
TLT
20+ Year Treasury
Long Bonds
Duration
Appendix
Table 5 : ETF asset universe. Historical returns are downloaded from Yahoo Finance via yfinance (5 years daily data).
Figure 9 : Left. Optimal portfolio weights with position limit constraints. Center. Quantified risk bounds for N=1255 and β=10−6 . Right. Portfolio return distribution with VaR (95%) and CVaR (95%) marked.
Figure 10 : Left. Optimal half-width given sampled points. Center. Quantified risk bounds for N=100 and confidence 99.9999% . Right. Density of sampled points across the region.
Figure 11 : Left. Dose-volume histogram showing tumor coverage above the 137.75 Gy minimum with OAR doses within limits (rectum <100 Gy, bladder <120 Gy); the x -axis is capped at 3× prescription as brachytherapy produces extreme hot spots near dwell positions. Center. Risk bounds with k=5 support constraints. Right. Dwell-position intensity profile showing most channels near maximum with selective suppression near OARs.
Figure 12 : Left. Optimal trajectory arcing above the wall obstacle. Center. Risk bounds as a function of complexity k= . Right. Wall clearance at timesteps within the wall’s x -range.
Figure 13 : Left. Optimal separating hyperplane with margin boundaries and support vectors. Center. Risk bounds with complexity k=2 . Right. Petal feature distributions by class.
Figure 14 : Left. Entry-wise error Σ^−Σfull ; diagonal inflation reflects the domination requirement. Center. Risk bounds with k=7 support constraints. Right. Eigenvalue spectrum comparison: the estimated covariance uniformly dominates the full-sample covariance in every principal direction.
Figure 15 : Left. 2D projection showing 569/569 points contained (100%) inside the region. Center. Risk bounds with k=5 support constraints. Right. Containment profile: sorted (z−xˉ)⊤P(z−xˉ) values for all 569 data points; the boundary at 1.0 separates interior from exterior points.
Figure 16 : Left. Stabilizing trajectories with for different scenarios δ . Right. Risk bounds for the LPV stability with complexity k=1 .
Figure 17 : Left. Stabilizing trajectories for example scenarios δ . Center. Risk bounds for the quadratic stability with complexity k=1 . Right. Stability margins for each sampled scenario, with red less stable and blue more stable.
We introduce disciplined biconvex programming (DBCP), a modeling framework for specifying and solving biconvex optimization problems. Biconvex optimization problems arise in various applications, including machine learning, signal processing, computational science, and control. Solving a biconvex optimization problem in practice usually involves heuristic methods based on alternate convex search (ACS), which iteratively optimizes over one block of variables while keeping the other fixed, so that the resulting subproblems are convex and can be efficiently solved. However, designing and implementing an ACS solver for a specific biconvex optimization problem usually requires significant effort from the user, which can be tedious and error-prone. DBCP extends the principles of disciplined convex programming to biconvex problems, allowing users to specify biconvex optimization problems in a natural way based on a small number of syntax rules. The resulting problem can then be automatically split and transformed into convex subproblems, for which a customized ACS solver is then generated and applied. DBCP allows users to quickly experiment with different biconvex problem formulations, without expertise in convex optimization. We implement DBCP in the open-source Python package dbcp, as an extension to the well known domain specific language CVXPY for convex optimization.
Hao Zhu, Joschka Boedecker
IMBIT//BrainLinks-BrainTools · Department of Computer Science, University of Freiburg
Robust optimization (RO) provides a principled framework for decision-making under uncertainty, but its performance critically depends on the choice of the uncertainty set. While large sets ensure reliability, they often lead to overly conservative decisions, whereas small sets risk excluding the true outcome. Recent data-driven approaches, particularly conformal prediction, offer finite-sample validity guarantees but remain largely task-agnostic, ignoring the downstream decision structure. In this paper, we propose a decision-aware conformal framework that learns uncertainty sets tailored to robust optimization objectives. Our approach parameterizes a flexible family of polyhedral sets via data-driven hyperplanes and learns their geometry by directly minimizing the induced robust loss, while preserving statistical validity through conformal calibration. To correct for data-dependent selection, we incorporate a re-calibration step on an independent dataset to restore coverage. The resulting sets capture directional and anisotropic uncertainty aligned with the decision objective while remaining computationally tractable. We provide finite-sample coverage guarantees and bounds on the sub-optimality gap to an oracle decision. This work bridges the gap between statistical validity and decision optimality, providing a principled framework for data-driven robust optimization.
We propose Dynamic Constraint Learning (DCL), a data-driven framework for constrained optimization when constraint functions are unknown and cannot be queried during optimization. At each iteration, the method learns a local surrogate from nearby data and solves a subproblem within a data-supported trust region. Compared with offline global constraint learning, the approach uses local surrogates that adapt to the data distribution during optimization and can achieve solution quality comparable to that of global models while using simpler local models and smaller optimization subproblems. We demonstrate the performance of DCL on a synthetic test problem and two case studies from the literature.
Ezgi Oztekin, Figen Oztoprak, S. Ilker Birbil
Department of Mathematics, Gebze Technical University · Department of Industrial Engineering, Gebze Technical University · Amsterdam Business School, University of Amsterdam