## 2 The Method of Typical Scenarios Partitioning and Load Distribution Matching
### Relationship between the Data Source and the Optimal Schemes in Reactive Power Optimization
The voltage and the control variables constraints are expressed as follows:  
\[V_{i,\min}\leq V_{i}\leq V_{i,\max} \tag{7}\]  
\[Q_{ci_{q}}=K_{ci_{q}}\cdot q_{ci_{q}},\quad i_{q}=1,\ldots,n_{q} \tag{8}\]  
\[T_{i_{T}}=1+K_{Ti_{T}}\cdot\Delta T_{i_{T}},\quad i_{T}=1,\ldots,n_{T} \tag{9}\]  
where \(V_{i,\min}\) and \(V_{i,\max}\) represent the upper and lower voltage bounds of node \(i\) respectively; \(n_{q}\) and \(n_{T}\) are respectively the number of capacitor compensation nodes and transformer nodes; if the capacitors are equal grouping and the single capacity is \(q_{ciq}\), \(Q_{ciq}\) is the compensation capacity of node \(i_{q}\) with \(K_{ciq}\) groups put into operation; \(T_{i_{T}}\) is the ratio of transformer with the tap position \(K_{Ti_{T}}\) and the minimum adjustment \(\Delta T_{i_{T}}\). As expressed in Equations (1)-(4), the objective function \(f\) can be expressed as a function of the system active load \(\mathbf{P}\), reactive load \(\mathbf{Q}\), the capacitor compensation capacity \(\mathbf{Q_{c}}\) and the transformer tap \(\mathbf{T}\), which can be expressed as follows:  
\[f=F(\mathbf{P},\mathbf{Q},\mathbf{Q_{c}},\mathbf{T}) \tag{10}\]  
where \(F(\cdot)\) expresses a mapping relation from \(\mathbf{P}\), \(\mathbf{Q}\), \(\mathbf{Q_{c}}\) and \(\mathbf{T}\) to the optimal objective function. Generally, the reactive power control scheme in distribution network consists of compensation capacity \(\mathbf{Q_{c}}\) and transformer tap \(\mathbf{T}\), which are determined by the load level and load distribution in each node while the network topology remains unchanged. Besides, reactive load is dependent upon the existence of active load, so it can be obtained by power factor. Therefore, Equation (10) can be simplified as follows:  
\[f_{1}=\sum_{i,j=1}^{n}G_{ij}(V_{i}^{2}+V_{j}^{2}-2V_{i}V_{j}\cos\theta_{ij}) \tag{2}\]0  
where \(g(\cdot)\) expresses a mapping relation from load distribution to reactive power control scheme; (\(P_{1}\),..., \(P_{n}\)) and (\(Q_{1}\),..., \(Q_{n}\)) respectively express the active power load and reactive power load distribution in different nodes. Since the compensation capacity of capacitor and the transformer tap are both finite discrete variables, the number of reactive power control schemes is limited. Though power load is a continuous variable and has some randomness, it appears a strong regularity and periodicity; and the optimal reactive compensation scheme remains the same in a certain range of load fluctuation. Therefore, while the amount of power load data and load distribution patterns that accumulated in the historical database is large enough, and assume that all historical control schemes are optimal, the corresponding control schemes of the existing load distributions are all contained in the database. Therefore, if the reactive power optimization is carried out for a certain time in the future, the similar network topologies, load distributions and corresponding control schemes are selected out from the historical database, and then the optimal control scheme is among the schemes. This paper is to solve the problem that how to find out the optimal plan from the historical database.