## Abstract

Urban water distribution networks (UWDNs) are critical infrastructures that provide essential services in an urban setting. Such infrastructures are subject to frequent breakdowns, disrupting services to downstream users. Installation of isolation valves (IVs) at strategic locations can reduce such adverse impacts by isolating small segments of the network and expediting repairs, which in turn contribute to water conservation and leak control. However, determining the optimal number of IVs and their placement is a disturbing question for the researchers. This study proposes a methodology to assess the optimal number of IVs in a UWDN and identify their placement in the best of the worst possible scenarios. Based on the network topology and the associated IV costs, it identifies the optimal numbers and their places to minimize the maximum undeliverable demand. The methodology is illustrated with the help of a small water distribution network. Thereafter, the proposed methodology is applied to a real-type UWDN. The results indicate that the optimal number of IVs for the case study is 10, which should be placed at strategic locations to reduce the maximum undeliverable demand to 18% of the total demand.

## HIGHLIGHTS

To propose a methodology for determining the optimal number and locations of IVs.

To propose a methodology for disconnected segment identification and the corresponding undeliverable demand assessment.

To recommend the optimal number and its location based on min (max) undeliverable demand and associated IV cost.

## NOTATIONS

In the paper, the following symbols are used:

- A
pipe-node topological incidence matrix

- A(i, j)
the matrix element value in the pipe-node topological incidence matrix

*A*_{10}nodes with fixed heads

*A*_{11}the conductivities of the pipe in the network

*A*_{12}=nodes with fixed heads incidence matrix

*B*key terms in linear systems for connectivity analysis

*C*the unit price of the valve

- CMD
cubic meter per day

*d*diameter of the pipe

*D*_{sup}total water supply

*D*_{tot}total water demand

- H
vectors of unknown heads

- H
_{0} vector of fixed heads

- IVs
isolation valves

- M
the global coefficient matrix used in network resolution

*n*_{p}total number of pipes

*n*_{r}number of reservoirs

*n*_{u}unknown head values

**Pnv**pipe-node-valve topology incidence matrix

**pnv-red**pipe-node-valve topology reduced incidence matrix

**pnv-red-mod**pipe-node-valve topology reduced and modified incidence matrix

- q
vector of water demands attributed to the nodes of the unknown head

- Q
vector of pipe discharges

*S*segment identification number

- UWDN
urban water distribution networks

*V*(*i*,*j*)the value of the element for a given pair of indices

*i*and*j*- V
_{dn} vector of the nodes disconnected from the source

- WDN
water distribution network

## INTRODUCTION

Water is essential for the sustainable development and resilience of any urban infrastructure (Abbas 2023). An urban water distribution network (UWDN) is an essential component of an urban water supply scheme to deliver safe (Rashed 2022) and adequate drinking water to consumers under various operational conditions (Beker & Kansal 2022; Cemiloglu *et al.* 2023). However, these networks are prone to frequent breakdowns, leading to partial or no service for downstream users. Pipe fittings and other appurtenances such as isolation valves (IVs) play a crucial role in regulating the water flow in the network (Nogmov *et al.* 2023). By placing the IVs strategically in the network, damaged sections of the network segments can be isolated (Liu *et al.* 2017; Fiorini Morosini *et al.* 2020; Beker *et al.* 2022). During planned (such as regular maintenance) and unplanned (such as pipe breaks and water quality failure events) interruptions (Atashi *et al.* 2020; Simone *et al.* 2022), valves help to restore water supply to the unaffected areas while repairs are underway (Abdel-Mottaleb *et al.* 2022). As a result, the number of affected customers is minimized, and the loss of water is reduced (Suribabu 2017; Hwang *et al.* 2020; Wéber *et al.* 2023).

However, the important question is where and how many IVs should be provided in a UWDN. The *N*-rule, which suggests placing *N* IVs for each node with *N* connecting pipes, is considered an optimal layout from a hydraulic standpoint (Walski *et al*. 2007). Additionally, it is common practice to install one fewer valve than the number of pipes at a junction, known as the ‘*N* − 1’ rule for valves (Jun & Loganathan 2007; Liu *et al.* 2017). However, it is overly redundant and not cost-effective (Walski *et al*. 2007; Wéber *et al.* 2023). Thus, optimal segmentation for water distribution network (WDN) must be balanced against minimizing the cost of installed devices (Giustolisi & Ridolfi 2014). As a result, the WDN segmentation poses a difficult trade-off between the costs involved, particularly the implementation and maintenance of IVs, and the benefits generated for users (Fontanaa & Moraisb 2017).

Some models to optimize the location of IVs in WDN can be found in the literature. Given the complexity of the problem, many authors resort to heuristic optimization techniques to address it. Examples include approaches proposed by Creaco *et al.* (2010), Giustolisi & Savic (2010), and Yang *et al.* (2022). Yang *et al.* (2022) propose an optimization model for adding optimally located IVs to old WDN, which considers the dual objectives of economy and reliability. Authors such as Cattafi *et al.* (2013), Creaco *et al.* (2010), and Giustolisi & Savic (2010) have investigated the implications of water shortage during supply interruptions in WDNs to identify the optimal placement of IVs. Giustolisi & Savic (2010) used a genetic algorithm to optimize multiple objectives. The authors proposed two objectives: minimizing the number of IVs and minimizing the maximum total undeliverable demand. However, their methodologies did not incorporate the costs associated with the installed pipe diameter. In return, Creaco *et al.* (2010) presented a comparable model. However, instead of minimizing the number of IVs, they aim to minimize the overall cost of the IVs, which is linked to the diameter of the IVs implanted. However, heuristic algorithms cannot guarantee that the true Pareto front will be found. Cattafi *et al.* (2013) used the constraint logic programming algorithm to solve the same problem as Giustolisi & Savic (2010) and came up with better solutions.

