Next Article in Journal
Analysis of Soil Moisture Dynamics and Its Response to Rainfall in the Mu Us Sandy Land
Previous Article in Journal
A Review of Sources, Hazards, and Removal Methods of Microplastics in the Environment
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Comparing the Efficiency of Particle Swarm and Harmony Search Algorithms in Optimizing the Muskingum–Cunge Model

Department of Water Engineering, University of Zabol, Zabol 9861335-856, Iran
*
Author to whom correspondence should be addressed.
Water 2025, 17(1), 104; https://doi.org/10.3390/w17010104
Submission received: 17 August 2024 / Revised: 4 November 2024 / Accepted: 5 November 2024 / Published: 2 January 2025
(This article belongs to the Section Hydrology)

Abstract

:
Climate change-induced alterations in monsoon patterns have exacerbated flooding challenges in Balochistan, Iran. This study addresses the urgent need for improved flood prediction methodologies in data-scarce arid regions by integrating the Muskingum–Cunge model with advanced optimization techniques. Particle swarm optimization (PSO) and harmony search (HS) algorithms were applied and compared across eight major rivers in Balochistan, each with distinct hydrological characteristics. A comprehensive multi-metric evaluation framework was developed to assess the performance of these algorithms. The results demonstrate PSO’s superior performance, particularly in complex terrain conditions. For instance, at the Kajou station, PSO improved the Coefficient of Residual Mass (CRM) by 0.01, efficiency (EF) by 0.92, Agreement Index (d) by 0.98, and Normalized Root Mean Square Error (NRMSE) by 0.10 compared to HS. Correlation coefficients ranging from 0.6558 to 0.9645 validate the methodology’s effectiveness in data-scarce environments. This research provides valuable insights into algorithm performance under limited data conditions and offers region-specific parameter optimization guidelines for similar geographical contexts. By advancing flood routing science and providing a validated framework for optimization algorithm selection, this study contributes to improved flood management in regions vulnerable to climate change.

1. Introduction

Climate change has fundamentally altered traditional flood patterns globally, with arid and semi-arid regions facing particularly acute challenges due to irregular monsoon patterns and limited hydrological data availability. While flood routing methods have been extensively studied in data-rich environments, their application and optimization in data-scarce, arid regions present unique challenges that remain inadequately addressed in the current literature.
Flood routing is essential in river engineering and flood control, involving complex unsteady flow computations [1,2,3,4]. During flood events, the hydraulics become intricate as floodwaters inundate floodplains, challenging traditional continuity and momentum equations [5,6,7]. While various mathematical methods have been proposed to address these complexities, they often increase model complexity and computational time. Hydrological models, utilizing simplified equations, offer a more practical approach to flood prediction, especially in data-scarce regions [8,9]. The Muskingum–Cunge model stands out among these for its balance of simplicity and accuracy, making it widely used in flood routing. However, optimizing its parameters, particularly the weighting coefficient, remains challenging.

1.1. Research Gap and Motivation

Previous studies have primarily focused on applying flood routing methods in regions with abundant hydrological data and regular precipitation patterns. However, three critical gaps exist in the current literature:
  • Limited understanding of optimization algorithm performance in data-scarce environments;
  • Absence of comprehensive evaluation frameworks for comparing algorithm performance across multiple rivers with varying characteristics;
  • Lack of validated guidelines for algorithm selection in arid regions experiencing climate change impacts.
This study addresses these gaps through several innovative approaches:
  • Development of a novel multi-metric evaluation framework that combines traditional statistical measures with advanced visualization techniques;
  • First-time comprehensive assessment of PSO and HS algorithms across eight diverse rivers in an arid region;
  • Creation of region-specific optimization guidelines applicable to similar geographical contexts globally.

1.2. Flood Routing Models and the Position of the Muskingum–Cunge Model

While various mathematical methods exist for flood routing, their application in data-scarce environments presents unique challenges. The Muskingum–Cunge model offers particular advantages in these contexts due to its balance of simplicity and accuracy. However, optimizing its parameters in regions with limited data requires innovative approaches that have not been thoroughly explored in previous research.
Flood routing models are crucial for water resources management and can be categorized into hydraulic and hydrological models. Hydraulic models, based on complex unsteady flow equations, offer high accuracy but require extensive data and computational resources [10,11]. In contrast, hydrological models like the Muskingum, Clark, and Muskingum–Cunge models use simplified equations, offering computational efficiency and minimal data requirements at the cost of reduced accuracy [12,13]. The Muskingum–Cunge model stands out among hydrological models, combining simplicity with relatively good accuracy. It extends the original Muskingum model by integrating a continuity equation with a storage equation. Requiring only two primary parameters—time lag and weighting coefficient—it has become a widely used tool for flood routing. However, optimizing these parameters remains a challenge, particularly in data-scarce regions.

1.3. Innovation in Calibration Methods

This study advances the field through several key innovations:
  • Integration of heat map visualization with traditional statistical measures for comprehensive algorithm evaluation;
  • Development of region-specific parameter optimization guidelines;
  • Validation of optimization techniques in complex terrain with limited data availability.

1.4. Calibration Methods for Hydrological Models

Calibration is crucial for hydrological models like Muskingum–Cunge, involving the optimization of parameters such as time lag and weighting coefficient to match simulated outputs with observed data. Traditional manual calibration, while straightforward, is time-consuming and impractical for complex models. Consequently, automated calibration methods have gained popularity. These approaches use objective functions (e.g., the sum of squared errors) to find optimal parameter sets, offering efficiency and consistency. Among automated techniques, evolutionary optimization algorithms have emerged as powerful tools capable of handling the complex, nonlinear nature of hydrological models [13]. This study explores two such algorithms—particle swarm optimization (PSO) and harmony search (HS)—for optimizing the Muskingum–Cunge model.

1.5. Application of Optimization Algorithms in Solving Hydrological Problems

