Adaptive DMA Design and Operation under Multiscenarios in Water Distribution Networks

Water distribution network (WDN) is a human-centered infrastructure that is indispensable for modern cities worldwide. In addition to optimizing the operation and management (O&M) of WDNs under the current state, water utilities should be able to manage uncertain and risk conditions for improving their O&M efficiency. Although the disintegration of large WDNs into permanent district metered areas (DMAs) is an O&M innovation based on water leakage monitoring and pressure management, its network redundancy and reliability diminish under anomalous conditions. Therefore, this study proposed a design and operation procedure to obtain optimal, self-adaptive DMA configurations for various plausible abnormal scenarios. The proposed method is based on multiscenario simulation and optimization, comprising two phases: (1) design of optimal DMA layout for each scenario using the pressure uniformity index to optimize the placement of flow meters and gate valves, and (2) dynamic transformation of the base DMA configuration into an adaptive DMA layout adapting to abnormal conditions and optimization of the locations and statuses of the control valves. Moreover, we used a real-world WDN to demonstrate the effectiveness of the proposed approach, and the obtained results revealed the efficiency and appropriate performance of the adaptive DMA layouts for sustainable adaptation of WDNs under anomalous conditions.


Introduction
Access to water with acceptable quality, quantity, and reliability is a basic human right in modern society [1]. In 2015, all United Nations member states adopted 17 Sustainable Development Goals (SDGs) that identify clean water supply and sanitation as one of the targets to eliminate poverty, protect the planet, and ensure prosperity for all [2]. To accomplish these goals, water utilities are investing in the design as well as the operation and management (O&M) of a water distribution network (WDN) via sustainable water supply and sewerage strategies. However, water-supply management under risk and uncertainty is a major challenge for policymakers as well as the water utilities directly operating and managing the WDNs.
Currently, climate change has negatively impacted the WDNs-both in terms of water quantity and quality [3]. Consequently, numerous countries have experienced water shortages that result in unpredictable spatiotemporal disruptions in the water supply. Moreover, cyber-physical threats to the WDN pose a major concern and drive human lives toward risk [4]. Thus, water utilities are required to initiate preventive and mitigative actions in response to these abnormal conditions. In addition, flexible management strategies should be developed to enhance the water-supply service level and ensure service to customers in the occurrence of an abnormal and critical scenario. Moreover, the recent explosion of urbanization has increased the water demand and strongly impacted the capacity of the adapt owing to the permanent closure of the boundary valves. Consequently, this reduces the reliability and suboptimal pressure management caused by the occurrence of higher frictional energy losses, water quality incidents resulting from the variation in the flow direction, and the creation of more dead-end nodes [40]. Overall, the DMAs with dynamic topology are valid and yield efficient solutions to mitigate these issues. Recently, Wright et al. [40,41] proposed an optimization scheme based on sequential convex programming to design remote-controlled dynamic boundary valves for adjusting bidirectional flow and forming a dynamic aggregation of DMAs. Subsequently, Scarpa et al. [42] and Giudicianni et al. [14,43] proposed an approach to transform multiscale network layouts into dynamic aggregation/disaggregation operations of DMAs based on a semi-supervised clustering approach.
Although prior studies obtained advantageous results, the approaches for the dynamic aggregation/disaggregation of DMAs can produce extremely large, complex, or small subzones in WDNs. Moreover, scaling up and down by merging/slipping adjacent DMAs constitutes a passive approach in case of system failures. Consequently, the proposed approach would be inefficient for a variety of system operations and can result in management ineffectiveness. In reality, the operational contexts of WDNs encounter seasonal and foreseen water issues that impact the water-supply serviceability of the entire network; thus, water utilities should adaptively operate by reconfiguring the existing DMAs to maintain system performance and sustainable regulation of the DMAs. Therefore, this study proposes a novel approach that enables permanent DMA configurations to be self-adaptive to various anomalous cases occurring during the operation. More specifically, the primary contributions of the present study include (1) considering various plausible, abnormal operational scenarios for planning DMA design; (2) designing optimal DMA layouts that can be applied in individual scenarios; and (3) developing an optimization scheme to determine the adaptive DMA layouts based on the installation of additional valves and control valve settings (e.g., closed or open)-both in the existing and newly added valves-to dynamically transform the base DMA layout to an adaptive DMA layout that can be separately applied to individual operational scenarios. The proposed method aims to enable water utilities to rapidly respond toward abnormal events, enhance operational efficiency, and thereby, achieve an improved level of system resilience.
The remainder of this paper is organized as follows. The methodology followed in this study is described in Section 2. Thereafter, the applicability of the proposed method in a real-world WDN case study is demonstrated in Section 3. Subsequently, the major findings and future scope of the current study are discussed in Section 4. Lastly, the conclusions of this research are remarked in Section 5.