This paper introduces a methodology for determining the optimal number and placement of IVs in UWDN. It addresses considerations related to IV costs, particularly associated with the installed pipe diameter, which significantly influences the overall effectiveness and economic feasibility of IV placement strategies. The study approach seeks to minimize the maximum undeliverable demand while also optimizing IVs-related costs, thereby identifying the optimal number of IVs and their optimal locations within the network. Additionally, the study proposes a methodology for segment identification, utilizing a hybrid and modified approach suggested by Giustolisi & Savic (2010) and Creaco *et al*. (2010). By integrating these considerations, the methodology aims to provide actionable insights for water utility managers and decision-makers, empowering them to improve the resilience and performance of UWDN.

The proposed methodology was applied to two case studies: first, a small UWDN to minimize the number of maximum affected customers and to demonstrate the underlying philosophy and second, a real-type UWDN to reduce the maximum undeliverable demand. Finally, the proposed methodology was compared with the N-rule and the one IV per pipe placement strategies approach in terms of reducing maximum undeliverable demand, number of IVs, and IVs-related costs. Results indicate that the optimization method outperforms both the *N*-rule and the ‘one IV per pipe placement’ approach in all these aspects.

## METHODOLOGY

### Rules for pipe-node topological incidence matrix

*in this matrix can have the values 0, −1, or 1:*

**A(i, j)**Using Equation (1), topological incidence matrix A can generate the pipe-node topological incidence matrix for the network depicted in Figure 1(a) and as shown in Table 1.

. | . | . | . | . | . | . | . |
---|---|---|---|---|---|---|---|

−1 | 1 | 0 | 0 | 0 | 0 | 0 | |

0 | −1 | 0 | 0 | 0 | 0 | 1 | |

0 | −1 | 1 | 0 | 0 | 0 | 0 | |

0 | 0 | −1 | 0 | 0 | 1 | 0 | |

0 | 0 | 0 | 0 | 0 | 1 | −1 | |

0 | 0 | 0 | 0 | 1 | −1 | 0 | |

0 | 0 | 0 | −1 | 1 | 0 | 0 | |

0 | 0 | −1 | 1 | 0 | 0 | 0 |

. | . | . | . | . | . | . | . |
---|---|---|---|---|---|---|---|

−1 | 1 | 0 | 0 | 0 | 0 | 0 | |

0 | −1 | 0 | 0 | 0 | 0 | 1 | |

0 | −1 | 1 | 0 | 0 | 0 | 0 | |

0 | 0 | −1 | 0 | 0 | 1 | 0 | |

0 | 0 | 0 | 0 | 0 | 1 | −1 | |

0 | 0 | 0 | 0 | 1 | −1 | 0 | |

0 | 0 | 0 | −1 | 1 | 0 | 0 | |

0 | 0 | −1 | 1 | 0 | 0 | 0 |

### Rules for pipe-node-valve-topological incidence matrix

Considering the installation of a maximum of one IV, the total maximum number of IVs is equal to the total number of pipes. For ease of use, we can set valve 1 to correspond to pipe 1, valve 2 to correspond to pipe 2, valve 3 to correspond to pipe 3, and so on until valve *n* corresponds to pipe *n*. Given this, the **p**ipe-**n**ode-**v**alve topology (**Pnv**) incidence matrix for Figure 1(b) may be generated using Equations (1) and (2), which should be regarded as Equation (3):

(3)

Columns for valves that are not installed on any pipes in Equation (3), which are represented by all-zero values, will be removed . Only columns corresponding to IVs installed on pipes will be retained , where the condition of valve closure may be represented by removing pipes of fictitious length (representing the valves themselves) (Creaco *et al*. 2010). The node will have formed as illustrated in Figure 1(c). In this case, the resulting matrix of the above (Equation (3)) would appear as follows, considering it as **pnv-red**:

(4)

### Identifying connected and disconnected nodes and pipes

After the installation of IVs is done, we can identify the nodes and pipes that are connected to the source node/supply reservoir in the WDN. Additionally, it identifies the disconnected nodes and pipes. This step follows the procedure proposed by Creaco *et al.* (2010).

**pnv-red**topology incidence matrix (Equation (4)), the sub-matrices are associated with different sets of nodes within the network, specifically, nodes with fixed heads (

*A*

_{10}) may be reservoirs or tanks, and nodes with unknown heads (

*A*

_{12}) (Todini & Pitali 1988; Todini 2003). To calculate vectors

**(vectors of unknown heads) and**

*H***Q**(vectors of pipe discharges), along with vector

**(vector of water demands attributed to the nodes of unknown head), considering the vector of fixed heads**

*q**H*

_{0}we need to solve by changing the nonlinear system formed by Todini (2003)). The mass and energy conservation equation can be given in a compact matrix form as follows:

*et al.*(2008), Giustolisi & Savic (2010) and Creaco

