Next Article in Journal
Removal and Reclamation of Trace Metals from Copper and Gold Mine Tailing Leachates Using an Alkali Suspension Method
Next Article in Special Issue
The Vital Roles of Parent Material in Driving Soil Substrates and Heavy Metals Availability in Arid Alkaline Regions: A Case Study from Egypt
Previous Article in Journal
How to Minimize the Environmental Contamination Caused by Hydrocarbon Releases by Onshore Pipelines: The Key Role of a Three-Dimensional Three-Phase Fluid Flow Numerical Model
Previous Article in Special Issue
Advances in Assessing the Reliability of Water Distribution Networks: A Bibliometric Analysis and Scoping Review
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Hybrid Optimization Algorithms of Firefly with GA and PSO for the Optimal Design of Water Distribution Networks

by
Riham Ezzeldin
1,
Martina Zelenakova
2,*,
Hany F. Abd-Elhamid
3,4,
Katarzyna Pietrucha-Urbanik
4,5 and
Samer Elabd
1
1
Irrigation and Hydraulics Department, Faculty of Engineering, Mansoura University, Mansoura 35516, Egypt
2
Institute of Sustainable and Circular Construction, Faculty of Civil Engineering, Technical University of Košice, 042 00 Košice, Slovakia
3
Department of Water and Water Structures Engineering, Faculty of Engineering, Zagazig University, Zagazig 44519, Egypt
4
Department of Environmental Engineering, Faculty of Civil Engineering, Technical University of Košice, 042 00 Košice, Slovakia
5
Department of Water Supply and Sewage Systems, Faculty of Civil and Environmental Engineering and Architecture, Rzeszow University of Technology, 35-959 Rzeszow, Poland
*
Author to whom correspondence should be addressed.
Water 2023, 15(10), 1906; https://doi.org/10.3390/w15101906
Submission received: 27 February 2023 / Revised: 18 April 2023 / Accepted: 15 May 2023 / Published: 17 May 2023

Abstract

:
A novel two-hybrid optimization model of particle swarm optimization (FAPSO) and firefly algorithm with genetic algorithm (FAGA) are introduced to improve the performance of the conventional firefly algorithm for the least cost design of water distribution networks. The performance of the models is tested through application to three of the well-known benchmark networks available in the literature and also to the real case study of the El-Mostakbal City network, Ismailia, Egypt. The performance of the different algorithms was determined by evaluating the minimum, maximum, mean and standard deviation of costs, the function evaluation number, the consumed computational time for 1000 evaluations and the success rate calculated using the fuzzy logic concept for different optimal solutions slightly greater than the known optimal solution (by about 1.0% and 2.0%) were utilized for testing the convergence and search capabilities of the models. It was found that the FAGA model is superior to the standard firefly and FAPSO models in exploring the search space, exploiting the promising areas and convergence to the optimal solution and can be considered as a reasonable optimization technique for the management of water distribution networks.

1. Introduction

Water distribution networks are one of the most important necessary infrastructures for the development of countries worldwide. Huge investment is required for the construction of such networks, and a relatively small decrease in this cost leads to a considerable total saving which can be achieved by selecting the pipe diameters from a set of available market sizes to minimize the total construction cost. This process is referred to as the optimal design of water distribution networks. Numerous optimization techniques were and are still being developed for such purpose of searching in a very large non-differentiable, and nonconvex design space. It is a discrete type of problem and very computational demand. However, still, there is no agreement on what optimization method is best for a particular design problem, and considerable research challenges remain essential [1].
Standard optimization techniques early developed include linear programming (LP) applied only to linear objective functions, equations and constraints, nonlinear programming (NLP) to deal with nonlinear problems and dynamic programming (DP) to solve stochastic and nonlinear problems. These techniques get stuck in local optimum solutions and do not guarantee global optimum performance. Besides, limitations when applied to problems with high dimensionality, uncertainty and requires high computational time [2].
In the last few decades, heuristic and metaheuristic techniques have been developed to overcome such limitations. Among these techniques are genetic algorithm, particle swarm optimization and firefly algorithm. The genetic algorithm (GA), first introduced by Holland [3], is the most popular evolutionary population-based algorithm which has been adopted in many complex optimization problems in water resources applications. Many researchers have attempted to improve the computational efficiency of the algorithm. Reca et al. 2017 [4] introduced the bounded genetic algorithm (B-GA) model to reduce the search space by decreasing the number of available pipe sizes that can be used for each of the network pipes. Recently, Sangroula et al. [5] introduced the smart optimization program for water distribution networks (SOP-WDN) which is based on a genetic algorithm linked with the EPANET hydraulic simulation solver. Particle swarm optimization PSO first introduced by Eberhart and Kennedy [6], is inspired by the behavior of a flock of birds and has been widely used in various optimization problems in different fields because of its simplicity and the few parameters that have to be adjusted.
Most of the optimization techniques were introduced in their standard form, then followed by different modifications that were found necessary to improve their reliability, robustness and convergence so that they become more and more effective for the optimization of water distribution networks. Among these modifications is the hybridization of different optimization algorithms, which recently have been widely considered by many researchers for performance improvement. (bacterial foraging, genetic algorithm and ant colony, [7]) (particle swarm and Hooke–Jeeves, [8]), (particle swarm and tabu search, [9]), (particle swarm optimization and cuckoo search, [10]), (grasshopper optimization algorithm and genetic algorithm, [11]). The firefly optimization algorithm has received considerable attention through being hybridized with other algorithms for different applications, as shown in Table 1, which summarizes the different hybrid firefly models.

2. Materials and Methods

2.1. Formulation of Pipe Networks Optimization

