## 2 Model of CCHP
### Constraints  
1. Energy balance \[P_{PV}(t)+P_{WT}(t)+P_{GT}(t)+P_{Grid}(t)+P_{ES,d}(t)=P_{ES,c}(t)+P_{EC}(t)+P_{ load}(t)\] (10) \[Q_{rec}(t)+Q_{GB}(t)+Q_{HS,d}(t)=Q_{HS,c}(t)+Q_{AC}(t)+Q_{load}(t)\] (11) \[C_{AC}(t)+C_{EC}(t)=C_{load}(t)\] (12) \[Q_{rec} =P_{GT}\times\frac{(1-\eta_{GT})}{\eta_{GT}}\times\eta_{rec}\] (13) \[C_{AC}(t)=Q_{AC}(t)\times COP_{AC}\] (14) \[C_{EC}(t)=E_{EC}(t)\times COP_{EC}\] (15) where \[C_{EC} :\] Output cold energy of he compression refrigeration equipment. \[P_{EC} :\] Electricity input to the compression refrigeration equipment. \[C_{AC} :\] Output cold energy of the absorption refrigeration equipment. \[Q_{AC} :\] Heat energy input to the absorption refrigeration equipment. \[Q_{rec}(t)+Q_{GB}(t)+Q_{HS,d}(t)=Q_{HS,c}(t)+Q_{AC}(t)+Q_{load}(t)\]0 Electric energy discharged from the storage equipment. \[Q_{rec}(t)+Q_{GB}(t)+Q_{HS,d}(t)=Q_{HS,c}(t)+Q_{AC}(t)+Q_{load}(t)\]1 Electric energy for the charging of the storage equipment. \[Q_{rec}(t)+Q_{GB}(t)+Q_{HS,d}(t)=Q_{HS,c}(t)+Q_{AC}(t)+Q_{load}(t)\]2 Waste heat recovered from the gas-turbine generators. \[Q_{rec}(t)+Q_{GB}(t)+Q_{HS,d}(t)=Q_{HS,c}(t)+Q_{AC}(t)+Q_{load}(t)\]3 Heat energy released by the heat-storage equipment. \[Q_{rec}(t)+Q_{GB}(t)+Q_{HS,d}(t)=Q_{HS,c}(t)+Q_{AC}(t)+Q_{load}(t)\]4 Heat energy stored in the heat-storage equipment. \[Q_{rec}(t)+Q_{GB}(t)+Q_{HS,d}(t)=Q_{HS,c}(t)+Q_{AC}(t)+Q_{load}(t)\]5 Waste heat recovery rate. \[Q_{rec}(t)+Q_{GB}(t)+Q_{HS,d}(t)=Q_{HS,c}(t)+Q_{AC}(t)+Q_{load}(t)\]6 Refrigeration coefficient of the absorption refrigeration equipment. \[Q_{rec}(t)+Q_{GB}(t)+Q_{HS,d}(t)=Q_{HS,c}(t)+Q_{AC}(t)+Q_{load}(t)\]7 Cooling coefficient of the electric refrigeration equipment. Equation (10) is the balance of electric energy, i.e., the electric energy of the output must be equal to that of the input during this time period. Equation (11) is the balance of thermal energy, i.e., the thermal energy of the output is equal to those of the input during this time period. Equation (12) the balance of cold energy, i.e., the total output power of the refrigerator should be equal to the cold energy load during this time period. Equation (13) expresses the waste heat that can be recycled by the gas-turbine generators. Equation (14) is the formula for the absorption chiller to convert heat energy into cold energy. Equation (15) is the formula for the conversion of electric energy into cold energy by a compression refrigerator. 2. Constraints on energy-storage equipment \[Q_{rec}(t)+Q_{GB}(t)+Q_{HS,d}(t)=Q_{HS,c}(t)+Q_{AC}(t)+Q_{load}(t)\]8 (16)\[\left\{ \begin{array}{ll}0\leq P_{ES,c}(t)\leq V_{ES}\times\gamma_{ES,c}\\ 0\leq P_{ES,d}(t)\leq V_{ES}\times\gamma_{ES,d}\\ P_{ES,c}(t)\times P_{ES,d}(t)=0\end{array} \right. \tag{17}\]  
where  
\(P_{ES}\): Electric energy stored by the energy-storage equipment. \(\sigma_{ES}\): Energy loss rate of the energy-storage equipment per unit time. \(\eta_{ES,c}\): Charging performance of the energy-storage equipment. \(\eta_{ES,d}\): Discharge efficiency of the energy-storage equipment. \(V_{ES}\): Maximum capacity of the energy-storage equipment. \(\gamma_{ES,c}\): Charging rate of the energy-storage equipment. \(\gamma_{ES,d}\): Discharge rate of the energy-storage equipment. Equation (16) is the calculation of the energy storage of the energy-storage equipment, i.e., the power stored by the energy-storage equipment in the next time period, which is the total savings of the current time period, deducting the energy loss of unit time, plus the saved electric energy of the current time period, deducting the electric energy released in the current period. Equation (17) shows the constraints of the energy-storage equipment, the first being the constraint of the energy-storage rate, the second being the constraint of the discharge rate, and the third being that the discharge and storage cannot be performed at the same time. 3.