*et al.*(2010). (1) A linear expression for the pipe hydraulic resistance; (2) water demands are equal to zero (

**= 0); (3) the head in nodes with fixed heads is set to one; (4) the conductivities of the pipes in the network are assumed to be equal to one (**

*q**A*

_{11}=

*I*, where

*I*represents the identity matrix with the dimensions npnp). By solving Equation (5), the pseudoinverse matrix (p-inverse) set of connected and disconnected nodes and pipes from the source or tanks can be identified and described by Giustolisi

*et al.*(2008) and Creaco

*et al.*(2010):

This extended form indicates that by multiplying the inverse of matrix *M* with the vector *B*, we can obtain the vector that represents the unknown variables in the system. The solution to Equation (6), *X* = (*Q*, *H*)* ^{T}* is characterized by having the norm value. represents the norm of the vector calculated as the square root of the sum of the squared elements (Penrose 1955). As explained by Creaco

*et al.*(2010) the minimum norm value implies that the disconnected nodes, which are disconnected from the reservoir, will have heads equal to zero, while the connected nodes will have heads equal to one.

These vectors indicate the status of the nodes in the network. Node 1 and node 2, including the tank or reservoir node (node 1), are connected to the source (reservoir or tank) as their corresponding heads are equal to 1. On the other hand, nodes 3, 4, 5, 6, 7, 9, 10, 11, and 13 have heads equal to 0, indicating that they are disconnected from the source. As described by Creaco *et al.* (2010) disconnected nodes can be regarded as having a head value determined by the precision of the computing environment (e.g., MATLAB with a precision of 2.22 × 10^{−16}) and the complexity of the network structure under scrutiny.

Pipes that have at least one non-zero coefficient associated with them in the matrix **pnv-red-mod** are considered connected to the reservoir or source, except for the column representing the source node (*n*_{1}). In this specific network, pipe 1 is indicated as connected because it has a non-zero coefficient in the corresponding column of **pnv-red-mod.** On the other hand, pipes 2–8 are considered disconnected from the reservoir as all coefficients in their corresponding columns are zero.

### Segments identification and characterization

The nodes and pipes that are disconnected from the reservoir can be grouped into segments or sections of the network (Alvisi *et al*. 2011). These segments represent portions of the network that can be isolated independently by closing the IVs. By closing the IVs at certain points in the network, these segments can be physically separated from the rest of the network, allowing for localized maintenance, repairs, or other operations without affecting the entire system (Yang *et al.* 2022).

*et al.*(2010) using the vector V

_{dn}, which represents the nodes disconnected from the source. In the above, the nodes disconnected from the reservoir (Figure 1(c)) are = (3, 4, 5, 6,7,9, 10, 11, 13). In this procedure, a fictitious reservoir is introduced, replacing the actual reservoir in the network. The fictitious reservoir is assigned a head equal to one and is positioned at the first node of the V

_{dn}vector. In the case of the network in Figure 1(c), the fictitious reservoir is placed at node 3, resulting in the modified network as shown in Figure 2(a).

In the modified network, specifically for segment *S* = 1, encompassing nodes and pipes connected to the fictitious reservoir, identification is accomplished by applying the established procedure based on Equations (4)–(9). This entails a systematic repetition of the procedure on the modified network to determine the nodes and pipes belonging to segment *S* = 1. In the illustrated network (Figure 2(a)), nodes 3, 4, 5, 10, and 13 constitute segment *S* = 1, along with pipes 3, 6, 7, and 8. Upon identifying and eliminating segment *S* = 1 from vector V_{dn}, the updated vector becomes = (6, 7, 9, 11). Subsequently, the procedure iterates until vector V_{dn} is devoid of elements. Applying this process to the network shown in Figure 2(b), where node 6 represents the fictitious reservoir, we identified the second segment using the previously described procedure. The second segment is identified with nodes 6, 7, 9, and 11, and pipes 2, 4, and 5.

### Calculation of undeliverable demand

To calculate the undeliverable demand for each segment, the algorithm follows a procedure that considers any unintended or involuntary disconnections (Berardi *et al.* 2022). This procedure involves allocating user demand along the pipes, rather than solely at the nodes. By distributing the user demand along the pipes, a more accurate estimation of the undeliverable demand can be obtained, particularly in situations where segments are isolated. This choice of allocating demand along the pipes instead of just at nodes allows for a more comprehensive assessment of the undeliverable demand, considering the potential effects of the segment removal or isolation on user demand.

To calculate the total water demand of the network (*D*_{tot}), the individual demands associated with each pipe in the system are summed together. This calculation begins with the initial network configuration as shown in Figure 1(a). We take into consideration the demands of each pipe in this configuration (P-1 = 0, P-2 = 11, P-3 = 19, P-4 = 6, P-5 = 7, P-6 = 7, P-7 = 3, and P-8 = 9 L/s). P-1 is designated to carry zero flow, ensuring that the customers do not receive water from mainlines. The total water demand for the whole network is then calculated by adding these demands together, resulting in a total of 62 L/s. In the subsequent step, to calculate the undeliverable demand as a result of isolation or removal of the particular segment we should subtract the supplied demand (*D*_{sup}) from (*D*_{tot}).

*S*= 1, are eliminated (Figure 3(a)), and

*S*= 2, composed of pipes 2, 4, and 5, are removed (Figure 3(b)), resulting in an undeliverable demand of 38 and 24 L/s, respectively.

It is important to mention that when IVs are installed in all the connected pipes near a node, it creates a node segment where the segment consists only of that particular node. However, due to the assumption that demands or the number of users are allocated only along the pipes, the node segment does not have any associated undeliverable demand (Creaco *et al.* 2010; Giustolisi & Savic 2010). In other words, isolating such a node segment does not result in an undeliverable demand since there are no demands or number of users allocated directly to the isolated node. The same procedure is applied to compute the number of affected customers associated with the segment.

