$$ \sum_{i \in \mathcal{I}} \mathbf{G}_{ip} \mathbf{q}_{ip} = \mathbf{0}, p=1 \qquad (\text{EC.17q}) $$

$$ \sum_{i \in \mathcal{I} \setminus (W \cup D)} \mathrm{diag}(\mathbb{1}) \mathbf{q}_{ip} = \mathbb{1}, p=2 \qquad (\text{EC.17r}) $$

$$ r_{\hat{\varepsilon}} \| \mathbf{X}_t [\mathbf{\Psi} (\mathbf{\Psi}^F \boldsymbol{\alpha}_t \mathbb{1}^\top + \mathbf{\Psi}^S \boldsymbol{\gamma}_t \mathbb{1}^\top - \mathbf{\Psi}^W)]_{(\ell,:)}^\top \| \le \bar{s}_\ell \\ - [\mathbf{\Psi} (\mathbf{\Psi}^F \hat{\mathbf{q}}_t^F + \mathbf{\Psi}^S \hat{\mathbf{q}}_t^S + \mathbf{\Psi}^W \hat{\mathbf{q}}_t^W + \mathbf{\Psi}^D \hat{\mathbf{q}}_t^D)]_{\ell}, \forall t, \forall \ell \in \mathcal{L} \qquad (\text{EC.17s}) $$

$$ r_{\hat{\varepsilon}} \| \mathbf{X}_t [\mathbf{\Psi} (\mathbf{\Psi}^F \boldsymbol{\alpha}_t \mathbb{1}^\top + \mathbf{\Psi}^S \boldsymbol{\gamma}_t \mathbb{1}^\top - \mathbf{\Psi}^W)]_{(\ell,:)}^\top \| \le \bar{s}_\ell \\ + [\mathbf{\Psi} (\mathbf{\Psi}^F \hat{\mathbf{q}}_t^F + \mathbf{\Psi}^S \hat{\mathbf{q}}_t^S + \mathbf{\Psi}^W \hat{\mathbf{q}}_t^W + \mathbf{\Psi}^D \hat{\mathbf{q}}_t^D)]_{\ell}, \forall t, \forall \ell \in \mathcal{L}, \qquad (\text{EC.17t}) $$

where the set of optimization variables is $\mathcal{V}^{\text{opt}} = \{\hat{q}_{it}, z_{it}^{\hat{q}_{it}}, \alpha_{it}, z_{it}^{\hat{\alpha}_{it}}, \gamma_{it}, z_{it}^{\hat{\gamma}_{it}}\}$ and the set of auxiliary variables is $\mathcal{V}^{\text{aux}} = \{\mathbf{q}_{ip}, \hat{\mathbf{q}}_t^F, \boldsymbol{\alpha}_t, \hat{\mathbf{q}}_t^S, \boldsymbol{\gamma}_t, \hat{\mathbf{q}}_t^W, \hat{\mathbf{q}}_t^D\}$, formed as previously discussed.

### EC.2.3. LP-based market-clearing benchmarks

In the following, we concisely formulate the two reference uncertainty-aware benchmarks within the LP framework. To account for the quadratic costs of market participants in an LP problem, we perform a piecewise linear approximation of the cost by discretizing the production quantities into a set of bins given by $\mathcal{Y} = \{1, 2, \dots, Y\}$.

**Deterministic two-stage market framework:** In the deterministic market-clearing problem $\mathcal{R}1$, the system operator procures energy and flexibility (in the form of reserve capacity) in the day-ahead market. Thereafter, during real-time operation stage, via another market-clearing mechanism, the reserves are activated based on the allocation capacity bounds cleared during the day-ahead market. This two-stage deterministic market-clearing problem is a natural uncertainty-aware extension of currently-operational electricity markets.

**Day-ahead market-clearing problem $\mathcal{R}1_a$:**

