Optimal Resilience Enhancement of Water Distribution Systems

: Water distribution systems (WDSs) as critical infrastructures are subject to demand peaks due to daily consumption ﬂuctuations, as well as long term changes in the demand pattern due to increased urbanization. Resilient design of water distribution systems is of high relevance to water suppliers. The challenging combinatorial problem of high-quality and, at the same time, low-cost water supply can be assisted by cost-beneﬁt optimization to enhance the resilience of existing main line WDSs, as shown in this paper. A Mixed Integer Linear Problem, based on a graph-theoretical resilience index, is implemented considering WDS topology. Utilizing parallel infrastructures, speciﬁcally those of the urban transport network and the water distribution network, makes allowances for physical constraints, in order to adjust the existing WDS and to enhance resilience. Therefore, decision-makers can be assisted in choosing the optimal adjustment of WDS depending on their investment budget. Furthermore, it can be observed that, for a speciﬁc urban structure, there is a convergence of resilience enhancement with higher costs. This cost-beneﬁt optimization is conducted for a real-world main line WDS, considering also the limitations of computational expenses.


Introduction
Fresh water is an essential resource, not only for human survival and well-being but also as crucial element in many sectors of the economy. Therefore, water distribution systems (WDSs) are critical infrastructures as they maintain multiple and vital societal functions, e.g., health, safety, security, economic and social well-being, characteristic of critical infrastructures as defined by the EU Council [1]. The increase in the world's population combined with ongoing urbanization makes the urban WDS an essential infrastructure with a future-oriented focus [2], even if its components are aging [3]. Future water demand is predicted to rise by 30% between the years 2000 and 2050 [4]. Therefore, WDS adaptations leading to system resilience, i.e., the capability to withstand and recover from disturbances [5], has been of particular interest. Hereby, water suppliers are faced with the challenge of achieving high-quality and, at the same time, low-cost water supply. This leads to the necessity of the herein conducted cost-benefit optimization for the enhancement of the resilience of existing WDSs.
The method presented in this work can be identified as predictive asset management [3] in which the WDS is assessed by its key performance indicator, i.e., demand fulfillment, within the proposed resilience metric. Instead of performing a risk estimation and optimizing the system based on its robustness when facing a specific failure scenario, as typical for established asset management methods, resilience is the focus here. To analyze system behavior and to assist decision makers, the cost, considering the proposed preventive action, can be varied. Furthermore, by classifying it as proactive

Materials and Methods
In this work a cost-benefit optimization of WDS resilience is implemented and conducted for a real-world main line WDS of a city district. Therefore, a Mixed Integer Linear Program is derived based on graph-theoretical resilience assessment considering the WDS topology introduced by Herrera et al. [12]. This resilience index considers both redundancy and robustness of the WDS. First, by considering all possible paths connecting demand and source nodes, the consequences of possible component failure or local contamination can be counteracted. Second, by ranking the paths by physical feasibility considering their hydraulic properties, the robustness of individual paths is accounted for. To do so, each path is assessed for its hydraulic resistance, computing the non-dimensional pressure loss of each edge making up the path, as derived by Lorenz et al. [13]. In the following, the method of assessing and optimizing the main line WDS resilience is described in detail. This method is applicable to any WDS while yielding the best results when considering a main line WDS. In this work it is applied to a real-world main line WDS of a German city district.