### Optimal number and placement of IVs

The algorithm for optimal IV placement follows the outlined procedure, systematically exploring all possible placements for ‘*n*’ pipes. Each pipe can have a maximum of one IV, with three possible states: installed on the upper side, the downside, or not installed at all (Equation (2)). The search space or scenario for this process is determined by the formula: The number of states raised to the power of the number of pipes.

*et al.*(2022). Utilizing this formula, the total cost is calculated by summing up individual IV costs:where

*d*represents the diameter of the pipe where the valve is located and

*C*represents the unit price of the IVs in Chinese Yuan (CNY).

The optimization process seeks the optimal number and placement of IVs associated with the minimized maximum undeliverable demand, considering the number of valves (unique IVs). Using MATLAB, the optimal result is implemented and stored in a cell array. It includes the number of IVs and their minimized maximum undeliverable demand, the state list, the pipe in which the valve is installed, and the total associated cost of the IVs.

## APPLICATION OF THE METHOD

### Case study 1: Small UWDN example

The optimization for placing a maximum of one IV per pipe considers three possible states for IV placement: near the *i*-th node (state-2), near the *j*-th node (state-3), or no placement of any valve (state-1). If we generate all possible combinations of the IVs, we have = 729 possible unique IVs placements. However, as described by Creaco *et al.* (2010) and Giustolisi & Savic (2010), to facilitate maintenance operations on the transmission main directly connected to the reservoir, the need for isolation arises. In this context, there is typically a valve in place for disconnecting the reservoir from the upstream section of the transmission main. Two distinct options come into consideration for the placement of additional valves to achieve complete isolation of the transmission main. The first option entails installing a single valve near the transmission main downstream node, specifically near node 2 of pipe 1. This placement effectively disconnects the connection between the reservoir and the transmission main, allowing for transmission main maintenance. The second option is to install IVs in pipes 2 and 3, which are directly connected to the transmission main near node 2.

Both of these options fulfill the fundamental objective of isolating the transmission main to facilitate maintenance operations. However, the second option, which involves placing valves on connected pipes, carries an additional benefit. It supports the formation of network segments within the distribution system, which can prove advantageous in various operational scenarios. Accordingly, in Figure 4(a), there are two pipes connected (pipe 2 and pipe 3) downstream of the transmission main (pipe 1) leading from the reservoir. This implies a minimum of two IVs are required to be placed in the network. By installing these two IVs, these two pipes connected to the transmission main lines offer the possibility of isolating transmission mains without disrupting any part of the water distribution system. Placing the minimum of two IVs, both upstream (near node 2), and no placement of IVs on pipe 1, we should reduce the number of scenarios generated. Hence, there is now no need to install an IV on pipe 1. On pipes 2 and 3, we should install on the upper side (near node 2), and we are left with pipes 4, 5, and 6. Therefore, the number of possible scenarios generated was = 27.

Lastly, it is crucial to acknowledge, as also noted by Giustolisi & Savic (2010), that a single-source network design does not necessarily adhere to optimal technical practices. However, it has been intentionally employed in this study to serve as a practical means of displaying the methodology and evaluating the performance of the optimization algorithm.

### Case study 1: Result and discussion

The findings of case study 1, focusing on the small UWDN example shown in Figure 1(a), are displayed in Table 2, which presents all possible placements of IVs. The table includes corresponding scenario numbers, the number of installed IVs, valve states, IV placements on the pipe, and other corresponding results. This comprehensive data for each scenario involving IV placement serve to illustrate the methodology used in the study.

Scenario . | Number of installed IVs . | Valve state . | IVs installed on the pipe . | Closing the IVs installed on the pipe . | Segment formed . | Pipelines in segment . | Number of affected customers for isolated segment (thousand) . | Maximum affected customers (thousand) . | Total cost of IVs (CNY) . |
---|---|---|---|---|---|---|---|---|---|

24 | 5 | 2,2,3,2,3 | 2,3,4,5,6 | 3,4,6 | S1 | 3,4,6 | 30 + 12 + 5 = 47 | 47 | 12,704.7 |

4,5 | S2 | 5 | 10 | ||||||

2,5,6 | S3 | 2 | 20 | ||||||

27 | 5 | 2,2,3,3,3 | 2,3,4,5,6 | 3,4,6 | S1 | 3,4,6 | 30 + 12 + 5 = 47 | 47 | 12,704.7 |

2,5,6 | S2 | 2,5 | 20 + 10 = 30 | ||||||

15 | 5 | 2,2,3,2,2 | 2,3,4,5,6 | 3,4,6 | S1 | 3,4 | 30 + 12 = 42 | 42 | 12,704.7 |

4,5 | S2 | 5 | 10 | ||||||

2,5,6 | S3 | 2,6 | 20 + 5 = 25 | ||||||

18 | 5 | 2,2,3,3,2 | 2,3,4,5,6 | 3,4,6 | S1 | 3,4 | 30 + 12 = 42 | 42 | 12,704.7 |

2,5,6 | S2 | 2,5,6 | 20 + 10 + 5 = 35 | ||||||

17 | 5 | 2,2,2,3,2 | 2,3,4,5,6 | 3,4,6 | S1 | 3 | 30 | 30 | 12,704.7 |