The problem of pipe network optimization is to find the best combination of pipe diameters among a set of commercially available diameters as discrete decision variables that provides the least construction cost for the network satisfying prescribed constraints. The problem can be formulated as reported in Ezzeldin and Djebedjian [24] by the minimization of the objective function f satisfying both design constraint and hydraulic constraints, continuity and energy, as follow;

2.1.1. Total Pipe Cost

The total pipe cost of the network can be expressed by:
C T = i = 1 N p i p e s c i D i * L i
where CT is the total construction cost of the network, Npipes is the number of pipes, ci (Di) is the cost of pipe i of discrete diameter Di per unit length, and Li is the length of pipe i.

2.1.2. Objective Function

The objective function of cost minimization is:
M i n i m i z e   f = C T   i f   H j , m i n H j 0 C T + C p   e l s e ,
where Cp is the penalty cost = P C j = 1 N n o d e s H j , m i n H j ,     P C is the penalty cost coefficient taken equal to 10,000, Hj,min is the minimum allowable head at node j, Hj is the head at node j and Nnodes is the number of nodes in the pipe network.

2.1.3. Hydraulic Constraints

Continuity constraint;
j = 1 N n o d e s Q j = 0 ,
Qj is the discharge at node j.
Energy constraint;
h f = E p ,
hf is head loss due to friction in pipe calculated using Hazen–Williams formula given by h f = 10 , 674 * L i * Q i 1.852 C i 1.852 * D i 4.87 ; Ci is the Hazen–Williams Coefficient, Qi is the discharge in pipe i and 𝐸𝑝 is the energy supplied by a pump.
Design constraint;
D m i n D i   D m a x   i = 1   N p i p e s ,
Dmin, Dmax are the minimum and maximum commercially available pipe diameters, respectively.
Nodal head constraint;
H j H j , m i n   j = 1   N n o d e s ,
A MATLAB code is developed to execute the hydraulic simulation model given by Equations (3) through (6) and an optimization code written in MATLAB is used to solve the optimization model. Both simulation and optimization models are linked to solving the simulation–optimization model.

2.2. Benchmark Networks

Three benchmark networks are considered in this study, namely, two-loop (Alperovits and Shamir [25]) with an optimal solution of 419,000 cost units, Hanoi (Fujiwara and Khang [26]) with an optimal solution of 6081 × 106$, and New York water supply system (Schaake and Lai [27]) with optimal solution of 38,637,600$. The first network is the hypothetical two-loop network shown in Figure 1, which consists of 8 pipes of 1000 m constant length and 7 nodes all fed by gravity from a single reservoir 210 m fixed elevation. Each pipe in the network is selected among 14 available discrete pipe diameters of 1, 2, 3, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, and 24 inches with arbitrary unit costs of 2, 5, 8, 11, 16, 23, 32, 50, 60, 90, 130, 170, 300 and 550, respectively. The minimum allowable nodal head is 30 m, and the Hazen–Williams Coefficient is 130 for all pipes—the optimization algorithm searches for the optimal solution in 148 possible solutions for the network design.
The second network is the Hanoi City network, Vietnam, shown in Figure 2, which is a three-loop network consisting of 34 links joined at 32 nodes and fed by gravity from a constant head reservoir of 100 m in elevation. The design of the network is restricted to selecting 6 discrete commercially available pipe sizes of 12, 16, 20, 24, 30, and 40 inches of, which cost 45.73, 70.4, 98.38, 129.3, 180.8 and 278.3 $/m, respectively. The minimum head at each node is required to be greater or equal to 30 m. above ground level, with the Hazen–Williams coefficient being 130 for all pipes. The optimal design of the network is searched among 634 possible network designs.
The third network is the New York City water supply system, for which the layout is shown in Figure 3. The network is fed from the single source Hillview Reservoir at a constant level of 300 ft and comprises 21 pipes and 20 nodes arranged in two loops. As a result of the growing demands at certain nodes 16, 17, 18, 19, and 20 in the existing network, it was required that the network be rehabilitated in order to increase the prespecified nodal pressures to meet the new conditions. A parallel expansion has been proposed by constructing new gravity tunnels parallel to the existing ones to increase the heads at nodes 16, 17, and 18 to 260, 272.8, and 272.8 and 255 ft., respectively, while maintaining a head of 255 ft. at other nodes. The solution space has 1621 possible designs with a Hazen–Williams roughness coefficient of 100. The available pipe diameters are in inches and cost $/ft. are 0(0), 36(93.5), 48(134), 60(176), 72(221), 84(267), 96(316), 108(365), 120(417), 132(469), 144(522), 156(577), 168(632), 180(689), 192(746), and 204(804).
For the selected benchmark networks of known optimal solutions obtained by many researchers, the optimization models are tested for reaching the known optimal solutions with better performance and search capabilities in the solution space.

2.3. Real Case Study of El-Mostakbal City Network

The models are also applied to the real case study of the El-Mostakbal city network shown in Figure 4, which has been constructed as an extension to the Ismailia city network in Egypt (Rayan et al. [28]). The network is of the unknown optimal solution for which the models are applied and tested to be able to reach a new optimal solution better than that of 4,926,560.7 LE using the modified Jaya algorithm (Abdel-Gawad [29]). As a real large-scale network that has a huge solution space of 1044 possible solutions, the El-Mostakbal city network is recommended to be used for testing the search capability and performance of the different optimization algorithms (Abdel-Gawad [29]). The network has 44 pipes and 33 nodes. The available pipe sizes are 0.15, 0.2, 0.25, 0.3, 0.4, 0.5, 0.6, 0.8, 1.0 and 1.2 m. at the cost of 188, 255, 333, 419, 570, 735, 1110, 1485, 2505 and 3220 LE/m., respectively. The network is designed to satisfy a minimum required head of 22 m at all nodes with Hazen–Williams coefficient of 22 m for all pipes. The network has previously been analyzed by many researchers using different optimization techniques, including Rayan et al. [28], El-Ghandour and Elbeltagi [30], Ezzeldin and Djebedjian [24] and Abdel-Gawad [29].