Resilience Assessment
To assess the resilience, the real-world WDS is presented as a planar graph in which the pipes are represented as edges connecting source and consumer nodes. The set of these nodes is given as S and C, respectively, as well as the set of junction nodes J, while the unified set is given as N. The demand of a specific consumer node c is given by q c , while the overall demand of the WDS is given by Q = c∈C q c . The set of existing edges is given in a binary matrix T 0 of size |N| × |N| in which an existing edge T 0 i,j connecting node i with node j is represented by 1 and all inexistent edges by 0. Since the direction of flow in a pipe is not fixed but depends on the actual pressure gradient, all edges are undirected. Therefore, the matrix describing the WDS is symmetric. Furthermore, there are no self-loops within the network, meaning there are no pipes starting and ending at the same node, and therefore its diagonal is strictly 0. Each edge has different characteristics, also presented in this matrix notation. Of interest for this work are the pipe diameters, lengths and roughness given in the matrices D, L, and a, respectively.
When considering the addition of pipes, the edges representing them must be noted in a similar way. To consider the physical feasibility of the addition of a pipe, the current urban structure is of great importance as pipes cannot be laid between all nodes. Different studies show, and legal standards command, that infrastructures are highly parallel [20,21]. In general, there is a high parallelism between supply infrastructures, i.e., the water, energy and information and communications technology, and the urban transportation network, i.e., streets and pathways. Therefore, the addition of pipes is restricted by the urban transportation network embedded in the present urban structure. Information on the urban transportation system is mostly open access data and can for example be extracted from OpenStreetMap [22]. With this data, the maximum possible edge matrix can be derived as T max which is equally of size |N| × |N| and symmetrical. The edge characteristics of the added pipes can be written into the same matrices D, L, and a. To assess the graph-theoretical resilience of the WDS, the overall resilience I GT is given as the sum of each consumer node's resilience, as defined by Herrera et al. [12]. To furthermore consider the demand and therefore the number of consumers depending on the demand fulfillment of a specific node, in this work it is proposed to weigh the resilience of each consumer node c by its relative water demand q c /Q.
This topology based resilience metric considers the hydraulic resistance r s,c,k of each k-shortest path feeding the consumer node c from source s. As high hydraulic resistance paths have little impact on the resilience index, a maximum number of shortest paths to be considered, K max , can be determined for the critical transfer node of the complete WDS, following the approach introduced by Lorenz et al. [13]. The weight of the edges making up the shortest paths is, despite what the name might suggest, not its length but the hydraulic resistance of the pipe connecting the two nodes under consideration. Each path k connecting source node s and consumer node c can be represented by a two dimensional binary matrix A s,c,k similar to the matrix T describing the network. In this matrix A s,c,k sequence of nodes, part of the path starting at the source s and ending at the consumer node c is stored. Edges which are part of this path connecting two subsequently following nodes making up the path, have the value 1 while all other edges are of value 0. In contrast to matrix T describing all pipes in a network, the matrix describing a specific path is not symmetrical, due to the direction of the path represented by the sequence of nodes connected by the edges making up the feeding path.
The physical considerations underlying the determination of the hydraulic resistance of each pipe is deduced by Lorenz et al. [13]. Applying an order of magnitude analysis, it was derived that in the case of a WDS turbulent flow in hydraulic rough pipes can be assumed. The hydraulic resistance r(s, c, k) of a path made up of pipes m ∈ M s,c,k represents the dimensionless pressure loss along this path and can be determined as follows.
Therefore, the pressure loss ∆p l along the path is related to the characteristic kinematic pressure given by the characteristic velocity u 0 as well as to the density of the fluid in the pipes ρ, herein water. In the case of turbulent flow in hydraulic rough pipes, the friction factor f (m) is given by Prandtl-Karman's law as f (m) = (2lg(D m /a m ) + 1.74) −2 [23]. The calculation of hydraulic resistance can also be rewritten in matrix notation, making use of the representation of each shortest path for every consumer and source node in the five-dimensional matrix A.

Resilience Optimization
The resilience index introduced can be applied to assess the resilience of any WDS for which the network topology, as well as the pipe diameter, length, and roughness and the demand of all consumer nodes, is known. Therefore, present and further adaptations to the present WDS can be assessed. Adapting the WDS by adding pipes results in alternative feeding paths of different hydraulic resistance for different consumer nodes. These alternative feeding paths therefore impact the overall resilience differently, also depending on the weight of the consumer node being fed. As the problem of determining which pipe is best to add for maximum resilience enhancement rises to become a challenging combinatorial problem, it is useful to apply mathematical optimization in order to solve it.
The problem can be formulated as a maximization problem, as the resilience index of the WDS is to be maximized. The objective function is therefore the maximization of the resilience index.

