**LU** = **DUΦ** for normalized cut (12)

where **Φ** := diag λ1, λ2, ... , λ*<sup>p</sup>* <sup>∈</sup> <sup>R</sup>*p*×*<sup>p</sup>* and **<sup>U</sup>** :<sup>=</sup> *u*1, *u*2, ... , *up* <sup>∈</sup> <sup>R</sup>*n*×*p*.

Equations (11) and (12) are eigenvalue problems for *p* smallest eigenvalues λ<sup>1</sup> = 0 ≤ λ<sup>2</sup> ≤···≤ λ*<sup>p</sup>* of the Laplacian matrix **L** and their corresponding eigenvectors *u*1, *u*2, ... , *up*.

The spectral clustering algorithm for a non-normalized Laplacian matrix can be described as shown in Figure 6. For other normalized spectral clustering, refer to Reference [78].

#### **Figure 6.** Flowchart of a non-normalized spectral clustering algorithm.

Using the spectral clustering methods mentioned above, many studies have adopted the spectral graph theory [47–49,81]. Di Nardo et al. [47] defined the optimal layout of DMAs in a real WDN. The authors took into account both geometric features (i.e., connectivity) and hydraulic pipe features (i.e., diameter, length, conductance, flow) through weight-adjacency matrices, which led to significantly different layouts of the DMAs. In particular, they compared different weighted spectral clustering (i.e., normalized versus non-normalized Laplacian) to determine the effectiveness of those approaches and the optimal choice of weights.

One of the most useful approaches for handling WDN complexity is a graph spectral technique (GST). Di Nardo et al. [49] pointed out that GST can analyze network topology by taking advantage of the properties of some graph matrices, providing a complete toolset to evaluate the performance and the evolution of networks. Based on two graph matrices (i.e., adjacency and Laplacian), the authors highlighted that GST metrics and the algorithms accomplish some crucial tasks of WDN management using topological and geometric information. In addition to the inherent ability to define the optimal clustering layout proposed in the literature, GST assisted in the calculation of a surrogate index for assessing topological WDN robustness using two indices, such as spectral gap and the algebraic connectivity. Additionally, the spectral technique also provides a framework that ranks important nodes in WDN to provide a useful approach to identify the location of valves or sensors or even determine the most influential nodes in a network [49].

Similarly, Liu and Han [48] also proposed a strategy for automatic DMA design based on spectral clustering and graph theory. The spectral algorithm was used to determine the best node clusters, which correspond to the DMAs' configuration based on steady-state simulations using the peak-hour demand. The study proposed a method for DMA design that combines spectral clustering, graph theory, and network centrality analysis. First, a combination of graph spectral theory and k-mean clustering was implemented to generate the initial DMAs. Then, to improve the cluster quality, a genetic algorithm (GA) was added to converge on a global optimum. To measure network centrality, the eigenvector centrality [82] was used to identify the critical nodes, and edges betweenness centrality [83] were adopted to measure the important pipes, creating a high-quality cluster. Most recently, Zevnik et al. [81,84] proposed spectral graph partitioning based on a generalized and normalized cut method and compared it with two known spectral methods (ratio cut and normalized cut).

In the field of machine learning, graph Laplacians are used not only for clustering, but also for many other tasks, such as semi-supervised learning. Herrera et al. [52,85] demonstrated that graph-based semi-supervised learning methods [86] can take into account various criteria for segmentation of WDNs into DMAs. In this method, the kernel matrix [87] was first defined and then the adjacency matrix was enriched by adding hydraulic data such as weight factors to transform the results into a kernel matrix. The spectral clustering algorithm was adapted to this new matrix. Finally, graph-based semi-supervised learning methods were conducted. A similar method was found in a study by Giudicianni et al. [36,88] in which semi-supervised multiscale clustering was used to create dynamic DMAs. Compared with methods that use only topological connectivity or vector information, semi-supervised clustering showed improvement by integrating both forms, leading to the efficient development of robust DMAs.

Spectral clustering can take into account topological, geometrical, or hydraulic aspects as weight factors, which allows for a careful consideration of alternative factors that can affect the goals of the DMA design and provide a multidimensional view to help managers make better decisions. However, for large-scale networks that have thousands of nodes and links, spectral clustering has limited applicability and becomes infeasible due to the computational complexity of *Q n*3 [52], where *n* is the number of nodes.

#### *3.6. Multi-Agent Approach*

A multi-agent system (MAS) [89] is a loosely coupled network of autonomous problem solvers composed of multiple interacting intelligent agents. Each agent works independently but can also interact with others to solve potential conflicts through negotiation. The properties of MAS can be described as follows.


MAS networks are suitable for handling multiple-problem approaches or multiple-agent solving entities. Known as a complex system due to the joining of many physical devices, a WDN comprises multiple parties with different goals, actions, and information and is a dynamic system. A small change in behavior of the parties may result in unpredictable patterns in the entire system. WDNs and multi-agents exhibit a strong similarity, and MASs can therefore provide solutions to distributed applications, such as the problem of network partitioning, which is known to be complex and has multiple constraints. MASs have been successfully applied to heterogeneity problems in the water field. They have proven to be highly efficient at optimizing water networks, control systems for municipal water, water pollution diagnosis, water quality enhancement, and water demand management [90].

In terms of WDN clustering, many elements must be simultaneously considered. A network can be divided into elements, which are considered as agents that communicate with each other. Izquierdo et al. [90] were the first to develop a suitable software environment to formulate DMA segmentation in a WDN using a multi-agent approach. They proposed a likelihood method by running a simulation as verification to divide networks into subsectors based on sources, nodes, and pipe properties, which consider nodes and pipes as agents of a separate breed. This can be seen as a premise to improve as well as implement the multi-agent methods in different studies. Herrera et al. [52] assumed an a priori set of DMAs based on the homogeneity of the districts, which was related to the source tanks in the network, where each reservoir was seeded for the corresponding DMAs. These agents adopted a method of clustering by elicitation, linking their adjacent nodes to the source points, and scanning the likelihood of each being assimilated into the corresponding DMA.

On the other side, Hajebi et al. [51] combined a *k*-means clustering method and multi-agent approach to WNP. In particular, *k*-means graph clustering was used to divide the network topology into a predetermined number of clusters and then a MAS was implemented to negotiate the configuration of the network by adjusting nodes on the boundary pipes of the corresponding clusters while considering the hydraulic constraints. Compared with previous studies by Herrera et al. [50], differences in the approaches are evident. In the former study, DMA layouts were determined based on the source points of the network and expanded by negotiation, while the latter started from the geographical clustering of the network and boundary pipes were modified to obtain the best hydraulic performance.
