An Improved DeNSE Methodology for Optimal Sectorization of Water Distribution Networks

: Sectorization of a water distribution network (WDN) into district meter areas (DMAs) is considered a key strategy for an efficient management of WDNs. Typically, it involves a two-stage procedure: a clustering stage, in which the division of the WDN into clusters is performed, and a dividing stage, which involves the placement of valves and flow meters on the cluster’s boundary pipes to define the DMAs. While recently published methods attempt to enhance both the clustering and dividing stages, they fail to provide decision-making flexibility. They also neglect to consider the presence of existing valves in the WDN, which can significantly affect the evaluated implementation cost, often considered the primary decision-driving factor. This paper presents improvements to the previously introduced DeNSE method for sectorization of WDNs, aiming to address these deficiencies. The methodology consists of a clustering stage, based on the network uniformity index, and a dividing stage, in which the originally used heuristic procedure is replaced with Genetic Algorithm (GA) optimization, minimizing implementation cost. Consideration of existing valves in WDN and criteria for water supply security are also included in the dividing stage to offer a better estimate of implementation costs and post-sectorized operational efficiency of the WDN. Finally, GIS visualization is implemented, and a hydraulic model of the sectorized WDN (EPANET file) is generated, providing practitioners with valuable insights and decision-making flexibility. The methodology is tested on a part of the Amsterdam WDN in the Netherlands, serving as a pilot for methodology evaluation. A range of feasible sectorization solutions is generated and compared based on implementation cost and three performance indicators (PIs). The paper provides an in-depth discussion on the selection of preferable sectorization solution. The reported results demonstrate the method’s efficiency in optimizing sectorization solutions with minimum implementation cost whilst preserving the WDN operational efficiency and meeting the local design criteria.