Methodology
The present study extends the approach of the optimal design of DMA layout developed by Bui et al. [20]. That is, instead of designing a permanent DMA configuration (i.e., base DMA layout), self-adaptation DMA layouts are determined to ensure reliable water supply under various abnormal conditions. The overall procedure of the proposed method is illustrated in Figure 1. First, the plausible abnormal operational scenarios are defined and simulated. In this study, we considered two abnormal scenarios: (1) an increase in seasonal water demand in a partial region of the WDN and (2) source interruption (e.g., a scheduled reservoir inspection). Thereafter, the scenario-specific DMA layouts were generated for each scenario by coupling a self-organization map (SOM) [44] with the community structure algorithm (CSA) [45]. Second, the optimal DMA layouts for each scenario were designed following the optimal placement of gate valves and flowmeters based on the objective of minimizing the pressure uniformity (PU). Accordingly, all the optimized locations of the gate valves and flow meters were obtained for each scenario. Therefore, the water utilities contained a base DMA layout for the normal operation condition and additionally possessed the optimized DMA layouts for the individual abnormal scenarios that are considered reference layouts. Third, an optimization scheme was developed to install the additional valves and set the valve statuses for dynamic transformation of the base DMA layout into an adaptive DMA layout that can be separately applied to the individual scenarios. Lastly, the adaptive DMA layouts were discussed, and their hydraulic performances were compared with those of the optimal DMA layouts already designed for each scenario.
based on the objective of minimizing the pressure uniformity (PU). Accordingly, all the optimized locations of the gate valves and flow meters were obtained for each scenario. Therefore, the water utilities contained a base DMA layout for the normal operation condition and additionally possessed the optimized DMA layouts for the individual abnormal scenarios that are considered reference layouts. Third, an optimization scheme was developed to install the additional valves and set the valve statuses for dynamic transformation of the base DMA layout into an adaptive DMA layout that can be separately applied to the individual scenarios. Lastly, the adaptive DMA layouts were discussed, and their hydraulic performances were compared with those of the optimal DMA layouts already designed for each scenario.

Scenario Creation
One of the most intuitive approaches for considering uncertainties in the planning stage involves the usage of scenarios. When abnormal events happen, the water utilities must rapidly intervene to recover the reliability of the network. The cyclical events involve seasonally varying water demand owing to user behavior variation, source disruption caused by plant maintenance, or water shortages. Therefore, such events persistently affect the serviceability of the system. This study considered cyclical abnormal scenarios to plan the adaptive DMA design and operation. Accordingly, two operational scenarios were independently simulated along with the base scenario (i.e., normal operation condition). As stated earlier, one such scenario represents the increase in water demand at the partial network (seasonal operational scenario, S1), and the other scenario implies a disruption in supply sources (failure operational scenario, S2).
Under abnormal conditions, a pressure deficit may occur in WDNs [46]. In reality, the nodal demand is dependent on the available pressure at the nodes [47]. Thus, a pressure-driven analysis (PDA) was conducted in the proposed framework to more appropriately simulate the realistic hydraulic results under abnormal operating conditions.

Scenario Creation
One of the most intuitive approaches for considering uncertainties in the planning stage involves the usage of scenarios. When abnormal events happen, the water utilities must rapidly intervene to recover the reliability of the network. The cyclical events involve seasonally varying water demand owing to user behavior variation, source disruption caused by plant maintenance, or water shortages. Therefore, such events persistently affect the serviceability of the system. This study considered cyclical abnormal scenarios to plan the adaptive DMA design and operation. Accordingly, two operational scenarios were independently simulated along with the base scenario (i.e., normal operation condition). As stated earlier, one such scenario represents the increase in water demand at the partial network (seasonal operational scenario, S1), and the other scenario implies a disruption in supply sources (failure operational scenario, S2).
Under abnormal conditions, a pressure deficit may occur in WDNs [46]. In reality, the nodal demand is dependent on the available pressure at the nodes [47]. Thus, a pressuredriven analysis (PDA) was conducted in the proposed framework to more appropriately simulate the realistic hydraulic results under abnormal operating conditions.

Water Network Partitioning
Ideally, each operational scenario involves an appropriate DMA layout to obtain the most suitable hydraulic performance. To this end, the following subsections describe the generation of an individual optimal DMA layout for each operational scenario, referred to as the permanent water network partitioning (p-WNP). Furthermore, the optimal DMA Sustainability 2022, 14, 3692 5 of 22 design applied separately for each scenario was accomplished in two phases, described as follows.

Clustering Phase
The decomposition of large WDNs into DMAs using a coupling model of SOM and CSA is effective in networks with diverse hydraulic regions because the SOM algorithm can classify similar clusters in terms of hydraulic uniformity to support the CSA algorithm in aggregating meaningful DMAs [20]. Thus, the prior study employed this method to identify the DMA layouts and conceptual cut-sets (i.e., boundary pipes) applicable to individual scenarios, wherein three matrices containing information of node adjacency, topology similarity, and hydraulic similarity were used as the inputs of the SOM model to identify the initial clusters (i.e., initial DMAs). Subsequently, the CSA was applied to refine the cluster sizes into multiscale DMAs. In particular, the clustering procedures are briefly outlined in the following three steps. Note that the clustering method has been detailed by [20].
Step 1. Constructing the attribute matrix of a WDN

•
The construction of the adjacency matrix (A) of an undirected network representing the connectivity of nodes i and node j, such that A ij = 1 if they are connected, otherwise The topology similarity matrix (TS) represents the degree of node proximity in the network, i.e., the nodes in a pair are similar if they share several neighbors.

•
The hydraulic similarity matrix (HS) was developed to quantify the correlation of pressure (p) and elevation (e) between a pair of connected nodes i and j in a WDN.
Step 2. SOM-based initial clusters formation The SOM [44] was applied to cluster a WDN into the initial homologous regions. Moreover, the SOM model was trained by constructing the input matrix based on Equation (1): where A, TS and HS represent the adjacency matrix, topology similarity matrix, and hydraulic similarity matrix, respectively. The SOM algorithm utilized the Euclidean distance as a similarity measure to train the inputs into sets of similar nodes, which reduced the high-dimensional input space into standard two-dimensional maps. Therefore, the SOM output formed initial clusters (i.e., initial DMAs), ensuring that (1) the pairs of nodes in the DMA exhibit similar pressure and elevation, and (2) they are directly connected. Consequently, each scenario contained its own initial clusters according to the network topologies and diversity of the hydraulic regions.
Step 3. CSA-based refining initial clusters for multiscale DMA creation The SOM output was mapped on the study WDNs to examine the assignment of a node to a cluster. Therefore, the initial clusters were considered as superstar nodes (i.e., independent nodes). Subsequently, the modularity index-based CSA, which measures the quality of network division into communities, was used to refine the initial clusters by balancing the size and number of clusters [48]. Notably, the modularity index was considered only as an initial state estimation value and did not dictate the optimal DMA layout solutions.