of 13
This objective function considers the reciprocal of the hydraulic resistance of each path feeding a consumer node. This leads to a nonlinear optimization problem with a concave solution space, which are in general computationally expensive to solve. The formulation to find the shortest path in a network by a discrete optimization problem can also be easily implemented [24]. Yet, in turn, finding the second, third and k-th shortest path is usually solved by heuristics, as for example by Yen's K-shortest paths algorithm [25]. This makes the formulation of all shortest paths A s,c,k connecting a source and consumer node as an optimization problem infeasible for a dynamic graph, to the best of the authors knowledge. Identification or knowledge of all the shortest paths, in turn, is necessary to determine the hydraulic resistance as defined by Equation (2).
Taking into consideration the constraints on physical feasibility of a pipe addition to an existing WDS given by the parallelism of infrastructures, the possible addition of pipes is highly restricted compared to when considering a complete graph, i.e., a graph in which every pair of nodes is connected by an edge. Therefore, the calculation of all feeding paths in the maximum possible WDS, for each consumer node fed by any source, considering that all physically feasible pipes are added, is practicable for smaller networks. When calculating all possible feeding paths in a preprocessing step, the optimization problem can be rewritten as where the hydraulic conductance g(s, c, k), i.e., the reciprocal of the hydraulic resistance, is already known for each path. The binary decision variable x(s, c, k) permits the choice of the best possible feeding paths as part of the adapted WDS, and thereby the pipes to be added to the existing WDS for a set maximum length added. Based on the linearized resilience optimization, taking into consideration only the single shortest path of each source-consumer node combination, conducted in [13], the resulting Mixed Integer Linear Program considering the K max -shortest paths is given in Equations (5)- (11). This optimization program relies on the following variables, sets and parameters, given in Tables 1-3. It is implemented in Python using the Gurobi solver [26]. For the preprocessing of the WDS, the python packages WNTR [27] in combination with NetworkX [28] are applied.
Set of the number of maximum possible paths, ∀ s ∈ S, c ∈ C.
As described in Table 1, two binary decision variables are introduced: on the one hand, choosing the pipes to be added to the existing WDS and therefore of similar form as the matrix describing the edges of the existing WDS, b i,j ; on the other hand, selecting the paths which are of the highest hydraulic conductance possible for the adapted WDS, x s,c,k . Table 3. Parameters of the optimization program.

