A New Method for Optimization of Water Distribution Networks While Considering Accidents

Optimization of water distribution networks can effectively reduce their annual cost, which includes the average investment for each year the operational costs and depreciation costs. However, the existing optimization models rarely directly consider the basic flow of each node in case of accidents, such as pipe bursts. Therefore, it is necessary to check the flow requirements under accident conditions. In order to deal with these drawbacks, two optimization models are established considering accident conditions: a single-objective optimization model considering annual cost as an economic objective, and a multi-objective optimization model with a reliability objective defined by the surplus water head. These models are solved based on the genetic algorithm, non-dominated sorting genetic algorithm-II algorithm and Levenberg-Marquardt iterative method. Applying two cases of a single pump station and a multi pump water station water supply, it is shown that the annual cost when considering the accident conditions is higher than that without considering the accident conditions. Moreover, the annual cost obtained with the multi-objective optimization model is slightly higher than that obtained with the single-objective optimization model. The cost is higher because the former model reduces the average surplus water head, which can improve the water distribution network reliability. Therefore, the model and optimization algorithm proposed in this paper can provide a general and fast optimization tool for water distribution network optimization.


Introduction
Water Distribution Networks (WDNs) form a part of the critical municipal infrastructure. These are very complex systems that require a high investment in their construction and maintenance [1]. Under normal conditions, a suitable WDN should be able to provide water with the required pressure. Furthermore, in case of accident conditions such as a pipe burst, a WDN must provide a minimum acceptable flow and pressure at each node. Optimization of WDNs is used to reduce their annual costs, and ensure the reliability of WDN operation by reasonably selecting the pipe diameter of each section under different operating conditions.
The main focus of the research on WDN optimization is to minimize their costs [2][3][4][5]. Due to the limitations of computing technology in the early optimization work, most of the initial research was based on operational research planning theory, network graph theory, the generalized reduction method and so on [6][7][8]. In the past three decades, the development of intelligent optimization algorithms has facilitated the application of optimization algorithms in various models, such as the genetic algorithm for WDN optimization. Savic and Awalters proposed a comprehensive genetic algorithm to minimize the design cost of WDN [9]. In the late 1990s, a multi-objective optimization model was proposed to solve the multi-objective WDN optimization. Deb was one of the first researchers to propose the nondominated sorting genetic algorithm-II (NSGA-II) algorithm [10]. Similarly, Halal was one of the first researchers to optimize the water distribution network using the multi-objective genetic algorithm, which was applied in case studies to achieve trade-offs between a variety of objectives, such as cost and reliability [11]. Formiga proposed a multi-objective evolutionary algorithm to solve the multi-objective optimization model of a pipe network, and established three objectives: the investment costs, entropy system, and system demand supply ratio. However, the model does not consider the annual operation cost of pipe networks, which cannot guarantee that the annual cost of a pipe network is small [12]. Prasad and Park used a multi-objective genetic algorithm to establish a multi-objective model with a minimum annual cost and network resilience as the objectives, but it could not properly reflect the relationship between the reliability and cost of the pipe network, and did not consider the change of the operating cost in case of an accident in a pipe section of the pipe network [13]. Nowadays, the NSGA-II algorithm has become one of the most common methods to solve the multi-objective WDN optimization problem [3]. Intelligent optimization algorithms perform better for solving practical problems than the earlier methods. They have lower computational complexity and can solve multi-objective optimization problems [14,15].
The minimum acceptable flow and pressure of each water supply node must be guaranteed when accidents such as a pipe burst occur in a certain section. Although a series of studies have been carried out on WDN optimization, the present optimization models seldom directly consider the minimum acceptable flow in case of accidents. Therefore, this paper studies the single objective (economy) and multi-objective (economy and reliability) optimization models under accident conditions. A model solving method based on the genetic algorithm, NSGA-II algorithm and Levenberg-Marquardt (LM) iterative method is discussed. The aim of the method is to provide a general optimization tool for the optimization design of WDN, whose reliability and practicability are verified by analyzing two cases. For the accidents, we only consider the pipe burst in any one section of the WDN which is not directly connected with the pump station. The accident occurs in only one section at a time.

Problem Description and Generalization
In the case that the WDN layout has been determined, the annual cost and reliability of the WDN can be optimized by taking the pipe diameter as the variable. Therefore, in the model, only the connection between the pump station and the water demand nodes were considered, and the position of tank was not considered.
One or more pump stations can be used for water supply in a WDN. For convenience, the WDN of only a single pump station was briefly described, as the WDN of multi-pump stations is similar. Figure 1 shows a typical WDN. In the figure, Nodes 1-6 are the water output nodes in the WDN, where each node has a different elevation. Node 7 is the pump station that provides water for the whole WDN. According to the design requirements, the quantity of the water supply provided by the pump station is s. The quantity of water output by the node i is o i where i denotes a node number in the WDN, and each node must meet the flow balance.
The pipe section should be suspended in case of accident conditions, such as a pipe burst, whereas the other sections of the WDN must continue to operate. The two adjacent nodes of the burst section are supplied by other sections. The water supply should be maintained at a certain proportion of the normal condition, which is generally 70%. In addition, the water pressure should also meet the pressure requirements so that a continuous flow is provided to the outflow nodes. The pipe section should be suspended in case of accident conditions, such as a pipe burst, whereas the other sections of the WDN must continue to operate. The two adjacent nodes of the burst section are supplied by other sections. The water supply should be maintained at a certain proportion of the normal condition, which is generally 70%. In addition, the water pressure should also meet the pressure requirements so that a continuous flow is provided to the outflow nodes.

Mathematical Optimization Model
The purpose of this paper is to meet the practical requirements of the system, reduce the operation cost as much as possible and improve the operation reliability. Objective functions and constraints are provided in this section.

Objective Function
In the design of the WDNs layout, it is necessary to consider not only the relatively low annual cost, but also the reliability of WDNs operation. The accidents will cause unstable operation of the WDN and waste of water, which will increase the cost of the WDN. In order to ensure the reliability of its operation, the head pressure of each node should not be too high, which can prevent the occurrence of accidents such as a pipe burst. The node surplus head can be used to analyze the reliability of pipe network operation. Therefore, in this paper, annual cost as economic objective and weighted average value of the node surplus head as reliability objective were selected as the two objective functions of multi-objective optimization.
The economic objective is the first consideration in the optimal design of WDN. This objective is the annual cost composed of depreciation, and the annual energy cost of the pumping station. The annual cost is shown in Equation (1), which is the only equation considered for single-objective optimization. However, for the multi-objective optimization, the reliability objective of WDN should also be considered. The objective function considering reliability is defined by the average surplus head, shown by Equation (2). (1) In Equation (1), and are the annual average cost and the depreciation cost rate, respectively, with the units in Yuan, is the payback period with the unit of , is the diameter of the pipe section between nodes and given in mm, is the pipe unit price corresponding to given in Yuan/m and is the length of pipe section between nodes and in . The water supply energy change parameter within the specified time is represented by , is the electricity tariff given in Yuan/kW h, is the wa-

Mathematical Optimization Model
The purpose of this paper is to meet the practical requirements of the system, reduce the operation cost as much as possible and improve the operation reliability. Objective functions and constraints are provided in this section.

Objective Function
In the design of the WDNs layout, it is necessary to consider not only the relatively low annual cost, but also the reliability of WDNs operation. The accidents will cause unstable operation of the WDN and waste of water, which will increase the cost of the WDN. In order to ensure the reliability of its operation, the head pressure of each node should not be too high, which can prevent the occurrence of accidents such as a pipe burst. The node surplus head can be used to analyze the reliability of pipe network operation. Therefore, in this paper, annual cost as economic objective and weighted average value of the node surplus head as reliability objective were selected as the two objective functions of multi-objective optimization.
The economic objective is the first consideration in the optimal design of WDN. This objective is the annual cost composed of depreciation, and the annual energy cost of the pumping station. The annual cost is shown in Equation (1), which is the only equation considered for single-objective optimization. However, for the multi-objective optimization, the reliability objective of WDN should also be considered. The objective function considering reliability is defined by the average surplus head, shown by Equation (2).
In Equation (1), W and P are the annual average cost and the depreciation cost rate, respectively, with the units in Yuan, t is the payback period with the unit of Year, d ij is the diameter of the pipe section between nodes i and j given in mm, f (d ij ) is the pipe unit price corresponding to d ij given in Yuan/m and l ij is the length of pipe section between nodes i and j in m. The water supply energy change parameter within the specified time is represented by β, γ is the electricity tariff given in Yuan/kW·h, ρ is the water density in 1000 kg/m 3 , g is gravitational acceleration in 9.8 m/s 2 , µ is the efficiency coefficient of the pumping station with the value in the range of 0.55-0.85, H s is the node head of the pump in m and S is the flow of the pump station in L/s. In Equation (2), I s is the weighted average value of the node surplus head in m, o i is the outflow of node i given in L/s, h i is the head of node i and h min is the minimum water head required by each node.

Constraints
Node flow continuity constraints. Any node i should be consistent with the same inflow and outflow, i.e., the inflow should be equal to the outflow. The following Equation is composed of a total of N + 1 Equations: . . , n, n + 1; j = 1, 2, . . . , n, n + 1; where q ij is the water inflow of the pipe segment connected to node i and o i is the output of node i. In case of accident conditions, such as a pipe burst, pipe rupture, etc., the node water supply should be maintained at a certain proportion of the normal water supply requirements, which is represented by α and is generally between 0.5-0.8. It is shown by Equation (4) as follows: In Equation (4), o i represents the water supply required by node i. The value of α is 1 under normal water supply conditions. Its value is taken between 0.5-0.8 when an accident occurs.
Water pressure balance constraints. The head loss between any two nodes i and j should satisfy Equation (5), given as follows: where ∆h ij is the head loss between any two adjacent nodes i and j, γ is the expansion coefficient considering the local head loss, and generally has a value of 1.1, f is the friction head loss coefficient, q ij is the pipe flow between nodes i and j, while m and b are the coefficients related to the pipe type. Water pressure constraints. The constraints of water pressure must meet the following conditions shown by Equation (6): where H min is the minimum required water pressure and H max is the maximum water pressure that can be tolerated by the node. Considering the economy optimization, the design water pressure of the WDN does not exceed the upper limit. Therefore, the calculations here only require the lower limit of the water pressure. Velocity constraints. Pipe diameter and velocity constraints are shown by Equation (7) as follows: where v ij and V max represent the velocity and maximum velocity in each section, respectively. The possibility of pipe bursts increases if the flow is too fast. Therefore, we needed to specify the upper limit of velocity. As the water demand time of each node during the water supply process is random, the flow between each node occurs naturally and, therefore, the lower limit of flow rate was not considered.

Optimization Algorithm for Solving the Model
Obviously, this is a single-objective or a multi-objective optimization problem with multiple constraints. This paper mainly uses the genetic algorithm based on infeasibility and the NSGA-II algorithm. The genetic algorithm based on infeasibility was used for single-objective optimization, and the NSGA-II algorithm was used for multi-objective optimization. To obtain the pressure of each node in WDN, the LM algorithm can be used for solving nonlinear equations. The genetic algorithm (GA) is a heuristic algorithm with strong robustness and global search ability [16][17][18], and has been widely used in many fields [19][20][21][22]. For this paper, the genetic algorithm was used as a single-objective optimization algorithm. The model proposed in this paper involves many constraints that must be satisfied. The GA generally deals with constraints using the penalty function method [23]. However, this method is difficult to use to guarantee the characteristics of the objective function. Thus, it performs poorly for highly constrained or nonconvex constrained optimization problems [24]. Therefore, the genetic algorithm based on the infeasibility degree was used to deal with the constraints. This method attempts to maintain a fixed proportion of infeasible individuals and increase their diversity in the population, prevent convergence to a local optimum and compare the advantages of individuals according to the defined comparison rules. The specific steps of this method are as follows: Firstly, we calculated the deviation value (v dev,i ) according to Equation (8), which represents the degree of each individual violating all constraints in the model. These constraints are given by Equation (9) [16].
In Equation (8), v dev,i is the value of individual i, N ine and N equ are the numbers of inequalities and equalities, respectively, and g j (x i ) and z k (x i ) are the inequality and equality constraints, respectively. The value of v dev,i is 0 if all constraints are satisfied.
The proportion of infeasible individuals (P in f ) in the present population was calculated in the genetic algorithm. Subsequently, the upper threshold (Z) was adjusted according to Equation (10). In the Equation, the value of the fixed proportion (P f ix ) is generally taken as 0.25 [16].
The following rules were used to select individuals in each GA selection operation: First, multiple pairs of individuals are randomly selected. For each pair, the individual with the best fitness value is selected if both individuals are feasible. Otherwise, the individual with a lower v dev,i is selected. If only one individual is feasible, and if the v dev of the infeasible individual is less than Z, then the individual with the best fitness value is selected. Otherwise, the feasible individual is selected.