Evolutionary optimization algorithms, including genetic algorithms, particle swarm optimization, harmony search, and ant colony optimization, have proven effective in solving complex hydrological problems. Their application to model calibration, parameter estimation, and water resources optimization has gained significant attention in recent years. Flood routing, critical for hydraulic structure design and water resource management, often relies on these algorithms due to the lack of continuous monitoring in many rivers. Flood routing methods are broadly categorized into hydraulic and hydrological approaches [14,15]. Hydraulic methods, while accurate, require extensive data and are computationally intensive [16]. Hydrological methods, like the Muskingum model, offer a balance of simplicity and accuracy [17,18,19]. The Muskingum method, widely used in flood routing, estimates model parameters through optimization based on historical hydrograph data. It can be applied in both linear and nonlinear forms [20,21,22,23]. Evolutionary algorithms have shown promise in optimizing these parameters, potentially improving flood prediction accuracy while managing computational complexity [24]. The nonlinear Muskingum method, introduced by Pham et al. (2021) [19], addresses the limitations of the linear model in accurately simulating floods, given the generally nonlinear nature of storage-discharge relationships in river systems. This approach has gained increased attention in recent years due to its improved accuracy [14,25,26,27]. Comparative studies have shown that the Muskingum–Cunge method, despite using less accurate data, often outperforms the kinematic wave method in flood routing efficiency [28]. A four-parameter nonlinear Muskingum model has also been proposed, demonstrating more accurate predictions of flood discharge compared to the three-parameter mode. Recent research has explored variations such as a four-parameter nonlinear Muskingum model, which has demonstrated improved accuracy over the three-parameter version [29]. Moradi et al. (2023) [13] applied both the Muskingum and Muskingum–Cunge methods to a section of the Liqvan River and compared the results for floods with return periods of 2, 10, 20, 50, and 100 years. The results revealed differences between the routing results of the two models and actual values. Akbari et al, [14] compared dynamic and Muskingum–Cunge routing in a channel study and found minimal differences between the two methods. However, they cautioned against using the Muskingum–Cunge method in low-gradient channels. Norouzi and Bazargan (2019) [21] investigated the accuracy of the Muskingum–Cunge method between the Malthan and Ahvaz gauging stations along the Karun River. Their findings indicated that the parameters of the Muskingum–Cunge method performed better when using three different values instead of a single constant value.
The present study introduces several innovative approaches to address critical gaps in flood routing optimization. Our primary objectives are to develop and validate a comprehensive framework for comparing optimization algorithm performance in data-scarce environments, particularly crucial given the increasing impacts of climate change on regional hydrology. This framework uniquely integrates multiple evaluation metrics with advanced visualization techniques, providing new insights into algorithm behavior under limited data conditions. Additionally, we establish novel guidelines for algorithm selection based on specific regional characteristics, filling a significant gap in current methodological approaches to flood routing optimization.
The research advances flood management science by providing validated approaches specifically designed for regions facing the dual challenges of climate change impacts and limited data availability. Through systematic analysis and innovative methodology development, we create practical recommendations for flood management in regions facing similar challenges, with particular emphasis on the applicability across diverse geographical contexts. This approach represents a significant step forward in adapting sophisticated optimization techniques to real-world constraints in challenging environments.
This study focuses on the Balochistan region, strategically chosen for its unique combination of seasonal flooding patterns and limited hydrological data availability. We introduce an innovative approach to optimizing the Muskingum–Cunge model across eight carefully selected flood-prone rivers, each representing different hydrological characteristics typical of arid regions. The research employs two advanced metaheuristic approaches—particle swarm optimization (PSO) and harmony search algorithm (HSA)—in a novel comparative framework. These algorithms are applied to a three-parameter Muskingum model through a methodology specifically designed to address the challenges of parameter estimation in data-scarce environments, thereby enhancing both flood routing accuracy and computational efficiency while providing a replicable framework for similar regions globally.

2. Materials and Methods

2.1. Study Area

Sistan and Baluchestan province, spanning 180,726 square kilometers, is located in southeastern Iran, between 25°3′ and 31°27′ north latitude and 58°50′ and 63°21′ east longitude [30]. The province comprises two main regions: northern Sistan and southern Baluchestan. It is divided into 15 counties (Zahedan, Mirjaveh, Khash, Saravan, Iranshahr, Nik Shahr, Chabahar, Sarbaz, Konarak, Delgan, Mehrestan, Sib and Soran, Bampoor, Qasr-e Qand, and Fanuj) (Statistical Center of Iran, 2020). This research focuses on the Baluchestan region, utilizing data collected from hydrometric stations along the Rapch, Sarbaz, Kehir, Siahjangal, Bahu, Kajou, Nikshahr, and Kamb rivers to conduct flood routing using the Muskingum–Cunge method (Figure 1). The characteristics of the studied rivers and their basins are presented in Table 1. These data will be used to construct inflow hydrographs for the river basins in the study area. Given the region’s vast geographical extent, it exhibits a diverse climate. Climate zoning indicates that the counties of Nikshahr, Qasr-e Qand, Mirjaveh, Konarak, Chabahar, Sarbaz, and Iranshahr have arid hot desert, semi-arid temperate, arid hot coastal, and extremely arid hot desert climates, respectively [13]. The region is characterized by high average temperatures (22.6 °C) and low temperature fluctuations. Due to low annual precipitation (139.8 mm) and the absence of mountainous snow sources, most river flows are seasonal and temporary. In many parts of Baluchestan, limited groundwater resources serve as the primary water supply [13].

2.2. The Muskingum–Cunge Method