Parameter Domain Description
Edges in the maximum possible WDS restricted by the urban structure, ∀ i, j ∈ N.
A s,c,k,i, j {0, 1} All possible feeding paths in the maximum possible WDS Hydraulic conductance of each feeding path determined in the preprocessing, ∀ s ∈ S, c ∈ C, k ∈ K s,c . q c R + 0 Demand of each consumer node, ∀ c ∈ C. K max N Maximum number of paths to be considered for the resilience assessment.
Maximum allowed length for the sum of all added pipes.
The unified node set N contains the source node set S as well as the consumer node set C and the junction node set J (see Table 2). Each possible path connecting source and consumer nodes is also given in the path set K s,c .
In addition to variables and sets, the optimization program relies on multiple parameters together with the sets which define the exact instance for an optimization, i.e., the unique optimization problem for which a specific optimization result can be achieved (see Table 3). There are several parameters specific to the present WDS and its urban structure but also one parameter specific to the cost-benefit analysis conducted by this optimization program. This is the maximum allowed length for the sum of all pipes added L max to determine the adapted WDS's enhanced resilience under consideration of a specific investment budget, which can be varied as any positive real number including zero R + 0 . For a set pipe diameter, the costs are assumed to be linearly dependent on the overall pipe length added, since they consist of material costs and construction costs, both approximately proportional to the length of the pipe. Therefore, the variation of this Parameter L max allows the determination of a Pareto front for the WDS's resilience under varying maximum overall pipe lengths added to the existing WDS. This is shown in detail in the Results, Section 3.
The remaining parameters of the optimization program are given by the existing WDS and the urban structure it is embedded in and are determined in the complex preprocessing of the optimization program. First, the main line WDS is determined from the existing overall WDS by making use of a cut-off criterion for the pipe diameter. This main line WDS is further processed by merging the demand of consumer nodes locally, i.e., q c , so that the overall demand is still true to the original WDS but the number of consumer nodes is reduced and therefore the computational expenses can be reduced in the subsequent optimization. For this main line WDS the edges are noted in the matrix T 0 . To determine the edges of the maximum possible WDS, OpenStreetMap data for the district containing the existing WDS are studied in combination with the existing WDS. By doing so all streets or pathways in which a pipe does not already lie are added as an edge to the existing WDS. This maximum possible WDS is represented by T max . For all possible additional edges, the important pipe characteristics, i.e., diameter, length and roughness, are chosen consistently to further diminish computational expenses. The length of the edges can be extracted from the OpenStreetMap data while diameter and roughness are chosen according to the typical pipe characteristics of newer pipes in the existing WDS. With this information, the hydraulic resistance of each edge in the maximum possible WDS can be determined.
Additionally, for this maximum possible WDS the critical transfer node and the maximum number of shortest paths to be considered in the resilience assessment of 1% accuracy K max can be determined. This limit of 1% accuracy can be adapted in the preprocessing. Subsequently, the K max -shortest paths for the existing WDS are heuristically identified, making use of Yen's K-shortest path algorithm. For the maximum possible WDS ideally all possible paths with less hydraulic resistance than the highest hydraulic resistance path should be determined, as all these paths can increase the WDS's resilience. Since this is computationally very expensive, a cut-off of b K max -shortest paths for the maximum possible WDS has to be identified. This number varies with the size of the maximum possible WDS given by its consumer nodes and with the number of edges. The undertaken cut-off of the number of shortest paths considered for further optimization leads to limitation of the possible solution space but makes the problem feasible. Therefore, global optimization is only ensured if the feeding paths' cut-off is worse than the already existing feeding paths. To further decrease computational expenses, this fact is made use of by cutting off the computation of any further feeding paths once the highest hydraulic resistance feeding path of the maximum possible WDS exceeds the highest hydraulic resistance feeding path of the existing WDS. To ensure that all K max -shortest paths of the existing WDS are considered in the optimization, the determined 2 K max -shortest paths for the maximum possible WDS are complemented by all computed paths of the existing WDS which are not already part of the 2 K max -shortest paths for the maximum possible WDS. The complemented K s,c -shortest paths for the maximum possible WDS is then used to calculate the conductance g s,c,k for each path.
Following, the optimization program, Equations (5)-(11) can be set up and solved. The objective is the maximization of resilience when a fixed length of overall pipe addition is allowed (Objective 5). The constraint linking the choice of pipes to be added to the existing WDS and therefore the shortest possible paths feeding a consumer node is given by Constraint 6. This constraint states that all edges making up a possible feeding path have to be part of either the existing WDS or have to be added to the WDS. The length of the sum of all added pipes is further restricted by twice the maximum length of the sum of all added pipes, as the undirected nature of the WDS allows for the addition of an edge connecting node i and j and vice versa (Constraint 7). This interrelation is stated in Constraint 8. Thoughts on the physical feasibility of the addition of pipes is given by Constraint 9, as pipes may only be added if they are part of the maximum possible WDS but not already part of the existing WDS. To pre-limit the pipes under consideration to be added to the existing WDS for a certain maximum cost of L max , all pipes longer than L max are directly eliminated from the set of pipes under consideration (Constraint 10). It is also ensured that only the best possible K max -shortest paths of the adapted WDS are considered for the resilience assessment of the adapted WDS (Constraint 11). max c∈C q c Q s∈S 1 K max k∈K s,c x s,c,k g s,c,k subject to A s,c,k,i, j x s,c,k ≤ T 0 As stated earlier, the global optimization of the solution highly depends on the computational capacities available in preliminary examination of the solution space during preprocessing, when determining the shortest paths of the maximum possible WDS. Therefore, the distinction between consumer nodes and junction nodes is of importance, as only nodes with a demand, i.e., consumer nodes, are considered in the customized resilience index introduced in Equation (1). Junction nodes do not have an external consumer, but only allow for flow to be distributed to the neighboring edges.
This optimization model assists decision-makers in how to adapt an existing main line WDS for optimal resilience improvement for a set investment budget, taking into consideration the physical feasibility of the solution. When calculated for different instances of the same WDS, but with different investment budgets in mind, a Pareto front for the cost-benefit analysis can be determined. This also allows for an analysis of the maximum achievable resilience for the present urban structure.