Sectorization Phase
The sets of boundary pipes for each scenario were defined in the clustering phase. Thereafter, the optimal placement of the control devices was identified, wherein flow meters and gate valves must be installed among the boundary pipes to form the isolated DMAs. As the present research objective is to maintain pressure similarity in the entire network to achieve high serviceability, the pressure uniformity (PU) index proposed by Alhimairy and Alsuhaily [49] was employed as the fitness value as expressed in Equation (2). The PU index measures the average deviation of the nodal pressures compared to the minimum required pressure and the system average pressure.
subject to where PU denotes the fitness value of pressure uniformity, n represents the number of nodes, H i denotes the nodal pressure at node i, and h * and H mean represent the minimum required pressure and average pressure in the network, respectively. Thereafter, a genetic algorithm (GA) was employed to minimize the objective function in Equation (2) and satisfy the constraint in Equation (3). In particular, each individual in the population set indicated a solution represented by a sequence of binary chromosomes with a length equal to the number of boundary pipes (N bp ). Accordingly, the selected pipes were the flow meters (N fm ) corresponding to the open pipes with chromosomes adjusted by 1, whereas the pipes installed with the gate valves (N gv ) corresponded to the pipes proximate to the chromosome set by 0. The minimum number of flow meters (N f m ) was maintained according to Giudicianni et al. [43]. Upon defining the N f m to be installed, the number of gate valves was N gv = N bp − N f m . In addition, the GA evaluated each individual by computing the fitness value following Equation (2) to select the optimal solution. In this study, the GA was conducted with 5000 generations of a population containing 100 individuals each. The crossover coefficient was set at 0.85, and the mutation rate was set at 0.05. Note that the clustering and sectorization phases were separately implemented for the individual scenarios to obtain the optimal DMA layout for each scenario.

Adaptive DMAs Design and Operation
Furthermore, an optimization scheme was developed to dynamically transform the base DMA layout into various adaptive DMA layouts that can be separately applied to each abnormal scenario. The proposed method can assume that certain gate valves were added (i.e., with pipes closed), and certain valves (e.g., both existing and newly installed valves) have to be opened to flexibly transform the base DMAs into adaptive DMAs. To that end, an optimization scheme was developed based on the application of a GA according to the three major steps as follows.
Step 1: Objective Functions Definition The hydraulic performances of the optimal DMA layouts obtained for individual scenarios in p-WNP (Section 2.2) were considered as the observed values and used as a reference in the transformation stage. Accordingly, with a limited number of additional valves to be installed, an adaptive DMA layout should ensure the following: 1.
The deviation of the PU index between the adaptive DMAs and scenario-specific optimal DMAs is the smallest and applicable for multiple scenarios.

2.
The mean absolute percentage error (MAPE) of the nodal pressure between the adaptive DMAs and scenario-specific optimal DMAs is the lowest and applicable for multiple scenarios.
These two objectives are respectively defined in Equations (4) and (5), as follows: • Pressure uniformity deviation index, f 1 : where N s denotes the number of considered abnormal scenarios, PU s adap and PU s opt represent the PU index in the adaptive and optimal DMA layouts under scenario s, respectively. The lower value of f 1 indicates the better adaptive DMA layout.

•
Mean absolute percentage error (MAPE) of nodal pressure, f 2 : where n denotes the number of nodes in the network, H i,s adap and H i,s opt indicate the nodal pressure of node i in the adaptive and optimal DMA layouts under scenario s, respectively. This index immediately shows the MAPE of nodal pressures between the adaptive DMA layouts and the optimal DMA layouts, with the smaller values of f 2 indicating the better adaptive DMA solution.
The two objective function values were averaged and merged into a single fitness value of F, as expressed in Equation (6).
Step 2: Definition of Additional Valves Location and Settings This step identifies the possible location of the additional valve installation and the adaptive valve settings.
After determining the optimal DMA layouts for each scenario, the possible locations of the additional valves and valve settings can be defined as follows: • OS base cut , OS S1 cut , and OS S2 cut denote the optimal set-cut pipes (i.e., boundary pipes) in the optimal DMA layouts of the base scenario, S1 and S2, respectively. Note • The set-cut pipes for all scenarios were uniquely defined as the union of the optimal set-cut pipes under various scenarios, expressed as Thus, the potential search space for additional valve installation can be expressed as As expressed in Equation (9), the additional valves were installed in the set of conceptual cut pipes of the optimal layouts under scenarios S1 and S2 without seeking the optimal layout of the base scenario, wherein the flow meters and gate valves were already placed.

