3.2.2. Objective Function

The objective function considers the net investment cost of the CCHP system, the cost of consumed natural gas, the ESS service charge, the cost of electricity purchased from the grid, and the cost of waste gas treatment.

$$F = \mathcal{C}\_I + \mathcal{C}\_F + \mathcal{C}\_S + \mathcal{C}\_G + \mathcal{C}\_E \tag{11}$$

where *F* denotes the value of the objective function, *CI* denotes the daily investment cost of the equipment, *CF* denotes the cost of consuming natural gas, *CS* denotes the service cost of ESS, *CG* denotes the cost of purchasing electricity from the grid, and *CE* denotes the cost of treating the waste gas. The specific cost expressions are as follows:

$$\mathbf{C}\_{I} = \frac{\beta \cdot \sum\_{i=1}^{R} N\_{i} \cdot \mathbf{C}\_{i}}{365 \cdot L} \tag{12}$$

$$\beta = \frac{a \cdot \left(1 + a\right)^{L}}{\left(1 + a\right)^{L} - 1} \tag{13}$$

where *β* denotes the investment recovery coefficient, *Ni* denotes the installed capacity of the *i*-th equipment, *Ci* denotes the unit investment cost, *L* denotes the life of the equipment, and *a* denotes the discount rate, taking the value of 0.08.

$$\mathbb{C}\_F = (F\_{\rm mf} + F\_{\mathcal{R}^b}) \cdot \mathbb{C}\_f \tag{14}$$

$$\mathbb{C}\_{G} = \sum\_{t=1}^{24} P\_{buy.grid}^{t} \cdot \mathbb{C}\_{v}^{t} \tag{15}$$

where *Cf* denotes the price of natural gas, *<sup>P</sup>tbuy*,*grid* denotes the electricity purchases from the grid at time *t*, and *Cte* is the price of electricity at time *t*.

$$\mathbb{C}\_{S} = \sum\_{t=1}^{24} \left[ \left( P\_{\text{sell}}^{t} \cdot \mathbb{C}\_{\text{sell}}^{t} - P\_{\text{buy}}^{t} \cdot \mathbb{C}\_{\text{buy}}^{t} \right) + \left( P\_{\text{sell}}^{t} + P\_{\text{buy}}^{t} \right) \cdot \mathbb{C}\_{\text{sell} \text{vve}} \right] \tag{16}$$

where *Ptsell* and *Ptbuy* represent the electricity sold and bought by ESS to the CCHP system at time *t*, *Ctsell* and *Ctbuy* represent the prices of electricity sold and purchased by ESS at time *t*, and *Cserve* represents the service charge of ESS taking the value of 0.0079 \$/kWh.

$$\mathcal{C}\_{E} = \mathcal{C}\_{GT} + \sum\_{t=1}^{24} \lambda \left( P\_{waste}^{t} + H\_{waste}^{t} \right) \tag{17}$$

$$\mathbf{C}\_{GT} = \sum\_{t=1}^{24} \sum\_{\mathcal{S}'=1}^{3} \left( P\_{\rm mt}^{t} \cdot \gamma\_{\mathcal{S}}^{\rm mt} + H\_{\mathcal{g}b}^{t} \cdot \gamma\_{\mathcal{S}}^{\rm gb} + P\_{\rm buy,grid}^{t} \cdot \gamma\_{\mathcal{S}}^{\rm grid} \right) \cdot \boldsymbol{\beta}\_{\mathcal{S}} \tag{18}$$

where *Ptwaste* and *Htwaste* are the electricity and heat waste at time *t*, *λ* is the penalty factor, *<sup>P</sup>tmt*, *<sup>H</sup>tgb*, and *<sup>P</sup>tbuy*,*grid* are the electricity generated by MT, the heat produced by GB, and the electricity purchased from the grid at time *t*, *γmt g* , *γgbg* , and *γgrid g* are the emissions of the *g*-th pollutant gas emitted by MT, GB, and the grid, and *βg* denotes the cost required to treat the *g*-th pollutant gas.
