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

^{1}

^{2}

^{3}

^{4}

^{5}

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Materials and Methods

#### 2.1. Formulation of Pipe Networks Optimization

#### 2.1.1. Total Pipe Cost

_{T}is the total construction cost of the network, N

_{pipes}is the number of pipes, c

_{i}(D

_{i}) is the cost of pipe i of discrete diameter D

_{i}per unit length, and L

_{i}is the length of pipe i.

#### 2.1.2. Objective Function

_{p}is the penalty cost = ${P}_{C}\sum _{j=1}^{{N}_{nodes}}\left({H}_{j,min}-{H}_{j}\right),{P}_{C}$ is the penalty cost coefficient taken equal to 10,000, H

_{j,min}is the minimum allowable head at node j, H

_{j}is the head at node j and N

_{nodes}is the number of nodes in the pipe network.

#### 2.1.3. Hydraulic Constraints

_{j}is the discharge at node j.

_{f}is head loss due to friction in pipe calculated using Hazen–Williams formula given by ${h}_{f}=\frac{10,674*{L}_{i}*{Q}_{i}^{1.852}}{{C}_{i}^{1.852}*{D}_{i}^{4.87}}$; C

_{i}is the Hazen–Williams Coefficient, Q

_{i}is the discharge in pipe i and 𝐸

_{𝑝}is the energy supplied by a pump.

_{min}, D

_{max}are the minimum and maximum commercially available pipe diameters, respectively.

#### 2.2. Benchmark Networks

^{6}$, 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 14

^{8}possible solutions for the network design.

^{34}possible network designs.

^{21}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).

#### 2.3. Real Case Study of El-Mostakbal City Network

^{44}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

#### 3.1. Formulation of Firefly Algorithm (FA)

- Initialize the input parameters for FA.
- Generate an initial population of n
_{pop}fireflies for the dimension of N_{pipes.} - The total construction cost of the network, C
_{T}and the corresponding constraint for each firefly is evaluated using the simulation model. - The fitness of each firefly, f
_{i}, i = 1, 2, 3, …, n_{pop}(the summation of total construction cost and penalty due to the constraints violation [Equation (2)]) is computed. - Compare the finesses f
_{i}and f_{j}for each of the two fireflies i and j, respectively, (i and j = 1: n_{pop}and i ≠ j). - If f
_{i}> f_{j}, firefly i moves towards firefly j. Update the position of firefly i, X_{i}(t) according to Equation (7) and calculate its fitness f′_{i}at the new position, X_{i}(t + 1).

_{0}= coefficient base value at r = 0, γ = light absorption coefficient and ${r}_{i,j}$ calculated as:

_{ij}is the distance between any two fireflies i and j which can be determined by the cartesian distance in the form:

^{th}component of the spatial coordinate X

_{i}of i

^{th}firefly, D

_{min}and D

_{max}are vectors of the minimum and maximum allowable diameters, r

_{n}is a vector with uniformly distributed random numbers, Δ = 0.05 (D

_{max}− D

_{min}) is the uniform mutation range, R

_{n}is a vector with continuous uniform distribution with the lower endpoints-1 and upper endpoint 1 and ${\alpha}_{1}\left(t\right)={\alpha}_{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}< f_{i}replace the position of the firefly i, X_{i}(t) with the updated one, X_{i}(t + 1) otherwise keep the old position of the firefly i. - 8.
- Repeat Steps 5 to 7 until the maximum number of iterations, n
_{iter}is reached. - 9.
- Rank the fireflies and find the current best solution.

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

- Initialize the input parameters of the FA and PSO algorithms.
- Generate an initial population of n
_{pop}particles with random positions and velocity on N_{pipes}dimensions in the solution space. - Calculate the fitness, f
_{i}for each particle, i in the population (i =1, 2. 3. …, n_{pop}) - Select the social global best, gbest and personal best, pbest particles.
- Compare each particle’s fitness f
_{i}value in the population with gbest in the last iteration (t − 2). If f_{i}< or equal gbest(t − 2) (t > 2, t indicates the iteration number) start local search using FA as given in Equations (9) and (10)

_{i}and position, X

_{i}of the i

^{th}particles are given by Equations (11) and (12) as:

_{i}(t + 1) is the particle velocity in iteration (t + 1), w = 0.90 − t($\frac{0.40}{{n}_{iter}})$ is the inertia weight. r

_{1}and r

_{2}are random numbers in range of [0,1]. c

_{1}and c

_{2}are the acceleration coefficient, and V

_{max}is the maximum change of the particle velocity.

- 6.
- Compare fitness, f
_{i}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, n
_{iter}is reached.

#### 3.3. Hybrid Firefly-Genetic Algorithm Model (FAGA)

- Generate a random initial population of n
_{pop}fireflies. - Calculate the fitness, f
_{i}for each firefly, i in the population (i =1, 2. 3. …, n_{pop}) - Compare the fitness f
_{i}and f_{j}for each of the two fireflies i, j, respectively, (i and j = 1: n_{pop}and i ≠ j). - Apply genetic crossover for the two fireflies i and j for the case f
_{j}< f_{i}according to Equations (13) and (14).