Results
The previously presented optimization model is applied to a real-world main line WDS of a German city district. First, the existing WDS data provided by a local water supplier is prepared as described in the preprocessing paragraph of Section 2.2. The resulting main line WDS is reduced to 120 nodes and 127 pipes with diameters ranging between 100 mm and 240 mm. The roughness of each pipe depends on its material and age and ranges between 0.5 mm and 1.5 mm while the added or replaced pipes are mostly made of polyethylene and have a roughness of 0.5 mm. From this number of nodes, there are 80 consumer nodes and one source node. The remaining nodes are junction nodes, which remained in the WDS to represent its topology and allow for the branching and intersection of pipes considering the current urban structure. In further preprocessing and optimization, only 80 consumer nodes have to be considered leading to decreased computational expenses for the shortest path determination and the optimization of the objective function.
The maximum possible WDS is determined in a further preprocessing step in which the existing main line WDS is matched with the urban transportation network retrieved from OpenStreetMap using the OSMnx python package [29]. This optimization model assists decision-makers in how to adapt an existing main line WDS for optimal resilience improvement for a set investment budget, taking into consideration the physical feasibility of the solution. When calculated for different instances of the same WDS, but with different investment budgets in mind, a Pareto front for the cost-benefit analysis can be determined. This also allows for an analysis of the maximum achievable resilience for the present urban structure.

