원시데이터 수집 시스템
선정목록으로

Algorithms for optimization of branching gravity-driven water networks

관련 모빌리티 소재 · (2) 샤무드(인공피혁)

기본 정보

저자
  1. Ian Dardani — College of Engineering, Villanova University, Villanova, PA 19085, USA
  2. Gerard F. Jones — College of Engineering, Villanova University, Villanova, PA 19085, USA
DOI
10.5194/dwes-11-67-2018
저널
Drinking water engineering and science
발행년도
2018
발행기관
Copernicus Publications on behalf of the TU Delft
피인용수
0
라이선스
cc-by
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.5194/dwes-11-67-2018
토픽
Membrane Separation Technologies
OpenAlex ID
W2590454765

평가 내용

관련도
관련
사업분야
모빌리티 소재 · (2) 샤무드(인공피혁)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '모빌리티 소재 > 샤무드(인공피혁)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

Abstract. The design of a water network involves the selection of pipe diameters that satisfy pressure and flow requirements while considering cost. A variety of design approaches can be used to optimize for hydraulic performance or reduce costs. To help designers select an appropriate approach in the context of gravity-driven water networks (GDWNs), this work assesses three cost-minimization algorithms on six moderate-scale GDWN test cases. Two algorithms, a backtracking algorithm and a genetic algorithm, use a set of discrete pipe diameters, while a new calculus-based algorithm produces a continuous-diameter solution which is mapped onto a discrete-diameter set. The backtracking algorithm finds the global optimum for all but the largest of cases tested, for which its long runtime makes it an infeasible option. The calculus-based algorithm's discrete-diameter solution produced slightly higher-cost results but was more scalable to larger network cases. Furthermore, the new calculus-based algorithm's continuous-diameter and mapped solutions provided lower and upper bounds, respectively, on the discrete-diameter global optimum cost, where the mapped solutions were typically within one diameter size of the global optimum. The genetic algorithm produced solutions even closer to the global optimum with consistently short run times, although slightly higher solution costs were seen for the larger network cases tested. The results of this study highlight the advantages and weaknesses of each GDWN design method including closeness to the global optimum, the ability to prune the solution space of infeasible and suboptimal candidates without missing the global optimum, and algorithm run time. We also extend an existing closed-form model of Jones (2011) to include minor losses and a more comprehensive two-part cost model, which realistically applies to pipe sizes that span a broad range typical of GDWNs of interest in this work, and for smooth and commercial steel roughness values.

본문 89,807자

