Open Source District Heating Modeling Tools—A Comparative Study

: Heating networks are highly relevant for the achievement of climate protection goals of urban energy systems. This is due to their high renewable energy potential combined with high plant efﬁciency and utilization rates. For the optimal integration and sector coupling of heating networks in holistic urban energy systems, open source energy system modeling tools are highly recommended. In this contribution, two open source approaches (the “Spreadsheet Energy System Model Generator”-integrated DHNx-Python module (DHNx/SESMG) and Thermos) are theoretically compared, and practically applied to a real-world energy system. Deviations within the results can be explained by incorrectly pre-deﬁned parameters within Thermos and cannot be adjusted by the modeler. The simultaneity is underestimated in the case study by Thermos by more than 20%. This results in undersized heating plant capacities and a 50% higher number of buildings connected to the network. However, Thermos offers a higher end-user usability and over 100 times faster solving. DHNx/SESMG, in contrast, offers the possibility to adjust more model parameters individually and consider multiple energy sectors. This enables a holistic modeling of urban energy systems and the model-based optimization of multi-sectoral synergies.


Introduction
The supply of residential and industrial heating and cooling demands accounts for 58% of Germany's final energy demand [1,2]. Generally, heat supply can be ensured by centralized or decentralized technologies. Decentralized heat supply systems have the advantage of low distribution losses due to short pipe lengths. In return, they have the disadvantage of usually producing heat autonomously and not using advantages of sector coupling (e.g., natural gas heating systems) [3]. Centralized heat supply concepts using heat networks have the advantage that they can achieve higher plant efficiencies and utilization rates due to their large size and their almost constant mode of operation [2,[4][5][6]. Furthermore, district heating networks have a high potential for utilizing renewable energy, due to the more flexible choice of heat sources (e.g., municipal solid waste driven combined heat and power (CHP) plants, as used in scandinavian districts, natural gas driven CHP plants, woodchip driven carburetors, power to heat systems, etc.) [6][7][8][9]. This renewable potential has prompted the European Union to highlight heating networks as a suitable technology for the energy transition in its position paper "Stepping up Europe's 2030 climate ambition" [10]. On the other hand, they usually have higher distribution losses during heat transport and high capital commitments in the network structure [11].
As part of the energy transition to meet national and international climate protection goals (e.g., "The Glasgow Climate Pact" established by the UN [12] and the "Fit for 55"package by the European Commission [13]), heating networks are becoming increasingly relevant and are being used more and more, especially in new housing developments [7]. Overall, the share of central heating systems within new buildings in Germany increased from 7% to 24.4% between 2001 and 2020 [1].
For the optimal design and dimensioning of such central heat supply systems, advanced planning methods are required. Only through the holistic, cross-sector planning of urban energy systems can all synergies be utilized [14,15]. Such a design includes the ideal selection and dimensioning of energy supply (e.g., co-generation or heat pumps) and storage technologies (e.g., liquid storages), as well as the planning of a distribution network. This, in turn, includes the positioning and dimensioning of pipes and deciding which buildings should be connected to a network. Optimization using energy system models offers such an advanced approach [16].
Open source modeling approaches are of particular importance. These approaches offer a notably high degree of transparency, traceability and reproducibility and thus enable an especially high level of quality in results [17]. Since the early 2000s, a broad community and a variety of open energy system modeling tools have addressed different scopes [17]. Some of the most recent approaches deal with the design and optimization of heat networks. These include the "Spreadsheet Energy System Model Generator" (SESMG; [18])-integrated DHNx-Python module [19], referred to as DHNx/SESMG, and the "Thermal Energy Resource Modeling and Optimization System" (Thermos) tool, which is a clojure and java script object notation program [15].
Energy system modeling tools with similar purposes often yield different results [20]. In order to identify these deviations and determine the causes, comparing different models is important. In this way, errors can be identified and models can be mutually validated.
For the field of open source district heating tools, no such comparison has been carried out so far. Therefore, this contribution aims to compare and evaluate the approaches of DHNx/SESMG and Thermos and will therefore lay an important foundation on which further comparative studies can build.
We will clarify which of these approaches can be coupled with other energy sectors, e.g., to perform a holistic optimization of urban energy systems. For this purpose, the two approaches will first be theoretically described in detail in Sections 2.1 and 2.2 and subsequently practically applied to a real-world energy system (Section 2.3). Finally, the methods and results of the two given approaches are compared and the advantages and disadvantages of each of them will be discussed in detail (Section 4).