_{i}(t) by multiplying corresponding elements.

_{j}> f

_{i}, apply the genetic mutation in both fireflies as given in Equations (15) and (16).

_{max}− D

_{min}), k is a vector with n values; n = (mu $*$ N

_{pipes}) and mu is the mutation coefficient which are sampled uniformly at random without replacement, from the integers 1 to n

_{pipes}, 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, n
_{iter}.

#### 3.4. Models Parameters

## 4. Application and Results

#### Performance Evaluation

^{8}, 6

^{34}, 10

^{44}and 16

^{21}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.

- Determine the known optimal solution f(x*) for the pipe networks (two-loop, 419,000, Hanoi, 6.081 × 10
^{6}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{\left(x\right)}_{max}$ slightly greater than the known optimal solution f(x*) such that $f{\left(x\right)}_{max}=\left(1+C\right)*f\left({x}^{*}\right)$ 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{\left({x}_{opt}\right)}_{i}$, i = 1, 2, 3, …,20.
- Estimate the Acceptance Index AI
_{i}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 AI_{i}and $f{\left({x}_{opt}\right)}_{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, AI_{i}and $f{\left({x}_{opt}\right)}_{i}$. As given in Equation (17), it is clear that AI_{i}takes a value equal to 1 if $f{\left({x}_{opt}\right)}_{i}=f\left({x}^{*}\right)$ and value between 1 and zero if $\left(1+C\right)*f\left({x}^{*}\right)>f{\left({x}_{opt}\right)}_{i}>f\left({x}^{*}\right)$ while it takes value of zero if $f{\left({x}_{opt}\right)}_{i}$ more than or equal $\left(1+C\right)*f\left({x}^{*}\right)$.

## 5. Conclusions

^{6}$ 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

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## References

- 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] - 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] - Holland, J.H. Adaptation in Natural and Artificial Systems; University of Michigan Press: Ann Arbor, MI, USA, 1975. [Google Scholar]
- 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] - 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] - 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]
- 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] - 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] - 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] - 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] - 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] - 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]
- 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]
- 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] - 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] - 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] - 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] - 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] - 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] - 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] - 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] - 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] - Bilal; Pant, M. Parameter Optimization of Water distribution networks-A hybrid metaheuristic approach. Mater. Manuf. Process.
**2020**, 35, 737–749. [Google Scholar] [CrossRef] - Ezzeldin, R.; Djebedjian, B. Optimal design of water distribution networks using whale optimization algorithm. Urban Water J.
**2020**, 17, 14–22. [Google Scholar] [CrossRef] - Alperovits, E.; Shamir, U. Design of optimal water distribution systems. Water Resour. Res.
**1997**, 13, 885–900. [Google Scholar] [CrossRef] - 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] - 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]
- 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]
- Abdel-Gawad, H. Modified jaya algorithm for optimal design of water distribution networks. MEJ. Mansoura Eng. J.
**2021**, 46, 38–54. [Google Scholar] [CrossRef] - 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] - Yang, X.S. Firefly Algorithms for Multimodal Optimization; Watanabe, O., Zeugmann, T., Eds.; Springer: Berlin/Heidelberg, Germany, 2009. [Google Scholar]
- 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] - 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] - 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] - 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]
- 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] - 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).
- 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] - Cullinane, M.; Lancy, K.; Mays, L. Optimization-availability-based design of water-distribution networks. J. Hydraul. Eng.
**1992**, 118, 420–441. [Google Scholar] [CrossRef] - 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 4.**El-Mostakbal city network, Ismailia, Egypt [28].

**Figure 5.**Convolution of the cost with the number of functions evaluations for El-Mostakbal city network.

Author’s | Hybrid Firefly Model | Case 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 Search | Optimization of Water Distribution Systems |

Gu et al. (2013) [15] | Firefly and Harmony Search | Global Numerical Optimization |

Kora and Krishna (2016) [16] | Firefly and Particle Swarm Optimization | Detection of Bundle Branch Block |

Elkhechafi et al. (2017) [17] | Firefly- Genetic Algorithm | Global 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 Optimization | Standard IEEE 30-Bus Test System |

Yadav et al. (2021) [21] | Firefly and Biogeography-Base Optimization | Software 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 |

Model | Parameter | Pipe Network | |||
---|---|---|---|---|---|

Two-Loop | Hanoi | New York | El-Mostakbal | ||

FA | n_{iter} | 1000 | 1000 | 1000 | 1000 |

n_{pop} | 10 | 40 | 40 | 40 | |

Γ | 1 | 1 | 1 | 1 | |

β_{0} | 2 | 2 | 2 | 2 | |

α_{0} | 0.2 | 0.2 | 0.2 | 0.2 | |

FAPSO | n_{iter} | 130 | 150 | 200 | 150 |

n_{pop} | 70 | 350 | 200 | 400 | |

c_{1} | 1 | 1.49 | 1.49 | 1.49 | |

c_{2} | 1.1 | 1.49 | 1.1 | 1.49 | |

Γ | 1 | 1 | 1 | 1 | |

β_{0} | 2 | 2 | 2 | 2 | |

A | 0.2 | 0.2 | 0.2 | 0.2 | |

