4.2.1. Optimization Results

Based on the above inputs, this paper takes the total cost as the optimization objective and adopts the bi-level dynamic optimization model to optimize the design of three RIESs. The equipment capacity obtained by optimization is shown in Table 8. Compared with System 1, the TES device can significantly increase the capacity of the CHP unit and ABC in System 2 and reduce the capacity of the GSHP and boiler. Identically to the TES device, the EES device can also increase the capacity of the CHP unit and ABC in System 3. However, the EES device has less impact on the capacity of energy conversion equipment than the TES device.

**Table 8.** System equipment capacity.


The difference in equipment capacity affects the equipment cost and operational performance of RIESs. Figure 5 shows the equipment costs, carbon taxes, operating costs, and total costs of the three systems under the design conditions. The difference in equipment capacity makes the equipment cost of System 2 and System 3 larger than that of System 1, with increasing rates of 5.7% and 17.8%, respectively. In comparison to the TES device, the EES device will significantly increase the equipment cost of System 3. Different from the equipment cost, the carbon tax, operating cost, and total cost of System 2 and System 3 are all less than that of System 1. Compared with System 1, the carbon tax, operating cost, and total cost of System 2 decreased by 5.5%, 2.9%, and 1.5%, respectively.The EES device can significantly reduce the operating cost of System 3, with a reduction of 5.7% compared with System 1. However, affected by the equipment cost, the total cost reduction rate of System 3 compared with System 1 is only 1.75%. It can be seen that under the design conditions, the TES and EES devices can reduce the operating cost, carbon tax, and total cost of the RIES to different degrees. However, the EES device has less impact on the carbon tax and total cost of RIESs.

**Figure 5.** Cost differences between the three systems.

### 4.2.2. Analysis of Results

The energy utilization cost directly affects the operational performance of RIESs. To analyze the influence of energy storage devices on the operating cost, this paper first calculates the electric load supply-demand relationship and the part-load ratio of the CHP unit in System 1 under design operating conditions. As seen from Figure 6, during the low tariff hours, the grid power consumption is larger than gas-fired generation, and the CHP unit is at the minimum part-load ratio. However, the CHP unit is operating at full load during other hours. This shows that the electricity cost from the grid is less than the utilization cost of gas during the low tariff hours, while during other hours, the electricity cost from the grid is greater than the utilization cost of gas.

**Figure 6.** Electric load supply−demand relationship and part-load rate of CHP unit in System 1.

On the premise that the difference in energy utilization cost is known, this paper compares the scheduling process of System 1 and System 2 under the design conditions, as displayed in Figure 7. Figure 7a depicts the cooling load supply-demand relationship of the two systems. First, during the low tariff hours, the cooling load of the two systems is gratified by the GSHP. During other hours, the cooling load is met by the GSHP and ABC. However, the difference in equipment capacity makes the cooling power of the GSHP in System 2 less than that in System 1. Secondly, as seen in Figure 8, the operating efficiency of the GSHP in System 2 is greater than in System 1. The electric load of System 2 is less than System 1 due to the higher operating efficiency and lower cooling power. As shown in Figure 7b, the heating load of System 1 is gratified by the CHP unit and the gas boiler, while the heating load of System 2 is gratified by the CHP unit under the action of the TES device. This ensures the efficient use of gas while avoiding the use of the gas boiler in System 2. When combined with the relationship between supply-demand of electric load shown in Figure 7c, the larger capacity of the CHP unit can effectively reduce the power purchased from the grid during other hours for System 2. Based on the above analysis, the TES device can improve the overall energy efficiency of System 2 and reduce the electric load. Moreover, it increases the power generation of the CHP unit and reduces the grid power consumption, especially during other hours. Therefore, the carbon tax and operating costs of System 2 are less than System 1.

**Figure 7.** Scheduling process of System 1 and System 2 in design conditions: (**a**) Cooling load; (**b**) Heating load; (**c**) Electric load.

**Figure 8.** The efficiency of GSHP in System 1 and System 2.

To analyze the difference between the impact of the TES and EES devices on RIESs, this paper compares the electric load supply-demand relationship in System 2 and System 3 under the design conditions, as illustrated in Figure 9. First, the smaller capacity of the GSHP makes the electric load of System 3 less than that of System 2, while the larger CHP unit increases the power generation of the CHP unit in System 3. However, the carbon tax of System 3 is slightly less than that of System 2 due to the slight capacity difference between the GSHP and CHP units between System 2 and System 3. Secondly, the EES device can increase the grid power consumption during flat and valley hours and reduce the grid power consumption during high and peak hours. The difference in grid power consumption during different hours makes the operating cost of System 3 less than that of System 2.

**Figure 9.** Electricity scheduling process of system 2 and system 3.
