## 5 Conclusions  
The study focuses on the use of low-power CHPPs that generate inexpensive electrical and thermal energy. The findings have demonstrated that the efficiency of CHPPs depends on the ratio of the thermal and electrical load curves they cover. The maximum CHPP efficiency is achieved when all generated thermal energy is supplied to the DHS. With the pronounced seasonality of the heat load curve of residential consumers during the non-heating period, it is important to use thermal energy storage devices. This solution will enhance the efficiency of electricity generated from the CHPP when part of it is supplied to power thermal energy sources, including heat pumps and electric boilers. The use of a CHPP makes it possible to create heating systems that harness the benefits of both individual and district systems; however, the implementation of intelligent control systems is necessary for this to become a reality. We have developed a methodology that enables us to identify the optimal mix of thermal energy sources to cover a given annual heat load duration curve. The objective function during optimization is to maximize the electricity generation from the CHPP, subject to the useful supply of all generated thermal energy to the DHS. A significant positive impact on the environment is achieved by replacing outdated coal-fired thermal power plants with CHPPs, which ensures a better balance of electrical energy and power, and a reduction in the amount of thermal coal burned. The modeling results show that the district heating system with a low-power CHPP can reduce CO2 emissions by cutting down energy production from a coal-fired power plant. A similar effect is obtained with a solar power plant, the power of which is almost three times higher than that of the CHPP. The study indicates that the proposed methodology can provide prerequisites for the transition of the district heating system from the third generation to the fourthone, and there are promising prospects for a future transition to the fifth generation. Such a system will be highly flexible since it allows the interchangeability of various thermal energy sources. Inexpensive electricity from CHPPs can be used to produce thermal energy in electric boilers. In addition, the DHS functions are expanding with cooling supply provided to buildings and premises of residential consumers, thus boosting the economic efficiency of the DHS. Future Research Directions  
The implementation of the proposed approach to the modernization of existing district heating systems requires the incorporation of intelligent control systems for managing the production and consumption of thermal energy. It is crucial to identify the boundary conditions that determine the investment attractiveness of incorporating certain sources in the district heating system. In addition, changes and updates to the institutional framework are essential to increase competition in the thermal energy market and bolster the appeal of the DHS to attract potential investors. Conceptualization, E.B., F.B. and L.M. ; methodology, S.F. and P.I. ; software, E.B. and L.M. ; validation, F.B., L.M. and S.F. ; formal analysis, E.B., P.I. and S.F. ; investigation, E.B., F.B. and L.M. ; resources, F.B. and L.M. ; data curation, P.I. ; writing--original draft preparation, E.B., F.B. and L.M. ; writing--review and editing, P.I. and S.F. ; visualization, E.B. ; supervision, P.I. ; project administration, F.B. ; funding acquisition, S.F. All authors have read and agreed to the published version of the manuscript. This work is supported by the Russian Science Foundation under grant 21-79-30013 in the Energy Research Institute of the Russian Academy of Sciences. Not applicable. The data presented in this study are available in district heating market reports provided by Mordor Intelligence, World Energy Statistics and Euroheat and Power Publications. The authors declare no conflict of interest.