•
The decision space for the control valve settings {SP cvs } (i.e., opened or closed) represents the union of a set of additional valves {SP add.gv }, and a set of valves readily existed in the base design, expressed as Step 3: Implementation of GA Algorithm for Operating Adaptive DMAs To smoothly transform the base DMA layout into the new DMA layouts adapting to specific scenarios, the valves in {SP cvs } should reset their statuses (e.g., closed or open) to optimize the fitness value, such as that in Equations (6) and (7). Therefore, the abovementioned problem can be solved by simultaneously determining the decision variables to obtain the potential location of the additional valves and settings (i.e., opened or closed) of the existing valves of the base DMA layout as well as the newly installed valves. The GA-based optimization algorithm was implemented as follows.
Upon selecting the number of additional valves, N val , the genes in the individual solutions were categorized into two components-the former denoted the location of N val additional valves representing the pipe IDs in the set of SP add.gv , and the latter denoted the valve statuses in the set of {SP cvs } with the binary number, where gene 0 and 1 denote the closing and opening of the valves, respectively. This condition is mathematically expressed in Equations (11) and (12) as follows: where SP add.gv denotes the potential search space for the additionally installed valves, x(i, pipe) denotes the pipe ID i th in SP add.gv , and N ID indicates the length of SP add.gv .
In particular, {SP cvs } represents the set of potential search spaces for setting the valve statuses, j denotes the valve ID in {SP cvs }, and x(j, valve) indicates the status of the valve j th . For demonstration, let us assume that the base DMA layout with 18 gate valves was derived, and three additional valves were considered to install for transforming the base DMA into adaptive DMA layouts for application in two distinct scenarios: S1 and S2. In this case, a total of 45 decision variables should be optimized, which are denoted as a chromosome in Figure 2.
existed in the base design, expressed as Step 3: Implementation of GA Algorithm for Operating Adaptive DMAs To smoothly transform the base DMA layout into the new DMA layouts adapting to specific scenarios, the valves in { } should reset their statuses (e.g., closed or open) to optimize the fitness value, such as that in Equations (6) and (7). Therefore, the abovementioned problem can be solved by simultaneously determining the decision variables to obtain the potential location of the additional valves and settings (i.e., opened or closed) of the existing valves of the base DMA layout as well as the newly installed valves. The GA-based optimization algorithm was implemented as follows.
Upon selecting the number of additional valves, , the genes in the individual solutions were categorized into two components-the former denoted the location of additional valves representing the pipe IDs in the set of { . }, and the latter denoted the valve statuses in the set of { } with the binary number, where gene 0 and 1 denote the closing and opening of the valves, respectively. This condition is mathematically expressed in Equations (11) and (12) as follows: where { . } denotes the potential search space for the additionally installed valves, ( , ) denotes the pipe ID in { . } , and indicates the length of { . }. In particular, { } represents the set of potential search spaces for setting the valve statuses, denotes the valve ID in { }, and ( , ) indicates the status of the valve . For demonstration, let us assume that the base DMA layout with 18 gate valves was derived, and three additional valves were considered to install for transforming the base DMA into adaptive DMA layouts for application in two distinct scenarios: S1 and S2. In this case, a total of 45 decision variables should be optimized, which are denoted as a chromosome in Figure 2. As depicted in Figure 2, the genes in set A represent the variables of the additional valve locations. In particular, the integer numbers 1, 2, and 5 in the first three genes represent the pipe IDs in the set of defined search spaces for the additional valve installations, { . }. Moreover, the genes in sets B and C represent the variables for setting the valve status under the individual scenarios S1 and S2, respectively. The typical genes in these two sets can presume a binary number of 0 or 1 for closed or open valves, respectively. More specifically, and denote the statuses of new additional valves under scenarios S1 and S2, respectively. Furthermore, and represent the statuses of the existing valves under scenarios S1 and S2, respectively. As depicted in Figure 2, the genes in set A represent the variables of the additional valve locations. In particular, the integer numbers 1, 2, and 5 in the first three genes represent the pipe IDs in the set of defined search spaces for the additional valve installations, SP add.gv . Moreover, the genes in sets B and C represent the variables for setting the valve status under the individual scenarios S1 and S2, respectively. The typical genes in these two sets can presume a binary number of 0 or 1 for closed or open valves, respectively. More specifically, B 1 and C 1 denote the statuses of new additional valves under scenarios S1 and S2, respectively. Furthermore, B 2 and C 2 represent the statuses of the existing valves under scenarios S1 and S2, respectively.

Adaptive DMA Layouts Assessment
Overall, three indices were used to evaluate the performance of the adaptive DMA layouts under the abnormal operation scenarios. First, the root-mean-square error (RMSE) was used to demonstrate the representativeness of the adaptive DMA layout with the optimal DMA layout based on the relative range of the nodal pressure, as expressed in Equation (13). where H i opt and H i adap denote the pressures of node i under a particular scenario in the optimal and adaptive DMA layouts, respectively. n denotes the total number of demand nodes. As such, a low RMSE value indicates an improved solution.
Second, the water leakage reduction (WLR) deviation index W LR d was evaluated using Equation (14). In context, the WLR proposed by Ferrari and Savic [50] is expressed in Equation (15) where H 0 i and H 1 i denote the pressures of node i before and after partitioning, respectively; α represents the parameter of the leakage model, and following Giustolisi et al. [51], we assumed α = 1.2. In particular, the W LR d denotes the leakage reduction deviation, which indicates the leakage percentage deviation between the adaptive DMA layout (W LR adap ) and the optimal DMA layout (W LR opt ). In general, a lower value of W LR d indicates a superior solution.
Third, the rate of flow direction change (FDC) was utilized to quantify the variation in flow direction in an abnormal scenario compared to the base condition, which was further used as a surrogate indicator of water quality in the network, because a lower FDC indicates less possibility of red water occurrence, and the index can be expressed as where k denotes the number of pipes exhibiting flow direction alteration, m represents the total number of pipes in the network, and q and l denote the flow and length of the pipe in the network, respectively. Overall, a low percentage of FDC signifies an improved adaptive DMA layout.

