## 3 Research Methods
### Coding Method of the Solution
\begin{table}
\begin{tabular}{c c c c c c c} \hline Variables & \(x_{i,1,1}^{G}\) & \(x_{i,1,2}^{G}\) & \(x_{i,1,3}^{G}\) & \(x_{i,1,4}^{G}\) & \(x_{i,1,5}^{G}\) & \(x_{i,1,6}^{G}\) & \(x_{i,1,7}^{G}\) \\ Values & 90.5612 & 43.3485 & 34.7811 & 50.4562 & 70.2384 & 89.1744 & 63.3219 \\ \hline Variables & \(x_{i,2,1}^{G}\) & \(x_{i,2,2}^{G}\) & \(x_{i,2,3}^{G}\) & \(x_{i,2,4}^{G}\) & \(x_{i,2,5}^{G}\) & \(x_{i,2,6}^{G}\) & \(x_{i,2,7}^{G}\) \\ Values & 96.9822 & 55.4672 & \(-\)20.5617 & 92.8631 & 71.7825 & 39.4568 & 58.9245 \\ \hline \end{tabular}
\end{table} 
Table 2: An example of a solution for T = 2.  
accordingly. This study selected absorption refrigeration \(C_{AC}(t)\) as the solution variable that enters the update of the algorithm. In terms of electric energy load, the electric energy load \(P_{load}(t)\) plus the electric power required for compression refrigeration \(P_{EC}(t)\) should be equal to the sum of gas-turbine power generation \(P_{GT}(t)\), power of the power-storage equipment \(P_{ES}(t)\), the exchange power of the main grid \(P_{Grid}(t)\), the solar power generation \(P_{PV}(t)\), and the wind power generation \(P_{WT}(t)\) according to Equation (10). The solar power and wind power, which were calculated based on Equations (21) and (22) before the algorithm was carried out, are pre-input data and do not participate in the update of the algorithm. The power required for compression refrigeration \(P_{EC}(t)\) was determined in the previous paragraph. Therefore, in the gas-turbine power generation \(P_{GT}(t)\), the power of power-storage equipment \(P_{ES}(t)\), and the exchange power of the main grid \(P_{Grid}(t)\), the remaining one can be determined as long as two of them are determined, which means that we only needed to select two to participate in the update of the algorithm in this study. This study selected gas-turbine power generation and power-storage equipment as the solution variables in the algorithm in terms of power supply because the core of the CCHP system is the regulation of gas-turbine power generation and power-storage equipment. As mentioned in the previous paragraph, letting \(P_{PV}(t)+P_{WT}(t)=K\) and \(P_{EC}(t)+P_{load}(t)=M\), Equation (23) can be obtained as follows. In terms of the thermal energy load, the thermal energy load \(Q_{load}(t)\) plus the heat required for absorption refrigeration \(Q_{AC}(t)\) is equal to the sum of waste heat \(Q_{mc}(t)\) recovered from gas-turbine power generation, the power of the heat-storage equipment \(Q_{HS}(t)\), and gas-boiler heating \(Q_{CB}(t)\) during this period according to Equation (11). This study selected the power of the heat-storage equipment \(Q_{HS}(t)\) as the solution variable that enters the update of the algorithm. According to Equation (13), another variable is the waste heat \(Q_{mc}(t)\) recovered from gas-turbine power generation that is directly determined because the gas-turbine power generation \(P_{GT}(t)\) was determined in the previous paragraph. In Equation (11), letting \(Q_{mc}(t)=N\) and \(Q_{AC}(t)+Q_{load}(t)=L\), Equation (24) can be obtained as follows. In summary, this study selected four solution variables that enter the update of the algorithm from the seven solution variables, namely, the absorption refrigeration \(C_{AC}(t)\), the gas-turbine power generation \(P_{GT}(t)\), the charging/discharging of the power-storage equipment \(P_{ES}(t)\), and the storage/heat supply of the heat-storage equipment \(Q_{ES}(t)\). In addition, although the seven solution variables of this study are not limited in theory, the following constraints as shown in Equations (25)-(30) were set for each solution variable in order to enable the algorithm to proceed smoothly and to satisfy the condition that the gas-turbine power generation must produce at least a certain percentage of the electric energy for each period of time.