Introduction
Sectorization of a water distribution network (WDN) into district meter areas (DMAs) is proven to be a key strategy for an efficient management of WDNs.The concept, introduced in the late 1980s in the United Kingdom, allows for (1) simplified leak and water-loss detection, (2) more efficient management of network pressure, (3) better control of flows to improve water balance, and (4) more efficient control of contaminant spread [1].A DMA is a distinct hydraulic area of the WDN, separated from the rest of the supply system by isolation valves and one or more metered inlets and outlets [2].Changes introduced in the network topology by partitioning the WDN can yield a range of drawbacks regarding reliability of the water supply and water quality.The closure of pipes reduces pipe redundancy in the network, which negatively impacts network resilience, and the reduction of available flow-paths could negatively impact water quality [3].However, most researchers agree that the benefits gained with WDN sectorization outweigh the associated potential drawbacks [1].
The complexity of the WDN implies that redesigning to include the DMAs will pose a challenging task.Historically, sectorization of the WDN into DMAs has been governed by general criteria of manageable-sized DMAs in terms of number of connections, links, or network length.This set of criteria is provided by a series of guidelines offered by the literature and different regulatory authorities [4][5][6][7].Sectorization solutions are commonly derived through a "trial and error" approach carried out by a local expert knowledgeable about the specifics of the water distribution network.This approach is illustrated in Grayman et al. [8], where two large case study networks underwent a redesign to incorporate DMA designs as per guidelines outlined in Baker [9].The need for the analysis of alternative sectorization solutions, in order to reduce subjectivity in the sectorization process, was recognized early [10].Today, many algorithms for automated sectorization of WDNs are available that consider different sets of sectorization constraints and objectives.
Sectorization is usually carried out as a two-stage procedure, as presented by most authors in the literature [1,[11][12][13]: (1) the clustering stage and (2) the dividing stage.The clustering stage includes the division of the WDN into clusters based on the network topology, minimizing the number of connecting links.The dividing stage involves the placement of valves and flow meters on the cluster's boundary pipes to define the DMAs.
The dividing stage of the sectorization procedure involves optimization of device placement (i.e., valves and flow meters) on the previously identified clusters' boundary links.Required sectorization interventions must not worsen the operational performance of the WDN and reliability in terms of water supply; hence, many alternatives for the device placement are not feasible.To search for an optimal solution, the sectorization algorithm is usually coupled with some type of optimization method, including (1) single objective optimization, (2) multi-objective optimization, or (3) the iterative approach [3].Single objective optimization procedures are mostly based on the use of evolutionary genetic algorithms (GAs) or simulated annealing (SA) employed to maximize the selected objective function (OF).The list of OFs reported in the literature is extensivemaximizing available power in the network [25,26,31], maximizing the system resilience as described in Todini [14,24,[32][33][34], minimizing the cost of interventions [35,36], etc. Multiobjective optimization is introduced to accommodate additional sectorization goals and compare trade-offs between different criteria.Widely used optimization algorithms in multi-objective analysis are (1) NSGA-II [37][38][39], (2) multi-objective GA [19], and (3) swarm optimization [40,41].The iterative approach [22,28] is used to reduce the solution search space and consequently the computational expense associated with optimization procedures.It is based on a feasible initial guess used to generate a sequence of feasible solutions.
In recent years, many automated algorithms for WDN partitioning have been introduced, with improvements made in both clustering and dividing stages.Clustering procedures are tailored in various manners to accommodate the specific characteristics of WDNs, while different OFs and heuristic procedures in the dividing stage are explored to enhance the reliability of DMA design.However, scope still exist for further improvement in WDN sectorization procedures, particularly in terms of practical application and usability for practitioners.Some of the recognized shortcomings include (1) the clustering and dividing stages are mainly unsupervised, i.e., practitioners lack control over the selection of the final solution; (2) limited application to real life examples of WDNs is somewhat lacking, i.e., methodology application is typically illustrated on highly skeletonized networks or benchmarks from the literature [8,15,16,22,23,28,42], which may not reflect varying case-specific local design criteria and raise questions about its application to real life case studies; (3) the evaluated solution cost, usually the main decision-driving factor, does not consider the presence of existing valves in the network, which can skew the solution in the wrong direction.
This paper presents the upgraded DeNSE (Distribution Network SEctorization) sectorization method [42], in which the network clustering is achieved based on the network uniformity index, which drives WDN decomposition into clusters that are not only within predefined size limits but also uniform in size as much as possible.Engineering heuristics were originally used in the dividing stage to place the valves and flow meters on clusters' boundary links and define DMAs.In the research presented here, several improvements are made to the original DeNSE method: (1) in the clustering stage, the user can opt to use the number of connections or total demand as a measure of a cluster's size, giving the user more control in this process; (2) pure heuristics are replaced with GA optimization in the dividing stage to determine the position of valves and flow meters and to ensure finding the (sub)optimal sectorization solution within the broader spectrum of feasible sectorization solutions; (3) GIS visualization is implemented to verify the practical feasibility of the solution, addressing the non-measurable factors that influence decision making (e.g., ability to access certain pipes).The novelty reported in this research includes (1) consideration of already existing valves (if available) in the dividing stage, consequently allowing better estimation of implementation costs; (2) incorporation of a criterion for water supply security, expressed as a required number of direct feed lines to DMA in respect to its size.
The methodology is tested on a part of the Amsterdam WDN with 45,000 connections, operated by the Waternet public utility company, serving as a pilot for methodology evaluation.The minimum investment for field implementation while simultaneously maintaining the same level of the WDN's operational efficiency are adopted as the sectorization's main design criteria.Additional local design criteria, addressing the security of the water supply specific for the Amsterdam WDN, have also been included.Three performance indicators (PIs), related to pressure, resilience, and water age, are adopted to measure the post-sectorization state of the WDN and validate preservation of its operational efficiency.The generated range of feasible sectorization solutions and implemented GIS visualization give decision makers the flexibility in selecting the preferable solution, which is illustrated and supported by the results presented in the paper.

Overview
The DeNSE method used in this research is based on the Graph Theory for identification of Strong Connected Components (SCCs) and their aggregation into clusters based on the network uniformity index [43].The originally presented method [42] is significantly improved in this research, particularly in the network dividing stage procedure and practical usability for practitioners.These improvements include (1) the ability to estimate implementation costs more accurately, (2) the addition of a criterion for ensuring the security of the water supply, and (3) the integration of GIS visualization, enabling better-informed decision making.
The method runs through 3 stages to identify the desired number of feasible sectorization solutions, as shown in Figure 1.The first stage is a pre-processing stage in which all the relevant network data are obtained from the WDN model and prepared for the following run of the network clustering algorithm.WDN clustering is done in the second stage, based on the uniformity index (U), which will yield a number of clustering solutions with different values of the network uniformity index.At this point, the following user input is required: (a) selection of the preferable clustering solution (e.g., the one with the highest value of uniformity index-U MAX ) and (b) the number of desired alternate solutions (N) for positioning of flow meters and valves on the clusters' boundary links.In the third stage, the selected clustering solution is subjected to the Genetic Algorithm (GA)-based optimization procedure, employed to divide the WDN, i.e., to determine the (sub)optimal positioning of the valves and flow meters on the clusters' boundary links.An integral part of the third stage is the extended period of hydraulic analysis of the obtained solutions and evaluation of the performance indicators (PIs) adopted for measuring the post-sectorization state of the WDN, determining the quality of the solution.Bearing in mind that the GA optimization is a stochastic procedure, it is advisable to run the GA multiple times, as each run (stage 3) will yield a different positioning of flow meters and valves on clusters' boundary links, thus giving a different connectivity of DMAs and implementation cost.Therefore, the number of runs of the third stage is equal to the desired number of optimized solutions to be compared (N).Ultimately, the user can rank and compare the optimized solutions based on calculated values of PIs and various output data (e.g., connectivity plots, pressure plots, GIS visualization, etc.), enabling a more informed selection of the preferable feasible solution.
(sub)optimal positioning of the valves and flow meters on the clusters' boundary links.An integral part of the third stage is the extended period of hydraulic analysis of the obtained solutions and evaluation of the performance indicators (PIs) adopted for measuring the post-sectorization state of the WDN, determining the quality of the solution.Bearing in mind that the GA optimization is a stochastic procedure, it is advisable to run the GA multiple times, as each run (stage 3) will yield a different positioning of flow meters and valves on clusters' boundary links, thus giving a different connectivity of DMAs and implementation cost.Therefore, the number of runs of the third stage is equal to the desired number of optimized solutions to be compared (N).Ultimately, the user can rank and compare the optimized solutions based on calculated values of PIs and various output data (e.g., connectivity plots, pressure plots, GIS visualization, etc.), enabling a more informed selection of the preferable feasible solution.
It should be emphasized that the user is not constrained to the selection of only one clustering solution from stage 2 to be subjected to optimization in stage 3.In other words, multiple clustering solutions can be optimized in stage 3 to yield the desired number of feasible solutions for comparison.
Each of the three stages will be explained in more detail in the following sections.For a full description of the methodology and mathematical background the reader is referred to the relevant publications [42,43].It should be emphasized that the user is not constrained to the selection of only one clustering solution from stage 2 to be subjected to optimization in stage 3.In other words, multiple clustering solutions can be optimized in stage 3 to yield the desired number of feasible solutions for comparison.
Each of the three stages will be explained in more detail in the following sections.For a full description of the methodology and mathematical background the reader is referred to the relevant publications [42,43].

Input Data
The DeNSE sectorization method requires the following input data:

1.
A calibrated WDN network model in the form of an EPANET input file, containing all relevant data (topology, hydraulic characteristics, demand data, etc.).

2.
The minimum (n min c ) and maximum (n max c ) number of property connections per DMA, along with the total number of connections in the network (n c ), if the number of connections per node is not available within the network model (which is usually the case).Available guidelines for DMA definition typically suggest that the number of connections should be in the range of 500-5000 [6,7].

3.
The transmission main threshold diameter (D MAIN ).Pipes with a diameter above this value serve as the main supply paths in the network, and they are excluded from any interventions in this method.The transmission main could also be selected manually.4.
The minimum required and maximum allowed pressures in the network, denoted as p MIN and p MAX . 5.
The minimum required number of direct feed lines, (f REQ ), to the DMA, reflecting security of water supply, defined according to the number of connections in the zone.6.
The unit cost of devices to be installed in order to divide the network (flow meters and isolation valves).If not supplied by the user, default unit cost functions are taken from [37].7.
The desired number of alternate solutions for the definition of DMAs (N).This number is the number of runs of the optimization algorithm (stage 3).Each run will yield a different optimized solution, characterized by a different number of valves and flow meters as well as their different positioning.Thus, the cost and other indicators will vary between solutions.It is generally recommended to have at least 10 solutions for a representative multi-criteria ranking, although users can opt for a larger set of solutions for comparison.
It should be noted that the preferable DMA size (2), transmission main threshold diameter (3), and the required number of direct feed lines (5) are network specific, influenced by many factors and often defined by the local act of the utility company managing the WDN.Therefore, these input data should be determined based on a thorough analysis of the specific data relevant to the network under consideration.

Pre-Processing
The pre-processing stage (stage 1) has two phases: 1.
In the first phase, transmission mains are defined, based on the D MAIN value, and excluded from the sectorization process.For this purpose, the network is explored using a slightly modified Breadth First Search (BFS) algorithm [44], simultaneously starting from all main source nodes (reservoirs).The BFS algorithm is modified to prioritize propagation through the links with diameters equal to or greater than D MAIN .2.
In the second phase, a 24 h Maximum Day Demand (MDD) hydraulic simulation of the analyzed WDN is performed to determine the orientation of pipes (based on water flow directions obtained in the simulation).As a result, a directional graph (DIGRAPH) is defined.Network links with changing flow directions are identified as non-oriented (or links that can have both flow directions).

Network Clustering
In the second stage of the DeNSE method, partitioning of the WDN into clusters is performed.This is done in three phases, which are outlined here but not described in detail.For a full description, please refer to [42,43].These phases are as follows: 1.
The first phase is the identification of Strongly Connected Components (SCCs) [45] within the directed graph DIGRAPH, created previously in the pre-processing stage (stage 1).An SCC is a directed cyclic component in which flow direction within that component can reverse [46].Therefore, SCCs are parts of the network where water is circulating during the simulation [47].The resulting graph, made of SCCs connected to the transmission main (Figure 2a), is called DAG-Directed Acyclic Graph.

2.
The second phase is the topological sorting of the DAG identified in the previous phase.DAG nodes, represented with SCCs, are sorted from the downstream end, and this order will be used to drive aggregation of the DAG from the most peripheral SCCs.

3.
The third phase is the aggregation of the sorted DAG into clusters, composed of the SCCs connected between each other and connected to the transmission main.
Aggregation is conducted based on the network uniformity index (U) [42], defined as follows: where u net is the network uniformity in terms of cluster size, u v is the uniformity of the cluster's size vector, and w agg is the relative weight of aggregated links.
1.The first phase is the identification of Strongly Connected Components (SCCs) [45] within the directed graph DIGRAPH, created previously in the pre-processing stage (stage 1).An SCC is a directed cyclic component in which flow direction within that component can reverse [46].Therefore, SCCs are parts of the network where water is circulating during the simulation [47].The resulting graph, made of SCCs connected to the transmission main (Figure 2a), is called DAG-Directed Acyclic Graph.2. The second phase is the topological sorting of the DAG identified in the previous phase.DAG nodes, represented with SCCs, are sorted from the downstream end, and this order will be used to drive aggregation of the DAG from the most peripheral SCCs.3. The third phase is the aggregation of the sorted DAG into clusters, composed of the SCCs connected between each other and connected to the transmission main.Aggregation is conducted based on the network uniformity index (U) [42], defined as follows: where unet is the network uniformity in terms of cluster size, uv is the uniformity of the cluster's size vector, and wagg is the relative weight of aggregated links.Each cluster is characterized by its size (Si), which can be either the total demand within the cluster ( ) or the total number of connections within the cluster ( ), where i n N is the number of nodes in i-th cluster, qj is nodal demand, and is the number of connections in j-th node.In the input data, the user specifies which characteristic will be used for measuring the size of the cluster.If the number of connections for each node in the mathematic model is available, this should be used; otherwise, the total demand should be used.Network uniformity (unet) measures the average Each cluster is characterized by its size (S i ), which can be either the total demand within the cluster (S i = ∑ N i n j=1 q j ) or the total number of connections within the cluster n is the number of nodes in i-th cluster, q j is nodal demand, and n j conn is the number of connections in j-th node.In the input data, the user specifies which characteristic will be used for measuring the size of the cluster.If the number of connections for each node in the mathematic model is available, this should be used; otherwise, the total demand should be used.Network uniformity (u net ) measures the average deviation of cluster size from the preferred DMA size (S pref ), calculated as the average of minimum and maximum cluster size (S pref = 0.5(S min + S max )).The maximum value of u net is 1 if all clusters have a size equal to S pref and in the range of [0, 1) otherwise.Maximizing the value of u net implies sizing the clusters in the range of S min-S max and as close to S pref as possible.
The normalized cluster's size vector is S n = S n 1 , S n 2 , S n 3 , . . ., where and N cl is the number of clusters.Uniformity of this vector (u v ) is calculated as its Euclidian norm, and its maximum value is 1 if all clusters have a size equal to S pref and in the range of [0, 1) otherwise.Maximizing the value of u v implies equal/uniform sizing of the clusters.The relative weight of aggregated links is calculated as the ratio of aggregated links' weight and the total weight of links in the network, with the diameter being used as the link's weight.The minimum value of w agg is 0 if no aggregation is performed and 1 if all SCCs are aggregated into one cluster.Aggregation of SCCs into clusters, based on the uniformity index metrics described above, is conducted in a step-by-step manner, propagating upstream through the topologically sorted DAG made of SCCs and aggregating in each step the SCCs whose aggregation will contribute the most to the network uniformity (∆U MAX ).All three measures contained in equation (1), which defines the network uniformity index, take values in the range from 0 to 1; hence, the uniformity index (U) also takes a value in the same range.A higher value of the network uniformity index indicates that better uniformity is achieved.Figure 2b shows the evolution of the network uniformity index through the aggregation process of the simple schematic example.The uniformity index (U) is plotted against the number of clusters corresponding to each aggregation step.The highest uniformity index value (U MAX ) corresponds to the network sectorization into 3 clusters in this case.In the next aggregation step, there is no positive gain to network uniformity (∆U MAX < 0), meaning that a sub-optimal aggregation solution is reached in the previous step.The aggregation procedure will continue until no further aggregation is possible.Clusters 1 and 3 are aggregated next, yielding a sectorization solution with 2 clusters, having a slightly lower uniformity value (Figure 2b).Finally, all SCCs will be aggregated into one cluster connected to the transmission main, and the network uniformity index will drop to zero.

Network Division
After the second stage (i.e., network clustering), the user is required to select the preferred clustering solution that will be optimized and analyzed further.After the selection of the solution, stage 3 is evoked.To divide the WDN (i.e., convert clusters into DMAs), flow meters and isolation valves must be positioned on clusters' boundary edges.This is achieved by using the optimization procedure based on the Genetic Algorithm (GA), aided with engineering heuristics to narrow the solution search space, as explained below.
Following the simple example from Figure 2, in Figure 3, the cluster's boundary edges are labelled as L1 through L8.Flow orientations during the 24 h MDD hydraulic simulation, obtained in Phase 1 of Stage 1, are indicated with arrows.Link L2 is a single pipe with a changing flow direction, i.e., a non-oriented pipe.Non-oriented pipes are only those connecting clusters with the transmission main, as identified clusters resulting from the DAG analysis.It is clear from Figure 3 that there are 8 links in total that should be equipped either with valves or with flow meters in order to fully define the DMAs.Prior to GA optimization itself, a two-step engineering heuristic procedure is employed in the DeNSE method to reduce the number of pipes whose status should be determined (i.e., open meter or closed valve): It is clear from Figure 3 that there are 8 links in total that should be equipped either with valves or with flow meters in order to fully define the DMAs.Prior to GA optimization itself, a two-step engineering heuristic procedure is employed in the DeNSE method to reduce the number of pipes whose status should be determined (i.e., open meter or closed valve): 1.
Non-oriented pipes are identified, and all such pipes in which the absolute difference between the maximum and minimum flow rate is less than 0.2 L/s are marked for closure, which is considered as a negligible flow rate (let us assume that the only non-oriented link in example L2 does not satisfy this condition).

2.
Boundary pipes that always return water from the clusters to the transmission main are closed.These pipes are not on the supply paths and, as such, can be considered redundant and closed without an effect on the system's reliability (in this example, in Figure 3, there is one such pipe-L8).
After applying this two-step heuristic procedure, the number of pipes whose status should be determined in the GA optimization algorithm is reduced from 8 to 6.This reduction in search space is even more emphasized in real-sized networks, where there are several tens or hundreds of boundary pipes, and this heuristic procedure can result in significantly lower computational times.
In the GA, solutions are coded into chromosomes represented with a string of bits (Figure 3), with each representing a single gene.A string of 1 bit is sufficient for representation of each gene, as there are only two possibilities for the status of the pipe (e.g., 1-closed or 0-opened).Parameters that must be defined for the application of GA optimization are population size (ps); crossover probability-usually 0.8-0.9;mutation probability-usually <0.05; and number of generations to evolve (ng).The efficiency of GA will depend on the adopted values for the previously listed parameters.These values are case specific, since different OFs will require different sets of values for parameters to achieve the same efficiency.
The objective function for the proposed implementation of the GA considers only the economical aspect-the solution's cost.The informal definition of GA could be that it is an optimization method that searches for an optimum solution in discrete multidimensional space without constraints.However, the network sectorization problem is constrained with the request that any implemented interventions do not endanger the network's operating reliability, providing feasible a sectorization solution.In the DeNSE methodology, feasibility of the solution is imposed through several penalty functions used within the OF, penalizing each solution with a proportional penalty value (C i P i ), with C i being the penalty unit cost and P i the proportional penalty amount: Penalty types, their unit cost (C i ), and calculation of the proportional penalty amount (P i ) are summarized in Table 1:

Sectorization Performance Indicators
After the network dividing stage (third stage), the solutions have been optimized and the user can analyze and investigate all of the desired N solutions and decide which is the preferred one.The decision should be made based on the solution's cost and the following three performance indicators (PIs) for ranking of the solutions, which measure the effects of interventions made in the network to define the DMAs: 1.
Cost (EUR)-Cost of the solution is calculated based on the unit cost of devices installed to create the DMAs (flow meters and isolation valves), supplied by the user as an input data.

2.
∆p AV (%)-Relative change in the average network pressure caused by the interventions, calculated as follows: where p t i is the pressure in the i-th node at time t in the original network, and p * t i is the pressure in that same node at the same time, but in the network with implemented interventions.

3.
∆Res (%)-Relative change in the average network resilience index [32] after the sectorization compared to the network's original layout.The resilience index is calculated as a mean value over the simulation period (T) and is represented as the ratio of the residual amount of power in the network after the satisfaction of nodal demands and the maximum amount of power that can be dissipated in the network internally, while satisfying the nodal demands and minimal pressure constraints: where n j is the number of junctions, n r is the number of reservoirs, n p is the number of pumps, n t is the number of tanks, q i is the nodal demand at node i, h i is the nodal head at node i, h i * is the minimum nodal head at node i, Q j is the discharge from the reservoir j, H j is the head in reservoir j, P k is the amount of power introduced in the network by pump k, γ is the specific weight of the water, Q l is the demand of tank l, and H l is the head in tank l.

4.
∆WA (%)-Relative change in the average water age in the network after the sectorization compared to the network's original layout.Water age is defined as the time spent by a parcel of water in the network, providing a simple measure of the overall quality of the delivered drinking water [48].Water age (WA) is calculated over the last 24 h of the extended period simulation, as follows: where WA i t is the result of the EPANET simulation and presents the water age in junction i at time t.
In addition to the cost and above-listed PIs, other parameters characterizing solutions should also be considered, such as the connectivity between the clusters, the number of flow meters and valves, and the location of the existing valves intended for closure, as the methodology considers already existing valves in the network.These additional parameters are automatically generated in tabular and graphical form at the end of the optimization procedure (see Section 3.3), providing the user with flexibility in selection of the preferable solution.

Visualization
After the user selects the preferable solution, a set of graphical and tabular results are generated, detailing the characteristics of the adopted solution (see Section 3.4).The following output files are produced at the end: 1.
Four Google Earth files (.kml files) showing the whole network and the position of flow meters and valves.These files are convenient, as the network is displayed against a satellite background and georeferenced.2.
An EPANET file (.inp file) in which all required interventions are implemented (i.e., all pipes that should be equipped with valves are closed in this model).This enables the user to produce additional results independently and further investigate the hydraulic model of the solution.

Implementation
The implementation of the improved DeNSE methodology is carried out in a Matlab programming environment [49], serving as the central processor, with some parts of the methodology developed in different programing environments for computational efficiency.The 2nd Stage of the algorithm (Network clustering algorithm) is written in C++ programing language to ensure high computational efficiency.It is compiled as a dynamic link library (DLL) that can be used externally to perform clustering.For hydraulic simulations (in stages 1 and 3), EPANET 2 DLL is used [50], as it is a reference hydraulic solver and can be easily invoked from Matlab.

Case Study
The DeNSE sectorization method, in the form presented in this paper, resulted from the research conducted as part of the Horizon 2020 research project No. 778136, named "Wat-Qual".Research was conducted in cooperation with Waternet-the public utility company operating the water distribution network of the city of Amsterdam.Waternet personnel provided the necessary data for the development and testing of the proposed methodology on a real-sized WDN.This paper presents the results obtained for the Amstelveen WDN, which is a suburban part of the Amsterdam metropolitan area (Figure 4).The Amstelveen part of the network was chosen as it can be easily hydraulically isolated from the rest of the Amsterdam WDN and, with roughly 45,000 connections, is large enough to allow the proper evaluation of the methodology.This network could serve as an example for potential sectorization of other parts of Amsterdam's WDN.The characteristics of Amstelveen WDN are as follows: number of links-N_l = 12,479; number of nodes-N_n = 11,729; number of demand nodes-N_dn = 5510; number of reservoirs-N_r = 4 (not real, but established as source nodes on locations where the network connects to the rest of the WDN); number of tanks-N_t = 0; number of pumps-N_p = 0; number of valves-N_v = 2144; number of connections-N_c = 44,429; total average demand in the network-Q = 521.3m 3 /h.The peak demand hour is 8:00 a.m., with the demand of 1008.0 m 3 /h, with another peak from 7:00 to 8:00 p.m., with the demand of 720.0 m 3 /h.The minimum demand hours are from 1:00 to 6:00 a.m., with the demand of 273.6 m 3 /h.stelveen WDN, which is a suburban part of the Amsterdam metropolitan area (Figure 4).The Amstelveen part of the network was chosen as it can be easily hydraulically isolated from the rest of the Amsterdam WDN and, with roughly 45,000 connections, is large enough to allow the proper evaluation of the methodology.This network could serve as an example for potential sectorization of other parts of Amsterdam's WDN.The characteristics of Amstelveen WDN are as follows: number of links-N_l = 12,479; number of nodes-N_n = 11,729; number of demand nodes-N_dn = 5510; number of reservoirs-N_r = 4 (not real, but established as source nodes on locations where the network connects to the rest of the WDN); number of tanks-N_t = 0; number of pumps-N_p = 0; number of valves-N_v = 2144; number of connections-N_c = 44,429; total average demand in the network-Q = 521.3m 3 /h.The peak demand hour is 8:00 am, with the demand of 1008.0 m 3 /h, with another peak from 7:00 to 8:00 pm, with the demand of 720.0 m 3 /h.The minimum demand hours are from 1:00 to 6:00 am, with the demand of 273.6 m 3 /h.The input data used for the sectorization of Amstelveen network are supplied by the Waternet company.The data are primarily adopted through interpretation of the local act document "Design Criteria for Drinking Water Distribution Networks" [51], containing the local design criteria.The estimated total number of connections in the network is nc = 44,429, calculated based on the average lot occupation of 2.1 person/connection, water use per person of 134 L/person/day (adopted from [51]), and nodal demands taken from the mathematical model.The input data includes the following: 1.The calibrated WDN network model in the form of the EPANET input file.The input data used for the sectorization of Amstelveen network are supplied by the Waternet company.The data are primarily adopted through interpretation of the local act document "Design Criteria for Drinking Water Distribution Networks" [51], containing the local design criteria.The estimated total number of connections in the network is n c = 44,429, calculated based on the average lot occupation of 2.1 person/connection, water use per person of 134 L/person/day (adopted from [51]), and nodal demands taken from the mathematical model.The input data includes the following: 1.
The calibrated WDN network model in the form of the EPANET input file.

2.
The minimum (n min c ) and maximum (n max c ) number of property connections per DMA are set equal to n min c = 2500 and n max c = 8000.These slightly differ from the general recommendations about the size of DMAs provided in guidelines [6,7].This is because of the size of the Amstelveen network.It is more appropriate that sectorization of such networks is done in phases.First, coarse sectorization should be implemented, and after that each large DMA, the network should be sectorized further.Given the adopted values for n min c and n max c , the preferred size of a DMA is n pref c = 5250 connections, which is adopted as an upper boundary for a DMA in many guidelines.Given the total number of connections in the Amstelveen network, it Is expected that the optimal sectorization derived with the DeNSE method will have 7 to 9 DMAs.

3.
The Transmission main threshold diameter used in preprocessing to identify the main pipeline is D MAIN = 250 mm.

4.
The adopted minimum required and maximum allowed pressures in the network are p MIN = 1.8 bar and p MAX = 6.0 bar.Local network design criteria define the minimum pressure to be at least 2.0 bar; however, in the case of the Amstelveen network, the absolute minimum pressure in the original network layout, which occurs during the 24 h simulation, is 20.15 m.Because this is very close to the 2.0 bar constraint, it was decided to slightly relax the minimum pressure constraint and adopt a 1.8 bar value instead.This is still well above the legal minimum of 1.5 bar, as mentioned in [51].

5.
The minimum required number of direct feed lines (f REQ ) to an area (DMA) is adopted from the local act document [51] according to Table 2, defining the requests in normal operating conditions:

7.
The desired number of alternate solutions for the definition of DMAs, which will be ranked and analyzed, is N = 10.

8.
The parameters used in GA optimization are the number of generations ng = 35 and population size ps = 30.

Network Clustering Results
Table 4 shows the evolution of the network uniformity index (U) and its three components (u net , u v and w agg) during the last 15 steps of the aggregation procedure.Additionally, this table shows the following characteristics for each sectorization solution: number of clusters (n_cl), number of connecting links (n_c_links), number of clusters smaller than n min c (NS), and number of clusters larger than n max c (NL).The maximum uniformity index value of U MAX = 0.7818 is reached for the clustering solution with eight (8) clusters.Clustering solutions corresponding to one aggregation step before (with 9 clusters) and one aggregation step after (with 7 clusters) have a similar network uniformity index value.Therefore, they can also be considered as candidates for the optimization procedure in the following step.Table 4 is automatically generated after the clustering procedure is finished, and the user can generate a network plot for any desired clustering solution.
The solution with seven clusters shown in Figure 5 is selected as the preferable clustering solution in this case, as it completely satisfies the predefined sizing range (n min c -n max c ).Although the network uniformity index value is slightly lower than U MAX , the value of u v , measuring the uniformity of the DMAs' size vector, is the highest.There are 107 connecting links in total subjected to the GA optimization procedure in the following step to determine the positions of flow meters and valves and define the DMAs.

Network Division
To divide the WDN, i.e., place devices on clusters' boundary edges, the optimization procedure was run 10 times on the selected clustering solution with seven clusters.Ten ( 10) alternate dispositions of flow meters and valves are obtained.Figures 6 and 7 show the values of cost and the three adopted PIs for ranking of the optimized solutions with

Network Division
To divide the WDN, i.e., place devices on clusters' boundary edges, the optimization procedure was run 10 times on the selected clustering solution with seven clusters.Ten ( 10) alternate dispositions of flow meters and valves are obtained.Figures 6 and 7 show the values of cost and the three adopted PIs for ranking of the optimized solutions with the implemented interventions in the network: (1) Cost, (2) relative change of average network pressure (∆p AV ), (3) change of resilience index (∆Res), and (4) change of water age (∆WA).Values are given relative to the original network layout without interventions, and rankings are shown with numbers at the bottom of the bar graph, where appropriate (i.e., 1-best, 10-worst).Additionally, Table 5 shows the absolute values of the adopted PIs together with (1) the absolute minimum pressure (p MI N ABS ) occurring in demand nodes, (2) the total number of flow meters to be installed (N FM ), (3) the number of new valves to be installed (N NV ), and (4) the number of existing valves to be closed (N EV ), if possible.A comparison of PIs (Figure 6), the characteristics of optimized solutions (Table 5), and DMAs' schematic connectivity plots for each optimized solution (Figure 8) are automatically generated and displayed after the optimization procedure, to assist the user in the selection process.Based on the presented results, it can be concluded that all sectorization solutions are hydraulically feasible and minimally affect the original state of the network, as expressed through small changes in the three PIs measuring the network's operational efficiency (ΔpAV, ΔRes and ΔWA).This leaves the cost of the solution as the main driving factor in the selection of the preferred sectorization solution.In addition to cost, the DMAs' schematic connectivity plots for each optimized solution could be investigated to make a better-informed decision.The connectivity plot for the least expensive solution, SOL-2, is shown in Figure 8, in which DMAs are represented as the points of different colors connected to The least expensive solution is SOL-2 (Table 5, Figure 6), with solutions SOL-9, SOL-4, and SOL-6 having comparable prices while being slightly more expensive (by up to 2.58%).The remaining solutions are noticeably more expensive than SOL-2.These differences are due to the number of expensive flow meters that must be installed, i.e., the more expensive solutions have more pipes equipped with these.The positive effect of using existing valves on cost estimation (implemented in this methodology) is highlighted here, as for all solutions, the number of existing valves is significantly higher than the number of new valves.Based on the relative change of average network pressure (Figure 6, ∆p AV ), it is concluded that the network pressure distribution due to sectorization is not significantly affected by any solution.The minimum impact on pressure distribution is solution SOL-10, in which the average pressure is reduced by 0.24 m (−0.85%).The greatest reduction of average pressure occurs in solution SOL-8, where pressure is reduced by 0.55 m (−1.93%).These reductions are considered negligible, and all solutions are feasible from this point of view.
The relative change of resilience index (∆Res), compared to the original network layout, also reflects the negligible changes in pressure distribution in the network (Figure 7).The resilience index value decreased the most in solution SOL-1, by 2.39%.An increase in resilience index occurs in solutions SOL-2 and SOL-9, in which it is increased by 0.75%.
Water age, compared to the original layout of the network (∆WA), is expectedly increased with the implemented network interventions-from 6.85% for solution SOL-10 up to 10.97% for solution SOL-4 (Figure 6).These percentages may seem high at first, but the absolute values of WA, given in Table 5, indicate that an increase in WA in the range of 1.40-2.25 h can be considered insignificant.
Comparison of the absolute minimum pressures (p MI N ABS ) in the demand nodes before and after sectorization shows that minimum pressures for all solutions are slightly decreased (Table 5).The lowest decrease of 0.01 m (0.05%) occurs in SOL-5, and the minimum pressure is decreased the most in solution SOL-8, by 1.49 m (7.39%).The minimum pressure for all solutions is still above the allowed minimum pressure used as input data, set to 18 m (1.8 bar).
Based on the presented results, it can be concluded that all sectorization solutions are hydraulically feasible and minimally affect the original state of the network, as expressed through small changes in the three PIs measuring the network's operational efficiency (∆p AV , ∆Res and ∆WA).This leaves the cost of the solution as the main driving factor in the selection of the preferred sectorization solution.In addition to cost, the DMAs' schematic connectivity plots for each optimized solution could be investigated to make a better-informed decision.The connectivity plot for the least expensive solution, SOL-2, is shown in Figure 8, in which DMAs are represented as the points of different colors connected to the main pipeline and between each other.Blue links with arrows indicate the feed lines, while red links are links in which water flows in both directions during the simulation.The thickness of the lines corresponds to their diameter, while diameters are also indicated in the middle of each link.All DMAs satisfy requirement for the number of feeds, i.e., the achieved number of feeds is equal to or larger than the requirement, with most of them supplying water directly from the main distribution pipeline.Furthermore, an investigation of connectivity plots for other solutions reveals that all of them satisfy the feed requirement, but this is not reported here.
To gain full insight into DMA connectivity and layout, both connectivity plots (Figure 8) and network plots, with the exact positions of flow meters and valves (Figure 9), should be investigated.In Figure 9, flow meters are shown as (1) flow meters on direct feeds (marked with dark blue square markers)-i.e., flow meters on pipes where water does not change its flow direction during simulation-and (2) flow meters on other pipes (marked with light blue square markers)-i.e., flow meters on pipes that do change flow direction.Two types of valves are marked as (1) existing valves (marked with yellow triangle markers), i.e., a valve already exists on the pipe marked for closure, so there is no need to install a new one, and (2) new valves to be installed (marked with red triangle markers).To gain full insight into DMA connectivity and layout, both connectivity plots (Figure 8) and network plots, with the exact positions of flow meters and valves (Figure 9), should be investigated.In Figure 9, flow meters are shown as (1) flow meters on direct feeds (marked with dark blue square markers)-i.e., flow meters on pipes where water does not change its flow direction during simulation-and (2) flow meters on other pipes (marked with light blue square markers)-i.e., flow meters on pipes that do change flow direction.Two types of valves are marked as (1) existing valves (marked with yellow triangle markers), i.e., a valve already exists on the pipe marked for closure, so there is no need to install a new one, and (2) new valves to be installed (marked with red triangle markers).
After investigating these plots for all solutions, solution SOL-2 is selected as the preferable one in this case, as it has the best perceived DMA connectivity, based on discussion with experts familiar with all network specifics, and, coincidentally, is the least expensive.After investigating these plots for all solutions, solution SOL-2 is selected as the preferable one in this case, as it has the best perceived DMA connectivity, based on discussion with experts familiar with all network specifics, and, coincidentally, is the least expensive.

Discussion on Seleected Solution
After the adoption of the sectorization solution SOL-2 the preferred one, several graphical and tabular outputs are automatically generated, showing detailed results for each DMA.For the adopted solution, an EPANET model and several Google Earth files are generated as well.
Figure 10 shows the generated Google Earth plot of the adopted sectorization solution.One kml file is generated for each type of object of interest-(1) DMAs, (2) position of flow meters, (3) position of new valves, and (4) position of existing valves.From the menu on the left window, the user can select which object layer will be displayed.Object IDs displayed in Google Earth files correspond to those in the generated EPANET model.This allows the user to (1) investigate the real spatial positioning of devices and assess the possibility for field implementation and (2) make modifications to the EPANET hydraulic model to further investigate network hydraulics.
Water 2024, 16, x FOR PEER REVIEW 19 of 24

Discussion on Seleected Solution
After the adoption of the sectorization solution SOL-2 as the preferred one, several graphical and tabular outputs are automatically generated, showing detailed results for each DMA.For the adopted solution, an EPANET model and several Google Earth files are generated as well.
Figure 10 shows the generated Google Earth plot of the adopted sectorization solution.One kml file is generated for each type of object of interest-(1) DMAs, (2) position of flow meters, (3) position of new valves, and (4) position of existing valves.From the menu on the left window, the user can select which object layer will be displayed.Object IDs displayed in Google Earth files correspond to those in the generated EPANET model.This allows the user to (1) investigate the real spatial positioning of devices and assess the possibility for field implementation and (2) make modifications to the EPANET hydraulic model to further investigate network hydraulics.6 are sorted according to the recommended implementation phase, which is based on the criterion that in each phase the least expensive DMA is implemented first.The total pricing of setting up DMAs in the whole network for the adopted sectorization solution SOL-2 is EUR 144,307 (see Table 5).Figure 11 shows a comparison of the average pressure in DMAs during the simulation, before and after sectorization.The pressure is lowered in all DMAs as expected due to the implemented interventions, but the pressure trend remains mainly unchanged.The highest disruptions occur in peak-hour demands, between 6:00 and 8:00 a.m.The least impacted DMA is DMA 2, in which the average pressure at 8:00 a.m. is lowered from 27.35 m to 26.84 m, or by 1.86%.The most impacted DMA is DMA 7 in which the average pressure at 8:00 a.m. is lowered from 27.04 m to 24.52 m, or by 9.32%.In all other DMAs, this reduction is less than 5.0%.Bearing in mind the minimum network pressure from the local guideline document of 20.0 m, it can be concluded that these reductions will not affect the water supply in DMAs.However, if desired, the pressure in the worst-performing DMA, DMA 7, could probably be increased by opening an additional connecting link from the main or omitting one of the new valves.

Conclusions
A number of different WDN sectorization methodologies have been presented to date, introducing innovative approaches and improving either the clustering or dividing stage of the sectorization procedure.This paper introduced the upgraded DeNSE method for the sectorization of WDN, highlighting the improvements aimed at addressing the

Conclusions
A number of different WDN sectorization methodologies have been to date, introducing innovative approaches and improving either the clustering or dividing stage of the sectorization procedure.This paper introduced the upgraded DeNSE method for the sectorization of WDN, highlighting the improvements aimed at addressing the recognized shortcomings of existing methodologies.The following conclusions are drawn: 1.
Incorporated improvements such as added criteria for water supply security and consideration of existing valves in the network contribute to a better estimate of the implementation costs and post-sectorized operational efficiency of the WDN.

2.
The generated range of feasible sectorization solutions using GA optimization, the implemented GIS visualization, and the generated EPANET model of the sectorized network provide practitioners with valuable insights and flexibility in the decisionmaking procedure.

3.
Tested on a segment of Amsterdam WDN used as a pilot network, the DeNSE method demonstrated efficiency in optimizing sectorization solutions with minimum implementation cost, while preserving the WDN operational efficiency and meeting the local design criteria.4.
The reported results prove that the DeNSE method can be used as a decision support methodology, valuable to practicing engineers dealing with the implementation of sectorization strategies in WDNs.
Despite the upgrades presented in this research, there is still room for methodology improvement.Future work should address the following: 1.
Implementation of a pressure-driven approach (PDA) in hydraulic simulations, as pressure deficient conditions in the network cannot be accurately represented with the current implementation of the demand-driven approach (DDA).

2.
Introduction of node elevation as a measure of uniformity in the clustering stage, which could be appropriate for WDNs with high variations in terrain elevation.

3.
Consideration of dynamic DMAs, self-adapting to abnormal conditions in the network, which could provide better dynamic control of WDNs.The hierarchical characterization of the clustering algorithm implemented in the DeNSE methodology should easily enable this. 4.
Investigation of the influence of hydraulic model uncertainties on DMA design.
The case study analyzed in this paper, however, is not influenced by any of the limitations listed above (due to network topology, low level of leakage, and uniform terrain elevation).

Figure 1 .
Figure 1.Flow chart of the DeNSE sectorization method.

Figure 2 .
Figure 2. (a) Network clustering procedure-identified SCCs and DAG representation of the graph; (b) aggregation of the sorted DAG and evolution of the network uniformity index (U).

Figure 2 .
Figure 2. (a) Network clustering procedure-identified SCCs and DAG representation of the graph; (b) aggregation of the sorted DAG and evolution of the network uniformity index (U).

24 Figure 3 .
Figure 3. Heuristically placed valves and pipes subjected to the GA optimization.

Figure 3 .
Figure 3. Heuristically placed valves and pipes subjected to the GA optimization.

Water 2024 , 24 Figure 6 .
Figure 6.Values of ranking indicators for optimized solutions-Cost and ΔpAV.

Figure 6 .
Figure 6.Values of ranking indicators for optimized solutions-Cost and ∆p AV.

Water 2024 , 24 Figure 7 .
Figure 7. Values of ranking indicators for optimized solutions-ΔRes and ΔWA.Figure 7. Values of ranking indicators for optimized solutions-∆Res and ∆WA.

Figure 7 .
Figure 7. Values of ranking indicators for optimized solutions-ΔRes and ΔWA.Figure 7. Values of ranking indicators for optimized solutions-∆Res and ∆WA.

Figure 8 .
Figure 8. Schematic plot of DMA connectivity in solution SOL-2.Figure 8. Schematic plot of DMA connectivity in solution SOL-2.

Figure 8 .
Figure 8. Schematic plot of DMA connectivity in solution SOL-2.Figure 8. Schematic plot of DMA connectivity in solution SOL-2.

Figure 9 .
Figure 9. Interventions layout in the network in SOL-2.

Figure 9 .
Figure 9. Interventions layout in the network in SOL-2.

Water 2024 , 24 Figure 11 .
Figure 11.Average pressure in DMAs during the 24 h simulation, before and after sectorization.

Figure 11 .
Figure 11.Average pressure in DMAs during the 24 h simulation, before and after sectorization.

Table 1 .
Penalty functions used within the objective function (OF).
av_min -minimum average pressure during 24 h in the network with implemented interventions.

Table 2 .
Required number of feeds for an area to secure water supply.The local unit cost of the equipment (i.e., valves and flow meters) is supplied directly by the Waternet asset management department.Prices include all-in installation (i.e., includes purchase, transport, and labor costs).Prices are given in Table3:

Table 3 .
Installation prices for valves and flow meters.

Table 4 .
Evolution of the network uniformity index (U) during the aggregation process.

Table 5 .
Characteristics of optimized solutions for definition of DMAs.

Table 6 .
Characteristics of DMAs in adopted sectorization solution.