## Abstract

Dividing a water distribution network (WDN) into district metered areas (DMAs) is the first vital step towards pressure management and real losses reduction. However, other factors of water quality such as the water age must be taken into account while forming DMAs. The current study uses genetic algorithm (GA) optimization methods to achieve the desired WDN segmentation conditions in terms of: (a) reducing the operating pressure, thus reducing the system's real losses; and (b) reducing the water age, thus improving the feeling of water freshness and preventing growth of disinfection byproducts. Techniques based on GA are a proven way to provide a very good solution to optimization problems. The solution is obtained using an objective function and setting boundary constraints. The formation of the objective functions is tested through Matlab's optimization toolbox. The logic of the objective functions' formulation for both the operating pressure and the water age optimization is recorded and analyzed. The method's application utilized a sample network model assisted by EPANET and Bentley's WaterGEMS software tools. The morphology of the DMAs is presented for each scenario, as well as the results of the network's segmentation according to the operating pressure and the water age.

## INTRODUCTION

During the last decades, one of the main concerns of water utility managers has been the minimization of real water loss rates which often exceed 30% or even 40% of the system input volume (SIV). Nowadays, the problem of water losses in water distribution networks (WDNs) and their reduction, is gaining more attention, which is attributed to the shift in focus to water consumption sustainability and environmental protection. It is a subject of considerable media and political visibility, mainly during periods of water resource scarcity, or in fast growth areas where water supply is not sufficient (Araujo *et al.* 2006). Particularly, in Greece, it is quite common for a water utility to ‘lose’ more than 50% of its network's SIV due to real water losses. Thus, most of these water utilities are focused on implementing pressure management (PM) policies to reduce bursts and leak rates occurring in their WDNs. PM has additional benefits, such as water demand control and asset management (Kanakoudis & Gonelas 2014). To implement an efficient PM, WDNs have to be divided into district metered areas (DMAs). DMAs are smaller parts of the network and their formation aims at its more accurate management and better inspection. Formation of the DMAs' boundaries has greater significance when other PM measures are considered too, such as the installation of pressure reducing valves. The introduction of the DMAs' concept in WDNs dates back to the 1980s, when it was first proposed in the UK, aiming at leakage reduction (WAA 1980; Savić & Ferrari 2014). Although several best practices of DMAs' implementation have been recorded all around the world in different WDNs (Charalambous 2005; MacDonald & Yates 2005; Rogers 2005; Kanakoudis & Gonelas 2016), it is not an easy task to perform. Forming DMAs can be very challenging, especially in large networks where numerous variables exist. A great deal of research effort (Giustolisi *et al.* 2015; Laucelli *et al.* 2016) has been shifted to gradually more advanced methods for optimal performance of WDNs.

To optimally divide a network into DMAs, many parameters need to be considered, and as well, a plethora of scenarios need to be tested. Water demand allocation and network pressure constraints along with water quality and fire requirement constraints, are some of the main factors of the optimization problem's complexity. One of the most important factors while forming DMAs though is the ‘water age’, which is a function primarily of the system's water demand, operation and the network's topology (US EPA 2004). The average retention of the water in a network has been measured at 1.3 days, while the maximum is 3.0 days, according to the results of a survey involving over 800 water supply networks in the USA (AWWA & AWWARF 1992). Water quality problems related to increased water age are: chemical issues (e.g., disinfection byproduct formation, corrosion control effectiveness, disinfectant decay), biological issues (e.g., nitrification, microbial re-growth, disinfection byproducts biodegradation), and physical issues (e.g., temperature increases, sediment deposition, color) (AWWA & AWWARF 1992; Shamsaei *et al.* 2013). The main way to prevent water aging in a WDN is to install appropriate isolation valves, thereby avoiding multiple network endpoints (dead-ends) and forming shorter routes for the water to reach the final consumers.

To obtain an optimal solution, an appropriate/effective optimization approach should be applied (Alvisi & Franchini 2014). Among various optimization alternatives, genetic algorithms (GAs) have been used for a wide variety of problems, especially regarding water network optimization (Abuiziah & Shakarneh 2013), such as optimizing the diameter of the pipes (Jung & Karney 2004) or pumps' characteristics (Abkenar *et al.* 2015). The inter-connection of Matlab and EPANET software packages unfolds numerous possibilities and helps take the study of WDNs to another level of complexity, providing fast and well-aimed solutions to optimization problems (Eliades *et al.* 2014).