Materials and Methods
In this section, the applied modeling approaches, as well as the applied test case suburb, will be described.

DHNx/SESMG
The DHNx/SESMG [18,19] approach uses the components of the modeling basis "Open Energy Modelling Framework" (oemof) [21], which is a Python package utilizing mathematical graph theory for representing energy systems. DHNx is a sub-package of oemof focusing on the thermodynamic and fluidic considerations of fluid-powered energy networks (e.g., district heating networks). In the context of this study, DHNx was integrated into the "Spreadsheet Energy System Model Generator" (SESMG) [18]. The SESMG is a model generator enabling the automated implementation of oemof energy system models. Compared to plain oemof, no programming effort is required. For modeling, a bottom-up analytical approach and (mixed-integer) linear programming ((MI)LP) were applied [22]. The temporal and spatial resolutions and horizons can be individually defined by the user.
The SESMG program flow [23] can be divided into three sub-processes. During preprocessing, individual components such as sources, sinks, transformers, etc., are combined into a mathematical optimization problem. This (mixed-integer) linear problem is solved afterwards (processing). Finally, the results were automatically analyzed and prepared for post-processing. Figure 1 shows the DHNx/SESMG for the creation of a thermal network model. The implementation of the DHNx package is located within the SESMG's pre-processing after the oemof-solph energy system components (e.g., building gasheating systems) were created. Therein, the components required are spatially located and subsequently mathematically defined. Since the previous and subsequent processes are not relevant for this study, they have been omitted from Figure 1. For modeling with DHNx/SESMG, the euclidean perpendicular foot print search (Appendix A) was applied. Therein, the shortest rectangular connectable pipe from consumers and producers to possible distribution pipes are calculated. For this method it is assumed that these distribution pipes can be laid in any street. The DHNx method is_consistent checks the heat network for consistency, thus verifying that all consumers are reachable, and all nodes submitted to the algorithm are connected to one heat network. In this method, two pipe-specific checks are carried out by iterating over all pipes (iteration is highlighted in red). The following requirements have to be fulfilled:

•
Consumers need a technical feasible or existing connection to at least one of the producers; • Each node (fork, consumer, producer) needs a heat network connection; • Pipes cannot have the same start and end node.
If these conditions are met for all pipes, the final check was performed, testing whether two nodes are connected by only one pipe and whether all nodes are connected to one network. Note, that the algorithm may conclude that it makes sense to split the network into two or more parts [24]. After these checks, the DHNx optimization setup process [25] is started, which ends up returning oemof components that can be added to an already existing energy system for further (multi-sectoral) modeling.
DHNx mainly adds district heating (dh) pipes to an already existing energy system. In the context of the DHNx approach, a dh pipe is a transformer with one energy input and one energy output considering the pipe's heat losses. Based on this heat loss factor and the pipeline-specific costs and emission values, different insulation thicknesses as well as different pipeline materials can be mapped. These can then be included in the optimization problem as separate investment alternatives.The mathematical formula basis is described by Röeder et al. [19]. The dh pipe parameters are summarized and briefly explained in Appendix B. Within the DHNx/SESMG considerations, a simultaneity of 1 is taken into account.
The connection of the consumer sinks and the transformer outputs, that were created in create_objects (Figure 1) to the newly created heat network. This connection is represented by two energy system components called "source-link" and "dh_heat_house_station".