The Muskingum method, initially proposed in 1938 based on studies of the Muskingum River in the United States, is a linear model founded on the continuity equation [20]. The model is represented by the following equations:
d s t d t = I t O t
S t = K x I t + ( 1 + x ) O t
where St is the storage volume of the river (m3), It is the inflow rate (m3/s), Qt is the outflow rate (m3/s), K is the storage time constant (s), varying between 0 and 30, and x is the weighting factor, ranging from 0 to 0.5.
In 1969, Cunge demonstrated that this equation is analogous to the advection–dispersion equation and that its results closely resemble those obtained from the kinematic wave method. By modifying the kinematic wave equation and aligning physical diffusion with numerical diffusion, Cunge refined the Muskingum equation. The resulting modified Muskingum–Cunge equation, capable of considering lateral inflows, can be calculated based on the river’s physical characteristics [31]. This method has been widely used for flood routing in various regions. Assuming that inertia and acceleration can be neglected compared to the bottom slope in natural channels, Cunge proved that the advection–dispersion equation is similar to the Muskingum equation. Based on this, the Muskingum–Cunge equation for flood routing can be defined as follows [31]:
Q i + 1 j + 1 = α 1 Q i j + 1 + α 2 Q i j + α 3 Q i + 1 j
where the coefficients α 1 ,   α 2 , and α 3 can be calculated using Equations (4) to (6) [32]:
α 1 = Δ t 2 K X 2 K ( 1 X ) + Δ t
α 2 = Δ t + 2 K X 2 K ( 1 X ) + Δ t
α 3 = 2 K ( 1 X ) Δ t 2 K ( 1 X ) + Δ t
In these equations, Δt is the time step, Δx is the spatial step, and K and x are routing parameters. It should be noted that the sum of α 1 ,   α 2 , and α 3 is equal to 1, and both K and Δx have units of time. In the above equations, K is the storage constant, and x is a factor that represents the relative influence of inflow on storage and is dimensionless. Cunge demonstrated that when K and x are assumed to be constant, Equation (3) serves as an approximate solution to both the kinematic wave equations and the diffusion equation in a channel. This finding highlights the versatility of the Muskingum–Cunge method in representing different aspects of flood wave propagation. Therefore, the values of the routing parameters K and x can be calculated using the following equations:
K = Δ X C K = Δ X d Q d A
X = 1 2 ( 1 Q B C K S Δ x )
where C K is the wave celerity related to the flood discharge, B is the water surface width in the river or channel, Q is the reference discharge, and Δx is the spatial step. The reference discharge is the discharge used to accurately estimate the routing parameters [14]. Equation (8) demonstrates that the value of x is directly related to the reference discharge, which is a function of the inflow. During a flood event, the inflow varies, which would imply that the reference discharge should also vary. However, allowing the reference discharge to change continuously would significantly increase the computational complexity of the model. To balance accuracy with computational efficiency, the constant parameter Muskingum–Cunge method uses a single, representative value for the reference discharge across all computational cells. This simplification allows for easier implementation and faster computation, while still capturing the essential dynamics of the flood routing process. The reference discharge is typically chosen to represent average flow conditions during the flood event, often calculated as a function of the peak and base flows (as shown in Equation (9)). This approach provides a reasonable compromise between model accuracy and computational simplicity. In this study, the following equation is used to estimate the reference discharge [33]:
Q = Q b + 0.5 Q P i Q b
where Qb and Qpi represent the minimum and maximum inflow rates, respectively.
It is observed that estimating the routing parameters K and x is the most critical part of flood routing estimation, and traditional manual methods are time-consuming. Therefore, modern methods based on artificial intelligence should be used to estimate these parameters, as they are more accurate and time-efficient. In this study, two optimization algorithms, particle swarm optimization (PSO) and harmony search (HS), will be used to estimate these parameters and find the best solution. The programming of these machine learning algorithms will be conducted in the MATLAB (R2022b) programming environment.

2.3. Particle Swarm Optimization (PSO)

PSO is an evolutionary algorithm introduced in 1995. Based on population-based search, similar to genetic algorithms, ant colony optimization, and bee colony optimization, PSO is a nature-inspired algorithm that mimics the collective intelligence and social behavior of birds and fish [30,34]. Due to its simple structure, few controllable parameters, rapid convergence, and high computational efficiency, PSO is widely used in optimization problems. Although primarily developed for optimization problems with continuous variables, PSO has been successfully adapted for discrete variable problems. In PSO, each solution is considered a bird in a flock and is termed a particle. These particles exhibit both individual intelligence and social behavior, coordinating their movement towards a target [35]. The process begins with a swarm of particles, each representing a randomly generated solution to the problem. The swarm then iteratively searches for the optimal solution. Each particle i is defined by three vectors: its current position Xi, its best previous position Yi, and its velocity Vi.
X i = ( x i 1 , x i 2 x i n )   current   position
| Y i = ( y i 1 , y i 2 y i n )   Best   previous   position
V i = ( v i 1 , v i 2 v i n )   Flight   velocity
It is assumed that the simulated bird flock communicates while flying, and each bird looks towards a specific direction, which is the best position achieved (Yi) in the current state. Subsequently, when the birds communicate, the bird in the best position is identified. Through coordination, each bird moves towards the best bird with a velocity that depends on its current velocity. Therefore, each bird explores the search space from its current local position, and this process repeats until the bird potentially reaches the desired position. Birds learn through their own experience (local search) and the experience of their peers (global search). In each iteration, the particle with the best momentary solution to the problem is identified. The position of this particle is then used in calculating the new position for each particle in the swarm. This calculation is based on the following equation:
X i , d n + 1 = X i , d n + V i , d n + 1
The best position achieved by each particle in each swarm is denoted by p-best, and the best position achieved in the entire population is denoted by g-best. Ultimately, the coordinated population moving in one direction is represented by the following equation:
V i , d n + 1 = ω V i , d n + c 1 r 1 n ( p b e s t i , d n X i , d n ) + c 2 r 2 n ( g b e s t i , d n X i , d n )
where d = 1, 2, …, D, i = 1, 2, …, N, N is the population size, ω is the inertia weight, c1 and c2 are positive constant coefficients that refer to cognitive and social parameters (learning factors), respectively, r1 and r2 are random numbers between 0 and 1, and n = 1, 2, … denotes the number of iterations [36].
Furthermore, inertia weight is an index to ensure the convergence behavior of PSO, which is used to control the effect of the history of velocities on the current velocity. This coefficient may change from one iteration to the next. Since this coefficient controls the balance between global and local search, it is suggested to decrease linearly with time, usually in a way that global search is prioritized at the beginning and local search is prioritized with each subsequent iteration [37]. To determine the inertia weight, the following equation is used:
w = w max ( w max w min ) × n i T e r max
where ωmax is the initial inertia, ωmin is the final inertia, iTermax is the maximum number of iterations, and n is the current iteration number. According to experimental studies, the best values for ωmax and ωmin are 0.9 and 0.4, respectively [38]. Although the constant coefficients c1 and c2 do not have a decisive role in the convergence of PSO, by determining appropriate initial values, it is possible to increase the convergence speed and improve the local solution. The suggested initial values for these coefficients also show that choosing a larger cognitive parameter (c1) compared to the social parameter (c2), with the condition c1 + c2 ≤ 4, leads to better results. The flowchart of the particle swarm optimization algorithm is shown in Figure 2 and Table 2.

