## 3 Results and Discussion  
Dynamic simulations were used to determine the performance of each system. Among the many results that dynamic numerical simulation can provide, for this analysis, it was important to determine the energy flows of required and produced thermal energy by each generator, as well as the electricity taken and exported to the distribution network. The structure of the thermal energy produced in systems is shown in Figure 9. System B is based on the application of a natural gas boiler, which, as the results show, fully meets the system's thermal energy requirements. By introducing a CHP unit sized to cover base heating load while retaining the existing boiler (CHP/B system) and giving priority to the CHP unit, it is possible to cover half of the required heating needs with the CHP unit. The simultaneous operation of a 400 kW medium-scale HP and CHP unit, which has priority over boiler operation (CHP-HP/B) results in half of the thermal energy produced by the HP, 38% by the CHP unit, and 12% by the boiler. In this variant, the HP is operated according to the available electrical power from the CHP unit, resulting in a slightly larger share for the HP. When the priority in the production of heat energy is given to HP (HP/CHP/B systems), the greatest proportion of thermal energy is produced by the HP (72 to 99%), followed by the CHP unit, and the boiler. The share of energy produced by the HP depends on the installed capacity of the unit. The operation of a boiler or CHP unit is necessary for periods of operation at peak load. In variants where the system is configured to prioritize the operation of the CHP unit (CHP/HP/B systems), 50% of the thermal energy is produced by the CHP unit, while the HP, depending on the size of the unit, covers 38% to 50% of the energy requirement. Generally, in scenarios where a larger HP unit has been installed, only a small or negligible percentage of thermal energy is produced by the boiler. So, an HP sized to 43% of the heating load could replace a gas boiler in conditions of the reference year. The share of renewable energy sources in the DH systems is determined based on simulation results, as illustrated in Figure 10. Systems incorporating only a boiler or a combination of boiler and CHP units do not utilize renewable energy sources. RES contributions are observed exclusively in configurations that include an HP. Systems where operational priority is assigned to the HP demonstrate a higher RES share compared to those where the CHP unit has priority. Moreover, the RES share increases with the installed HP capacity. The highest RES share, reaching 67%, is observed in the HP/CHP/B configuration, where a 1000 kW HP operates as the primary heat source. Even higher RES contributions could be achieved if the electricity consumed by the HP were sourced from on-site renewable generation. \begin{table}
\begin{tabular}{c c c} \hline \hline
**System** & **HP Capacity** & **Investment Cost** \\ \hline  & 400 kW & 540,000 \(\upxi\) \\ \cline{2-3}  & 500 kW & 610,000 \(\upxi\) \\ \cline{2-3} CHP-HP/B & 600 kW & 690,000 \(\upxi\) \\ \cline{2-3} HP/CHP/B & 700 kW & 760,000 \(\upxi\) \\ \cline{2-3} CHP/HP/B & 800 kW & 830,000 \(\upxi\) \\ \cline{2-3}  & 900 kW & 900,000 \(\upxi\) \\ \cline{2-3}  & 1000 kW & 980,000 \(\upxi\) \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Investment costs for systems. The indicators of primary energy consumption (_EPI_) and CO\({}_{2}\) emissions (\(m_{\rm CO2}\)) for analysed DH systems are shown in Figure 11. The introduction of a CHP unit to the DH system has been shown to have limited effectiveness in reducing primary energy consumption and CO\({}_{2}\) emissions, with no significant decrease observed in either variable. The highest energy performance index (_EPI_) recorded was 121 kWh/m\({}^{2}\) in system B, while system CHP/B demonstrated an _EPI_ of 114 kWh/m\({}^{2}\). The integration of a medium-sized HP unit within the system has been observed to result in a substantial reduction in primary energy consumption.