## 2 Problem Formulation  
### Stochastic CNEP Problem  
In this section, the original mathematical model of the CNEP problem based on Figure 1 is presented. In the proposed CNEP model, the investment and operation costs of power systems and the benefit gained from increasing the flexibility are included. In the following subsections, the mathematical formulations are discussed. (A) Objective function: the objective function of the CNEP problem is expressed in Equation (1), and consists of five terms. The first one indicates the operation cost of generation units, and the second one presents the annual investment cost of the transmission expansion. The third and fourth terms refer to the RESs' annual investment cost, and annual investment and operation cost of ESSs, respectively, and the flexibility index is formulated in the last term of the objective function. An annual step time in the horizon time is considered in this paper. Thus, the operation cost is multiplied by 8760, i.e., 24 \(\times\) 365. It should be noted that the first and fifth terms of the objective function and the operation cost of ESS depend on uncertain parameters, while the second term, third term, and ESS investment costs do not. This means that the generating and ESS schedules are associated with the scenarios' realization, as well as the system flexibility; however, the investment in new transmission lines, ESS, and RES cannot be changed by each scenario [32]. \[ \begin{array}{ll}\min&\sum\limits_{i,t,q,\omega}365\times CF\times\rho_{ \omega}C_{i}PG_{i,t,y,\omega}+\\ &\sum\limits_{i,j}0.5x_{i,j}IC_{i,j}^{L}+\\ &\sum\limits_{i}IC_{i}^{R}x_{i}^{R}+\\ &\sum\limits_{i}IC_{i}^{F}x_{i}^{F}+\sum\limits_{i,t,q,\omega}365\times\rho_{ \omega}\lambda_{t,q,\omega}\Big{(}P_{i,t,q,\omega}^{ch}\Big{)}\\ &-\sum\limits_{\omega}\rho_{\omega}\times FC\times SF_{\omega}\end{array}  \tag{1}\]  
(B) AC power flow equations: These equations are introduced in (2)-(5), which correspond to the active and reactive power balance in each bus and time, (2) and (3), and the active and reactive power flow of lines in each time, (4) and (5), respectively. It should be noted that the multiplication of binary variable \(x\) in (4) and (5) is due to modeling the effect of the line construction. These constraints should be exerted only for the line candidates that are selected to be constructed. Also, note that the line between buses \(i\) and \(j\) is the same as the one between buses \(j\) and \(i\). This fact is modeled by (6). In addition, \(A\) is a binary  
Figure 1: The outline of the proposed stochastic coordinated network expansion planning (CNEP). matrix whose elements represent the existence of transmission lines between different busses [21]. \[PG_{i,t,y,\omega}+\left(P\underline{t}_{i,t,y,\omega}^{cdch}-P\underline{t}_{i,t,y,\omega}^{ch}\right)-\sum_{j}A_{i,j}P_{L_{i,j,t,y,\omega}}=PD_{i,t,y,\omega}- PR_{i,t,y,\omega},\quad\forall i,t,y,\omega \tag{2}\]  
\[QG_{i,t,y,\omega}-\sum_{j}A_{i,j}QL_{i,j,t,y,\omega}=QD_{i,t,y,\omega},\quad \forall i,t,y,\omega \tag{3}\]  
\[PL_{i,j,t,y,\omega}=\bigg{\{}g_{ij}\big{(}V_{i,t,y,\omega}\big{)}^{2}-V_{i,t,y, \omega}V_{j,t,y,\omega}\bigg{\{} \begin{array}{c}g_{i,j}\cos(\theta_{i,t,y, \omega}-\theta_{j,t,y,\omega})+\\ b_{i,j}\sin(\theta_{i,t,y,\omega}-\theta_{j,t,y,\omega})\end{array} \bigg{\}} \bigg{\}}x_{i,j} \tag{4}\]  
\[QL_{i,j,t,y,\omega}=\bigg{\{}-b_{i,j}\big{(}V_{i,t,y,\omega}\big{)}^{2}-V_{i,t,y,\omega}V_{j,t,y,\omega}\bigg{\{} \begin{array}{c}g_{i,j}\sin(\theta_{i,t,y, \omega}-\theta_{j,t,y,\omega})-\\ b_{i,j}\cos(\theta_{i,t,y,\omega}-\theta_{j,t,y,\omega})\end{array} \bigg{\}} x_{i,j} \tag{5}\]  
\[\forall i,j,t,\omega \tag{6}\]  
\[x_{i,j}=x_{j,i}\quad\forall i,j \tag{7}\]  
(C) System operation limitations: The operational limits of the system, i.e., the line capacity, the generating unit capacity, and the voltage limits, are expressed through (7)-(9) by the power flow equations [6].