Study Network
In this study, the ZJ network-a moderate real-world WDN first investigated by Zheng et al. [52] was utilized to demonstrate the proposed methods. To address the utility of the proposed method for managing the real operating conditions, the original ZJ network was slightly modified including two sources with 111 demand nodes and 183 pipes. In addition, we assumed a minimum required pressure head h * = 25 m for all demand nodes. Under normal operation, the network daily average demand was 1093 L/s. The diameter of the pipes ranged from 200 to 600 mm and the node elevation ranged from 5 to 6.5 m, which was relatively flat. As depicted in Figure 3a, the network topologies comprised several loops.
Subsequently, two abnormal scenarios were independently simulated as illustrated in Figure 3b. Scenario 1 (S1) indicates a demand increase in a certain region of the network during a period of time, for instance, increased water consumption during the holiday season in a vacation area. As indicated by the shaded region in Figure 3b, we assumed a 50% increase in the water demand at nodes, which yielded a nonhomogeneous spatial distribution of the water demand. Scenario 2 (S2) assumed that source B was closed for scheduled maintenance, as demonstrated in Figure 3b. Specifically, this scenario aimed to assess the network reliability under a source interruption, which constitutes the most critical consequences on the WDN supply capacity.
In this study, all the computations were performed in the MATLAB programming environment, version R2021a, linking to the EPANET hydraulic simulation model with a processor of AMD Ryzen 5600X CPU @ 3.7 GHz (12 CPUs) and 32 GB RAM on a Windows 10 environment. Subsequently, two abnormal scenarios were independently simulated as illustrated in Figure 3b. Scenario 1 (S1) indicates a demand increase in a certain region of the network during a period of time, for instance, increased water consumption during the holiday season in a vacation area. As indicated by the shaded region in Figure 3b, we assumed a 50% increase in the water demand at nodes, which yielded a nonhomogeneous spatial distribution of the water demand. Scenario 2 (S2) assumed that source B was closed for scheduled maintenance, as demonstrated in Figure 3b. Specifically, this scenario aimed to assess the network reliability under a source interruption, which constitutes the most critical consequences on the WDN supply capacity.
In this study, all the computations were performed in the MATLAB programming environment, version R2021a, linking to the EPANET hydraulic simulation model with a processor of AMD Ryzen 5600X CPU @ 3.7 GHz (12 CPUs) and 32 GB RAM on a Windows 10 environment.

Optimal DMA Designs for Individual Scenarios
A SOM grid size of 4 × 4 was determined satisfactory for clustering the study network-a larger grid size did not improve the segregation of the input data points, whereas a smaller grid size reduced the segregation. A trained SOM map was constructed after performing a total of 50,000 iterations. After the SOM-based cluster analysis, the CSA was adopted to aggregate the initial 16 clusters produced by the SOM. Overall, the network with the highest modularity index displayed the most suitable DMA partition. As portrayed in Figure 4, the same algorithm was initiated for the 16 clusters under all the scenarios, their own partition and aggregation of the network was facilitated by the diversity of the hydraulic regions in the initial clusters for each scenario. Moreover, the implementation of the CSA revealed that a modularity index (Q) of 0.63 was achieved under the base scenario in case the network topology was categorized into five DMAs, as portrayed in Figure 4a. Similarly, under S1 and S2, the modularity indices were maximized at 0.61 in case the partitioned network attained five DMAs, and it was 0.57 for the partitioned layout with four DMAs, as illustrated in Figure 4b,c, respectively. The Q index smoothly decreased, and as the algorithm terminated, a single DMA remained with a modularity index of zero.

Reservoir
Pipe Node

Optimal DMA Designs for Individual Scenarios
A SOM grid size of 4 × 4 was determined satisfactory for clustering the study network-a larger grid size did not improve the segregation of the input data points, whereas a smaller grid size reduced the segregation. A trained SOM map was constructed after performing a total of 50,000 iterations. After the SOM-based cluster analysis, the CSA was adopted to aggregate the initial 16 clusters produced by the SOM. Overall, the network with the highest modularity index displayed the most suitable DMA partition. As portrayed in Figure 4, the same algorithm was initiated for the 16 clusters under all the scenarios, their own partition and aggregation of the network was facilitated by the diversity of the hydraulic regions in the initial clusters for each scenario. Moreover, the implementation of the CSA revealed that a modularity index (Q) of 0.63 was achieved under the base scenario in case the network topology was categorized into five DMAs, as portrayed in Figure 4a. Similarly, under S1 and S2, the modularity indices were maximized at 0.61 in case the partitioned network attained five DMAs, and it was 0.57 for the partitioned layout with four DMAs, as illustrated in Figure 4b,c, respectively. The Q index smoothly decreased, and as the algorithm terminated, a single DMA remained with a modularity index of zero.  Upon implementing the DMA configurations, the DMA required isolation from each other by the optimal placement of the flowmeters and gate valves. To explore the sensitivities of the modularity-determined DMA numbers dominating the optimal DMA layout solution, a set of partitioned networks with DMA numbers ranging between two and seven was manually selected to optimize the location of the flowmeters and gate valves, and thereafter, compute the PU index according to Equation (2). Note that the layout with a single DMA is meaningless, and more than seven DMAs can be considered absurdly  Upon implementing the DMA configurations, the DMA required isolation from each other by the optimal placement of the flowmeters and gate valves. To explore the sensitivities of the modularity-determined DMA numbers dominating the optimal DMA layout solution, a set of partitioned networks with DMA numbers ranging between two and seven was manually selected to optimize the location of the flowmeters and gate valves, and thereafter, compute the PU index according to Equation (2). Note that the layout with a single DMA is meaningless, and more than seven DMAs can be considered absurdly high for the study network.
The detailed hydraulic performance evaluation and sectorization results with the selected number of DMA ranging from 2 to 7 for each scenario are listed in Table 1, where various indicators were compared to aid the selection of the optimal DMA layout for each scenario, considering the number of boundary pipes N bp , number of installed flow meters N f m , number of intervened gate valves N gv , maximum pressure H max , minimum pressure H min , mean pressure H mean , pressure uniformity (PU), and resilience index (RI). As observed from the results presented in Table 1, RI values that represent the system's capability to overcome failures [53] were directly proportional to PU values. Note that RI quantifies the pressure surplus in the network, whereas the PU explains the deviation of the nodal pressures from the minimum and average pressure. Although a lower PU value satisfied the PU proximate to the minimal pressure, it reduces the pressure surplus and, consequently, the RI index. Nevertheless, the increase in the number of DMAs improves the pressure management, as observed in the reduction of the PU index and overall system pressure. Notably, in case the number of DMA is greater than three in scenario S1 or more than five in scenario S2, the nodal pressures in certain districts dropped below the minimum required pressure of 25 m. Based on the performance indices summarized in Table 1, the optimal DMAs for each scenario can be determined. In particular, under the base scenario, the layout with 5 DMAs revealed the best-partitioned layout with a PU value of 0.46, whereas in scenario S1, the layout with 3 DMAs yielded a superior solution with a PU of 0.21. Similarly, the hydraulic performance evaluation under Scenario S2 indicated that the optimal DMA solution was obtained with the 5 DMAs, which was substantiated with a PU value of 0.29. The selected three optimal DMA layouts are illustrated in Figure 5, including the position of flowmeters and gate valves installed for each scenario. Under the normal operating condition (i.e., base scenario), 5 DMAs were controlled using 18 gate valves and 3 flowmeters. More specifically, reservoir A fed the three DMAs (e.g., DMA-1, DMA-2, and DMA-3), whereas reservoir B supplied the remaining two DMAs (e.g., DMA-4 and DMA-5), as portrayed in Figure 5a. In case the demand increased per the simulation in S1, an optimal DMA layout was obtained with 3 DMAs isolated by 12 gate valves and 2 flowmeters. In particular, the DMA layouts were redesigned to ensure that the increased demand zone (DMA-3) was simultaneously supplied by two sources, thereby maintaining the required pressure, as observed in Figure 5b. Under the disruption simulation of source B in scenario S2, the optimal layout achieved with 5 DMAs was isolated with 17 gate valves and 4 flowmeters, and all five DMAs were fed by source A, as depicted in Figure 5c. The preliminary analysis of the three optimal DMA layouts revealed that DMA-1 remained unchanged in every scenario and was supplied by source A. However, the remainder of the network was reconfigured depending on the abnormal scenarios.