Thermos
The Horizon 2020-funded "Thermal Energy Resource Modeling and Optimization System" (Thermos) [26] was developed to assist energy system planners in the initial stages of expansion planning or construction of a completely new district heating or cooling network [15]. The planning process can be divided into 5 steps [15]: 1.
"Evaluation and Decision Making".
In the context of this study, the sub-steps 3 to 5 are of particular interest. Within "Procurement of Data", input data were collected for the analysis. Data may be provided by spreadsheet-files, geographic information system (GIS) layers or using the provided automatic OpenStreetMap-Interface. Thereby, the annual heat demand, the geographical location, and the building's height were obtained and can be modified by user input data, e.g., by 3D-data [27]. A full list of required and optional input parameters are given in [15]. Based on the pipe data, it can be stated that Thermos does not differentiate between house connection pipes and distribution pipes. This means that the modeler must take care when selecting the pipes that are assigned an investment decision that no unintentional basement-routed distribution pipes are made possible.
The network optimization can either be carried out by maximizing the network size ("Maximize network NPV") or by minimizing the system costs ("Maximize whole network NPV") [15]. For investment optimization for energy supply technologies and therefore weighing decentralized heat supply, investment in insulation or network supply are only possible within the second case. This case is therefore considered in this study. For the optimization, the location of the central heat supply as well as solver-specific parameters such as "Mixed-Integer Programming (MIP) Gap" or the "maximum computational time", which define the relative distance between the optimal objective and the solution or the time at which the "Solving Constraint Integer Programs" (scip)-solver [28] terminates the process to be defined. For the entire process, the user has no source code contact.
The system optimization is divided into two parts. The "network optimization process" performs an economic trade-off between decentralized alternative technologies (for example, gas heating or heat pump) and the heat network connection. During this process, the respective pipe diameters are routed to the appropriate locations, based on the peak heat demand. Within this optimization, it is possible to pass any combination of costs and loss factors, allowing different insulation thicknesses and materials to be mapped.Buildings in which an alternative technology should be used are returned as well. For the dimensioning a simultaneity function (Equation (1)) is applied, which causes the pipes to be designed not for the case of simultaneous demand of their peak load, but for a share of it only. The calculation takes into account the number of connected buildings (n) and the limiting value of the factors (a = 0.62) given by Thermos. It is calculated individually for each pipe section as well as for the heat suppliers.
The subsequent "supply optimization process" considers load profiles and the previously calculated heat network as basis for the calculation of the annual carbon dioxide emissions as well as financial costs of the heat supply. In this supply optimization problem, the network structure is no longer taken into account in the Thermos algorithm, but the heat demand of the consumers is mapped as an overall load profile. To ensure the security of supply the load profiles of representative day types (Section 2.3) for the buildings connected to the district heating network is examined (Appendix C) instead. Within this part of the optimization, there is opportunity to set a time step-variable price for energy imports and exports (e.g., gas and electricity).
Within "Evaluation and Decision Making", the last process part of the Thermos work flow, the energy system is optimized, using the"scip"solver. Within this part of the processtwo result types are created. On the one hand, there is an interactive map presenting the consumers connected to the heating network, and those who are not, as well as the chosen pipe configurations . On the other hand, a result table is returned, giving parameters such as the total system costs and the technology specific financial data. By using the default settings, the heat production results are considered using load profiles for 5 specific days (normal weekday, normal weekend day, winter weekday, winter weekend day and the peak day). Each of these days is associated with an occurrence ratio for calculating the yearly energy amounts. The temporal resolution has to be defined by the user. By default, hourly consumer heat profiles are applied. Basically the energy system model created is based on graph theory. Consumers and producers are considered as graph's vertices, while the pipes are represented as edges. The pipes parameters are summarized in Appendix B.
Finally, it can be noted that the emissions of the heat network energy system model are specified as variable emissions on the generator. Therefore, they are generated per kWh of produced heat amount, but not as fix periodical emissions (e.g., due to upstream and downstream technology chains). Furthermore, CO 2 , PM2.5, as well as NO x emission limits can be defined. The upstream and downstream emissions of grid components are not considered.

Test Case
The described approaches of DHNx/SESMG (Section 2.1) and Thermos (Section 2.2) were applied comparatively to a neighborhood in Herne-Baukau (North Rhine-Westphalia, Germany), which covers an area of 1.1 × 10 6 m 2 ( Figure 2). It consists of 48 single-family buildings (SFB), 38 multi-family buildings (MFB) and 3 commercial buildings (COM). The total heat demand of the building types described above was estimated (necessary because of insufficient data availability) to be approximately 3300 MWh a . The considered heat load profiles (SFB-efh, MFB-mfh, COM-ghd) were taken from [29].
To ensure the best result comparability, standardized model properties were selected for both approaches-DHNx/SESMG and Thermos. If properties are preset in one model approach that can be modified within the other approach, the specified property is defined in each case. A building sharp spatial resolution and eight day types with different occurrence ratios (replacing the Thermos predefined load profiles, Appendix C), were used. The eight reference days are the following:

