## 2 Problem Formulation  
In rural areas which are far from the city center, there are always some local hydro power stations to provide the local power consumption. However, with the exploitation of RESs and the photovoltaic poverty alleviation program (PPAP), on a large number of windfarms, PVs were installed. Such RESs are often installed locally and the surplus energy provided by the hydro stations could only be transmitted to the national grid, resulting in the voltage overshoot and poor power quality. It is difficult to solve these problems with traditional methods, such as a battery energy storage system (BESS), hydrogen storage system [18] and network reconfiguration, largely because the surplus energy is of the order of 100 MW\(\cdot\)h and the structure of the network is already defined. Thus, adding transmission lines can be a promising approach because once an ending large hydro station directly connects to the national grid, the power quality of the grid increases significantly. However, such an intuitive judgment cannot be used as a guideline for real life practice, and a mathematical model is needed to help decide the number of added lines and where to add transmission lines.  
Unlike traditional network clustering, which aims to find the best partition of the network with the highest inter-cluster cohesiveness and loosest intra-cluster coupling, network optimization separates the sub-grid, which is far from the national grid and unbalanced in regard to the energy supply and demand. Suppose a grid is divided into \(G_{1}\) and \(G_{2}\), and \(G_{1}\) is the relatively balanced grid originally connected to the national grid. Before the separation, a large amount of power from unbalanced \(G_{2}\) should be transmitted to \(G_{1}\), leading to the voltage overshoot in the ending node of \(G_{1}\). Once an effective separation is made, the power flow through \(G_{1}\) decreases significantly, and a better power quality is achieved. In the meanwhile, the voltage of the first node in \(G_{2}\) will be exactly 1 p.u., instead of the much worse condition before the separation, which also improves the power quality in \(G_{2}\). As a result, an effective separation should offer an improvement of the power quality for all of the sub-grids. The following model of network optimization can be formulated using the above discussion. Suppose that the level of the power quality of a grid \(G\) can be quantified with \(qua(G)\), where a smaller value means a better quality, and graph \(G\) is separated into \(n\) graphs. The following model can be formulated:  
\[\begin{array}{c}\min f=\max\{qua(G_{1}),qua(G_{2}),\cdots\cdots qua(G_{n})\} \\ G_{1}\cup G_{2}\cup G_{3}\cup\cdots\cdots G_{n}=G\\ \mathop{\forall}\limits_{i\
eq j}G_{i}\cap G_{j}=\varnothing\end{array} \tag{1}\]  
Because only the connected graph without loops is considered, its sub-graph is also a connected graph without loops, which ensures the basic property of a grid. The second and third equations are mutually exclusive and exhaustive of all of the separations; the first equation ensures the power quality of all of the sub-grids to achieve the best conditions. During the flow, a metric power mileage was deduced to quantify the quality of a power grid, and then an algorithm was proposed to perform the separation.