Advanced Engineering Informatics 26 (2012) 582–591
Contents lists available at SciVerse ScienceDirect
Advanced Engineering Informatics journal homepage: www.elsevier.com/locate/aei
Hybrid particle swarm optimization and differential evolution for optimal design of water distribution systems A. Sedki ⇑, D. Ouazar Department of Civil Engineering, Mohammadia School of Engineering, University Mohammed V-Agdal, 765, Agdal, Rabat, Morocco
a r t i c l e
i n f o
Article history: Received 13 July 2011 Received in revised form 16 March 2012 Accepted 26 March 2012 Available online 20 April 2012 Keywords: Water distribution systems Particle swarm optimization Differential evolution
a b s t r a c t Water distribution system design belongs to a class of large combinatorial non-linear optimization problems, involving complex implicit constraints, such as conservation of mass and energy equations, which are commonly satisfied through the use of hydraulic simulation solvers. Recently, many researchers have shifted the focus from traditional optimization methods to the use of meta-heuristic approaches for handling this complexity. This paper proposes a hybrid particle swarm optimization (PSO) and differential evolution (DE) method, linked to the hydraulic simulator, EPANET, for minimizing the cost design of water distribution systems. The performance of the proposed PSO-DE algorithm is demonstrated using three well-known benchmark water distribution system problems, the two-loop network, the Hanoi network and the New York Tunnels network. The results are compared to that of standard PSO and previously applied optimization methods. It is found that PSO-DE is a promising method for solving water distribution system design problems as it outperforms standard PSO and other algorithms previously presented in the literature for the three case studies considered. Ó 2012 Elsevier Ltd. All rights reserved.
1. Introduction Water distribution systems (WDSs) constitute a vital part of urban infrastructures whose construction requires significant investments. Since an appropriate design can reduce the total cost of a project by half [17,22], considerable attention has been given to the application of optimization techniques for minimizing the cost design of WDSs. Traditional optimization techniques such as linear programming [1,22,10,8], dynamic programming [29] and nonlinear programming [10,37] have been employed primarily for solving least-cost design problem of WDS. However, these models have only been applied with simplifications and assumptions due to the complicated nature of the problem. Indeed, the design of WDSs when defined in a mathematical form leads to a non-linear, non-convex and multi-modal problem [8] classified as an NP-hard combinatorial problem [39], involving a complex set of implicit constraints, such as conservation of mass and energy equations, which are commonly satisfied through the use of hydraulic simulation solvers. In recent years, evolutionary algorithms are often the preferred choices because of their ability to deal with complex, nonlinear, and discrete optimization problems as well as the ease and generality with which they can be linked to any simulation model. The most widely used evolutionary algorithm is the genetic algorithm (GA) [12] which is based on the rules of evolution and natural selection. Since 1990, GA has been applied extensively to optimize ⇑ Corresponding author. Tel.: +212 37 68 71 50; fax: +212 37 77 88 53. E-mail address:
[email protected] (A. Sedki). 1474-0346/$ - see front matter Ó 2012 Elsevier Ltd. All rights reserved. http://dx.doi.org/10.1016/j.aei.2012.03.007
WDS design problems by many authors [32,6,28,13,35,20]. Despite its success, GA has some drawbacks, such as slow rate of convergence and large number of simulations to find an optimal solution [36,14]. Particle swarm optimization algorithm [7] is showing some improvement on these issues, which has local and global search capabilities to find better quality solutions with less computational time [27,2,30]. Particle swarm optimization (PSO) is a relatively new optimization technique which originated as a simulation of simplified social system such as bird flocking and fish schooling. Similar to GA, PSO is also a population based optimization tool, which searches for optima by updating generations [3,31]. However, unlike GA, PSO possesses no evolution operators such as crossover and mutation. Instead, PSO relies on the exchange of information between individuals (particles) of the population (swarm). Each particle adjusts its trajectory towards its own previous best position and towards the current best position attained by any other member in its neighborhood [18]. Compared to GA, PSO presents the advantage of being conceptually very simple, requiring low computation time and few parameters to adjust. However, the main disadvantage of PSO is the risk of a premature search convergence, especially in complex multi-peak-search problems. To overcome this problem and to improve the performance of the PSO, a hybrid algorithm based on PSO and differential evolution (DE) [33], denoted as PSO-DE, is developed herein. DE is an improved version of GA, originally proposed by Storn and Price [33] for solving global optimization problem. There are three important operators involved in the DE algorithm including
583
A. Sedki, D. Ouazar / Advanced Engineering Informatics 26 (2012) 582–591
the mutation, crossover and selection operators, which is quite similar to the GAs. The main difference between GA and DE is that GA relies on crossover, a mechanism of probabilistic and useful exchange of information among solutions to locate better solutions, while DE relies on mutation operation. This main operation is based on the differences of randomly sampled pairs of solutions in the population. At the beginning of the evolution process, the mutation operator of DE favors exploration. As evolution progresses, the mutation operator favors exploitation. Hence, DE automatically adapts the mutation increments (i.e., search step) to the best value based on the stage of the evolutionary process. The DE algorithm also uses a uniform crossover that can take child vector parameters from one parent more often than from the other. By using components of existing population members to construct trial vectors, crossover operator efficiently shuffles information about successful combinations, enabling the search for an optimum to focus on the most promising area of the solution space [21]. To exploit the advantages of the high speed of PSO and the exploration ability of DE, a hybrid PSO-DE method is proposed. The hybrid method uses the PSO to find the region of optimal solution, and then a combination of PSO and DE to find the optimal point. The optimization problems addressed herein are solved through linking the hybrid algorithm with the hydraulic simulator EPANET 2.0 [26] for minimizing the cost design of WDSs, with pipe diameters as decision variables. EPANET is a free and widely used water distribution network solver. It performs extended period simulation of hydraulic and water quality behavior within pressurized pipe network. It employs the gradient method proposed by Todini and Pilati [34] for solving the mass and energy conservation equations. The EPANET Programmer’s Toolkit is an extension of the EPANET simulation package that provides several functions that allow programmers to customize the use of the hydraulic and water quality solution engine provided by EPANET to their own applications. Using the Programmer’s Toolkit, the network solver EPANET 2.0 is incorporated into the proposed PSO-DE optimization algorithm to solve three benchmark WDS design problems.
1. Mass conservation constraint: For each junction node the mass conservation law should be satisfied:
X
X
ci ðDi Þ Li
ð1Þ
ð2Þ
DHk ¼ 0;
8l 2 NL
ð3Þ
where DHk is head loss in pipe k; and NL is the total number of loops in the system. The head loss in each pipe is the head difference between connected nodes, and can be computed using the Hazen– Williams equation:
DHk ¼ H1;k H2;k ¼ x
Lk C ak Dbk
Q k jQ k ja1 ;
8k 2 npipe
ð4Þ
where H1,k and H2,k are heads of both ends of pipe k; x is a numerical conversion constant (dependent on units); Ck is roughness coefficient of pipe k (dependent on material); a and b are regression coefficients. The values of x = 10.667, a = 1.852 and b = 4.871 are taken for the coefficients of the Hazen–Williams equation as used in EPANET 2.0. 3. Minimum pressure constraint: The minimum pressure constraint for each node in the network is given in the following form:
Hj P Hmin ; j
j ¼ 1; . . . ; NN
ð5Þ Hmin j
where Hj is the pressure head at node j; is the minimum required pressure head at node j; and NN is the number of nodes in the network. 4. Pipe size availability constraint: The diameter of each pipe must belong to a commercial size set:
8k 2 npipe
ð6Þ
where Dk is the diameter of pipe k; and {D} denotes the set of commercially available pipe diameters. To solve the problem above, the constrained model is converted into an unconstrained one by adding the amount of constraint violations to the objective function as penalties. Although the conservation of mass and energy constraints are satisfied externally via EPANET, the minimum pressure constraint Eq. (5) is required to be considered in the penalty cost. Thus, the total cost of the network is considered as the sum of the network cost and a penalty cost defined as:
Minimize C t ¼ C 0 þ C p
ð7Þ
where Ct and C0 are the penalized and non-penalized objective function values, respectively, and Cp is the penalty function that was taken to be proportional to the maximum nodal pressure deficit as in [40]. That is
i¼1
where (1) is the objective function and C0 is the cost of the design; ci(Di) is the cost per unit length of pipe diameter Di; Li is the length of pipe i; and npipe is the number of pipes in the network. The above objective function is subjected to the following constraints:
Q out ¼ Q e
K2Loop l
Dk 2 fDg;
A water distribution system is a collection of many components such as pipes, reservoirs, pumps and valves which are connected to each other to provide water to consumers. The optimal design of such system can be defined as determining the best combination of component sizes and component settings (e.g., pipe size diameters, pump types, pump locations and maximum power, reservoir storage volumes, etc.) that gives the minimum cost for the given layout of network, such that hydraulic laws for continuity of flow and energy are maintained and constraints on quantities and pressures at the consumer nodes are fulfilled. In this paper, WDS design is formulated as a least-cost optimization problem with a selection of pipe sizes as the decision variables, while pipe layout and its connectivity, nodal demand, and minimum head requirements are imposed. The optimization problem can be stated mathematically as [28,9,40]: npipe X
X
where Qin and Qout are flow into and out of the node, respectively, and Qe is the external inflow rate or demand at the node. 2. Energy conservation constraint: For each loop in the network, the conservation of energy constraint can be written as follows:
2. Optimal design of a water distribution system
Minimize C 0 ¼
Q in
Cp ¼
0 if Hj P Hj;min 8j ¼ 1; . . . ; NN p maxðHj;min Hj Þ otherwise
ð8Þ
where Hj,min and Hj are the minimum allowable pressure and the simulated pressure at node j, respectively, and p is the penalty multiplier.
584
A. Sedki, D. Ouazar / Advanced Engineering Informatics 26 (2012) 582–591
3. Differential evolution and particle swarm optimization 3.1. Differential evolution algorithm Differential evolution (DE) is an evolutionary algorithm (EA) proposed by Storn and Price [33]. Like the real-coded genetic algorithm (GA), candidate solutions in DE are represented as individuals based on floating-point numbers. In the DE algorithm, the target population is perturbed with a mutant factor, and the crossover operator is then introduced to combine the mutated population with the target population so as to generate a trial population. Then the selection operator is applied to compare the fitness function value of both competing populations, namely, the target and trial population. Ultimately, better individuals become members of the population for the next generation. Thereafter, DE guides the population towards the vicinity of the global optimum through repeated cycles of mutation, crossover and selection. The main procedure of DE can be described as follows. The DE algorithm starts with a population of NP n-dimensional search variable vectors. During the iteration G + 1, for each vector Xi, G = (xi1, G, xi2, G, . . ., xin, G) (i 2 {1, 2, . . ., NP}), a mutant vector Vi, G+1 is computed by applying the mutation operator according to the following equation
V i;Gþ1 ¼ X r1 ;G þ F ðX r2 ;G X r3 ;G Þ
where i = 1, 2, . . ., N; N is the size of the swarm. c1 and c2 are two positive constants named as learning factors; and r1 and r2 are random numbers in the range (0, 1). w is called the inertia weight and v is a constriction factor, which is used alternatively to w to limit velocity. Eq. (11) is used to calculate the particle’s new velocity according to its previous velocity and the distances of its current position from its own best position and the group’s best position. Then, the particle flies toward a new position according to Eq. (12). Proper fine-tuning of the parameters c1 and c2 in Eq. (11) may result in faster convergence of the algorithm, and alleviation of the problem of local minima. The constriction factor v in Eq. (11) is used to control the magnitude of the velocities. It is observed that, if the particle’s velocity is allowed to change without bounds, the swarm will never converge to an optimum, since subsequent oscillations of the particle will be larger. To control the changes in velocity, Clerc [4] introduced the constriction factor into the standard PSO algorithm to ensure the convergence of the search. The role of inertial weight w in Eq. (11) is to control the impact of the previous velocities on the current one. A large inertial weight facilitates global exploration (searching new areas), while a small weight tends to facilitate local exploration. Hence selection of a suitable value for the inertial weight w usually helps in the reduction of the number of iterations required to locate the optimum solution [18]. The variable w is updated according to
ð9Þ w¼
where r1, r2, r3 2 {1, 2, . . ., NP} are randomly chosen integers, must be different from each other and also different from the running index i. F is a scaling factor in the optimal range of 0.5–1.0. Next, to increase the diversity of the perturbed parameter vectors, crossover is introduced. To this end, a trial vector Ui,G+1 is generated though selecting solution component values either from Vi,G+1 or Xi,G using the uniform crossover [33]:
uij;Gþ1 ¼
v ij;Gþ1
if ðrandj 6 CRÞ or ðj ¼ jrand Þ
xij;G
if ðrandj > CRÞ and ðj – jrand Þ
ð10Þ
where j = 1, 2, . . ., n; uij,G+1, vji,G+1 and xij,G are the jth parameter for the ith trial, mutant, and target vectors, respectively; randj 2 [0,1]; CR is the crossover probability 2[0, 1]; and jrand is a randomly chosen index 2(1, 2, . . ., n) which ensures that Ui,G+1 gets at least one parameter from Vi,G+1. After crossover, the objective function corresponding to the trial vector Ui,G+1 is compared with that of the target vector Xi,G, and the vector that has the lower objective function value (for a minimization problem) of the two would survive for the next generation. This process is continued until the termination criterion is met. 3.2. Particle swarm optimization algorithm The PSO is also a population-based optimization algorithm. Its population is called a swarm and each individual is called a particle. Each particle represents a possible solution of the optimization problem. If the search space is n-dimensional, the ith particle of the swarm can be represented by a n-dimensional vector Xi = (xi1, xi2, . . ., xin). The velocity (position change) of this particle can be represented by another n-dimensional vector Vi = (vi1, vi2, . . ., vin). The performance of each particle is measured according to a pre-defined objective function. The best previously visited position of the particle i is denoted as Pi = (pi1, pi2, . . ., pin). Defining g as the index of the best particle in the swarm (i.e., the gth particle is the best) and let the superscripts denote the iteration number, then the swarm is manipulated according to the following two equations:
iter V iterþ1 ¼ v wV iter þ c1 r iter Piter X iter Piter þc2 r iter i i i i g Xi 1 2
ð11Þ
X iterþ1 i
ð12Þ
¼
X iter i
þ
V iterþ1 i
maxiter iter maxiter
ð13Þ
where iter is the current iteration number and maxiter is the maximum number of allowable iterations. In its basic form, the PSO can only handle continuous variables, whereas the WDS design problem involves discrete pipe diameters as decision variables. However, to handle discrete variables, in this study, a straightforward modification of the PSO algorithm is proposed. In effect, consider a pipe network design problem that requires the selection of npipe diameters as decision variables. The ith particle of the swarm is represented as:
X i ¼ D1i ; D2i ; . . . ; Dji ; . . . ; Dnpipe : i
ð14Þ
For particle i, the superscript value j (1 6 j 6 npipe) of the discrete variable is then optimized instead of the discrete value of the variable directly. Each superscript represents a diameter value, according to its position in the list of available diameters of the set {D} (Eq. (6)). However, these superscripts must be translated to the corresponding diameters before they are passed to the hydraulic simulation model for evaluation. Although PSO is fast search algorithm compared to other evolutionary techniques, it may face premature convergence while exploring complex functions. This behavior has been attributed to the loss of diversity in the population at the end of the evolutionary process [23,25]. To address this problem and to improve the performance of the PSO, a hybrid algorithm combining PSO and DE, denoted as PSO-DE, is developed in this study. 4. Hybrid PSO-DE algorithm The main idea of the hybrid PSO-DE algorithm is to integrate the DE operators into the PSO algorithm, and thus increasing the diversity of the population and the ability to have the PSO to escape the local minima. However, if DE is introduced to PSO at each iteration, the computational cost will increase sharply and at the same time the fast convergence ability of PSO may be weakened. In order to perfectly integrate PSO with DE, DE is introduced to PSO only at specified interval of iterations. In this interval of iterations, the PSO swarm serves as the population for DE algorithm, and the DE is executed for a number of generations. The main steps of
585
A. Sedki, D. Ouazar / Advanced Engineering Informatics 26 (2012) 582–591
PSO-DE algorithm for the optimal design of pipe networks are explained in the following. (1) Generation of initial population. The PSO generates an initial population of particles with random positions and velocities. Each particle represents a possible combination of pipe sizes and thus represents a trial solution to the pipe network design problem. (2) Initial evaluation of fitness function. For every trial design solution in the initial population (particle), EPANET is run to compute the nodal pressure heads for each demand. From the output file of the simulation, the nodal pressures are extracted to evaluate the minimum pressure constraint and violation constraint is handled by calculating the penalized objective function (Eq. (7)). Pi is set as the positions of the current particles, while Pg is set as the best position of the initialized particles. (3) Update inertia weight. Reduce the inertia weights w according to Eq. (13). (4) Updating of each particle’s velocity and position. The positions and velocities of all the particles are updated according to Eqs. (11) and (12). (5) Evaluation of fitness function. After modification of the particle positions, each one is evaluated using EPANET and the penalized objective function (Eq. (7)) is calculated. (6) Perform DE operators for all particles. For the predefined interval of iterations, the DE algorithm is executed; and the worst previous best position vectors are replaced with the best trial vectors obtained after performing mutation, crossover and selection operators. In this study, the mutation operator is applied to the previous best position vectors Pi using the following revised version of Eq. (9):
v i;gþ1 ¼ Pi;g þ F ðPr1;g þ Pr2;g Pr3;g Pr4;g Þ
ð15Þ
(7) Update the global and the previous best positions. The Pg and Pi values have to be updated according to the new fitness values. If the best position of all new particles is better than the current Pg, then Pg is replaced by the new solution. Similarly the local best of other particles in the population should be updated accordingly if the new fitness function value is better than the previous. (8) Termination criteria. If a stopping criterion is met, then output Pg and its fitness value; otherwise, repeat steps (3)–(7). 5. Example applications and results The performance of the developed PSO-DE based model for optimization of WDS design problems is evaluated through three well-known benchmark case studies, the two-loop network, the New York Tunnels network and the Hanoi network. For each case study, a preliminary sensitivity analysis is performed to determine the effective parameter values of PSO-DE algorithm on the basis of the range suggested by Clerc and Kennedy [3] and Storn and Price [33] for each parameter.
Fig. 1. Layout of two-loop network.
Table 1 Pipe sizes and costs for two-loop network. Pipe
Diameter (mm)
Cost ($/m)
1 2 3 4 5 6 7 8 9 10 11 12 13 14
25.4 50.8 76.2 101.6 152.4 203.2 254.0 304.8 355.6 406.4 457.2 508.0 558.8 609.6
2 5 8 11 16 23 32 50 60 90 130 170 300 550
Table 2 Node demands and elevations for two-loop network. Demand (m3/h)
Node (ID)
Elevation (m)
2 3 4 5 6 7
180 190 185 180 195 190
100 100 120 270 330 200
Reservoir 1
210
1120
5.1. Two-loop network The two-loop network, shown in Fig. 1, was originally presented by Alperovits and Shamir [1]. The network has seven nodes and eight pipes with two loops, and is fed by gravity from a reservoir with a 210 m fixed head. The pipes are all 1000 m long with the assumed Hazen–Williams coefficient of 130. The minimum pressure limitation at all demand nodes is 30 m above ground level. There are 14 commercial diameters to be selected; thus the problem search space consists of 148 = 1.48 109 different network designs, making this illustrative example difficult to solve [28]. Costs for
Table 3 Results obtained by different techniques for two-loop network. Model
Cost (units)
Average No. of evaluations
x
GA [28] SA [5] SFLA [9] HS [11] SS [15] PSO PSO-DE
419,000 419,000 419,000 419,000 419,000 419,000 419,000
250,000 25,000 11,323 5000 3215 3120 3080
10.5088 10.5088 10.667 10.5879 10.667 10.667 10.667
586
A. Sedki, D. Ouazar / Advanced Engineering Informatics 26 (2012) 582–591
1100 PSO-DE PSO
Design Cost (x1000$)
1000 900 800 700 600 500 400
10
20
30
40
50
60
Iteration Number Fig. 2. Convergence behavior of PSO-DE and PSO for two-loop network problem.
each pipe size are given in Table 1, and nodal demands and elevations are given in Table 2. This problem was previously solved using different metaheuristic optimization techniques, including genetic algorithms (GA) [28], simulated annealing (SA) [5], shuffled frog leaping algorithm (SFLA) [9], harmony search (HS) [11] and scatter search (SS) [15].
Presently, the PSO-DE technique is applied to solve this problem. After sensitivity analysis, PSO-DE model parameters selected are as follows: w is given by Eq. (13); v = 0.8; c1 = 2.05; c2 = 2.05; F = 0.5; CR = 1; population size = 100; maximum number of iterations = 60; and the interval of iterations in which the DE is introduced to PSO is set to [10, 20]. The problem is also solved using the standard PSO and the results are compared with those obtained by the PSO-DE. To run the PSO model, all the parameters, i.e., w, v, c1, c2, are set to the same as those used in the hybrid PSO-DE. To check the performance of the PSO-DE and PSO models for the optimal cost design of the two-loop network problem, ten optimization runs were performed using different random initial points. Table 3 compares the results of the two models with those obtained using the earlier techniques with respect to the optimal solution obtained and the average number of function evaluations taken to get the global optimum. The proposed PSO-DE algorithm yielded the best solution as $419,000, which coincides with the global optimal solution reported in the literature. However, as it can be seen in Table 3, PSO-DE found the optimal solution more quickly than previous techniques. The average number of function evaluations is 3080 using PSO-DE compared with 65,000 evaluations for GA [28], 25,000 evaluations for SA [5], 11,323 evaluations for SFLA [9], 5000 evaluations for HS [11] and 3215 for SS [15]. In addition, the PSO-DE model used a less favorable conversion constant (x = 10.667) than the x values of 10.5088 used in GA and
Fig. 3. Layout of Hanoi network.
587
A. Sedki, D. Ouazar / Advanced Engineering Informatics 26 (2012) 582–591 Table 4 Network data for the Hanoi problem. Node data
Table 6 Solutions for the Hanoi problem obtained by different techniques. Pipe data
3
Pipe diameters (in.)
Node
Demand (m /h)
Pipe
Length (m)
Pipe
ACO
GA
PSO
SS, CE and PSO-DE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
19,940 890 850 130 725 1005 1350 550 525 525 500 560 940 615 280 310 865 1345 60 1275 930 485 1045 820 170 900 370 290 360 360 105 805
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
100 1350 900 1150 1450 450 850 850 800 950 1200 3500 800 500 550 2730 1750 800 400 2200 1500 500 2650 1230 1300 850 300 750 1500 2000 1600 150 860 950
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
40 40 40 40 40 40 40 40 40 30 24 24 20 12 12 12 20 24 20 40 20 12 40 30 30 20 12 12 16 16 12 12 16 20
40 40 40 40 40 40 40 30 30 30 24 24 12 20 16 20 24 30 30 40 20 12 40 30 30 16 12 12 16 12 12 16 16 20
40 40 40 40 40 40 40 30 40 30 30 24 16 20 12 16 20 20 24 40 20 12 40 30 30 20 12 12 16 12 12 20 16 24
40 40 40 40 40 40 40 40 40 30 24 24 20 16 12 12 16 24 20 40 20 12 40 30 30 20 12 12 16 12 12 16 16 24
Cost (106 $)
6.134
6.173
6.160
6.081
7.5
PSO-DE PSO
Design Cost (million $)
SA models and x = 10.5879 in HS. The higher x results in higher head losses requiring larger pipe diameters in the final design [9]. Fig. 2 shows the convergence behavior of the PSO-DE and PSO models for one of ten runs. Using PSO-DE model, the average number of function evaluations and the mean fitness values obtained from ten runs are 3080 and 419,000 respectively; whereas in standard PSO model, the average number of function evaluations taken and the mean fitness values obtained are 3120 and 422,700 respectively. It can be observed that the PSO-DE model is giving the best fitness value, with least number of function evaluations as compared to the standard PSO model. In addition, the results indicate that PSO-DE is able to obtain the global optimum solution in all of the ten trial runs.
7
6.5
5.2. Hanoi network The Hanoi network in Vietnam (Fig. 3), first presented by Fujiwara and Khang [10], is a new design as all new pipes are to be selected. The network consists of 32 nodes and 34 pipes organized in three loops. The system is gravity fed by a single reservoir and
Table 5 Pipe sizes and costs for Hanoi network. Pipe
Diameter (mm)
Cost ($/m)
1 2 3 4 5 6
304.8 406.4 508.0 609.6 762.0 1016.0
45.726 70.400 98.378 129.333 180.748 278.280
6
0
20
40
60
80
100
Iteration Number Fig. 4. Convergence behavior of PSO-DE and PSO for the Hanoi problem.
network details are given in Table 4. The minimum required head pressure for all nodes is 30 m. There are six available pipe diameters to be selected for each new pipe; thus the total search space consists of 634 = 2.865 1026 possible designs. Table 5 lists the pipe cost per meter for the six available pipe diameters. After sensitivity analysis, the PSO-DE parameters are set as follows: c1 = 3; c2 = 2; the population size = 300; maximum number of iterations = 100; the interval of iterations in which the DE
588
A. Sedki, D. Ouazar / Advanced Engineering Informatics 26 (2012) 582–591
Fig. 5. Layout of New York Tunnels network.
Table 7 Network data for New York city tunnel system. Node data
Pipe data 3
Node
Demand (ft /s)
Minimum head (ft)
Pipe
Length (ft)
Existing diameter (ft)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
22017.5 92.4 92.4 88.2 88.2 88.2 88.2 88.2 170.0 1.0 170.0 117.1 117.1 92.4 92.4 170.0 57.5 117.1 117.1 170.0
300.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 255.0 260.0 272.8 255.0 255.0 255.0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
11,600 19,800 7,300 8,300 8,600 19,100 9,600 12,500 9,600 11,200 14,500 12,200 24,100 21,100 15,500 26,400 31,200 24,000 14,400 38,400 26,400
180 180 180 180 180 180 132 132 180 204 204 204 204 204 204 72 72 60 60 60 72
589
A. Sedki, D. Ouazar / Advanced Engineering Informatics 26 (2012) 582–591 Table 8 Cost data for new pipes for New York city tunnel system.
Table 9 Solutions for NYT expansion problem obtained by different techniques.
Pipe
Diameter (in.)
Cost ($/ft)
Pipe diameters (in.)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
0 36 48 60 72 84 96 108 120 132 144 156 168 180 192 204
0 93.5 134 176 221 267 316 365 417 469 522 577 632 689 746 804
Pipe
GA [6]
SFLA [9]
ACO [16]
PSO
PSO-DE
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
0 0 0 0 0 0 0 0 0 0 0 0 0 0 120 84 96 84 72 0 72
0 0 0 0 0 0 0 0 0 0 0 0 0 0 120 84 96 84 72 0 72
0 0 0 0 0 0 144 0 0 0 0 0 0 0 0 96 96 84 72 0 72
0 0 0 0 0 0 144 0 0 0 0 0 0 0 0 96 96 84 72 0 72
0 0 0 0 0 0 0 0 0 0 0 0 0 0 96 96 96 84 72 0 72
operators is performed is set to [10, 60] and the other parameters are the same as those for two-loop network problem. The previous best feasible solution for the Hanoi problem, when the network is simulated using EPANET 2.0 (w = 10.667) is $6.081 106. Table 6 compares the results using the PSO-DE and PSO algorithms with those obtained using other algorithms; ant colony optimization (ACO) [40], genetic algorithm (GA) [24], scatter search (SS) [15] and cross-entropy (CE) [19]. The PSO-DE model found the best feasible solution of $6.081 106 after 40,200 function evaluations, compared favorably with 43,149 and 97,000 evaluations required by SS, and CE respectively. ACO [40], GA [24] and presently applied PSO did not find the best solution. The difficulty of finding the lowest cost solution for this problem is mainly attributed to the relatively small feasible region of the search space [40]. The solutions from the various algorithms are given in Table 6. Fig. 4 shows the convergence behavior of the PSO-DE and PSO models for one of ten runs. Using PSO-DE model, the minimum cost and the average cost obtained from ten runs are $6.081 106 and $6.366 106 respectively; whereas in the PSO model, the minimum cost obtained is $6.160 106 with an average of $6.445 106. The better performance of the PSO-DE for this larger case study could be attributed to its greater ability to explore efficiently the search space with the aid of DE operators and thus enhancing the chances of finding the global optimum with fewer function evaluations. 5.3. New York city water supply tunnels network The New York Tunnels (NYT) network, as first considered by Schaake and Lai [29], is a gravity fed system from a single reservoir, and consists of 20 demand nodes connected via 21 tunnels (Fig. 5). Unlike the previous problems, this system is in place and requires expansion by duplicating new tunnels in parallel with the existing ones, because the existing network cannot satisfy the pressure head requirements at certain nodes (nodes 16, 17, 18, 19, and 20). The objective of the optimization is to decide on which of the 21 tunnels need to be duplicated, and if so, what diameter of tunnels should be constructed. For each duplicate tunnel there are 16 allowable decisions including 15 available diameters and the ’do nothing’ option; therefore the search space of this optimization problem is 1621 = 1.93 1025 possible designs. Tables 7 and 8 summarize the system data and unit costs of the NYT network, respectively. The Harzen–Williams coefficient for this problem is assumed at 100 for all existing and new pipes. Using the value of 100 for maximum number of iterations, both PSO-DE and PSO models are applied to solve NYT problem. For both
Cost (106 $)
38.80
38.80
38.64
38.64
38.52
models, after sensitivity analysis, the parameters adopted are as follows: the population size is set to 120, the interval of iterations in which the DE operators is performed is set to [20, 35] and the other parameters are the same as those for two-loop network problem. The previous best known feasible solution is $38.64 106 found first by Maier et al. [16] using ant colony optimization (ACO). The optimal solution found herein is $38.52 106 which is slightly better than the best known solution. It is important to note that other authors [28,5,38] have proposed lower cost solutions to the NYT problem, however these solutions were assessed as being infeasible by EPANET 2.0 [16], which is the hydraulic simulation solver used for this work. The results obtained using the PSO-DE and PSO algorithms and those previously reported in the literature for the NYT problem, when the network is simulated using EPANET 2.0 (x = 10.667), are shown in Table 9. The values listed in the table represent the optimal diameters of the new pipes to be added in parallel to the respective existing lines. Table 10 reports the hydraulic head values of critical nodes corresponding to the optimal pipe diameters obtained from the GA [6], ACO [16], PSO and PSO-DE, simulated using EPANET 2.0 (x = 10.667). The results are achieved by performing ten runs of PSO-DE and PSO using different random starting points. In Table 9, the least-cost solution ($38.52 106) is found by the proposed PSO-DE algorithm with an average number of evaluations of 3540 from ten runs. This compares favorably with evaluation numbers of 96,750, 33,978, 13,938 and 3570 respectively, for improved GA [6], SFLA [9], ACO [16] and presently applied PSO. Fig. 6 shows the convergence behavior of the PSO-DE and PSO models for one of ten runs. Using PSO-DE model, the best fitness value obtained from ten runs is $38.52 106 with an average fitness value of 38.72 106; whereas in standard PSO, the best fitness value is 38.64 106 with an average of 38.77 106. These results clearly show that PSO-DE is outperforming the standard PSO model with better quality optimal solutions over different trial runs. The optimal solution found by PSO-DE in this study is the lowest-cost feasible solution for the NYT problem to date, which is feasible in terms of the allowable nodal pressures computed by the EPANET 2.0. The optimal nodal head values for the PSODE solution are given in Table 10.
590
A. Sedki, D. Ouazar / Advanced Engineering Informatics 26 (2012) 582–591
Table 10 Hydraulic head of critical nodes for NYT network using EPANET 2 (x = 10.667). Pressure (ft) Critical node
Minimum head
GA [6]
ACO [16]
PSO
PSO-DE
16 17 19
260.0 272.8 255.0
260.59 272.91 255.78
260.08 272.87 255.05
260.08 272.87 255.06
260.02 272.80 255.17
Design Cost (million $)
50 PSO-DE PSO
48 46 44 42 40 38
0
20
40
60
80
100
Iteration Number Fig. 6. Convergence behavior of PSO-DE and PSO for New York Tunnels problem.
6. Conclusions In this paper, a new hybrid swarm-evolutionary algorithm, namely PSO-DE, based on the combined concepts of PSO and DE, is proposed to solve design problems of WDSs. The optimization problems addressed herein are solved through linking the proposed PSODE approach with the hydraulic simulator EPANET 2.0 for determining the least-cost combination of pipe sizes for new pipe network and for network expansion. The performance of the proposed PSODE is demonstrated using three well-known WDS case studies and the results are compared to that of standard PSO and previously applied optimization methods. For the three case studies, PSO-DE is shown to outperform PSO both in terms of the ability to find the optimum solution and computational efficiency. For the two-loop network design problem, PSO-DE is consistently giving the global optimum solution of $419,000 from different random starting points. In addition, the PSO-DE obtained the optimal solution in fewer function evaluations than other stochastic optimization algorithms, including GA, SA, SFLA, HS and SS. For the second case study, the Hanoi problem, PSO-DE found the best known solution in fewer evaluations than other best performing algorithms such as CE and SS. For the NYT problem, the optimal feasible solution of $38.52 million found by PSO-DE is of lower cost than the knownleast-cost feasible solution of $38.64 million obtained first by Maier et al. [16] using ACO. Moreover, the PSO-DE model is taking less number of function evaluations to arrive at this least-cost value as compared to other models. It is important to note that lower cost solutions to the NYT problem have been reported in the literature, however, these solutions were assessed as being infeasible when analyzed using EPANET 2.0. The results of this study demonstrate therefore that the proposed PSO-DE algorithm can be effectively used to solve complex WDS design problems with better efficiency. However, more complex and real large-size networks should be studied to confirm the performance of the approach. References [1] E. Alperovits, U. Shamir, Design of optimal water distribution systems, Water Resour. Res. 13 (6) (1977) 885–900.
[2] K.W. Chau, Particle swarm optimization training algorithm for ANNs in stage prediction of Shing Mun River, J. Hydrol. 329 (2006) 363–367. [3] M. Clerc, J. Kennedy, The particle swarm-explosion, stability, and convergence in a multidimensional complex space, IEEE Trans. Evol. Comput. 6 (1) (2002) 58–73. [4] M. Clerc, The swarm and the queen: towards a deterministic and adaptive particle swarm optimization, in: P.J. Angeline, Z. Michalewicz, M. Schoenauer, X. Yao, A. Zalzala (Eds.), Proc. Congress of Evolutionary Computing, vol. 3, IEEE, New York, 1999, pp. 1951–1957. [5] M. Cunha, J. Sousa, Water distribution network design optimization: Simulated Annealing Approach, J. Water Resour. Plan. Manage. ASCE 125 (4) (1999) 215– 221. [6] G.C. Dandy, A.R. Simpson, L.J. Murphy, An improved genetic algorithm for pipe network optimization, Water Resour. Res. 32 (2) (1996) 449–458. [7] R. Eberhart, J. Kennedy, A new optimizer using particle swarm theory, in: Proceedings of the Sixth International Symposium on Micro Machine and Human Science, Piscataway, NJ, IEEE Service Center, 1995, pp. 39–43. [8] G. Eiger, U. Shamir, A. Ben-Tal, Optimal design of water distribution networks, Water Resour. Res. 30 (9) (1994) 2637–2646. [9] M.M. Eusuff, E.K. Lansey, Optimisation of water distribution network design using the shuffled frog leaping algorithm, J. Water Resour. Plan. Manage. 129 (3) (2003) 210–225. [10] O. Fujiwara, D.B. Khang, A two-phase decomposition method for optimal design of looped water distribution networks, Water Resour. Res. 26 (4) (1990) 539–549. [11] Z.W. Geem, Optimal cost design of water distribution networks using harmony search, Eng. Optim. 38 (3) (2006) 259–280. [12] D.E. Goldberg, Genetic Algorithm in Search, Optimization and Machine Learning, Wesley, Boston, MA, 1989. [13] D. Halhal, G.A. Walters, D. Ouazar, D.A. Savic, Water network rehabilitation with structured messy genetic algorithms, J. Water Resour. Plan. Manage. 123 (3) (1997) 137–146. [14] E.C. Keedwell, S.T. Khu, A hybrid genetic algorithm for the design of water distribution networks, Eng. Appl. Artif. Intell. 18 (2005) 461–472. [15] M.D. Lin, Y.H. Liu, G.F. Liu, C.W. Chu, Scatter search heuristic for least-cost design of water distribution networks, Eng. Optim. 39 (7) (2007) 857–876. [16] H.R. Maier, A.R. Simpsom, A.C. Zwcchin, W.K. Foong, K.Y. Phang, H.Y. Seah, C.L. Tan, Ant colony optimization for the design of water distribution systems, J. Water Resour. Plan. Manage. ASCE 129 (3) (2003) 200–209. [17] L.J. Murphy, A.R. Simpson, G.C. Dandy, Design of a pipe network using genetic algorithms, Water 20 (4) (1993) 40–42. [18] K.E. Parsopoulos, M.N. Vrahatis, Recent approaches to global optimization problems through particle swarm optimization, Nat. Comput. 1 (23) (2002) 235–306. [19] L. Perelman, A. Ostfeld, An adaptive heuristic cross-entropy algorithm for optimal design of water distribution systems, Eng. Optimiz. 39 (4) (2007) 413– 428. [20] D.T. Prasad, N.S. Park, Multiobjective genetic algorithms for design of water distribution networks, J. Water Resour. Plan. Manage. 130 (1) (2004) 73–82. [21] V.K. Price, M.R. Storn, A.J. Lampinen, Differential Evolution: A Practical Approach to Global Optimization, Springer, Berlin, 2005. [22] G.E. Quindry, E.D. Brill, J.C. Liebman, Optimization of looped water distribution systems, J. Environ. Eng. 107 (4) (1981) 665–679. [23] A. Ratnaweera, S.K. Halgamuge, H.C. Watson, Self-organizing hierarchical particle swarm optimizer with time-varying acceleration coefficients, IEEE Trans. Evol. Comput. 8 (3) (2004) 240–255. [24] J. Reca, J. Martínez, C. Gil, R. Baños, Application of several meta-heuristic techniques to the optimization of real looped water distribution networks, Water Resour. Manag. 22 (10) (2007) 1367–1379. [25] J. Robinson, S. Sinton, Y. Rahmat-Samii, Particle swarm, genetic algorithm, and their hybrids: optimization of a profiled corrugated horn antenna, Antennas and Propagation Society International Symposium, 2002, vol. 1, IEEE Press, New York, 2002, pp. 314–317. [26] L.A. Rossman, EPANET, Users Manual, U.S. Environmental Protection Agency, Cincinnati, 2000. [27] A. Salman, I. Ahmad, S. Al-Madani, Particle swarm optimization for task assignment problem, Microproc. Microsyst. 26 (8) (2002) 363–371. [28] D.A. Savic, G.A. Walters, Genetic algorithms for least-cost design of water distribution networks, J. Water Resour. Plan. Manage. ASCE 123 (2) (1997) 67– 77. [29] J.C. Schaake, D. Lai, Linear programming and dynamic programming applications to water distribution network design, Rep. No. 116, Hydrodynamics Laboratory, MIT, Cambridge, MA, 1969. [30] A. Sedki, D. Ouazar, Swarm intelligence for groundwater management optimization, J. Hydroinform. 13 (3) (2011) 520–532. [31] Y. Shi, R.C. Eberhart, Fuzzy adaptive particle swarm optimization, in: Proceedings of the Congress on Evolutionary Computation 2001, Seoul, Korea, IEEE Service Center, 2001, pp. 101–106. [32] A.R. Simpson, L.J. Murphy, G.C. Dandy, Genetic algorithms compared to other techniques for pipe optimisation, J. Water Resour. Plan. Manage. ASCE 120 (4) (1994) 423–443. [33] R. Storn, K. Price, DE a simple and efficient adaptive scheme for global optimization over continuous space, Technical Report TR-95-012, ICSI, 1995. [34] E. Todini, S. Pilati, A gradient method for the analysis of pipe networks, in: Proc. 3rd International Conference on Computer Applications for Water Supply and Distribution, Leicester Polytechnic, UK, 1987.
A. Sedki, D. Ouazar / Advanced Engineering Informatics 26 (2012) 582–591 [35] K. Vairavamoorthy, M. Ali, Optimal design of water distribution systems using genetic algorithms, Comput. Aided Civil Infrastruct. Eng. 15 (5) (2000) 374– 382. [36] J.E. Van Zyl, D.A. Savic, G.A. Walters, Operational optimization of water distribution systems using a hybrid genetic algorithm, J. Water Resour. Plan. Manage. ASCE 130 (3) (2004) 160–170. [37] K.V.K. Varma, S. Narasimhan, S.M. Bhallamudi, Optimal design of water distribution systems using an NLP method, J. Environ. Eng. ASCE 123 (4) (1997) 381–388.
591
[38] Z.Y. Wu, P.F. Boulos, C.H. Orr, J.J. Ro, Using genetic algorithms to rehabilitate distribution system, J. Am. Water Works Ass. (2001) 74–85. [39] D.F. Yates, A.B. Templemen, T.B. Boffey, The computational complexity of the problem of determining least capital cost designs for water supply networks, Eng. Optim. 7 (2) (1984) 142–155. [40] A.C. Zecchin, H.R. Maier, A.R. Simpson, M. Leonard, A.J. Roberts, M.J. Berrisford, Application of two ant colony optimization algorithms to water distribution system optimization, Math. Comput. Model. 44 (2006) 451–468.