4,5 | S2 | 4 | 12 | ||||||

2,5,6 | S3 | 2,5,6 | 20 + 10 + 5 = 35 | ||||||

23 | 5 | 2,2,2,2,3 | 2,3,4,5,6 | 3,4,6 | S1 | 3,6 | 30 + 5 = 35 | 35 | 12,704.7 |

4,5 | S2 | 4,5 | 12 + 10 = 22 | ||||||

2,5,6 | S3 | 2 | 20 | ||||||

26 | 5 | 2,2,2,3,3 | 2,3,4,5,6 | 3,4,6 | S1 | 3,6 | 30 + 5 = 35 | 35 | 12,704.7 |

4,5 | S2 | 4 | 12 | ||||||

2,5,6 | S3 | 2,5 | 20 + 10 = 30 | ||||||

14 | 5 | 2,2,2,2,2 | 2,3,4,5,6 | 3,4,6 | S1 | 3 | 30 | 30 | 12,704.7 |

4,5 | S2 | 4,5 | 12 + 10 = 22 | ||||||

2,5,6 | S3 | 2,6 | 20 + 5 = 25 | ||||||

9 | 4 | 2,2,3,3 | 2,3,4,5 | 2,3,4,5 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 10,320.2 |

6 | 4 | 2,2,3,2 | 2,3,4,5 | 2,3,4,5 | S1 | 2,3,4,6 | 20 + 30 + 12 + 5 = 67 | 67 | 10,320.2 |

4,5 | S2 | 5 | 10 | ||||||

8 | 4 | 2,2,2,3 | 2,3,4,5 | 2,3,4,5 | S1 | 2,3,5,6 | 20 + 30 + 10 + 5 = 65 | 65 | 10,320.2 |

4,5 | S2 | 4 | 12 | ||||||

22 | 4 | 2,2,2,3 | 2,3,5,6 | 3,5,6 | S1 | 3,4,5,6 | 30 + 12 + 10 + 5 = 57 | 57 | 10,166.0 |

2,5,6 | S2 | 2 | 20 | ||||||

5 | 4 | 2,2,2,2 | 2,3,4,5 | 2,3,4,5 | S1 | 2,3,6 | 20 + 30 + 5 = 55 | 55 | 10,320.2 |

4,5 | S2 | 4,5 | 12 + 10 = 22 | ||||||

13 | 4 | 2,2,2,2 | 2,3,5,6 | 3,4,6 | S1 | 3,4,5 | 30 + 12 + 10 = 52 | 52 | 10,166.0 |

2,5,6 | S2 | 2,6 | 20 + 5 = 25 | ||||||

11 | 4 | 2,2,2,2 | 2,3,4,6 | 3,4,6 | S1 | 3 | 30 | 47 | 10,320.2 |

2,4,6 | S2 | 2,4,5,6 | 20 + 12 + 10 + 5 = 47 | ||||||

21 | 4 | 2,2,3,3 | 2,3,4,6 | 3,4,6 | S1 | 3,4,6 | 30 + 12 + 5 = 47 | 47 | 10,320.2 |

2,4,6 | S2 | 2,5 | 20 + 10 = 30 | ||||||

25 | 4 | 2,2,3,3 | 2,3,5,6 | 3,5,6 | S1 | 3,4,6 | 30 + 12 + 5 = 47 | 47 | 10,166.0 |

2,5,6 | S2 | 2,5 | 20 + 10 = 30 | ||||||

12 | 4 | 2,2,3,2 | 2,3,4,6 | 3,4,6 | S1 | 3,4 | 30 + 12 = 42 | 42 | 10,320.2 |

2,4,6 | S2 | 2,5,6 | 20 + 10 + 5 = 35 | ||||||

16 | 4 | 2,2,3,2 | 2,3,5,6 | 3,5,6 | S1 | 3,4 | 30 + 12 = 42 | 42 | 10,166.0 |

2,5,6 | S2 | 2,5,6 | 20 + 10 + 5 = 35 | ||||||

20 | 4 | 2,2,2,3 | 2,3,4,6 | 3,4,6 | S1 | 3,6 | 30 + 5 = 35 | 42 | 10,320.2 |

2,4,6 | S2 | 2,4,5 | 20 + 12 + 10 = 42 | ||||||

2 | 3 | 2,2,2 | 2,3,4 | 2,3 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 7,935.7 |

3 | 3 | 2,2,3 | 2,3,4 | 2,3 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 7,935.7 |

4 | 3 | 2,2,2 | 2,3,5 | 2,3 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 7,781.5 |

7 | 3 | 2,2,3 | 2,3,5 | 2,3 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 7,781.5 |

10 | 3 | 2,2,2 | 2,3,6 | 2,3 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 7,781.5 |

19 | 3 | 2,2,3 | 2,3,6 | 2,3 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 7,781.5 |

1 | 2 | 2,2 | 2,3 | 2,3 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 5,397.0 |

Scenario . | Number of installed IVs . | Valve state . | IVs installed on the pipe . | Closing the IVs installed on the pipe . | Segment formed . | Pipelines in segment . | Number of affected customers for isolated segment (thousand) . | Maximum affected customers (thousand) . | Total cost of IVs (CNY) . |
---|---|---|---|---|---|---|---|---|---|

24 | 5 | 2,2,3,2,3 | 2,3,4,5,6 | 3,4,6 | S1 | 3,4,6 | 30 + 12 + 5 = 47 | 47 | 12,704.7 |

