## 3 Preliminary Work
### Algorithm to Calculate Mileage Matrix
In each iteration, \(ratio\) is the length of the graph to be partitioned over the length of the original graph, which is a constant. \(ratio\) equals 1 for the first iteration and keeps decreasing in the running process, leading to a heavier punishment. The flow chart of the algorithm is shown in Figure 1.

### Effectiveness of Terminal Condition

In this part, two cases are used to explain the effectiveness of Equations (7) and (8). For easy calculation, instead of using a discrete load like that found in real life, we used the continuous load, which is distributed evenly in the line. The punishment shown in Equation (6) is not discussed here. First, a transmission line with evenly distributed loads is discussed (Figure 2). Figure 2 is a model of a traditional distribution network, and it should not be partitioned by our algorithms because the separated grid is exactly the same as the original one. Once a partition is made, the iteration will continue until the end. If we cut the grid at the point that is \(m\) km from the end point, the resulting power mileage is calculated as shown in Table 2.

Figure 1: The flow chart of algorithm to calculate the mileage matrix. Figure 2: A simple case with a continuous load. From the power mileage calculation, we can see that when \(m=\frac{k}{2}\), the summation of \(PM_{1}\) and \(PM_{2}\) reaches the minimum and both \(PM_{1}\) and \(PM_{2}\) equal \(\frac{PM}{2}\). As we discussed earlier, the graph should not be separated by our algorithm, so this is the reason why we set the terminal condition as Equation (7). When we cut the graph at \(m=\frac{k}{2}\), two parts of the graph are exactly same, so that \(G_{2}\) is not more imbalanced than \(G_{1}\); thus, the division is 1. The above outcome proves the utility of Equation (6). A network that needs to be partitioned is discussed here. Unlike a pure load system, a large distributed generator (DG) was installed at the end of the grid. The power of the DG was exactly the total load, as shown in Figure 3.

When we cut the line at the same position as the first case, the result in Table 3 can be achieved. The summation of \(PM_{1}\) and \(PM_{2}\) does not change because the absolute value of the power flow through the sub-graph is exactly the same as that of the original one. The only difference is that the flow in the first sub-graph is in the opposite direction compared with that of the original grid. In this graph, our algorithm will cut the line at the point \(m=0.293L\) where both \(PM_{1}\) and \(PM_{2}\) equal \(\frac{PM}{2}\). This result is much more reasonable because the power flow through the line in the second sub-graph is much larger, so to reach a better global voltage improvement, the cut point should be closer to the DG. \begin{table}
\begin{tabular}{c c c} \hline \hline  & \(PM\) & \(PM_{1}\) **or**\(PM_{2}\) & **Division** \\ \hline \(G_{1}\) & & \(\frac{p}{2}(1-m)^{2}\) & \\ \(G_{2}\) & & \(\frac{p}{2}m^{2}\) & \\ Sum & \(\frac{p}{2}\) & \(\frac{p}{2}(1-2m(1-m))\) & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Power mileage for the continuous load case. \begin{table}
\begin{tabular}{c c c c} \hline \hline  & \(PM\) & \(PM_{1}\) **or**\(PM_{2}\) & **Division** \\ \hline \(G_{1}\) & & \(\frac{p}{2}(1-m)^{2}\) & \\ \(G_{1}\) & & \(\frac{p}{2}(1-m)^{2}\) & \\ \(G_{2}\) & & \(\frac{p}{2}m^{2}\) & \\ Sum & \(\frac{p}{2}\) & \(\frac{p}{2}(1-2m(1-m))\) & \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Power mileage for the continuous load case with DG. Figure 3: A simple case with a continuous load and DG. Also, the division is always larger than 1, which means the existence of the DG leads to the imbalance of the second sub-graph. ## 5 Case Study

To verify the utility of our network optimization algorithm, two case studies were used. The first case study is a 17-node grid in Chongqing, China, and the second one is a classical IEEE case with 123 nodes. The 17-node case was separated using the data for one year and the 123-node case used data at a single time point.