In the current study, two software tools were used: (a) EPANET, to control and inspect the case study network's hydraulic model; and (b) Matlab, to develop the optimization algorithm and its optimization toolbox/toolkit. With those two tools, several solutions were derived (in the hydraulic model), resulting in optimal segmentation of the case study WDN in DMAs' closing isolation valves. Applying the first segmentation method based on the optimization of the operating pressure, a significant reduction of both the water losses and the non-revenue water (NRW) levels was achieved through three different operating scenarios (number of closed pipes ranging from 7 to 9) (Korkana *et al.* 2016). In the second method of the WDN segmentation, the optimization was focused on the reduction of the time the water remained inside the network pipes (water age), towards a ‘fresher’ and more ‘hygienic’ network. For the second method, two discrete objective functions were deployed (during the optimization runs/loops) in order to define the best formation of DMAs in the WDN. The scenarios being studied regarding the water age reduction involved combinations of four to ten isolation valves in pipes of the hydraulic model. The operating pressure and water age algorithms used, the case study network, the results and the discussions that arose, are presented below.

## METHODS

### The case study WDN

The case study network (Korkana *et al.* 2016) consists of one reservoir, two boosters providing the required operating pressure, and a tank for water storage (Figure 1). Although the size and complexity of this WDN is not significant, the network can be considered to resemble a real case WDN of a small town. The network is originated from Bentley's lessons library and is a verified and calibrated example of a real water distribution system. Both EPANET and Bentley's WaterGEMS software tools were used for both the hydraulic and the water quality analyses. Two variable water demand patterns (residential and commercial) were considered over a 24-hour (daily) period using a hydraulic time step of 1 hour. Hydraulic and water quality analyses were both performed for 7 consecutive days of the network's operation (simulated week). The model in EPANET does not consider pressure-dependent demands. The volume of water losses depends on the pressure, which when reduced leads to a reduction in leakages.

### Forming the operating pressure objective function

*i*is a custom node of the network; is the water demand [lt/sec] in node

*i*for each time step

*t*; is the pressure [KPa] in the node

*i*for each time step

*t*; is the minimum defined operating pressure [kPa];

*D*/Σ

_{i,t}*D*represents the weighting factor of the water demand in each node.

The first step of the optimization process setup was to develop an algorithm that links EPANET and Matlab software tools, collects all the data needed and performs calculations. The algorithm should be able to simulate the hydraulic operation of the network and collect the values of nodal water demands and pressures. Considering the specific boundary constraint of a minimum nodal pressure at 200 kPa (imposed by the Greek legislation), the algorithm computes Equation (1). It is important to note that the tool only works if the user defines the number of closed pipes (this number of pipes is directly relevant to the position and number of isolation valves that will mark the DMA's borders).

### Forming the water age objective function

*z*) (presented below in Equations (3) and (4)) over a simulation period (1 week) of the WDN continuous operation. The 24-hour (from

*t*= 0 to

*t*= 24) results were omitted (time the system needed to reach its ‘balance’) as the initial values of the WDN affected the outputs of the model, which had to become balanced during the continuous operation of the hydraulic model over a longer period of time. Thus, the remaining simulation period (i.e., 6 days or

*t*= 25–168) was the actual time frame to define the optimal water routing in order for the water retention time to be minimized. As already stated, the operating pressure at any node of the WDN should be kept above the Greek legislation threshold (2):

Based on the aforementioned minimum pressure restriction (Equation (2)), the number of the alternative solutions was limited. The run time for each optimization scenario ranged from 5 to 12 hours.

## RESULTS AND DISCUSSION

### Forming DMAs considering the operating pressure as the critical design parameter

Using the specific case study network mentioned above, where the operating pressure was considered as the crucial parameter, the DMAs' formation process (GA-based optimization) resulted in significantly reduced water losses and NRW levels. Three different operating scenarios were checked where the number of closed pipes ranged from 7 to 9. The range of numbers of closed pipes was selected to be consistent with previous research (Korkana *et al.* 2016) and fitting based on the size and properties of the network. The method is universal, it can be applied to any network and any number of scenarios and combinations of pipes can be tested. For Scenario No. 1 (7 closed pipes), the algorithm pinpointed the following pipes to be closed installing isolation valves: Ρ-139, Ρ-258, Ρ-35, Ρ-249, Ρ-146, Ρ-149, and Ρ-234. A reduction of 25.07% was achieved for the objective function (Equation (1)) compared to the base scenario (no isolation valves installed, no DMAs formed) (Korkana *et al.* 2016). The entire process resulted in four DMAs being formed (Figure 2(a)).