Results
The previously presented optimization model is applied to a real-world main line WDS of a German city district. First, the existing WDS data provided by a local water supplier is prepared as described in the preprocessing paragraph of Section 2.2. The resulting main line WDS is reduced to 120 nodes and 127 pipes with diameters ranging between 100 mm and 240 mm. The roughness of each pipe depends on its material and age and ranges between 0.5 mm and 1.5 mm while the added or replaced pipes are mostly made of polyethylene and have a roughness of 0.5 mm. From this number of nodes, there are 80 consumer nodes and one source node. The remaining nodes are junction nodes, which remained in the WDS to represent its topology and allow for the branching and intersection of pipes considering the current urban structure. In further preprocessing and optimization, only 80 consumer nodes have to be considered leading to decreased computational expenses for the shortest path determination and the optimization of the objective function.
The maximum possible WDS is determined in a further preprocessing step in which the existing main line WDS is matched with the urban transportation network retrieved from OpenStreetMap using the OSMnx python package [29].  Considering the characteristic pipe roughness and diameters of the existing WDS, it is assumed that all WDS adaptations are equally performed with polyethylene pipes of roughness 0.5 mm. The pipe diameter of additional pipes is chosen as 100 mm since additional pipes which are too large lead to a significant decrease in the flow velocity due to the laws of flow continuity. This is undesired since too little flow velocities brings the risk of biological build up in stagnating water. To show the physical feasibility of the additional pipes, a rough assessment of the maximum pressure losses compared to the available pressure is conducted, as presented in previous work [13]. Herein, losses of double the maximum spanning width of the maximum possible WDS, as well as the smallest pipe Considering the characteristic pipe roughness and diameters of the existing WDS, it is assumed that all WDS adaptations are equally performed with polyethylene pipes of roughness 0.5 mm. The pipe diameter of additional pipes is chosen as 100 mm since additional pipes which are too large lead to a significant decrease in the flow velocity due to the laws of flow continuity. This is undesired since too little flow velocities brings the risk of biological build up in stagnating water. To show the physical feasibility of the additional pipes, a rough assessment of the maximum pressure losses compared to the available pressure is conducted, as presented in previous work [13]. Herein, losses of double the maximum spanning width of the maximum possible WDS, as well as the smallest pipe diameter of 100 mm, are considered. Thereby, the worst case scenario is covered. The order of magnitude analysis shows that this leads to roughly 3 bar pressure losses along this worst case scenario feeding path.
The available pressure head of 53 m minimum height difference between the source and the highest consumer node still allows for a 3 bar feeding pressure at the consumer node, which is within the common feeding pressure range for fresh water facilities.
A further step in the preprocessing is the determination of the shortest feeding paths for all consumer nodes in the existing and the maximum possible WDS. As proposed by Herrera et al. the resilience index doesn't change significantly for high resistance feeding paths [12]. Considering a 1% threshold for change in the resilience index for the critical transfer node in the maximum possible WDS, a critical number of feeding paths to be considered in the resilience assessment can be determined as K max = 24, following the proposed method in [13]. Therefore, the 24 shortest feeding paths of the existing WDS and, due to the limited computational capacities, the 48 shortest feeding paths in the maximum possible WDS are determined. The unified set of these paths, considering the same paths once only, then allows for the optimization of the resilience of the existing WDS considering different maximum overall added pipe lengths for different optimization instances.
In this work to conduct a cost-benefit analysis, the instances are given by the variation of L max = {0, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1250, 1500, 1750, 2000, 2500, 3000} m. The first instance of L max = 0 m determines the resilience of the existing WDS. Adaptations to the existing WDS depending on the respective instance are shown in Figure 2.
Water 2020, 12, x 9 of 13 diameter of 100 mm, are considered. Thereby, the worst case scenario is covered. The order of magnitude analysis shows that this leads to roughly 3 bar pressure losses along this worst case scenario feeding path. The available pressure head of 53 m minimum height difference between the source and the highest consumer node still allows for a 3 bar feeding pressure at the consumer node, which is within the common feeding pressure range for fresh water facilities. A further step in the preprocessing is the determination of the shortest feeding paths for all consumer nodes in the existing and the maximum possible WDS. As proposed by Herrera et al., the resilience index doesn't change significantly for high resistance feeding paths [12]. Considering a 1% threshold for change in the resilience index for the critical transfer node in the maximum possible WDS, a critical number of feeding paths to be considered in the resilience assessment can be determined as = 24, following the proposed method in [13]. Therefore, the 24 shortest feeding paths of the existing WDS and, due to the limited computational capacities, the 48 shortest feeding paths in the maximum possible WDS are determined. The unified set of these paths, considering the same paths once only, then allows for the optimization of the resilience of the existing WDS considering different maximum overall added pipe lengths for different optimization instances.
In this work to conduct a cost-benefit analysis, the instances are given by the variation of  Herein, the existing main line WDS is marked in blue while the edges chosen by the optimization to be added to the WDS are marked in yellow. The presented adaptations to the existing main line WDS show that the addition of pipes does not follow a strict sequence regarding which pipes to add first, but the location of the pipes to be added varies with the overall length allowed to be added to the existing WDS. Two different types of pipes added to the existing WDS can be identified. On the one hand, pipes are added to close outside loops. On the other hand, pipes are added close to the first branching of the existing WDS after the source. The sequence regarding which kind of pipes will be Herein, the existing main line WDS is marked in blue while the edges chosen by the optimization to be added to the WDS are marked in yellow. The presented adaptations to the existing main line WDS show that the addition of pipes does not follow a strict sequence regarding which pipes to add first, but the location of the pipes to be added varies with the overall length allowed to be added to the existing WDS. Two different types of pipes added to the existing WDS can be identified. On the one hand, pipes are added to close outside loops. On the other hand, pipes are added close to the first branching of the existing WDS after the source. The sequence regarding which kind of pipes will be added does not seem to follow a strict pattern but is individual to each instance. It can be observed that pipes added close to the first branching of the existing WDS do not seem to be discarded once the critical overall pipe length allowed is reached, so they can be added to the WDS. However, pipes closing outer loops in the existing WDS switch depending on the overall pipe length allowed to be added, and the already realized refinement of the area close to the first branching.
Regarding the resilience enhancement of the different instances, a Pareto front of the optimal relative resilience enhancement for the allowed overall pipe length added to the existing WDS can be mapped for the computed instances ( Figure 3). This represents a cost-benefit analysis of the resilience enhancement for the currently existing WDS embedded in its urban structure, reflected upon by determining the maximum possible WDS. The relative resilience enhancement is determined as I GT,rel (L max ) = [I GT (L max ) − I GT (0)]/I GT (0). The results of these instances show a steady resilience enhancement for longer overall pipe lengths added. For the present WDS and the urban structure it is embedded in, the close to linear resilience enhancement is limited to 130%. The maximum resilience enhancement seems to converge at 180%. Even though the number of pipes and the overall pipe length added to the existing WDS continues to increase, resilience stagnates. This seems to represent a behavior of diminishing returns and, even more so, of resilience saturation.
Water 2020, 12, x 10 of 13 added does not seem to follow a strict pattern but is individual to each instance. It can be observed that pipes added close to the first branching of the existing WDS do not seem to be discarded once the critical overall pipe length allowed is reached, so they can be added to the WDS. However, pipes closing outer loops in the existing WDS switch depending on the overall pipe length allowed to be added, and the already realized refinement of the area close to the first branching.
Regarding the resilience enhancement of the different instances, a Pareto front of the optimal relative resilience enhancement for the allowed overall pipe length added to the existing WDS can be mapped for the computed instances ( Figure 3). This represents a cost-benefit analysis of the resilience enhancement for the currently existing WDS embedded in its urban structure, reflected upon by determining the maximum possible WDS. The relative resilience enhancement is determined as The results of these instances show a steady resilience enhancement for longer overall pipe lengths added. For the present WDS and the urban structure it is embedded in, the close to linear resilience enhancement is limited to 130% . The maximum resilience enhancement seems to converge at 180%. Even though the number of pipes and the overall pipe length added to the existing WDS continues to increase, resilience stagnates. This seems to represent a behavior of diminishing returns and, even more so, of resilience saturation. The implemented optimization model meets the challenging problem of which pipes to add for an optimal resilience enhancement of the existing main line WDS. The results give a clear indication of which pipes should be added considering the investment budget proportional to .