3. Firefly Optimization Algorithm

The firefly optimization algorithm first introduced by Yang [31] is a swarm intelligence population-based metaheuristic optimization technique inspired by the natural behavior of fireflies and can be used to solve both continuous and discrete optimization problems [12]. The algorithm proved to be an efficient search method for non-linear optimization problems and, when compared to PSO and GA for finding the global optima of various test functions, showed superiority in terms of efficiency and success rate [31]. However, the algorithm could fall into a locally optimal solution or suffer from low accuracy when solving high-dimensional optimization problems [32]. The algorithm has been applied to many problems related to water resources engineering [33,34,35,36]. Up to the knowledge of the authors, the firefly algorithm has not yet been applied for the least cost design of water distribution systems.

3.1. Formulation of Firefly Algorithm (FA)

Firefly algorithm, FA is based on the following three rules, (1) all fireflies are unisex, (2) attractiveness is proportional to their brightness, and (3) the brightness of a firefly is determined by the landscape of the objective function.
A detailed formulation of the firefly algorithm, as found in Yarpiz [37], can be summarized as follow:
  • Initialize the input parameters for FA.
  • Generate an initial population of npop fireflies for the dimension of Npipes.
  • The total construction cost of the network, CT and the corresponding constraint for each firefly is evaluated using the simulation model.
  • The fitness of each firefly, fi, i = 1, 2, 3, …, npop (the summation of total construction cost and penalty due to the constraints violation [Equation (2)]) is computed.
  • Compare the finesses fi and fj for each of the two fireflies i and j, respectively, (i and j = 1: npop and ij).
  • If fi > fj, firefly i moves towards firefly j. Update the position of firefly i, Xi(t) according to Equation (7) and calculate its fitness f′i at the new position, Xi(t + 1).
X i t + 1 = X i t + β . r n X i t X j t + α 1 t Δ R n
where β = β 0 e γ r i j 2     i s   the   attractiveness ,    β0 = coefficient base value at r = 0, γ = light absorption coefficient and r i , j   calculated as:
r i j = d i j d m a x  
where dij is the distance between any two fireflies i and j which can be determined by the cartesian distance in the form:
d i j = k = 1 N p i p e s X i , k X j , k 2
and
d m a x = k = 1 N p i p e s D m a x k D m i n k 2
X i , k is the kth component of the spatial coordinate Xi of ith firefly, Dmin and Dmax are vectors of the minimum and maximum allowable diameters, rn is a vector with uniformly distributed random numbers, Δ = 0.05 (Dmax − Dmin) is the uniform mutation range, Rn is a vector with continuous uniform distribution with the lower endpoints-1 and upper endpoint 1 and α 1 t = α 0 d r t 1   is the mutation coefficient at iteration t in which α0 = initial mutation coefficient and d r is the mutation coefficient damping ratio
7.
If f′i < fi replace the position of the firefly i, Xi(t) with the updated one, Xi(t + 1) otherwise keep the old position of the firefly i.
8.
Repeat Steps 5 to 7 until the maximum number of iterations, niter is reached.
9.
Rank the fireflies and find the current best solution.

3.2. Hybrid Firefly-Particle Swarm Optimization (FAPSO) Model

Aydilec [18] Combined the search ability of firefly FA and particle swarm PSO optimization algorithms through hybrid firefly and particle swarm optimization model which used the ability of PSO to provide fast convergence in exploration (local optima) in the global search while FA is generally used in local search due to its ability in fine-tuning in exploitation (global optima). The model can be summarized in the following steps:
  • Initialize the input parameters of the FA and PSO algorithms.
  • Generate an initial population of npop particles with random positions and velocity on Npipes dimensions in the solution space.
  • Calculate the fitness, fi for each particle, i in the population (i =1, 2. 3. …, npop)
  • Select the social global best, gbest and personal best, pbest particles.
  • Compare each particle’s fitness fi value in the population with gbest in the last iteration (t − 2). If fi < or equal gbest(t − 2) (t > 2, t indicates the iteration number) start local search using FA as given in Equations (9) and (10)
X i t + 1 = X i t + β X i t g b e s t t 2 + α r n 1 2
V i   t + 1 = X i t + 1 X i t
the   attractiveness   β = β o e γ r i j 2   in   which   r i j = d b i j / d m a x
where d b i j is calculated as:
d b i j = k = 1 N p i p e s X i , k t g b e s t k t 2 2
Otherwise, the particle will be handled by PSO. The velocity, Vi and position, Xi of the ith particles are given by Equations (11) and (12) as:
V i , k t + 1 = w V i , k t + c 1 r 1 p b e s t i , k t X i , k t + c 2 r 2 g b e s t k t X i , k t
  V m a x > V i , k t + 1 > V m i n
  X i t + 1 = X i t + V i t + 1
where Vi(t + 1) is the particle velocity in iteration (t + 1), w = 0.90 − t( 0.40 n i t e r ) is the inertia weight. r1 and r2 are random numbers in range of [0,1]. c1 and c2 are the acceleration coefficient, and Vmax is the maximum change of the particle velocity.
6.
Compare fitness, fi for each particle, i in the population with those of gbest and pbest particles. Update gbest for the population and pbest of every particle.
7.
Repeat steps 5 to 6 until the maximum number of iterations, niter is reached.

3.3. Hybrid Firefly-Genetic Algorithm Model (FAGA)