Adaptive DMAs with Additional Valve Installation
As discussed in Section 3.2, the optimal DMA layouts for the three individual scenarios revealed a total of 27 conceptual cuts (i.e., OS all cut = 27), among which 21 pipes were permanently installed (i.e., OS base cut = 21) with three flowmeters (i.e., {OS base f m } = 3) and 18 closed valves (i.e., OS base gv = 18) were set up for base DMA layouts under normal operating condition (i.e., base scenario). The remaining six boundary pipes constituted the potential locations to install the additional valves (i.e., SP add.gv = 6) for adaptive DMA transformation. Upon the installation of the additional valves, the base DMAs can be dynamically transformed to new DMA layouts applicable to abnormal operation scenarios (i.e., scenarios S1 and S2). The location of the existing devices installed in the permanent DMAs of the base scenario along with the potential location of the additional valve installation is presented in Figure 6. The red pipes with a slash and blue triangle represent the permanent location of gate valves and flowmeters under the base scenario, respectively. The straight green lines depict the candidate positions for installing the additional valves.
(i.e., scenarios S1 and S2). The location of the existing devices installed in the permanent DMAs of the base scenario along with the potential location of the additional valve installation is presented in Figure 6. The red pipes with a slash and blue triangle represent the permanent location of gate valves and flowmeters under the base scenario, respectively. The straight green lines depict the candidate positions for installing the additional valves. In case six valves are installed in the candidate positions, the network can perfectly transform from the base DMAs to the adaptive DMAs optimally determined for scenarios S1 and S2. Herein, we considered a number between two and four additional valves, because a single valve is impractical, five valves would be excessive, and installing six valves is meaningless. Thereafter, the adaptive DMA layouts obtained using GA were individually executed for three instances by increasing the additional valves from two to four, corresponding to the number of decision variables as 42, 45, and 48, respectively. Moreover, the population was set to 200 with 5000 generations for the individual GA executions.
A graphical comparison of the fitness value and PU index for each scenario is presented in Figure 7 for the various numbers of additional valves installed. As observed, the fitness values gradually improved as the number of additional valves increased. Notably, a higher number of installed valves indicated an improved observance of the PU. Specifically, the solution with two additional valves can achieve a PU value of 0.25 and 0.32 under scenarios S1 and S2, respectively. Compared to the scenario-specific optimal solutions (i.e., optimal DMA layouts in Table 1), the percentage deviation of the PU values obtained with adaptive solutions (i.e., adaptive DMA layout) increased by 19.0% and 10.3% for scenarios S1 and S2, respectively. In particular, the solution with three additional valves installed displayed slightly improved performance than the two installed valves with PU In case six valves are installed in the candidate positions, the network can perfectly transform from the base DMAs to the adaptive DMAs optimally determined for scenarios S1 and S2. Herein, we considered a number between two and four additional valves, because a single valve is impractical, five valves would be excessive, and installing six valves is meaningless. Thereafter, the adaptive DMA layouts obtained using GA were individually executed for three instances by increasing the additional valves from two to four, corresponding to the number of decision variables as 42, 45, and 48, respectively. Moreover, the population was set to 200 with 5000 generations for the individual GA executions.
A graphical comparison of the fitness value and PU index for each scenario is presented in Figure 7 for the various numbers of additional valves installed. As observed, the fitness values gradually improved as the number of additional valves increased. Notably, a higher number of installed valves indicated an improved observance of the PU. Specifically, the solution with two additional valves can achieve a PU value of 0.25 and 0.32 under scenarios S1 and S2, respectively. Compared to the scenario-specific optimal solutions (i.e., optimal DMA layouts in Table 1), the percentage deviation of the PU values obtained with adaptive solutions (i.e., adaptive DMA layout) increased by 19.0% and 10.3% for scenarios S1 and S2, respectively. In particular, the solution with three additional valves installed displayed slightly improved performance than the two installed valves with PU values of 0.23 and 0.31, corresponding to a percentage deviation of PU that increased by 9.5% and 6.9% in comparison to the optimal solution for scenarios S1 and S2, respectively. Moreover, the PU values in a solution with four additional valves were proximate to the optimal solutions, which were 0.22 under scenario S1 and 0.30 under scenario S2, corresponding to a percentage deviation increase of 4.8% and 3.4% as compared to the optimal solution, respectively. This indicated that with only four additional valves installed combined with controlling existing valves, the adaptive DMA layouts mimic the performance of the optimal DMA layouts under S1 and S2.
The details of the computed performance indices for each solution (with various numbers of additional valves installed) under multiple scenarios are listed in Table 2.
Regarding the system pressure, the maximum pressure H max , minimum pressure H min , and system average pressure H mean of the adaptive DMAs were slightly higher than those of the optimal DMAs in both scenarios S1 and S2 because fewer valves were installed and closed. As more valves were newly installed and operated, the PU values improved and were similar to those of the optimal DMAs. Upon installing more additional valves and combining them with the operation of existing valves, the base DMA layout could dynamically transform into adaptive DMA layouts that mimic the hydraulic behaviors of the scenario-specific optimal DMAs. values of 0.23 and 0.31, corresponding to a percentage deviation of PU that increased by 9.5% and 6.9% in comparison to the optimal solution for scenarios S1 and S2, respectively. Moreover, the PU values in a solution with four additional valves were proximate to the optimal solutions, which were 0.22 under scenario S1 and 0.30 under scenario S2, corresponding to a percentage deviation increase of 4.8% and 3.4% as compared to the optimal solution, respectively. This indicated that with only four additional valves installed combined with controlling existing valves, the adaptive DMA layouts mimic the performance of the optimal DMA layouts under S1 and S2.  Table 2. Regarding the system pressure, the maximum pressure , minimum pressure , and system average pressure of the adaptive DMAs were slightly higher than those of the optimal DMAs in both scenarios S1 and S2 because fewer valves were installed and closed. As more valves were newly installed and operated, the PU values improved and were similar to those of the optimal DMAs. Upon installing more additional valves and combining them with the operation of existing valves, the base DMA layout could dynamically transform into adaptive DMA layouts that mimic the hydraulic behaviors of the scenario-specific optimal DMAs. The GA-determined solutions for the optimal additional valve locations and setting statuses are reported in Table 3. For instance, by adding two additional valves (i.e., solu-  The GA-determined solutions for the optimal additional valve locations and setting statuses are reported in Table 3. For instance, by adding two additional valves (i.e., solution 1), the optimal location was identified in pipes labeled a57 and a59. The two additional valves were closed (0) under scenario S1, whereas both of them were set to open (1) under scenario S2. This implied that the GA determined the appropriate position of valves and control settings (i.e., both newly added and existing) to mimic the hydraulic performances of the scenario-specific optimal DMAs. Thus, an existing DMA layout (i.e., base scenario) can utilize the combination of existing valves and additional valves to flexibly transform into adaptive DMA layouts for separate applications in each scenario.  (5) and (6) report the existing valve IDs that were opened and closed under individual scenarios, respectively. Note the valve IDs are presented in Figure 6.

Adaptive DMA Operation under Abnormal Scenarios
The locations of the additional valves and setting statuses are illustrated in Figure 8, which provided insights regarding the various adaptive DMA layouts obtainable with the solutions for each scenario. First, let us consider the adaptive DMA layouts obtained under scenario S1. Regardless of the increase in the number of additional valves N val , four existing closed valves (labeled as e20, e21, e22, e129) constituting the independence for DMA-1 (see Figure 5a for DMA-ID) remained closed, as observed in Figure 8a,c,e. Specifically, for the solution with N val = 2, the DMA-3, DMA-4, and a portion of DMA-5 ( Figure 5a) were clustered to form new DMA (i.e., colored in yellow as Figure 8a) by opening almost all the adjacent closed valves, whereas a portion of DMA-5 was newly formed with DMA isolated by two additional closing valves. Thus, this solution resulted in an adaptive DMA that can be recognized with four DMAs, as depicted in Figure 8a. As the N val increased, the existing closed valves in the base scenario were set according to those in the optimal layout. For N val = 3 and 4, the closure of the valves isolated the DMA-2 (Figure 5a) (labeled as e41, e44, and e87), DMA-3, and DMA-4 (labeled as e90, e94, and e107) that were sequentially set to open. This yielded the adaptive layouts with three and four DMAs that are illustrated in Figure 8c,e, respectively. Similarly, under scenario S2, the proposed algorithm suggested the opening of almost all boundary valves (labeled as e20, e21, e22, e129) between DMA-1 and DMA-3 (Figure 5a), DMA-2, and DMA-4 (labeled e41, e44, e87) to merge into a bigger DMAs, similar to those for solutions 1 and 2 (Figure 8b,d). However, the DMA-5 (Figure 5a) in solution 2 was categorized into two newly isolated DMAs controlled by the two additional closing valves (labeled a57, a59) and an existing valve (labeled e181), as observed in Figure 8d. Therefore, the adaptive DMA layouts obtained for this scenario contain three and four DMAs, as observed in Figure 8b,d, respectively. In case four additional valves were installed (i.e., solution 3), they were all maintained to be closed (labeled a46, a48, a53, a124), and thus, adaptive layouts were formed with four and six DMAs, as observed in Figure 8e,f for scenarios S1 and S2, respectively. In addition, the adaptive DMAs for this solution revealed hydraulic behaviors most likely proximate to its scenario-specific optimal DMA layouts.  Figure 8. Adaptive DMA layouts obtained after determining additional valves installed and settings; (a,c,e) depict adaptive DMA layouts obtained under scenario S1 corresponding to 2, 3, and 4 additional valves, respectively; (b,d,f) represent adaptive DMA layouts obtained under scenario S2 corresponding to 2, 3, and 4 additional valves, respectively. Background colors indicate DMAs.
Moreover, we compared the performance of the adaptive DMAs with the scenariospecific optimal DMAs under the individual abnormal scenarios, as presented in Figure 9 and Table 4. The scatter plots of nodal pressure indicate the feasibility of adaptive DMA layouts compared to the optimal DMA layouts according to multilevel valve control. The MAPE expressed in Equation (5) and the RMSE expressed in Equation (13) were used to quantify the results. As observed, the MAPE and RMSE values improved as the number of additional valves increased for both scenarios. Furthermore, the WLR rates of various adaptive DMA layouts were evaluated based on Equation (14) and compared with the optimal DMA layouts using the W LR d (Equation (15)). As reported in Table 4, the W LR d decreased from 67.07% to 37.75% compared to the optimal layout as the number of additional valves increased from two to four under scenario S1. Similarly, the W LR d values were drastically reduced from 58.34% (N val = 2) to 19.03% (N val = 4) under scenario S2. In addition, the FDC rates of the adaptive DMAs under abnormal scenarios compared to the base condition are summarized in Table 4. As observed, in scenario S1, 12.5-16.9% of pipes experienced the flow direction alterations, whereas in scenario S2, 18.6-20.3% of the pipes underwent flow variations. Notably, the value of FDC in adaptive DMA layouts under scenario S2 was higher than that under scenario S1 owing to the hydraulic complexity caused by the source interruption.

Discussion
In this study, the PU index was considered as an objective function and an indicator to optimize both optimal DMA layouts and, subsequently, used to transform the existing DMAs into adaptive DMAs for a specific scenario. However, other objective functions could be adopted without the loss of generality of the proposed approach. In principle, the solutions to mitigate anomalous events in partitioned networks involved the merging of adjacent DMAs by opening their boundary pipes. These solutions may not improve the level of equity in the network, but they cause an unnecessary increase in the hydraulic redundancy that raises the water losses, especially for persistent and cyclical events. Compared to alternative methodologies reported in the scientific literature, a positive aspect of the proposed methodology lies in the possibility of selecting potential existing valve locations combined with prior additional valves installed to control their statuses and, therefore, generate multiadaptive DMA layouts for individual scenarios, ensuring that the adaptive DMA layouts mimic the hydraulic performance of the optimal DMAs for a specific scenario.
Although the efficiency of the proposed method was proved and verified in a moderate size WDN, it should be applied in a large-scale WDN for practical implementation. Moreover, in reality, an optimized WDN encounters a pressure deficiency under extreme events that cause either no-flow or partial-flow at nodes. Therefore, the proposed approach can be further improved by considering various abnormal scenarios and using multiobjec-tive functions that can capture several aspects required for optimizing and determining a suitable serviceability level during specific abnormal operational cases.
Furthermore, the adaptive WDN operation and management in the face of uncertainties and risks require water utilities to reflect a range of plausible changes. Taking the COVID-19 pandemic as an example, in addition to affecting the performance of WDNs due to unexpected demand patterns [6,[54][55][56][57], COVID-19 has deteriorated the quality of natural water bodies [58,59]. Therefore, with water quantity management, scenario creation for future states of quality should be envisaged in further research to increase the resilience of the water system and improve emergency response plans.

Conclusions
This study proposed a new approach aimed at designing the optimal DMAs and smoothly transforming them into adaptive DMA layouts under abnormal operational scenarios. In particular, two plausible operational scenarios-one with increasing water demand and the other with source disruption-were assumed to demonstrate the proposed approach. First, the optimal DMA layouts were determined under each scenario by applying a coupled model of SOM and CSA that functioned to improve the pressure uniformity in the network. Subsequently, an optimization scheme based on the application of GA allowed the identification of the optimal location of additional valves and valve settings (i.e., both in newly added and existing valves) to transform the base DMA layout to the adaptive DMA layouts applicable for individual scenarios.
The proposed methodology affords the advantage of deriving adaptive DMA layouts from the already partitioned WDN with only a certain number of additional valves installed and associated with the resetting of the valve statuses for individual scenarios. The major findings and remarks of this study are stated as follows: 1.
The optimal DMA layouts for various plausible operational scenarios were created based on the minimization of the PU index and considered as a reference in the transformation stage for the adaptive DMA layouts applicable for individual scenarios.

2.
By providing a priori number and the location of the additional and existing valves that required control (e.g., closed or open), distinct adaptive DMA layouts could be obtained, separately applied in specific scenarios.

3.
The higher the number of additional valves installed, the better the hydraulic performance of adaptive DMAs obtained (e.g., pressure indices, PU, WLR, RMSE of pressure) to mimic the behavior of the optimal DMA layouts for specific scenarios.
The obtained adaptive DMA layouts provided optimal sustainable solutions that simultaneously ensured the restoration of the hydraulic performance under specific-operational scenarios and reduced the investment costs of a new optimal DMA layout. Thus, the proposed model can be utilized as a decision support tool that facilitates the task of water utilities and decision-makers involved in long-term DMA design, rehabilitation, operation, and adaptation.

Data Availability Statement:
The data presented in this study are available upon request from the corresponding author. The data are not publicly available because of privacy concerns.