Non-Dominated Sorting Genetic Algorithm-II Handling Constraints
For this paper, the NSGA-II algorithm was used to solve the multi-objective optimization problem, while considering the value of each objective. In this study, the economic objective, i.e., the annual cost, and safety objective, i.e., average surplus water head, were mutually restricted, and each objective had its own weight. Thus, allocation of these weights was an important problem. Therefore, we mainly studied scientific selection of decision variables, and encoding and decoding NSGA-II, so as to provide a general method to solve the multi-objective optimization problem.
The NSGA-II algorithm is one of the most popular multi-objective genetic algorithms [15,[25][26][27][28] and was proposed based on the NSGA [29]. It has the advantages of speed and a good convergence of the solution set. It adopts a fast non-dominant sorting algorithm, which significantly reduces the computational complexity. It also enables individuals in the Pareto domain to extend over the whole Pareto domain and distribute evenly, thus maintaining the population diversity. In addition, an elite strategy was introduced in this algorithm to expand the sampling space, preventing the loss of the best individual and improving the robustness. The NSGA-II algorithm finally obtained a set of Pareto solutions, and the set of optimal solutions of the objective function was called the Pareto optimal solutions.
The NSGA-II deals with constraints by using binary tournament selection [29]. It chooses the better solution out of two randomly selected solutions in the population. In the presence of constraints, each solution can be either feasible or infeasible. When both solutions are feasible, the crowded-comparison operator is used to select the solution having a better objective function value. On the other hand, the feasible solution is directly selected when one solution is feasible and the other is not. When both solutions are not feasible, the solution with the lower total constraint violation is selected. Finally, the dominant relationship between the two selected solutions is defined such that any feasible solution has a better nondominated rank compared to any infeasible solution. The degree of non-dominance of the objective function value is used to rank all feasible solutions. For the two infeasible solutions, the one with a lower constraint violation has a better rank.

Levenberg-Marquardt Algorithm for Solving Nonlinear Equations
During the WDN optimization process, the pressure of each node under the determined section diameter is calculated when the layout, pump station pressure and water consumption of each node are known. As Equation (5) is nonlinear, this paper uses the LM algorithm to calculate the pressure of each water supply node under a certain level of accuracy [30,31].
The LM method is a least squares estimation method for obtaining regression parameters in nonlinear regression [32]. It is a combination of the steepest descent and linearization (Taylor series) methods. The combination of the two methods can quickly find the optimal value.

Generalization of Pressure and Flow Calculation for WDN
The first step in the optimization algorithm is to carry out coding design. The diameter of each pipe segment is determined through the intelligent algorithms of screening, crossover, replication and decoding. The pressure of each node and the flow and velocity of each pipe segment are calculated under the condition of known diameter, and the fitness and constraint conditions of each chromosome are determined. Subsequently, the optimization results are obtained through a continuous optimization process. In the calculation process, the generalization of Equations (3) and (4) is an important issue in order to ensure the universality of the program according to the situation of complex WDN.
In order to ensure the generality of the algorithm, a simplified WDN connection and its topological diagram shown in Figure 2 are used to illustrate the transformation of the flow relationship of Equation (3) into a general Equation expressed by Equation (11). The node connection matrix A, the WDN flow matrix Q, the construction matrix M, the outflow node flow matrix O and the flow matrix of pump station S are given by Equations (12), (16)- (19), respectively. The Equations can be used for general calculation. The WDN model for a single pump station and n outlet nodes is described by Figure 2, and the multi-pump stations model is similar.
Matrix shown in Equation (12) represents the connection between two nodes. All values of the matrix consist of 1, 0 and −1. Furthermore, 1 and −1 represent the flow direction of the connected nodes, and 0 represents the absence of a connection between two nodes.
Matrix is the WDN connection matrix, which represents the connection of each node in the WDN. The values of the matrix elements are assigned according to Equations (13)- (15). In these Equations, represents the connection of outflow nodes in the WDN, and and represent the connection between the pump stations and outflow nodes, respectively.
The element belongs to the matrix of size , where is the number of outflow nodes in the WDN.
1 0 The element belongs to the connection matrix between the pump stations and the outflow nodes. The size of the matrix is 1 .
The element belongs to the connection matrix between the pump station and the WDN nodes. The size of the vector is 1 , as shown in Equation (15).
If the node is connected to the node , is calculated according to Equation (20); otherwise, the value of is 0. For the convenience of calculation, the matrix is a ( 1 1 construction matrix, shown in Equation (17). In this matrix, the first elements are 1 and the rest are 0. Matrix A shown in Equation (12) represents the connection between two nodes. All values of the matrix consist of 1, 0 and −1. Furthermore, 1 and −1 represent the flow direction of the connected nodes, and 0 represents the absence of a connection between two nodes.
Matrix A is the WDN connection matrix, which represents the connection of each node in the WDN. The values of the matrix elements are assigned according to Equations (13)- (15). In these Equations, a ij represents the connection of outflow nodes in the WDN, and b i and c i represent the connection between the pump stations and outflow nodes, respectively.
node i is adjacent to node j, and the number i < j −1 node i is adjacent to node j, and the number i > j 0 node i is adjacent to node j, or the number i = j The element a ij belongs to the matrix of size (n × n), where n is the number of outflow nodes in the WDN. b i = 1 node i is adjacent to water resource 0 node i is not adjacent to water resource The element b i belongs to the connection matrix between the pump stations and the outflow nodes. The size of the matrix is (n × 1).
The element c i belongs to the connection matrix between the pump station and the WDN nodes. The size of the vector is (1 × n), as shown in Equation (15). If the node i is connected to the node j, q ij is calculated according to Equation (20); otherwise, the value of q ij is 0.
For the convenience of calculation, the matrix M is a ((n + 1) × 1) construction matrix, shown in Equation (17). In this matrix, the first n elements are 1 and the rest are 0.
The node flow matrix O is of size ((n + 1) × 1), and the matrix elements from o 1 to o n represent the rated water demand of each node. The remaining element is equal to 0. The matrix is shown by Equation (18).
The pump station inflow vector S is a column vector of size (n + 1). The matrix elements from the first row to the nth row are all equal to 0, and the (n + 1) row is equal to the inflow flow s of the pump station. It is given by Equation (19) as follows: In Equation (16), q ij is an implicit function of the hydraulic pressure difference between two adjacent nodes, which can be calculated as follows: Equations (11)- (19) constitute the general equations of the water flow pressure balance equation. Under the condition that the elevation and water supply quantity of the pump station, and the pipeline length and the water output of each node are known, the pressure h i of each node can be calculated. Equation (20) can be substituted into Equation (11), and the Equation group F composed of (n + 1) Equations can be obtained as follows: Obviously, this is a nonlinear system of Equations, which can be solved using the LM algorithm. When the water pressure at the pump station (h p ), pipe length (l ij ), pipe diameter (d ij ), water output (O) of each node and the node water supply (S) are known, the pressure (h i ) of each node can be obtained using the LM algorithm.
In the case of a single pump station model, the initial pressure of the outflow node connected to the pump station is assumed to be equal to the water pressure (h p ) of the pump station, which ensures the robustness of the calculations. In the case of the multiple pump stations model, first one pump station (h p , s) is selected as the main pump station, while the other pump station only converts its own flow into adjacent outflow nodes. The issue is transformed into a single water supply algorithm model by changing negative flow values at the nodes connected to the other pump station. The LM algorithm is used to calculate the water pressure of the outflow nodes connected at the pump stations, and invert the water flow and pressure at the corresponding pump station. Figure 3 shows the schematic diagram of the method.  In the calculation, the Equation group in Equation (21) is always 0, which is not easy to calculate. Therefore, according to the actual implementation, the equation group can be changed to be less than a fixed value. In this paper, 10 was selected, therefore Equation (21) can be converted to Equation (22) as follows: ℎ , ℎ , , , , 10 =1, 2, …, n; =1, 2, …, n.
The flow of the pipe section between the nodes can be determined using Equation (20) after determining the pressure of each node. The flow of the pipe section can be calculated using the flow and the diameter of the pipe section to ensure that the flow velocity of the pipe section meets the flow velocity constraints shown in Equation (7).

Algorithm Implementation
Coding design. The solution of the single-objective optimization problem is based on the genetic algorithm and the LM algorithm. In addition, the solution of the multiobjective optimization problem is based on the NSGA-II algorithm and the LM algorithm. In this paper, integer coding is used for the section diameter ( ) in order to prevent nonstandard pipe diameter in the optimization results. Furthermore, binary coding is used for the pressure of pump stations (ℎ ).
Decoding and calculation of nodes pressure ( ) and section velocity ( ). In the algorithm, each chromosome is decoded and its fitness value is calculated, respectively. The nodes pressure (ℎ ) and the flow velocity of each section are calculated, which are then used as the basis for subsequent processing of constraint conditions. Fitness function. The economic objective of WDN is mainly considered for singleobjective optimization. Therefore, the minimum annual cost given by in Equation (1) is used as the fitness function. In addition, the multi-objective optimization needs to comprehensively consider the economic and reliability objectives of the WDN. Therefore, the minimum annual cost and the weighted average surplus water head, given by in Equation (2) are used together as the fitness function.
Treatment of constraint conditions. The value of water pressure at each node of the WDN must be between the minimum and maximum water pressure values, as shown in Equation (6). The flow velocity in each section cannot be higher than the maximum flow velocity given by Equation (8). In the case of an accident condition, the outflow of each node needs to reach 70% of the normal condition, as shown by Equation (4), in addition In Figure 3, nodes 1-9 and 10-12 represent the outflow nodes in the WDN, and the pump stations, respectively. The flow of pump stations 10, 11 and 12 are denoted by s1, s2 and s3, respectively. The outflow of nodes 1, 2 and 6 adjacent to the pump station are o1, o2 and o6, respectively. Assume that the pump station 10 with flow s1 and water pressure h p 1 is the main pump station. In this case, the outflow of node 2 is converted to (o2 − s2), and the water flow of node 6 is converted to (o6 − s3).
In the calculation, the Equation group F in Equation (21) is always 0, which is not easy to calculate. Therefore, according to the actual implementation, the equation group F can be changed to be less than a fixed value. In this paper, 10 −3 was selected, therefore Equation (21) can be converted to Equation (22) as follows: min F(h i , h p , d ij , l ij , O, S) < 10 −3 i = 1, 2, . . . , n; j = 1, 2, . . . , n.
The flow q ij of the pipe section between the nodes can be determined using Equation (20) after determining the pressure of each node. The flow v ij of the pipe section can be calculated using the flow q ij and the diameter d ij of the pipe section to ensure that the flow velocity of the pipe section meets the flow velocity constraints shown in Equation (7).

Algorithm Implementation
Coding design. The solution of the single-objective optimization problem is based on the genetic algorithm and the LM algorithm. In addition, the solution of the multi-objective optimization problem is based on the NSGA-II algorithm and the LM algorithm. In this paper, integer coding is used for the section diameter (d ij ) in order to prevent non-standard pipe diameter in the optimization results. Furthermore, binary coding is used for the pressure of pump stations (h p ).
Decoding and calculation of nodes pressure (h i ) and section velocity (v ij ). In the algorithm, each chromosome is decoded and its fitness value is calculated, respectively. The nodes pressure (h i ) and the flow velocity (v ij ) of each section are calculated, which are then used as the basis for subsequent processing of constraint conditions. Fitness function. The economic objective of WDN is mainly considered for singleobjective optimization. Therefore, the minimum annual cost given by W in Equation (1) is used as the fitness function. In addition, the multi-objective optimization needs to comprehensively consider the economic and reliability objectives of the WDN. Therefore, the minimum annual cost and the weighted average surplus water head, given by I s in Equation (2) are used together as the fitness function.
Treatment of constraint conditions. The value of water pressure at each node of the WDN must be between the minimum and maximum water pressure values, as shown in Equation (6). The flow velocity in each section cannot be higher than the maximum flow velocity given by Equation (8). In the case of an accident condition, the outflow of each node needs to reach 70% of the normal condition, as shown by Equation (4), in addition to satisfying the two aforementioned constraints.
The detailed flow chart of the optimization solution model involving the genetic algorithm for single-objective optimization, and the NSGA-II for multi-objective optimization is shown in Figure 4.

Basic Information and Parameter Setting of WDN
We considered the case studied in [33]. The total area of the project is 54 square kilometers, with an altitude between 350-400 m. The pump station provides water for the whole WDN. There are 25 ductile iron pipe sections within one pump station. The project is a looped water distribution network, and the flow velocity of the pipe section should be less than 2.5 m/s under normal conditions. Figure 5 shows the basic data and pump station location of the project.
Water 2021, 13, x FOR PEER REVIEW 11 of 20

Basic Information and Parameter Setting of WDN
We considered the case studied in [33]. The total area of the project is 54 square kilometers, with an altitude between 350-400 m. The pump station provides water for the whole WDN. There are 25 ductile iron pipe sections within one pump station. The project is a looped water distribution network, and the flow velocity of the pipe section should be less than 2.5 m/s under normal conditions. Figure 5 shows the basic data and pump station location of the project.  The depreciation cost rate and the total annual interest rate of the principal equivalent interest are 7% and 5.94%, respectively. The repayment period of the investment is 12 years, and the electricity tariff is 0.72 Yuan/kW h. The pump efficiency is 60% and the total flow of the pump station is 380.22 L/s. The variation coefficient of the water supply energy is 0.5. The decimal system is utilized in this paper in order to avoid the tedious binary coding used in the standard genetic algorithm. The pipe diameter was selected in the range of 150-450 mm, and the solution space of the pipe diameter in this project is {100 150 200 250 300 350 400 450 500}, with the units of , which is represented by the decimal code as {1 2 3 4 5 6 7 8 9}. The crossover operation uses multiple point mutation, in which the mutation probability is the inverse of the number of decision variables. The The depreciation cost rate and the total annual interest rate of the principal equivalent interest are 7% and 5.94%, respectively. The repayment period of the investment is 12 years, and the electricity tariff is 0.72 Yuan/kW·h. The pump efficiency is 60% and the total flow of the pump station is 380.22 L/s. The variation coefficient of the water supply energy is 0.5. The decimal system is utilized in this paper in order to avoid the tedious binary coding used in the standard genetic algorithm. The pipe diameter was selected in the range of 150-450 mm, and the solution space of the pipe diameter in this project is {100 150 200 250 300 350 400 450 500}, with the units of mm, which is represented by the decimal code as {1 2 3 4 5 6 7 8 9}. The crossover operation uses multiple point mutation, in which the mutation probability is the inverse of the number of decision variables. The population size was set to 300, the number of iterations was set to 200, the crossover probability was 0.5 and the mutation probability was 0.04. Table 1 shows the unit price with different diameters of the ductile iron pipe. The roughness of the pipe could be considered to be the same due to the same material of the pipe.

. Optimization Results and Discussion
Pareto Diagram of the multi-objective optimization is shown in Figure 6. The diamond was used to mark the results of the multi-objective optimization without considering accident conditions on the coordinate axis. Among them, the coordinate point (2669.4, 4.92) was selected, which means the most reasonable annual cost is 2669.4 kYuan, and the average nodes head is 4.92 m. Besides, the circular was used to mark the results of multiobjective optimization while considering accident conditions on the coordinate axis. In this case, the coordinate point (2711.9, 4.82) was selected, which means the most reasonable annual cost is 2711.9 kYuan and the average nodes surplus head is 4.82 m.
Water 2021, 13, x FOR PEER REVIEW 12 of 20 population size was set to 300, the number of iterations was set to 200, the crossover probability was 0.5 and the mutation probability was 0.04. Table 1 shows the unit price with different diameters of the ductile iron pipe. The roughness of the pipe could be considered to be the same due to the same material of the pipe.

. Optimization Results and Discussion
Pareto Diagram of the multi-objective optimization is shown in Figure 6. The diamond was used to mark the results of the multi-objective optimization without considering accident conditions on the coordinate axis. Among them, the coordinate point (2669.4, 4.92) was selected, which means the most reasonable annual cost is 2669.4 kYuan, and the average nodes head is 4.92 m. Besides, the circular was used to mark the results of multiobjective optimization while considering accident conditions on the coordinate axis. In this case, the coordinate point (2711.9, 4.82) was selected, which means the most reasonable annual cost is 2711.9 kYuan and the average nodes surplus head is 4.82 m. In this section, results under four working conditions are calculated: single-objective without considering an accident condition, single-objective considering an accident condition, multi-objective without considering an accident condition and multi-objective considering an accident condition. Figure 7 shows the optimization results of the pipe diameter, velocity and node surplus head. Table 2 shows the economic and reliability objectives, including the annual cost of WDN (kYuan), average node surplus head ( ) and maximum surplus head (m). In this section, results under four working conditions are calculated: single-objective without considering an accident condition, single-objective considering an accident condition, multi-objective without considering an accident condition and multi-objective considering an accident condition. Figure 7 shows the optimization results of the pipe diameter, velocity and node surplus head. Table 2 shows the economic and reliability objectives, including the annual cost of WDN (kYuan), average node surplus head (m) and maximum surplus head (m). (1) Single-objective without considering the accident condition.
(3) Multi-objective without considering the accident condition.     The annual cost obtained with the multi-objective optimization without considering the accident conditions is 292.5 kYuan higher than that obtained with the single-objective optimization, which means the annual cost increases by 12.31%. On the other hand, the annual cost obtained with the multi-objective optimization considering the accident condition is 319.9 kYuan higher than that obtained with the single-objective optimization, which means the annual cost increases by 13.37%. The annual cost obtained with the multi-objective optimization considering the accident condition increases by 42.5 kYuan compared with that obtained without considering the accident condition, which means the cost increases by 1.59%, and the difference between the average surplus head of nodes is small. It is concluded that the annual cost obtained with the multi-objective optimization is higher than that obtained with the single-objective optimization, but the average surplus head is significantly reduced. The probability of pipe burst is greatly reduced at the expense of a small increase in operating costs. Therefore, multi-objective optimization while accident conditions should be given priority in practical engineering.

Basic Information and Parameter Setting of WDN
We considered the example given in [34]. There are two pump stations that provide water for the whole WDN, and there are 26 nodes and 34 sections in the WDN. Figure 8 shows the basic data and layout of the WDN.
Multi-objective considering the accident condition 2711.9 4.82 10.19 The annual cost obtained with the multi-objective optimization without considering the accident conditions is 292.5 kYuan higher than that obtained with the single-objective optimization, which means the annual cost increases by 12.31%. On the other hand, the annual cost obtained with the multi-objective optimization considering the accident condition is 319.9 kYuan higher than that obtained with the single-objective optimization, which means the annual cost increases by 13.37%. The annual cost obtained with the multi-objective optimization considering the accident condition increases by 42.5 kYuan compared with that obtained without considering the accident condition, which means the cost increases by 1.59%, and the difference between the average surplus head of nodes is small. It is concluded that the annual cost obtained with the multi-objective optimization is higher than that obtained with the single-objective optimization, but the average surplus head is significantly reduced. The probability of pipe burst is greatly reduced at the expense of a small increase in operating costs. Therefore, multi-objective optimization while accident conditions should be given priority in practical engineering.

Basic Information and Parameter Setting of WDN
We considered the example given in [34]. There are two pump stations that provide water for the whole WDN, and there are 26 nodes and 34 sections in the WDN. Figure 8 shows the basic data and layout of the WDN.   The crossover operation used multiple point mutation, where the mutation probability is the inverse ratio of the number of decision variables. The population size was set to 300, the number of iterations was set to 200, the crossover probability was 0.5 and the mutation probability was 0.04. Ductile iron pipe was also used for calculation as before, and its unit price is shown in Table 1.

Optimization Results and Discussion
The Pareto Diagram of the multi-objective optimization is shown in Figure 9. The diamond is used to mark the results of multi-objective optimization without considering accident conditions on the coordinate axis. Based on the optimization results, the most optimal solution in this case is (864.0, 8.42), which means the most reasonable annual cost is 864.0 kYuan, and the average nodes head is 8.42 m. On the other hand, the circular was used to mark the results of multi-objective optimization while considering accident conditions. The best coordinate point (880.2, 8.55) was selected in this case, which means the most reasonable annual cost is 880.2 kYuan, and the average nodes head is 8.55 m. The crossover operation used multiple point mutation, where the mutation probability is the inverse ratio of the number of decision variables. The population size was set to 300, the number of iterations was set to 200, the crossover probability was 0.5 and the mutation probability was 0.04. Ductile iron pipe was also used for calculation as before, and its unit price is shown in Table 1.

Optimization Results and Discussion
The Pareto Diagram of the multi-objective optimization is shown in Figure 9. The diamond is used to mark the results of multi-objective optimization without considering accident conditions on the coordinate axis. Based on the optimization results, the most optimal solution in this case is (864.0, 8.42), which means the most reasonable annual cost is 864.0 kYuan, and the average nodes head is 8.42 m. On the other hand, the circular was used to mark the results of multi-objective optimization while considering accident conditions. The best coordinate point (880.2, 8.55) was selected in this case, which means the most reasonable annual cost is 880.2 kYuan, and the average nodes head is 8.55 m. Results under four working conditions were obtained for this example: single-objective without considering an accident condition, single-objective considering an accident condition, multi-objective without an considering accident condition and multi-objective considering an accident condition. Figure 10 shows the optimization results of pipe diameter, velocity and node surplus head. Table 3 shows the economic and reliability objectives, including the annual cost of WDN (kYuan), average node surplus head (m) and maximum surplus head (m). Results under four working conditions were obtained for this example: single-objective without considering an accident condition, single-objective considering an accident condition, multi-objective without an considering accident condition and multi-objective considering an accident condition. Figure 10 shows the optimization results of pipe diameter, velocity and node surplus head. Table 3 shows the economic and reliability objectives, including the annual cost of WDN (kYuan), average node surplus head (m) and maximum surplus head (m). (1) Single-objective optimization without considering the accident conditions.
(2) Single-objective considering the accident conditions.     The annual cost obtained by solving the multi-objective optimization without considering the accident conditions is 163.1 kYuan higher than that obtained using the singleobjective optimization, which means the annual cost increases by 23.27%. On the other hand, when the accident conditions are considered, the annual cost obtained using the multi-objective optimization is 11.7 kYuan more than that obtained using the singleobjective optimization, which means the annual cost increases by 1.35%. In the multiobjective optimization, the annual cost considering the accident condition increases by 16.2 kYuan compared with that without considering the accident condition, which means the cost increases by 1.87%, and the difference between the average surplus head of nodes is small. It is concluded that although the annual cost obtained using the multi-objective optimization is higher than that obtained using the single-objective optimization, the average surplus head is significantly reduced. Due to the decrease of the surplus water head, the probability of accidents such as a pipe burst can be reduced at the expense of an increase in the annual cost. Therefore, multi-objective optimization considering accident conditions should be given priority in practical engineering.

Conclusions
First, a multi-objective optimization model with economic reliability as the objective function was established. Economic and reliability objectives were defined as the annual cost of the WDN and the node water surplus head, respectively. The NSGA-II method was used in the model to integer code the pipe diameter of each pipe section and binary code the water head of pump station in the multi-objective optimization model for the looped WDN. The optimal pipe diameter combination and the construction and operation costs of WDN under the optimal pipe diameter combination could be determined using the Pareto Diagram.
The cases analysis showed that the method proposed in this paper could comprehensively consider the economy and reliability, and solve the optimization problem of a looped WDN. The designers can use this method to easily obtain a more reasonable and economical layout scheme of the looped WDN using basic information such as elevation and node water demand. The results showed that by considering the multi-objective and accident conditions, the multi-objective model could fully take into account the network reliability, effectively reducing the probability of a WDN accident, and was practically feasible, although the annual operation cost of the multi-objective optimization network was slightly higher than that of the single-objective optimization network. The model was applied in two examples, which showed the good generality of this method. As the volume and location of tank, the roughness of the pipes and differentiated electricity tariffs of different pumping hours have not been fully considered in the model, enriching the application scenario of the model to make it more close the conditions that occur in practice will be the focus of future study.

Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.

Conflicts of Interest:
The authors declare no conflict of interest.