## 3 Risk Assessment of Technical Constraints Violation
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{**Branch**} & \multirow{2}{*}{**Length [km]**} & **S [mm\({}^{2}\)]** & **Branch** & **Length [km]** & **S [mm\({}^{2}\)]** \\ \hline
1–2 & 2.097 & 35 & 11–12 & 1.500 & 20 \\
2–3 & 1.600 & 35 & 11–13 & 3.035 & 35 \\
3–4 & 2.350 & 35 & 13–14 & 2.150 & 16 \\
4–15 & 1.725 & 35 & 13–15 & 1.126 & 35 \\
4–5 & 1.500 & 16 & 15–16 & 1.790 & 16 \\
2–6 & 1.849 & 16 & 16–17 & 2.900 & 16 \\
6–7 & 0.500 & 16 & 16–18 & 1.460 & 16 \\
7–8 & 0.950 & 16 & 18–19 & 1.760 & 16 \\
1–9 & 1.806 & 35 & 18–20 & 1.200 & 16 \\
9–10 & 1.000 & 35 & 18–21 & 3.850 & 16 \\
10–11 & 0.890 & 35 & 21–22 & 2.665 & 25 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Network branch data. Figure 5: MV distribution network analyzed. Only one typical day has been used to simulate the customers' behaviour along the whole year. Their hourly variability has been represented by a Gaussian distribution with a mean value reported in the figure and a constant standard deviation of 5%. Obviously, more detailed representations are possible (multiple typical days for catching the weekly and seasonal variability, different standard deviations along the day), but this simpler model has been preferred because the focus of the paper is mainly on the performance of the new tool for the optimal exploitation of energy resources during critical operating conditions and not on the whole planning study of the distribution system. When the network is in its normal operating conditions, excessive voltage drops may appear in the peripheral nodes, particularly during the evening peak (from 18 th to 23 rd hour), due to the growth of residential and agricultural electric demand and the simultaneous fall of the PV production. Minimum voltage violation can happen also at the 7 th and 8 th hour for the high demand of agricultural and industrial loads and the absence of PV production. For the sake of argument, the extreme voltage profile along the network (i.e., the minimum nodal voltages assessed through a probabilistic load flow, \(\hat{V}^{min}_{lh}\)) at the 19 th hour is depicted in Figure 7a, together with daily voltage profile (Figure 7b) of the furthest node from the Primary Substation (node 22 of Figure 5). Additional contingencies happen during emergency configurations, when, due to the outage of a trunk line, the network is reconfigured by closing the emergency connection 4-15 and the electricity supply of all the nodes is preserved. Indeed, even if an augmented voltage operating range is accepted, technical issues may still happen. An example is shown in Figure 8, that refers to the isolation of line 1-2 and the resupply of all the network only from line 1-9. Under this configuration, also the secondary substations 6, 7, and 8 result far from the Primary Substation and in the evening hour, due to the high demand and the absence of generation, they manifest excessive voltage drops. This situation is illustrated with the extreme voltage profile along the network at the 19 th hour (Figure 8a), and with the voltage daily profile of node 22 (Figure 8b). Figure 6: Load profiles of customer categories (average hourly values of active power absorbed). Figure 7: (a) Network profile of the minimum nodal voltage at the 19 th hour; (b) Daily profile of the minimum voltage of node 22. Each of these contingencies is characterised by a specific risk of occurrence, \(R_{b,h}\), that should be determined with the procedure illustrated in the flow-chart of Figure 3. To simplify the results reading, it has been assumed that all the contingencies during normal operating conditions are certain, i.e., by using a unique typical daily profile to model the whole yearly behaviour of the distribution system customers, they happen for 365 h/year. Instead, the risk of occurrence for the contingencies analysed during emergency configuration has been arbitrarily assumed equal to 1 h/year (considering the relatively low fault rate for the lines).