2.4. Harmony Search Algorithm: A Musical Inspiration

The harmony search (HS) algorithm, inspired by musical improvisation, mimics the process of achieving perfect harmony in jazz [39]. In this metaheuristic approach, the search for an optimal solution parallels a musician’s quest for the ideal combination of notes. Each decision variable in the optimization problem corresponds to a musical instrument, and the objective function evaluation is analogous to the aesthetic quality of the harmony. Just as musicians improve through practice, the algorithm refines its solution through iterations, balancing the exploration of new possibilities with the exploitation of known good solutions.

2.4.1. Key Advantages of HS

Ability to handle discrete variables: Unlike many numerical optimization methods, HS can effectively handle discrete variables, reducing the likelihood of getting trapped in local optima [40,41].

2.4.2. Steps Involved in the HS Algorithm

Initialization: Set initial values for algorithm parameters such as Harmony Memory Size (HMS), Harmony Memory Considering Rate (HMCR), Pitch Adjusting Rate (PAR), and generate an initial harmony.
Initialization of Harmony Memory (HMS): Populate the HMS with a set of randomly generated harmony vectors (Figure 3 and Table 3).
Creating a new harmony in HS involves three mechanisms:
  • Harmony Memory Considering Rate (HMCR): selects a value from the Harmony Memory if a random number is below HMCR.
  • Pitch Adjustment Rate (PAR): if activated, slightly adjusts the selected value.
  • Random Selection: chooses a random value within bounds if neither HMCR nor PAR is applied.
These mechanisms balance between exploiting known good solutions and exploring new possibilities. Updating the Harmony Memory: Evaluate the new harmony using the objective function. If it is better than the worst harmony in the HMS, replace the worst harmony with the new one.
Termination: Check if the termination criterion (e.g., maximum number of iterations) is met. If not, go back to step 3.

2.5. Evaluation of Machine Learning Algorithm Performance

To evaluate the algorithms used, the following indices were employed: Coefficient of Residual Mass (CRM), Normalized Root Mean Square Error (NRMSE), model efficiency (EF), and Index of Agreement (d) [27,42].
  • Coefficient of Residual Mass (CRM):
CRM = (Σ Oi − Σ Pi)/Σ Oi
2.
Normalized Root Mean Square Error (NRMSE):
NRMSE = √[(Σ (Pi − Oi)²)/n]/Ō
3.
Model efficiency (EF):
EF = 1 − [Σ (Oi − Pi)²/Σ (Oi − Ō)²]
4.
Index of Agreement (d):
d = 1 − [Σ (Pi − Oi)²/Σ (|Pi − Ō| + |Oi − Ō|)²]
where Oi—Observed values, Pi—Predicted values, Ō—Mean of observed values, and n—Number of observations.
These metrics provide a comprehensive evaluation of the model’s performance, including its bias (CRM), accuracy (NRMSE), efficiency (EF), and overall agreement with observed data (d). NRMSE (Normalized Root Mean Square Error) represents the difference between simulated and observed data relative to the mean of observed data. For this index
Values less than 10%: Excellent
Values between 10% and 20%: Good
Values between 20% and 30%: Fair
Values greater than 30%: Poor
The EF (model efficiency) index indicates the degree of alignment between observed and predicted plots with the 1:1 line. Its values range from 1 to negative infinity. An EF value of 1 corresponds to a perfect fit [43]. The d (Index of Agreement) ranges from 0 to 1:
1 indicates perfect agreement between simulated and observed data;
0 indicates no agreement.
For CRM (Coefficient of Residual Mass):
Positive values indicate the underestimation of crop performance;
Negative values indicate the overestimation of crop performance.
These metrics collectively provide a comprehensive evaluation of model performance, assessing accuracy, bias, and agreement between predicted and observed values. Finally, in addition to examining and evaluating the performance of the Muskingum–Cunge model for estimating the flood input hydrograph in the Baluchistan region, the routing parameters in this model are estimated using machine learning algorithms. By comparing these machine learning methods, the best approach for this region is determined for estimating the flood input hydrograph and its routing.

3. Results and Discussion

