## 4 Solution Methodology  
In this section, we will transform the mathematical model established above and present an appropriate solution approach. The output of renewable energy in the system is predicted based on historical data. Accordingly, we can collect historical data samples from typical days similar to the day to be optimized, obtaining a dataset of the output prediction errors, denoted as \(D_{\xi}\) with sample size \(N\). Based on the linear relationship of Equations (12), (13), (28), and (32), we can transform Equations (33) and (34) into the following form:  
\[\mathbb{P}_{D_{\xi}}\Big{(}h(\xi,x(t))-P_{load,t}^{H}-\Delta P^{H}\leq 0\Big{)} \geq 1-\rho \tag{36}\]  
\[\mathbb{P}_{D_{\xi}}\Big{(}h(\xi,x(t))-P_{load,t}^{H}+\Delta P^{H}\geq 0\Big{)} \geq 1-\rho \tag{37}\]  
where the function \(h(\xi_{t},x(t))=P_{CHP,t}^{H}+P_{P2G,t}^{H}\) is used to represent the relationship between decision variable \(x\in\mathbf{X}\) and uncertainty parameter \(\xi\). Therefore, we can obtain the standard mathematical model named primary model (**PO**):  
(**PO**) Objective function: Equation (21)  
Constraints: Equations (1)-(20), Equations (22)-(32), Equations (36) and (37)  
According to the principles of RO, it is required to ensure that the constraints are satisfied for any \(\xi_{t}\in D_{\xi}\). It can be seen that a large sample size of \(D_{\xi}\) will lead to computational burdens, while a small sample size will highlight the conservativeness of RO itself. To effectively reduce the dimensionality of \(D_{\xi}\), we draw on the  
To match the uncertainty set after clustering, the functions in Equations (36) and (37) also need to be transformed. For simplicity, the average value of each \(C_{k}\) can be taken, which gives the following result:  
\[\sum_{k}\omega_{k}\Big{(}h(\xi_{k},x(t))-P^{H}_{load,t}-\Delta P^{H}\Big{)} \leq 0 \tag{42}\]  
\[\sum_{k}\omega_{k}\Big{(}h(\xi_{k},x(t))-P^{H}_{load,t}+\Delta P^{H}\Big{)} \geq 0 \tag{43}\]  
Based on the above analysis, we have transformed the **PO** problem into a mean robust optimization (**MRO**) problem as follows:  
**(MRO)** Objective function: Equation (21)  
Constraints: Equations (1)-(20), Equations (22)-(32)  
Equation (42), \(\forall\xi_{k}\in\mathcal{U}(K,\epsilon(\rho)+\epsilon(k))\)  
Equation (43), \(\forall\xi_{k}\in\mathcal{U}(K,\epsilon(\rho)+\epsilon(k))\)  
RO is a commonly used approach for handling optimization problems with uncertain parameters. It ensures constraint satisfaction under the worst-case scenario within the uncertainty set, making conservativeness an inherent characteristic. DRO incorporates possible data distributions within an ambiguity set and measures the divergence between each distribution and the empirical distribution. Although DRO reduces the conservativeness of RO, it inevitably increases the computational burden. In the above exploration, we have reduced the data dimensionality through clustering and constructed an uncertainty set for each cluster, trying to achieve a balance between conservatism and computational difficulty. The details are illustrated in Figure 2.  
The last two constraints in the **MRO** need further processing in order to make the problem easier to solve. Taking Equation (42) as an example, the treatment for Equation (43) is similar. Equation (42) must always be satisfied under the given uncertainty set \(\mathcal{U}\). Based on the characteristics of RO, the worst-case scenario among all possible options is considered, and it can be obtained that:  
\[\underset{\xi_{k}}{\text{maximize}} \sum_{k}\omega_{k}\Big{(}h(\xi_{k},x(t))-P^{H}_{load,t}-\Delta P^{ H}\Big{)}\] (44) subject to \[\sum_{k}\omega_{k}\|\xi_{k}-\overline{d_{k}}\|\leq\epsilon(\rho)+ \epsilon(k) \tag{45}\]  
Figure 2: Explanation of optimization approaches.