•
Winter days with the lowest (1) and the mean average (2) temperature; • Spring days with the lowest (3) and the mean average (4) temperature; • Summer days with the lowest (5) and the mean average (6) temperature; • Fall days with the lowest (7) and the mean average (8) temperature.
Both approaches have the opportunity to decide whether buildings should be connected to the district heating network or if other heat supply technology are favorable. Thereby, the maximum heat demand (Q) represents the main optimization parameter, [5,9] which is accompanied by a transport loss consideration (Q loss ) [30]. The heat supply via the district heating network is achieved by a CHP plant unit and a central natural gas peak load boiler. Alternatively, a decentralized gas heating system or air-sourced heat pump (ASHP) can supply the heat demands of individual buildings. The technical data are given in Appendix D. For both modeling approaches, the flow velocities (Equation (2)), the maximum transport capacities (Equation (3)) and the loss considerations (Equations (4) and (5)) were numerically calculated by the equations implemented within the Thermos algorithm [31]. The velocity v in m s was calculated from the specific diameter ø in mm: The total transportable heat capacity in W is calculated by the flow velocity v, the density ρ, the heat capacity c p , the cross-sectional area A and the temperature difference between the flow and return pipe ∆T: The yearly loss (Q loss ) in kWh m·a is calculated through the temperature difference between the fluid (90 • C mean of 120 • C flow and 60 • C return temperature) and ground (8 • C, pre-defined value in [32]) (∆T 2 ): For this study, the temperature difference is defined as 82 • C. An average number of full utilization hours of 1000 h a is predefined in Thermos (deviating from [33]) and is therefore adopted in the DHNx/SESMG approach. The heat loss (Q loss ) can be converted into the power loss coefficient per meter (q loss in kW m ): Required pipe parameters are given in Appendix D. The initialization process of Thermos requires the heating degree days of the considered area, which can be calculated using Equation (6) [34]: "The [heating] degree days [(GTZ)] represent the sum over the temperature differences [(θ i − θ a,m )] of those days of a month on which the temperature mean values are below [(θ border )] (heating day)" [35]. A usual indoor temperature θ i of 20 • C [36] was assumed and the reference weather data set of 2012 (1 January-30 December 2012) was considered. This is justified by the fact that, according to [37], 2012 was an average year. Thus, a heating limit temperature of 17 • C [15] results in 3377 • C·d a . Within the process of Thermos optimization, two QGIS Geopackages were uploaded, holding the in DHNx/SESMG used geo-spatial information, to ensure comparability.
In DHNx/SESMG, some adjustments are also necessary to map the network problem. Therefore, the optimization problem of the energy system was first reduced to one time step, which represents the maximum heat demand of all buildings. In order to ensure that the operating costs of an entire year are included in the profitability analysis of the heating network, it is necessary to correct the variable costs using a factor c (Equation (7)), which represents the ratio between the annual heat demand (Q yearly ) and the maximum heat output requirement (Q peak ). For the central components, this factor is averaged over all potential buildings.
Within the Thermos approach, the "scip" solver is used, while in the DHNx/SESMG optimization the "gurobi" solver [38] is used. Closed-source solvers were used, since the open-source, non-commercial solvers (e.g., "Coin-or branch and cut"-solver [39]), which can be used within the Pyomo framework (solver interface at oemof), cannot solve the problem in acceptable computation time. Thus, these solvers would stand in the way of reproducibility of the results. For both solvers, the mixed-integer solution tolerance (so called MIP-Gap) was set to 0% (value with the highest accuracy), and for both, no termination criteria due to exceeding computing time were set.

Results
The optimization problem is divided into two steps (network problem and supply problem; Section 2.2). For the scope of this study, these two steps were transferred to DHNx. The following results sections are structured according to the two sub-problems.