4,5 | S2 | 5 | 10 | ||||||

2,5,6 | S3 | 2 | 20 | ||||||

27 | 5 | 2,2,3,3,3 | 2,3,4,5,6 | 3,4,6 | S1 | 3,4,6 | 30 + 12 + 5 = 47 | 47 | 12,704.7 |

2,5,6 | S2 | 2,5 | 20 + 10 = 30 | ||||||

15 | 5 | 2,2,3,2,2 | 2,3,4,5,6 | 3,4,6 | S1 | 3,4 | 30 + 12 = 42 | 42 | 12,704.7 |

4,5 | S2 | 5 | 10 | ||||||

2,5,6 | S3 | 2,6 | 20 + 5 = 25 | ||||||

18 | 5 | 2,2,3,3,2 | 2,3,4,5,6 | 3,4,6 | S1 | 3,4 | 30 + 12 = 42 | 42 | 12,704.7 |

2,5,6 | S2 | 2,5,6 | 20 + 10 + 5 = 35 | ||||||

17 | 5 | 2,2,2,3,2 | 2,3,4,5,6 | 3,4,6 | S1 | 3 | 30 | 30 | 12,704.7 |

4,5 | S2 | 4 | 12 | ||||||

2,5,6 | S3 | 2,5,6 | 20 + 10 + 5 = 35 | ||||||

23 | 5 | 2,2,2,2,3 | 2,3,4,5,6 | 3,4,6 | S1 | 3,6 | 30 + 5 = 35 | 35 | 12,704.7 |

4,5 | S2 | 4,5 | 12 + 10 = 22 | ||||||

2,5,6 | S3 | 2 | 20 | ||||||

26 | 5 | 2,2,2,3,3 | 2,3,4,5,6 | 3,4,6 | S1 | 3,6 | 30 + 5 = 35 | 35 | 12,704.7 |

4,5 | S2 | 4 | 12 | ||||||

2,5,6 | S3 | 2,5 | 20 + 10 = 30 | ||||||

14 | 5 | 2,2,2,2,2 | 2,3,4,5,6 | 3,4,6 | S1 | 3 | 30 | 30 | 12,704.7 |

4,5 | S2 | 4,5 | 12 + 10 = 22 | ||||||

2,5,6 | S3 | 2,6 | 20 + 5 = 25 | ||||||

9 | 4 | 2,2,3,3 | 2,3,4,5 | 2,3,4,5 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 10,320.2 |

6 | 4 | 2,2,3,2 | 2,3,4,5 | 2,3,4,5 | S1 | 2,3,4,6 | 20 + 30 + 12 + 5 = 67 | 67 | 10,320.2 |

4,5 | S2 | 5 | 10 | ||||||

8 | 4 | 2,2,2,3 | 2,3,4,5 | 2,3,4,5 | S1 | 2,3,5,6 | 20 + 30 + 10 + 5 = 65 | 65 | 10,320.2 |

4,5 | S2 | 4 | 12 | ||||||

22 | 4 | 2,2,2,3 | 2,3,5,6 | 3,5,6 | S1 | 3,4,5,6 | 30 + 12 + 10 + 5 = 57 | 57 | 10,166.0 |

2,5,6 | S2 | 2 | 20 | ||||||

5 | 4 | 2,2,2,2 | 2,3,4,5 | 2,3,4,5 | S1 | 2,3,6 | 20 + 30 + 5 = 55 | 55 | 10,320.2 |

4,5 | S2 | 4,5 | 12 + 10 = 22 | ||||||

13 | 4 | 2,2,2,2 | 2,3,5,6 | 3,4,6 | S1 | 3,4,5 | 30 + 12 + 10 = 52 | 52 | 10,166.0 |

2,5,6 | S2 | 2,6 | 20 + 5 = 25 | ||||||

11 | 4 | 2,2,2,2 | 2,3,4,6 | 3,4,6 | S1 | 3 | 30 | 47 | 10,320.2 |

2,4,6 | S2 | 2,4,5,6 | 20 + 12 + 10 + 5 = 47 | ||||||

21 | 4 | 2,2,3,3 | 2,3,4,6 | 3,4,6 | S1 | 3,4,6 | 30 + 12 + 5 = 47 | 47 | 10,320.2 |

2,4,6 | S2 | 2,5 | 20 + 10 = 30 | ||||||

25 | 4 | 2,2,3,3 | 2,3,5,6 | 3,5,6 | S1 | 3,4,6 | 30 + 12 + 5 = 47 | 47 | 10,166.0 |

2,5,6 | S2 | 2,5 | 20 + 10 = 30 | ||||||

12 | 4 | 2,2,3,2 | 2,3,4,6 | 3,4,6 | S1 | 3,4 | 30 + 12 = 42 | 42 | 10,320.2 |

2,4,6 | S2 | 2,5,6 | 20 + 10 + 5 = 35 | ||||||

16 | 4 | 2,2,3,2 | 2,3,5,6 | 3,5,6 | S1 | 3,4 | 30 + 12 = 42 | 42 | 10,166.0 |

2,5,6 | S2 | 2,5,6 | 20 + 10 + 5 = 35 | ||||||

20 | 4 | 2,2,2,3 | 2,3,4,6 | 3,4,6 | S1 | 3,6 | 30 + 5 = 35 | 42 | 10,320.2 |

2,4,6 | S2 | 2,4,5 | 20 + 12 + 10 = 42 | ||||||