Zervoudakis et al. [12] proposed a hybrid approach (FAGA) based on the firefly algorithm, FA and the genetic algorithm, GA, to combine the advantages of both algorithms for which the procedure is summarized as follows:
  • Generate a random initial population of npop fireflies.
  • Calculate the fitness, fi for each firefly, i in the population (i =1, 2. 3. …, npop)
  • Compare the fitness fi and fj for each of the two fireflies i, j, respectively, (i and j = 1: npop and i ≠ j).
  • Apply genetic crossover for the two fireflies i and j for the case fj < f i according to Equations (13) and (14).
  X i t + 1 = L * X i t + 1 L * X j t
X j t + 1 = L * X j t + 1 L * X i t
L is a vector with continuous uniform distribution with the lower endpoints 0 and upper endpoint (1 + r) where r is a single uniformly distributed random number in the interval (0,1).
L * X i t multiplies arrays L and Xi(t) by multiplying corresponding elements.
On the contrary, if fj > fi, apply the genetic mutation in both fireflies as given in Equations (15) and (16).
  X i , k t + 1 = X i , k t + s i g m a k * R
X j , k t + 1 = X j , k t + s i g m a k * R
where sigma = 0.10 (Dmax − Dmin), k is a vector with n values; n = (mu *  Npipes) and mu is the mutation coefficient which are sampled uniformly at random without replacement, from the integers 1 to npipes, and R is a vector of random n values drawn from the standard normal distribution.
5.
Replace the old solutions for the fireflies i and j with the new ones if they have better finesses.
6.
Repeat steps 3 to 5 until reaching the maximum number of iterations, niter.

3.4. Models Parameters

Setting the values of the parameters for each algorithm is a crucial issue in the optimization process to reach an optimal solution for each of the four tested networks. Several trial runs were carried out for each algorithm to select the most appropriate values of its related parameters. Table 2 shows the final values of the parameters for each algorithm.

4. Application and Results

The optimal solutions for the El-Mostakbal city water distribution network obtained using different optimization algorithms available in the literature are listed in Table 3, showing that the hybrid model FAGA introduced in the present study succeeded in reaching a new optimal solution of 4,923,731.5 L.E. compared to the last available optimal solution of 4,926,560.7 obtained by Abdel-Gawad [29] using the modified Jaya algorithm. The optimal diameters of the network are shown in Table 4.

Performance Evaluation

The performance of the three optimization models applied to the networks considered in the study was assessed according to two stages. The first stage includes a set of different measures, namely, (1) minimum cost, maximum cost, mean and standard deviation columns 1, 2, 3, and 4), respectively; (2) convergence criteria measured by the function evaluation number and the computational time required for performing 1000 evaluations (columns 5 and 6), respectively. The results of the first stage of assessment are shown in Table 5, which clearly illustrates that the FAGA hybrid model has the best values for the minimum and maximum cost, the mean and standard deviation for all networks, which means better search capability in the huge search space (148, 634, 1044 and 1621 for the two-loop, Hanoi, El-Mostakbal and New York networks, respectively). Besides, the values of the number of function evaluations and the computing time for 1000 evaluations are the lowest for all networks compared to FA and FAPSO, which means faster convergence of the hybrid FAGA model towards the optimal global solution. The case study of El-Mostakbal city network optimized by firefly algorithm and the two hybrid models, FAPSO and FAGA is shown in Figure 5 which clearly illustrates the faster convergence of the FAGA model in reaching an optimal solution of 4,923,731.5 LE. at a number of function evaluations of 37,440 compared to 5,966,072.39 L.E. and 4,964,187.63 L.E. for FA and FAPSO, respectively at the same number of function evaluations.
In the second stage of performance evaluation, the performance of the firefly algorithm and the two hybrid models, FAPSO and FAGA, is assessed using the success rate, Sr, estimated by the fuzzy logic concept. The success rate has been first introduced by Mora-Melia et al. [38] as a measure of the quality and convergence of an optimization algorithm. Quality refers to the ability of an algorithm to obtain the maximum number of good solutions as a ratio to the total number of simulations performed. In the present study, the success rate is utilized as a measure of an algorithm to obtain the maximum number of good solutions (near-optimal solutions) for the prespecified total number of simulations. An optimization error C is defined as the limit of exceedance of the good solution beyond the optimal solution of the network. Values of C considered in this study were 0, 0.01 and 0.02. The success rate is then evaluated using the fuzzy logic concept first introduced by Cullinane et al. [39] and later used by El-Ghandour et al. [40] to determine the nodal hydraulic availability indices. The following steps describe the procedure of the fuzzy logic method:
  • Determine the known optimal solution f(x*) for the pipe networks (two-loop, 419,000, Hanoi, 6.081 × 106 and New York, 38,637,600). If the known optimal solution is not available, f(x*) is replaced with the best-known optimal solution (EL-Mostakbal, 4,923,731.5 obtained from the present study).
  • The robustness of the optimization algorithm is measured by accepting optimal solutions f x m a x slightly greater than the known optimal solution f(x*) such that f x m a x = 1 + C * f x * where C = 0, 0.01 and 0.02.
  • Run each of the three optimization algorithms considered in this study, FA, FAPSO and FAGA, 20 times for each of the four networks and denote the objective function at the termination point, f x o p t i , i = 1, 2, 3, …,20.
  • Estimate the Acceptance Index AIi as given in Equation (17) using the principles of fuzzy logic [39]. Values of optimization error, C = 0, 0.01, and 0.02, are assumed to be acceptable. Zero value of C means a tenuous relationship between AIi and f x o p t i . At the same time, the second and third values of C denote continuous function (S-shape fuzzy membership function) to simulate the relationship between the Acceptance index, AIi and f x o p t i . As given in Equation (17), it is clear that AIi takes a value equal to 1 if f x o p t i = f x * and value between 1 and zero if 1 + C * f x * > f x o p t i > f x * while it takes value of zero if f x o p t i more than or equal 1 + C * f x * .