Network Problem
The results of the "network problem" of the two approaches are shown in Figure 3. Basically, the "network problem" can be seen as an economic analysis of the construction of a heating network.

Thermos
Within the Thermos network optimization, nine buildings with a summed maximum heat power demand of 423 kW were connected to a centralized CHP plant ( Figure 3). Electricity produced by the CHP is exported to superordinate power systems. The heat supply of buildings which are not connected to the district heating network are supplied by gas heating systems with an aggregated capacity of 1024 kW.
The costs for the heat supply of the system consist of periodic costs for investment and operation of technical facilities (district heating pipes, CHP, gas heating systems, . . .) and variable costs for the use of necessary fuels (natural gas). In total, the costs for heat supply amount to around 350,000 EUR/a, of which approximately 270,000 EUR/a are attributable to decentralized and about 80,000 EUR/a to centrally supplied buildings. A detailed breakdown of costs is presented in Table 1. In addition to the cost optimization, greenhouse gas emissions were calculated, which are attributable to the heat supply (Table 1). These are distinguished from the emissions emitted by alternative technologies and emissions from the CHP unit. Within the Thermos algorithm, the CHP and gas heating system life cycle emissions were taken from GEMIS [40]. These emissions were cumulated to each produced kWh of heat.

DHNx/SESMG
Within the DHNx optimization, six buildings with a peak demand of 363 kW are connected to the heating network. Again, a central CHP unit was selected and sized to supply the heating network during the optimization. The CHP has a thermal output of 233 kW, which causes approximately one half of the costs of centralized heat supply which accounts for about 63,000 EUR/a. The operating costs of the CHP are considered separately (electricity export and natural gas import) in the DHNx approach, due to the German subsidy, they are approximately 0 EUR/a. The unconnected buildings' demand is covered using a decentralized gas heating system, which at a power of 1,084.36 kW incurs costs of around 278,000 EUR/a. The pipes' costs designed within the DHNx/SESMG optimization can be taken from Appendix E.
As with Thermos, the DHNx/SESMG approach also determines the amount of greenhouse gas emissions caused in addition to the financial optimization. The caused emissions are given in Table 1 The amount which leaves the system boundary with the electricity (regarding the adapted territorial emission approach by Klemm and Wiese [22]).

Supply Problem
In the "supply problem", the supply of heat covering the demand of the six (DHNx/SESMG) or nine (Thermos) building heat network is considered. The amount of heat during extreme days in winter are plotted in Figure 4. Within this figure, stacked plots, in which the heat quantity of the CHP is plotted at the bottom and that of the gas peak boiler at the top, are used, presenting the amount of heat at different times.

Thermos
A CHP plant with a thermal output of 180 kW and a gas boiler with an output of 100 kW were selected during the optimization as the most economically viable option for supplying thedistrict heating network (nine buildings) (Appendix F).
As an example, Figure 4 shows the heat load on the coldest day of winter with reference to the Thermos supply problem. While the CHP (blue line) provides a constant base load of 180 kWh, the gas boiler provides a changing peak load between 18 kWh at the beginning of the day (0 h) and 100 kWh at 5 h.

DHNx/SESMG
Diverging from Thermos, DHNx/SESMG did not map the load profile for the heat supply to the heat network, but implemented the network representing the results of the "network problem" (Section 3.1.2) as an existing network, so that the optimization algorithm had only a choice about the mode of operation of the central heat supply. This is necessary to create comparability between the two approaches.
Within the DHNx supply problem optimization a CHP unit with 233 kW heat output and a gas boiler with 130 kW heat output is considered covering the systems heat demand.
The coldest winter day of the DHNx model is shown in Figure 4. The CHP plant provides a heat output of 233 kW between 4 h and 22 h, but is only operated at partial load during night times (23 h to 4 h). During those periods the CHP has an heat output with a minimum of 193 kWh (2 h).