This study aims to find the optimal parameters (K and X) for the Muskingum–Cunge model using PSO and HS algorithms. The performance of these two algorithms in terms of convergence rate, accuracy, and objective function values is compared. The results of both algorithms, including convergence trends and optimal parameter values, are presented and discussed.
Table 4 presents initial estimates for parameters X and K for eight rivers, derived using particle swarm optimization (PSO) and harmony search (HS) algorithms. The results show similar values between PSO and HS for most rivers, suggesting consistency across methods. Parameter X values are relatively stable across all rivers, ranging from about 0.16 to 0.43. In contrast, parameter K shows greater variation, with values from 2.85 to 29.11.
Figure 4 presents a comparison of PSO and HS optimization models with actual flood discharge data. This analysis compares the results from particle swarm optimization (PSO) and harmony search (HS) optimization models with actual flood discharge data across multiple stations. The performance of these models was evaluated using correlation coefficients (R²) and visual comparison of simulated hydrographs with actual flood discharge data.
Kajou Station: Both PSO and HS models simulated the flood discharge with high accuracy. Peak discharge values were 231.60, 234.07, and 236.52 m³/s for actual, PSO, and HS models, respectively. Correlation coefficients were exceptionally high at 0.9458 (PSO) and 0.9451 (HS), indicating a very strong correlation between simulated and actual data.
Bahu Station: Both algorithms successfully simulated the flood output hydrograph with acceptable accuracy. The simulated graphs closely matched the actual flood discharge graph. Correlation coefficients were 0.6879 for PSO and 0.6558 for HS, which are close to 0.7, indicating an acceptable correlation between simulated and actual data.
Nikshahr Station: The algorithms simulated the flood hydrograph with acceptable accuracy. Correlation coefficients were 0.8031 for PSO and 0.7790 for HS, showing moderate to good correlation.
Rapch Station: Simulated hydrographs closely matched actual flood discharge. Correlation coefficients of 0.7834 (PSO) and 0.7747 (HS) demonstrated moderate to good correlation.
Sarbaz Station: both algorithms provided acceptable accuracy, with correlation coefficients of 0.7651 (PSO) and 0.755 (HS), showing moderate to good correlation.
Siah Jangal Station: this station showed the highest correlation among all stations, with coefficients of 0.9645 (PSO) and 0.9631 (HS), indicating very high agreement between simulated and actual data.
Kahir Station: both algorithms achieved highly accurate simulation, with correlation coefficients of 0.8568 (PSO) and 0.8495 (HS), showing very good correlation.
Kamb Station: while overall simulation was acceptable, both algorithms struggled to accurately simulate flood discharge during certain time periods, resulting in significant differences between simulated and actual data in these instances.
In conclusion, both PSO and HS optimization algorithms demonstrated good overall performance in simulating flood hydrographs across the studied stations. The Siah Jangal station showed the highest correlation, while the Bahu and Kamb stations presented some challenges in accurately simulating certain aspects of the flood discharge. These results suggest that both PSO and HS are effective tools for flood discharge simulation, although their performance may vary depending on the specific characteristics of each station and time period.
Figure 5 illustrates the charts of outlet flow with PSO and HS models, optimizing the Muskingum–Cunge coefficients for various stations. Kajo Station: The chart shows the output discharge using coefficients optimized by PSO and HS models. Peak outflow discharge values for PSO and HS models were 172.45 and 174.10 cubic meters per second, respectively, indicating acceptable accuracy for both models in simulating the outflow discharge. Bahu Station: Both PSO and HS algorithms, by optimizing Muskingum–Cunge coefficients, have simulated the flood outflow discharge with acceptable accuracy. The simulated outflow discharge graphs for both algorithms are close to each other. Nikshahr Station: The optimization of Muskingum–Cunge coefficients by both PSO and HS algorithms has resulted in acceptable accuracy in simulating flood outflow discharge. The simulated outflow discharge graphs for both algorithms are similar. Rapch Station: Both PSO and HS algorithms have successfully optimized Muskingum–Cunge coefficients, leading to acceptable accuracy in simulating flood outflow discharge. The simulated outflow discharge graphs for both algorithms are close to each other. Sarbaz Station: The optimization of Muskingum–Cunge coefficients by PSO and HS algorithms has produced acceptable accuracy in simulating flood outflow discharge. The simulated outflow discharge graphs for both algorithms show close agreement. Siah Jangal Station: Both PSO and HS algorithms have optimized Muskingum–Cunge coefficients very effectively, resulting in highly accurate simulation of flood outflow discharge. The simulated outflow discharge graphs for the two algorithms show very close alignment with each other. Kahir Station: The optimization of Muskingum–Cunge coefficients by PSO and HS algorithms has led to good accuracy in simulating flood outflow discharge. The simulated outflow discharge graphs for the two algorithms show good agreement, indicating similar performance. Kamb Station: Both PSO and HS algorithms have successfully optimized Muskingum–Cunge coefficients, resulting in good accuracy in simulating flood outflow discharge. The simulated outflow discharge graphs for the two algorithms show good agreement, demonstrating good and similar performance. Overall, these results confirm that both PSO and HS algorithms perform well in optimizing Muskingum–Cunge coefficients across various stations, producing accurate simulations of flood outflow discharge.
Heat maps in Figure 6 compare the performance of PSO and HS algorithms in optimizing the Muskingum–Cunge model coefficients at different stations based on CRM, Ef, d, and NRMSE indices. Brighter colors indicate better performance. Generally, PSO outperforms HS in terms of CRM, Ef, and NRMSE at most stations, suggesting its superiority in simulating flood hydrographs. However, there is little difference between the two algorithms in terms of the ‘d’ index. At stations like Kajo, NikShahr, Rapch, Sarbaz, Siah Jangal, and Kahir, PSO consistently provides more accurate simulations. At Kamb, PSO significantly outperforms HS across all indices, particularly in terms of Ef (PSO: −2.69 vs. HS: −14.10) and NRMSE (PSO: 0.24 vs. HS: 0.49). The performance difference is most pronounced at this station, with PSO showing markedly better results in simulating flood hydrographs.
Table 5 presents statistical analysis results for four indices (CRM, Ef, d, NRMSE) comparing PSO and HS models at various stations. PSO consistently performed as well or better than HS across all locations. Notably, PSO significantly outperformed HS at Bahu and Kamb stations, with substantial improvements in Ef and CRM indices. While both models performed well at Siah Jangal, PSO showed marginally better results. At Kajo and NikShahr, PSO demonstrated moderate performance advantages across the indices.
The findings of this study have significant practical implications for flood management and prediction in the Balochistan region and potentially other arid or semi-arid areas with limited hydrological data. The optimized Muskingum–Cunge model, particularly when using the PSO algorithm, offers more accurate predictions of flood hydrographs. This improvement can lead to more precise early warning systems, potentially saving lives and property, and better-informed decision-making for emergency responders and water resource managers. The enhanced capability to estimate the timing and magnitude of flood peaks can inform long-term infrastructure planning, including the design of flood control structures and urban development in flood-prone areas. Moreover, as climate change alters precipitation patterns in the region, this robust flood routing model becomes increasingly crucial for developing adaptive strategies to mitigate future flood risks.
Future research should focus on enhancing the model’s applicability and accuracy. Integrating rainfall-runoff models and exploring real-time optimization techniques could improve end-to-end flood forecasting. Advanced machine learning techniques could refine parameter estimation. Conducting uncertainty analyses and expanding geographical application would test the model’s robustness. Coupling the model with other environmental models, such as sediment transport or water quality models, would provide a more comprehensive understanding of river system dynamics during flood events, leading to more effective flood management strategies.

4. Conclusions

This research advances flood routing science by addressing the complex challenges of data-scarce environments experiencing climate change impacts. This study’s primary innovation lies in developing a comprehensive multi-metric evaluation framework that integrates traditional statistical measures with heat map visualization techniques, providing new insights into algorithm performance under challenging conditions. The research makes several significant contributions to the field. First, it introduces a novel methodological framework combining heat map visualization with traditional metrics and develops new evaluation criteria for data-scarce environments. Second, it presents the first systematic comparison of PSO and HS algorithms across eight diverse rivers in an arid region, demonstrating PSO’s superior performance in complex terrain conditions. Results consistently showed PSO’s superiority over HS in simulating flood hydrographs, with correlation coefficients ranging from 0.6558 to 0.9645. This performance advantage was particularly pronounced at stations with complex hydrological conditions, such as Bahu and Kamb. While both algorithms achieved acceptable accuracy, PSO exhibited consistently better performance across various evaluation metrics (CRM, Ef, NRMSE). PSO’s ability to explore the solution space more efficiently resulted in superior parameter estimates and improved hydrograph predictions, particularly in representing peak flows and hydrograph shapes. These findings have significant implications for flood management in regions facing similar challenges due to climate change and limited data availability. The methodological framework developed here provides a foundation for future research while offering immediate practical applications. Future research should focus on extending the framework to other geographical regions, incorporating additional optimization algorithms, developing hybrid approaches, and investigating climate change impacts on algorithm performance in different regional contexts. This study demonstrates that while both PSO and HS are valuable tools for flood modeling, PSO is the preferred optimization algorithm for the Muskingum–Cunge model in challenging environments.

