0% found this document useful (0 votes)
8 views

Benchmark of Mixed Integer Linear Programming Formulations For Dis - 2024 - Ener

Uploaded by

dylan florez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Benchmark of Mixed Integer Linear Programming Formulations For Dis - 2024 - Ener

Uploaded by

dylan florez
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Energy 308 (2024) 132885

Contents lists available at ScienceDirect

Energy
journal homepage: www.elsevier.com/locate/energy

Benchmark of mixed-integer linear programming formulations for district


heating network design
Jerry Lambert ∗, Amedeo Ceruti, Hartmut Spliethoff
Technical University of Munich, TUM School of Engineering and Design, Chair of Energy Systems, Boltzmannstr. 15, Garching, 85747, Germany

ARTICLE INFO ABSTRACT

Dataset link: https://doi.org/10.5281/zenodo.1 Optimal routing and investment decisions are key design criteria to reduce the high investment costs of district
0354616, https://github.com/jylambert/topot heating systems. However, these optimization problems have prohibitively high computational costs for large
herm districts. Four different mixed-integer linear optimization frameworks are benchmarked in this study in order
Keywords: to compare their computational scaling. The frameworks exhibit significant differences in solving times for
Energy system optimization synthetic benchmarks and real-world urban districts of up to 9587 potential edges. The new open-source
District heating framework topotherm, developed for this work, exhibits the best computational performance when only one
Mixed integer linear programming time step is optimized. The comparison between the models Résimont, DHmin, DHNx, and topotherm shows
Benchmark two main trends. First, fewer integer variables do not necessarily translate to lower solving times, and second,
Computational scaling using redundant binary variables, which introduce symmetries into the constraints, leads to higher solving
times. None of the considered optimization frameworks is able to solve the largest benchmark problems for
five time steps within the allowed time limit and tolerance. These findings highlight the challenges of and
pressing need to develop efficient models for simultaneous optimization of district heating network topology,
pipe sizing, and operation.

1. Introduction those tools can speed up the process of finding potential geographic
areas that are well-suited for district heating systems thus contributing
Traditional fossil fuels must be replaced with renewable energy to an acceleration of the heating sector’s transformation.
sources in every sector to achieve ambitious climate change mitigation In [6], a review on design optimization of district heating systems
goals. Until recently, renewable energy has been mainly deployed in is performed. The authors find that around 80% of the 51 consid-
the electricity sector. However, on a European level, approximately ered publications in the study are using linear or mixed-integer linear
50% of the final energy demand in 2015 was used for the heating and programming (MILP) models to solve the optimization problem. MILP
cooling sector [1]. Additionally, space heating and domestic hot water models allow an efficient design and sizing of the district heating net-
usage accounted for 85% of the CO2 -emissions of German households work infrastructure, including pipes and heat sources. By considering
in 2020 [2]. continuous and discrete variables, MILP can optimize the placement
District heating systems can be a key technology in a socially and capacities of heat generation sources, distribution routes, and
accepted, affordable transformation towards a renewable energy system
storage options while minimizing heat losses and maximizing the uti-
due to numerous advantages over a building-specific heat supply [3].
lization of renewable heat resources. Around 70% of the reviewed
These advantages include higher heat generation efficiencies, and the
literature in [6] used real case studies, often on a small scale, to validate
possibility of integrating seasonal energy storage or additional renew-
their models.
able energy sources, such as deep geothermal energy [4]. However, the
As [6] shows, numerous optimization frameworks for district heat-
investment costs for district heating systems often require a high heat
ing systems have been published in the last few years. In their publi-
demand density for economically feasible network expansions [5].
cations, the authors usually acknowledge the shortcomings of existing
Optimal routing with ideal pipe sizing and operating parameters are
two possibilities to reduce the investment as well as operational costs frameworks and introduce their new problem formulation. However,
of district heating systems. To tap into that potential, optimization can barely any publication performs a systematic benchmark of different
aid decision-makers in finding the best solutions to be implemented formulations. In [7], two open source frameworks, Thermos [8] and
in a given geographic area. Especially during municipal heat planning, DHNx [9], are compared. Both optimization frameworks resulted in

∗ Corresponding author.
E-mail address: [email protected] (J. Lambert).