Discussion
In this study, two approaches for the modeling and optimization of heat networks were compared. First theoretically and subsequently practically by applying it to a real-world energy system. Within the Thermos approach, the optimization of district heating networks is divided into the "network problem" and the "supply problem". This procedure was adopted for the DHNx/SESMG approach.
Within the application, all model parameters were unified as far as possible. Despite this unification, some input options and calculation bases are partially different, which led to slightly different results in the practical application. Differences during the "network problem" were the calculation of heat losses and the calculation of green house gas (GHG) emissions. Deviating simultaneity factors (see Section 2.2) were impacting both, the "network problem" as well as the "supply problem". A side-by-side comparison of the two investigated approaches can be found in Table 2.
General approach: The Thermos approach is a pure district heating model, which weighs up alternative technologies, grid connection (investment optimization), as well as its mode of operation (dispatch optimization). Financial aspects are used as optimization criterion. The SESMG integrated DHNx approach, on the other hand, is able to represent entire multi-energy systems of, e.g., urban areas. For the purpose of this study the applied model was reduced to the heating sector, in order to guarantee comparability between the applied approaches. Since today's energy systems can not longer be viewed mono-sectorally (e.g., because of sector coupling), this represents a strength of the DHNx/SESMG solution.
Temporal resolution: The Thermos algorithm, uses different reference days (Appendix C) for the design of the heat network components, which are considered independently. Even if this procedure was reproduced in the DHNx/SESMG approach, it allows a free choice of the time step length as well as the number of time steps, which is highly relevant for a realistic design of a heat network due to interactions between two days (e.g., the storage capacity at the end of the day).
Usability: The user interface of Thermos simplifies the workflow of modeling and optimization of a heat network, and allows the results to be presented visually and thus quickly understandable. However, heat demands are calculated not only for residential, commercial, and industrial buildings, but also for garages, garden sheds, or similar ones. For all these buildings a district heating connection option is automatically prepared. There-fore modelers must manually select which buildings should be included in the optimization and which should not. If modelers upload prepared geo-data sets, this disadvantage does not apply. The DHNx/SESMG approach is spreadsheet driven and does not provide any GIS-based user-interfaces. This causes that an alternative for the localization and length determination of the pipes has to be applied (Section 2.1). As deviations from the shortest pipe length may occur during the search of perpendiculars, these can and must be corrected by the modelers in order to achieve the desired result quality.
Pipe properties: Within the Thermos approach, no distinction between house supply pipes and distribution pipes is made (Section 2.2). This takes the opportunity of setting different parameters for distribution and house connection pipes. Within the DHNx/SESMG approach, connecting and distribution pipes are differentiated. The loss consideration within Thermos is dependent from the pipe diameter, as well as from energy transported through the pipe (Appendix D). The DHNx/SESMG losses, are dependent from a diameterspecific loss factor. Both approaches allow consideration of different insulation thicknesses as well as pipe materials.
Heat network properties-simultaneity: Within the Thermos approach a simultaneity factor is calculated and applied to all pipe sections, substations and central heat plants (Section 2.2). For a district heating network of 9 connected buildings the simultanety is calculated to be 0.67 and cannot be modified by the user. This may cause errors for small and medium sized heating networks. For the test case area, in example, a simultaneity of above 0.9 can be assumed based on former studies [41]. The value is therefore clearly deviating from the pre-defined value in Thermos which leads to the fact that without consideration of a sufficiently large safety (approx. 1.5-2) an undersizing of the heating network can result. Within DHNx/SESMG the simultaneity results automatically from temporally and spatially highly resolved representation of stochastic and/or standard load profile [29].
Heat network properties-green house gas emissions: Thermos, in contrast to DHNx, does not allow the consideration of fixed upstream and downstream emissions for network pipes. These emissions are necessary for a complete assessment of the green house gas (GHG)-emissions of the whole energy system. However, Table 1 shows, that there are only marginally significant. Thus, upstream and downstream emissions of network pipes only very minor impact on the overall emissions balance compared with direct emissions from the combustion of fossil fuels.
Result comparison: Within the first step of the network optimization problem, only one time step of the applied weather data set (the coldest one) is modeled (Section 2). Both approaches propose to implement a heating network for the street "In den Weiden", which consists big apartment buildings and a comparatively high population density. Therefore, there is a high peak heat demand as well as an high annual heat demand.
Thermos proposes to connect even more buildings (+50%) to the heating network than the DHNx/SESMG approach (Section 3). Therefore, also cost differences (Table 1) between the modeled district heating stations and the supply alternatives for unconnected buildings, as well as pipe lengths (Appendix E) apply. The longer pipe length in Thermos results in additional costs of about 17%, which, however, are almost compensated by the cheaper alternative technologies resulting from the heat network supply of a higher number of buildings. So that the energy system solution provided by the DHNx/SESMG-approach ends up being about 5% more expensive than Thermos'.
The difference in the number of connected buildings can be attributed to the differently applied simultaneities (Sections 2.2 and 4). On this basis, the DHNx/SESMG approach assumes a more realistic but higher building specific peak load than Thermos (+29%), which in turn requires larger pipe diameters, resulting in higher investment costs. Since the simultaneity factor of DHNx/SESMG approach is more accurate (see above), it is reasonable to assume that it's results are more precise.
Both optimization approaches come to the conclusion that a base-load CHP and a peak-load gas boiler represent the most appropriate heat supply unit combination for the heating network, which arose from the "network problem". The CHP is used for nearly constant base load coverage, while the output of the gas boiler varies and performs as a peak load boiler (Figure 4).
Due to the simultaneity factor calculated and applied within Thermos (Section 2.2), the variance of the different day types is lost. While the ratio between the peak load on the winter extreme day (5 h) and the peak load on the winter average day (5 h) is about 60% (Appendix C), this ratio is about 77% within the Thermos results (Appendix F) due to simultaneity. Thus, the load gradient is lost, which favors the operation of the peak-load gas boiler, since the peak demand is much less significant. This represents a cause for undersizing the heat network components mentioned before.
With the DHNx/SESMG approach, however, no simultaneity factor is used, but results from the individual load profiles of the spatially higher resolution model. Therefore, the DHNx/SESMG approach guarantees more accurate consideration of simultaneity. This in turn explains the differences in design between CHP plants and gas heating (Appendix F).
Collectively, the calculation effort of Thermos is significantly lower than that of DHNx/SESMG. While the computing time of the Thermos approach solving the "network problem" took < 10 seconds the DHNx/SESMG approach needed about 19 minutes.

