One of the priority areas of the development of science, technology, and engineering in the Russian Federation is energy saving issues. One of the promising areas to solve the problem of energy saving is to reduce waste heat losses of power plants. The designs of condensing heat exchangers used in industry and energy sector allow both to reduce waste heat losses and to significantly reduce moisture losses. Despite the substantial number of scientific publications on this issue and the positive experience of using the developed designs of condensing heat exchangers, most gas boiler houses and thermal power plants currently continue to operate without deep heat recovery units. To a great extent, it is due to the lack of the universal methods to calculate and optimize heat exchanger modes. Thus, to effective selection of the optimal structure and operating mode of the equipment, the development of mathematical models of power plants with condensing heat exchangers and software packages for their computer implementation is an urgent task. To design a model of a condensing boiler, equations of energy and mass balances are used. To solve the problem of optimal choice of structure and operating mode of the equipment, mathematical programming methods are used. A model and a method to solve the problem of choosing the optimal structure and operating mode of condensation heat exchangers have been developed. As a target optimization function, it is proposed to use the amount of fuel required to provide pre-set heat load. A computer program has been developed for optimal distribution of load between operating units. Analysis of the results obtained has showed an adequate description of real equipment model and the possibility to generate computer mode maps. Application of these maps allows significant savings of energy resources due to the optimal choice of mode and load distribution between operating equipment. The proposed approach allows us to formulate and solve inverse problems of diagnosing the state of condensing heat exchangers.