2 | 3 | 2,2,2 | 2,3,4 | 2,3 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 7,935.7 |

3 | 3 | 2,2,3 | 2,3,4 | 2,3 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 7,935.7 |

4 | 3 | 2,2,2 | 2,3,5 | 2,3 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 7,781.5 |

7 | 3 | 2,2,3 | 2,3,5 | 2,3 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 7,781.5 |

10 | 3 | 2,2,2 | 2,3,6 | 2,3 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 7,781.5 |

19 | 3 | 2,2,3 | 2,3,6 | 2,3 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 7,781.5 |

1 | 2 | 2,2 | 2,3 | 2,3 | S1 | 2,3,4,5,6 | 20 + 30 + 12 + 10 + 5 = 77 | 77 | 5,397.0 |

As shown in Table 2, the number of affected customers for isolated segments is determined individually, with the maximum number of affected customers selected from these segments. The total cost of IVs for each scenario is calculated by summing the associated costs of individual IVs. To shut down the entire WDN, IVs should be installed on pipes 2 and 3, near node 2, forming one segment, which would affect all customers if both IVs are closed. Attempting to place three IVs at optimal locations does not reduce the maximum number of affected customers. For four IVs, there are 12 possible placements, and for five IVs, there are eight possible placements. Installing four IVs can minimize the maximum number of affected customers to 42,000 (i.e., scenarios 12, 16, and 20). The optimal placement for four IVs is scenario number 16 (as shown in Figure 4(b)), incurring low IVs cost and resulting in two segment formations. The first segment, comprising pipes 3 and 4, had a maximum of 35,000 affected customers when isolated, while the second segment, comprising pipes 2, 5, and 6, resulted in a maximum of 42,000 affected customers when isolated. With five IVs installed at the optimal placement (scenarios 14 and 17), the maximum number of affected customers is reduced to 30,000 (see Figure 4(c) for scenario 14). Both scenarios are equally optimal as they result in the same total cost for installing five IVs.

### Case study 2*:* Real-type UWDN

*et al.*(1995). In this case study, two objectives have been minimized during the optimal placement of the IVs system: the minimization of the number of IVs and the minimization of the maximum undeliverable demand, while also considering the associated cost of the IVs.

### Case study 2: Result and discussion

Number of IVs . | Maximum undeliverable demand (CMD) . | IVs installed on a pipe . | The state of the IVs installed on . | Pipelines in a segment that will result in maximum undeliverable demand . | Closing the IVs installed on the pipe . | Total cost of IVs (CNY) . |
---|---|---|---|---|---|---|

2 | 477.98 | 2,13 | 2,2 | 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 | 2,13 | 4,572.2 |

4 | 241.40 | 2,5,9,13 | 2,2,3,2 | 2,3,4,7,8,9 | 2,5,9 | 8,187.5 |

5 | 207.50 | 2,4,5,9,13 | 2,2,3,3,2 | 6,10,11,12,13,14,15,16,17,18,19,20,21,22 | 5,9,13 | 10,375.2 |

6 | 163.58 | 2,3,9,13,16,22 | 2,2,3,2,2,3 | 13,14,15,18,19,20,21,22 | 13,16,22 | 11,308.4 |

7 | 123.77 | 2,3,5,8,13,15,19 | 2,2,3,2,2,3,2 | 13,14,15,18 | 13,15,19 | 14,187.2 |

8 | 115.24 | 2,3,5,7,9,13,14,19 | 2,2,3,2,3,2,3,2 | 3,4,5 | 3,5 | 16,093.2 |

9 | 94.67 | 2,3,5,7,9,13,15,18,19 | 2,2,2,2,3,2,3,2,3 | 13,14,15 | 13,15,18 | 18,041.7 |

10 | 85.37 | 2,3,4,5,7,9,13,14,18,19 | 2,2,2,3,2,3,2,3,2,3 | 2 | 2,3,7 | 20,229.4 |

Number of IVs . | Maximum undeliverable demand (CMD) . | IVs installed on a pipe . | The state of the IVs installed on . | Pipelines in a segment that will result in maximum undeliverable demand . | Closing the IVs installed on the pipe . | Total cost of IVs (CNY) . |
---|---|---|---|---|---|---|

2 | 477.98 | 2,13 | 2,2 | 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22 | 2,13 | 4,572.2 |

4 | 241.40 | 2,5,9,13 | 2,2,3,2 | 2,3,4,7,8,9 | 2,5,9 | 8,187.5 |

5 | 207.50 | 2,4,5,9,13 | 2,2,3,3,2 | 6,10,11,12,13,14,15,16,17,18,19,20,21,22 | 5,9,13 | 10,375.2 |

6 | 163.58 | 2,3,9,13,16,22 | 2,2,3,2,2,3 | 13,14,15,18,19,20,21,22 | 13,16,22 | 11,308.4 |

7 | 123.77 | 2,3,5,8,13,15,19 | 2,2,3,2,2,3,2 | 13,14,15,18 | 13,15,19 | 14,187.2 |

8 | 115.24 | 2,3,5,7,9,13,14,19 | 2,2,3,2,3,2,3,2 | 3,4,5 | 3,5 | 16,093.2 |

9 | 94.67 | 2,3,5,7,9,13,15,18,19 | 2,2,2,2,3,2,3,2,3 | 13,14,15 | 13,15,18 | 18,041.7 |

10 | 85.37 | 2,3,4,5,7,9,13,14,18,19 | 2,2,2,3,2,3,2,3,2,3 | 2 | 2,3,7 | 20,229.4 |