A I i = 0   i f   f x o p t i > f x m a x 2 f x o p t i 1 + C × f x * C × f x * 2 i f   1 + C 2 × f x * < f x o p t i < 1 + C × f x * 1 2 f x o p t i f x * C × f x * 2   i f   f x * < f x o p t i < 1 + C 2 × f x * 1   i f   f x o p t i = f x *
Estimate the success rate Sr as:
S r = 100 * i = 1 20 A I i   / 20
The results of the success rate obtained using the proposed algorithms for the different networks are shown in Table 6 which clearly illustrates the effectiveness and quality of the FAGA hybrid model as the values of the success rate are remarkably higher than the corresponding values for the traditional FA and hybrid FAPSO models for all networks especially EL-Mostakbal network considering the prespecified limits of the optimization error C.
Estimation of the acceptance index AI (Equation (17)) is based mainly on obtaining an optimal solution f x o p t i greater than the known optimal solution of the network by a value of optimization error C = 0, 0.01, and 0.02. For C = 0, only the runs providing optimal solutions f x * are accepted and take the value of AI = 1, while C = 0.01 and 0.02 only runs giving optimal solutions equal or greater than the optimal solution by about C take values of AI = (0,1). Figure 6 shows the continuous function (S-shape fuzzy logic) for the relationship between acceptance index and cost ratio f x o p t i / f x * . Table 7 illustrates the procedure of calculating the success rate Sr (Equation (18)) for the El-Mostakbal city network by performing 20 runs and considering the different values of C. The values of the acceptance index AI of FAGA for the El-Mostakbal city network (twenty runs—different values of optimization error C) are given in Table 7. The values of Sr are also calculated and given in the table.

5. Conclusions

The present research introduced two hybrid models, firefly-particle swarm optimization (FAPSO) and firefly-genetic algorithm (FAGA), to enhance the performance of the standard firefly algorithm (FA). The proposed models were tested through application to the three well-known benchmark networks of known optimal solutions, namely, two-loop, Hanoi and New York, and also to the real large-scale case study of El-Mostakbal city network, Egypt, of the unknown optimal solution obtained yet. The results revealed that the proposed FAGA model was able to reach the known optimal solutions of 419,000 cost units, 6.081 × 106 $ and 38,637,600 $ for the benchmark networks, respectively. For the real case study of the El-Mostakbal city network, the FAGA model succeeded in reaching a new optimal solution of 4,923,731.5 L.E. compared to the last optimal cost of 4,926,560.7 L.E. available in the literature. Additionally, performance evaluation of the proposed algorithms in terms of function evaluation number, computational time, selected related cost measures, namely, minimum, maximum, mean and standard deviation and finally, success rate, revealed that FAGA, when compared to the standard FA and the hybrid model FAPSO had a better search capability in huge solution spaces, faster convergence towards an optimal solution, balancing between exploration and exploitation phases, the higher capability of finding the optimal solution. Finally, it can be concluded that the FAGA hybrid optimization algorithm is a very promising optimization tool and has an attractive ability to efficiently handle pipe network optimization problems. For future studies, it is recommended that the model be applied to multi-objective pipe network optimization.

Author Contributions

Conceptualization, R.E. and S.E.; methodology, R.E. and S.E.; software, R.E. and S.E.; validation R.E., S.E., K.P.-U. and M.Z.; formal analysis, R.E., S.E. and H.F.A.-E.; investigation, R.E., S.E. and M.Z.; resources, R.E. and S.E.; data curation, R.E. and S.E.; writing—original draft preparation, R.E. and S.E.; writing—review and editing, R.E., S.E., M.Z., K.P.-U. and H.F.A.-E.; visualization, R.E. and S.E.; supervision, M.Z., K.P.-U. and H.F.A.-E. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data are not publicly available due to institutional property rights.

Acknowledgments