Conclusions
Both analyzed district heating modeling approaches-the "Spreadsheet Energy System Model Generator"-integrated DHNx-Python module (DHNx/SESMG) and "Thermal Energy Resource Modeling and Optimization System" (Thermos)-provide comparable results from geographical (location), monetary and emissions perspectives (Section 3). Differences regarding the assumptions of the applied simultaneity factor (Sections 2.2 and 4) were identified as the main reason for the discrepancy between the results of the two approaches, as it is too small (− 20%) in the Thermos approach.
Within the DHNx/SESMG approach, the design of district heating networks is a part of the design of complex multi-energy systems. This multi-sectoral consideration quickly leads to very complex models, which require a large amount of computing resources (especially computing time) to solve. Nevertheless, it is necessary to set up a comprehensive model due to the increasing importance of sector coupling and the increasing complexity of energy systems.
However, the DHNx/SESMG approach is flexible enough to adapt the process of the single-sector Thermos approach. Therefore, a simplified model can be performed to carry out a preliminary model with a lower level of detail and faster computation time, (114 times faster than the DHNx/SESMG-approach). The results can subsequently be used to include in the complex multi-sectoral model only those district heating components that are likely to be considered within the optimization.
If, despite the above reasons, a mono-sectoral investigation of the heat sector is desired, Thermos remains an alternative due to its low computational time. Acknowledgments: Three anonymous reviewers helped to improve the manuscript, thank you.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.

Abbreviations
The following abbreviations are used in this manuscript:

Appendix A. Perpendicular Foot Print Search
The perpendicular foot point search approach requires a fidelity of angle and length which can be nearly met by Gaussian-Kruger projection [42], a variant of the mercator projection method [43]. Choosing the right Gaussian-Kruger zone enables the calculation of the euclidean distance between point (building or producer) and line (road section). Equation (A1) is used to calculate the distance (d in km) based on the Pythagoras theorem using the distances in longitudinal (dy in km) (Equation (A4)) and in latitudinal direction (dx in km) (Equation (A3)), for which the mean latitude of the problem to be solved is needed (Equation (A2)).