*4.1. Simulation Setup and Pipe Network Configuration*

A synthetic benchmark WDN (pipe network A) was adopted from Reference [46] to test the applicability of PEOS in fault detection. The associated simulation followed the concept of district metering areas (DMAs), implying that the inflow and outflow of the pipe network system were steady and completely understood. User demands in the pipe network were considered to be constant and could be separated through continuous observation of mass conservations of flow measurements. Pipe network A, shown in Figure 3, is composed of 11 pipes, 9 nodes (with 7 in continuous outflow), 1 potential leak, 1 partial blockage, and 1 distributed deterioration reach. Notice that the characters "N", "P", "L", "B", and "D" represent the node, pipe, leak point, blockage point, and distributed deterioration reach, respectively. The properties of the pipes and nodes of pipe network A are listed in Table 4. The pipe material was considered to be cast iron with an aging effect on the material. Thus, the initial H–W coefficient *CHW*(0) for each pipe was 130. The H–W coefficient considering the effect of pipe aging (*CHW*(*t*)) for each pipe was calculated through Equations (2)–(4) and is given in the last column of Table 4. The initial wave speed *a0* of all pipes was postulated as 1000 m/s [25], except for the faulty parts. The impedance of each pipe was calculated by Equation (13) and is given in Table 4. Node N1 was the water supply node, with a constant inflow rate of 400 L/s and a constant head of 120 m. In addition, continuous discharges at N2, N3, N4, N5, N6, N8, and N9 had rates of 80, 40, 35, 35, 40, 80, and 80 L/s, respectively. The leak L1 was located at P11, 300 m away from N3, with *CdLAL* <sup>=</sup> 2.50 <sup>×</sup> <sup>10</sup>−<sup>4</sup> m2 and *QL* = 3.0 L/s. A partial blockage B1 was placed at P10, 200 m away from N9. It blocked about 20% of the cross-sectional area of P10, and thus the *CdBAB* was 5.6 <sup>×</sup> 10−<sup>2</sup> m2. In addition, a distributed deterioration reach, D1, occurred at a segment of P1 and was 200 m away from N2. The length and cross-sectional area of D1 were respectively designed to be 80 m and 0.071 m. Its wave speed was assumed to be 800 m/s, and thus the impedance was calculated as 1148.98 s/m<sup>2</sup> from Equation (13). In the simulation, N8 was treated as the transient generation and data measurement point for the simulation of a sudden closure of the valve. The total transient simulation time was considered to be 30 s, with a simulation time interval (Δ*t*) selected as 0.01 s. Thus, the initial Δ*x* was 10 m for the nondeterioration reach and further changed with the wave speed of the deterioration reach. The transient operation was fixed to 5 s for a simulation of the complete closure of the valve.


**Table 4.** The characteristics of the synthetic water distribution network (WDN) (pipe network A).

In the following section, the performance of the proposed approach is validated and compared to the other evolutionary algorithm-based approaches mentioned in Section 2.7. The maximum iteration (*Miter*) was 10,000. Notice that all of the results presented in the following sections were performed on a personal computer with an Intel 2.8 G i5-8400 CPU and 32 GB of RAM.

**Figure 3.** Configuration of pipe network A with a sectional view of P1.

#### *4.2. Validation and Application of PEOS*

The steady-state nodal heads and piping flow rates of pipe network A were solved by PNSOS in 52 s. The transient head distributions were further predicted by three benchmark algorithms and the proposed approach. Temporal transient perturbations were observed at N8 by applying different approaches with the various *NP* displayed in Figure 4a–d, and the predicted results are given in Table 5. The figures show that the transient perturbations fluctuated between 20 and 140 m with similar oscillatory patterns over 30 s. Figure 4a,b shows that PEGA and PEPSO overestimated the transient perturbations for the case *NP* = 10 due to an overestimation of the leakage area size by both algorithms. Such results reflect that the WDN contained a larger total flow rate at the beginning of transient perturbations. Moreover, the blockage at P10 was not detected by either PEGA or PEPSO. Thus, the transmission of water and pressure may not have been affected by the blockage, resulting in the accumulated volumes of water at N8 being higher than other cases when the transient operation point was closed. The predicted head was also overestimated in the case of PEGA for *NP* = 20. The calculations in both PEGA and PEPSO were forced to stop because they reached the maximum iteration, *Miter* = 10,000, in the cases of *NP* = 10 and 20. In contrast, the temporal transient perturbations displayed in Figure 4c,d were precisely reconstructed by two SOS-based approaches for all cases of ecosystem size. Deterioration, a blockage, and a leak were detected at P1, P10, and P11, respectively. Table 5 shows that the deterioration, blockage, and leak information was also accurately predicted by

two SOS-based approaches. The results prove that those two SOS-based approaches are capable of obtaining optimal fault information even after using fewer initial organisms, reflecting that PESOS and PEOS had great abilities in obtaining the best solution even when using less input data and guessing values. This may have greatly reduced the searching process and computation times. Moreover, Figure 5a,b displays the predicted results of PEOS for impedance and wave speed along P1 and P10, respectively. Both a partial blockage and a deteriorated section can also be identified from the plots of the predicted distributions of the impedance and wave speed in Figure 5. The successful numerical simulation validated the proposed approach to detecting various faults in WDNs.

**Figure 4.** Temporal transient perturbations at N8 of pipe network A predicted by (**a**) PEGA, (**b**) PEPSO, (**c**) PESOS, and (**d**) PEOS with various *NP*.



**Table 5.**

**Figure 5.** Impedance and wave speed along (**a**) P1 and (**b**) P10, determined by PEOS.

The present techniques were further executed five times to guarantee the reproducibility of the predicted result and to test its efficiency, accuracy, and robustness for obtaining the optimal solution. The *NP* was fixed at 50 for all algorithms, and thus all approaches were ensured to deliver accurate predictions, as the results demonstrate above. Table 6 delineates the performance of PEOS and other approaches (five times) in obtaining the optimal fault information of pipe network A. PEGA, PEPSO, and PESOS took about 331.2, 302.2, and 105.4 min and 8072, 7604, and 3882 iterations, respectively, to obtain optimal results over a five-time average. In contrast, PEOS took about 50.6 min and 1382 iterations to complete the searching process and obtain the optimal result. Apparently, PEOS outperformed PEGA and PEPSO, not only in computation time but also in convergence speed. The computational efficiency of PEOS was approximately 84.7% and 83.2% better than PEGA and PEPSO. The computational efficiency of PEOS in fault detection in the WDN significantly improved as a result of using the OOA and SOS. In addition, PEOS saved about 52.8% in computing time and 64% in iterations compared to PESOS, indicating that the OOA could significantly speed up optimization

computation by reasonably avoiding blind searches and unnecessary objective function evaluations in the optimization process. PEOS had superiority over the other methods in its fast convergence and effective computation. It also gave more accurate results than the other evolutionary-based algorithms.


**Table 6.** The performances of the four algorithms.

Note: CPU time is the computation time.