Author Contributions

Conceptualization, R.A. and J.P.; methodology, J.P.; software, J.P.; validation, R.A., J.P. and H.G.; formal analysis, J.P.; investigation, J.P.; resources, J.P.; data curation, J.P.; writing—original draft preparation, J.P.; writing—review and editing, R.A. and J.P.; visualization, M.K.; supervision, R.A.; project administration, R.A.; funding acquisition, J.P. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by University of Zabol, grant number UOZ-GR-8861.

Data Availability Statement

The data presented in this study are available on request from the corresponding author.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Lama, G.F.C.; Rillo Migliorini Giovannini, M.; Errico, A.; Mirzaei, S.; Padulano, R.; Chirico, G.B.; Preti, F. Hydraulic efficiency of green-blue flood control scenarios for vegetated rivers: 1D and 2D unsteady simulations. Water 2021, 13, 2620. [Google Scholar] [CrossRef]
  2. Mel, R.A.; Viero, D.P.; Carniello, L.; D’Alpaos, L. Optimal floodgate operation for river flood management: The case study of Padova (Italy). J. Hydrol. Reg. Stud. 2020, 30, 100702. [Google Scholar] [CrossRef]
  3. Pinter, N.; Heine, R.A. Hydrodynamic and morphodynamic response to river engineering documented by fixed-discharge analysis, Lower Missouri River, USA. J. Hydrol. 2005, 302, 70–91. [Google Scholar] [CrossRef]
  4. Yin, L.; Wang, L.; Keim, B.D.; Konsoer, K.; Zheng, W. Wavelet analysis of dam injection and discharge in three gorges dam and reservoir with precipitation and river discharge. Water 2022, 14, 567. [Google Scholar] [CrossRef]
  5. Gaagai, A.; Aouissi, H.A.; Krauklis, A.E.; Burlakovs, J.; Athamena, A.; Zekker, I.; Boudoukha, A.; Benaabidate, L.; Chenchouni, H. Modeling and risk analysis of dam-break flooding in a semi-arid Montane watershed: A case study of the Yabous Dam, Northeastern Algeria. Water 2022, 14, 767. [Google Scholar] [CrossRef]
  6. Herrera-Granados, O. Theoretical background and application of numerical modeling to surface water resources. In Current Directions in Water Scarcity Research; Elsevier: Amsterdam, The Netherlands, 2022; Volume 7, pp. 319–340. [Google Scholar]
  7. Zafar, M.B. Analysis of Channel and Floodplain Hydrodynamics and Flooding on the Mississippi River; Michigan State University: East Lansing, MI, USA, 2023. [Google Scholar]
  8. Grimaldi, S.; Schumann, G.P.; Shokri, A.; Walker, J.; Pauwels, V. Challenges, opportunities, and pitfalls for global coupled hydrologic-hydraulic modeling of floods. Water Resour. Res. 2019, 55, 5277–5300. [Google Scholar] [CrossRef]
  9. Jain, S.K.; Mani, P.; Jain, S.K.; Prakash, P.; Singh, V.P.; Tullos, D.; Kumar, S.; Agarwal, S.P.; Dimri, A.P. A Brief review of flood forecasting techniques and their applications. Int. J. River Basin Manag. 2018, 16, 329–344. [Google Scholar] [CrossRef]
  10. Roohi, M.; Soleymani, K.; Salimi, M.; Heidari, M. Numerical evaluation of the general flow hydraulics and estimation of the river plain by solving the Saint–Venant equation. Model. Earth Syst. Environ. 2020, 6, 645–658. [Google Scholar] [CrossRef]
  11. Tsai, C.W. Applicability of kinematic, noninertia, and quasi-steady dynamic wave models to unsteady flow routing. J. Hydraul. Eng. 2003, 129, 613–627. [Google Scholar] [CrossRef]
  12. Ehteram, M.; Shabanian, H. Unveiling the SALSTM-M5T model and its python implementation for precise solar radiation prediction. Energy Rep. 2023, 10, 3402–3417. [Google Scholar] [CrossRef]
  13. Moradi, E.; Yaghoubi, B.; Shabanlou, S. A new technique for flood routing by nonlinear Muskingum model and artificial gorilla troops algorithm. Appl. Water Sci. 2023, 13, 49. [Google Scholar] [CrossRef]
  14. Akbari, R.; Hessami-Kermani, M.-R.; Shojaee, S. Flood routing: Improving outflow using a new non-linear Muskingum model with four variable parameters coupled with PSO-GA algorithm. Water Resour. Manag. 2020, 34, 3291–3316. [Google Scholar] [CrossRef]
  15. Rahman, M.; Chen, N.; Elbeltagi, A.; Islam, M.M.; Alam, M.; Pourghasemi, H.R.; Tao, W.; Zhang, J.; Shufeng, T.; Faiz, H.; et al. Application of stacking hybrid machine learning algorithms in delineating multi-type flooding in Bangladesh. J. Environ. Manag. 2021, 295, 113086. [Google Scholar] [CrossRef] [PubMed]
  16. Bozorg-Haddad, O.; Abdi-Dehkordi, M.; Hamedi, F.; Pazoki, M.; Loáiciga, H.A. Generalized storage equations for flood routing with nonlinear Muskingum models. Water Resour. Manag. 2019, 33, 2677–2691. [Google Scholar]
  17. Bozorg-Haddad, O.; Mohammad-Azari, S.; Hamedi, F.; Pazoki, M.; Loáiciga, H.A. Application of a new hybrid non-linear Muskingum model to flood routing. In Proceedings of the Institution of Civil Engineers-Water Management; Thomas Telford Ltd.: London, UK, 2020; pp. 109–120. [Google Scholar]
  18. Das, A. Parameter estimation for Muskingum models. J. Irrig. Drain. Eng. 2004, 130, 140–147. [Google Scholar] [CrossRef]
  19. Pham, B.T.; Luu, C.; Van Phong, T.; Trinh, P.T.; Shirzadi, A.; Renoud, S.; Asadi, S.; Van Le, H.; von Meding, J.; Clague, J.J. Can deep learning algorithms outperform benchmark machine learning algorithms in flood susceptibility modeling? J. Hydrol. 2021, 592, 125615. [Google Scholar] [CrossRef]
  20. Karahan, H.; Gurarslan, G.; Geem, Z.W. A new nonlinear Muskingum flood routing model incorporating lateral flow. Eng. Optim. 2015, 47, 737–749. [Google Scholar] [CrossRef]
  21. Norouzi, H.; Bazargan, J. Using the linear muskingum method and the particle swarm optimization (PSO) algorithm for calculating the depth of the rivers flood. Iran-Water Resour. Res. 2019, 15, 344–347. [Google Scholar]
  22. Piri, J.; Kahkha, M.R.R.; Kisi, O. Hybrid machine learning approach integrating GMDH and SVR for heavy metal concentration prediction in dust samples. Environ. Sci. Pollut. Res. 2024, 1–20. [Google Scholar] [CrossRef]
  23. Piri, J.; Kisi, O. Hybrid nonlinear probabilistic model using Monte Carlo simulation and hybrid support vector regression for evaporation predictions. Hydrol. Sci. J. 2024, 1–29. [Google Scholar] [CrossRef]
  24. Niazkar, M.; Afzali, S.H. New nonlinear variable-parameter Muskingum models. KSCE J. Civ. Eng. 2017, 21, 2958–2967. [Google Scholar]
  25. Gąsiorowski, D.; Szymkiewicz, R. Identification of parameters influencing the accuracy of the solution of the nonlinear Muskingum equation. Water Resour. Manag. 2020, 34, 3147–3164. [Google Scholar] [CrossRef]
  26. Soltani, S.R.K.; Mostafaeipour, A.; Almutairi, K.; Dehshiri, S.J.H.; Dehshiri, S.S.H.; Techato, K. Predicting effect of floating photovoltaic power plant on water loss through surface evaporation for wastewater pond using artificial intelligence: A case study. Sustain. Energy Technol. Assess. 2022, 50, 101849. [Google Scholar]
  27. Piri, J.; Abdolahipour, M.; Keshtegar, B. Advanced machine learning model for prediction of drought indices using hybrid SVR-RSM. Water Resour. Manag. 2023, 37, 683–712. [Google Scholar] [CrossRef]
  28. Prawira, D.; Soeryantono, H.; Anggraheni, E.; Sutjiningsih, D. Efficiency analysis of Muskingum-Cunge method and kinematic wave method on the stream routing (Study case: Upper Ciliwung watershed, Indonesia). Proc. IOP Conf. Ser. Mater. Sci. Eng. 2019, 669, 012036. [Google Scholar] [CrossRef]
  29. Ehteram, M.; Binti Othman, F.; Mundher Yaseen, Z.; Abdulmohsin Afan, H.; Falah Allawi, M.; Bt. Abdul Malek, M.; Najah Ahmed, A.; Shahid, S.; Singh, V.P.; El-Shafie, A. Improving the Muskingum flood routing method using a hybrid of particle swarm optimization and bat algorithm. Water 2018, 10, 807. [Google Scholar] [CrossRef]
  30. Piri, J.; Mollaeinia, M.; Mostafaie, A. Assessment of response surface method and hybrid models to predict evaporation (case study: Chahnimeh and Pishein reservoirs in Sistan and Baluchestan Province of Iran). Arab. J. Geosci. 2023, 16, 346. [Google Scholar] [CrossRef]
  31. Barry, D.; Bajracharya, K. On the Muskingum-Cunge flood routing method. Environ. Int. 1995, 21, 485–490. [Google Scholar] [CrossRef]
  32. Te Chow, V. Open Channel Hydraulics; McGraw-Hill: New York, NY, USA, 1959. [Google Scholar]
  33. Moussa, R.; Bocquillon, C. On the use of the diffusive wave for modelling extreme flood events with overbank flow in the floodplain. J. Hydrol. 2009, 374, 116–135. [Google Scholar] [CrossRef]
  34. Kennedy, J.; Eberhart, R. Particle swarm optimization. In Proceedings of the ICNN’95-International Conference on Neural Networks, Perth, WA, Australia, 27 November–1 December 1995; pp. 1942–1948. [Google Scholar]
  35. Montalvo, I.; Izquierdo, J.; Pérez, R.; Iglesias, P.L. A diversity-enriched variant of discrete PSO applied to the design of water distribution networks. Eng. Optim. 2008, 40, 655–668. [Google Scholar] [CrossRef]
  36. Shi, Y.; Eberhart, R. A modified particle swarm optimizer. In Proceedings of the 1998 IEEE International Conference on Evolutionary Computation Proceedings. IEEE World Congress on Computational Intelligence (Cat. No. 98TH8360), Anchorage, AK, USA, 4–9 May 1998; pp. 69–73. [Google Scholar]
  37. Eberhart, R.C.; Shi, Y.; Kennedy, J. Swarm Intelligence; Elsevier: Amsterdam, The Netherlands, 2001. [Google Scholar]
  38. Jabari, F.; Mohammadnejad, J.; Yavari, K. Human primary dental pulp mesenchymal stem cells: History and isolation methods. J. Dent. Med. 2014, 27, 184–189. [Google Scholar]
  39. Geem, Z.W.; Kim, J.H.; Loganathan, G.V. A new heuristic optimization algorithm: Harmony search. Simulation 2001, 76, 60–68. [Google Scholar] [CrossRef]
  40. Jahantigh, N.; Piri, J. Estimation of solar radiation in different climates of Iran using hybrid machine learning methods. J. Appl. Comput. Sci. Mech. 2023, 35, 37–53. [Google Scholar]
  41. Lees, T. Deep Learning for Hydrological Modelling: From Benchmarking to Concept Formation; University of Oxford: Oxford, UK, 2022. [Google Scholar]
  42. McCuen, R.H.; Knight, Z.; Cutter, A.G. Evaluation of the Nash–Sutcliffe efficiency index. J. Hydrol. Eng. 2006, 11, 597–602. [Google Scholar] [CrossRef]
  43. Moriasi, D.N.; Arnold, J.G.; Van Liew, M.W.; Bingner, R.L.; Harmel, R.D.; Veith, T.L. Model evaluation guidelines for systematic quantification of accuracy in watershed simulations. Trans. ASABE 2007, 50, 885–900. [Google Scholar] [CrossRef]