$$ \min_{q_{ity}^{\mathrm{DA}}, q_{it}^{\mathrm{R}}} \sum_{i \in \mathcal{I} \setminus \mathcal{D}} \sum_{t \in \mathcal{T}} \sum_{y \in \mathcal{Y}} \left( c_{ity}^{\mathrm{Y}} q_{ity}^{\mathrm{DA}} \right) + \sum_{i \in \mathcal{F} \cup \mathcal{S}} \sum_{t \in \mathcal{T}} c_{it}^{R} q_{it}^{R} \qquad (\text{EC.18a}) $$

$$ \text{s.t.} \quad 0 \le q_{ity}^{\mathrm{DA}} \le \frac{1}{Y}(\bar{Q}_i - \underline{Q}_i), \forall y, \forall t, \forall i \in \mathcal{I} \setminus \mathcal{D} \qquad (\text{EC.18b}) $$

$$ \underline{Q}_i \le \sum_{y \in \mathcal{Y}} q_{ity}^{\mathrm{DA}} \le \bar{Q}_i, \forall t, \forall i \in \mathcal{F} \cup \mathcal{W} \qquad (\text{EC.18c}) $$

$$ \underline{Q}_i \le \sum_{y \in \mathcal{Y}} q_{ity}^{\mathrm{DA}} + q_{it}^{R} \le \bar{Q}_i, \forall t, \forall i \in \mathcal{F} \qquad (\text{EC.18d}) $$

$$ - \Delta_i \le \sum_{y \in \mathcal{Y}} (q_{ity}^{\mathrm{DA}} - q_{i(t-1)y}^{\mathrm{DA}}) \le \bar{\Delta}_i, \forall t > 2, \forall i \in \mathcal{F} \qquad (\text{EC.18e}) $$

$$ - \frac{1}{\eta_i^C} \bar{Q}_i^C \le \sum_{y \in \mathcal{Y}} q_{ity}^{\mathrm{DA}} \le \eta_i^D \bar{Q}_i^D, \forall t, \forall i \in \mathcal{S} \qquad (\text{EC.18f}) $$

$$ - \frac{1}{\eta_i^C} \bar{Q}_i^C \le \sum_{y \in \mathcal{Y}} q_{ity}^{\mathrm{DA}} + q_{it}^R \le \eta_i^D \bar{Q}_i^D, \forall t, \forall i \in \mathcal{S} \qquad (\text{EC.18g}) $$
$$ \underline{E}_i \le E_i^0 - \sum_{t'=1}^{t} \left( \sum_{y \in \mathcal{Y}} q_{it'y}^{\mathrm{DA}} + q_{it}^{R} \right) \le \bar{E}_i, \forall t, \forall i \in \mathcal{S} \quad (\mathrm{EC}.18\mathrm{h}) $$

