## 6 Results and Discussion
### Single Hour Analysis
If the uncertainty on the flexibility service prices is added (as indicated in Table 4), a slight rise of requested flexibility is registered (maximum of 8% with an a priori risk of 1%), with a more definite increment in the total cost (more than 14% with an a priori risk of 1%). Indeed, the robust fulfilment of constraint (19) associates the higher price of the uncertainty range with the resources that place the bigger amount of flexibility at DSO's disposal, determining the objective function to vary from 100.2 k\(\xi\) (with a priori risk of 1%) to 76.5 kW (with a priori risk of 30%). In search of the best planning solution, conventional network refurbishment always constitutes the benchmark for innovative alternatives. Indeed, DSOs well know costs and reliability performances of building a new line or upgrading an existing conductor. A way to include this comparison is to fix an upper bound to the objective function (i.e., a yearly budget cap for the optimization of flexibility services), assessed by transforming the overall network investment into an equivalent annual cost. When a budget cap is considered, a strong constraint is introduced in the optimization problem, often causing the impossibility to satisfy all technical inequality constraints. However, also these cases can become valuable because, in a risk-based planning approach, any improvement (even partial) of the distribution system performances against specific contingencies can contribute to reduce the overall system risk (\(R_{T}\)) below the acceptable value (\(R_{A}\)). To test the proposed optimization tool in providing these partial results, a tight budget cap (\(B_{cap}\) = 40 k\(\ell\)) has been applied to the previous studies. With this new constraint, none of the combinations of flexibility services and BESS installations has been able to satisfy all the technical inequality constraints. In these cases, the slack variables turn active allowing anyway the estimation of the overall solution improvement. By way of example, Figure 11 depicts the voltage profiles obtained by resorting only to DR actions (blue profile) or by exploiting also storage devices (yellow profile), when the a priori risk accepted for the robust optimization is 10%. Without BESS, the flexibility service has been requested to all the last seven secondary substations of feeder \(F2\) (from node 16 to node 22), with a total demand curtailment of 523 kW and a posteriori risk of 1.56%. Note that this value has not been calculated as the probability to violate the technical limit \(V^{min}\), but the corrected limit \(V^{min}-s_{i}^{Vmin}\), i.e., the probability that the voltage profile can be lower than the \"blue\" one depicted in Figure 11. In other words, the available DERs are able to deal with many of the operating conditions that cause an excessive voltage drop, so raising the voltage profile closer to the technical limit. The residual gap between each nodal voltage and \(V^{min}\) is exactly the corresponding slack variable returned by the robust optimization. Therefore, the overall residual risk associated to this planning solution is obtained by adding the probability \(p_{tcv}^{*}\) (Figure 4), related to the biggest slack variable (\(s_{22}^{Vmin}\)), to the calculated a posteriori risk. By also considering storage devices (yellow profile), the budget cap allows installing only one BESS in node 22 and involving only two DR resources (nodes 21 and 22) for a total curtailment request of 180 kW. The calculated a posteriori risk is null because the robust solution covers the worst behaviour of these two resources (budget of uncertainty \(\Gamma\) = 5). The voltage profile is further improved, with a smaller residual probability \(p_{tcv}^{*}\), now corresponding to the slack variable of node 17 (the biggest).