FAGA | n_{iter} | 1000 | 1000 | 1000 | 1000 |

n_{pop} | 10 | 40 | 40 | 40 | |

Mu | 0.15 | 0.15 | 0.1 | 0.2 |

Author’s | Optimization Technique | Optimal Cost |
---|---|---|

Rayan et al. (2003) [28] | SUMT | 6,770,787 |

El-Ghandour and El-Beltagi (2018) [30] | GA | 5,268,431 |

PSO | 4,968,881.5 | |

ACO | 5,484,596 | |

MA | 5,055,519 | |

SFLA | 5,181,846 | |

Ezzeldin and Djebedjian (2020) [24] | WOA | 4,932,467.1 |

Abdel-Gawad (2021) [29] | FSAJA | 4,926,560.7 |

Present Study | FA | 5,676,331.79 |

FAPSO | 4,932,901 | |

FAGA | 4,923,731.5 |

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) |

Network | Optimization Algorithm | (1) | (2) | (3) | (4) | (5) | (6) |
---|---|---|---|---|---|---|---|

Min. Cost | Max. Cost | Mean | Standard. Deviation | F.E.N. | Sec Per 1000 Eval | ||

Two-Loop | FA | 419,000 | 441,000 | 425,150 | 8317.86 | 6205 | 88.8 |

FAPSO | 419,000 | 453,000 | 435,700 | 11,388.36 | 2596 | 85.3 | |

FAGA | 419,000 | 420,000 | 419,160 | 370.33 | 2380 | 82 | |

Hanoi | FA | 6,566,082.81 | 8,307,245.89 | 7,402,370.25 | 524,647.62 | 52,249 | 91.8 |

FAPSO | 6,195,529.34 | 69,044,904.1 | 6,507,346.32 | 208,328.43 | 102,960 | 88.3 | |

FAGA | 6,087,729.57 | 6,375,686.7 | 6,252,830.16 | 79,998.3 | 37,410 | 82 | |

New York | FA | 38,637,600 | 62,390,579.7 | 44,093,383.99 | 5,396,845.17 | 22,335 | 91 |

FAPSO | 38,637,600 | 61,551,400 | 40,393,718.25 | 5,139,391.02 | 13,916 | 89.2 | |

FAGA | 38,637,600 | 38,796,300 | 38,662,992 | 58,771.06 | 9120 | 88.1 | |

El-Mostakbal | FA | 5,676,331.79 | 6,263,583.1 | 5,913,233.06 | 170,902.64 | 55,216 | 94.3 |

FAPSO | 4,932,901 | 5,214,838 | 5,046,771.6 | 92,426.21 | 58,842 | 90.5 | |

FAGA | 4,923,731.5 | 5,025,247.3 | 4,949,974.37 | 35,382.66 | 37,440 | 88 |

Network | Optimization Algorithm | Success Rate (Sr %) | ||
---|---|---|---|---|

C = 0 | C = 0.01 | C = 0.02 | ||

Two-loop | FA | 25 | 56.01 | 60.65 |

FAPSO | 15 | 15 | 16.69 | |

FAGA | 84 | 98.18 | 99.54 | |

Hanoi | FA | 0 | 0 | 0 |

FAPSO | 0 | 0 | 0.1314 | |

FAGA | 2 | 7.5 | 10.73 | |

New York | FA | 5 | 8.31 | 13.03 |

FAPSO | 5 | 5 | 5 | |

FAGA | 84 | 94.6 | 98.65 | |

El-Mostakbal | FA | 0 | 0 | 0 |

FAPSO | 0 | 11.39 | 29.31 | |

FAGA | 40 * | 66.89 | 77.1 |

**Table 7.**Estimation of success rate (S

_{r}%) of FAGA optimization model for El-Mostakbal City network.

Run No. | Acceptance Index (AI) | Run No. | Acceptance Index (AI) | ||||
---|---|---|---|---|---|---|---|

C = 0.00 | C = 0.01 | C = 0.02 | C = 0.00 | C = 0.01 | C = 0.02 | ||

1 | 1 | 1 | 1 | 11 | 0 | 0.687 | 0.922 |

2 | 1 | 1 | 1 | 12 | 0 | 0.687 | 0.922 |

3 | 1 | 1 | 1 | 13 | 0 | 0.687 | 0.922 |

4 | 1 | 1 | 1 | 14 | 0 | 0.687 | 0.922 |

5 | 1 | 1 | 1 | 15 | 0 | 0.687 | 0.922 |

6 | 1 | 1 | 1 | 16 | 0 | 0.247 | 0.790 |

7 | 1 | 1 | 1 | 17 | 0 | 0 | 0.091 |

8 | 1 | 1 | 1 | 18 | 0 | 0 | 0.004 |

9 | 0 | 0.879 | 0.970 | 19 | 0 | 0 | 0.002 |

10 | 0 | 0.819 | 0.955 | 20 | 0 | 0 | 0 |

* Sr = (13.38/20) × 100 = 40%. | ∑ | 8.00 | 13.38 | 15.42 | |||

Sr % | 40.0 * | 66.90 | 77.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. |

© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## 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