본문 펼치기
Drink. Water Eng. Sci., 11, 67–85, 2018 https://doi.org/10.5194/dwes-11-67-2018 © Author(s) 2018. This work is distributed under the Creative Commons Attribution 3.0 License. # Algorithms for optimization of branching gravity-driven water networks Ian Dardani and Gerard F. Jones College of Engineering, Villanova University, Villanova, PA 19085, USA Correspondence: Ian Dardani (ian.dardani@villanova.edu) Received: 31 January 2017 – Discussion started: 24 February 2017 Revised: 3 February 2018 – Accepted: 7 March 2018 – Published: 15 May 2018 Abstract. The design of a water network involves the selection of pipe diameters that satisfy pressure and flow requirements while considering cost. A variety of design approaches can be used to optimize for hydraulic performance or reduce costs. To help designers select an appropriate approach in the context of gravity-driven water networks (GDWNs), this work assesses three cost-minimization algorithms on six moderate-scale GDWN test cases. Two algorithms, a backtracking algorithm and a genetic algorithm, use a set of discrete pipe diameters, while a new calculus-based algorithm produces a continuous-diameter solution which is mapped onto a discrete-diameter set. The backtracking algorithm finds the global optimum for all but the largest of cases tested, for which its long runtime makes it an infeasible option. The calculus-based algorithm’s discrete-diameter solution produced slightly higher-cost results but was more scalable to larger network cases. Furthermore, the new calculus-based algorithm’s continuous-diameter and mapped solutions provided lower and upper bounds, respectively, on the discrete-diameter global optimum cost, where the mapped solutions were typically within one diameter size of the global optimum. The genetic algorithm produced solutions even closer to the global optimum with consistently short run times, although slightly higher solution costs were seen for the larger network cases tested. The results of this study highlight the advantages and weaknesses of each GDWN design method including closeness to the global optimum, the ability to prune the solution space of infeasible and suboptimal candidates without missing the global optimum, and algorithm run time. We also extend an existing closed-form model of Jones (2011) to include minor losses and a more comprehensive two-part cost model, which realistically applies to pipe sizes that span a broad range typical of GDWNs of interest in this work, and for smooth and commercial steel roughness values. 1 Introduction A gravity-driven water network (GDWN) is commonly used to deliver potable water from a source at a high elevation, such as a natural spring or reservoir, to households or public tap stands (Fig. 1). When feasible, gravity-driven water networks are attractive in comparison to pumped networks because of their simplicity and lower capital, operational, and maintenance costs. In addition, in many locations where GDWN are considered, there may be little or no access to reliable grid-based electrical power for pumps. To improve reliability, networks may be designed with loops or multiple water sources, although often material cost considerations restrict attention to single-source branched networks. Water networks are modeled as a collection of nodes, each representing a point of water demand or supply, which are connected with links representing pipes. The geometrical layout of the site is known and fixed, including water source and demand locations and elevations of all nodes. For the present work, design flow rates are determined from community survey data, which are extrapolated for future population growth. Networks in this category are referred to as “demand-driven” designs. Bhave (1978, 1983) refers to these as “Q-specified” designs. Thus, to design a network of this type, pipe diameters for each link must be chosen such that acceptable but arbitrary minimum (positive) pressure heads are maintained at each node given the design flow rate at Published by Copernicus Publications on behalf of the Delft University of Technology 68 I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks Figure 1. Element schematic of a GDWN. the node. Furthermore, application of the energy equation to each link in the network demonstrates that the design problem is nonunique; i.e., choosing different pressure heads at the nodes will result in a different pipe diameter solution for the network, and thus different network costs. Minimizing network cost will produce a unique solution to the design problem, i.e., unique link diameters and nodal pressure heads. In practice, gravity-driven water networks are commonly designed by a marching method, where diameters for each link of the network are chosen sequentially. After selecting a reasonable diameter for each link, the designer calculates the pressure head at the link outlet, and proceeds to the next link if this result is acceptable. In this way, the designer marches through the network until all pipe diameters have been selected. This method produces a feasible solution, but not a cost optimized one. As noted by Bhave (2003), cost savings of 20–30 % can result from the use of optimization techniques. In developing regions, the cost of a water network can be prohibitive, adding to the importance of optimizing network design. Within the provided framework, the global optimum can be found through an exhaustive search of the solution space, known as complete enumeration, although this is infeasible when considering networks with many links and diameter choices (Kadu et al., 2008; González-Cebollada et al., 2011). To reduce the computational time required by enumeration, authors have proposed various partial enumeration methods which prune the search space (Kadu et al., 2008), although some of these techniques may remove the global optimum (Simpson et al., 1994). The most common types of algorithms that have been applied to optimize water network design include traditional deterministic methods, heuristic methods, metaheuristic methods, multi-objective methods, and decomposition methods (Zhao et al., 2016). Deterministic methods include linear programming (LP), dynamic programming, and nonlinear programming (NLP), and typically involve rigorous mathematical approaches (Zhao et al., 2016). A brief overview and comparison of these algorithms is given in Kansal et al. (1996), who use a single-part cost correlation for metric pipe diameters between 100 and 350 mm. Linear programming techniques have relatively low computational complexity and allow each link to be composed of two diameters, called a split-pipe solution, although these may not always be practical to implement (Bhave, 1983; Kessler and Shamir, 1989; Swamee and Sharma, 2000; Samani and Mottaghi, 2006). LP can also get stuck in a local optimum (Zhao et al., 2016), although combining LP with metaheuristic techniques can help with the problem’s non-smoothness properties (Krapivka and Ostfeld, 2009). Dynamic programming has been used by Yang et al. (1975) and Martin (1980) to optimize networks in stages. This approach begins at the discharge nodes, proceeding to select feasible diameters and joints for upstream stages and storing these partial candidates in memory until the source node is reached. At this point, the algorithm reviews the feasible segment design options and selects a combination of stage solutions producing the lowest cost overall solution. This method, however, requires the designer to allow a relatively narrow range for the design pressure of each node, or otherwise store a large set of feasible candidate solutions in memory and also allow adjoining branches to arrive at different heads at the same node. Nonlinear programming, a calculus-based method, deals with each link’s diameter as a continuous variable. Using Lagrange multipliers and a one-part, pipe-cost model with minor-lossless flow, Swamee and Sharma (2000) developed systems of equations for both continuous and discrete pipe diameters for branch networks, assuming a constant friction factor. When solved, the solution gives diameter values that minimize distribution main cost, not network cost. In carrying out the solution, iteration is required to update the value of the friction factor. For the discrete diameter case, large computational times were noted by Swamee and Sharma because of the stiffness of the mathematical system. Cases where one or more nodal pressure heads are not acceptable need to be treated manually by the designer in various ways as discussed by the authors. For branching networks, Jones (2011) showed that by restricting the focus to smooth-turbulent (turbulent flow in a smooth pipe) minorlossless flow, and the use of a one-part, pipe-cost model, a simple nonlinear algebraic equation for each internal node in the distribution main could be developed. The development of this algorithm, as well as solution methodology, differs from that of Bhave (1978), which assumes constancy in several terms and thus requires iteration to solve. The Jones algorithm has been extended in the present work to include minor losses and rough pipe. When solved simultaneously with the energy equation for each link, a unique solution for all link diameters and nodal pressure head values is obtained which produces minimum network cost, as opposed to the distribution main cost as in Swamee and Sharma (2000). The Drink Water Eng Sci 11 67–85 2018 www drink-water-eng-sci net/11/67/2018/ I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks 69 method of Jones also applies to serial and loop networks because of its generality. Heuristic methods follow specific rules to incrementally build better solutions, although the rules are not strictly formulated to trend towards local or global optima. An approach by Monbaliu et al. (1990) sets all network pipes to their minimum size, where the pipe that has a maximum head loss gradient is incremented to its next-highest size until all nodal head requirements are satisfied. Similarly, an algorithm by Keedwell and Khu (2006) selects an initial solution and iteratively responds to nodal head deficits and surpluses by incrementing or decrementing pipe sizes accordingly until a feasible solution is found. Suribabu (2012) proposed a heuristic that identifies pipes to increment or decrement in size based on flow velocity and alternative metrics such as proximity to the source node, achieving acceptable cost results with computational efficiency. While these algorithms are typically computationally efficient, they do not guarantee a global optimum. Metaheuristic optimization methods allow for a set of solutions to evolve through random processes that are guided with an objective function which rewards low network costs and penalizes hydraulic insufficiencies. Examples include evolutionary algorithms, which are most commonly genetic algorithms (Krapivka and Ostfeld, 2009; Simpson et al., 1994; Kadu et al., 2008; Prasad and Park, 2004), simulated annealing (Vasan and Simonovic, 2010; Tospornsampan et al., 2007), ant colony optimization (Maier et al., 2003), and differential evolution (Vasan and Simonovic, 2010). As reviewed by Nicklow et al. (2010), evolutionary algorithms are an emerging popular alternative to the deterministic methods, and they offer the opportunity to accommodate unique constraints and multiple design objectives. The main challenges for evolutionary algorithms are the difficulty of incorporating constraints into objective functions, the optimum selection of parameters, and a relatively large amount of computational effort. In addition to optimizing for cost, multiobjective methods, often based on evolutionary algorithms, allow the designer to choose from a Pareto optimal front of objectives, such as cost and reliability (Prasad and Park, 2004). In addition to water network design, metaheuristic algorithms have been used for a range of problems in water resources engineering, such as rainfall and runoff modeling (Taormina and Chau, 2015). Decomposition methods involve the partitioning of networks into smaller sub-networks which are each optimized using one of many types of techniques and then combined into an overall solution. In some cases, the loops in the subnetworks are removed, producing branching trees which are then optimized individually. Techniques used to optimize the sub-networks can involve multiple methods, including linear programming (Saldarriaga et al., 2013) and differential evolution (Zheng et al., 2013), with a later stage optimizing the network as a whole using the sub-network solutions as inputs. Note that another distinct use of the term “decompo sition” refers to the approach of iteratively solving “inner” and “outer” mathematical problem formulations, and has been used in the literature by Krapivka and Ostfeld (2009) who traces its use in this context back to Alperovits and Shamir (1977). In the present study, we present three algorithms, each from one of three major categories of methods applied to the cost optimization of water distribution networks, and compare their performance on five cases adapted from real GDWNs. These algorithms include (1) the calculus-based (CB) optimization model of Jones (2011), an NLP method; (2) backtracking (BT), a partial enumeration method; and (3) a genetic algorithm (GA), a metaheuristic method. Major distinguishing features of these algorithms include their working use of continuous diameters (CB) versus discrete diameters (BT and GA), their deterministic (CB and BT) versus stochastic (GA) search process, and their relative scalability as better (CB, GA) and worse (BT) for larger networks. In terms of their ability to find a global optimum solution for the problem formulation, CB finds a global optimum for continuous diameters but cannot guarantee a discrete diameter global optimum in its mapped solution, BT can guarantee a discrete global optimum, and GA cannot guarantee an optimum. For a direct comparison of techniques, the pipe costs used for all algorithms are found by interpolating a two-part cost formula based on a curve fit of real cost data for available diameter values. The three algorithms are tested against networks adapted from field data on five actual GDWNs installed in Panama, Nicaragua, and the Philippines. Within the broader context of water network problem formulations, this paper is concerned with finding cost-optimal single-diameter solutions to branching water distribution networks with steady-state demand flows and pre-specified pipe locations. By implication of being gravity-driven, the problem does not involve the use of pumping stations. This problem formulation is directly applicable to typical gravitydriven water networks, and is also useful for multi-objective algorithms, the consideration of sub-networks in a decomposition technique, pumped networks, and looped system optimization, which can involve reformulating the problem into a branching configuration. The results of this study highlight the advantages and weaknesses of each GDWN design method including closeness to the global optimum, the ability to prune the solution space of infeasible and suboptimal candidates without missing the global optimum, and also computational time. We present two pre-processors which discrete-diameter search methods can use to reduce the search space without pruning the global optimum. To the authors’ knowledge, this is the first implementation of “pre-processor 1” in enumeration methods and the first implementation of “pre-processor 2” in any water network design method. We also extend the Jones closed-form model to include minor losses, a more comprehensive two-part cost model, which realistically applies to pipe sizes that span a broad range typical of GDWNs of inter www drink-water-eng-sci net/11/67/2018/ Drink Water Eng Sci 11 67–85 2018 70 I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks est in this work, and for smooth and commercial steel roughness values. 2 Problem formulation Branching networks are considered (Fig. 1), where all branches connect a distribution main node with a delivery node, shown as tap stands or houses. For each link in a network of _N_ L links, pipe length ( _L_ ) and the net elevation change ( _�z_ ) are considered known and fixed. Steady-state flow rates ( _Q_ ) are prescribed for each link based on the demand flow data at delivery nodes. As noted above, demand flows are determined by community surveys and extrapolated in time to quantitatively account for population growth. Minor losses are accounted for through a minor loss coefficient _K_ or a dimensionless equivalent pipe length, ( _L_ e _/D_, or in symbol form, _L_ ebyD), where _L_ e is the pipe length of diameter _D_ whose frictional loss results in the corresponding minor loss. An optimal solution is obtained by selecting pipe diameters ( _D_ ) from a set of commercially available diameters such that the network’s material cost is minimized. With _N_ D choices of diameters for _N_ L links, the problem has _N_ D <sup>_N_</sup> <sup>L</sup> candidate solutions. For all nodes, pressure head, _h_, is greater than or equal to a chosen minimum, _h_ min. The value for _h_ min is selected to eliminate possible leakage of contaminated ground water into the network should the operating conditions change in an unanticipated way. The change in pressure head, _�h_, across each link is calculated with the energy equation for pipe flow as follows: Figure 2. Three-pipe branch network. pipe and, if needed, break-pressure tanks are left to the correct judgment of the designer under no-flow conditions. In addition, precautions against water hammer are left to the designer. 3 New calculus-based algorithm In this section we develop a new calculus-based algorithm for pipe diameters that minimize overall pipe cost for the network. First appearing in Jones (2011), this algorithm is solved simultaneously with the energy equation for each link to produce unique solutions for _D_ and nodal pressure head values that minimize network pipe cost, as opposed to only the distribution main cost as in Swamee and Sharma (2000). The method also applies to serial and loop networks but the focus for the present work is on branching networks. We assume continuous pipe diameters in this section; values that result from the solution of the energy equation. Mapping between continuous diameters and the discrete nominal sizes, required to complete the design, will be addressed below. Consider the three-pipe network shown in Fig. 2. Pipes 1– 2, 2–3, and 2–4 meet where head _h_ 2 is unknown. Each pipe has a prescribed volume flow rate and length and unknown diameter _D_ as shown. The change in elevation between the top and bottom of each pipe is _�z_, and _�h_ is the change in pressure head. There is a prescribed head at each outlet for pipes 2–3 and 2–4. To facilitate insight, we at first assume turbulent flow (which can be verified post-calculation if necessary) in smooth pipe and that minor losses are negligible. Two sources for the friction factor for smooth-turbulent flow are considered, namely the classical Blasius equation (reported in Streeter et al., 1998), _f_ = 0 _._ 316 _Re_ <sup>−1</sup> <sup>_/_</sup> <sup>4</sup>, and the Swamee–Jain correlation (Swamee and Jain, 1976), _f_ = 0 _._ 175 _Re_ <sup>−0</sup> <sup>_._</sup> <sup>1923</sup> (though not explicitly appearing in this reference, _f_ from the Swamee–Jain correlation is obtained by writing it for smooth pipe and comparing this with the energy equation, where _f_ is assumed to be in the form _aRe_ <sup>_n_</sup> ). _�h_ = − _�z_ + _α_ + _K_ + _f_ - _<u>L</u>_ _D_ <sup>+</sup> <sup>_L_</sup> <sup>ebyD</sup> �� <u>8</u> _<u>Q</u>_ <sup>2</sup> _π_ <sup>2</sup> _gD_ <sup>4</sup> <sup>_,_</sup> (1) where for each link, _α_ is the kinetic energy correction factor and _f_ is the Darcy friction factor, calculated with the Colebrook–White equation (Colebrook and White, 1937) or Churchill correlation (Churchill, 1977), and _g_ is acceleration of gravity. The kinetic energy correction factor, _α_, is considered only in the first link, where acceleration from a zerovelocity source is sometimes non-negligible for the smallest of GDWNs that have been encountered. Thus, _α_ = - 2 _Re_ ≤ 2300 1 _._ 05 _Re >_ 2300 <sup>_,_</sup> where _Re_ is the Reynolds number for pipe flow, 4 _Q/πνD_, and _ν_ is the kinematic viscosity of water. The possibility of laminar flow ( _Re_ ≤ 2300) is permitted since branches from the smallest GDWN observed in practice have been in this regime. The pressure upper bound is not incorporated into the optimization process. Worst-case pressure conditions occur under hydrostatic conditions, which are directly related to the maximum elevation change in the network and where no flow occurs. Therefore, before the optimization process is undertaken, the selections of appropriate pressure ratings for the Drink Water Eng Sci 11 67–85 2018 www drink-water-eng-sci net/11/67/2018/ I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks 71 - _<u>D</u>_ <u>23</u> _D_ u - _b_ + 2 _L_ 23 - _b_ <sup>�</sup> _._ (6) The Blasius equation has higher accuracy (2 % for low _Re_ and 3 % for high _Re_ ) in the range 10 <sup>4</sup> < _Re_ < 10 <sup>5</sup>, over which most of the GDWNs in this work operate, compared with the Swamee–Jain correlation of +8 %/−3 %, thus the Blasius equation is chosen for this work. A combination of the Blasius equation with the energy equation gives explicit formulas for _D_ for the three links in Fig. 2. For simplicity, and to reduce the number of free parameters, the conditions for pipes 2–3 and 2–4 are assumed to be identical without loss of generality. We therefore obtain = _a_ _L_ 12 - _<u>D</u>_ <u>12</u> _D_ u The mathematical basis for a unique solution for _h_ 2 with cost minimization is now presented. In addition to the fixed pipe lengths, the total cost depends on the diameters for all pipes in the network. For the case of Fig. 2, where we now allow pipe 2–3 and pipe 2–4 to be different, we get _C_ T = _C_ T ( _D_ 12 ( _h_ 2) _,D_ 23 ( _h_ 2) _,D_ 24 ( _h_ 2)) _._ (7) Using the chain rule from the calculus, the total differential of Eq. (7) is d _C_ T = <sup>_<u>∂C</u>_</sup> <sup><u>T</u></sup> _∂D_ 12 - _<u>�z</u>_ <u>12</u> + _<u>�h</u>_ <u>12</u> _D_ 12 = 0 _._ 741 _L_ 1 �−4 _/_ 19� _<u>Q</u>_ <u>12</u> _<u>ν</u>_ 1 _/_ 7 �7 _/_ 19 (2) _g_ <sup>4</sup> <sup>_/_</sup> <sup>7</sup> d _h_ 2 + <sup>_<u>∂C</u>_</sup> <sup><u>T</u></sup> _∂D_ 23 _<u>∂D</u>_ <u>23</u> _∂h_ 2 _<u>∂D</u>_ <u>12</u> _∂h_ 2 d _h_ 2 �7 _/_ 19 _._ - _<u>�z</u>_ <u>23</u> + _<u>�h</u>_ <u>23</u> _D_ 23 = _D_ 24 = 0 _._ 741 _L_ 2 �−4 _/_ 19� _<u>Q</u>_ <u>23</u> _<u>ν</u>_ 1 _/_ 7 _g_ <sup>4</sup> <sup>_/_</sup> <sup>7</sup> _<u>∂D</u>_ <u>24</u> _∂h_ 2 d _h_ 2 _._ (8) With our assumptions and inspection of Fig. 2, _�h_ 12 = − _h_ 2 and _�h_ 23 = _�h_ 24 = _h_ 2 − _h_ 3 = _h_ 2 − _h_ 4, we furthermore obtain + <sup>_<u>∂C</u>_</sup> <sup><u>T</u></sup> _∂D_ 24 + <sup>_<u>∂C</u>_</sup> <sup><u>T</u></sup> The minimum value of _C_ T is found once d _C_ T = 0 (and once it is verified that the second derivative of _C_ T is positive thus indicating that _C_ T is indeed a minimum). Requiring this, we obtain �7 _/_ 19 (3) - _<u>�z</u>_ <u>12</u> - _<u>h</u>_ <u>2</u> _D_ 12 = 0 _._ 741 _L_ 1 �−4 _/_ 19� _<u>Q</u>_ <u>12</u> _<u>ν</u>_ 1 _/_ 7 _g_ <sup>4</sup> <sup>_/_</sup> <sup>7</sup> _<u>∂D</u>_ <u>12</u> _∂h_ 2 + <sup>_<u>∂C</u>_</sup> <sup><u>T</u></sup> _∂D_ 23 _<u>∂D</u>_ <u>23</u> _∂h_ 2 + <sup>_<u>∂C</u>_</sup> <sup><u>T</u></sup> _∂D_ 24 _<u>∂D</u>_ <u>24</u> _∂h_ 2 0 = <sup>_<u>∂C</u>_</sup> <sup><u>T</u></sup> _∂D_ 12 �7 _/_ 19 _._ - _<u>�z</u>_ <u>23</u> - _<u>h</u>_ <u>3</u> + _<u>h</u>_ <u>2</u> _D_ 23 = _D_ 24 = 0 _._ 741 _L_ 2 �−4 _/_ 19� _<u>Q</u>_ <u>23</u> _<u>ν</u>_ 1 _/_ 7 _g_ <sup>4</sup> <sup>_/_</sup> <sup>7</sup> _._ (9) The single-part pipe-cost model can be assumed to follow a power-law relationship (Swamee and Sharma, 2008) The cost _C_ T is from Eq. (5), so the derivatives like _∂C_ T _/∂D_ 12 in Eq. (9) are written in general as _<u>∂C</u>_ <u>T</u> _∂Dij_ - _b_ _,_ (4) _Dij_ <sup>_b_</sup> <sup>−1</sup> _D_ u <sup>_b_</sup> _Lij_ (10) _C_ = _a_ - _<u>D</u>_ _D_ u = _ab_ where _C_ is cost per unit length of pipe, _a_ is a constant coefficient, _b_ is a constant exponent, and _D_ u an assumed unit diameter. A more robust, two-part model, valid for a greater range of pipe sizes than that of Swamee and Sharma (2008), will be used below. The use of pipe material cost as the objective function was assumed because of relevance. In most GDWNs of interest in this work, installation labor comes from the local community and has no well-defined associated cost, such that the material cost for the network is of prime importance. For a more general case, the economics of a GDWN may be more encompassing and include materials, labor, operation and maintenance, depreciation, taxes, and salvage, among others. The time value of money may also need to be considered, which includes interest rates and estimation of the network lifetime. With Eq. (4) the general expression for the total cost for the pipe material, _C_ T, is obtained by summing over all links _ij_, for any link _ij_ . The derivatives like _∂D_ 12 _/∂h_ 2 in Eq. (9) are obtained by taking the partial derivative of the pipe diameter with respect to the relevant pressure head in the appropriate energy equation. For the full energy equation, where _D_ appears in a nonlinear way in more than one location, this would be done using numerical methods. However, if we assume minorlossless, smooth-turbulent flow as noted above, we can use the energy equations like Eq. (3). We therefore obtain the following for pipe 1–2: - 197 ; (11) _<u>∂D</u>_ <u>12</u> _∂h_ 2 = 0 _._ 156 - _<u>�z</u>_ <u>12</u> - _<u>h</u>_ <u>2</u> _L_ 12 - <u>−1923</u> - _<u>ν</u>_ <sup>1</sup> <sup>_/_</sup> <sup>7</sup> _<u>Q</u>_ <u>12</u> _g_ <sup>4</sup> <sup>_/_</sup> <sup>7</sup> _L_ <sup>19</sup> 12 <sup>_/_</sup> <sup>7</sup> - <u>−1923</u> - _<u>ν</u>_ <sup>1</sup> <sup>_/_</sup> <sup>7</sup> _<u>Q</u>_ <u>12</u> _g_ <sup>4</sup> <sup>_/_</sup> <sup>7</sup> _L_ <sup>19</sup> 12 <sup>_/_</sup> <sup>7</sup> for pipe 2–3, we get _<u>∂D</u>_ <u>23</u> _∂h_ 2 = - 197 ; (12) - _<u>�z</u>_ <u>23</u> + _<u>h</u>_ <u>2</u> - _<u>h</u>_ <u>3</u> _L_ 23 - <u>−1923</u> - _<u>ν</u>_ <sup>1</sup> <sup>_/_</sup> <sup>7</sup> _<u>Q</u>_ <u>23</u> _g_ <sup>4</sup> <sup>_/_</sup> <sup>7</sup> _L_ <sup>19</sup> 23 <sup>_/_</sup> <sup>7</sup> - <u>−1923</u> - _<u>ν</u>_ <sup>1</sup> <sup>_/_</sup> <sup>7</sup> _<u>Q</u>_ <u>23</u> _g_ <sup>4</sup> <sup>_/_</sup> <sup>7</sup> _L_ <sup>19</sup> 23 <sup>_/_</sup> <sup>7</sup> - _b_ _,_ (5) - 0 _._ 156 - _Dij_ _D_ u and for pipe 2–4, _C_ T = _a_ _Lij_ _ij_ which, for the present problem, becomes <u>1</u> 7 _<u>Q</u>_ <u>24</u> <u>4</u> <u>19</u> 7 _L_ 247 <u>7</u> 19 _._ (13)   - 1923  <sup>_<u>ν</u>_</sup> _g_ - _<u>D</u>_ <u>12</u> - _b_ + _L_ 23 _D_ u _<u>∂D</u>_ <u>24</u> _∂h_ 2 - _<u>�z</u>_ <u>24</u> + _<u>h</u>_ <u>2</u> - _<u>h</u>_ <u>4</u> = −0 _._ 156 _L_ 24 - _<u>D</u>_ <u>23</u> _D_ u - _b_ <sup>�</sup> - _b_ - _<u>D</u>_ <u>24</u> + _L_ 24 _D_ u _C_ T = _a_ _L_ 12 www drink-water-eng-sci net/11/67/2018/ Drink Water Eng Sci 11 67–85 2018 72 I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks Equations (10)–(13) are combined with Eq. (9) to produce a single algebraic equation that depends on _h_ 2, as well as _D_ 12, _D_ 23, and _D_ 24. Introducing _D_ 12 _,D_ 23, and _D_ 24 from Eq. (3) into this algebraic equation, we get �−(1+4 _b/_ 19) 0 = _Q_ <sup>7</sup> 12 <sup>_b/_</sup> <sup>19</sup> - _<u>�z</u>_ <u>12</u> - _<u>h</u>_ <u>2</u> _L_ 12 In Eq. (17), _a_ s and _a_ l are the coefficients for the small (designated by subscript _s_ ) and large (subscript _l_ ) pipe size regions, respectively, and _b_ s and _b_ l are the exponents for the small and large pipe size regions, respectively. A cubic spline is fit between pipe sizes _D_ co and _D_ co+1 to complete the transition between small and large pipe sizes. The coefficients of this polynomial are _c_ 1, _c_ 2, _c_ 3, and _c_ 4 as seen in Eq. (17). These coefficients are evaluated by matching the cubic polynomial and pipe data at _D_ co and _D_ co+1 and the first derivative of - _<u>D</u>_ <u>co+1</u> - _<u>�z</u>_ <u>23</u> + _<u>h</u>_ <u>2</u> - _<u>h</u>_ <u>3</u> _L_ 23 - _<u>�z</u>_ <u>24</u> + _<u>h</u>_ <u>2</u> - _<u>h</u>_ <u>4</u> _L_ 24 �−(1+4 _b/_ 19) �−(1+4 _b/_ 19) _._ (14) at _Dij_ = _D_ co and to _a_ l _b_ l - _Q_ <sup>7</sup> 23 <sup>_b/_</sup> <sup>19</sup> - _Q_ <sup>7</sup> 23 <sup>_b/_</sup> <sup>19</sup> - _b_ s−1 - _<u>D</u>_ <u>co</u> _D_ u - _Q_ <sup>7</sup> 24 <sup>_b/_</sup> <sup>19</sup> - _Q_ <sup>7</sup> 24 <sup>_b/_</sup> <sup>19</sup> the polynomial with respect to _Dij_ _/D_ u to _a_ s _b_ s _D_ u The general form of Eq. (14), written at any internal node is _ij_ <sup>−(1+4</sup> <sup>_b/_</sup> <sup>19)</sup> _ij_ <sup>−(1+4</sup> <sup>_b/_</sup> <sup>19)</sup> _,_ (15) 0 = _ij,_ in _Q_ <sup>7</sup> _ij_ <sup>_b/_</sup> <sup>19</sup> <sup>7</sup> _ij_ <sup>_b/_</sup> <sup>19</sup> _Sij_ <sup>−(1+4</sup> <sup>_b/_</sup> <sup>19)</sup> _Q_ <sup>7</sup> _ij_ <sup>_b/_</sup> <sup>19</sup> <sup>7</sup> _ij_ <sup>_b/_</sup> <sup>19</sup> _Sij_ <sup>−(1+4</sup> <sup>_b/_</sup> <sup>19)</sup> - _<u>D</u>_ <u>co+1</u> - _b_ l−1 at _Dij_ = _D_ co and to _a_ l _b_ l _D_ u at _Dij_ = _D_ co+1. An example of data for polyvinyl chloride (PVC) pipe and the curve fit is shown in Fig. 3. The results of the curve fit are as follows: _D_ co = 2 _._ 067 in., _D_ co+1 = 2 _._ 469 in., _a_ s = USD 1.349 m <sup>−1</sup>, _b_ s = 1 _._ 157, _a_ l = USD 1.381 m <sup>−1</sup>, _b_ l = 1 _._ 344, _c_ 1 = USD 237.516 m <sup>−1</sup>, _c_ 2 = USD 316.125 m <sup>−1</sup>, _c_ 3 = USD 140.450 m <sup>−1</sup>, _c_ 4 = −USD 20.499 m <sup>−1</sup> . It is clear from inspection of Fig. 3 that a one-part cost model would not have produced an acceptable curve-fit to pipe-cost data. _ij,_ out where the hydraulic gradient, _Sij_, is _Sij_ = <sup>_�zij_</sup> <sup>+</sup> <sup>_�hij_</sup> _Lij_ _._ (16) In Eq. (15) the indices _ij_,in and _ij_,out on the summations refer to inflows and outflows at the node (e.g., in Fig. 2, _ij_,in = 12 and _ij_,out = 23 and 24). Equation (15), the new CB algorithm proposed in this work, is written for each internal node in the network and solved simultaneously with the energy equation for each link to obtain unique and optimal values of _Dij_ for all links and _hj_ for all internal nodes. It is understood that the nodal pressure heads determined from the solution of this system must be greater than or equal to the _h_ min prescribed for the network. For nodes that do not satisfy this condition, the pressure head is set equal to _h_ min, as part of the CB algorithm. Thus, _hj_ ≥ _h_ min. Minor losses using the equivalent-length method can be included in the above developments by artificially extending the length of the link by _L_ e in which minor loss occurs, thus contributing a non-zero _L_ ebyD term in Eq. (1). We also extend the cost model of Eq. (5) from Swamee and Sharma (2008) to encompass two different ranges of pipe diameters having two different coefficients _a_ and exponents _b_ . The link between the two ranges starts at discrete pipe size _D_ co, at and below which the cost model for the small (subscript s) pipe sizes applies, and discrete pipe size _D_ co+1, at and above which the cost model for the large (subscript l) pipe sizes applies. The cutoff diameter, _D_ co is chosen by the designer based on inspection of cost vs. diameter data. Thus, and _A_ accounts for the effect of pipe roughness (smooth and commercial steel). The term _Cij_ <sup>′</sup> <sup>is the derivative of the cost</sup> function per unit length with respect to _D/D_ u. For the twopart cost model from above, we obtain With the inclusion of the two-part cost model and minor loss term, Eq. (15) becomes - 191 - _Q_ <sup>7</sup> _<u>ij</u>_ <sup>_ν_</sup> _g_ <sup>4</sup> _D_ u <sup>19</sup> _Cij_ <sup>′</sup> <sup>_A_</sup> _C_ <sup>′</sup> <u>4</u> 19 _ij_ - <sup><u>23</u></sup> �1 + _ϵij_ - 194 _Sij_ 19 - <sup><u>23</u></sup> �1 + _ϵij_ - 194 _Sij_ 19 _ij,_ in <u>4</u> 19 _ij_ <sup>_ϵ_</sup> _ij_ <sup>′</sup> <u>�</u> 191 1 − _BA_ _ij_ - <sup><u>4</u></sup> �1 + _ϵij_ �− <u>1519</u> _Sij_ 19 - <sup><u>4</u></sup> �1 + _ϵij_ �− <u>1519</u> _Sij_ 19 <u>�</u> _Q_ <sup>7</sup> _<u>ij</u>_ <sup>_ν_</sup> _g_ <sup>4</sup> _D_ u <sup>19</sup> 0 = �1 _/_ 19 _g_ <sup>4</sup> _D_ u <sup>19</sup> - <sup><u>23</u></sup> �1 + _ϵij_ - 194 _Sij_ 19 - <sup><u>23</u></sup> �1 + _ϵij_ - 194 _Sij_ 19 - _Q_ <sup>7</sup> _<u>ij</u>_ <sup>_ν_</sup> - _Q_ <sup>7</sup> _<u>ij</u>_ _Cij_ <sup>′</sup> <u>4</u> 19 _ij_ _ij_ <sup>′</sup> <sup>_A_</sup> - <sup>�</sup> _ij,_ out 1 − _BA_ <u>4</u> 19 _ij_ <sup>_ϵ_</sup> _ij_ <sup>′</sup> (18) (19) <u>�1</u> _/_ 19 <sup>_,_</sup> <u>�</u> _Q_ <sup>7</sup> _<u>ij</u>_ <sup>_ν_</sup> _g_ <sup>4</sup> _D_ u <sup>19</sup> _ij_ - <sup><u>4</u></sup> �1 + _ϵij_ �− <u>1519</u> _Sij_ 19 where _B_ = 0 _._ 1989 and _Dij_ _Lij_ _<u>D</u>_ <u>u</u> _Lij_ _k,ij_ _k,ij_ _ϵij_ = _k_ _ϵij_ <sup>′</sup> <sup>=</sup> _k_ - _<u>L</u>_ <u>e</u> _D_ - _<u>L</u>_ <u>e</u> _D_ _Aij_ = - 0 _._ 318 _,_ smooth pipe (20) 0 _._ 420 _,_ steel pipe _Dij_ ≥ _D_ co+1 _._ _Dij_ ≥ _D_ co+1 _._ _a_ s _b_ s - _Dij_ _D_ u - _Dij_ _a_ s _D_ u - _b_ s _,_ - _b_ s−1 _,_ _Dij_ ≤ _D_ co _Dij_ ≤ _D_ co (21) - _Dij_ _D_ u (17) + 3 _c_ 4 - _Dij_ _D_ u �2 _,_ �3 _,_ - _Dij_ _D_ u - _Dij_ _D_ u _Dij_ _D_ u + _c_ 3 �2 + _c_ 4    _c_ 2 + 2 _c_ 3 _Cij_ <sup>′</sup> <sup>=</sup> _Cij_ = _Lij_    _c_ 1 + _c_ 2 _D_ co _< Dij_ _< D_ co+1 _D_ co _< Dij_ _< D_ co+1 _a_ l _b_ l - _Dij_ _a_ l _D_ u - _b_ l _,_ - _Dij_ - _b_ l−1 _,_ _D_ u Drink Water Eng Sci 11 67–85 2018 www drink-water-eng-sci net/11/67/2018/ I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks 73 Figure 4. Bhave (1978) index notation at an internal node, _j_ . of pipe diameter and link index: Figure 3. PVC pipe cost from 2011 data. Equation (18), and its simpler form Eq. (15) for minorlossless flow and a single-part pipe-cost model (it is easy to show that Eq. (18) regresses to Eq. (15) for these conditions), is the root of the calculus-based optimization in this work and is applied at all internal nodes to uniquely determine _hj_ . Equation (18) is valid over the range of ∼ 4000 < _Re_ < ∼ 300 000. Algorithms to solve a general set of independent, nonlinear algebraic equations using, for example, the Levenberg–Marquardt, quasi-Newton, Newton– Raphson, or conjugate gradient methods are available in most commercial math packages including Matlab (1 Apple Hill Drive, Natick, MA USA 01760) and Mathcad [(http://www.](http://www.ptc.com) [ptc.com 31 January 2018). We used the package Mathcad in](http://www.ptc.com) the present work. Thus, compared with an iterative solution procedure, a solution flowchart is not relevant here. Bhave (1978) first proposed an algorithm like Eq. (15) using slightly different notation than here. For clarity, we represent Eq. (15) using Bhave’s notation as _�h_ 11 ··· _�h_ 1 _N_ L _..._ _..._ _..._ _�hN_ D1 ··· _�hN_ D _N_ L   _._ (22) _�_ h =   While an algorithm evaluates a candidate solution, the pressure head at each node is sequentially calculated by “marching” through the network. Starting with the fixed source pressure head, the algorithm finds the pressure head _hi_ for a given node by adding the head at the upstream node, _hi_ −1 to the change in head for that link _i_ L and the diameter _i_ D under consideration. Thus, _hi_ = _hi_ −1 + _�_ h ( _i_ D _,i_ L) _._ (23) Along with the hydraulic evaluation of a candidate solution, the cost of the partial candidate is found through the use of a lookup table C : _C_ 11 ··· _C_ 1 _N_ L _..._ _..._ _..._ _CN_ D1 ··· _CN_ D _N_ L   _,_ (24) C =   0 = - _Q_ <sup>7</sup> _ij_ <sup>_b/_</sup> <sup>19</sup> <sup>7</sup> _ij_ <sup>_b/_</sup> <sup>19</sup> _Sij_ <sup>−(1+4</sup> <sup>_b/_</sup> <sup>19)</sup> _ij_ <sup>−(1+4</sup> <sup>_b/_</sup> <sup>19)</sup> _jk_ <sup>−(1+4</sup> <sup>_b/_</sup> <sup>19)</sup> _,_ - _Q_ <sup>7</sup> _jk_ <sup>_b/_</sup> <sup>19</sup> <sup>7</sup> _jk_ <sup>_b/_</sup> <sup>19</sup> _Sjk_ <sup>−(1+4</sup> <sup>_b/_</sup> <sup>19)</sup> where the _ij_ and _jk_ notation are shown in Fig. 4. Index _j_ spans all internal nodes along the distribution main. A quantitative comparison between Eq. (18) and the method of Bhave is presented below. 4 Backtracking algorithm and genetic algorithm Backtracking (BT) and genetic algorithm (GA) assess candidate solutions composed of discrete diameters from a commercially available set. These candidates are represented by a vector of _N_ L elements where each element corresponds to a commercially available diameter of a network link. To reduce the computational time associated with these evaluations, the constraints imposed by the energy equation and cost minimization may be more efficiently evaluated through lookup tables. With fixed _L_, _�z_, _K_, _L_ ebyD, and _α_, the change in pressure head _�h_ is evaluated for all _N_ D × _N_ L combinations where C ( _i_ D _i_ L) returns the additional cost of assigning a diameter with index _i_ D to link _i_ L. In this way, the candidate solution’s hydraulic performance and cost are incorporated into the genetic algorithm and backtracking approaches. In contrast to GA, the backtracking algorithm evaluates pressure head and cost upon consideration of each partial candidate, where GA calculates these values on full candidates as part of the objective function. 4.1 BT and GA pre-processor 1: maximum available diameter To increase the efficiency of BT and GA, it is advantageous to limit the number of pipe diameters in the available set, especially those outside of the range of the optimal solution. For the BT algorithm in particular, larger diameters can require considerable computational effort, since they tend not to violate static head requirements and require multiplelink partial candidates for the algorithm to reject them once www drink-water-eng-sci net/11/67/2018/ Drink Water Eng Sci 11 67–85 2018 74 I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks their cost exceeds that of an already-found viable candidate. Therefore, a pre-processor is used to provide a maximum diameter ( _D_ max) that should be considered during the optimization process. This procedure, which produces a conservative estimate, finds the smallest diameter at which a network with a single pipe diameter choice produces no nodes with a pressure head below _h_ min, similar to the technique used by Mohan and Jinesh Babu (2009). After this diameter is found, the next larger diameter in the set is selected as _D_ max to allow the algorithm to select a larger than necessary diameter if this is able to save cost elsewhere. It worth noting that Kadu et al. (2008) presents another method to further prune the search space with the critical path concept, where Dongre and Gupta (2011) noted the computational advantages of having just four diameter choices per link. This method, however, may prune the global optimum and may not produce feasible head values at intermediate nodes, as in the case of networks with a local high point. 4.2 BT and GA pre-processor 2: adjusted minimum pressure head A second pre-processor adjusts the minimum pressure head requirement for each internal node by considering the total head required at downstream nodes. It can be recognized that, without the use of a pump, the total head cannot increase at nodes downstream of a given node _i_ . Furthermore, the total head must decline at a minimum grade that is determined by the demand volume flow rate and the largest pipe diameter available ( _D_ max) for selection. This energy constraint is utilized to reduce the number of candidates to be considered by increasing the minimum pressure head at nodes where these rules produce a higher minimum head than the original _h_ min. For example, nodes upstream of a local network high point can have their minimum pressure head increased beyond the normal minimum, since the pressure head must be great enough to ensure adequate flow to the higher elevation downstream node. To begin this process, each node _i_ is initialized with a baseline minimum total head: _th_ min _,i_ = _zi_ + _h_ min _._ (25) _th_ min _,i_ is thus initialized by considering only the node’s hydraulic requirements in isolation, i.e., without acknowledging the neighboring downstream nodes. The pre-processor then considers updating _th_ min _,i_ by checking the following condition, which is false when the minimum pressure head at downstream nodes produces further constraints on an upstream node _i_ . Thus, for all nodes _i_ which are upstream of some node _j_, the following inequality can be evaluated: Also, consider that when flow rate _Qi_ - _j_ is small and _D_ max is large, the right-hand side of Eq. (26) approaches zero, representing the simple statement that upstream total head must always be greater than downstream total head. When the condition in Eq. (26) is false, the minimum total head can be updated in node _i_ such that the maximum diameter size in link _i_ - _j_ is able to meet the downstream node’s minimum total head, or _th_ min _,i_ = _th_ min _,j_ + (27) - - _Li_ - _<u>j</u>_ �� 8 _Q_ <sup>2</sup> _<u>i</u>_ - _<u>j</u>_ _αi_ - _j_ + _Ki_ - _j_ + _fi_ - _j_ + _L_ ebyD _i_ - _j_ _._ - _Li_ - _<u>j</u>_ _Di_ - _j_ + _L_ ebyD _i_ - _j_ �� 8 _Q_ <sup>2</sup> _<u>i</u>_ - _<u>j</u>_ _π_ <sup>2</sup> _gD_ max <sup>4</sup> _._ _th_ min _,i_ - _th_ min _,j_ ≥ (26) - - _Li_ - _<u>j</u>_ �� 8 _Q_ <sup>2</sup> _<u>i</u>_ - _<u>j</u>_ _αi_ - _j_ + _Ki_ - _j_ + _fi_ - _j_ + _L_ ebyD _i_ - _j_ _._ In this way, _th_ min _,i_ may be updated for each node until the condition in Eq. (26) is true for all nodes _i_ with a downstream node _j_ connected by a single link. After the values for _th_ min _,i_ are updated, they are converted back into minimum pressure head values by subtracting the elevation _zi_ from _th_ min _,i_ . This pre-processor serves to narrow the search for viable candidate solutions by potentially increasing the minimum pressure head. Since backtracking and GA consider network links in the downstream direction, these algorithms are otherwise blind to future downstream pressure head requirements. This limitation is alleviated by the pre-processor, which allows these algorithms some implicit information about what local diameter choices will be viable for the full network solution. Note that both pre-processors discussed will not prune the global optimum from the solution. 4.3 Backtracking algorithm (BT) The backtracking algorithm is a partial enumeration method that employs a systematic search of candidate solutions to find a global optimum. The algorithm works recursively to incrementally build candidate solutions while checking the candidates for hydraulic and cost acceptability. The strength of the BT is that, upon discovery of an infeasible partial candidate, all extensions of that candidate can be eliminated from consideration. In this way, many solutions can be pruned from the solution tree to achieve greater computational efficiency. Two backtracking methods in the literature are those by Gessler (1985) and González-Cebollada et al. (2011). The algorithm proposed by Gessler proposes a pipe-grouping strategy which speeds up the algorithm but risks pruning the global optimum. Additionally, pipe grouping represents its own optimization problem (Raad, 2011). The GonzálezCebollada algorithm does not include such pipe-grouping criteria, although it does halt its search after finding the first feasible solution, thus it does not guarantee a global optimum. The present study’s BT algorithm, once run to completion, does guarantee a global optimum. It operates similarly to the method presented by González-Cebollada et al. (2011), with the major differences being that the algorithm contin - _Li_ - _<u>j</u>_ _Di_ - _j_ + _L_ ebyD _i_ - _j_ �� 8 _Q_ <sup>2</sup> _<u>i</u>_ - _<u>j</u>_ _π_ <sup>2</sup> _gD_ max <sup>4</sup> _._ Drink Water Eng Sci 11 67–85 2018 www drink-water-eng-sci net/11/67/2018/ I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks 75 ues searching once it has found its first feasible solution and uses pre-processors 1 and 2 to further reduce the search space. This implementation of BT, however, scales poorly with larger network sizes and would not be appropriate for use on large urban networks. Its appropriateness is shown here for many of the GDWNs encountered in practice, as evidenced by its use on real-world GDWN test cases in this paper. Moreover, it serves as a benchmark against which other algorithms can be compared. BT uses two rejection criteria to discard candidate solutions from further consideration. The first rejection criterion is that when a candidate violates pressure head constraints, all candidates with equal or lesser diameter sizes can be discarded. This condition is leveraged even more effectively with pre-processor 2 above, which can increase pressure heads at individual nodes by anticipating the head requirements at surrounding nodes. The second rejection criterion is that once a feasible candidate has been found, all other partial candidates with a higher cost can also be discarded. The BT algorithm further extends this second criterion by considering that the links yet to be considered in a partial candidate, an “extension” to the partial candidate, will cost at a minimum that of the entire extension being composed of the smallest available diameter. The backtracking algorithm begins its search of the solution tree by considering the partial candidate with the smallest diameter size assigned to the first network link. The pressure head and the partial candidate cost at the outlet node are calculated with the _�_ h and C lookup tables. If this partial candidate meets pressure head and cost requirements, the algorithm extends this partial candidate by assigning the smallest diameter to the downstream link. If a partial candidate produces a node that is rejected on the basis of pressure head, the next largest larger diameter is chosen for the link upstream of the node. If no diameter satisfies the pressure head condition, the algorithm backtracks to the upstream link and assigns a larger diameter to the link. In this way, the algorithm continues to extend and reject candidate solutions until a full candidate satisfies the pressure head requirements. Once a working solution has been found, candidate solutions may be rejected based on cost. For each new candidate, cost is calculated by adding the cost of diameters that have already been assigned to the cost of assigning all downstream links with the smallest diameter available. If this cost exceeds the cost of the running optimum, the partial candidate is rejected. While the minimum pressure head criterion tends to prune candidates with diameters that are too small, the costbased criterion tends to prune candidates of diameters that are too large. 4.4 Modified backtracking algorithm (BT-NoUp) A modification to the BT algorithm was made to further improve its computational speed, although at the risk of pruning the global optimum from the search. This modified algorithm (BT-NoUp) rejects all candidates that feature a smaller diameter that is upstream of a larger diameter when an equal or smaller flow rate is present in the downstream link. Typically, a network designer would not consider such designs, and in cases where a single source feeds into a network with constant-length links, it is advantageous (or equivalent) to place larger diameters upstream of smaller diameters. However, due to the discrete nature of diameter choices and link lengths, an optimization problem may, in fact, have an optimal candidate with a larger diameter downstream from smaller ones. For this reason, the BT-NoUp algorithm, unlike the BT algorithm, may miss the global optimum at the expense of its greater computational efficiency. 4.5 Genetic algorithm (GA) Genetic algorithms are stochastic optimization techniques that mimic the process of natural selection, and numerous variations of GAs have demonstrated acceptable performance on WDN design (Nicklow et al., 2010). Given their popularity, the GA included in this study is meant to provide a point of comparison to the BT and CB algorithms when applied to GDWNs. When implemented in water network design, each candidate solution represents a selection of pipe diameters. The algorithm is initialized with a population of candidates of size _N_ c that repeatedly undergoes the processes of mutation, crossover, and selection - _,_ (28) _ci_ = - _D_ 1 _,i_ _D_ 2 _,i_ _..._ _DN_ L _,i_ where each candidate in the population _ci_ contains _N_ L diameters. In the present work, candidates are represented as a string of natural numbers, which is used over a binary representation to improve the ease of encoding (Vairavamoorthy and Ali, 2000). The mutation operator replaces pipe diameters with a diameter from a uniform random distribution, where each link diameter has a probability of _p_ mut of mutating on each generation. The crossover operator randomly pairs individuals in the population with probability _p_ xover and performs a single-point crossover of the two individuals, where the point of crossover is randomly chosen. The fitness, _fi_, of each candidate is assessed with penalties associated with the solution’s pipe cost, _C_ pipe _,i_, and hydraulic cost, _C_ hyd _,i_, which is assigned when violations of the pressure head requirements occur: <u>1</u> _fi_ = _C_ pipe _,i_ + _C_ hyd _,i_ _._ (29) The hydraulic cost is found for each individual by identifying nodes in which the pressure head is less than _h_ min and multiplying the total amount of head violation by a hydraulic penalty coefficient, _a_ hyd: - | _hiN_ _< h_ min _._ (30) _C_ hyd _,iC_ = _a_ hyd _N_ L 1 - _h_ min − _hiN_ www drink-water-eng-sci net/11/67/2018/ Drink Water Eng Sci 11 67–85 2018 76 I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks To allow for a hydraulic penalty coefficient to produce similar results in both small-scale (inexpensive) network and a large-scale (more expensive) cases, the hydraulic penalty coefficient is made directly proportional to the average solution cost. With each generation, _a_ hyd is updated by multiplying the normalized penalty coefficient, _a_ hyd _,_ norm, by the average pipe cost of the population, 6 Mapping the theoretical _D_ to discrete pipe sizes The mapping between continuous diameters and the discrete nominal pipe sizes was accomplished in our solution in one of the following ways: 1. For small and moderate size networks, the designer may manually adjust the pipe sizes (downward, normally one pipe size) starting from the first link downstream from the source and continuing along the rest of the distribution main to the end in a step-by-step manner. A nearby plot of the pressure heads compared with the theoretical _Dij_ from the CB approach (e.g., on the same Mathcad page for our solution) will highlight the acceptability or unacceptability of any change. This exercise also gives the designer valuable understanding of the sensitivity of the design to small changes in pipe sizes. 2. Based on the theoretical _Dij_ from the CB approach, a split-pipe can be created for each link. That is, the lengths for the two discrete pipes sizes that bound the theoretical _Dij_ from above and below are calculated such that the pressure drop between two consecutive nodes in the distribution main matches between the composite pipeline and the CB approach. This also provides discrete pipe sizes that nearly match the CB solution in terms of cost. 7 Results The current study evaluated three types of algorithms that optimize the design of gravity-driven water networks (GDWN). The algorithms include the calculus-based (CB) algorithm (Eq. 18), a backtracking algorithm (BT) and its modified version (BT-NoUp), and a genetic algorithm (GA). The algorithms were applied to six test cases that are based on real GDWNs. Our results show that the CB, GA, and BT-NoUp algorithms could find solutions to the GDWNs within 25 % of the BT global optimum. All cases assume minor-lossless flow and a two-part pipe-cost model. Solution costs from each algorithm are shown in Table 2 and runtime statistics are shown in Table 3. BT could run to completion in < 1 min in all but the largest case (case 6 with 59 links), which did not complete after 7 days. As such, cost comparisons to BT are not made for case 6. The CB algorithm based on Eq. (18), unlike the other algorithms in this work, finds a solution with theoretical diameters that are drawn from a continuous domain (CB-Theor). For all test cases, the costs of the CB-Theor solutions was less when compared with the BT discrete-diameter global optimum (5.5 to 2.6 % lower cost than BT). In fact, because of the discrete pipe sizes needed for an actual network, the continuous model will always produce the smallest theoretical network cost. The CB algorithm then maps this solution to a commercially-available discrete set (CB-Disc). The map _a_ hyd = _a_ hyd _,_ norm _N_ c - _C_ pipe _,iC_ <u>1</u> _N_ c _._ (31) The algorithm then selects candidates to be carried into the next generation with a tournament selection method, where _N_ c groups of _s_ individuals are randomly assigned and the fittest candidate among each group is selected, thus replacing the previous population with an equally sized population of _N_ c individuals. In this study, the genetic algorithm parameters used were _N_ c = 200, _p_ mut = 0 _._ 05, _p_ xover = 1, _N_ gen = 500, _a_ hyd _,_ norm = 0 _._ 05, and _s_ = 10. These parameters were chosen by systematically varying parameter values until the optimum cost of a network, case 2, could no longer be significantly improved. The first four of these values are in line with typically used values from Simpson et al. (1994) of _N_ c (30–200), _p_ mut (0.01–0.05), _p_ xover (0.7–1.0), and _N_ gen (100–1000). 5 Cases studied Six cases were studied based on actual GDWN in Panama, Nicaragua, and the Philippines. Global characteristics of each network are presented in Table 1 and the details of each network are presented in Table 4a–f. Each network is a branching type without loops. The total lengths of the networks range from less than 1 to over 15 km. Two serial networks are tested to demonstrate the effect of a local high point on the algorithm solutions. Elevation plots for each case are shown in Fig. 5. The choice of _h_ min is not standardized, and should appropriately balance the risk of negative pressure in pipes and the increase in network cost due to the requirement of using larger diameters. The choice of _h_ min in GDWN design is typically in the range of 5–20 m (Arnalich, 2010; Bouman, 2014; Swamee and Sharma, 2008). In the present study _h_ min = 7 m, although this requirement was reduced at selected nodes at the beginning of a network where changes in elevation are still small (case 2, where the pressure head at node 2 is relaxed to 2 m). At the source node, the pressure head is fixed at atmospheric pressure. All cases assumed minor-lossless flow, although all algorithms (e.g., Eq. 18 for CB-Theor) are capable of handling minor loss coefficients through the equivalent length method as described above. All algorithms were run in a late-version of MATLAB (or Mathcad for CB) on an Intel i5 processor at 2.50 GHz. Drink Water Eng Sci 11 67–85 2018 www drink-water-eng-sci net/11/67/2018/ I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks 77 Table 1. Characteristics of test cases. Test case Type Number of Number of _Q_ tot _L_ tot diameter choices links (L s <sup>−1</sup> ) (km) (1) Kiangan, Philippines Branching 8 9 4.37 0.82 (2) Los Modulos, Nicaragua Serial 4 13 0.39 1.24 (3) Cañazas, Panama Branching 10 23 6.29 15.2 (4) San Miguel, Nicaragua Serial 9 10 0.40 1.18 (5) El Guabo, Nicaragua Branching 12 17 17.7 4.71 (6) Los Mangos, Nicaragua Branching 7 59 1.92 2.64 Figure 5. Network elevation ( _z_ ) and hydraulic grade lines (HGLs) of algorithm solution for main distribution links. ping process used in this study simply mapped each theoretical diameter to the nearest available diameter of a larger size, thus producing a solution which still satisfies static head requirements but with a higher associated material cost. This tended to oversize the diameters, although the CB-Disc solutions were always within two diameters of the known global optimum solutions, as shown in Fig. 6. From all the combined test cases with known global optima, all but one (71 out of 72) of the diameter selections were within one diameter of the global optimum. More sophisticated mapping schemes, like independently adjusting _D_ for each link in the distribution main in a step-by-step manner starting with the source while ensuring all pressure head constraints are satisfied, would be more likely to produce results identical to the global optimum (see Sect. 6). This was performed in the current study but the results are not presented because of space constraints. The CB-Disc solution costs were, in all cases, larger than the global optimum, with costs ranging from 3.9 to 22.6 % above the global optimum. Thus, for all cases, the calculus-based algorithm bounded the cost of the global optima with a lower-cost CB-Theor solution and a higher-cost CB-Disc solution. This trend is a result of the additional constraints imposed by the finite set of diameter choices. If the algorithm is allowed a greater number of discrete diameter choices, i.e., through adding a less-common nominal diameter size to the available set, the cost of the CB-Disc solution would approach the CB-Theor solution. For all but case 6, the CB algorithm converged on a solution in 3 min or less. BT-NoUp, a modified version of BT which does not consider smaller diameters upstream of large diameters, completed itself within 4 s for all cases, and found solutions which matched or came very close to the BT global opti www drink-water-eng-sci net/11/67/2018/ Drink Water Eng Sci 11 67–85 2018 78 I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks Table 2. Solution costs for each algorithm. Case Solution cost (USD) Percentage cost increase over Percentage cost increase BT (global optimum) over CB-Theor BT BT-NoUp CB-Theor CB-Disc GA BT-NoUp CB-Theor CB-Disc GA BT BT-NoUp CB-Disc GA (1) Kiangan, Philippines 2331 2331 2257 2594 2337 0 −3.2 11.3 0.3 3.3 3.3 14.9 3.5 (2) Los Modulos, Nicaragua 1441 1472 1404 1767 1445 2.1 −2.6 22.6 0.3 2.7 4.8 25.9 2.9 (3) Cañazas, Panama 72 190 72 443 68 245 84 441 73 964 0.4 −5.5 17.0 2.5 5.8 6.2 23.7 8.4 (4) San Miguel, Nicaragua 5418 5418 5172 5627 5422 0 −4.5 3.9 0.1 4.8 4.8 8.8 4.8 (5) El Guabo, Nicaragua 61 445 61 445 59 506 73 886 63 113 0 −3.2 20.2 2.7 3.3 3.3 24.2 6.1 (6) Los Mangos, Nicaragua ∗ 4082 3670 4405 4339 ∗ ∗ ∗ ∗ ∗ 11.2 20.0 18.2 ∗ Note: BT did not complete after 7 days of runtime. Table 3. Runtime and size of solution space for each algorithm. Case Runtime Number Number of Possible candidate Partial candidates of links diameter choices solutions considered BT <sup>a</sup> BT-NoUp <sup>a</sup> CB GA <sup>a</sup> BT BT-NoUp (1) Kiangan, Philippines 0.2 s 0.05 s < 3 min 1 s 9 8 1.3 × 10 <sup>8</sup> 269 126 (2) Los Modulos, Nicaragua 7 s 0.04 s < 3 min 2 s 13 4 6.7 × 10 <sup>7</sup> 48 886 210 (3) Cañazas, Panama 40 s 0.1 s < 3 min 2 s 23 10 1.0 × 10 <sup>23</sup> 433 210 2367 (4) San Miguel, Nicaragua 0.5 s 0.04 s < 3 min 2 s 10 9 3.5 × 10 <sup>9</sup> 3671 244 (5) El Guabo, Nicaragua 0.5 s 0.05 s < 3 min 2 s 17 12 2.2 × 10 <sup>18</sup> 3810 423 (6) Los Mangos, Nicaragua - 7 day <sup>b</sup> 2 s 94 min 5 s 59 7 7.3 × 10 <sup>49</sup> b 44 374 a BT, BT-NoUp, and GA algorithm run times do not include approximately 2 s of pre-processing time. b BT did not complete case 6 after 7 days of runtime. Figure 6. Diameter sizes from calculus-based (CB-Disc) solutions compared with global optimum solutions (from backtracking, BT). A global optimum for case 6, Los Mangos, is not included since BT did not complete after 7 days of runtime. mum. BT-NoUp missed the global optimum in cases 2 and 3, although by a small percentage increase in cost (2.1 and 0.4 % respectively). BT-NoUp, however, finished its search in a shorter amount of time in comparison to BT, a benefit that becomes relevant on problems with larger solution spaces, such as cases 3 (1.0 × 10 <sup>23</sup> candidate solutions) and case 6 (7.3 × 10 <sup>49</sup> candidate solutions). GA was run on each case a total of 100 times, each run itself evolved 200 candidates for 500 generations. The lowestcost candidate amongst the final population that did not violate the pressure head condition was chosen as the GA solution. Because GA is a stochastic search algorithm producing different results from run-to-run, the costs of the optima from all 100 runs were averaged, with this averaged value presented in Table 2. Overall, GA costs came close to the global optima (within 3 %) for cases 1–5 where the global optimum was known from BT. GA solution costs increased with larger network sizes, with its solution cost 18 % higher than CB-Theor for case 6, the largest case run. Each GA run finished consistently within 1–5 s, not including about 2 seconds of pre-processor time. We note that variations of GAs have been reported in the literature and several of these may improve upon the GA results obtained in this study. Potential improvements to the GA a self-adapting penalty function (Wu and Walski, 2005), the use of elitism to preserve the best solutions (Kadu et al., 2008), and a reduction in the search space (Kadu et al., 2008). One reported improvement, the scaling of the fitness function to magnify the rewards towards slightly fitter candidates at later generations (Dandy et al., 1996), was attempted for case 2 but did not result in a noticeable effect on performance. To visually compare the algorithm solutions, the hydraulic grade lines from BT, BT-NoUp, CB-Theor, and CB-Disc are presented in Fig. 5 along with the network elevation for each test case. For clarity, the hydraulic grade lines of branch links are omitted from the figure. In addition, the GA solutions Drink Water Eng Sci 11 67–85 2018 www drink-water-eng-sci net/11/67/2018/ I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks 79 Table 4. Case network properties, diameter (D) results (inch nominal sizes, with CB-Theor in inches), and nodal _h_ (in meters) for (a) Case 1, Kiangan, (b) Case 2, Los Modulos, (c) Case 3, Cañazas, (d) Case 4, San Miguel, (e) Case 5, El Guabo, and (f) Los Mangos. (a) Link 1–2 2–3 3–4 4–5 5–6 2–7 3–8 4–9 5–10 Length (m) 76 113 19 54 75 80 99 170 135 _Q_ (L s <sup>−1</sup> ) 4.37 3.68 2.94 1.46 0.69 0.69 0.74 1.48 0.77 _�z_ (m) 14.0 1.0 0.0 0.0 −1.0 0.0 −2.0 3.0 2.0 BT 3 2–1 _/_ 2 2 1–1 _/_ 2 1–1 _/_ 2 1 1–1 _/_ 4 1–1 _/_ 2 1–1 _/_ 4 BT-NoUp 3 2–1 _/_ 2 2 1–1 _/_ 2 1–1 _/_ 2 1 1–1 _/_ 4 1–1 _/_ 2 1–1 _/_ 4 CB-Theor 2.751 2.562 2.141 1.830 1.356 1.062 1.376 1.584 1.128 CB-Disc 3 3 2–1 _/_ 2 2 1–1 _/_ 4 1–1 _/_ 4 1–1 _/_ 4 1–1 _/_ 2 1–1 _/_ 4 Node 1 2 3 4 5 6 7 8 9 10 BT 0 13.09 11.43 10.72 8.81 7.10 7.27 7.21 7.57 7.58 BT-NoUp 0 13.09 11.43 10.72 8.81 7.10 7.27 7.21 7.57 7.58 CB-Theor 0 12.48 11.24 10.65 9.61 7.00 6.99 7.00 7.00 3.19 CB-Disc 0 13.09 13.15 12.85 12.27 9.78 11.51 8.94 9.70 11.04 (b) (c) Link 1–2 2–3 3–4 4–5 5–6 6–7 7–8 8–9 9–10 10–11 11–12 12–13 13–14 Length (m) 60 41 108 46 134 153 79 157 90 32 102 120 117 _Q_ (L s <sup>−1</sup> ) 0.39 0.39 0.39 0.39 0.39 0.39 0.39 0.39 0.39 0.39 0.39 0.39 0.39 _�z_ (m) 11.2 −0.5 32.8 −3.7 36.6 −2.3 15.7 −6.8 7.3 −7.4 4.5 −1.2 8.4 BT 1 1 3 _/_ 4 3 _/_ 4 3 _/_ 4 3 _/_ 4 1 3 _/_ 4 1 1 3 _/_ 4 3 _/_ 4 3 _/_ 4 BT-NoUp 1 1 1 1 1 3 _/_ 4 3 _/_ 4 3 _/_ 4 3 _/_ 4 3 _/_ 4 3 _/_ 4 3 _/_ 4 3 _/_ 4 CB-Theor 0.987 0.984 0.849 0.849 0.849 0.849 0.849 0.849 0.849 0.849 0.849 0.849 0.849 CB-Disc 1 1 1 1 1 1 1 1 1 1 1 1 1 Node 1 2 3 4 5 6 7 8 9 10 11 12 13 14 BT 0 9.55 7.94 31.59 24.00 49.25 33.99 47.55 27.45 32.32 24.05 19.91 8.55 7.04 BT-NoUp 0 9.55 7.94 37.82 32.88 65.85 50.59 59.60 39.50 39.18 29.07 24.93 13.56 12.05 CB-Theor 0 9.00 7.00 31.86 24.78 51.53 37.98 47.87 29.53 30.21 20.46 17.46 7.44 7.23 CB-Disc 0 9.55 7.94 37.82 32.88 65.85 59.41 72.98 61.93 66.80 58.53 60.27 55.83 61.06 Link 1–2 2–3 3–4 4–5 5–6 6–7 7–8 8–9 9–10 10–11 11–12 12–13 2–14 3–15 4–16 5–17 6–18 7–19 8–20 9–21 10–22 11–23 12–24 Length (m) 646 275 957 509 1102 291 1764 1256 2320 1580 2170 1217 160 100 1250 110 570 180 1400 50 400 260 100 _Q_ (L s <sup>−1</sup> ) 6.29 5.49 5.39 5.34 5.14 2.84 2.74 2.49 2.39 0.69 0.39 0.20 0.80 0.10 0.05 0.20 2.30 0.10 0.25 0.10 1.70 0.30 0.19 _�z_ (m) 25.0 38.9 11.9 42.1 −22.9 32.3 −29.9 40.8 −3.0 −14.7 34.1 −7.6 −5.0 20.0 −15.0 2.0 −12.0 14.0 −6.0 5.0 −1.0 −13.0 9.0 BT 4 3 3 4 3 3 3 2–1 _/_ 2 2–1 _/_ 2 2 1–1 _/_ 4 1 1–1 _/_ 4 1 _/_ 2 1 _/_ 2 1 _/_ 2 2 1 _/_ 2 1 1 _/_ 2 1–1 _/_ 2 1–1 _/_ 4 1 _/_ 2 BT-NoUp 4 4 4 4 3 3 2–1 _/_ 2 2–1 _/_ 2 2–1 _/_ 2 2 1–1 _/_ 4 1 1–1 _/_ 4 1 _/_ 2 1 _/_ 2 1 _/_ 2 1–1 _/_ 2 1 _/_ 2 1 1 _/_ 2 1–1 _/_ 2 1–1 _/_ 2 1 _/_ 2 CB-Theor 3.530 3.531 3.333 3.307 3.270 2.727 2.698 2.579 2.548 1.862 1.227 1.011 1.283 0.325 0.508 0.404 1.678 0.343 0.963 0.281 1.405 1.401 0.488 CB-Disc 4 4 4 4 4 3 3 3 3 2 1–1 _/_ 4 1 1–1 _/_ 4 1 _/_ 2 1 _/_ 2 1 _/_ 2 2 1 _/_ 2 1 1 _/_ 2 1–1 _/_ 2 1–1 _/_ 2 1 _/_ 2 Node 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 BT 0 21.1 55.4 51.5 91.3 51.7 82.5 43.9 69.8 41.4 22.1 40.0 21.7 12.1 72.2 24.3 82.2 26.1 90.8 20.1 73.3 21.9 7.81 39.7 BT-NoUp 0 21.1 58.8 66.4 106 66.6 97.4 42.8 68.8 40.4 21.0 39.0 20.7 12.1 75.6 39.2 97.1 9.5 106 19.0 72.2 20.9 7.43 38.7 CB-Theor 0 17.8 54.3 55.6 91.9 56.7 86.3 40.3 69.0 44.1 21.9 27.9 7.64 6.99 8.02 7.70 7.98 7.72 7.79 7.70 8.18 7.68 7.69 7.71 CB-Disc 0 21.1 58.8 66.4 106 78.8 110 70.9 106 94.4 75.1 93.0 74.7 12.1 75.6 39.2 97.1 53.1 118 47.1 110 74.9 61.4 92.7 www drink-water-eng-sci net/11/67/2018/ Drink Water Eng Sci 11 67–85 2018 80 I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks Table 4. Continued. (d) Link 1–2 2–3 3–4 4–5 5–6 6–7 7–8 8–9 9–10 10–11 Length (m) 189 168 139 81 32 92 225 115 52.3 85 _Q_ (L s <sup>−1</sup> ) 3.60 3.60 3.60 3.60 3.60 3.60 3.60 3.60 3.60 3.60 _�z_ (m) 27.4 10.7 −6.4 6.1 −5.2 −18.6 33.2 58.2 −11.3 32.9 BT 3 3 3 3 3 2–1 _/_ 2 2 1–1 _/_ 4 1–1 _/_ 4 1–1 _/_ 4 BT-NoUp 3 3 3 3 3 2–1 _/_ 2 2 1–1 _/_ 4 1–1 _/_ 4 1–1 _/_ 4 CB-Theor 2.939 2.929 2.929 2.929 2.929 2.929 1.671 1.462 1.462 1.368 CB-Disc 3 3 3 3 3 3 2 1–1 _/_ 2 1–1 _/_ 2 1–1 _/_ 4 Node 1 2 3 4 5 6 7 8 9 10 11 BT 0 25.88 35.20 27.68 33.13 27.70 7.02 28.27 43.86 13.19 14.60 BT-NoUp 0 25.88 35.20 27.68 33.13 27.70 7.02 28.27 43.86 13.19 14.60 CB-Theor 0 25.53 34.51 26.72 32.01 26.51 7.00 6.99 32.93 6.96 7.02 CB-Disc 0 25.88 35.20 27.68 33.13 27.70 8.37 29.62 67.54 47.02 48.43 (e) Link 1–2 2–3 3–4 4–5 5–6 6–7 7–8 8–9 9–10 2–11 3–12 4–13 5–14 6–15 7–16 8–17 9–18 Length (m) 383 486 1030 600 150 400 187 450 227 230 240 110 270 130 130 260 110 _Q_ (L s <sup>−1</sup> ) 17.72 14.68 12.76 11.96 10.04 7.72 6.60 3.12 1.20 3.04 1.92 0.80 1.92 2.32 1.12 3.48 1.92 _�z_ (m) 10.9 10.0 −5.6 3.2 −2.6 5.7 −4.1 4.2 −3.1 2.0 2.5 −1.2 2.0 −1.1 0.0 1.0 2.0 BT 8 6 6 6 6 5 5 4 2 2–1 _/_ 2 1–1 _/_ 2 1–1 _/_ 2 2 3 1–1 _/_ 4 3 1–1 _/_ 2 BT-NoUp 8 6 6 6 6 5 5 4 2 2–1 _/_ 2 1–1 _/_ 2 1–1 _/_ 2 2 3 1–1 _/_ 4 3 1–1 _/_ 2 CB-Theor 6.875 6.408 6.144 6.008 5.691 4.800 4.576 3.494 2.649 2.364 1.608 1.529 1.932 3.250 1.395 3.076 1.647 CB-Disc 8 8 8 6 6 5 5 4 3 2–1 _/_ 2 1–1 _/_ 2 1–1 _/_ 2 2 4 1–1 _/_ 2 4 2 Node 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 BT 0 10.34 18.50 9.91 11.53 8.61 13.16 8.65 12.11 7.25 8.48 7.23 7.35 8.84 7.03 7.16 7.68 7.80 BT-NoUp 0 10.34 18.50 9.91 11.53 8.61 13.16 8.65 12.11 7.25 8.48 7.23 7.35 8.84 7.03 7.16 7.68 7.80 CB-Theor 0 9.76 18.35 9.93 11.49 8.46 12.70 7.94 10.67 7.00 7.00 7.00 7.00 7.01 7.00 7.00 7.00 7.01 CB-Disc 0 10.34 19.85 13.47 15.09 12.17 16.72 12.21 15.67 12.27 8.48 8.58 10.91 12.40 10.94 13.84 12.67 15.76 Drink Water Eng Sci 11 67–85 2018 www drink-water-eng-sci net/11/67/2018/ I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks 81 www drink-water-eng-sci net/11/67/2018/ Drink Water Eng Sci 11 67–85 2018 82 I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks Table 5. Optimization results from Bhave (1978) algorithm. LHS sum and RHS sum are the left and right sides of his Eq. (19), which should be equal. Node Main Main _C_ Main head Branch Branch _C_ Branch head LHS sum RHS sum _b_ (USD) loss (m) _b_ (USD) loss (m) (USD m <sup>−1</sup> ) (USD m <sup>−1</sup> ) 2 1.19 77.73 0.428 1.16 231.86 11.20 215.43 241.13 3 1.16 62.87 0.335 1.16 15.53 0.36 217.19 265.77 4 1.16 62.53 0.335 1.16 5.51 5.87 216.11 216.33 5 1.16 278.99 1.499 1.16 6.69 8.73 215.25 215.66 6 1.16 138.01 0.743 1.16 5.13 12.37 214.77 214.60 7 1.16 127.12 0.687 1.16 10.07 17.62 214.12 213.93 8 1.16 111.23 0.603 1.16 9.17 12.31 213.27 213.21 9 1.16 114.87 0.626 1.16 8.87 10.90 212.35 212.13 10 1.16 133.07 0.729 1.16 14.81 14.62 211.19 98.10 11 1.16 67.55 0.806 1.16 69.63 0.70 96.93 212.18 12 1.16 414.08 4.973 1.16 8.42 15.63 96.31 96.70 13 1.16 38.53 0.464 1.16 3.05 14.95 96.07 95.96 14 1.16 64.36 0.778 1.16 4.32 14.63 95.73 95.50 15 1.16 72.08 0.876 1.16 6.67 13.50 95.15 95.33 16 1.16 31.88 0.389 1.16 5.84 17.06 94.76 94.77 17 1.16 204.81 2.510 1.16 5.39 16.31 94.38 93.18 18 1.16 79.31 0.989 1.16 12.07 8.77 92.79 93.44 19 1.16 52.49 0.661 1.16 6.71 8.00 91.85 91.98 20 1.16 88.23 1.121 1.16 6.20 8.28 91.01 91.16 21 1.16 79.12 1.014 1.16 7.47 11.98 90.30 89.01 22 1.16 31.58 0.414 1.16 12.47 7.09 88.29 89.36 23 1.16 51.36 0.680 1.16 8.48 9.99 87.33 85.74 24 1.16 50.84 0.694 1.16 11.52 5.10 84.76 85.51 25 1.16 35.40 0.494 1.16 10.59 6.41 82.90 80.51 26 1.16 29.28 0.431 1.16 20.15 5.27 78.60 82.14 27 1.16 55.92 0.832 1.16 5.52 6.74 77.72 75.66 28 1.16 270.13 4.182 1.16 11.61 4.29 74.71 75.75 29 1.16 222.58 3.545 1.16 8.79 4.42 72.62 73.87 30 1.16 34.71 0.561 1.16 9.56 9.10 71.57 49.43 31 - - - 1.16 47.15 1.13 - are omitted since 100 solutions were obtained for each test case. Collectively, the hydraulic grade lines reveal a close alignment of the BT solution (the global optimum) with the CB-Theor solution which utilizes a continuous diameter set. Furthermore, the mapping scheme used to generate a CBDisc solution is shown to increase pipe sizes in some cases far beyond the limit imposed by _h_ min, which was set to 7 m in the present work. We compared the CB results for the Los Mangos network with those from the Bhave (1978) optimization algorithm (see Table 5). Like Eq. (15) in the present work, Bhave’s optimality equation (his Eq. 19) equates the sum of a weighted term for all links entering and leaving each internal node in the distribution main. In the present work the term is proportional to the hydraulic gradient and the weighting factor is proportional to flow rate. In Bhave’s case the term is the ratio of pipe cost to head loss, where the weighting factor is pipecost exponent _b_ . There are 60 nodes for this network, including 30 nodes in the distribution main. The rest are delivery nodes (note there are 2 branches from node 30 of the distribution main). The terms required for the calculations include _b_, pipe cost, and head loss in the main and branches. The designation LHS refers to nodes in the distribution main entering, and RHS to those leaving, the node at the far-left side of Table 5. The exponent _b_ comes from curve fitting pipecost data to the two-part pipe-cost model. Linear interpolation was used between diameters _D_ co and _D_ co+1 to obtain _b_ in this range. Except for a few nodes, agreement between the two CB algorithms is very good. Although Bhave’s Eq. (19) and Eq. (18) in the present work, appear quite different due to the different ways each was developed, both produce optimality for the networks considered in this paper. The key distinction between the two developments is the assumption of constancy in terms that comprise the coefficient _A_ in Bhave (his Eq. 13), mainly the exponent _b_ ( _m_ in his paper). In general, _b_ depends on pipe diameter, thus making _b_ = _b_ ( _D_ ) for multi-part cost models. When taking derivatives to obtain the final algorithms in both works, this dependence must be in Drink Water Eng Sci 11 67–85 2018 www drink-water-eng-sci net/11/67/2018/ I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks 83 cluded, which produces additional terms in the optimization equation (see our Eq. 18 above). However, if the system of equations is solved by an iterative method, as Bhave proposed, the dependency may be neglected (though issues with convergence of the numerical solution may arise because of this). It is very important to note that if a non-iterative method is used to solve the system of equations as done in the present work (using a commercial program like Mathcad), all terms in the governing equations must be treated as continuous, not discrete, and the _b_ = _b_ ( _D_ ) dependence must be explicitly included. It should also be noted that the optimization algorithm of Eq. (18) in this paper includes minor loss, which is not included in the Bhave (1978) work. 8 Conclusions Algorithms to optimize the cost of branching gravity-driven water networks are evaluated on six test cases from real networks in the Philippines, Nicaragua, and Panama. A calculus-based algorithm produced a solution composed of theoretical diameters from a continuous set (CB-Theor), which are then mapped onto discrete commercially available diameters (CB-Disc). Backtracking (BT), a recursive algorithm, systematically searches discrete candidate solutions and, when run to completion, is guaranteed to find the global optimum by following rules that prune only higher-cost or hydraulically infeasible candidates. The BT algorithm was modified (BT-NoUp) to improve computational speed by rejecting all candidates that included a small diameter directly upstream of a larger diameter but allowed for the possibility of missing the global optimum. The third type of algorithm evaluated was a genetic algorithm (GA) that used singlepoint crossover and tournament selection. BT could find the global optimum in most test cases with relatively little computational effort, although its poor scaling to larger networks is evidenced by its inability to find a solution to case 6, a network with 60 nodes and 59 links. The BTNoUp completed its search in less time than BT and could find a solution to case 6. Based on case 1–5 results, the extra pruning condition adopted in BT-NoUp sacrificed only small cost increases. Both BT and BT-NoUp, however, could become prohibitively time-consuming when dealing with networks with significantly more links, diameter choices, or an unfavorable layout. While the test cases represent the range of GDWN sizes encountered in the authors’ experience, future work would be needed to verify the suitability of the BT and BT-NoUp algorithms on larger GDWNs. The calculusbased algorithm produced consistently good results for the networks tested, although a more robust mapping scheme from theoretical diameters to discrete diameters would further improve on these results as discussed above. In potential future work, the CB-Theor solutions could be used to prune the BT search space, like Kadu et al. (2008), by only including the two diameters above and below the CB-Theor diameters, producing four diameter choices per link. The calculus-based methodology provides an additional benefit to the designer by explicitly revealing the sensitivities to cost for a design. The calculus-based algorithm requires greater computational effort than backtracking for smaller networks, however, this effort scales more linearly with the number of network links, while backtracking scales exponentially. Furthermore, backtracking’s computational time is sensitive to the number of available diameters. Still, when applied to the present study’s GDWN test cases with a modest number of links (23), backtracking quickly found a global optimum. In addition, because it is guaranteed to find the global optimum, it can be useful for benchmarking the performance of other algorithms which scale better with more network links. While the genetic algorithm produced solutions with good proximity to the global optimum, its solution costs tended to be further from the global optimum in cases with more links. For all test cases, the calculus-based algorithm’s theoretical diameter solutions (CB-Theor) produced a lower cost than the discrete-domain global optimum. This result is made possible because it is not constrained to a discrete set of diameters. As such, the CB-Theor results represent a lowerbound on the optimum solution within the problem formulation, which could be approached with a finer selection of pipe diameters. We also demonstrated good agreement between the CB-based optimization algorithm developed here and that of Bhave (1978). Though Bhave’s algorithm and Eq. (18) in the present work appear quite different due to the different ways each was developed, both produce optimality for the networks considered in this paper. The key distinction between the two developments is that Bhave assumed exponent _b_ constant in the pipe-cost model, which was justified based on his iterative method of solution. In the present work, which uses a commercial program to solve the nonlinear governing equations for _D_ and _h_, _b_ ( _D_ ) dependence is explicitly included for multi-part cost models. Contrasted with Bhave, minor losses are included in the CB optimization algorithm in the present work. Data availability. All survey data from the network cases tested are available in Table 4. Competing interests. The authors declare that they have no conflict of interest. Acknowledgements. This work was partially supported by the Villanova Undergraduate Research Fellowship Program and the Goldwater Foundation. Edited by: Luuk Rietveld Reviewed by: three anonymous referees www drink-water-eng-sci net/11/67/2018/ Drink Water Eng Sci 11 67–85 2018 84 I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks References Alperovits, E., and Shamir, U.: Design of optimal water distribution systems, Water Resour. Res., 13, 885–900, [https://doi.org/10.1029/WR013i006p00885, 1977.](https://doi.org/10.1029/WR013i006p00885) Arnalich, S.: How to design a Gravity Flow Water System, Arnalich - Water and Habitat, 2010. Bhave, P. R.: Optimization of Gravity-Fed Water Distribution Net works: Theory, J. Environ. Eng.-ASCE, 109, 189–205, 1983. Bhave, P. R.: Non-computer optimization of single source networks, J. Environ. Eng.-ASCE, 104, 799–814, 1978. Bhave, P. R.: Optimal design of water distribution networks, Alpha Science International Ltd., Pangbourne, UK, 2003. Bouman, D.: Hydraulic design for gravity based water schemes, Aqua for All, Den Haag, the Netherlands, 2014. Churchill, S. W.: Friction factor equation spans all regimes, Chem. Eng. J., 84, 91–92, 1977. Colebrook, C. F. and White, C. M.: Experiments with fluid fric tion in roughened pipes, P. R. Soc. London, 161, 367–381, [https://doi.org/10.1098/rspa.1937.0150, 1937.](https://doi.org/10.1098/rspa.1937.0150) Dandy, G. C., Simpson, A. R., and Murphy, L. J.: An improved genetic algorithm for pipe network optimization, Water Resour. [Res., 32, 449–458, https://doi.org/10.1029/95WR02917, 1996.](https://doi.org/10.1029/95WR02917) Dongre, S. R. and Gupta, R.: Discussion of ‘Recursive Design of Pressurized Branched Irrigation Networks’ by César GonzálezCebollada, Bibiana Macarulla, and David Sallán, J. Irrig. Drain Eng., 138, 697–697, [https://doi.org/10.1061/(ASCE)IR.1943-](https://doi.org/10.1061/%0x28ASCE%0x29IR.1943-4774.0000441) [4774.0000441, 2011.](https://doi.org/10.1061/%0x28ASCE%0x29IR.1943-4774.0000441) Gessler, J.: Pipe Network Optimization by Enumeration, Proceed ings of the Specialty Conference on Computer Applications in Water Resources, American Society of Civil Engineers, New York, USA, 572–851, 1985. González-Cebollada, C., Macarulla, B., and Sallán, D.: Recursive Design of Pressurized Branched Irrigation Networks, J. Irrig. Drain Eng., 137, 375–382, [https://doi.org/10.1061/(ASCE)IR.1943-4774.0000308, 2011.](https://doi.org/10.1061/%0x28ASCE%0x29IR.1943-4774.0000308) Jones, G. F.: Gravity-driven Water Flow in Networks: Theory and Design, Wiley, Hoboken, NJ, USA, 2011. Kadu, M. S., Gupta, R., and Bhave, P. R.: Optimal design of water networks using a modified genetic algorithm with reduction in search space, J. Water Res. Plan. Man., 134, 147–160, [https://doi.org/10.1061/(ASCE)0733-9496(2008)134:2(147),](https://doi.org/10.1061/%0x28ASCE%0x290733-9496%0x282008%0x29134:2%0x28147%0x29) 2008. Kansal, A., Gupta, R., and Bhave, P. R.: Optimization algorithms for design of branching water distribution networks, J. Indian Water Works Association, 28, 135–140, 1996. Keedwell, E. and Khu, S.: Novel Cellular Automata Approach to Optimal Water Distribution Network Design, J. Comput. Civil. Eng., 20, 49–56, 10.1061/(ASCE)0887-3801(2006)20:1(49), 2006. Kessler, A. and Shamir, U.: Analysis of the Linear Pro gramming Gradient Method for Optimal Design of Water Supply Networks, Water Resour. Res., 25, 1469–1480, [https://doi.org/10.1029/WR025i007p01469, 1989.](https://doi.org/10.1029/WR025i007p01469) Krapivka, A. and Ostfeld, A.: Coupled genetic algorithm Linear programming scheme for least cost design of water distribution systems, J. Water Res. Plan. Man., 135, 298–302, [https://doi.org/10.1061/(ASCE)0733-9496(2009)135:4(298),](https://doi.org/10.1061/%0x28ASCE%0x290733-9496%0x282009%0x29135:4%0x28298%0x29) 2009. Maier, H. R., Simpson, A. R., Zecchin, A. C., Foong, W. K., Phang, K. Y., Seah, H. Y., and Tan, C. L.: Ant colony optimization for design of water distribution systems, J. Water Res. [Plan. Man., 129, 200–209, https://doi.org/10.1061/(ASCE)0733-](https://doi.org/10.1061/%0x28ASCE%0x290733-9496%0x282003%0x29129:3%0x28200%0x29) [9496(2003)129:3(200), 2003.](https://doi.org/10.1061/%0x28ASCE%0x290733-9496%0x282003%0x29129:3%0x28200%0x29) Martin, Q. W.: Optimal design of water conveyance systems, J. Hydr. Eng. Div.-ASCE, 106, 1415–1433, 1980. Mohan, S. and Jinesh Babu, K. S.: Water distribution net work design using heuristics-based algorithm, J. Comput. Civil. Eng., 23, 249–257, [https://doi.org/10.1061/(ASCE)0887-](https://doi.org/10.1061/%0x28ASCE%0x290887-3801%0x282009%0x2923:5%0x28249%0x29) [3801(2009)23:5(249), 2009.](https://doi.org/10.1061/%0x28ASCE%0x290887-3801%0x282009%0x2923:5%0x28249%0x29) Monbaliu, J., Jo, J., Fraisse, C. W., and Vadas, R. G.: Computer aided design of pipe networks, Proc. Int. Symp. On Water Resource Systems Application, Friesen Printers, Winnipeg, Canada, 1990. Nicklow, J., Reed, P., Savic, D., Dessalegne, T., Harrell, L., Chan Hilton, A., Karamouz, M., Minsker, B., Ostfeld, A., Singh, A., Zechman, E., and ASCE Task Committee on Evolutionary Computation in Environmental and Water Resources Engineering: State of the Art for Genetic Algorithms and Beyond in Water Resources Planning and Management, J. Water Res. Plan. Man., 136, 412–432, [https://doi.org/10.1061/(ASCE)WR.1943-](https://doi.org/10.1061/%0x28ASCE%0x29WR.1943-5452.0000053) [5452.0000053, 2010.](https://doi.org/10.1061/%0x28ASCE%0x29WR.1943-5452.0000053) Prasad, T. D. and Park, N. S.: Multiobjective genetic algo rithms for design of water distribution networks, J. Water Res. Plan. Man., 130, 73–82, [https://doi.org/10.1061/(ASCE)0733-](https://doi.org/10.1061/%0x28ASCE%0x290733-9496%0x282004%0x29130:1%0x2873%0x29) [9496(2004)130:1(73), 2004.](https://doi.org/10.1061/%0x28ASCE%0x290733-9496%0x282004%0x29130:1%0x2873%0x29) Raad, D. N.: Multi-objective optimisation of water distribution sys tems design using metaheuristics, PhD thesis, University of Stellenbosch, South Africa, 2011. Saldarriaga, J., Páez, D., Cuero, P., and León, N.: Optimal Design of Water Distribution Networks Using Mock Open Tree Topology, World Environmental and Water Resources Congress, 19– 23 May 2013, Cincinnati, Ohio, USA, 869–880, 2013. Samani, H. M. V. and Mottaghi, A.: Optimization of water dis tribution networks using integer linear programming, J. Hy[draul. Eng., 132, 501–509, https://doi.org/10.1061/(ASCE)0733-](https://doi.org/10.1061/%0x28ASCE%0x290733-9429%0x282006%0x29132:5%0x28501%0x29) [9429(2006)132:5(501), 2006.](https://doi.org/10.1061/%0x28ASCE%0x290733-9429%0x282006%0x29132:5%0x28501%0x29) Simpson, A. R., Dandy, G. C., and Murphy, L. J.: Ge netic Algorithms Compared to Other Techniques for Pipe Optimization, J. Water Res. Plan. Man., 120, 423–443, [https://doi.org/10.1061/(ASCE)0733-9496(1994)120:4(423),](https://doi.org/10.1061/%0x28ASCE%0x290733-9496%0x281994%0x29120:4%0x28423%0x29) 1994. Streeter, V. L., Wylie, E. B., and Bedford, K. W.: Fluid Mechanics, McGraw-Hill, New York, NY, USA, 1998. Suribabu, C. R.: Heuristic-based pipe dimensioning model for wa ter distribution networks, J. Pipeline Syst. Eng., 3, 115–124, [https://doi.org/10.1061/(ASCE)PS.1949-1204.0000104, 2012.](https://doi.org/10.1061/%0x28ASCE%0x29PS.1949-1204.0000104) Swamee, P. K. and Jain, A. K.: Explicit equations for pipe flow problems, J. Hydr. Eng. Div.-ASCE, 102, 657–664, 1976. Swamee, P. K. and Sharma, A. K.: Gravity low water distribution network design, J. Water Supply Res. T., 49, 169–179, 2000. Swamee, P. K. and Sharma, A. K.: Design of Water Supply Pipe Networks, Wiley, Hoboken, NJ, USA, 2008. Taorimina, R. and Chau, K. W.: Data-driven input variable selection for rainfall–runoff modeling using binary-coded particle swarm optimization and Extreme Learning Machines, J. Hydrol., 529, 1617–1632, 2015. Drink Water Eng Sci 11 67–85 2018 www drink-water-eng-sci net/11/67/2018/ I. Dardani and G. F. Jones: Algorithms for optimization of branching gravity-driven water networks 85 Tospornsampan, J., Kita, I., Ishii, M., and Kitamura, Y.: Split-pipe design of water distribution network using simulated annealing, International Journal of Computer, Information, and Systems Science, and Engineering, 1.3, 153–163, 2007. Vairavamoorthy, K. and Ali, M.: Optimal design of water distri bution systems using genetic algorithms, Comput. Aided Civ. Infrastruct. Eng., 15, 374–382, [https://doi.org/10.1111/0885-](https://doi.org/10.1111/0885-9507.00201) [9507.00201, 2000.](https://doi.org/10.1111/0885-9507.00201) Vasan, A. and Simonovic, S. P.: Optimization of water distribu tion network design using differential evolution, J. Water Res. [Plan. Man., 136, 279–287, https://doi.org/10.1061/(ASCE)0733-](https://doi.org/10.1061/%0x28ASCE%0x290733-9496%0x282010%0x29136:2%0x28279%0x29) [9496(2010)136:2(279), 2010.](https://doi.org/10.1061/%0x28ASCE%0x290733-9496%0x282010%0x29136:2%0x28279%0x29) Wu, Z. Y. and Walski, T.: Self-adaptive penalty approach compared with other constraint-handling techniques for pipeline optimization, J. Water Res. Plan. Man., 131, 181–192, [https://doi.org/10.1061/(ASCE)0733-9496(2005)131:3(181),](https://doi.org/10.1061/%0x28ASCE%0x290733-9496%0x282005%0x29131:3%0x28181%0x29) 2005. Yang, K. P., Liang, T., and Wu, I. P.: Design of conduit system with diverging branches. J. Hydr. Eng. Div.-ASCE, 101, 167– 188, 1975. Zhao, W., Beach, T., and Rezgui, Y.: Optimization of Potable Water Distribution and Wastewater Collection Networks: A Systematic Review and Future Research Directions, IEEE T. Syst. Man Cyb., 46, 659–681, [https://doi.org/10.1109/TSMC.2015.2461188,](https://doi.org/10.1109/TSMC.2015.2461188) 2016. Zheng, F., Simpson, A. R., and Zecchin, A. C.: A decom position and multistage optimization approach applied to the optimization of water distribution systems with multiple supply sources, Water Resour. Res., 49, 380–399, [https://doi.org/10.1029/2012WR013160, 2013.](https://doi.org/10.1029/2012WR013160) www drink-water-eng-sci net/11/67/2018/ Drink Water Eng Sci 11 67–85 2018