$$ E_i^0 - \underline{E}_i \le E_i^0 - \sum_{t'=1}^{t} \left( \sum_{y \in \mathcal{Y}} q_{it'y}^{\mathrm{DA}} + q_{it'}^{R} \right) \le E_i^0 + \bar{B}_i, \forall i \in \mathcal{S} \quad (\mathrm{EC}.18\mathrm{i}) $$

$$ 0 \le q_{it}^{R} \le \bar{Q}_{i}^{R}, \forall t, \forall i \in \mathcal{F} \cup \mathcal{S} \quad (\mathrm{EC}.18\mathrm{j}) $$

$$ \sum_{i \in \mathcal{I}} \sum_{y \in \mathcal{Y}} q_{ity}^{\mathrm{DA}} = 0, \forall t \quad (\mathrm{EC}.18\mathrm{k}) $$

$$ \sum_{i \in \mathcal{F} \cup \mathcal{S}} q_{it}^{R} \ge M_{\mathrm{R}}, \forall t \quad (\mathrm{EC}.18\mathrm{l}) $$

$$ - \bar{s}_{\ell} \le \sum_{n \in \mathcal{N}} [\Psi]_{(\ell,n)} \left( \sum_{i \in \mathcal{I}_n} \sum_{y \in \mathcal{Y}} q_{ity}^{\mathrm{DA}} \right) \le \bar{s}_{\ell}, \forall t, \forall \ell \in \mathcal{L}, \quad (\mathrm{EC}.18\mathrm{m}) $$

where the parameter $M_{\mathrm{R}}$ is the exogenously-determined minimum reserve requirement set by the system operator. Next, closer to real-time the following flexibility activation problem is solved for each uncertainty realization, denoted by $\hat{\xi}$.

Real-time flexibility activation problem, $\mathcal{R}1_b, \forall \hat{\xi}$:

$$ \min_{q_{ity}^{\mathrm{RT}}} \sum_{i \in \mathcal{I} \setminus \mathcal{D}} \sum_{t \in \mathcal{T}} \sum_{y \in \mathcal{Y}} c_{ity}^{\mathrm{Y}} q_{ity}^{\mathrm{RT}} + \sum_{i \in \mathcal{W}} c_{\mathrm{spill}} q_{it}^{\mathrm{RT}} - \sum_{i \in \mathcal{D}} c_{\mathrm{shed}} q_{it}^{\mathrm{RT}} \quad (\mathrm{EC}.19\mathrm{a}) $$

$$ \text{s.t.} \quad - \frac{q_{it}^{\mathrm{R}*}}{Y} \le q_{ity}^{\mathrm{RT}} \le \frac{q_{it}^{\mathrm{R}*}}{Y}, \forall y, \forall t, \forall i \in \mathcal{F} \cup \mathcal{S} \quad (\mathrm{EC}.19\mathrm{b}) $$

$$ -q_{it}^{\mathrm{R}*} \le \sum_{y \in \mathcal{Y}} q_{ity}^{\mathrm{RT}} \le q_{it}^{\mathrm{R}*}, \forall t, \forall i \in \mathcal{F} \cup \mathcal{S} \quad (\mathrm{EC}.19\mathrm{c}) $$

$$ 0 \le q_{ity}^{\mathrm{RT}} \le \frac{\hat{q}_{it} - \hat{\xi}_{it}}{Y}, \forall t, \forall i \in \mathcal{W} \quad (\mathrm{EC}.19\mathrm{d}) $$

$$ - \frac{\hat{q}_{it}}{Y} \le q_{ity}^{\mathrm{RT}} \le 0, \forall t, \forall i \in \mathcal{D} \quad (\mathrm{EC}.19\mathrm{e}) $$

$$ \sum_{i \in \mathcal{I} \setminus \mathcal{W}} \sum_{y \in \mathcal{Y}} q_{ity}^{\mathrm{RT}} = 1^{\top} \hat{\xi}_{\ell} + \sum_{i \in \mathcal{W}} q_{it}^{\mathrm{RT}}, \forall t \quad (\mathrm{EC}.19\mathrm{f}) $$

$$ - \bar{s}_{\ell} \le \sum_{n \in \mathcal{N}} [\Psi]_{(\ell,n)} \left( \sum_{i \in \mathcal{I}_n} \sum_{y \in \mathcal{Y}} (q_{ity}^{\mathrm{DA}*} + q_{ity}^{\mathrm{RT}}) \right) \le \bar{s}_{\ell}, \forall t, \forall \ell \in \mathcal{L}, \quad (\mathrm{EC}.19\mathrm{g}) $$

where $(q_{ity}^{\mathrm{DA}*}, q_{it}^{\mathrm{R}*}) = \mathrm{argmin}_{\mathcal{R}1_a} \mathcal{R}1_a$ are day-ahead dispatch and reserve capacity, respectively.

**Scenario-based market framework:** The scenario-based stochastic market-clearing problem $\mathcal{R}2$ is a two-stage problem. The first stage involves the day-ahead schedules as a result of the so-called here-and-now decisions, whereas the second stage adjusts the day-ahead schedules with real-time adjustments to mitigate the uncertainty from weather-dependent power producers (wait-and-see). The adjustment decisions for real-time stage are already included in the day-ahead market-clearing problem by considering a finite number of uncertainty realization scenarios, anticipating that the actual power production is captured in the scenarios considered. Like with $\mathcal{R}1$, we adopt
a linear approximation of the quadratic costs to remain within the LP framework. In the following,
we provide a concise formulation for this benchmark.

$$
\min_{q_{ity}^{\text{DA}}, q_{ityk}^{\text{RT}}} \sum_{i \in \mathcal{I} \setminus \mathcal{D}} \sum_{t \in \mathcal{T}} \sum_{y \in \mathcal{Y}} (c_{ity}^{\text{Y}} q_{ity}^{\text{DA}}) + \sum_{k=1}^{K} \phi_k \left[ \sum_{i \in \mathcal{I} \setminus \mathcal{D}} \sum_{t \in \mathcal{T}} \sum_{y \in \mathcal{Y}} (c_{ity}^{\text{Y}} q_{ity}^{\text{RT}}) \right] \quad (\text{EC.20a})
$$

$$
\text{s.t.} \quad 0 \le q_{ity}^{\text{DA}} \le \frac{1}{Y}(\bar{Q}_i - \underline{Q}_i), \quad \forall y, \forall t, \forall i \in \mathcal{I} \setminus \mathcal{D} \qquad (\text{EC.20b})
$$

$$
\underline{Q}_i \le \sum_{y \in \mathcal{Y}} q_{ity}^{\text{DA}} \le \bar{Q}_i, \quad \forall t, \forall i \in \mathcal{F} \cup \mathcal{W} \qquad (\text{EC.20c})
$$

$$
- \underline{\Delta}_i \le \sum_{y \in \mathcal{Y}} (q_{ity}^{\text{DA}} - q_{i(t-1)y}^{\text{DA}}) \le \bar{\Delta}_i, \forall t > 2, \forall i \in \mathcal{F} \quad (\text{EC.20d})
$$

$$
- \frac{1}{\eta_i^C} \bar{Q}_i^C \le \sum_{y \in \mathcal{Y}} q_{ity}^{\text{DA}} \le \eta_i^D \bar{Q}_i^D, \forall t, \forall i \in \mathcal{S} \qquad (\text{EC.20e})
$$

$$
\underline{E}_i \le E_i^0 - \sum_{t'=1}^{t} \sum_{y \in \mathcal{Y}} q_{it'y}^{\text{DA}} \le \bar{E}_i, \forall t, \forall i \in \mathcal{S} \qquad (\text{EC.20f})
$$

$$
E_i^0 - \underline{B}_i \le E_i^0 - \sum_{t'=1}^{T} \sum_{y \in \mathcal{Y}} q_{it'y}^{\text{DA}} \le E_i^0 + \bar{B}_i, \forall i \in \mathcal{S} \qquad (\text{EC.20g})
$$

$$
\sum_{i \in \mathcal{I}} \sum_{y \in \mathcal{Y}} q_{ity}^{\text{DA}} = 0, \forall t \qquad (\text{EC.20h})
$$

$$
- \bar{s}_{\ell} \leq \sum_{n \in \mathcal{N}} [\Psi]_{(\ell,n)} \left( \sum_{i \in \mathcal{I}_n} \sum_{y \in \mathcal{Y}} q_{ity}^{\text{DA}} \right) \leq \bar{s}_{\ell}, \forall t, \forall \ell \in \mathcal{L} \qquad (\text{EC.20i})
$$

$$
- \frac{Q_i^R}{Y} \le p_{itky}^{\text{RT}} \le \frac{\bar{Q}_i^R}{Y} \quad \forall y, \forall k, \forall t, \forall i \in \mathcal{F} \cup \mathcal{S} \qquad (\text{EC.20j})
$$

$$
- \underline{Q}_i^R \le \sum_{y \in \mathcal{Y}} p_{itky}^{\text{RT}} \le \bar{Q}_i^R, \quad \forall k, \forall t, \forall i \in \mathcal{F} \cup \mathcal{S} \qquad (\text{EC.20k})
$$

$$
- \underline{Q}_i \le \sum_{y \in \mathcal{Y}} (p_{ity}^{\text{DA}} + p_{itky}^{\text{RT}}) \le \bar{Q}_i, \forall k, \forall t, \forall i \in \mathcal{F} \cup \mathcal{W} \qquad (\text{EC.20l})
$$

$$
- \frac{1}{\eta_i^C} \bar{Q}_i^C \le \sum_{y \in \mathcal{Y}} (q_{ity}^{\text{DA}} + q_{itky}^{\text{RT}}) \le \eta_i^D \bar{Q}_i^D, \forall k, \forall t, \forall i \in \mathcal{S} \qquad (\text{EC.20m})
$$

$$
\underline{E}_i \le E_i^0 - \left( \sum_{t'=1}^{t} \sum_{y \in \mathcal{Y}} (q_{it'y}^{\text{DA}} + q_{it'ky}^{\text{RT}}) \right) \le \bar{E}_i, \forall t, \forall i \in \mathcal{S} \qquad (\text{EC.20n})
$$

$$
E_i^0 - \underline{B}_i \le E_i^0 - \left( \sum_{t'=1}^{t} \sum_{y \in \mathcal{Y}} (q_{it'y}^{\text{DA}} + q_{it'ky}^{\text{RT}}) \right) \le E_i^0 + \bar{B}_i, \forall k, \forall i \in \mathcal{S} \quad (\text{EC.20o})
$$

$$
\sum_{i \in \mathcal{I}} \sum_{y \in \mathcal{Y}} q_{itky}^{\text{RT}} = 0, \forall k, \forall t \qquad (\text{EC.20p})
$$

$$
- \bar{s}_{\ell} \le \sum_{n \in \mathcal{N}} [\Psi]_{(\ell,n)} \left( \sum_{i \in \mathcal{I}_n} \sum_{y \in \mathcal{Y}} (q_{ity}^{\text{DA}} + q_{itky}^{\text{RT}}) \right) \le \bar{s}_{\ell}, \forall k, \forall t, \forall \ell \in \mathcal{L} \quad (\text{EC.20q})
$$
### EC.2.4. Out-of-sample simulations

Out-of-sample simulations are performed to evaluate the quality of the day-ahead market-clearing outcomes by fixing the decisions obtained at the day-ahead stage to their optimal values and solving a real-time flexibility activation problem. For the proposed conic market framework, the out-of-sample problem (EC.21) formulated in the following admits fixed day-ahead decisions ($q_{it}^*, \alpha_{it}^*, \gamma_{it}^*$) obtained from the solution to $M^{cc}$. For the LP-based benchmark problems, we use $q_{it}^* = \sum_{y \in Y} q_{ity}^{DA*}$ from the solution to $\mathcal{R}1_a$ for the deterministic benchmark problem and $q_{it}^* = \sum_{y \in Y} q_{ity}^{DA*}$ from the solution to $\mathcal{R}2$ for the scenario-based stochastic benchmark problem. We have, $\forall \hat{\xi}$:

$$ \min_{q_{it}^{\text{RT}}} \sum_{i \in \mathcal{I} \setminus (\mathcal{D} \cup \mathcal{W})} \sum_{t \in \mathcal{T}} \left( c_{it}^{\text{Q}}(q_{it}^{*} + q_{it}^{\text{RT}})^2 + c_{it}^{\text{L}}(q_{it}^{*} + q_{it}^{\text{RT}}) \right) + \sum_{i \in \mathcal{W}} c^{\text{spill}} q_{it}^{\text{RT}} + \sum_{i \in \mathcal{D}} c^{\text{shed}} q_{it}^{\text{RT}} \quad (\text{EC.21a}) $$

$$ \text{s.t.} \quad \underline{Q}_i \le q_{it}^* + q_{it}^{\text{RT}} \le \bar{Q}_i, \forall t, \forall i \in \mathcal{F} \quad (\text{EC.21b}) $$

$$ -\underline{\Delta}_i \le q_{it}^* + q_{it}^{\text{RT}} \le \bar{\Delta}_i, \forall t > 1, \forall i \in \mathcal{F} \quad (\text{EC.21c}) $$

$$ -\frac{1}{\eta^C} \bar{Q}_i^C \le q_{it}^* + q_{it}^{\text{RT}} \le \eta^D \bar{Q}_i^D, \forall t, \forall i \in \mathcal{S} \quad (\text{EC.21d}) $$

$$ \underline{E}_i \le E_i^0 - \left( \sum_{t'=1}^{t} q_{it'}^* + q_{it'}^{\text{RT}} \right) \le \bar{E}_i, \forall t, \forall i \in \mathcal{S} \quad (\text{EC.21e}) $$

$$ E_i^0 - \underline{B}_i \le E_i^0 - \left( \sum_{t'=1}^{t} q_{it'}^* + q_{it'}^{\text{RT}} \right) \le E_i^0 + \bar{B}_i, \forall i \in \mathcal{S} \quad (\text{EC.21f}) $$

$$ 0 \le q_{it}^{\text{RT}} \le \hat{q}_{it} - \hat{\xi}_{it}, \forall t, \forall i \in \mathcal{W} \quad (\text{EC.21g}) $$

$$ -\hat{q}_{it} \le q_{it}^{\text{RT}} \le 0, \forall t, \forall i \in \mathcal{D} \quad (\text{EC.21h}) $$

$$ -\underline{Q}_i^R \le q_{it}^{\text{RT}} \le \bar{Q}_i^R, \forall t, \forall i \in \mathcal{F} \cup \mathcal{S} \quad (\text{EC.21i}) $$

$$ \sum_{i \in \mathcal{I} \setminus \mathcal{W}} q_{it}^{\text{RT}} = \mathbb{1}^{\top} \hat{\xi}_t + \sum_{i \in \mathcal{W}} q_{it}^{\text{RT}}, \forall t \quad (\text{EC.21j}) $$

$$ - \bar{s}_{\ell} \le \sum_{n \in \mathcal{N}} [\Psi]_{(\ell,n)} \left( \sum_{i \in \mathcal{I}_n} q_{it}^* + q_{it}^{\text{RT}} \right) \le \bar{s}_{\ell}, \forall t, \forall \ell \in \mathcal{L} \quad (\text{EC.21k}) $$

For $M^{cc}$, these additional constraints restrict the real-time adjustments:

$$ q_{it}^{\text{RT}} = \mathbb{1}^{\top} \hat{\xi}_t \alpha_{it}^*, \forall t, \forall i \in \mathcal{F} \quad ; \quad q_{it}^{\text{RT}} = \mathbb{1}^{\top} \hat{\xi}_t \gamma_{it}^*, \forall t, \forall i \in \mathcal{S}. \quad (\text{EC.21l}) $$

### References

* Bienstock D, Chertkov M, Harnett S (2014) Chance-constrained optimal power flow: Risk-aware network control under uncertainty. *SIAM Review* 56(3):461–495.

* Farivar M, Low SH (2013) Branch flow model: Relaxations and convexification-Part I. *IEEE Transactions on Power Systems* 28(3):2554–2564.

* Georghiou A, Kuhn D, Wiesemann W (2019) The decision rule approach to optimization under uncertainty: methodology and applications. *Computational Management Science* 16(4):545–576.
Georghiou A, Wiesemann W, Kuhn D (2015) Generalized decision rule approximations for stochastic programming via liftings. *Mathematical Programming* 152(1):301–338.

Xie, W., Ahmed, S. & Jiang, R. Optimized Bonferroni approximations of distributionally robust joint chance constraints. *Mathematical Programming*. 191:79-112.