Figure 1. Study area and river basins in Baluchistan.
Figure 1. Study area and river basins in Baluchistan.
Water 17 00104 g001
Figure 2. Flowchart of particle swarm optimization algorithm (PSO).
Figure 2. Flowchart of particle swarm optimization algorithm (PSO).
Water 17 00104 g002
Figure 3. Flowchart of harmony search algorithm (HS).
Figure 3. Flowchart of harmony search algorithm (HS).
Water 17 00104 g003
Figure 4. Comparing the results of PSO and HS models of the optimization of Muskingum–Cunge coefficients against the actual flood flow for stations.
Figure 4. Comparing the results of PSO and HS models of the optimization of Muskingum–Cunge coefficients against the actual flood flow for stations.
Water 17 00104 g004aWater 17 00104 g004b
Figure 5. Chart of outlet flow with PSO and HS models, optimization of Muskingum–Cunge coefficients for stations.
Figure 5. Chart of outlet flow with PSO and HS models, optimization of Muskingum–Cunge coefficients for stations.
Water 17 00104 g005aWater 17 00104 g005b
Figure 6. Heat map to compare statistical results in stations.
Figure 6. Heat map to compare statistical results in stations.
Water 17 00104 g006
Table 1. Characteristics of the studied rivers and basins in Baluchestan.
Table 1. Characteristics of the studied rivers and basins in Baluchestan.
No.River NameLength (m)Perimeter (km)Area (km²)City
1Rapch23,000897.17944Konarak
2Kajou34,5008386717Qasr-e Qand
3Bahu9860189.4987Chabahar
4Nikshahr18,500142.3373.4Nikshahr
5Kehir20,546354.23004Nikshahr
6Sarbaz56,000764.36850Sarbaz
7Kamb21,300208130Chabahar
8Siah Jangal24,756254.21350Mirjaveh
Table 2. Particle swarm optimization (PSO) implementation.
Table 2. Particle swarm optimization (PSO) implementation.
ParameterValue
Population size50 particles
Maximum iterations1000
Inertia weight (ω)0.9 to 0.4 (linearly decreased)
Cognitive coefficient (c1)2
Social coefficient (c2)2
Velocity clampingVmax = 20% of search space range
Stopping criteriaMax iterations or no improvement for 50 iterations
Initial population generationUniform random distribution within parameter bounds
Constraint handlingBox constraints
Objective functionMSE
Number of independent runs30
Table 3. Harmony search (HS) implementation.
Table 3. Harmony search (HS) implementation.
ParameterValue
Harmony Memory Size (HMS)30
Maximum improvisations1000
Harmony Memory Considering Rate (HMCR)0.9
Pitch Adjusting Rate (PAR)0.4–0.9
Stopping criteriaMax improvisations or no improvement for 50 improvisations
Initial harmony memory generationUniform random distribution within parameter bounds
Constraint handlingBox constraints
Objective functionMSE
Number of independent runs30
Table 4. Initial estimates for parameters X and K were obtained using Particle PSO and HS algorithms.
Table 4. Initial estimates for parameters X and K were obtained using Particle PSO and HS algorithms.
No.River NamePSO HS
xKxK
1Kajou0.4124.800.3521.40
2Bahu0.1615.910.1716.02
3Nikshahr0.248.420.258.56
4Rapch0.2924.400.2425.12
5Sarbaz0.238.600.258.74
6Siah Jangal0.426.400.436.21
7Kehir0.2429.110.2328.60
8Kamb0.182.900.192.85
Table 5. Results of statistical analysis for stations.
Table 5. Results of statistical analysis for stations.
Station PSOHS
KajoCRM0.020.01
Ef0.920.92
d0.980.98
NRMSE0.100.10
BahuCRM−0.04−0.12
Ef−1.97−3.82
d0.730.64
NRMSE0.170.22
NikShahrCRM−0.03−0.09
Ef0.390.03
d0.890.85
NRMSE0.140.17
RapchCRM−0.03−0.06
Ef0.430.32
d0.900.88
NRMSE0.150.16
SarbazCRM0.00−0.03
Ef0.350.25
d0.890.88
NRMSE0.140.15
Siah JangalCRM−0.01−0.02
Ef0.940.94
d0.990.99
NRMSE0.080.09
KahirCRM−0.01−0.02
Ef0.640.61
d0.930.93
NRMSE0.120.13
KambCRM−0.13−0.41
Ef−2.69−14.10
d0.670.42
NRMSE0.240.49
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

Ahmadi, R.; Piri, J.; Galavi, H.; Keikha, M. Comparing the Efficiency of Particle Swarm and Harmony Search Algorithms in Optimizing the Muskingum–Cunge Model. Water 2025, 17, 104. https://doi.org/10.3390/w17010104

AMA Style

Ahmadi R, Piri J, Galavi H, Keikha M. Comparing the Efficiency of Particle Swarm and Harmony Search Algorithms in Optimizing the Muskingum–Cunge Model. Water. 2025; 17(1):104. https://doi.org/10.3390/w17010104

Chicago/Turabian Style

Ahmadi, Rahleh, Jamshid Piri, Hadi Galavi, and Mahdi Keikha. 2025. "Comparing the Efficiency of Particle Swarm and Harmony Search Algorithms in Optimizing the Muskingum–Cunge Model" Water 17, no. 1: 104. https://doi.org/10.3390/w17010104

APA Style

Ahmadi, R., Piri, J., Galavi, H., & Keikha, M. (2025). Comparing the Efficiency of Particle Swarm and Harmony Search Algorithms in Optimizing the Muskingum–Cunge Model. Water, 17(1), 104. https://doi.org/10.3390/w17010104

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