섹션 본문 149문단 · 79,923자

(제목 없음)

1The manuscript presents algorithms for optimization of branching gravity-driven water networks, which is interesting.The subject addressed is within the scope of the journal.2. However, the manuscript, in its present form, contains several weaknesses.Appropriate revisions to the following points should be undertaken in order to justify recommendation for publication.2. Thank you for reviewing our paper and providing detailed feedback.Please see our responses to each of your comments below.3. Full names should be shown for all abbreviations in their first occurrence in texts.For example, PVC in p.1, D in p.3, WDN in p.4, HGL in p.12, etc.3. We have updated our paper to include full names next to the first instances of all abbreviations in the text.4. For readers to quickly catch your contribution, it would be better to highlight major difficulties and challenges, and your original achievements to overcome them, in a clearer way in abstract and introduction.4. In response to your feedback, we have substantially revised the abstract and introduction sections to make the contribution and scope of the paper more clear.Please refer to those sections.

25. It is mentioned in p.1 that three cost-minimization algorithms are adopted for the design of moderate-scale branching Gravity-Driven Water Networks.What are the other feasible alternatives?What are the advantages of adopting these particular algorithms over others in this case?How will this affect the results?More details should be furnished.

3Author's Response:

45. The problem considered in this paper is that of selecting a single pipe diameter for each link in a water network to optimize the material cost.This problem has three major categories of methods that are applicable to it: enumeration methods (including both complete enumeration and partial enumeration), nonlinear programming methods, and metaheuristic methods.For each of these categories we have proposed and tested one representative algorithm: backtracking (partial enumeration), the Jones calculus-based algorithm (nonlinear programming), and a genetic algorithm (metaheuristic).While there are many other types of metaheuristic algorithms (simulated annealing, Tabu search, cellular automata, ant colony optimization, and particle swarm optimization), the genetic algorithm is the most representative of these and is also the most commonly used (Zhao et al. 2016).