Discussion
The results of the cost-benefit optimization for an existing WDS leading towards enhanced resilience show that the challenging combinatorial problem cannot be solved intuitively. Interestingly, the resulting adapted main line WDS is not a result of the addition of more pipes to the previous optimum but depends on the overall pipe length allowed to be added to the existing WDS. The pipes chosen to be added can be completely different pipes, as can be noted for = 200 m or = 500 m in Figure 3a,b, respectively. In the case of less overall pipe length added, the closing of an outside loop seems to influence resilience more than adding an edge close to the first branching of the WDS. In turn, for a larger overall pipe length added, this outside loop is discarded and instead, branching close to the first branching is intensified, therefore leading to more low resistance alternative feeding paths. Similarly, this phenomenon can be observed for the different kinds of adapted WDS for = 1000 m and = 1750 m in Figure 3c,d, respectively. In general, pipes added close to the first branching of the existing WDS leading to a refinement and higher meshedness The implemented optimization model meets the challenging problem of which pipes to add for an optimal resilience enhancement of the existing main line WDS. The results give a clear indication of which pipes should be added considering the investment budget proportional to L max .

Discussion
The results of the cost-benefit optimization for an existing WDS leading towards enhanced resilience show that the challenging combinatorial problem cannot be solved intuitively. Interestingly, the resulting adapted main line WDS is not a result of the addition of more pipes to the previous optimum but depends on the overall pipe length allowed to be added to the existing WDS. The pipes chosen to be added can be completely different pipes, as can be noted for L max = 200 m or L max = 500 m in Figure 2a,b, respectively. In the case of less overall pipe length added, the closing of an outside loop seems to influence resilience more than adding an edge close to the first branching of the WDS. In turn, for a larger overall pipe length added, this outside loop is discarded and instead, branching close to the first branching is intensified, therefore leading to more low resistance alternative feeding paths. Similarly, this phenomenon can be observed for the different kinds of adapted WDS for L max = 1000 m and L max = 1750 m in Figure 2c,d, respectively. In general, pipes added close to the first branching of the existing WDS leading to a refinement and higher meshedness of this area are more likely to remain the same for the increasing instance of L max . However, pipes closing outer loops in the existing WDS switch depending on the overall pipe length allowed to be added and the already realized refinement of the area close to the first branching. Therefore, these pipes can be interpreted as a possibility for fine tuning of optimal resilience improvement, while pipes meshing the area of the first branching seem to have a significant influence on the overall resilience of the WDS. The latter observation is in accordance with the observations made by a brute force resilience adaptation study previously conducted by the authors [13].
The edges identified to add to the existing main line WDS by the optimization most likely already have pipes underlying the urban transportation structure, as most possible additional edges are along inhabited streets. Therefore, it can be useful to replace existing pipes with pipes of higher diameter. Thereby the resistance of the overall WDS is reduced and its feasibility is inherently given.
The conducted cost-benefit analysis for these instances, and the optimal relative resilience enhancement, show a clear convergence towards maximum possible resilience improvement, regardless of the allowed overall pipe length added to adapt the existing WDS. The results of pipe addition for different instances shows that, even for the highest overall allowed added length, not all possible pipes are added, but the stagnation of resilience improvement starts even for shorter overall allowed pipe lengths added. This indicates a limiting function of the urban structure for resilience enhancement. The discovered limit of resilience enhancement of WDS for the present urban structure leads to the further research question of how different urban structures compare considering their maximum possible resilience.
In conclusion, the developed optimization program and the conducted cost-benefit analysis of the addition of pipes to an existing main line WDS in order to improve its resilience has proven to be a potent tool. On the one hand, decision-makers such as water suppliers or governmental institutions are assisted when seeking to increase the resilience of the critical infrastructure for fresh water supply. The results show that the adaptation of the WDS towards optimal resilience enhancement for a given investment budget, proportional to the maximum overall added pipe length, is neither intuitive nor the result of a strict sequence of which pipes should be added first. The respective resilience enhancement aimed at by decision-makers can also be achieved by analyzing a coarse Pareto front and then deriving the respective maximum length added to the existing main line WDS. Furthermore, the observed limit of resilience improvement depending on the present urban structure shows that there exists a threshold of investment cost for which the resilience is further improved. On the other hand, the presented tool can additionally be applied for further urban structure analysis leading to maximum resilience of a WDS. This tool allows us to analyze as well as to assess the potential for resilience enhancement of a given WDS while focusing on physical feasibility within the present urban structure.