This work was supported by the Slovak Research and Development Agency under contract no. APVV-20-0281. This work was supported by project HUSKROUA/1901/8.1/0088, Complex flood-control strategy on the Upper-Tisza catchment area.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Mala-Jetmarova, H.; Sultanova, N.; Savic, D. Lost in Optimization of Water Distribution Systems? A Literature Review of System Design. Water 2018, 10, 307. [Google Scholar] [CrossRef]
  2. Kumar, V.; Yadav, S.M. A state-of-the-Art review of heuristic and metaheuristic optimization techniques for the management of water resources. Water Supply 2022, 22, 3702–3728. [Google Scholar] [CrossRef]
  3. Holland, J.H. Adaptation in Natural and Artificial Systems; University of Michigan Press: Ann Arbor, MI, USA, 1975. [Google Scholar]
  4. Reca, J.; Martinez, J.; Lopez, R. A hybrid water distribution networks design optimization method based on a search space reduction approach and a genetic algorithm. Water 2017, 9, 845. [Google Scholar] [CrossRef]
  5. Sangroula, U.; Han, K.-H.; Koo, K.-M.; Gnawali, K.; Yum, K.-T. Optimization of water distribution networks using genetic algorithm based SOP–WDN program. Water 2022, 14, 851. [Google Scholar] [CrossRef]
  6. Eberhart, R.; Kennedy, J. A New Optimizer Using Particle Swarm Theory. In Proceedings of the 6th International Symposium on Micro Machine and Human Science; MHS’95, Nagoya, Japan, 4–6 October 1995. [Google Scholar]
  7. Sampathkumar, K.; Ramasamy, S.; Ramasubbu, B.; Karuppanan, S.; Lakshminarayanan, B. Hybrid optimization model for conjunctive use of surface and groundwater resources in water deficit irrigation system. Water Sci. Technol. 2021, 84, 3055–3071. [Google Scholar] [CrossRef]
  8. Si, B.; Tian, Z.; Chen, W.; Jin, X.; Zhou, X.; Shi, X. Performance assessment of algorithms for building energy optimization problems with different properties. Sustainability 2019, 11, 18. [Google Scholar] [CrossRef]
  9. Macedo, J.E.S.; Azevedo, J.R.G.; Bezzerra, S.T.M. Hybrid particle swarm optimization and tabu search for the design of large-scale water distribution networks. Braz. J. Water Resour. Porto Alegre 2021, 26, e11. [Google Scholar] [CrossRef]
  10. Gu, J.; Sun, Z.; Tang, H.; Jia, X.; Wang, S.; Yan, X.; Ye, G.; Wu, G. Hybrid optimization algorithm of particle swarm optimization and cuckoo search for preventive maintenance period optimization. Discret. Dyn. Nat. Soc. Hindawy 2016, 2016, 1–12. [Google Scholar] [CrossRef]
  11. El-Shorbagy, M.; Refaey, A. Hybridization of grasshopper optimization Algorithm with genetic algorithm for solving system of non-linear equation. IEEE Access 2020, 8, 220944–220961. [Google Scholar] [CrossRef]
  12. Zervoudakis, K.; Tsafarakis, S.; Paraskevi-Panagiota, S. A New Hybrid Firefly-Genetic Algorithm for the Optimal Product Line Design Problem; Springer Nature: Cham, Switzerland, 2020. [Google Scholar]
  13. Abdullah, A.; Deris, S.; Mohamed, M.; Hashim, S. A New Hybrid Firefly Algorithm for Complex and Nonlinear Problem. In Distributed Computing and Artificial Intelligence; Springer: Berlin/Heidelberg, Germany, 2012. [Google Scholar]
  14. Tahershamsi, A.; Kaveh, A.; Sheikholeslami, R.; Azad, S. An improved firefly with harmony search for optimization of water distribution systems. Sci. Iran. 2014, 21, 1591–1607. [Google Scholar]
  15. Gu, L.; Wang, G.; Wang, H.; Wang, D. An effective hybrid firefly algorithm with harmony search for global numerical optimization. Sci. World J. 2013, 2013, 125625. [Google Scholar] [CrossRef] [PubMed]
  16. Kora, P.; Krishna, K. Hybrid Firefly and Particle Swarm Optimization Algorithm for the Detection of Bundle Branch Block. Int. J. Cardiovasc. Acad. 2016, 2, 44–48. [Google Scholar] [CrossRef]
  17. Elkhechafi, M.; Hachemi, H.; Elkettani, Y. A new hybrid firefly with genetic algorithm for global optimization. Int. J. Manag. Appl. Sci. 2017, 3, 47–51. [Google Scholar]
  18. Aydilek, I.B. A hybrid firefly and particle swarm optimization algorithm for computationally expensive numerical problems. Appl. Soft Comput. 2018, 66, 232–249. [Google Scholar] [CrossRef]
  19. Nhu, V.; Ngo, P.; Pham, T.; Dou, J.; Song, X.; Hoang, N.; Tran, D.; Cao, D.; Aydilek, I.; Amiri, M.; et al. A new hybrid firefly–PSO optimized random subspace tree intelligence for torrential rainfall-induced flash flood susceptible mapping. Remote Sens. 2020, 12, 2688. [Google Scholar] [CrossRef]
  20. Khan, A.; Hizam, H.; Wahab, I.; Othman, M. Optimal power flow using hybrid firefly and particle swarm optimization algorithm. PLoS ONE 2020, 15, e0235668. [Google Scholar] [CrossRef]
  21. Yadav, H.; Chhikara, R.; Kumari, C. Hybrid model using firefly and BBO for feature selection in software production. Recent Adv. Comput. Sci. Commun. 2021, 14, 2754–2760. [Google Scholar] [CrossRef]
  22. Wahid, F.; Ghazali, R. A hybrid approach of firefly and genetic algorithm for solving optimisation problems. Int. J. Comput. Aided Eng. Technol. 2021, 14, 2754–2760. [Google Scholar] [CrossRef]
  23. Bilal; Pant, M. Parameter Optimization of Water distribution networks-A hybrid metaheuristic approach. Mater. Manuf. Process. 2020, 35, 737–749. [Google Scholar] [CrossRef]
  24. Ezzeldin, R.; Djebedjian, B. Optimal design of water distribution networks using whale optimization algorithm. Urban Water J. 2020, 17, 14–22. [Google Scholar] [CrossRef]
  25. Alperovits, E.; Shamir, U. Design of optimal water distribution systems. Water Resour. Res. 1997, 13, 885–900. [Google Scholar] [CrossRef]
  26. Fujiwara, O.; Khang, D.B. A two-phase decomposition method for optimal design of looped water distribution networks. Water Resour. Res. 1990, 26, 539–549. [Google Scholar] [CrossRef]
  27. Schaake, J.C.; Lai, D. Linear Programming and Dynamic Programming Applications to Water Distribution Network Design; Report 116; Hydrodynamics Laboratory, Department of Civil Engineering: Cambridge, MA, USA, 1969. [Google Scholar]
  28. Rayan, M.A.; Djebedjian, B.; Gad El-Hak, N.; Herric, A. Optimization of Potable Water Network (Case Study). In Proceedings of the 7th International Water Technology Conference (IWTC7), Alexandria, Egypt, 1–3 April 2003. [Google Scholar]
  29. Abdel-Gawad, H. Modified jaya algorithm for optimal design of water distribution networks. MEJ. Mansoura Eng. J. 2021, 46, 38–54. [Google Scholar] [CrossRef]
  30. El-Ghandour, H.; Elbeltagi, E. Comparison of five evolutionary algorithms for optimization of water distribution networks. J. Comput. Civ. Eng. ASCE 2018, 32, 04017066. [Google Scholar] [CrossRef]
  31. Yang, X.S. Firefly Algorithms for Multimodal Optimization; Watanabe, O., Zeugmann, T., Eds.; Springer: Berlin/Heidelberg, Germany, 2009. [Google Scholar]
  32. Li, Y.; Zhao, Y.; Shang, Y.; Liu, J. An improved firefly algorithm with dynamic self-adaptive adjustment. PLoS ONE 2021, 16, e0255951. [Google Scholar] [CrossRef] [PubMed]
  33. Kazemzadeh-Parsi, M.J.; Daneshmand, F.; Ahmadfard, M.A.; Adamowski, J. Optimal remediation design of unconfined contaminated aquifers based on the finite element method and a modified firefly algorithm. Water Resour. Manag. 2015, 29, 2895–2912. [Google Scholar] [CrossRef]
  34. Kazemzadeh-Parsi, M.J.; Daneshmand, F.; Ahmadfard, M.A.; Adamowski, J.; Martel, R. Optimal groundwater remediation design of pump and treat systems via a simulation-optimization approach and firefly algorithm. Eng. Optim. 2015, 47, 1–17. [Google Scholar] [CrossRef]
  35. Riza, L.S.; Munir, J.K.; Hays, R.N.; Sidarto, K.A. Determining the pressure distribution on water pipeline networks. In Proceedings of the 7th International Conference on Intelligent Systems, Modeling and Simulation, Bangkok, Thailand, 25–27 January 2016. [Google Scholar]
  36. Garousi-Nejad, I.; Bozorg-Haddad, O.; Loaiciga, H.A.; Marino, M.A. Application of the firefly algorithm to optimal operation of reservoirs with the purpose of irrigation supply and hydropower production. J. Irrig. Drain. Eng. 2016, 142, 04016041. [Google Scholar] [CrossRef]
  37. Yarpiz. Firefly Algorithm (FA), MATLAB Central File Exchange. Available online: https://www.mathworks.com/matlabcentral/fileexchange/52900-firefly-algorithm-fa (accessed on 14 October 2022).
  38. Mora-Melia, D.; Iglesias-Ray, P.L.; Martinez-Solano, F.J.; Ballesteros-Perez, P. Efficiency of evolutionary algorithms in water networks pipe sizing. Water Resour. Manag. 2015, 29, 4817–4831. [Google Scholar] [CrossRef]
  39. Cullinane, M.; Lancy, K.; Mays, L. Optimization-availability-based design of water-distribution networks. J. Hydraul. Eng. 1992, 118, 420–441. [Google Scholar] [CrossRef]
  40. El-Ghandour, H.; Elabd, S.; Elbeltagi, E. Assessment of optimal water distribution systems design under steady-state and transient conditions due to pipe roughness uncertainty. Ain Shams Eng. J. 2021, 12, 465–473. [Google Scholar] [CrossRef]