5Note that we have categorized the backtracking algorithm as a partial enumeration method and not a heuristic algorithm.The backtracking algorithm, like heuristic methods, follows a set of deterministic rules to find better solutions, however, those rules are strictly formulated to find cost-optimal solutions and does so without missing the global optimum.In contrast, heuristic algorithms follow rules which achieve some proxy of an optimum solution but do not guarantee the global optimum.One example of a heuristic algorithm comes from Suribabu (2012), whose algorithm uses the uniformity of a solution's flow velocity as a proxy for its cost-optimality.As such, the Suribabu algorithm increments a pipe diameter when its flow velocity is high and decrements the diameter when its flow velocity is low, in an attempt to approach more optimal solutions.It was not necessary to include such a heuristic algorithm for comparison in this paper, since the Backtracking algorithm presented follows a more strictly formulated set of rules that do guarantee a cost optimum.

6We note that other methods that can be applied to water network design do not address the problem of focus in our paper.For example, linear programming methods provide split-pipe solutions for each link, while the problem addressed here calls for each link to have a single-diameter solution.Multi-objective optimization methods, which typically involve new implementations of metaheuristic methods, are also outside the scope of (single-objective) cost optimization, although it should be noted that costoptimization algorithms, such as the ones used in this paper, can be used within multi-objective implementations.In addition, decomposition methods, where networks are broken down into smaller sub-networks, can use any of the methods listed above, and are therefore not an exclusive method category.Given the appropriateness of the presented algorithms to the network sizes of gravity water networks, decomposition was not necessary.

7We have added a more thorough description to our introduction section that gives clearer context to the selection of these algorithms, highlighting the category of method to which they belong and the key features that make them distinct from one another.6.It is mentioned in p.4 that five actual GDWNs installed in Panama, Nicaragua, and the Philippines are adopted as test cases.What are the other feasible alternatives?What are the advantages of adopting these particular test cases over others in this case?How will this affect the results?More details should be furnished.

8Author's Response:

96.This work was prompted by our GDWN design work in Panama, Nicaragua, and the Philippines.Thus, these networks are most pertinent to our interests and are networks for which we have detailed data.Despite an extensive review of the literature, we did not uncover any common test cases for GDWNs, nor many papers focusing on GDWN design, which is likely due to their use in mostly developing countries.While each network is a branching type without loops, the total lengths range to over 15 km.This is considered a very large network in the scale of the present work.In fact, this is the longest GDWN in Central and South America.Two serial networks were tested to demonstrate the effect of a local high point on the algorithm solutions.

107. It is mentioned in p.5 that ". ..The pressure upper bound is not incorporated into the optimization process. . .."Why this is not incorporated?More justifications should be furnished on this.

117. It is correct that the pressure upper bound is not incorporated into the optimization process.Worstcase pressure conditions occur under hydrostatic conditions, which are directly related to the maximum elevation change in the network and where no flow occurs.Therefore, before the optimization process is undertaken, the selections of appropriate pressure ratings for the pipe and, if needed, break-pressure tanks are left to the correct judgment of the designer under no-flow conditions.In addition, precautions against water hammer are left to the designer since the design process presented in the paper specifically addresses network cost minimization and not this aspect of the hydraulic design.

128. It is mentioned in p.5 that ". ..precautions against water hammer are left to the designer. .."Why this is left to the designer?More justifications should be furnished on this.

13Author's Response:

148. See response to 7. 9.It is mentioned in p.7 that a two-part model is adopted in this study.What are the other feasible alternatives?What are the advantages of adopting this particular model over others in this case?How will this affect the results?More details should be furnished.

15Author's Response:

169. Both single-part and two-part pipe cost models are considered in the paper, which result in two different equations for network cost minimization, Equations ( 15) and ( 18) respectively.The single-part cost model is simpler than the two-part model and results in the simpler Equation ( 15) compared with Equation (18).However, as Figure 3 in the paper shows, actual pipe-cost data are more accurately fit to the two-part cost model.There appears to not be the need for more elaborate pipe cost models, nor has one been proposed in the literature as far as the authors are aware.

1710.It is mentioned in p.9 that a cubic spline is adopted to complete the transition between small and large pipe sizes.What are the other feasible alternatives?What are the advantages of adopting this particular function over others in this case?How will this affect the results?More details should be furnished.

18Author's Response:

1910.As seen in Equation ( 21) in the paper, a first derivative of the pipe cost w.r.t.pipe diameter is needed in the network cost minimization Equation ( 18), which is based on the two-part pipe cost model.Thus, a smooth, continuous function is fit between the small-D and large-D parts of the cost model to ensure the first derivative is well behaved.The cubic polynomial is the simplest one that ensures continuous function and first-derivative behavior between the small-D and large-D parts of the cost model.

2011.It is mentioned in p.13 that two rejection criteria are adopted to reduce the number of solutions to be evaluated.What are the other feasible alternatives?What are the advantages of adopting these particular criteria over others in this case?How will this affect the results?More details should be furnished.

2111.In the BT algorithm, the selection of a diameter size results in a corresponding pressure head at a downstream node and a corresponding cost, both of which serve as the basis of the two rejection criteria used.Because the direct relationships between diameter and cost, and between diameter and pressure head, span the entire range of diameters, criteria to prune certain diameter choices can be safely proposed that never skip a global optimum.It can be noticed that the two criteria prune diameter solutions at the competing ends of the range of diameters, with the cost criteria pruning out larger diameters, which add more cost, and the head criteria pruning out smaller diameters, which contribute to greater head loss.These two criteria for enumeration methods have been the only ones in the literature that do not risk pruning a global optimum (Raad 2011, González-Cebollada et al. 2011).Other criteria, such as rejecting partial candidates that include a diameter that is larger than an upstream diameter, risk skipping the global optimum and were therefore not included in the BT algorithm.Instead, these were instead included in the modified algorithm, BT-NoUp, to compare the resulting effect on computation time and the cost of the solution.

22These rejection criteria are further strengthened with the use of Pre-processor 1 (section 4.1) to adjust the maximum available diameter and Pre-processor 2 (section 4.2) to adjust the minimum static pressure head at each node (section 4.2), again without risk of pruning the global optimum and without the need to update any such calculations during the search process itself.To our knowledge, is the first implementation of Pre-processor 1 in enumeration methods and the first implementation of Preprocessor 2 in any method.

2312. It is mentioned in p.14 that the method presented by González-Cebollada et al. ( 2011) is adopted as the BT algorithm.What are the other feasible alternatives?What are the advantages of adopting this particular method over others in this case?How will this affect the results?More details should be furnished.

24Author's Response:

2512. The use of backtracking for water network design has not been widely used, and only two other backtracking methods can be found in the literature, those by Gessler (1985) and González-Cebollada et al. (2011).However, the algorithm proposed by Gessler, unlike the present work's BT algorithm, includes a pipe-grouping criteria set that risks pruning the global optimum, and is therefore a less appropriate comparator to the present study's BT algorithm.The González-Cebollada algorithm, on the other hand, does not include such a criterion to potentially prune a global optimum from consideration, however, it halts its search after finding the first feasible solution.Thus, out of the two reported backtracking algorithms in the literature, both do not guarantee a global optimum, while the BT algorithm presented in this work does.The trade-off of this expanded search is an increase in computation time, however, the BT algorithm was able to execute in a satisfactory timeframe for all cases (with a maximum runtime of 79 seconds).More clarifications have been added to the paper to further clarify BT's comparison to the González-Cebollada backtracking algorithm..1943-4774.0000308, 2011.13.It is mentioned in p.15 that a single-point crossover is adopted in this study.What are the other feasible alternatives?What are the advantages of adopting this particular crossover method over others in this case?How will this affect the results?More details should be furnished.

26Author's Response:

2713.The crossover operation in a genetic algorithm has a number of variations including: single-point, two-point, uniform, multi-parent single point, multi-parent two-point, multi-parent uniform, universal single-point, universal two-point, and universal parent uniform.Unlike a single-point crossover, in which two individuals exchange data to the right (or left) of a randomly selected point in their chromosome, a two-point crossover includes two such random points that distinguish the points at which data is exchanged.The uniform crossover is where each link's diameter has an equally likely probability of being exchanged with the other parent.The references to multi-parent techniques involve schemes where more than two parents are used to exchange information.Finally, references to universal parents means that, at low probabilities, one of the parent chromosomes is the set of all commercial diameters.This serves to add in more variation to the population, but effectively accomplishes the same thing as the mutation operator.There is no standard technique used in the literature, though single-point crossover has a long history of use in genetic algorithms for water distribution network design (Simpson et al. 1994, Krapivka and Ostfeld 2009, Dandy et al. 1996).While we did experiment with a two-point crossover design, we did not find the results to have any benefit over a single-point design, and decided on the single-point technique for its greater simplicity.9496(1994)120:4(423), 1994. 14.It is mentioned in p.15 that a pinwheel lottery (with replacement) is adopted to select candidates to be carried into the next generation.What are the other feasible alternatives?What are the advantages of adopting this particular approach over others in this case?How will this affect the results?More details should be furnished.

28Author's Response:

2914.The technique used to select candidate solutions is more commonly known as a proportionate selection method, and the paper has been updated to include this term.With this technique, the fitness of each solution directly relates to its probability of being selected for the next generation.The proportionate selection method has a long history of use in genetic algorithms for water distribution network design (Goldberg 1989, Simpson et al. 1994).One feature of this selection process is that less- Author's Response:

3015.The purpose of the present study is to offer a comparison of the major methods available for gravitydriven water network optimization in order to help inform designers of GDWNs on what to expect from each algorithm, where one of those is a genetic algorithm (GA).The computational research being done with genetic algorithms, and more broadly metaheuristic methods, is vast and presently developing.The number of variations available to implement in a genetic algorithm are too large to properly list in the present work.A good review of these developments in the context of water resources is given by Nicklow et al. (2010).Notably, while a theoretical basis for why genetic algorithms work has been proposed, the performance of a GA variant cannot be predicted on a given problem set, thus requiring experimental characterization (i.e., test runs on a range of cases).Even so, despite certain techniques showing benefits on water network test cases, it is not possible to generalize these findings to all water network cases.

31The GA included in this paper is meant to present a benchmark for the results that could be expected when designing a GA with a reasonable amount of effort put into finding optimal parameters and the selection of proper operator schemes (selection, mutation, and crossover).It was not our intention with this paper to find the optimal GA scheme to implement for GDWNs.In fact, one improvement mentioned in the paper (scaling of the fitness function (Dandy et al. 1996)) was attempted in the present work.However, upon the trial of a few scaling schemes (Eg. a fitness exponent transitioning from 1 on the first generation to 2 on the last generation), no benefit was observed.Nonetheless, it is possible that a more thorough search of different scaling exponents may have improved the results, thus, this technique was not given a full consideration.Another improvement mentioned, the systematic optimization of parameters (Reed et al. 2000), requires quite an extensive process to find optimal search parameters.A less intensive and systematic version of this was performed, as mentioned in the parameter tuning process, although it is possible that a more systematic and thorough search would have improved the GA parameters selected.

32Seen in a practical context, such advanced GA techniques are not in line with GDWN design practice.A GDWN designer typically would rarely would have access to commercial water network design software, and would typically not have much time to dedicate to optimization.Instead, designers will often select pipe diameters manually by marching along a distribution main and selecting successive pipe diameters, each time checking for hydraulic acceptability.With this as common practice, the use of any feasible optimization technique represents a substantial improvement.In our experience, and as noted above, a designer rarely has access to commercial water network design software, nor would they have the capability to implement more advanced techniques in the literature.As such, the GA represented in the paper represents a feasible performance benchmark with which to compare with the other algorithms, which are already easier to implement even without more advanced GA techniques.16.Some key parameters are not mentioned.The rationale on the choice of the particular set of parameters should be explained with more details.Have the authors experimented with other sets of values?What are the sensitivities of these parameters on the results?

33Author's Response:

3416.All parameters chosen for the GA algorithm are listed in Section 4.5.These include = 0.02, = 50, = 0.5, = 100, ℎ, = 0.1.The first four of these parameters were originally chosen based on typical values presented in the literature and then tuned with a parameter sensitivity study for the first test case.Simspon et al. (1994) present typical values for (30 -200), (0.7 -1.0), (0.01 -0.05), and (100 -1000).During the parameter tuning process, each parameter was sequentially varied until a decrease or increase in no parameter resulted in significantly lower-cost results, as determined by an average of 100 runs of each.The last parameter ( ℎ, ) was found through a parameter sensitivity study and then checked to be reasonably in line with literature-based hydraulic penalty coefficients, which normalized based on their respective network's optimum price.A value for the normalized hydraulic penalty coefficient, ℎ, , was chosen such that the GA converged on solutions that tended to satisfy the minimum static pressure constraint, but still allowed the population to gravitate towards smaller diameters with static pressures close to ℎ .The least sensitive parameters were , , and = 100, such that even a 50% change in their values resulted in less than 1-5% change in average solution cost, while ℎ, was moderately sensitive to changes and was the most sensitive, thus requiring finer-tuning in increments of 0.005, where the best performance was achieved at = 0.020.As further validation of the value chosen for , a generally acceptable standard for GA performance occurs when ≈ 1/ (Reed 2000).

35Reed, P., Minsker, B., and Goldberg, D. E.: Designing a competent simple genetic algorithm for search and optimization, Water Resour.Res., 36(12), 3757-3761, doi:10.1029/2000WR900231, 2000.17.Some assumptions are stated in various sections.Justifications should be provided on these assumptions.Evaluation on how they will affect the results should be made.

36Author's Response:

3717.The main assumptions used in the problem formulation will be discussed below: turbulent flow, smooth pipe, and minimum static pressure head.The assumption of turbulent flow is reasonable for all practical potable water distribution networks, and is a traditionally-held assumption in the literature for this scale of water networks.The validity of this assumption is also verifiable post-analysis, as is mentioned in page 6 of our paper.It would not be appropriate to speculate on how the results would be different if the flow were laminar or transitional, since such cases do not normally occur in practice.The assumption of smooth pipe is consistent with conditions that exist in the field for nearly all the GDWNs we encounter in our work, which are nearly always constructed out of PVC pipe.A deeper discussion of this can be found in Jones ( 2011) pp.39-44.Finally, there is no current standard for assumptions of minimum static pressure head in gravity water network design.Some examples from gravity water network design references include 5 m (Bouman, 2014), 10 m (Arnalich, 2010), 5-15 m (Action Contre La FAIM, 2008), and 8-20 m (Swamee and Sharma 2008).Thus, 7 m is a reasonable assumption and in line with our own experience of common practice.Including even larger values for hmin will unnecessarily increase pipe sizes and thus cost.This justification has been included in the paper.18.The discussion section in the present form is relatively weak and should be strengthened with more details and justifications.

38Author's Response:

3918. We have added a number of additional elements to the discussion in order to strengthen it, per your suggestion.A discussion of the CB results in the context of the mapping schemes now appears in Section 6.Even though our tabular results are based on up-sizing, each of the methods described in Section 6 produce a solution closer to the global minimum of the more-computationally intensive and not-soscalable BT method.These methods engage the designer to make decisions on pipe-ordering (e.g., large diameters are chosen upstream of small diameters for the compound-pipe approach) and the acceptability or unacceptability of a diameter change relative to the HGL corresponding to the CB continuous diameter results.In addition, discussion of the rationale behind GA techniques used and parameter tuning has been added, including a clearer explanation of the relevance of these criteria may have on the results of the study.Where appropriate, we have included more details in sections which were a better fit for their inclusion, for example, the comparison of our BT algorithm to the González-Cebollada algorithm (section 4.3).

4019.Moreover, the manuscript could be substantially improved by relying and citing more on recent literatures about real-life case studies of contemporary soft computing techniques in water resources engineering such as the followings: 19.We have looked at the literature examples you have provided and reviewed their scope in comparison with that of the current paper.Our paper focuses on water distribution network design, a significant body of work in its own right without including other aspects of the much broader field of water resources.We felt that the inclusion of references on aquifer levels and flows prediction for watersheds and runoff did not fit within the scope of our paper.We have included a reference to Taorimina (2015), however, in an attempt to highlight the many uses of metaheuristic methods in water resources engineering.

4120.In the conclusion section, the limitations of this study, suggested improvements of this work and future directions should be highlighted.

42Author's Response:

4320.The conclusions section has been has been updated to highlight the limitations of the study (e.g., the scalability of the BT algorithm, the lack of inclusion of some GA improvements reported in the literature) and improvements and future directions for the work (e.g., integrating the strengths of the BT to map the CB algorithm continuous diameter solution to a discrete diameter solution and verifying the suitability of the BT and BT-NoUp algorithms on other large GDWNs).

44Thank you again for your time spent reviewing our paper.

451

Algorithms for Optimization of Branching Gravity-Driven Water Networks

46Ian Dardani 1 , Gerard F. Jones 1

471 Villanova University, College of Engineering, Villanova, 19085, United States

48Correspondence to: Ian Dardani (ian.dardani@villanova.edu)

49Abstract.The design of a water network requires the selection of pipe diameters that satisfy pressure and flow requirements while optimizing for cost.This work focuses on the design of moderate-scale branching Gravity-Driven Water Networks (GDWNs), in contrast to large urban-scale looping networks, where budgets are highly constrained and where Polyvinyl chloride (PVC) pipe is typically used.To help designers of GDWNs select an appropriate design approach for a given network problem, three cost-minimization algorithms are presented and results compared with five GDWN test cases.Two algorithms, a backtracking algorithm and a genetic algorithm, use a set of discrete pipe diameters, while a new calculus-based algorithm produces a continuous-diameter solution, which is mapped onto a discrete-diameter solution.The backtracking algorithm produced the overall lowest-cost solutions with relative efficiency for the test cases, while the calculus-based algorithm produced slightly higher-cost results but with greater scalability to networks with more links.Furthermore, the new calculusbased algorithm's continuous-diameter and mapped solutions provided lower and upper bounds, respectively, on the discretediameter global optimum cost, where the mapped solutions were typically within one diameter size of the global optimum.

50Overall, the genetic algorithm as implemented did not produce results which deemed it compelling over deterministic methods for GDWN design.However, for more complex networks and problem formulations, a genetic algorithm may be more advantageous, particularly if it incorporates improvements reported in the literature.The results of this study highlight the advantages and weaknesses of each GDWN design method including closeness to the global optimum, the ability to prune the solution space of infeasible and sub-optimal candidates without missing the global optimum, and calculation time.We also extend an existing closed-form model of Jones (210) to include minor losses, a more-comprehensive two-part cost model, which realistically applies to pipe sizes that span a broad range typical of GDWNs of interest in this work, and for smooth and commercial steel roughness values.

Introduction

51A gravity-driven water network (GDWN) is commonly constructed to deliver potable water to a community in a developing region.These systems draw water from a source at a high elevation, such as a natural spring or a stream, and deliver it through a branching pipe network to household taps or public tapstands (Fig. 1).In principal, loops and 2 loop/branching constructs may be added to networks for greater reliability, but material cost considerations often restrict attention to just branch networks in GDWNs.The methodologies presented in this paper, however, may be extended to all networks, including those with loops.When feasible, gravity water networks are very attractive compared with pumped networks because of their simplicity and lower capital, operational, and maintenance costs.In addition, in most locations where GDWN are considered, there may be little or no access to reliable grid-based electrical power for pumps.

52Water networks are modelled as a collection of nodes, each representing a point of water demand or supply, which are connected with links representing pipes.Typically, the layout of the site is known, including water source and demand locations and elevations of all other nodes.For the present work, design flow rates are determined from community survey data, which are extrapolated for future population growth.Networks in this category are referred to as "demand-driven" designs.Bhave (1978) refers to these as "Q-specified" designs.Thus, to design a network of this type, pipe diameters for each link must be chosen such that acceptable but arbitrary minimum pressure heads are maintained at each node given a design flow rate at the node.Furthermore, application of the energy equation to this network demonstrates that the design problem is non-unique; i.e., choosing different pressure heads at the nodes will result in a different pipe diameter solution for the network, and thus different networks costs.

53In practice, gravity-driven water networks are commonly designed by a marching method, where diameters for each link of the network are chosen sequentially.After selecting a reasonable diameter for each link, the designer calculates the static pressure head at the link outlet, and proceeds to the next link if this result is acceptable.In this way, the designer marches through the network until all pipe diameters have been selected.This method produces a feasible solution, but not a costoptimized one.As noted by Bhave (2003), cost savings of 20-30% can result from the use of optimization techniques.In developing regions, the cost of a water network can be prohibitive, adding to the importance of optimizing network design.

54Within the provided framework, the global optimum can be found through an exhaustive search of the solution space, known as complete enumeration, although this is infeasible when considering networks with many links and diameter choices (Kadu et al. 2008;González-Cebollada 2011).To reduce the computational time required by enumeration, authors have proposed various partial enumeration methods which prune the search space (Kadu et al. 2008), although some of these techniques may remove the global optimum (Simpson et al. 1994).The most common types of algorithms that have been applied to optimize water network design include traditional deterministic methods, heuristic methods, metaheuristic methods, multi-objective methods, and decomposition methods (Zhao et al. 2016).

55Deterministic methods include linear programming (LP), dynamic programming, and nonlinear programming (NLP), and typically involve rigorous mathematical approaches (Zhao et al. 2016).A brief overview and comparison of these algorithms is given in Kansal, et al. (1996), who use a single-part cost correlation for metric pipe diameters between 100 mm and 350 mm.Linear programming techniques have relatively low computational complexity and allow each link to be composed of two diameters, called a split-pipe solution, although these may not always be practical to implement (Kessler and Shamir 1989, Swamee and Sharma 2000, Samani and Mottaghi 2006).LP can also get stuck in a local optimum (Zhao et al. 3 2016), although combining LP with metaheuristic techniques can help with the problem's non-smoothness properties (Krapivka and Ostfeld 2009).Dynamic programming has been used by Yang et al. (1975) and Martin (1980) to optimize networks in stages.This approach begins at the discharge nodes, proceeding to select feasible diameters and joints for upstream stages and storing these partial candidates in memory until the source node is reached.At this point, the algorithm reviews the feasible segment design options and selects a combination of stage solutions producing the lowest cost overall solution.This method, however, requires the designer to allow a relatively narrow range for the design pressure of each node, or otherwise store a large set of feasible candidate solutions in memory and also allow adjoining branches to arrive at different heads at the same node.

56Nonlinear programming, a calculus-based method, deals with each link's diameter as a continuous variable.Using

57Lagrange multipliers and a one-part, pipe-cost model with minor-lossless flow, Swamee and Sharma (2000) developed systems of equations for both continuous and discrete pipe diameters for branch networks, assuming constant friction factor.When solved, the solution gives diameter values that minimize distribution main cost, not network cost.In carrying out the solution, iteration is required to update the value of the friction factor.For the discrete diameter case, large computational times were noted by Swamee and Sharma because of the stiffness of the mathematical system.Cases where one or more nodal pressure heads are not acceptable need to be treated manually by the designer in various ways as discussed by the authors.

58For branching networks, Jones (2011) showed that by restricting the focus to smooth-turbulent, minor-lossless flow, and the use of a one-part, pipe-cost model, a simple nonlinear algebraic equation for each internal node in the distribution main could be developed.The equation has been extended in the present work to include minor losses and rough pipe.When solved simultaneously with the energy equation for each link, a unique solution for all link diameters and nodal pressure head values are obtained that produces minimum network cost, as opposed to the distribution main cost as in Swamee and Sharma (2000).

59The method of Jones (2011) also applies to serial and loop networks because of its generality.

60Heuristic methods follow specific rules to incrementally build better solutions, although the rules are not strictly formulated to trend towards local or global optima.An approach by Monbaliu et al. (1990) sets all network pipes to their minimum size, where the pipe that has a maximum head loss gradient is incremented to its next-highest size until all nodal head requirements are satisfied.Similarly, an algorithm by Keedwell and Khu (2006) selects an initial solution and iteratively responds to nodal head deficits and surpluses by incrementing or decrementing pipe sizes accordingly until a feasible solution is found.Suribabu (2012) proposed a heuristic that identifies pipes to increment or decrement in size based on flow velocity and alternative metrics such as proximity to the source node, achieving acceptable cost results with computational efficiency.

61While these algorithms are typically computationally efficient, they do not guarantee a global optimum.

62Metaheuristic optimization methods allow for a set of solutions to evolve through random processes that are guided with an objective function which rewards low network costs and penalizes hydraulic insufficiencies.Examples include evolutionary algorithms, which are most commonly genetic algorithms (Krapivka and Ostfeld 2009, Simpson et al. 1994, Kadu et al. 2008, Prasad and Park 2004), simulated annealing (Vasan and Simonovic 2010;Tospornsampan et al. 2007), ant colony optimization (Maier et al. 2003), and differential evolution (Vasan and Simonovic 2010).As reviewed by Nicklow et al. (2010), evolutionary algorithms are an emerging popular alternative to the deterministic methods, and they offer the opportunity to accommodate unique constraints and multiple design objectives.The main challenges for evolutionary algorithms are the difficulty of incorporating constraints into objective functions, the optimum selection of parameters, and a relatively large amount of computational effort.In addition to optimizing for cost, multi-objective methods, often based on evolutionary algorithms, allow the designer to choose from a Pareto-optimal front of objectives, such as cost and reliability (Prasad and Park 2004).In addition to water network design, metaheuristic algorithms have been used for a range of problems in water resources engineering, such as rainfall and runoff modelling (Taormina et al. 2015).

63Decomposition methods involve the partitioning of networks into smaller sub-networks which are each optimized using one of many types of techniques and then combined into an overall solution.In some cases, the loops in the sub-networks are removed, producing branching trees which are then optimized individually.Techniques used to optimize the sub-networks can involve multiple methods, including linear programming (Saldarriaga 2013) and differential evolution (Zheng et al. 2013), with a later stage optimizing the network as a whole using the sub-network solutions as inputs.Note that another distinct use of the term 'decomposition' refers to the approach of iteratively solving "inner" and "outer" mathematical problem formulations, and has been used in the literature by Krapivka and Ostfeld (2009) who traces its use in this context back to Alperovits and Shamir (1977).

64In the present study, we present three algorithms, each from one of three major categories of methods applied to cost optimization of water distribution networks, and compare their performance on five cases adapted from real GDWNs.These Within the broader context of water network problem formulations, this paper is concerned with finding cost-optimal single-diameter solutions to branching water distribution networks with steady-state demand flows and pre-specified pipe locations..By implication of being gravity-driven, the problem does not involve the use of pumping stations.This problem formulation is directly applicable to typical gravity-driven water networks, and is also useful for multi-objective algorithms, the consideration of sub-networks in a decomposition technique, pumped networks, and looped system optimization, which can involve reformulating the problem into a branching configuration.

65The results of this study highlight the advantages and weaknesses of each GDWN design method including closeness to the global optimum, the ability to prune the solution space of infeasible and sub-optimal candidates without missing the global optimum, and also computational time.We present two pre-processors with which discrete-diameter search methods can use to reduce the search space without pruning the global optimum.To the authors' knowledge, is the first implementation of Pre-Processor 1 in enumeration methods and the first implementation of Pre-Processor 2 in any method.We also extend the Jones closed-form model to include minor losses, a more-comprehensive two-part cost model, which realistically applies to pipe sizes that span a broad range typical of GDWNs of interest in this work, and for smooth and commercial steel roughness values.

Problem Formulation

66Branching networks are considered (Fig. 1), where all branches connect a distribution main node with a delivery For all nodes, static pressure, ℎ, is greater than or equal to a chosen minimum, ℎ .The value for ℎ is selected to eliminate possible leakage of contaminated ground water into the network should the operating conditions change in an unanticipated way.The change in static pressure head, Δℎ, across each link is calculated with the energy equation for pipe flow,

67(1)

68where for each link, is the kinetic energy correction factor and f is the Darcy friction factor, calculated with the Colebrook-White equation (Colebrook and White 1937) or Churchill correlation (Churchill 1977), and is acceleration of gravity.The kinetic energy correction factor, , is considered only in the first link, where acceleration from a zero-velocity source is sometimes non-negligible for the smallest of GDWNs that have been encountered.Thus,

69where Re is the Reynolds number for pipe flow, 4Q/   D, and  is the kinematic viscosity of water.The possibility of laminar flow (Re ≤ 2300) is permitted since branches from the smallest GDWN observed in practice have been in this regime.

70The pressure upper bound is not incorporated into the optimization process.Worst-case pressure conditions occur under hydrostatic conditions, which are directly related to the maximum elevation change in the network and where no flow occurs.Therefore, before the optimization process is undertaken, the selections of appropriate pressure ratings for the pipe and, if needed, break-pressure tanks are left to the correct judgment of the designer under no-flow conditions.In addition, precautions against water hammer are left to the designer.

New Calculus-Based Algorithm

71In this section we develop a new calculus-based algorithm for pipe diameters that minimize overall pipe cost for the network.First appearing in the text by Jones (2011), this algorithm is solved simultaneously with the energy equation for each link to produce unique solutions for D and nodal pressure head values that minimize network pipe cost, as opposed to only the distribution main cost as in Swamee and Sharma (2000).The method also applies to serial and loop networks.

72First consider the physical basis for the existence of a unique set of pipe diameters and static pressures for the demanddriven design problem with cost minimization included.Several works reviewed in the previous section have considered optimization of GDWN and combined pumped and gravity-driven networks.We assume continuous pipe diameters in this section; values that result from the solution of the energy equation.Mapping between continuous diameters and the discrete nominal sizes, required to complete the design, will not be fully addressed in the present work.However, we will discuss two methods we have used for mapping the continuous D solutions onto the discrete pipe diameter set.

73Consider the three-pipe network shown in Fig. 2. Pipes 1-2, 2-3, and 2-4 meet where head ℎ 2 is unknown.Each pipe has prescribed volume flow rate and length and unknown diameter as shown.The change in elevation between the top and bottom of each pipe is Δ and Δℎ is the change in static pressure head.There is a prescribed head at each outlet for pipes 2-3 and 2-4.

74To facilitate insight, we at first assume turbulent flow, which can be verified post-calculation if necessary, in smooth pipe and that minor losses are negligible.Two sources for the friction factor for smooth-turbulent flow are considered, namely the classical Blasius equation (reported in Streeter et al. 1998), f = 0.316 Re -1/4 , and the Swamee-Jain correlation (Swamee and Jain 1976), f = 0.175 Re -0.1923 (though not explicitly appearing in this reference, f from the Swamee-Jain correlation is obtained by writing it for smooth pipe and comparing this with the energy equation, where f is assumed to be in the form a Re n ).The Blasius equation has higher accuracy (2% for low Re and 3% for high Re) in the range 10 4 < Re < 10 5 , over which most of the GDWNs in this work operate, compared with the Swamee-Jain correlation of +8% / -3%, thus prompting the Blasius equation to be chosen for this work.A combination of the Blasius equation with the energy equation gives explicit formulas for for the three links in Fig. 2. For simplicity, and to reduce the number of free parameters, the conditions for pipes 2-3 and 2-4 are assumed to be identical without loss of generality.We obtain (3)

75The pipe cost model can be assumed to follow a power-law relationship (Swamee and Sharma 2008)

76where is a constant coefficient, is a constant exponent, and an assumed unit diameter.A more robust, two-part model, valid for a greater range of pipe sizes than that of Swamee and Sharma (2008), will be used below.The use of pipe material cost as the objective function was assumed because of relevance.In most GDWNs of interest in this work, installation labor comes from the local community and has no well-defined associated cost.The material cost for the network is of prime importance since it normally comes from funds raised by nongovernmental organizations or grants, where there is seldom a required repayment but are always in short supply.For a more-general case, the economics of a GDWN may be more encompassing and include materials, labor, operation and maintenance, depreciation, taxes, and salvage, among others.The time value of money may also need to be considered, which includes interest rates and estimation of the network lifetime.

77With Eq. ( 4) the general expression for the total cost for the pipe material, , is obtained by summing over all links

78A close inspection of Eq. (3) in combination with Eq. ( 6) will reveal the origin of the existence of an optimal ℎ 2 for the design of the network in Fig. 2. Because of its arbitrariness, we are free to vary the value of ℎ 2 .As ℎ 2 increases, say from a small value like 1 m, the pressure difference between the junction and the bottom of pipe 2-3 (and 2-4) increases.Since the volume flow rates in each pipe are fixed, an increase in pressure drop across pipe 2-3 (and 2-4) requires a reduction in 23 (and 𝐷 24 ).This is evident from our inspection of the second of Eq. ( 3), where we see that 23 and 24 are both proportional to (Δ 12 − ℎ 3 + ℎ 2 ) −4/19 ; that is (Δ 12 − ℎ 3 + ℎ 2 ) −4/19 decreases as ℎ 2 increases.

79Because the top of pipe 1-2 is at atmospheric pressure, an increase in ℎ 2 will decrease the pressure drop between the top of pipe 1-2 and the junction.Thus, compared with pipes 2-3 and 2-4, the opposite effect occurs in pipe 1-2; 12 increases with increasing ℎ 2 .For insight on how the energy equation supports this explanation, note that the first of Eqs.

80(3) requires that 12 ≈ (Δ 12 − ℎ 2 ) −4/19 increases as ℎ 2 increases.

81From this discussion it is clear that for an increasing ℎ 2 there is a competition between the decrease of 23 (and 24 )

82and an increase in 12 .Once the effect of on pipe cost is included through Eq. ( 6), as ℎ 2 increases we see that the cost for pipes 2-3 and 2-4 decrease, and the cost for pipe 1-2 increases.A consequence of this competition is the existence of an optimum, in this case an optimal ℎ 2 , which produces the smallest possible cost.

83The mathematical basis for a unique solution for ℎ 2 with cost minimization is now presented.In addition to the fixed pipe lengths, the total cost depends on the diameters for all of the pipes in the network.For the case of Fig. 2, where we now allow pipe 2-3 and pipe 2-4 to be different, get

84Using the chain rule from the calculus, the total differential of Eq. ( 7) is

85The minimum value of is found once = 0 (and once it is verified that the second derivative of is positive thus indicating that is indeed a minimum).Requiring this, obtain

86The cost is from Eq. ( 5), so the derivatives like / 12 in Eq. ( 9) are written in general as

87for any link .

88The derivatives like 12 /ℎ 2 in Eq. ( 9) are obtained by taking the partial derivative of the pipe diameter with respect to the relevant pressure head in the appropriate energy equation.(13) Equations ( 10)-( 13) are combined with Eq. ( 9) to produce a single algebraic equation that depends on ℎ 2 , as well as 12

89The general form of Eq. ( 14), written at any internal node is

90where the hydraulic gradient, , is

91In Eq. ( 15) the indices ij,in and ij,out on the summations refer to inflows and outflows at the node (e.g., in Fig. 2, ij,in =12 and ij,out = 23 and 24).Equation ( 15), the new CB algorithm proposed in this work, is written for each internal node in the network and solved simultaneously with the energy equation for each link to obtain unique and optimal values of Dij for all links and hj for all internal nodes.It is understood that the nodal pressure heads determined from the solution of this system must be greater than or equal to the hmin prescribed for the network.For nodes that do not satisfy this condition, the pressure head is set equal to hmin, as part of the CB algorithm.Thus hj > hmin.

92Minor losses using the equivalent-length method can be included in the above developments by artificially extending the length of the link by in which minor loss occurs, thus contributing a non-zero term in Eq. ( 1).We also extend the cost model of Eq. ( 5) from Swamee and Sharma (2008)

93In Eq. ( 17), and ℓ are the coefficients for the small and large pipe size regions, respectively, and and ℓ are the exponents for the small and large pipe size regions, respectively.A cubic spline is fit between pipe sizes and +1 to complete the transition between small and large pipe sizes.The coefficients of this polynomial are 1 , 2 , 3 , and 4 as seen in Eq. ( 17).

94Equation ( 18), and its simpler form Eq. ( 15), forms the basis for calculus-based optimization in this work and is applied at all internal nodes to uniquely determine hj.Equation ( 18) is valid over the range of ~4000 < Re < ~300,000.

95Algorithms to solve a general set of independent, nonlinear algebraic equations using, for example, the Levenberg-Marquardt, Quasi-Newton, Newton-Raphson, or Conjugate Gradient methods are available in most commercial math packages including

96Matlab (1 Apple Hill Drive, Natick, MA USA 01760) and Mathcad (http://www.ptc.com).We used the package Mathcad in the present work.Thus, compared with an iterative solution procedure, a solution flowchart is not relevant here.Bhave (1978) first proposed an algorithm like Eq. ( 15).However, Bhave used an iterative method to solve the design problem.As such, there are several qualifications leading up to the cost minimization equation in Bhave.These include the assumption of smallness in variation of the static pressure head between two iterations.This allowed the terms in the cost function to be approximated as constants.In the present work, the cost-function coefficient and exponent are not assumed constant at any node joining two sets of links; see Equation ( 18).Nor do we make any assumptions on the orders of magnitude of the terms in our equations to simplify them.For clarity, we re-present Eq. ( 15) using Bhave's (1978) notation as

97where the ij and jk notation are shown in Fig. 4. Index j spans all internal nodes along the distribution main.

Backtracking Algorithm and Genetic Algorithm

98Backtracking (BT) and genetic algorithm (GA) assess candidate solutions composed of discrete diameters from a commercially available set.These candidates are represented by a vector of size [1, ] where each element corresponds to a network link.

99The values of the vector specify a diameter from the commercially available set that are indexed from smallest ( = 1) to largest ( = ).To reduce the computational time associated with these evaluations, the constraints imposed by the energy equation and cost minimization may be more efficiently evaluated through lookup tables.With fixed , Δ, , , and , the change in static pressure head Δℎ is evaluated for all combinations of pipe diameter and link index:

100While an algorithm evaluates a candidate solution, the static pressure head at each node is sequentially calculated by "marching" through the network.Starting with the fixed source pressure head, the algorithm finds the pressure head ℎ for a given node by adding the head at the upstream node, ℎ −1 to the change in head for that link and the diameter under consideration.Thus,

101Along with the hydraulic evaluation of a candidate solution, the cost of the partial candidate is found through the use of a

102where ( , ) returns the additional cost of assigning a diameter with index to link .In this way, the candidate solution's hydraulic performance and cost are incorporated into the genetic algorithm and backtracking approaches.In contrast to GA, the backtracking algorithm evaluates static pressure head and cost upon consideration of each partial candidate, where GA calculates these values on full candidates as part of the objective function.

BT and GA Pre-Processor 1: Maximum Available Diameter

103To increase the efficiency of BT and GA, it is advantageous to limit the number of pipe diameters in the available set, especially those outside of the range of the optimal solution.In particular for the BT algorithm, larger diameters can require considerable computational effort, since they tend not to violate static head requirements and require multiple-link partial candidates for the algorithm to reject them once their cost exceeds that of an already-found viable candidate.Therefore, a preprocessor is used to provide a maximum diameter ( ) that should be considered during the optimization process.This procedure, which produces a conservative estimate, finds the smallest diameter at which a network with a single pipe diameter choice produces no nodes with a static pressure head below ℎ , similar to the technique used by Mohan and Jinesh Babu (2009).After this diameter is found, the next-larger diameter in the set is selected as to allow the algorithm to select a larger-than-necessary diameter if this is able to save cost elsewhere.If appears in the optimum solution, the designer can elect to further increase this maximum diameter.It worth noting that Kadu et al. (2008) presents another method to further prune the search space with the critical path concept, where Dongre and Gupta (2011) noted the computational advantages of having just four diameter choices per link.This method, however, may prune the global optimum and may not produce feasible head values at intermediate nodes, as in the case of networks with a local high point.

104will be viable for the full network solution.Note that both pre-processors discussed will not prune the global optimum from the solution.

Backtracking Algorithm (BT)

105The backtracking algorithm employs a systematic search of candidate solutions to find a global optimum.The algorithm works recursively to incrementally build candidate solutions while checking the candidates for hydraulic and cost acceptability.The strength of the BT is that, upon discovery of an infeasible partial candidate, all extensions of that candidate can be eliminated from consideration.In this way, many solutions can be pruned from the solution tree to achieve greater computational efficiency.

106Two backtracking methods can be found in the literature, namely those by Gessler (1985) and González-Cebollada et al. (2011).The algorithm proposed by Gessler, however, also proposes a pipe-grouping criteria that risks pruning the global optimum and represents a tricky optimization problem in and of itself (Raad 2011).The González-Cebollada algorithm, on the other hand, does not include such criteria to potentially prune a global optimum from consideration, but it halts its search after finding the first feasible solution.In contrast, the BT algorithm in the present study guarantees a global optimum by continuing its search of the solution tree even after the first solution has been found.In addition, the present BT algorithm utilizes Pre-Processors 1 and 2 to further reduce the search space, without risk of pruning the global optimum, in advance of its search routine.Thus, out of the two reported backtracking algorithms in the literature, both do not guarantee a global optimum, while the BT algorithm presented in this work does.It should be noted that BT is known to scale poorly with large network sizes and would not be appropriate for use on large urban networks, though its appropriateness is demonstrated here for GDWNs,

107given that the test cases used in this paper representative of the sizes of GDWNs that would be expected in practice.

108Backtracking is a type of partial enumeration method, which Raad (2011) notes can drastically reduce the number of solutions to be evaluated based on two rejection criteria.The first rejection criterion is that when a candidate violates static pressure head constraints, all candidates with equal or lesser diameter sizes can be discarded.This condition is leveraged even more effectively with Pre-Processor 2 above, which can increase static pressure heads at individual nodes by anticipating the head requirements at surrounding nodes.The second rejection criterion is that once a feasible candidate has been found, all other partial candidates with a higher cost can also be discarded.The BT algorithm further extends this criterion by considering that the links yet to be considered in a partial candidate, an "extension" to the partial candidate, will cost at a minimum that of the entire extension being composed of the smallest available diameter.Thus, when considering whether the partial candidate will necessarily be more expensive than the running optimum, this minimum extension cost can be added to the partial candidate cost.

109The backtracking algorithm begins its search of the solution tree by considering the partial candidate with the smallest diameter size assigned to the first network link.The static pressure head and the partial candidate cost at the outlet node are calculated with the and lookup tables.If this partial candidate meets static pressure head and cost requirements, the algorithm extends this partial candidate by assigning the smallest diameter to the downstream link.If a partial candidate produces a node that is rejected on the basis of static pressure head, the next largest larger diameter is chosen for the link upstream of the node.If no diameter satisfies the pressure head condition, the algorithm backtracks to the upstream link and assigns a larger diameter to the link.If a node is connected to a delivery node by a single link, the smallest feasible diameter for that link is found, and if no such diameter exists, the partial candidate is rejected.In this way, the algorithm continues to extend and reject candidate solutions until a full candidate satisfies the static pressure head requirements.Once this has been achieved, the diameter choices and cost of the network are stored as a running optimum.

110Once a working solution has been found, candidate solutions may be rejected based on cost.For each new candidate, cost is calculated by adding the cost of diameters that have already been assigned to the cost of assigning all downstream links with the smallest diameter available.If this cost exceeds the cost of the running optimum, the partial candidate is rejected.

111Unlike a candidate rejection based on static pressure head, a rejection based on cost does not consider siblings with larger diameters, since these would only further add to cost, rather, the algorithm backtracks immediately to re-assigning the upstream link.

112In this way, the rejection criteria based on a minimum static pressure head and cost are used to prune the solution tree and largely reduce the number of non-optimal candidates that need to be considered.The minimum static pressure head criterion tends to prune candidates with diameters that are too small, while the running optimal cost criterion tends to prune candidates of diameters that are too large.

113Another pruning technique noted by Raad (2011) is to group together adjacent links that are sized identically.This technique, in contrast to the former two mentioned, cannot guarantee an optimal result, and is therefore not included in the present study's BT algorithm.The present study's BT algorithm operates similarly to the method presented by González-Cebollada et al. (2011), with the major difference being that the BT algorithm continues searching once it has found its first feasible solution and its use of Pre-Processors 1 and 2. The BT algorithm could also be used in this way to find an initial solution very quickly, and then continue as normal to find progressively better solutions until the end of the search space, or a predefined condition such as calculation time, are met.

Modified Backtracking Algorithm (BT-NoUp)

114A modification to the BT algorithm was made to further improve its computational speed, although at the risk of pruning the global optimum from the search.This modified algorithm (BT-NoUp) rejects all candidates that feature a smaller diameter that is upstream of a larger diameter when an equal or smaller flow rate is present in the downstream link.Typically, optimal networks would not exhibit this feature, and in cases where a single source feeds into a network with constant-length links, it is advantageous (or equivalent) to place larger diameters upstream of smaller diameters.However, due to the discrete nature of diameter choices and link lengths, an optimization problem may, in fact, have an optimal candidate with a larger diameter cost.With each generation, ℎ is updated by multiplying the normalized penalty coefficient, ℎ, , by the average pipe cost of the population,

115The algorithm then selects candidates to be carried into the next generation through a proportionate selection method, where each candidate has a probability of being selected, , in direct proportion to its fitness relative to the sum of all fitness values in the population

116The algorithm replaces the parent generation with a generation of equal size and tends to select more fit individuals in successive generations.In this study, the genetic algorithm parameters used were = 0.02, = 50, = 0.5, = 100, ℎ, = 0.1.The first four of these parameters were chosen based on typical values presented in the literature and then tuned with a sensitivity analysis for the first test case.Simspon et al. (1994) present typical values for (30 -200),

117(0.7 -1.0), (0.01 -0.05), and (100 -1000).The normalized hydraulic penalty coefficient, ℎ, , was chosen such that the GA converged on solutions which tended to satisfy the minimum static pressure constraint, but still allowed the population to gravitate towards smaller diameters with static pressures close to ℎ .

Cases Studied

118Five cases were studied based on actual GDWN in Panama, Nicaragua, and the Philippines.Global characteristics of each network are presented in Table 1 and the details of each network are presented in Table 3( The choice of ℎ is not standardized, and should appropriately balance the risk of negative pressure in pipes and the increase in network cost due to the requirement of using larger diameters.The choice of ℎ in GDWN design is typically in the range of 5 m -20 m (Arnalich 2010;Bouman 2014;Swamee and Sharma 2008).In the present study hmin = 7 m, although this requirement was reduced at selected nodes at the beginning of networks where changes in elevation are still small.At the source node, the static pressure head is fixed at atmospheric pressure.All cases assumed minor-lossless flow, although all algorithms (e.g., Eq. ( 18) for CB-Theor) are capable of handling minor loss coefficients through the equivalent length method as presented above.

1196 Mapping the Theoretical D to Discrete Pipe Sizes

120The mapping between continuous diameters and the discrete nominal pipe sizes was accomplished in our solution by one of the following ways:

1211.For small and moderate size networks, the designer may manually adjust the pipe sizes (downward, normally one pipe size) starting from the first link downstream from the source and continuing along the rest of the distribution main to the end.A nearby plot of the static pressure heads compared with the theoretical Dij from our CB approach (on the same Mathcad page) will highlight the acceptability or unacceptability of any change.This exercise also gives the designer an understanding of the sensitivity of the design to small changes in pipe sizes.

1222. Based on the theoretical Dij from the CB approach, a composite pipeline can be created for each link.That is, the lengths for the two discrete pipes sizes that bound the theoretical Dij from above and below are calculated such that the pressure drop between two consecutive nodes in the distribution main matches between the composite pipeline and the CB approach.This also provides discrete pipe sizes that nearly matches the CB solution in terms of cost.

Results

123The current study evaluated three types of algorithms that optimize the design of gravity-driven water networks (GDWN).The algorithms include a calculus-based (CB) algorithm, a backtracking algorithm (BT), a modified backtracking version (BT-NoUp), and a genetic algorithm (GA).The algorithms were applied to five test cases that are based on real GDWNs.

124The global optimum network cost, found with BT, is shown in Table 2.The costs of solutions from all other algorithms are expressed as a percentage difference in cost from the global optimum cost.To visually compare the algorithm solutions, the hydraulic grade lines from BT, BT-NoUp, CB-Theor, and CB-Disc are presented in Fig. 5 along with the network elevation for each test case.For clarity, the hydraulic grade lines of branch links are omitted from the figure.In addition, the GA solutions are omitted since 100 solutions were obtained for each test case.Collectively, the hydraulic grade lines reveal a close alignment of the BT solution (the global optimum) with the CB-Theor solution which utilizes a continuous diameter set.Furthermore, the mapping scheme used to generate a CB-Disc solution is shown to increase pipe sizes in some cases far beyond the limit imposed by ℎ , which was set to 7 m in the present work.

125In practice, a GDWN must be designed with pipe diameters that are selected from a discrete, commercially available set.With a given number of network links, , and a number of available diameters, , a total of candidate solutions exist, yet with only one global optimum (except in the case of no viable solutions or unique solutions with identical costs).For example, a GDWN of 20 links and 13 commercially available pipe sizes will, in principal, produce approximately 1.910 22 candidate solutions.

126prune infeasible and sub-optimal candidates.In this study, BT evaluated only a fraction of the candidate solutions, where the fraction ranged from 410 −18 to 710 −4 .To further reduce the number of evaluations required to arrive at a solution, the BT algorithm was modified (BT-NoUp) to prune all solutions that include a smaller diameter that is upstream of a larger diameter.

127This criterion, which seems intuitive to the designer, may actually miss the global optimum due to trade-offs associated with discrete solutions.In fact, BT-NoUp missed the global optimum in cases 2 and 3, although by a small percentage increase in cost (2.1% and 0.35% respectively).BT-NoUp, however, finished its search in a shorter amount of time in comparison to BT.

128Using a Dell Latitude (i5 CPU at 2.50 GHz), the time to evaluate one candidate for both BT and BT-NoUp was around 0.2 ms.

129In addition to approximately 2 s of pre-processing time, the computation times for BT ranged from 0.08 s (case 1) to 79 s (case 3), while BT-NoUp ranged from 0.06 s (case 4) to 0.3 s (case 3).The number of available diameters used in the BT, BT-NoUp, and GA runs are listed in Table 1.

130The CB algorithm, unlike the other algorithms in this work, finds a solution with theoretical diameters that are drawn from a continuous domain (CB-Theor).For all test cases, the costs of the CB-Theor solutions was less when compared with the discrete-diameter global optimum (-5.46% to -2.60%).In fact, because of the discrete pipe sizes needed for an actual network, the continuous model will always produce the smallest theoretical cost for the network.The CB algorithm then maps this solution to a commercially-available discrete set (CB-Disc).The mapping process used in this study simply mapped each theoretical diameter to the nearest available diameter of a larger size, thus producing a solution which still satisfies static head requirements but with a higher associated material cost.This tended to oversize the diameters, although the CB-Disc solutions were always within two diameters of the BT global optimum solutions, as shown in Fig. 6.From all of the test cases combined, all but one (71 out of 72) of the diameter selections were within one diameter of the global optimum.More sophisticated mapping schemes, like independently adjusting D for each link in the distribution main in a step-by-step manner starting with the source while ensuring all pressure head constraints are satisfied, would more likely produce results identical to the global optimum.This was not performed in the current study.The CB-Disc solution costs were, in all cases, larger than the global optimum, with a percentage difference ranging from 3.86% to 22.6%.Thus, for all cases, the calculus-based algorithm bounded the cost of the global optima with a lower-cost CB-Theor solution and a higher-cost CB-Disc solution.This trend is a result of the additional constraints imposed by the finite set of diameter choices.If the algorithm is allowed a greater number of discrete diameter choices, i.e., through adding a less-common nominal diameter size to the available set, the cost of the CB-Disc solution would approach the CB-Theor solution.For all cases, the CB algorithm converged on a solution in 5 minutes or less.

131GA was run on each case a total of 100 times, each run itself produced 100 generations of 50 candidates.The leastcost candidate in that did not violate the static pressure head condition was chosen as the optimum.Because GA is a stochastic search algorithm producing different results from run-to-run, the costs of the optima from all 100 runs were averaged, with this averaged value presented in Table 2 as a percentage increase from the global optimum.Out of the 100 GA runs for each test case, nearly all runs failed to achieve the global optimum, with the exception of 8 runs of the Kiangan network.On a Dell Latitude (i5 CPU at 2.50 GHz), GA runs took between 0.9 s (case 1) and 1.2 s (case 3), not including about 2 s of pre-processor time.We note that many variations of GAs have been reported in the literature and several of these would likely improve upon the GA results obtained in this study.Potential improvements to the GA a self-adapting penalty function (Wu and Walski 2005), the use of elitism to preserve the best solutions (Kadu et al. 2008), and a reduction in the search space (Kadu et al. 2008).Other reported improvements, including the systematic optimization of operator parameters (Reed et al. 2000) and scaling of the fitness function to magnify the rewards towards slightly fitter candidates (Dandy et al. 1996) were attempted in a less systematic way (Ie.a parameter tuning study and three attempts at scaling the fitness function with an increasing exponent), but these did not result in a noticeable on performance.However, it is possible that if these techniques were followed systematically in full, the GA performance may have been improved.Still, the GA algorithm presented has undergone reasonable attempts to adapt its design and parameters for real-world GDWN cases, and therefore presents a useful point of comparison to the BT and CB algorithms.

Conclusions

132Algorithms to optimize the cost of branching gravity-driven water networks are evaluated on five test cases from real networks in the Philippines, Nicaragua, and Panama.A calculus-based algorithm produced a solution composed of theoretical diameters from a continuous set (CB-Theor), which are then mapped onto discrete commercially available diameters (CB-Disc).Backtracking (BT), a recursive algorithm, systematically searches discrete candidate solutions and is guaranteed to find the global optimum by following rules that prune only higher-cost or hydraulically infeasible candidates.The BT algorithm was modified (BT-NoUp) to improve computational speed by also rejecting all candidates that included a small diameter directly upstream of a larger diameter.This criterion allowed BT-NoUp to prune more candidate solutions but allowed for the possibility of missing the global optimum.The third type of algorithm evaluated was a genetic algorithm (GA) that used singlepoint crossover and proportionate selection BT was able to find the global optimum in all test cases with relatively little computational effort, and could be applied to other GDWNs composed of a similar number of links.In addition, while BT-NoUp completed its search in less time than BT, the time required to complete BT would not be burdensome on a designer and therefore BT-NoUp did not produce a compelling relative advantage over BT.BT, however, could become prohibitively time-consuming when dealing with networks with significantly more links, as would be the case with large urban networks.While the test cases represent the range of GDWN sizes encountered in the authors' experience, future work would be needed to verify the suitability of the BT and BT-NoUp algorithms on other large GDWNs.The calculus-based algorithm produced consistently good results for the networks tested, although a more robust mapping scheme from theoretical diameters to discrete diameters would further improve on these results as discussed above.In potential future work, the CB-Theor solutions could be used to prune the BT search space, similar to Kadu et al. (2008), by only including the two diameters above and below the CB-Theor diameters, Δz (m) 25.0 38.9 11.9 42.1 -22.9 32.3 -29.9 40.8 -3.0 -14.7 34.1 -7.6 -5.0 20.0 -15.0 2.0 -12.0 14.0 -6.0 5.0 -1.0 -13.0 9.0 D solutions

133Suribabu, C. R.: Heuristic-based pipe dimensioning model for water distribution networks, J. Pipeline Syst.Eng.Pract., 3(4), 115-124, doi:10.1061/(ASCE)PS.1949-1204.0000104,2012.Zhao, W., Beach, T., and Rezgui, Y.: Optimization of Potable Water Distribution and Wastewater Collection Networks: A Systematic Review and Future Research Directions, IEEE Transactions on Systems, Man, and Cybernetics: Systems, 46 (5), 659-681, doi:10.1109/TSMC.2015.2461188,2016.

134et al., "Modeling of groundwater level fluctuations using dendrochronology in alluvial aquifers", Journal of Hydrology 529 (3): 1060-1069 2015. Taormina, R., et al., "Data-driven input variable selection for rainfall-runoff modeling using binary-coded particle swarm optimization and Extreme Learning Machines", Journal of Hydrology 529 (3): 1617-1632 2015. Wu, C.L., et al., "Methods to improve neural network performance in daily flows prediction," Journal of Hydrology 372 (1-4): 80-93 2009. Wang, W.C., et al., "Improving forecasting accuracy of annual runoff time series using ARIMA based on EEMD decomposition," Water Resources Management 29 (8): 2655-2675 2015. Chen, X.Y., et al., "A Novel Hybrid Neural Network based on Continuity Equation and Fuzzy Pattern-recognition for Downstream Daily River Discharge Forecasting," Journal of Hydroinformatics 17 (5): 733-744 2015. Saeidifarzad, B., et al., "Multi-site calibration of linear reservoir based geomorphologic rainfallrunoff models", Water 6 (9): 2690-2716 2014.

135algorithms include (1) the calculus-based (CB) optimization model ofJones (2011), an NLP method, (2) backtracking (BT), a partial enumeration method, and (3) a genetic algorithm (GA), a metaheuristic method.Major distinguishing features of these algorithms include their working use of continuous diameters (CB) versus discrete diameters (BT and GA), their deterministic nature (CB and BT) versus a stochastic nature (GA), and their relative scalability as better (CB, GA) and worse (BT) for larger networks.In terms of their ability to find a global optimum solution for the problem formulation, CB finds a global optimum for continuous diameters but cannot guarantee a discrete diameter global optimum in its mapped solution, BT can guarantee a discrete global optimum, and GA cannot guarantee an optimum.For a direct comparison of techniques, the pipe costs used for all algorithms are found by interpolating a two-part cost formula based on a curve-fit of real cost data for available diameter values.The three algorithms are tested against networks adapted from field data on five actual GDWNs installed in Panama, Nicaragua, and the Philippines.

136node, shown as tapstands or houses.For each link in a network of NL links, pipe length () and the net elevation change (Δ) are considered fixed.Steady-state flow rates () are prescribed for each link based on the demand flow data at delivery nodes.As noted above, demand flows are determined by community surveys and extrapolated in time to quantitatively account for population growth.Minor losses are accounted for through a minor loss coefficient or a dimensionless equivalent pipe length, ( /, or in symbol form, ), where Le is the pipe length of diameter D whose frictional loss results in the corresponding minor loss.An optimal solution is obtained by selecting pipe diameters () from a set of commercially available diameters such that the network's material cost is minimized.With choices of diameters for links, the problem has candidate solutions.

137These coefficients are evaluated by matching the cubic polynomial and pipe data at and +1 and the first derivative of the polynomial with respect to / to ( ) −1 at = and to ℓ ℓ ( +1 ) ℓ −1 at = +1 .An example of data for Polyvinyl chloride (PVC) pipe and the curvefit is shown in Fig. 3.The results of the curvefit are: = 2.067 in., +1 = 2.469 in., = $1.349 m -1 , = 1.157 , ℓ = $1.381 m -1 , ℓ = 1.344 , 1 = $237.516m -1 , 2 = −$316.125m -1 , 3 = $140.450m -1 , 4 = −$20.499m -1 .It is clear from inspection of Fig. 3 that a one-part cost model would not have produced an acceptable curve-fit to pipe-cost data.With the inclusion of the two-part cost model and minor loss term, Eq.

138Fig. 5.

Figure 1 :

139Figure 1: Element schematic of a GDWN.

Figure 6 :

140Figure 6: Diameter sizes of calculus-based (CB-Disc) solutions above the global optimum solutions.

141fit candidates have ability to be selected into successive rounds, albeit at a lower probability than fitter candidates.This ability to preserve less-fit candidates in the population increases genetic diversity, permitting genetic algorithms to avoid convergence into a local optimum.Alternates to proportionate selection include tournament selection, elitism, and stochastic universal sampling, which have been shown improved performance in genetic algorithms in certain cases of water network problems.

142For the full energy equation, where appears in a nonlinear than one location, this would be done using numerical methods.However, if we restrict our interest to minorlossless, smooth-turbulent flow as noted above, we can use the energy equations like Eq. (3).Obtain for pipe 1-2

143, 23 , and 24 .Introducing 12 , 23 , and 24 from Eqs (3) into this single algebraic equation, we get

144to encompass two different ranges of pipe diameters having two different coefficients a and exponents b.The link between the two ranges starts at discrete pipe size Dco, at and below which the cost model for the small (subscript s) pipe sizes applies, and discrete pipe size Dco+1, at and above which the cost model for the large (subscript l ) pipe sizes applies.The cutoff diameter, Dco is chosen by the designer based on inspection of cost vs.

145accounts for the effect of pipe roughness (smooth and commercial steel).The term ′ is the derivative of the cost function per unit length with respect to / .For the two-part cost model from above, obtain

Table 2 :

146Solution Costs.

Table 3 (b): Case #2 Los Modulos network properties, diameter (D) results (inch nominal sizes, with CB-Theor in inches), and nodal h.

147.94 31.5924.0049.25 33.99 47.55 27.45 32.32 24.05 19.91 8.557.04BT-NoUp 0 9.55 7.94 37.82 32.88 65.85 50.59 59.60 39.50 39.18 29.07 24.93 13.56 12.05 CB-Theor 0 9.00 7.00 31.86 24.78 51.53 37.98 47.87 29.53 30.21 20.46 17.46 7.44 7.23 CB-Disc 0 9.55 7.94 37.82 32.88 65.85 59.41 72.98 61.93 66.80 58.53 60.27 55.83 61.06

Table 3 (d): Case #4 San Miguel network properties, diameter (D) results (inch nominal sizes, with CB-Theor in inches), and nodal h.

148Theor 3.530 3.531 3.333 3.307 3.270 2.727 2.698 2.579 2.548 1.862 1.227 1.011 1.283 0.325 0.508 0.404 1.678 0.343 0.963 0.281 1.405 1.401 0.488 .451.5 91.3 51.7 82.5 43.9 69.8 41.4 22.1 40.0 21.7 12.1 72.2 24.3 82.2 26.1 90.8 20.1 73.3 21.9 7.81 39.7 BT-NoUp 0 21.1 58.8 66.4 106 66.6 97.4 42.8 68.8 40.4 21.0 39.0 20.7 12.1 75.6 39.2 97.1 9.5 106 19.0 72.2 20.9 7.43 38.7 CB-Theor 0 17.8 54.3 55.6 91.9 56.7 86.3 40.3 69.0 44.1 21.9 27.9 7.64 6.99 8.02 7.70 7.98 7.72 7.79 7.70 8.18 7.68 7.69 7.71 CB-Disc 0 21.1 58.8 66.4 106 78.8 110 70.9 106 94.4 75.1 93.0 74.7 12.1 75.6 39.2 97.1 53.1 118 47.1 110 74.9 61.4 92.7 29

Table 3 (e): Case #5 El Guabo network properties, diameter (D) results (inch nominal sizes, with CB-Theor in inches), and nodal h.

149.50 9.91 11.53 8.61 13.16 8.65 12.11 7.25 8.48 7.23 7.35 8.84 7.03 7.16 7.687.80BT-NoUp 0 10.34 18.50 9.91 11.53 8.61 13.16 8.65 12.11 7.25 8.48 7.23 7.35 8.84 7.03 7.16 7.68 7.80 CB-Theor 0 9.76 18.35 9.93 11.49 8.46 12.70 7.94 10.67 7.00 7.00 7.00 7.00 7.01 7.00 7.00 7.00 7.01 CB-Disc 0 10.34 19.85 13.47 15.09 12.17 16.72 12.21 15.67 12.27 8.48 8.58 10.91 12.40 10.94 13.84 12.67 15.76

참고문헌 37건

  1. Data-driven input variable selection for rainfall–runoff modeling using binary-coded particle swarm optimization and Extreme Learning Machines Journal of Hydrology · Elsevier BV · 2015 10.1016/j.jhydrol.2015.08.022
  2. A decomposition and multistage optimization approach applied to the optimization of water distribution systems with multiple supply sources Water Resources Research · Wiley · 2012 10.1029/2012wr013160
  3. Multi-objective optimisation of water distribution systems design using metaheuristics 2011
  4. Recursive Design of Pressurized Branched Irrigation Networks Journal of Irrigation and Drainage Engineering · American Society of Civil Engineers · 2010 10.1061/(asce)ir.1943-4774.0000308
  5. State of the Art for Genetic Algorithms and Beyond in Water Resources Planning and Management Journal of Water Resources Planning and Management · American Society of Civil Engineers · 2009 10.1061/(asce)wr.1943-5452.0000053
  6. Multiobjective Genetic Algorithms for Design of Water Distribution Networks Journal of Water Resources Planning and Management · American Society of Civil Engineers · 2003 10.1061/(asce)0733-9496(2004)130:1(73)
  7. Optimal Design of Water Distribution Systems Using Genetic Algorithms Computer-Aided Civil and Infrastructure Engineering · Wiley · 2000 10.1111/0885-9507.00201
  8. Experiments with fluid friction in roughened pipes Proceedings of the Royal Society of London A Mathematical and Physical Sciences · Royal Society · 1937 10.1098/rspa.1937.0150
  9. Novel Cellular Automata Approach to Optimal Water Distribution Network Design Journal of Computing in Civil Engineering · American Society of Civil Engineers · 2005 10.1061/(asce)0887-3801(2006)20:1(49)
  10. Optimization of Gravity‐Fed Water Distribution Systems: Theory Journal of Environmental Engineering · American Society of Civil Engineers · 1983 10.1061/(asce)0733-9372(1983)109:1(189)
  11. New Approach for Optimization of Urban Drainage Systems Journal of Environmental Engineering · American Society of Civil Engineers · 1990 10.1061/(asce)0733-9372(1990)116:5(927)
  12. Analysis of the linear programming gradient method for optimal design of water supply networks Water Resources Research · Wiley · 1989 10.1029/wr025i007p01469
  13. Genetic Algorithms Compared to Other Techniques for Pipe Optimization Journal of Water Resources Planning and Management · American Society of Civil Engineers · 1994 10.1061/(asce)0733-9496(1994)120:4(423)
  14. Ant Colony Optimization for Design of Water Distribution Systems Journal of Water Resources Planning and Management · American Society of Civil Engineers · 2003 10.1061/(asce)0733-9496(2003)129:3(200)
  15. An Improved Genetic Algorithm for Pipe Network Optimization Water Resources Research · Wiley · 1996 10.1029/95wr02917
  16. Explicit Equations for Pipe-Flow Problems Journal of the Hydraulics Division · American Society of Civil Engineers · 1976 10.1061/jyceaj.0004542
  17. Coupled Genetic Algorithm—Linear Programming Scheme for Least-Cost Pipe Sizing of Water-Distribution Systems Journal of Water Resources Planning and Management · American Society of Civil Engineers · 2009 10.1061/(asce)0733-9496(2009)135:4(298)
  18. Optimization of Water Distribution Networks Using Integer Linear Programming Journal of Hydraulic Engineering · American Society of Civil Engineers · 2006 10.1061/(asce)0733-9429(2006)132:5(501)
  19. Design of optimal water distribution systems Water Resources Research · Wiley · 1977 10.1029/wr013i006p00885
  20. Discussion of “Recursive Design of Pressurized Branched Irrigation Networks” by César González-Cebollada, Bibiana Macarulla, and David Sallán Journal of Irrigation and Drainage Engineering · American Society of Civil Engineers · 2012 10.1061/(asce)ir.1943-4774.0000441
  21. Water Distribution Network Design Using Heuristics-Based Algorithm Journal of Computing in Civil Engineering · American Society of Civil Engineers · 2009 10.1061/(asce)0887-3801(2009)23:5(249)
  22. Self-Adaptive Penalty Approach Compared with Other Constraint-Handling Techniques for Pipeline Optimization Journal of Water Resources Planning and Management · American Society of Civil Engineers · 2005 10.1061/(asce)0733-9496(2005)131:3(181)
  23. Water distribution systems design optimisation using metaheuristics and hyperheuristics Orion/ORiON · Operations Research Society of South Africa · 2012 10.5784/27-1-96
  24. Optimal Design of Water Networks Using a Modified Genetic Algorithm with Reduction in Search Space Journal of Water Resources Planning and Management · American Society of Civil Engineers · 2008 10.1061/(asce)0733-9496(2008)134:2(147)
  25. Optimization of Water Distribution Network Design Using Differential Evolution Journal of Water Resources Planning and Management · American Society of Civil Engineers · 2010 10.1061/(asce)0733-9496(2010)136:2(279)
  26. Heuristic-Based Pipe Dimensioning Model for Water Distribution Networks Journal of Pipeline Systems Engineering and Practice · American Society of Civil Engineers · 2012 10.1061/(asce)ps.1949-1204.0000104
  27. Noncomputer Optimization of Single-Source Networks Journal of the Environmental Engineering Division · American Society of Civil Engineers · 1978 10.1061/jeegav.0000799
  28. Design of Conduit System with Diverging Branches Journal of the Hydraulics Division · American Society of Civil Engineers · 1975 10.1061/jyceaj.0004162
  29. Optimization of Potable Water Distribution and Wastewater Collection Networks: A Systematic Review and Future Research Directions IEEE Transactions on Systems Man and Cybernetics Systems · Institute of Electrical and Electronics Engineers · 2015 10.1109/tsmc.2015.2461188
  30. Optimal Design of Water Distribution Networks Using Mock Open Tree Topology World Environmental and Water Resources Congress 2011 · 2013 10.1061/9780784412947.083
  31. Gravity flow water distribution system design Journal of Water Supply Research and Technology—AQUA · UWA Publishing · 2000 10.2166/aqua.2000.0015
  32. Gravity‐Driven Water Flow in Networks 2010 10.1002/9780470939659
  33. Computer aided design of pipe networks 1990
  34. Optimal Design of Water Conveyance Systems Journal of the Hydraulics Division · American Society of Civil Engineers · 1980 10.1061/jyceaj.0005502
  35. Split-Pipe Design of Water Distribution Network Using Simulated Annealing Zenodo (CERN European Organization for Nuclear Research) · CERN European Organization for Nuclear Research · 2007 10.5281/zenodo.1057909
  36. Deleted Work 1955
  37. Design of Water Supply Pipe Networks 2007 10.1002/9780470225059