For Scenario No. 2 (8 closed pipes), the algorithm was not able to provide a solution where the objective function would be further reduced compared to Scenario No. 1. The process resulted in five DMAs being formed (Figure 2(b)). There were several runs of the GA tool. Each attempt resulted in one of three different groups of 8 closed pipes (Figure 2(c)). There are some common pipes in the three groups, implying that there is some relevance to the DMAs' formation. However, there is a slight difference regarding the reduction of the objective function (Table 1). Thus, the first group of 8 closed pipes was chosen as the better option for this scenario. One more time a reduction of 25.07% was achieved for the objective function (Equation (1)) compared to the network without any isolation valves.

Runs and closed pipe combinations | Objective function reduction |
---|---|

First run pipes: Ρ-151, Ρ-249, Ρ-263, Ρ-146, Ρ-212, Ρ-143, Ρ-240, Ρ-35 | 25.07% |

Second run pipes: Ρ-222, Ρ-256, Ρ-146, Ρ-134, Ρ-258, Ρ-236, Ρ-249, Ρ-35 | 24.88% |

Third run pipes: Ρ-254, Ρ-240, Ρ-35, Ρ-262, Ρ-249, Ρ-146, Ρ-227, Ρ-134 | 24.89% |

Runs and closed pipe combinations | Objective function reduction |
---|---|

First run pipes: Ρ-151, Ρ-249, Ρ-263, Ρ-146, Ρ-212, Ρ-143, Ρ-240, Ρ-35 | 25.07% |

Second run pipes: Ρ-222, Ρ-256, Ρ-146, Ρ-134, Ρ-258, Ρ-236, Ρ-249, Ρ-35 | 24.88% |

Third run pipes: Ρ-254, Ρ-240, Ρ-35, Ρ-262, Ρ-249, Ρ-146, Ρ-227, Ρ-134 | 24.89% |

For Scenario No. 3 (9 closed pipes), the optimization tool pinpointed the following pipes to be closed installing isolation valves: Ρ-225, Ρ-262, Ρ-130, Ρ-146, Ρ-35, Ρ-46, Ρ-93, Ρ-249, and Ρ-148. This selection led to a reduction of 24.89% of the objective function and the formation of five DMAs (Figure 2(d)). It should be noted that, despite the different selection of closed pipes between scenario Nos 2 and 3, the resulting five DMAs formed in both scenarios have only slight differences (just in two points of the network, as can be seen in Figure 2(b) and 2(d)).

### Forming DMAs considering the water age as the critical design parameter

Following the development of the objective functions (Equations (1)–(3)) and the problem's main constraint (i.e., operating pressure >200 kPa), the network's model was tested for various scenarios. These scenarios included installing isolation valves in groups of 4 up to 10 pipes resulting thus in different DMAs' formations. Figure 3 presents the highest water age values observed for each scenario (number of closed pipes) tested. The ‘oldest’ water age ranges from 28.93 to 46.10 hours, while the number of DMAs ranges from three to five. The highest water age value (at a certain time step) is met in the ‘5 closed pipes scenario’, which means that the number of closed pipes does not directly affect the age of the water inside the network. The latter depends more on the location of the closed pipes and the number of the DMAs formed, rather than on the actual number of the pipes being closed.

Figure 4 presents the results for both the average (nodal) and the cumulative water age values (in all network nodes) for each scenario tested (4 to 10 pipes closed). The average water age in the network ranges between 15.07 and 15.70 hours, while the highest value is observed during the ‘9 closed pipes’ scenario (Figure 4) in which five DMAs are formed. On the other hand, in the ‘7 closed pipes’ scenario, in which just three DMAs are formed, the water is the most ‘fresh’ (average water age 15.07 hours). Figure 5 presents the DMAs' boundaries for the first six scenarios tested (4 to 9 closed pipes).

The optimization of the objective function (3) led to results which disconnected the tank from the rest of the network so that it no longer supplied the system with ‘older’ water. The optimization of the objective function (4) instead, did not isolate the tank. The boundaries of the DMAs (Figure 5) were formed based on the optimization of the objective function (4). There are pipes which, when closed, do not form hydraulically isolated areas (DMAs). The algorithm selects the optimal locations for the isolation valves to be installed in order for the water to remain as fresh as possible (reduced water age).

### Comparing the two methods

The size of the DMAs formed was examined regarding the number of nodes in each DMA as a percentage of the total number of the network nodes (Figure 6). These values were calculated for both objective functions of the water quality optimization scenarios and, additionally, for the network's operation pressure optimization scenario. The results showed that DMAs A and B remain of the same size during the different water quality scenarios (they number 13% and 12% of the system's nodes, respectively). Regarding the optimal operating pressure scenario, the size of DMA A increases, including 42% of the system's nodes. DMA C usually includes around 25% of the system's nodes, while during the ‘5 pipes closed’ and ‘7 pipes closed’ scenarios, it expands to the rest of the network, thus including 75% of its nodes. DMA D consists of 20–28% of the system's nodes in the various scenarios. When the ‘6 pipes closed’ scenario is applied, its size increases to include 41% of the system's nodes. DMA D is not being formed at all in the ‘4, 5, and 7 closed pipes’ scenarios. Its size reaches 41% and 50% of the system's nodes when the ‘6 pipes closed’ and ‘4 pipes closed’ scenarios are being applied respectively. Regarding the other three scenarios, DMA D consists of 24–29% of the system's nodes. Finally, DMA D' is not being formed at all in the ‘5 and 7 closed pipes’ scenarios as well as in the operating pressure optimization scenario (Scenario No. 8). No conclusion can be reached regarding the size and the location of the DMAs, except that their morphology has no significant difference among the operating pressure and the water age optimization scenarios.

Figure 7 compares the mean water age in the model nodes within the 72 hours period for all ‘closed pipes’ scenarios and both the ‘water age’ objective functions (minimum sum vs. minimum all water age). The results showed that the mean water age is 5.59–38.93% lower in the second optimization process. Thus, the objective function (3) results in smaller mean water age but also reduces the extreme of water age growth. The objective function (4) is more appropriate to reduce the average age of the water in the network which results in the desired water ‘freshness’ level.

Figure 8 compares the water age reduction for the ‘8 pipes closed’ scenario in terms of the mean water age at the nodes after 72 hours of the network's operation period. The figure presents the mean water age result using: (a) the objective function (3), (b) the objective function (4), and (c) the network's operating pressure optimization. The highest value (9.48 hours) of the mean water age at the 72nd hour occurs when the operating pressure optimization scenario takes place. Using the objective function (3), i.e., shortening the water age maximum extreme, the mean water age value decreases to 9.12 hours. The mean water age takes its lower value during the optimization of the objective function (4). Therefore, it can be safely concluded that the optimization of the objective function (4) must be applied to achieve the maximum water age reduction throughout the network.

Figure 9 presents the average of the minimum values of pressure (*P _{min}*) when the water age optimization scenarios (4 to 10 pipes closed) and the operating pressure optimization (8 pipes closed) are being applied. The lowest

*P*value (704 kPa) occurs during the ‘operating pressure’ scenario. Regarding the water age optimization scenarios, the mean value of

_{min}*P*ranges between 754 and 717 kPa, with the smaller values appearing for the ‘9 and 10 closed pipes’ scenarios.

_{min}## CONCLUSIONS

PM provides significant upgrades to WDNs. The first step towards a PM implementation policy is to form DMAs, which is often a challenging problem to tackle. During the last 15 years, many solutions have been proposed by researchers and utility operators/managers. Searching for the optimal solution though can be a difficult and time demanding task. The present paper presented a novel method, where GAs are used through EPANET and Matlab software tools to offer the optimal DMAs' formation in a case study WDN. The GA optimization tool combined with an accurate developed objective function was able to result in an optimal formation of DMAs in a case study WDN. Three scenarios were checked to determine the optimal number of closed pipes. Such a problem differs from one network to another due to the plethora of variable network characteristics. The advantage of using GA as an optimization method is that it can be universally applied to any network regardless of its size.

Two objective functions for DMAs' formation were developed considering the quality of the water and in particular the water age. The lowest possible water age is considered (as a threshold set) to avoid disinfection byproducts' growth, which is the most important goal a water utility manager has to achieve. The use of GA optimized the solution of the problem for all scenarios tested. It can be considered as the first step to form DMAs using the quality (i.e., freshness) of the water as the design criterion. Furthermore, the research towards integrating both hydraulic and qualitative water network characteristics into a unique combined optimization problem can be considered a significant goal to be further studied in the near future, as it would allow the development of rules that can apply to any WDN. The comparison of the two methods' results revealed that the optimization of the average water age reduction should be preferred rather than the reduction of extremes. Until the development of a new algorithm that will incorporate optimizations of both water age and operating pressure, the two distinct algorithms should be applied in parallel along with the water utility manager's experience regarding the selection of the optimal water routing. In conclusion, DMAs' formation is strongly suggested to optimally reduce the water age, thus keeping the water as ‘fresh’ as possible in a WDN.

## REFERENCES

*Proceedings of the IWA Specialized Conference Leakage*

*Proceedings of the IWA Specialized Conference Leakage*

Proceedings of the IWA Specialized Conference Leakage