## 4 Community Integrated Energy System Model
### CCHP System Considering Carbon Capture  
The CCHP system optimizes the energy output according to the power and heat purchase price set by the ES and considers the carbon transaction cost. The optimization goal is to obtain the maximum benefit. \[\text{max}F\text{cchp}= C_{\text{buy}}^{t}-C_{\text{cchp}}^{t}-C_{\text{tc}} \tag{9}\]  
where \(C_{\text{cchp}}^{t}\) represents the fuel cost, which is represented by the quadratic function of the output power and the fuel price by the variable condition efficiency characteristics of the ICG and GB. \[C_{\text{cchp}}^{t}=\sum\limits_{t}^{T}[a\text{e},\text{ice}(P_{\text{ice}}^{t })^{2}+b\text{e},\text{ice}P_{\text{ice}}^{t}+c\text{e},\text{ice}+a\text{h}, \text{bt}(H_{\text{gb}}^{t})^{2}+b\text{h},\text{bt}H_{\text{gb}}^{t}+c\text{ h},\text{bt}]\Delta t \tag{10}\]  
where \(P_{\text{ice}}^{t}\) and \(H_{\text{gb}}^{t}\) are the output power and heat of the ICG and GB, respectively. \(A_{\text{e}}\), \(b_{\text{e}}\), and \(c_{\text{e}}\) (\(a_{\text{h}}\), \(b_{\text{h}}\), and \(c_{\text{h}}\)) are the cost coefficients of the ICG (GB). The clean energy (WT, PV) and auxiliary devices such as P2G and the heat storage tank (HST) in the CCHP system are considered to have zero fuel cost. At time \(t\), the power and heat output of the CCHP can be expressed as:  
\[\left\{ \begin{array}{ll}P_{\text{oe}}^{t}=P_{\text{wt}}^{t}+P_{\text{pv}}^{t }+P_{\text{ice}}^{t}\\ H_{\text{oe}}^{t}=(H_{\text{ne}}^{t}+H_{\text{gb}}^{t})\cdot\eta_{\text{h}/t} \end{array} \right. \tag{11}\]  
where \(P_{\text{wt}}^{t}\) and \(P_{\text{pv}}^{t}\) are the output of WT and PV at time \(t\), respectively. \(H_{\text{ne}}^{t}\) and \(H_{\text{gb}}^{t}\) are the output heat of the waste heat absorption device (WHAD) and the GB at time \(t\), respectively. \(\eta_{\text{h/t}}\) represents the heat conversion efficiency. The heat energy other than the output power of the ICG will be recovered by the WHAD. The relationship between the two can be expressed as follows:  
\[H_{\text{re}}^{t}=\frac{P_{\text{ice}}^{t}\cdot(1-\eta_{\text{ice}})}{\eta_{ \text{ice}}}\cdot\eta_{\text{re}} \tag{12}\]where \(H_{\text{re}}^{t}\) is the recovery of heat energy, \(\eta_{\text{ice}}\) is the power efficiency of the ICG, and \(\eta_{\text{re}}\) is the heat absorption efficiency of the WHAD. ICG \(P_{\text{ice}}^{t}\) and GB \(H_{\text{gb}}^{t}\) need to meet the following constraints:  
\[ \begin{cases}0\leq P_{\text{ice}}^{t}\leq P_{\text{ice}}^{\text{rat}}\\ 0\leq H_{\text{gb}}^{t}\leq H_{\text{gb}}^{\text{rat}}\end{cases}  \tag{13}\]  
where \(P_{\text{ice}}^{\text{rat}}\) is the rated power generation capacity of the ICG, and \(H_{\text{gb}}^{\text{rat}}\) is the rated heating capacity of the GB. The operating constraints of the BT are as follows:  
\[ \begin{cases}M_{\text{bt,c}}P_{\text{bt,c}}^{\text{min}}\leq P_{\text{bt,c}} \leq M_{\text{bt,c}}P_{\text{bt,c}}^{\text{max}}\\ M_{\text{bt,d}}P_{\text{bt,d}}^{\text{min}}\leq P_{\text{bt,d}}\leq M_{\text{bt, d}}P_{\text{bt,d}}^{\text{max}}\\ S_{\text{bt}}^{\text{min}}\leq S_{\text{bt}}\leq S_{\text{bt}}^{\text{max}}\\ \Delta P_{\text{bt,c}}^{\text{min}}\leq\Delta P_{\text{bt,c}}\leq\Delta P_{ \text{bt,c}}^{\text{max}}\\ \Delta P_{\text{bt,d}}^{\text{min}}\leq\Delta P_{\text{bt,d}}\leq\Delta P_{ \text{bt,d}}^{\text{max}}\end{cases}  \tag{14}\]  
where \(P_{\text{bt,c}}\) (\(P_{\text{bt,d}}\)) is the charging (discharging) power of the BT. \(P_{\text{bt,c}}^{\text{min}}\)(\(P_{\text{bt,d}}^{\text{min}}\)) and \(P_{\text{bt,c}}^{\text{max}}\)(\(P_{\text{bt,d}}^{\text{max}}\)) are the minimum and maximum values of BT charging (discharging) power. \(M_{\text{bt,c}}\)(\(M_{\text{bt,d}}\)) is the BT charge (discharge) state marker. \(S_{\text{bt}}\) is the state of charge of the BT. \(S_{\text{bt}}^{\text{max}}\) and \(S_{\text{bt}}^{\text{min}}\) are the upper and lower limits of charge and discharge power. \(\Delta P_{\text{bt,c}}\)(\(\Delta P_{\text{bt,d}}\)) is the charge (discharge) increment.