## 2 Materials and Methods
### Mathematical Formulation of the Distribution Network Reconfiguration Problem
#### 2.1.2 Formulation of the Objectives Function for the Reconfiguration Problem  
The goal of this study is to find the best distribution network reconfiguration that reduces both the ENS index and the active power losses while maintaining a set of constraints. The objectives of the optimization problem are detailed as follows.  
* _Energy not supplied criterion_ The reliability of distribution networks has become increasingly important in the deregulated power sector. To address these issues, distribution network reconfiguration is regarded as a cost-effective and efficient way to increase system reliability. The ENS index is used in distribution system planning studies to refer to customer interrupted electricity. The majority of customer interruptions are caused by distribution system component failures. The ENS index forecasts the amount of energy that will be lost due to failures over a given time period. Based on the accurate estimation of the ENS index, appropriate planning and design initiatives in distribution systems can be implemented to provide consumers with cost-effective and reliable power. The ENS is one of the most significant reliability indices that must be included in the distribution network reconfiguration formulation in order to enhance reliability. This study aims to find a radial operating structure that minimizes the ENS while satisfying operational constraints in order to increase customer reliability worth.  
We used Equation (2) [25] to calculate the total reliability index ENS, which assesses the quality of supply of all customers.  
\[f_{objectf1}=ENS=\sum_{j=2}^{N_{c}}ENS_{j}=\sum_{j=2}^{N_{c}}P_{j}\times\sum \limits_{\begin{array}{c}i=1\\ i\
eq j\end{array}}^{n_{b}}\lambda_{ij}\times l_{ij}\times t_{ij} \tag{2}\]  
where  
\(P_{j}\) is the active power of the unpowered load point \(j\) [kW], and \(n_{b}\) is the number of radial configuration branches.  
\(N_{c}\) is the total number of consumers.  
\(\lambda_{ij}\), \(l_{ij}\), and \(t_{ij}\) are, respectively, the failure rate [fault/km. year], length [km], and the repair and commissioning time of the line (\(i\), \(j\)) [h/fault].  
The minimization of the ENS criterion contributes to the maximization of the reliability of various configurations. Therefore, the configuration with the lowest index is the most reliable.  
* _Active power losses criterion_  
The distribution networks constitute the majority of the electric power system. This results in a large amount of active power loss. To this end, this criterion cannot be ignored in the distribution network planning problem. Reducing this objective culminates in an optimal distribution network reconfiguration. The mathematical formulation of this problem can be represented as [22]  
\[f_{objectf2}=\sum_{i=1}^{N}\sum_{j=i+1}^{N}R_{ij}\times{I_{ij}}^{2} \tag{3}\]  
where \(N\) is the total number of nodes, \(R_{ij}\) is the resistance of the line (\(i\),\(j\)), and \(I_{ij}\) is the electrical current flowing through the line (\(i\),\(j\)).  
It was important to determine the voltage magnitude and phase angle of each node in order to obtain an accurate expression for the system power losses. Therefore, a load-flow calculation was required. In this context, a new load-flow method for radial distribution networks is proposed.