https://doi.org/10.1016/j.energy.2024.132885
Received 11 December 2023; Received in revised form 12 July 2024; Accepted 18 August 2024
Available online 21 August 2024
0360-5442/© 2024 The Author(s). Published by Elsevier Ltd. This is an open access article under the CC BY license (http://creativecommons.org/licenses/by/4.0/).
J. Lambert et al. Energy 308 (2024) 132885

comparable final networks. The discrepancy between both methods is


Nomenclature
due to the different assumptions made on the simultaneity factor. Ther-
mos solved the design problem 114 times faster than DHNx [7]. In con-
Greek symbols trast to [7], this study includes additional frameworks and larger dis-
𝛥 Difference tricts. Moreover, several modeling choices are compared to gain more
𝜖 Pipe roughness in m insights to efficiently solve the district heating optimization problem.
Another benchmark of two nonlinear formulations is performed
𝜆 Binary decision variable
in [10]. The first considered method uses a mixed-integer nonlin-
𝜇 Dynamic viscosity in kg/(m⋅s)
ear problem (MINLP) formulation to solve the binary pipe routing
𝜌 Density in kg/m3
constraints with a combinatorial optimization approach. The second
𝛩 Temperature Difference in K method relies on a relaxed continuous nonlinear optimization problem.
Indices While nonlinear optimization methods are able to depict nonlinear
relationships within the district heating systems, such as temperature
𝑐 Consumer mixing and pressure drops, those methods usually tend to converge to
𝑖 Index for a node a local minimum and scale significantly worse to larger districts than
𝑖𝑗 Directed edge going from node 𝑖 to node 𝑗 linear models.
𝑗 Index for a node In contrast to the cited literature, this study focuses on a fully
𝑝 Producer reproducible and open-source benchmark of different MILP frameworks
𝑡 Timestep for district heating network design, which converge in a determin-
istic global minimum. To that end, different MILP formulations are
Abbreviations compared with a synthetic district heating system to determine their
cost Cost computation scaling and six increasingly large real-world examples to
g Ground validate the findings of the synthetic benchmark. In this work, the
following district heating network design frameworks are compared
inst Installed
and open-sourced: DHNx [9], Résimont [11], DHmin [12] and the
insul Insulation
novel framework topotherm. This framework comprises a formulation
int Internal
specifically tailored for a single time step and a second formulation for
inv Investment multiple time steps.
max Maximal In Section 2, topotherm and the other benchmarked frameworks
return Return line are introduced and described. Then, in Section 3, benchmarks for
supply Supply line the synthetic and real urban districts are performed, analyzed and
therm Thermal discussed. Finally, recommendations for district heating network design
models and an outlook for future research are given in Section 4.
Latin symbols

𝑄̇ Thermal power in W 2. Methodology


an Annuity
a Linear regression factor This section presents a linearization of the investment costs and
b Linear regression factor thermal heat losses for pipes in a district heating system. Then, the
flh Full load hours in h two variants, i.e. single and multiple time steps, of the novel framework
l Length of a pipe in m called topotherm and the three considered frameworks, DHmin, DHNx,
p Pressure in bar and Résimont, are introduced.
𝑐 Specific heat capacity in J/(kg⋅K)
𝑑 Inner diameter of a pipe in m 2.1. Linearization of heat losses and pipe investment costs
𝑓 Friction factor
In this paper, the considered heat carrier medium is water. It is
ℎ Depth of buried pipe in m
assumed to be liquid and, therefore, incompressible. Additionally, by
𝑘 Thermal conductivity in W/(m⋅K)
assuming temperature changes smaller than 𝛥𝑇 = 40 ◦ C, temperature
𝑛years Number of years in a
dependencies of the fluid properties (e.g., density 𝜌, heat capacity cp
𝑄 Thermal energy in Wh and dynamic viscosity 𝜇) are neglected because the variations in the
𝑅2 Coefficient of determination property values are small for the considered parameter range. The fluid
𝑅𝑒 Reynolds number properties of water are constant and determined at 70 ◦ C. The feed
𝑇 Temperature in ◦ C line temperature is assumed to be at constant 90 ◦ C, while the return
𝑣 Velocity in m/s temperature is assumed to be at constant 55 ◦ C.
𝑤 Interest rate The maximal mass flow 𝑚̇ with the corresponding velocities 𝑣 of
each considered piping diameter 𝑑 must be determined to linearize
Number sets
the maximal thermal power flow in a district heating pipe with length
 Set of edges l. Subsequently, the heat losses of the district heating network pipes
 Set of nodes can be determined for each diameter. The relationship between the
 Set of timesteps investment costs and heat losses of a pipe with regard to the maximal
thermal power flow is modeled with a linear regression. The pressure
loss 𝛥𝑝𝑖𝑗 between two nodes 𝑖 and 𝑗 with equal height connected by a
pipe is calculated according to Darcy–Weisbach:

l𝑖𝑗 𝑣2𝑖𝑗
𝛥𝑝𝑖𝑗 = 𝑓𝑖𝑗 ⋅ ⋅ ⋅𝜌 (1)
𝑑𝑖𝑗 2

2
J. Lambert et al. Energy 308 (2024) 132885

The Reynolds number 𝑅𝑒 is calculated as: 2.4 W/(m⋅K) and the conductivity of the thermal insulation, formed by
𝜌 ⋅ 𝑣𝑖𝑗 ⋅ 𝑑𝑖𝑗 polyurethane, to 0.024 W/(m⋅K) [22].
𝑅𝑒𝑖𝑗 = (2) As stated in [22], the thermal losses along a pipe are nearly inde-
𝜇
pendent of the mass flow rate, except for low mass flow rates. This
and the friction factor 𝑓𝑖𝑗 for a turbulent flow (i.e. 𝑅𝑒 ≥ 2320) is given influence decreases even further with increasing pipe sizes [22]. The
by the Haaland equation: [13] linear regressions in Fig. 1 are able to depict the maximal thermal
[ (( )1.11 )]−2 power flow through the network sufficiently well in the specified condi-
𝜀 6.9
𝑓𝑖𝑗 = −1.8 ⋅ log + (3) tions (coefficient of determination 𝑅2 = 0.66 for the thermal losses and
3.7 ⋅ 𝑑𝑖𝑗 𝑅𝑒𝑖𝑗
𝑅2 = 0.87 for the investment costs). The implementation of both linear
with pipe roughness 𝜀. regressions into the optimization problem is shown in Sections 2.2.1
According to [14], the specific pressure drop per meter pipe length and 2.2.2 This can be further improved by always adapting the piping
should range from 70 Pa/m to 350 Pa/m. An iterative calculation de- range to the magnitude of potential heat demand in the considered
termines the maximal velocity in a pipe with a given inner diameter. district because decreasing the range of the considered piping diameter
Starting with an initial velocity of 0.5 m/s, the equation: makes the linear fit more accurate. For example, if pipe diameters
√ ranging from DN 20 to DN 200 are used to linearize the power flow,
2 ⋅ 𝛥pmax ⋅ 𝑑 𝑅2 for the thermal losses increases to 0.78 and for the investment costs
𝑣max = (4)
𝑓 ⋅𝜌 to 0.94.
is solved iteratively with SciPy [15] for a given maximal specific
2.2. Mixed-integer formulations for district heating network design
pressure loss 𝛥pmax .
Finally, the maximal thermal power flow 𝑄̇ max through a pipe can
In this section, different versions of topotherm, which are based on
be calculated depending on its inner diameter, and the feed and return
preliminary works of the authors in [23], are presented. All models
line temperatures.
are formulated in Pyomo [24,25] and available as a GitHub repository
Next, the thermal behavior of an insulated pipe buried underground
at https://github.com/jylambert/topotherm or a Zenodo repository at
is modeled. Therefore, the temperature difference 𝛩 between the water
https://doi.org/10.5281/zenodo.10354616.
temperature in the pipe and the outside temperature is introduced. The
A graph representation of a district heating network has to be
exit temperature 𝛩𝑖𝑗 of a pipe segment 𝑖𝑗 due to heat losses to the
introduced to mathematically represent pipes, junctions, producers, and
environment with an entry temperature 𝛩𝑖 of the corresponding node
consumers. The district heating systems’ pipes correspond to the graph’s
is calculated with:
( ) edges and the network’s junctions to the nodes. The district heating
−l𝑖𝑗 network consists of a feed and return network with edges of opposite
𝛩𝑖𝑗 = 𝛩𝑖 ⋅ exp (5)
𝑐𝑝 ⋅ 𝑚̇ 𝑖𝑗 ⋅ 𝑅𝑖𝑗 directions. This superstructure contains all possible connections and
The combined thermal resistance 𝑅𝑖𝑗 of the pipe and soil per unit pathways from the heat source to the consumers. The set of all nodes
length is calculated with the ratio 𝑟 between outer and inner diame-  is subdivided into three different subsets
ter: [16]  int ∪  p ∪  c =  (7)
4ℎ
ln 𝑟⋅𝑑𝑖𝑗 where int denotes all nodes without a consumer or a producer, the
ln 𝑟
𝑅𝑖𝑗 = + (6) subscript p describes all nodes connected to at least one producer, and
2𝜋 ⋅ 𝑘g 2𝜋 ⋅ 𝑘insul
The ratio 𝑟 in Eq. (6) is determined with the inner and outer the subscript c all nodes connected to at least one consumer.
The set 𝐴 representing all edges of the network is given by:
diameter including the insulation thickness of type one based on [17].
Moreover, the buried depth of a pipe ℎ, as well as the thermal conduc- int ∪ p ∪ c =  (8)
tivities of the ground (𝑘g ) and of the pipe’s insulation (𝑘insul ) are used
to calculate the combined thermal resistance. In this study, a maximum and, similarly to Eq. (7), int represents the geometrical pipe con-
specific pressure drop 𝛥pmax of 250 Pa/m is assumed for the optimiza- nection between two different internal nodes. p and c denote the
tion. Eqs. (1)–(6) form a full nonlinear thermohydraulic model of a state transition between the district heating system and a producer or
district heating pipe. To represent the considered diameter range in a a consumer, respectively. A certain network node will be referred to as
MILP, the nonlinear dependencies have to be represented as continuous 𝑛, whereas a directed edge going from node 𝑖 to node 𝑗 as 𝑖𝑗 ∈ .
and linear within the optimization problem. The linearization in this
study is performed with a simple linear regression 𝑦 = a ⋅ 𝑥 + b, where 2.2.1. topotherm – Single time step
𝑦 is the dependent variable, 𝑥 is the independent variable, and the Similarly to [11,26,27], the bidirectionality of the network (two
factors a and b are the regression coefficients. This approach is adopted edges per pipe) is explicitly considered and modeled in the single time
to formulate an optimization problem that can be solved within a step formulation of topotherm (denoted as topotherm_sts from now on).
feasible computing time, consistent with the methodologies of previous This contrasts [9], where the bidirectionality is implicitly modeled by
works such as [9,11,12,18–21]. Therefore, the investment costs and considering only the decision to build a certain connection and not the
the thermal losses per trench length are linearized with SciPy for pipes direction of the connection. The thermal power in- and output of every
ranging from DN 20 to DN 400 (see Fig. 1). Eq. (4) is used to determine pipe are modeled according to the directed graph of the network. In
a maximal velocity, which is transformed into a maximal mass flow order to allow flows in the opposite direction, every potential pipe 𝑖𝑗 is
(𝑚̇ = 𝜌 ⋅ 𝑣 ⋅ 𝑑 2 ⋅ 𝜋∕4). The maximal mass flow is used to determine the also modeled in the direction 𝑗𝑖. Fig. 2 shows a graphical representation
thermal capacity of each pipe 𝑄̇ cap = cp ⋅ 𝑚̇ ⋅ (𝑇 feed − 𝑇 return ) (with a of a modeled pipe between nodes 𝑖 and 𝑗.
constant feed and return line temperature 𝑇 feed and 𝑇 return ) and the For the sake of simplicity, only the equations in direction 𝑖𝑗 are
thermal losses for each DN by using Eq. (5). The total investment costs discussed below, but the opposite direction is modeled by substituting
for piping are adapted from [5]. The resulting linearizations are shown 𝑖𝑗 by 𝑗𝑖. The heat balance of each pipe
( )
for a feed line temperature of 90 ◦ C and a return line temperature 𝑄̇ in ̇ out therm
⋅ 𝑄̇ in therm
∀𝑖𝑗 ∈ int
𝑖𝑗 − 𝑄𝑖𝑗 − a 𝑖𝑗 + b ⋅ 𝜆𝑖𝑗 ⋅ l𝑖𝑗 = 0 (9)
of 55 ◦ C with an outdoor temperature of −20 ◦ C. The district heating
pipes are buried at a depth of 1 m and the pipe roughness is assumed contains the heat outflow 𝑄̇ out ̇ in
𝑖𝑗 of each pipe 𝑖𝑗, the heat inflow 𝑄𝑖𝑗 and
to be 0.05 mm. The thermal conductivity of the ground is equal to the thermal losses over the length l𝑖𝑗 .

3
J. Lambert et al. Energy 308 (2024) 132885

Fig. 1. Linear regressions for modeling district heating pipes.

with an interest rate 𝑤.


Additional constraints with redundant information can help to
tighten further the Branch-and-Bound during the optimization in some
problem types according to [28]. To that end, a supplementary con-
straint
∑ ∑ ( ) ∑ ( ) ∑
Fig. 2. Graphical representation of a modeled pipe between node 𝑛𝑖 and 𝑛𝑗 with power 𝑄̇ 𝑝 − 𝑄̇ in ̇ out −
𝑖𝑗 − 𝑄𝑖𝑗 𝑄̇ in ̇ out −
𝑗𝑖 − 𝑄𝑗𝑖 𝑄̇ 𝑐 = 0 (16)
inflow 𝑄̇ in
𝑖𝑗
and 𝑄̇ in
𝑗𝑖
, power outflow 𝑄̇ out
𝑖𝑗 and 𝑄̇ out
𝑗𝑖 , as well as binary variables for the 𝑝∈p 𝑖𝑗∈int 𝑗𝑖∈int 𝑐∈c
flow direction 𝜆𝑖𝑗 and 𝜆𝑗𝑖 .
is formulated to ensure the total system energy conservation.
Finally, the objective function minimizes the district heating net-
work’s total investment and operational costs. The investment costs
The thermal losses in Eq. (9) are determined by the linear regression are determined by the linear regression factors acost and bcost from
coefficients atherm and btherm as described in Section 2.1. The binary Section 2.1. By introducing full load hours flh, the investment and
variable 𝜆𝑖𝑗 represents the flow direction of the considered pipe. More- operational costs are weighted:
over, to enforce zero thermal power flow if the direction 𝑖𝑗 is not used, {
∑ ∑
an additional Big-M constraint is formulated: min 𝑄̇ inst inv
𝑝 ⋅ c𝑝 ⋅ an𝑝 + 𝑄̇ 𝑝 ⋅ cfuel
𝑝 ⋅ flh
𝑝∈p 𝑝∈p
𝑄̇ in
𝑖𝑗 ≤ 𝑄
̇ max ⋅ 𝜆𝑖𝑗 ∀𝑖𝑗 ∈ int (10) }
∑ [ cost
]
+ acost ⋅ (𝑄̇ in ̇ in
𝑖𝑗 + 𝑄𝑗𝑖 ) + b ⋅ (𝜆𝑖𝑗 + 𝜆𝑗𝑖 ) ⋅ l𝑖𝑗 ⋅ anpipe (17)
where 𝑄̇ max is modeled as a sufficiently large constant power flow.
𝑖𝑗∈int
Each consumer connection to the district heating grid is modeled as
unidirectional, and thus no heat feed-in from a consumer is possible. 2.2.2. topotherm – Multiple time steps
Moreover, energy conservation is assumed in every node under consid- In order to optimize district heating systems with multiple time
eration of the consumer’s heat demand and the heat source’s feed-in: steps and changing flow directions with topotherm_mts, the formula-
tion of Section 2.2.1 needs to be expanded. Not only the bidirectional
𝑄̇ in ̇ out ̇ ̇
𝑛𝑖 − 𝑄𝑗𝑛 − 𝑄𝑐,𝑛 + 𝑄𝑝,𝑛 = 0 ∀𝑛 ∈  , (𝑛𝑖, 𝑗𝑛) ∈ int (11)
operation of the pipe has to be modeled, but also a binary variable has
To ensure a unidirectional use of a pipe and to reduce the solution to be incorporated to model the decision if a pipe is built independent of
space during the Branch-and-Bound, an additional constraint the flow direction. Similar to Section 2.2.1, only equations in direction
𝑖𝑗 are provided in exemplary fashion below. Moreover, 𝑡 refers to the
𝜆𝑖𝑗 + 𝜆𝑗𝑖 ≤ 1 ∀𝑖𝑗 ∈ int (12) set of all considered hourly time steps defined in the set  .
The heating power balance of each pipe is enforced by:
prevents the simultaneous use of the direction 𝑖𝑗 and 𝑗𝑖.
In this study, all consumers must be connected to the district heating 𝑄̇ in ̇ out ̇ loss
𝑖𝑗,𝑡 − 𝑄𝑖𝑗,𝑡 − 𝑄𝑖𝑗,𝑡 = 0 ∀𝑖𝑗 ∈ int , ∀𝑡 ∈  (18)
system grid
where 𝑄̇ out
𝑖𝑗,𝑡 is the mean power outflow of each pipe, 𝑄̇ in
the inflow
𝑖𝑗,𝑡
𝜆𝑖𝑗 = 1 ∀𝑖𝑗 ∈ c (13) and 𝑄̇ loss
𝑖𝑗,𝑡 the thermal losses during time step 𝑡. These equations can be
adapted for different time steps durations by changing from a power
therefore, the direction 𝜆𝑖𝑗 of pipe 𝑖𝑗 to a consumer node 𝑗 is set to 1,
flow to an energy flow with 𝑄𝑡 = 𝑄̇ 𝑡 ⋅ 𝛥𝑇𝑡 .
forcing the edge to be used and heating to be supplied.
The thermal losses for pipe 𝑖𝑗 need to be modeled as an independent
The thermal power output 𝑄̇ 𝑝 is constrained by the installed thermal
variable and cannot be incorporated into the equation directly. This
capacity of the source 𝑄̇ inst
𝑝 : is due to the thermal losses along a pipe being nearly independent of
𝑄̇ 𝑝 ≤ 𝑄̇ inst ∀𝑝 ∈  p (14) the inflowing mass flow rate and depending mostly on the installed
𝑝
diameter as explained in Section 2.1:
The annuity method distributes investment costs of pipes or heat
sources over the defined life span 𝑛years . Without discounting, the 𝑄̇ loss
𝑖𝑗,𝑡 − 𝑄
̇ max ⋅ 𝜆𝑖𝑗,𝑡 ≤ 0 ∀𝑖𝑗 ∈ int , ∀𝑡 ∈  (19a)
( )
cap
annuity an is calculated as: atherm ⋅ 𝑄̇ 𝑖𝑗 + btherm ⋅ 𝜆𝑖𝑗,𝑡 ⋅ l𝑖𝑗 − 𝑄̇ loss
𝑖𝑗,𝑡
(1 + 𝑤)𝑛years ⋅ 𝑤 max
( )
an = (15) −𝑄 ̇ ⋅ 1 − 𝜆𝑖𝑗,𝑡 ≤ 0 ∀𝑖𝑗 ∈ int , ∀𝑡 ∈  (19b)
(1 + 𝑤)𝑛years − 1

4
J. Lambert et al. Energy 308 (2024) 132885

where l𝑖𝑗 is the pipe length, atherm and btherm are linear regression (28)
coefficients calculated in Section 2.1, and 𝜆𝑖𝑗,𝑡 is the binary decision to
and
operate direction 𝑖𝑗 in time step 𝑡. Zero thermal flow, if the direction
∑ ∑ ( ) ∑ ( )
𝑖𝑗 of a pipe is not used, is enforced by: 𝑄̇ 𝑝,𝑡 − 𝑄̇ in ̇ out 𝑄̇ in ̇ out
𝑖𝑗,𝑡 − 𝑄𝑖𝑗,𝑡 − 𝑗𝑖,𝑡 − 𝑄𝑗𝑖,𝑡
𝑝∈p 𝑖𝑗∈int 𝑗𝑖∈int
𝑄̇ in
𝑖𝑗,𝑡 ≤ 𝑄
̇ max ⋅ 𝜆𝑖𝑗,𝑡 ∀𝑖𝑗 ∈ int , ∀𝑡 ∈  (20) ∑
− 𝑄̇ 𝑐,𝑡 = 0 ∀𝑡 ∈  (29)
Additionally, the maximal thermal power inflow 𝑄̇ in 𝑖𝑗,𝑡 at each time step 𝑐∈c
𝑡 ∈  is limited to the maximal thermal capacity of a pipe and maximal
thermal capacity to the binary decision 𝜆built
𝑖𝑗 if a pipe is built or not 2.3. Considered frameworks – DHNx, DHmin, and Résimont

𝑄̇ in ̇ cap
𝑖𝑗,𝑡 ≤ 𝑄𝑖𝑗 ∀𝑖𝑗 ∈ int , ∀𝑡 ∈  (21a) In this section, the optimization frameworks DHNx, DHmin, and
cap
𝑄̇ 𝑖𝑗 ≤ 𝑄̇ max ⋅ 𝜆built ∀𝑖𝑗 ∈ int (21b) Résimont are shortly introduced. Fig. 3 shows the different implemen-
𝑖𝑗
tations of a district heating pipe in each framework. In DHmin and
cap
where the maximal thermal capacity of a pipe is limited by 𝑄̇ 𝑖𝑗 for Résimont, the heating consumption of potential customers is subtracted
both directions 𝑖𝑗 and 𝑗𝑖. along a vertex from the district heating grid. Meanwhile, in DHNx,
If the direction 𝑖𝑗 is not used, Eq. (19a) ensures that the heat losses the heat load is subtracted from a node of the district heating system.
equal 0. Eq. (19b) enforces the heat loss calculation with the maximal DHmin (see Fig. 3(a)) uses one binary constraint for each direction
built thermal capacity 𝑄̇ max according to the flow direction in the of the pipe (𝑖𝑗 and 𝑗𝑖). The binary building decision of a pipe is also
pipe. Moreover, the decision to build a pipe has to be linked with the modeled for each direction and is constrained by equality. Similarly,
possibility to use a certain direction of the pipe: the maximal thermal capacities of a pipe are defined for each direction
𝜆𝑖𝑗,𝑡 − 𝜆built ≤0 ∀𝑖𝑗 ∈ int , ∀𝑡 ∈  (22) and set to equal values. Meanwhile, in Résimont (see Fig. 3(b)), only
𝑖𝑗
one binary building variable and maximal thermal capacity are defined
Similar to Section 2.2.1, the simultaneous use of the direction 𝑖𝑗 and for both directions, while each direction of the pipe is still explicitly
𝑗𝑖 is prevented by: modeled. Finally, DHNx (see Fig. 3(c)) does not explicitly consider each
direction of the pipe but models each pipe in the network bidirection-
𝜆𝑖𝑗,𝑡 + 𝜆𝑗𝑖,𝑡 ≤ 1 ∀𝑖𝑗 ∈ int , ∀𝑡 ∈  (23)
ally. Moreover, like Résimont, the binary building decision variable is
In this study, all consumers must be connected to the district heating only modeled once for each pipe.
system grid. Therefore at a node 𝑗 with a consumer, the binary direction Table 2 in Appendix A summarizes the capabilities of the considered
𝑖𝑗 pipe and the binary building decision of that pipe is set to 1: algorithms. All changes made on the considered frameworks to allow
for a direct comparison between them are documented in Appendix B.
𝜆𝑖𝑗,𝑡 = 1 ∀𝑖𝑗 ∈ c , ∀𝑡 ∈  (24a)
𝜆built
𝑖𝑗 =1 ∀𝑖𝑗 ∈ c (24b) 2.4. Benchmarks
Eq. (16) is adapted in order to consider multiple time steps and flow
In order to compare the scaling regarding the computational cost
directions:
∑ ∑ ( ) ∑ of the different formulations with increasing network size, a slightly
𝑄̇ 𝑝,𝑡 − 𝑄̇ loss ̇ loss −
𝑖𝑗,𝑡 + 𝑄𝑗𝑖,𝑡 𝑄̇ 𝑐,𝑡 = 0 ∀𝑡 ∈  (25) modified version of the synthetic one-producer-case benchmark gen-
𝑝∈p 𝑖𝑗∈int 𝑐∈c erator from [10] is used, where each consumer has an individual
The thermal power of the source 𝑄̇ 𝑝,𝑡 is limited by the optimal connection to the grid (see Fig. 4). A single heat source with a feed-
installed thermal power 𝑄̇ inst as follows: in temperature of 90 ◦ C is placed in the center of this district heating
𝑝
grid. Each consumer has an assumed return temperature of 55 ◦ C and
𝑄̇ 𝑝,𝑡 ≤ 𝑄̇ inst
𝑝 ∀𝑝 ∈  p , ∀𝑡 ∈  (26) a peak heating demand of 15 kW. The size of the network can be
linearly increased by adding more segments. Each segment consists of
The objective function in Eq. (17) is adapted to depict multiple time
five potential pipe connections and additional heat consumers. From
steps and flow directions. The full load hours are scaled according to
now on, the problem size is measured by the number of initial edges in
the simulated time period and adjust the considered heat demand to
a network. Starting with four segments, additional segments are added
the yearly heat demand:
{ to the district heating systems in each iteration until 1024 segments are
∑ ∑ ∑ reached. Fig. 4 depicts the district heating systems with 84 segments.
min 𝑄̇ inst inv
𝑝 ⋅ c𝑝 ⋅ an𝑝 + 𝑄̇ 𝑝,𝑡 ⋅ cfuel
𝑝 ⋅ flh𝑡
𝑝∈ p 𝑡∈ 𝑝∈ p Seven real-world urban areas are used to validate the synthetic
} benchmark findings. The open-source data set of building footprints
∑ [ cap
]
+ acost ⋅ 𝑄̇ 𝑖𝑗 + bcost ⋅ 𝜆built
𝑝 ⋅ l𝑖𝑗 ⋅ anpipe
(27) from [29] is used to obtain the seven networks. The peak demands
𝑖𝑗∈int are calculated with a regression model depending on the building
The forced expansion assumed in this paper can be easily modified volume calculated with building surface and height in the LoD-2 data
for a planned expansion by eliminating constraints Eq. (24) and mod- set from [30].
ifying the objective function Eq. (27) to economic indicators, such as
revenue maximization. 3. Results
As mentioned in Section 2.1 the thermal losses in a pipe do not de-
pend on the thermal power flow into the pipe but rather on the installed In this section, the benchmarks of the considered frameworks are
capacity of the pipe. As the consideration of the installed capacity of presented. First, a single time step is considered in Section 3.1 with
the pipe in Eq. (18) is computationally expensive, an alternative for- a synthetic district heating system and seven district heating systems
mulation named topotherm mts_easy is formulated, where the thermal for real-world urban areas. Then, the same real-world examples are
losses do not depend on the maximal thermal pipe capacity but rather used to perform a benchmark with five time steps in Section 3.2.
on the thermal power inflow at each time step. This simplification is All calculations are performed on an Intel® Xeon® W-2155 CPU with
also applied in Résimont [11] and DHmin [12]. In this case Eqs. (18), 3.30 GHz, 10 physical cores and 64 GB of RAM. All models are solved
(19), and (25) are simplified to: with Gurobi® 10.0.2 [31] with a required minimum relative MIP-Gap of
( ) 1% and a wall clock time limit of 10000 s. The network plots are created
therm
𝑄̇ in ̇ out
𝑖𝑗,𝑡 − 𝑄𝑖𝑗,𝑡 − a
therm
⋅ 𝑄̇ in
𝑖𝑗,𝑡 + b ⋅ 𝜆𝑖𝑗,𝑡 ⋅ l𝑖𝑗 = 0 ∀𝑖𝑗 ∈ int , ∀𝑡 ∈  with Matplotlib [32] and NetworkX [33]. The MIP-Gap from each

5
J. Lambert et al. Energy 308 (2024) 132885

Fig. 3. Graphical representation of a modeled pipe between node 𝑛𝑖 and 𝑛𝑗 for the assessed formulations with power inflow 𝑄̇ in
𝑖𝑗
and 𝑄̇ in
𝑗𝑖
, power outflow 𝑄̇ out
𝑖𝑗 and 𝑄̇ out
𝑗𝑖 , flow
direction of either 𝜆𝑖𝑗 or 𝜆𝑗𝑖 and building decision 𝜆built .

to 3(c)). Therefore, the in- and outflow of a pipe are not contained in
[ ] [ ]
0, 𝑄̇ max but in −𝑄̇ max , 𝑄̇ max . Considering the binary decision variable
to build a pipe in addition to the two binary decision variables of
the used directions seems to tremendously improve the Branch-and-
Cut phase of the problem-solving process. All the other investigated
problem formulations use similar equations to Eq. (12). This enables
the solver to reduce the solution space through improved cuts, thus
solving the optimization problem faster. Moreover, DHNx implemented
the thermal losses depending on the pipe’s capacity. Therefore, DHNx is
outperformed by all studied formulations despite using less continuous
and binary variables in problem formulation.
The topotherm_mts formulation without a simplified thermal loss
calculation exhibits the second-worst scaling properties, solving the
benchmark with 1024 segments in 1670 s. This is due to the equations
needed to implement the thermal losses depending on the thermal
Fig. 4. Graphical illustration of an initial district heating network with 84 segments. capacity of the pipe. Here, a trade-off between model accuracy and
algorithm scalability based on model size needs to be assessed.
Table 1 DHmin solves the district heating system with 1024 segments in
Boundary parameters for every considered framework.
1480 s, while Résimont and topotherm_mts_easy solve this optimization
Parameter Value Reference
in 310.7 s and 510.6 s, respectively. This improvement might be due to
Full load hours (referenced to kWpeak ) 2500 h [35] the use of redundant binary variables. Résimont and
Heat production costs 0.08 e /kWh [36]
topotherm_mts_easy use one binary decision variable for depicting the
Service life of pipes 40 a o.a.
Internal rate of return 8% [36] construction of a pipe and one continuous decision variable for the
pipe’s capacity. On the other hand, DHmin uses one binary decision
o.a. is an abbreviation for own assumption.
variable for the building decision and one continuous variable for the
maximal thermal capacity for each pipe direction. The variables for
each direction are constrained by an equality condition. DHmin and
optimization is extracted with gurobi-logtools [34]. Each optimization
topotherm_mts exhibit a similar scaling behavior.
is carried out with the standard random seed of Gurobi® 10.0.2. Heat
The findings mentioned above can be further confirmed by com-
generation investment costs are neglected in the benchmark problems
paring the evolution of the MIP-Gap value during the optimizations
for simplicity’s sake and comparability between formulations. All opti-
in Fig. 5(b). In the one-producer synthetic benchmark with 1024 seg-
mizations are performed with the same boundary conditions, shown
ments, the DHNx formulation reduces the MIP-Gap less efficiently
in Table 1. Therefore, the different optimizations for each district
compared to the other frameworks. After 10000 s, the solution of DHNx
respectively have to reach the same objective function value if the
is still at a MIP-Gap of 17%. Thus, DHNx is not able to solve the
same MIP-Gap is achieved. This is shown and validated in Appendix C.
problem even by raising the MIP-Gap substantially, indicating that the
MILP has the advantage of being deterministic, guaranteeing that the
formulation of DHNx is not well-suited to find a good solution for very
objective function is reached within a specified tolerance. This can be
dense networks and a single time step. Résimont and both multiple
prohibitively costly regarding computational time. Therefore, problem
time step formulations of topotherm show very similar trends of re-
formulation is key to scaling optimization problems in size, allowing
the design of district heating networks in bigger cities. ducing their MIP-Gap. These frameworks steadily reduce their MIP-Gap
during each iteration, until the desired optimality is reached. Dhmin
3.1. Single time step and topotherm_sts start both with a higher MIP-Gap but drastically
reduce their MIP-Gap during certain iterations, presumably due to more
In Fig. 5(a), the solving times of each framework for the one- efficient heuristic solving thanks to their model structure. The MIP-
producer-case benchmark with an increasing number of segments are Gap’s evolution for all investigated one-producer benchmarks can be
shown. The proposed toptotherm_sts formulation achieves the fastest found in Appendix D.
solving times and solves the district heating system with 1024 segments Fig. 6(a) shows the computational scaling of the considered opti-
in 111.3 s. This formulation was explicitly written and optimized for an mization frameworks for the seven real-world urban areas. The findings
unidirectional flow and a single time step. Our experiments validate the confirm the scaling trends from the synthetic benchmark for all studied
proposed model, consistently achieving faster solving times relative to formulations. The benchmark proposed by [10], therefore, translates
the other studied formulations for the synthetic benchmark cases. to real-world districts well. topotherm_sts exhibits the best scaling
DHNx displays the worst scaling properties, solving the benchmark behavior, solving the benchmark with 9587 edges in 18.1 s. The worst
case with 4 segments in 0.4 s, but failing to conclude the benchmark performance is again shown by DHNx, which only solves three out of
case with 84 segments within the set time limit of 10000 s. A possible the seven districts within the set time limit. However, the topologies of
explanation for this behavior is its power flow formulation through a the considered areas differ significantly in connectivity and complexity
pipe. Unlike the other considered frameworks, DHNx does not explicitly compared to the benchmark generator and therefore, comparing the
model pipe directions (𝑖𝑗 and 𝑗𝑖) but combines them (compare Fig. 3(a) different-sized networks is more challenging. Depending on the density

6
J. Lambert et al. Energy 308 (2024) 132885

Fig. 5. Optimization results of the one-producer benchmarks.

Fig. 6. Optimization results of the seven real-world urban areas.

of road connections, bigger networks can be easier to solve than smaller of DHmin does not allow multiple time steps with a single heat source.
ones. With additional time steps, DHmin requires a second heat source, as the
The evolution of the MIP-Gap over the optimization of real-world availability of one heat source is set to zero to investigate heat delivery
urban areas resembles the evolution of the one-producer benchmark, security instead of network operation.
further confirming the trends of the synthetic benchmarks. DHNx per- Every considered framework needs substantially longer time to
forms better than on the one-producer benchmark cases on the less solve the optimization problem, and no one succeeds in solving every
dense urban areas (compare Figs. 5(b) and 6(b)). By raising the MIP- optimization within 10000 s (see Fig. 7(a)). The best scaling perfor-
Gap, DHNx would be able to solve most of the urban areas within mance is shown by topotherm_mts_easy, which solves the optimization
10000 s, while still taking substantially longer than the other con- with 6829 edges in 9271 s. All other frameworks are not able to solve
sidered frameworks. Despite non-smooth trend-lines in the synthetic the optimization problem within 10000 s and a MIP-Gap of 1%. The
benchmarks, the trends for DHmin and topotherm_sts translate well solver is not able to generate a valid solution for the topotherm_mts
to real-world urban districts. The trends of all frameworks for the formulation, i.e. respecting the integer constraints of all variables, for
investigated urban areas can be found in Appendix D. larger benchmarks.
During the optimization with five time steps, the framework DHNx
3.2. Multiple time steps is usually the first to find a solution respecting the constraints of the
problem (especially the integer constraints for variables). This is due
To test the scaling behavior of the considered frameworks for more to the fewer binary constraints, which are needed to model the pipe
than one time step, the same seven real-world urban areas of Sec- building decision and the flow direction in the pipe. Still, DHNx needs
tion 3.1 are used. Here, not only the peak heat load of each consumer a substantially longer wall clock time to solve the optimization problem
is considered, but an inter-temporal heat load is modeled after [37]. in comparison to the other considered frameworks. If the MIP-Gap
Overall, the optimization includes five time steps. DHmin is excluded were raised to 2%, the solving time for the first three districts would
from the benchmark with multiple time steps, as the implementation be comparable to both topotherm_mts and Résimont formulations. If

7
J. Lambert et al. Energy 308 (2024) 132885

Fig. 7. Optimization results of the seven real-world urban areas with five steps. topotherm_mts is not able to generate valid solutions for every considered area within the specified
time limit for all cases.

Introducing different random seeds leads only to slight deviations


in the solving times of the seven district heating networks (see Fig. 8).
This indicates that the three considered frameworks are not susceptible
to performance variability and are robust against random perturbations
within the solution process. However, other variations, such as column-
wise permutations or usage of different computational platforms, could
be exploited to enhance solution times, and their impact should be
investigated further.

4. Conclusion and outlook

In this work, the computational scaling of four different open-source


optimization frameworks for district heating expansion planning is
investigated and the formulations are cross-validated. The frameworks
exhibit significant differences in solving times for synthetic benchmarks
and districts of up to 9587 potential edges derived from real-world
municipalities despite reaching the same deterministic objective func-
tion value. Fewer integer variables do not necessarily translate to
Fig. 8. Mean solving times and standard deviations for seven potential district heating lower solving times. The DHNx framework does not explicitly model
area with five different seeds.
both pipe directions but combines them and only models a binary
decision variable if a pipe is built. Considering two binary decision
variables of pipe operation direction in addition to one binary deci-
a valid solution is found by the other frameworks, the optimization sion variable to build a pipe reduces the solving times significantly.
problem is solved faster than by DHNx. The formulation topotherm_mts Additionally, redundant binary variables lead to higher solving times in
is the slowest framework to find a valid problem solution, that is, the one-producer benchmark case. In both investigated single time step
respecting all defined constraints and variable bounds. The MIP-Gap is benchmarks, the best computational scaling performance was shown
low at the first iteration when a solution is found. The complete MIP- by the proposed topotherm_sts formulation, which is best suited for a
Gap trends for all investigated multiple time step problems is available single-time step design of district heating networks.
in Appendix D. The computational scaling of simultaneously determining the net-
work topology, pipe sizing, and network operation during multiple time
3.3. Robustness of the solution process steps is investigated in Section 3.2. None of the considered frameworks
are able to solve every district within the given time limit of 10000 s
MIP optimization is susceptible to significant variability in solving with a relative MIP-Gap of 1%, highlighting the challenges of inte-
times caused by changes to its model structure or solution process, such grating network operation in the district heating design process. Here,
as permuting rows or columns, or changing computing platforms [38]. DHNx is usually the first formulation to find a solution respecting all
Several runs of the seven potential district heating areas are performed constraints of the problem. This is due to the fewer binary constraints
to check how robust the different optimization frameworks are to used in the modeling of the pipe building. Still, DHNx needs a sub-
performance variability due to randomness in the solution process. stantially longer wall clock time to solve the optimization problem
Setting different random seeds acts as a small perturbation to the solver, and reach the required MIP-Gap compared to the other considered
typically leading to different solution paths during the optimization. frameworks. Increasing diversification of the heat generation structure,
Overall five runs were performed with differing random seeds for the including variable energy sources such as solar thermal collectors
multiple time step formulation of topotherm_sts, topotherm_mts_easy, and thermal storage, poses significant challenges in the planning and
and Résimont. operation of district heating grids. This further underlines the urgent

8
J. Lambert et al. Energy 308 (2024) 132885

need for efficiently scaling problem formulations, where some available Table 2
decomposition methods, such as Wolfe-Dantzig or Benders, could be Summary of the optimization algorithms’ capabilities.

applied and investigated further. Name STSa MTSb Forcedc ECOd Existing Demand
Further works should investigate the influence of Special Ordered topotherm_sts ✓ ✓ ✓ Node
Sets of type 2 (SOS2) on the quality of the linear fit of the thermal losses topotherm_mts ✓ ✓ ✓ ✓ Node
DHmin ✓ ✓ ✓ ✓ Edge
and investment costs. Using SOS2 could lead to increased solving times,
DHNx ✓ ✓ ✓ ? ✓ Node
which need to be tested. A two-step optimization methodology separat- Résimont ✓ ✓ ✓ ✓ ? Edge
ing the topology optimization from the pipe sizing optimization should THERMOS ✓ ✓ ✓ ✓ Node
be developed to optimize multiple time steps, which can determine the a
Single time step.
influence of storage on pipe sizing and the capacity of seasonal storage. b
Multiple time steps.
During the first step, different algorithms, such as a genetic algorithm, c
Forced Expansion.
a minimum spanning tree, or a MILP, could be tested in order to obtain d Economic Expansion.
the best-suited network topologies.

Funding

This work was supported by the Federal Ministry for Economic Appendix B. Modification of the considered frameworks
Affairs and Climate Action (Germany) in the framework of the project
Heat2Q [project no.: 03EN3055A] and by the ‘‘Bayerische Forschungss-
tiftung, Germany’’ in the framework of the project STROM [project no.: B.1. Résimont
AZ-1473-20]. Their financial support is gratefully acknowledged.
The formulation by Résimont and colleagues is implemented as-
CRediT authorship contribution statement
published in their paper [11] and available as open-source code. How-
ever, it fails during the optimization of districts with the forced plan-
Jerry Lambert: Methodology, Conceptualization, Software, Valida-
ning approach (i.e. all consumers have to be supplied). This is caused
tion, Visualization, Writing – original draft. Amedeo Ceruti: Methodol-
ogy, Conceptualization, Software, Validation, Writing – original draft. by the Equation 1 of the paper, where the supply of heat is defined as
Hartmut Spliethoff: Funding acquisition, Supervision, Project admin- out
𝑃̇ 𝑗,𝑑,𝑡 in
= 𝑃̇ 𝑗,𝑑,𝑡 − 𝑢𝑗,𝑑,𝑡 ⋅ 𝑝𝑗 ⋅ 𝑄̇ heat − 𝑄̇ loss ∀𝑗 ∈ 𝐸, 𝑑 ∈ 𝐷, 𝑡 ∈ 𝑇𝐷 (30)
𝑗,𝑑,𝑡 𝑗,𝑑,𝑡
istration, Writing – review & editing.
where 𝐸 is the set of edges, 𝐷 the set 𝑑 typical days, 𝑇𝐷 the set 𝑡
Declaration of competing interest ̇ the heat
of typical segments, 𝑝𝑗 ∈ [0, 1] the simultaneity factor, 𝑄𝑗,𝑑,𝑡
flow within a pipe 𝑗 at the time step 𝑑, 𝑡, and 𝑢𝑗,𝑑,𝑡 the binary variable
The authors declare that they have no known competing finan- that designates the usage of a given pipe direction at a specific time
cial interests or personal relationships that could have appeared to step. Since the usage of a pipe is uncoupled from its build-out, the
influence the work reported in this paper. formulation does not force a heat delivery. This is enforced by Eq. (14)
in the Résimont paper:
Data availability
𝑥 𝑗 ≥ 𝑚𝑗 ∀𝑗 ∈ 𝐸 (31)
The data and the code of this study are openly available at https://
doi.org/10.5281/zenodo.10354616. Moreover, topotherm is available where 𝑚𝑗 forces a build-out of a given pipe at edge 𝑗 if it equals 1. If a
as a GitHub repository at https://github.com/jylambert/topotherm. pipe build-out at all consumer edges is forced, these are not operated.
Investment and operation costs are minimized, forcing these pipes to
Acknowledgments not deliver any heat, since the heat losses are minimized this way.
The problem’s constraints are modified slightly to allow a forced
The authors thank Benedikt Schweiger for his valuable feedback and network expansion. A new set 𝐹 is defined to include a unidirectional
support. set of edges. The binary build-out (𝑥𝑗 ∀𝑗 ∈ 𝐹 ) and maximum installed
heat power flow (𝑃̇ 𝑗max ∀𝑗 ∈ 𝐹 ) decisions are defined unidirectionally
Appendix A. Comparison of investigated frameworks but the operation of these pipes is still bidirectional. To enforce those
changes, some problems constraints need to be adapted. Equation 8 of
The capabilities of the investigated formulations are collected in
the original paper is modified:
Table 2. DHmin does not support multiple time steps as defined in
this paper, since the authors implemented it as a robustness check of 𝑃̇ 𝑗max ≤ 𝑥𝑗 ⋅ 𝑄̇ lim
𝑗 ∀𝑗 ∈ 𝐹 (32)
the network instead of the operation of the network for a given time
period. Additionally, the code was updated for pyomo >= 6.0 and where 𝑄̇ lim
is a Big-M parameter. An additional Big-M constraint is
𝑗
pandas >= 2.0 but the model formulation itself was not modified. For added to enforce operation of a given pipe 𝑗 only when the decision
DHNx, the economic expansion could not be tested, despite it being variable is 1:
explicitly stated in the documentation.1 In the Résimont formulation, in
𝑃̇ 𝑗,𝑑,𝑡 ≤ 𝑢𝑗,𝑑,𝑡 ⋅ 𝑄̇ lim
𝑗 ∀𝑗 ∈ 𝐸, 𝑑 ∈ 𝐷, 𝑡 ∈ 𝑇𝐷 (33)
the forced expansion is included but had to be modified since it
failed to deliver heat (refer to Appendix B.1 for a detailed breakdown The installed thermal capacity of all pipes also needs to be con-
or consult the published pyomo model at https://doi.org/10.5281/ strained and redefined for the new set 𝐹 :
zenodo.10354616). Lastly, the authors could not successfully install
in
and run the open-source THERMOS DHN planning software locally for 𝑃̇ 𝑗,𝑑,𝑡 ≤ 𝑃̇ 𝑗max ∀𝑗 ∈ 𝐹 , 𝑑 ∈ 𝐷, 𝑡 ∈ 𝑇𝐷 (34a)
an appropriate one-to-one comparison of computational time needed to 𝑃̇ 𝑗in⋆ ,𝑑,𝑡 ≤ 𝑃̇ 𝑗max ⋆ ⋆
∀(𝑗, 𝑗 ) ∈ 𝐸 , 𝑑 ∈ 𝐷, 𝑡 ∈ 𝑇𝐷 (34b)
solve the various models. However, the published code includes geojson
files which THERMOS can import directly. where 𝐸⋆
is the set that links the edges in 𝐹 to their other direction in
𝐸. Lastly, the operation of a pipe in a single direction 𝑢𝑗,𝑑,𝑡 for a given
time step is defined:
1
A GitHub issue was posted and can be consulted: https://github.com/
oemof/DHNx/issues/135, last accessed on 11.12.2023. 𝑥𝑗 ≤ 𝑢𝑗,𝑑,𝑡 + 𝑢𝑗 ⋆ ,𝑑,𝑡 ∀(𝑗, 𝑗 ⋆ ) ∈ 𝐸 ⋆ , 𝑑 ∈ 𝐷, 𝑡 ∈ 𝑇𝐷 (35a)

9
J. Lambert et al. Energy 308 (2024) 132885

Table 3
Summary of the benchmarking results for DHmin, Réismont, and DHNx.
DHmin Résimont DHNx
STS Time in s Gap in % Objective in e Time in s Gap in % Objective in e Time in s Gap in % Objective in e
Benchmark 4 0.06 0.03 87606.98 0.04 0.31 87854.66 0.39 0.00 87585.27
Benchmark 84 1.06 0.74 841059.41 2.08 0.84 842733.95 10001.31 21.33 843529.37
Benchmark 164 12.89 0.99 1435697.98 6.56 0.98 1438090.68 10003.82 20.33 1450587.14
Benchmark 224 21.92 0.97 1850088.95 29.63 0.99 1854474.95 10002.59 19.34 1875117.88
Benchmark 304 85.43 0.99 2368564.93 57.31 0.92 2370969.10 10001.08 18.22 2396977.91
Benchmark 384 85.05 0.88 2872217.48 40.34 0.94 2876768.74 10001.99 16.41 2913624.52
Benchmark 464 180.3 0.95 3380656.22 256.66 0.89 3381735.47 10002.18 16.04 3423971.10
Benchmark 544 139.11 0.96 3866003.85 53.53 0.91 3867157.67 10006.39 15.58 3930642.81
Benchmark 624 202.51 0.99 4340625.94 63.63 0.87 4337779.53 10001.97 15.14 4422002.11
Benchmark 704 349.31 0.80 4804164.59 173.4 0.98 4814809.38 10002.45 14.12 4889171.04
Benchmark 784 424.29 0.94 5277457.85 186.75 0.98 5282888.79 10002.05 14.15 5408765.79
Benchmark 864 676.11 0.98 5750960.95 147.45 0.99 5755624.33 10001.92 15.91 6051355.41
Benchmark 944 1328.7 0.98 6219783.30 264.83 0.93 6225220.69 10003.86 17.00 6661419.93
Benchmark 1024 1479.64 0.98 6690004.07 310.72 0.98 6695237.78 10001.55 15.70 7085037.99
District 1 1.99 0.40 1510478.48 2.15 0.86 1517814.77 2026.26 1.00 1509008.57
District 2 1.34 0.98 2404890.11 1.84 0.97 2411916.68 121.18 0.99 2396430.97
District 3 5.20 0.83 2844814.53 5.25 0.33 2838186.64 10003.27 1.08 2834254.39
District 4 5.49 0.98 4097425.64 8.39 0.37 4076791.93 1636.92 0.98 4073489.07
District 5 57.80 0.96 9323417.74 32.29 0.78 9312229.87 10001.49 2.09 9300653.13
District 6 152.60 0.99 14844974.6 70.32 0.31 14747964.37 10001.96 1.84 14764216.90
District 7 102.23 0.90 20955854.6 52.93 0.91 20976407.14 10002.30 1.68 20885994.70
MTS Time in s Gap in % Objective in e Time in s Gap in % Objective in e Time in s Gap in % Objective in e
District 1 – – – 44.91 0.90 1533973.3 10000.78 1.08 1524527.58
District 2 – – – 44.85 0.80 2432465.59 1751.14 0.99 2417564.7
District 3 – – – 80.94 0.95 2886700.11 10001.68 1.10 2864981.04
District 4 – – – 123.96 0.40 4127116.12 10001.83 1.01 4119430.81
District 5 – – – 10000.35 1.99 9527710.42 10003.427 2.25 9393723.43
District 6 – – – 10000.32 23.40 16259437.88 10000.94 2.18 14945744.20
District 7 – – – 10000.39 6.72 22520356.47 10000.39 2.18 21178589.60

Table 4
Summary of the benchmarking results for topotherm_sts, topotherm_mts_easy, and topotherm_mts.
topotherm_sts topotherm_mts_easy topotherm_mts
STS Time in s Gap in % Objective in e Time in s Gap in % Objective in e Time in s Gap in % Objective in e
Benchmark 4 0.04 0.00 87585.26 0.06 0.80 87859.43 0.07 0.81 87889.75
Benchmark 84 1.54 0.58 840738.36 1.80 0.95 843869.74 5.49 0.83 839895.70
Benchmark 164 3.84 0.75 1435053.04 9.00 0.97 1438171.93 6.33 0.85 1435381.73
Benchmark 224 5.42 0.85 1852178.57 38.79 0.97 1854512.99 191.17 0.83 1852503.68
Benchmark 304 18.02 0.88 2370403.32 17.83 0.94 2371390.96 44.09 0.99 2375778.31
Benchmark 384 20.52 0.99 2879425.29 38.06 0.91 2876805.51 162.04 0.95 2877900.17
Benchmark 464 22.07 0.96 3384217.66 76.18 0.95 3383851.07 269.12 0.99 3389763.99
Benchmark 544 25.71 0.88 3866981.24 66.01 0.97 3870369.12 281.12 0.95 3872344.29
Benchmark 624 69.60 0.77 4334359.83 176.35 0.92 4341065.07 495.75 0.98 4340645.44
Benchmark 704 194.63 0.99 4817564.01 125.66 0.86 4809917.03 175.46 0.95 4807660.81
Benchmark 784 138.83 0.89 5280223.64 54.11 0.97 5283268.55 335.96 0.99 5281055.73
Benchmark 864 77.81 0.94 5755885.80 165.73 0.86 5750070.45 637.19 0.99 5757511.89
Benchmark 944 72.87 0.86 6223003.67 387.23 0.94 6224578.35 939.91 0.99 6231137.47
Benchmark 1024 111.28 0.98 6698321.89 510.68 0.97 6698138.00 1669.64 0.98 6707947.86
District 1 0.42 0.84 1514279.96 2.12 0.31 1510282.99 3.83 0.73 1516397.42
District 2 1.06 0.31 2396373.62 2.43 0.22 2398837.13 3.05 0.99 2414929.51
District 3 1.70 0.99 2859360.17 4.69 0.21 2834885.47 7.77 0.81 2854348.39
District 4 1.42 0.86 4095934.95 6.26 0.52 4081865.65 6.33 0.40 4080701.35
District 5 11.05 0.56 9287944.34 36.70 0.66 9310056.64 98.83 0.59 9299725.57
District 6 14.51 0.91 14839144.70 51.97 0.98 14848538.80 161.64 0.87 14829405.10
District 7 18.14 0.96 21005807.30 100.50 0.27 20862312.00 397.34 0.58 20921881.70
MTS Time in s Gap in % Objective in e Time in s Gap in % Objective in e Time in s Gap in % Objective in e
District 1 – – – 24.64 0.97 1532442.32 125.30 0.44 1530375.98
District 2 – – – 69.63 0.17 2417780.36 231.36 0.45 2425277.07
District 3 – – – 89.21 0.99 2884055.21 1271.89 0.04 2865538.52
District 4 – – – 124.81 0.65 4136559.10 809.97 0.14 4123181.21
District 5 – – – 1397.11 0.99 9393743.37 – – –
District 6 – – – 9270.64 0.47 14927130.60 – – –
District 7 – – – 10000.55 29.30 22564804.80 – – –

𝑥𝑗 ≥ 𝑢𝑗,𝑑,𝑡 ∀(𝑗, 𝑗 ⋆ ) ∈ 𝐹 , 𝑑 ∈ 𝐷, 𝑡 ∈ 𝑇𝐷 (35b) Appendix C. Benchmark detailed results


⋆ ⋆
𝑥𝑗 ≥ 𝑢𝑗 ⋆ ,𝑑,𝑡 ∀(𝑗, 𝑗 ) ∈ 𝐸 , 𝑑 ∈ 𝐷, 𝑡 ∈ 𝑇𝐷 (35c)
1 ≥ 𝑢𝑗 ⋆ ,𝑑,𝑡 + 𝑢𝑗,𝑑,𝑡 ⋆ ⋆
∀(𝑗, 𝑗 ) ∈ 𝐸 , 𝑑 ∈ 𝐷, 𝑡 ∈ 𝑇𝐷 (35d) In Tables 3 and 4, the detailed results (solving time, MIP-Gap, and
objective function value) of all performed optimization are shown. Fig-
ures of the resulting network topologies can be found at the repository

10
J. Lambert et al. Energy 308 (2024) 132885

Fig. 9. Evolution of the MIP-Gap for the one-producer benchmark cases.

https://doi.org/10.5281/zenodo.10354616. Tables 3 and 4 show still is able to find the same solution, this study is able to cross-validate
that all MILP formulations reach for each district respectively ap- the different considered formulations.
proximately the same objective function value. The differences are
due to slightly changing MIP-Gaps as the required gap is an upper Appendix D. Evolution of the MIP-Gap
bound. As the solver cannot always terminate with the exact MIP-Gap
requirement, it can run until a solution is found, which is significantly Figs. 9, 10, and 11 show the evolution of the MIP-Gap for every
better than the required MIP-Gap. As each MILP formulation differs but performed optimization in this work.

11
J. Lambert et al. Energy 308 (2024) 132885

Fig. 10. Evolution of the MIP-Gap for the seven real-world urban areas for a single time step.

12
J. Lambert et al. Energy 308 (2024) 132885

Fig. 11. Evolution of the MIP-Gap for the seven real-world urban areas for five time steps.

References [11] Résimont T, Louveaux Q, Dewallef P. Optimization tool for the strategic outline
and sizing of district heating networks using a geographic information system.
[1] Fleiter T, Elsland R, Rehfeldt M, Steinbach J, Reiter U, Catenazzi G, et al. Energies 2021;14(17):5575. http://dx.doi.org/10.3390/en14175575.
Profile of heating and cooling demand in 2015. 2017, http://dx.doi.org/10. [12] Chair of Renewable and Sustainable Energy Systems. GitHub - tum-ens/dhmin:
24406/publica-fhg-298970. Mathematical optimisation model for district energy distrubtion networks. 2023,
[2] Umwelt Bundesamt. Kohlendioxid-emissionen im bedarfsfeld wohnen. URL https://github.com/tum-ens/dhmin.
2023, URL https://www.umweltbundesamt.de/daten/private-haushalte- [13] Haaland SE. Simple and explicit formulas for the friction factor in turbulent pipe
konsum/wohnen/kohlendioxid-emissionen-im-bedarfsfeld-wohnen. flow. J Fluids Eng 1983;105(1):89–90. http://dx.doi.org/10.1115/1.3240948.
[3] Werner S. International review of district heating and cooling. Energy [14] Best I, Orozaliev J, Vajen K. Impact of different design guidelines on the total
2017;137:617–31. http://dx.doi.org/10.1016/j.energy.2017.04.045. distribution costs of 4th generation district heating networks. Energy Procedia
[4] Jodeiri AM, Goldsworthy MJ, Buffa S, Cozzini M. Role of sustainable heat 2018;149:151–60. http://dx.doi.org/10.1016/j.egypro.2018.08.179.
sources in transition towards fourth generation district heating — A review. [15] Virtanen P, Gommers R, Oliphant TE, Haberland M, Reddy T, Cournapeau D, et
Renew Sustain Energy Rev 2022;158:112156. http://dx.doi.org/10.1016/j.rser. al. SciPy 1.0: Fundamental algorithms for scientific computing in Python. Nature
2022.112156. methods 2020;17(3):261–72. http://dx.doi.org/10.1038/s41592-019-0686-2.
[5] Nussbaumer T, Thalmann S. Influence of system design on heat distribution [16] Blommaert M, Wack Y, Baelmans M. An adjoint optimization approach for the
costs in district heating. Energy 2016;101:496–505. http://dx.doi.org/10.1016/ topological design of large-scale district heating networks based on nonlinear
j.energy.2016.02.062. models. Appl Energy 2020;280:116025. http://dx.doi.org/10.1016/j.apenergy.
[6] Sporleder M, Rath M, Ragwitz M. Design optimization of district heating systems: 2020.116025.
A review. Front Energy Res 2022;10. http://dx.doi.org/10.3389/fenrg.2022. [17] Planungshandbuch fernwärme. Version 1.1 vom 21. September 2017 ed. Ittigen
971912. and Bern: EnergieSchweiz Bundesamt für Energie; 2017.
[7] Becker G, Klemm C, Vennemann P. Open source district heating modeling tools— [18] Söderman J. Optimisation of structure and operation of district cooling networks
A comparative study. Energies 2022;15(21):8277. http://dx.doi.org/10.3390/ in urban regions. Appl Therm Eng 2007;27(16):2665–76. http://dx.doi.org/10.
en15218277. 1016/j.applthermaleng.2007.05.004.
[8] THERMOS. Thermos. 2021, URL https://www.thermos-project.eu/home/. [19] Haikarainen C, Pettersson F, Saxén H. A model for structural and operational
[9] Röder J, Meyer B, Krien U, Zimmermann J, Stührmann T, Zondervan E. Optimal optimization of distributed energy systems. Appl Therm Eng 2014;70(1):211–8.
design of district heating networks with distributed thermal energy storages http://dx.doi.org/10.1016/j.applthermaleng.2014.04.049.
— Method and case study. Int J Sustain Energy Plan Manag 2021;31. http: [20] Bordin C, Gordini A, Vigo D. An optimization approach for district heating
//dx.doi.org/10.5278/IJSEPM.6248. strategic network design. European J Oper Res 2016;252(1):296–307. http://
[10] Wack Y, Serra S, Baelmans M, Reneaume J-M, Blommaert M. Nonlinear topology dx.doi.org/10.1016/j.ejor.2015.12.049.
optimization of district heating networks: A benchmark of a mixed-integer and [21] Morvaj B, Evins R, Carmeliet J. Optimising urban energy systems: Simulta-
a density-based approach. Energy 2023;278:127977. http://dx.doi.org/10.1016/ neous system sizing, operation and district heating network layout. Energy
j.energy.2023.127977. 2016;116:619–36. http://dx.doi.org/10.1016/j.energy.2016.09.139.

13
J. Lambert et al. Energy 308 (2024) 132885

[22] van der Heijde B, Fuchs M, Ribas Tugores C, Schweiger G, Sartor K, Basciotti D, [29] OpenData - kostenfreie geodaten der bayerischen vermessungsverwaltung
et al. Dynamic equation-based thermo-hydraulic pipe model for district heating - hausumringe. 2023, URL https://geodaten.bayern.de/opengeodata/
and cooling systems. Energy Convers Manage 2017;151:158–69. http://dx.doi. OpenDataDetail.html?pn=hausumringe.
org/10.1016/j.enconman.2017.08.072. [30] OpenData - kostenfreie geodaten der bayerischen vermessungsverwaltung- 3D-
[23] Lambert J, Spliethoff H. A nonlinear optimization method for expansion planning gebäudemodelle (LoD2). 2023, URL https://geodaten.bayern.de/opengeodata/
of district heating systems with graph preprocessing. In: Smith JR, editor. OpenDataDetail.html?pn=lod2.
36th international conference on efficiency, cost, optimization, simulation and [31] Gurobi Optimization LLC. Gurobi optimizer reference manual. 2023, URL https:
environmental impact of energy systems. Las Palmas De Gran Canaria, Spain: //www.gurobi.com.
ECOS 2023; 2023, p. 2649–60. http://dx.doi.org/10.52202/069564-0238. [32] Hunter JD. Matplotlib: A 2D graphics environment. Comput Sci Eng
[24] Hart WE, Watson J-P, Woodruff DL. Pyomo: Modeling and solving mathematical 2007;9(3):90–5. http://dx.doi.org/10.1109/MCSE.2007.55.
programs in Python. Math Program Comput 2011;3(3):219–60. http://dx.doi. [33] Hagberg AA, Schult DA, Swart PJ. Exploring network structure, dynamics,
org/10.1007/s12532-011-0026-8. and function using NetworkX. In: Varoquaux G, Vaught T, Millman J, editors.
[25] Bynum ML, Hackebeil GA, Hart WE, Laird CD, Nicholson BL, Siirola JD, Proceedings of the 7th Python in science conference. Pasadena, CA USA; 2008,
et al. Pyomo — Optimization modeling in Python, vol. 67. Cham: Springer p. 11–5.
International Publishing; 2021, http://dx.doi.org/10.1007/978-3-030-68928-5. [34] Miltenberger M, Oberdieck R, Siefen K, Aramon M, Bowly S. gurobi-logtools.
[26] Dorfner J, Hamacher T. Large-scale district heating network optimization. 2023, URL https://github.com/Gurobi/gurobi-logtools.
IEEE Trans Smart Grid 2014;5(4):1884–91. http://dx.doi.org/10.1109/TSG.2013. [35] European Commission and Joint Research Centre and Jakubcionis M, Kavva-
2295856. dias K, Moles C, Carlsson J, et al. Synthesis report on the evaluation of national
[27] Dorfner J, Krystallas P, Durst M, Massier T. District cooling network optimization notifications related to Article 14 of the Energy Efficiency Directive. Publications
with redundancy constraints in Singapore. Future Cities Environ 2017;3:1. http: Office; 2018, http://dx.doi.org/10.2760/368839.
//dx.doi.org/10.1186/s40984-016-0024-0. [36] AGFW. Wirtschaftlichkeit nach §§20 und 24 KWKG—Verfahren zur dar-
[28] Aardal K. Reformulation of capacitated facility location problems: How redun- legung der finanzierungslücke bei neu- und ausbau von wärme-/kältenetzen
dant information can help. Ann Oper Res 1998;82:289–308. http://dx.doi.org/ und wärme-/kältespeichern in deutschland. 2023, URL https://www.fw704.de/
10.1023/A:1018966804496. hauptmenue.
[37] Ruhnau O, Muessel J. When2Heat heating profiles. 2023, http://dx.doi.org/10.
25832/when2heat/2023-07-27.
[38] Lodi A, Tramontani A. Performance variability in mixed-integer programming.
In: Theory driven by influential applications. INFORMS; 2013, p. 1–12.

14

You might also like