It may be noticed from Table 3 that the minimum number of IVs required in the UWDN of Figure 5 is 2 (in pipes 2 and 13), and the maximum is 10 (in pipes 2, 3, 4, 5, 7, 9, 13, 14, 18, and 19). Closing the IVs installed on the 2nd and 13th pipes near node 2 will result in the formation of a single segment, thereby affecting the entire WDN. However, strategically placing four IVs at optimal locations on pipes 2, 5, 9, and 13 will lead to the formation of two segments. Segment 1 comprises pipes 2, 3, 4, 7, 8, and 9, while segment 2 includes pipes 13, 14, 15, 18, 19, 20, 21, 22, 17, 12, 11, 5, 6, 10, and 16. This formation occurs when we close the IVs installed on pipes 2, 5, and 9 (forming segment 1) and on pipes 5, 9, and 13 (forming segment 2). In the event of a pipe failure or the need to close a pipe for maintenance (such as pipe 3), there is no need to isolate the entire WDN; simply isolating segment 1 will sufficient. This will result in a maximum undeliverable demand of 241.40 CMD, representing 51% of the total daily water demand of 477.98 CMD. If there is a pipe failure or maintenance required for any pipes within segment 2, isolating segment 2 alone will be sufficient. This isolation will result in an undeliverable demand of 236.58 CMD.

Similarly, installing 5, 6, 7, 8, and 9 IVs at optimal placements demonstrates reductions in the maximum undeliverable demand to 43, 34, 26, 24, and 20%, respectively, compared to the total undeliverable demand. Installing 10 IVs at optimal locations (in pipes 2, 3, 4, 5, 7, 9, 13, 14, 18 and 19) will result in seven segments formation and reduce the maximum undeliverable demand to 18%. In this configuration, the maximum undeliverable demand occurs when the segment comprising pipe 2 is isolated.

The results of the optimal placement of IVs obtained for case study 2 in Table 3 are also compared with the methodology described by Jun & Loganathan (2007) and Liu *et al.* (2017) and adopted by different researchers. This methodology assumes the presence of two IVs at both ends of each pipe, referred to as the ‘*N* valves’ layout, where the number of IVs is equal to the linked pipes at a junction. The results are displayed in Table 4, along with the assumption of a scenario with one IV per all WDN pipes.

S.no . | Scenarios . | Total number of IVs . | Min (max) undeliverable demand (CMD) . | Cost of IVs (CNY) . |
---|---|---|---|---|

1. | 2 IVs per all water distribution pipe | 42 | 85.37 | 75,096.58 |

2. | 1 IV per all water distribution pipe | 21 | 85.37 | 37,548.29 |

3. | Optimal IV placement method | 10 | 85.37 | 20,229.4 |

S.no . | Scenarios . | Total number of IVs . | Min (max) undeliverable demand (CMD) . | Cost of IVs (CNY) . |
---|---|---|---|---|

1. | 2 IVs per all water distribution pipe | 42 | 85.37 | 75,096.58 |

2. | 1 IV per all water distribution pipe | 21 | 85.37 | 37,548.29 |

3. | Optimal IV placement method | 10 | 85.37 | 20,229.4 |

Table 4 presents a scenario analysis of IV placement in the UWDN (Figure 5), examining various strategies to minimize maximum undeliverable demand and associated IV costs. Without optimization, if we install two IVs (at both ends of each pipe) per distribution pipe across all WDN (i.e., a total of 42 IVs), or one IV per pipe (i.e., a total of 21 IVs) solely in the WDN, the minimized maximum undeliverable demand remains the same in both cases. This emphasizes that through the optimal placement of 10 IVs, it is possible to effectively reduce both maximum undelivered demand and associated IV costs, as well as the overall number of IVs. This indicates that as also described by Liu & Kang (2022) it is found that IV optimization can significantly reduce the number of IVs without considerably decreasing the resilience performance.

## CONCLUSION

The study proposes a methodology focusing on determining the optimal number and placement of IVs in a UWDN. It aims to minimize the maximum undeliverable demand, considering network topology and the IVs' associated cost. The methodology is illustrated using a small example WDN, followed by its application to a real-type UWDN comprising 22 pipelines and 18 nodes. Results show that for an average demand scenario, the optimal number of IVs is 10 (in pipes 2, 3, 4, 5, 7, 9, 13, 14, 18, and 19) which will result in a maximum undeliverable demand of 18% of the total average daily demand of 477.98 CMD. Further, the study answers the question that if one places a different number of IVs (say 4, 5, 6, 7, 8, 9), then where these should be placed (optimally) and how much will be the maximum undeliverable demand. For example, it shows that by installing 4, 5, 6, 7, 8, and 9 IVs, the maximum undeliverable demand will be about 51, 43, 34, 26, 24, and 20%, respectively of the total average daily demand. The proposed methodology is expected to provide valuable insights for decision-makers and designers, allowing them to minimize adverse impacts on customers while managing UWDNs. This study has not considered the likelihood of pipe failure, which can be considered in the future for probabilistic-based IV locations in a UWDN.

## DATA AVAILABILITY STATEMENT

All relevant data are included in the paper or its Supplementary Information.

## CONFLICT OF INTEREST

The authors declare there is no conflict.

## REFERENCES

*Theory and Practice of Logic Programming*

**11**(4–5), 731–747. https://doi.org/10.1017/S1471068411000275