Figure 1. Two-loop network.
Figure 1. Two-loop network.
Water 15 01906 g001
Figure 2. Hanoi city network, Vietnam.
Figure 2. Hanoi city network, Vietnam.
Water 15 01906 g002
Figure 3. New York City water supply system.
Figure 3. New York City water supply system.
Water 15 01906 g003
Figure 4. El-Mostakbal city network, Ismailia, Egypt [28].
Figure 4. El-Mostakbal city network, Ismailia, Egypt [28].
Water 15 01906 g004
Figure 5. Convolution of the cost with the number of functions evaluations for El-Mostakbal city network.
Figure 5. Convolution of the cost with the number of functions evaluations for El-Mostakbal city network.
Water 15 01906 g005
Figure 6. S-shape fuzzy logic relationship of acceptance index and cost ratio.
Figure 6. S-shape fuzzy logic relationship of acceptance index and cost ratio.
Water 15 01906 g006
Table 1. Different hybrid firefly optimization algorithms.
Table 1. Different hybrid firefly optimization algorithms.
Author’sHybrid Firefly ModelCase Study
Zervoudakis et al. (2020) [12]Firefly and Genetic
Algorithm
Product Line Design Problem
Abdullah et al. (2012) [13]Firefly-Differential Evolution (HEFA)Complex and Nonlinear Problems
Tahershamsi et al. (2014) [14]Firefly-Harmoni SearchOptimization of Water
Distribution Systems
Gu et al. (2013) [15]Firefly and Harmony SearchGlobal Numerical
Optimization
Kora and Krishna (2016) [16]Firefly and Particle Swarm OptimizationDetection of Bundle Branch Block
Elkhechafi et al. (2017) [17]Firefly- Genetic AlgorithmGlobal Optimization
Aydilek (2018) [18]Firefly-Particle Swarm
Optimization
Computationally Expensive Numerical Problems
Nhu et al. (2020) [19]Firefly-Particle Swarm
Optimization
Rainfall induced Flash Floods
Khan et al. (2020) [20]Firefly-Particle Swarm OptimizationStandard IEEE 30-Bus Test System
Yadav et al. (2021) [21]Firefly and Biogeography-Base OptimizationSoftware Production Line
Wahid and Ghazali (2021) [22]Firefly and Genetic
Algorithm
Minimization and
Maximization Functions
Bilal and Millie Pant (2020)
[23]
Firefly and Particle Swarm
Optimization
Optimization of Water Distribution Systems
Table 2. Values of the parameters for the models FA, FAPSO and FAGA.
Table 2. Values of the parameters for the models FA, FAPSO and FAGA.
ModelParameterPipe Network
Two-LoopHanoiNew YorkEl-Mostakbal
FAniter1000100010001000
npop10404040
Γ1111
β02222
α00.20.20.20.2
FAPSOniter130150200150
npop70350200400
c111.491.491.49
c21.11.491.11.49
Γ1111
β02222
A0.20.20.20.2
FAGAniter1000100010001000
npop10404040
Mu0.150.150.10.2
Table 3. Optimal cost for El-Mostakbal city network using different optimization algorithms.
Table 3. Optimal cost for El-Mostakbal city network using different optimization algorithms.
Author’sOptimization TechniqueOptimal Cost
Rayan et al. (2003) [28]SUMT6,770,787
El-Ghandour and El-Beltagi (2018) [30]GA5,268,431
PSO4,968,881.5
ACO5,484,596
MA5,055,519
SFLA5,181,846
Ezzeldin and Djebedjian (2020) [24]WOA4,932,467.1
Abdel-Gawad (2021) [29]FSAJA4,926,560.7
Present StudyFA5,676,331.79
FAPSO4,932,901
FAGA4,923,731.5
Note(s): SUMT (Sequential Unconstrained Minimization Technique), GA (Genetic Algorithm), PSO (Particle Swarm Optimization), ACO (Ant Colony Optimization), MA (Memetic Algorithm), WOA (Whale Optimization Algorithm), FSAJA (Free Sensitivity Analysis Jaya Algorithm), FA (Firefly Algorithm), FAPSO (Hybrid Firefly-Particle Swarm Optimization), FAGA (Hybrid Firefly-Genetic Algorithm).
Table 4. Optimal pipe diameters of El-Mostakbal city network.
Table 4. Optimal pipe diameters of El-Mostakbal city network.
Pipe Number (Optimal Diameter, mm.)
1 (600)2 (500)3 (500)4 (500)5 (150)6 (150)
7 (150)8 (150)9 (150)10 (150)11 (500)12 (500)
13 (150)14 (150)15 (150)16 (150)17 (150)18 (150)
19 (150)20 (500)21 (150)22 (150)23 (150)24 (150)
25 (150)26 (400)27 (400)28 (250)29 (150)30 (150)
31 (150)32 (150)33 (200)34 (150)35 (250)36 (300)
37 (150)38 (250)39 (250)40 (200)41 (150)42 (150)
43 (150)44 (200)
Table 5. Performance evaluation according to the first stage of assessment.
Table 5. Performance evaluation according to the first stage of assessment.
NetworkOptimization
Algorithm
(1)(2)(3)(4)(5)(6)
Min. CostMax. CostMeanStandard. DeviationF.E.N.Sec Per
1000 Eval
Two-LoopFA419,000441,000425,1508317.86620588.8
FAPSO419,000453,000435,70011,388.36259685.3
FAGA419,000420,000419,160370.33238082
HanoiFA6,566,082.818,307,245.897,402,370.25524,647.6252,24991.8
FAPSO6,195,529.3469,044,904.16,507,346.32208,328.43102,96088.3
FAGA6,087,729.576,375,686.76,252,830.1679,998.337,41082
New YorkFA38,637,60062,390,579.744,093,383.995,396,845.1722,33591
FAPSO38,637,60061,551,40040,393,718.255,139,391.0213,91689.2
FAGA38,637,60038,796,30038,662,99258,771.06912088.1
El-MostakbalFA5,676,331.796,263,583.15,913,233.06170,902.6455,21694.3
FAPSO4,932,9015,214,8385,046,771.692,426.2158,84290.5
FAGA4,923,731.55,025,247.34,949,974.3735,382.6637,44088
Table 6. Success rates using the proposed optimization algorithms.
Table 6. Success rates using the proposed optimization algorithms.
NetworkOptimization AlgorithmSuccess Rate (Sr %)
C = 0C = 0.01C = 0.02
Two-loopFA2556.0160.65
FAPSO151516.69
FAGA8498.1899.54
HanoiFA000
FAPSO000.1314
FAGA27.510.73
New YorkFA58.3113.03
FAPSO555
FAGA8494.698.65
El-MostakbalFA000
FAPSO011.3929.31
FAGA40 *66.8977.1
Table 7. Estimation of success rate (Sr%) of FAGA optimization model for El-Mostakbal City network.
Table 7. Estimation of success rate (Sr%) of FAGA optimization model for El-Mostakbal City network.
Run No.Acceptance Index (AI)Run No.Acceptance Index (AI)
C = 0.00C = 0.01C = 0.02C = 0.00C = 0.01C = 0.02
11111100.6870.922
21111200.6870.922
31111300.6870.922
41111400.6870.922
51111500.6870.922
61111600.2470.790
711117000.091
811118000.004
900.8790.97019000.002
1000.8190.95520000
* Sr = (13.38/20) × 100 = 40%.8.0013.3815.42
Sr %40.0 *66.9077.10
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Ezzeldin, R.; Zelenakova, M.; Abd-Elhamid, H.F.; Pietrucha-Urbanik, K.; Elabd, S. Hybrid Optimization Algorithms of Firefly with GA and PSO for the Optimal Design of Water Distribution Networks. Water 2023, 15, 1906. https://doi.org/10.3390/w15101906

AMA Style

Ezzeldin R, Zelenakova M, Abd-Elhamid HF, Pietrucha-Urbanik K, Elabd S. Hybrid Optimization Algorithms of Firefly with GA and PSO for the Optimal Design of Water Distribution Networks. Water. 2023; 15(10):1906. https://doi.org/10.3390/w15101906

Chicago/Turabian Style

Ezzeldin, Riham, Martina Zelenakova, Hany F. Abd-Elhamid, Katarzyna Pietrucha-Urbanik, and Samer Elabd. 2023. "Hybrid Optimization Algorithms of Firefly with GA and PSO for the Optimal Design of Water Distribution Networks" Water 15, no. 10: 1906. https://doi.org/10.3390/w15101906

APA Style

Ezzeldin, R., Zelenakova, M., Abd-Elhamid, H. F., Pietrucha-Urbanik, K., & Elabd, S. (2023). Hybrid Optimization Algorithms of Firefly with GA and PSO for the Optimal Design of Water Distribution Networks. Water, 15(10), 1906. https://doi.org/10.3390/w15101906

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop