Redefining the application of an evolutionary algorithm for the optimal pipe sizing problem

Extensive work has been reported for the optimization of water distribution networks (WDNs) using different optimization techniques. Out of these techniques, evolutionary algorithms (EAs) were found to be more efficient as compared with conventional techniques like linear programming and dynamic programming. Most of the EAs are complex meta-heuristics techniques and need tuning of algorithm-specific parameters. Rao algorithms (Rao-I and Rao-II) do not need any algorithm-specific parameters and hence eliminate the process of sensitivity analysis. In the present work, Rao algorithms are applied for the optimal pipe sizing of WDNs. The optimization results in terms of optimal pipe diameters and the number of evaluations for five different benchmark networks are compared with other EAs. For the two-loop, Hanoi, Go-Yang, and Kadu network, computational efficiency in terms of minimum function evaluations for Rao-I and Rao-II is found to be greater than 78.5 and 83.58%, respectively, when compared with the largest number of minimum function evaluations for other evolutionary techniques. It is seen that Rao algorithms are simple to apply and efficient and do not need any parameter tuning which reduces a large number of computational efforts.


GRAPHICAL ABSTRACT INTRODUCTION
Water supply systems are one of the most important infrastructures for mankind as they supply water from the treatment plants to the consumers. These systems fall under the category of non-deterministic polynomial hard problems (NP-hard) (Babu & Vijayalakshmi ) due to the non-linear relation between the pressure and discharge in a pipe. In addition to this, the decision variables for the optimization of water distribution networks (WDNs) are discrete pipe diameters to be chosen from a set of commercially available diameters for the design. The design of these decision variables as continuous and rounding off to the nearest commercially available diameter may not guarantee the true optimality. Above all, the optimal pipe sizing is a constrained optimization problem (minimum pressure requirement at nodes and conservation of energy and mass equation) having outsize search space which makes it impractical to evaluate every possible alternative.
Due to the various challenges mentioned above, the design of any WDN is difficult to solve and requires attention. The very first technique that was used for the WDN design is dynamic programming (DP; Schaake & Lai ). Thereafter linear programming (LP; Alperovits & Shamir ) is used. These techniques give satisfactory results; however, these are based on various assumptions. These techniques require gradient information to locate the solution. Also, the optimal solution obtained by DP and LP may get trapped in local optima and may not be able to locate the global optima. The above drawbacks are overcome with the introduction of evolutionary algorithms (EAs). EA is based on certain metaphors, for example, the well-known genetic algorithm (GA) is based on the evolution of human beings.
These techniques are widely used as an optimization technique since they are easy to use and can be used for a large number of problems. EA works by mimicking its metaphor. This mimicking becomes possible due to the involvement of various constants that are associated with the algorithm. The main flaw of using EA as an optimization technique is that the constants of the algorithm are to be fine-tuned for every optimization problem which involves huge computational efforts and is a tedious task. Thus, the main motivation to carry out the present study is to introduce a technique that eliminates the tedious task of tuning the parameters of the algorithm. Considering this, the authors of the present work introduce the Rao algorithms for the optimal pipe sizing for the very first time. Rao () developed the Rao algorithms, namely Rao-I, Rao-II, and Rao-III. These algorithms do not need tuning of any algorithm-specific parameters and require only common parameters such as population size and number of iterations for searching the optimal point, and thus, the sensitivity analysis is eliminated. Such techniques not only reduce the computational time but also reduce extra efforts in tuning the parameters. The only difference between Rao-II and Rao-III is the position of modulus in the evolution process of the algorithm and their working principle is similar, and hence has not been incorporated in the present work.
The computer program has been developed for Rao optimization algorithms (Rao-I and Rao-II) in a Python environment and is linked to a well-known hydraulic network solver EPANET 2.0 (Rossman ) for the pressure-driven analysis to obtain flows and pressure head in the network. However, the reliability and robustness of these techniques are found to be largely dependent on various algorithmspecific parameters and need extensive effort for tuning the parameters. In addition to this, the parameters once tuned cannot be used for other problems, as with the change in the problem, the value of these parameters also changes. Regressive sensitivity analysis is to be carried out for each network to find the appropriate parameters, thus it makes these algorithms computationally very expensive and time-consuming. The pool of such metaheuristic techniques, based on certain metaphors and thus involving various algorithm-specific constants, is emerging every day.

LITERATURE REVIEW
Such metaphor-based EAs are complex to understand and are thus ending soon as there is no taker (Rao ).
To overcome the above-mentioned drawback, the research has been focused on developing techniques that eliminate pre-specifying the algorithm-specific parameters.

Objective function
The optimization of pipe networks for water supply is often seen as a problem of minimizing the network costs. The objective function for this optimization problem can be given as follows: where L i is the length of each pipe (m), C i (D i ) is the cost of a pipe per meter run of a given diameter, D i is the diameter of selected pipe (m), and np is the number of pipes. This single objective problem is solved subject to the following constraints:

Constraints
i. Continuity at nodes: At any node, the equation of continuity must be satisfied and is written as follows: where Q in and Q out are the flow into and out of pipe connected at any node k (m 3 /s), q k is the flow demand at node k (m 3 /s), and nn is the number of nodes.

ii. Energy conservation in loops:
For a closed-loop, the total head loss should be equal to zero.
where nl is the number of loops in the network and hf i is the head loss because of friction in the pipe and fittings i (m). In the present work, the Hazen-Williams formula is used for defining the frictional head loss in pipes.
However, for the pipes in series connecting two fixed head reservoirs, the head loss is equal to the numerical difference of head between the two reservoirs.
iii. Minimum pressure at nodes: The pressure head at each node in the network should always be greater than the prescribed minimum pressure head.
where H k is the simulated pressure head at node k and H min k is the prescribed minimum pressure head at node k.
iv. Pipe size availability: The diameter of the pipes selected at any stage must belong to the set of commercially available diameters.
where S is the number of commercial pipe diameters.
The WDN optimization models used in this study incorporated the EPANET 2.0 toolkit with the Rao algorithms to check for the hydraulic constraints of the problems.
Equations (1) and (2) are checked in the EPANET after calculating the available pressure head at every node. The head loss in the pipe is calculated using the Hazen-William formula given in Equation (6): ω in Equation (6) is the unit conversion factor whose value depends on the units chosen, and α and β are the coefficients having the values of 1.85 and 4.87, respectively.
Thus, the headloss calculated from Equation (6)  The solutions violating the minimum pressure requirement (Equation (4)) at any node in the network are referred to as a non-feasible solution. A constant penalty is used in the present work to penalize such non-feasible solutions (Equation (7)) so that the probability of picking up these non-feasible solutions is minimized over feasible solutions. Penalty functions chosen for the problem are to be properly tuned for any constrained optimization problems.
where P min is the simulated minimum pressure value among all the nodes and P req is the minimum pressure requirement at any node. λ is a penalty parameter and is constant. Thus, the total cost for any solution is written as follows: The flowchart in Figure 1 shows the steps used in the present work to develop the optimization model for Rao-I for the optimal sizing of the pipe network problem. In the development of the Rao-II optimization model for this problem, all the steps are similar to Rao-I except step 4, that is, the evolution of solutions in Rao-II is different from Rao-I. The solutions in Rao-II are updated as given in the following equation:

RAO-I AND RAO-II ALGORITHMS
where the values of the best and worst solution for a variable j, for any iteration i are the X j,best,i and X j,worst,i , respectively.
The updated value X 0 j,k,i is calculated from the previous value of the solution for variable j, that is, X j,k,i . r 1,j,i and r 2,j,i are two random numbers that are distributed uniformly within the range of (0,1). The term X j,l,i in the equation is any randomly picked solution, l, from the entire set of population and is compared with the solution k based on fitness value (which in the present work is total network cost). If the fitness of solution l is better than k (the cost of solution l is less than solution k), indicating solution l to be superior to solution k and hence information must be exchanged from l to k, thus the term X j,k,i or X j,l,i becomes X j,l,i and the term X j,l,i or X j,k,i becomes X j,k,i. However, if the fitness of solution k is better than solution l, the term X j,k,i or X j,l,i becomes X j,k,i and the term X j,l,i or X j,k,i becomes X j,l,i . Once all the solutions are updated using the above technique, an entirely new population set is generated and hence these are carried forward to step 5.

CASE STUDIES
The effectiveness of the Rao evolutionary techniques for the optimization of WDN is demonstrated by applying it to five different size benchmark networks. The networks con- In the present work, all EAs are compared based on MFE.  The schematic sketch of the network along with hydraulic data of the network like demands at nodes and nodal pressure is shown in Figure 2(a). There are 13 commercially available pipe diameters which lead to a search space of 1.48Eþ09. In Table 3, a comparison of the optimal diameters obtained and computational efforts taken by various other techniques for the optimization of this network is given. From Table 3, it is observed that all the optimization   conditions, Rao-II obtained the same optimal cost in 1,410

MFE. Thus, Rao-I outperforms Rao-II for the two-loop net-
work, but the performance of Rao-II is better when compared with other techniques as seen from Table 3 in terms of MFE. It is evident from the convergence curves for Rao-I and Rao-II in Figure 3(a) that Rao-I converges faster than Rao-II.

Hanoi network
The second benchmark network considered for the study is the Hanoi network (Figure 2(b)).    with the MFE required to reach the optimal solution is given in Table 5. The original design of the network is     shown in column 2 of Table 5 Table 6. After this, the network has been optimized by many researchers using various   reported by these techniques is post sensitivity analysis and thus does not include those in the results presented in Table 6. The convergence curves for Rao-I and Rao-II are shown in Figure 3(d). From the curves, it is clear that Rao-II obtains the lower cost in fewer iterations as compared with Rao-I.

Farhadgerd network
The Farhadgerd network (Figure 2( It is also evident that the performance of Rao-II is better than Rao-I for the Farhadgerd network as seen from the convergence curves for Rao-I and Rao-II shown in Figure 3(e).
The optimal diameters obtained for all the benchmark networks using Rao-I and Rao-II are simulated in EPANET 2.0 and pressure values at every node for each network are obtained. The minimum and maximum pressure

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