Next Article in Journal
Dynamic Threshold Determination Method for Triggering Critical Rainfall in Mountainous Debris Flow
Previous Article in Journal
Exergy Analysis Based on AI Correlations for Seawater Properties: Case Study of Industrial MED-TVC Plant in Kuwait
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

An Integrated Explicit Hydrological Routing and Machine Learning Framework for Urban Detention System Design

by
Teresa Guarda
1,*,
Adolfo J. Sotomayor-Cuadrado
2,
Oscar E. Coronado-Hernández
2,
Alfonso Arrieta-Pastrana
2 and
Jairo R. Coronado-Hernández
3
1
Faculty of Systems and Telecommunications, Universidad Estatal Península Santa Elena, Santa Elena 240204, Ecuador
2
Instituto de Hidráulica y Saneamiento Ambiental, Universidad de Cartagena, Cartagena de Indias 130001, Colombia
3
Department of Productivity and Innovation, Universidad de la Costa, Barranquilla 080002, Colombia
*
Author to whom correspondence should be addressed.
Water 2026, 18(4), 483; https://doi.org/10.3390/w18040483
Submission received: 13 January 2026 / Revised: 2 February 2026 / Accepted: 11 February 2026 / Published: 13 February 2026
(This article belongs to the Section Urban Water Management)

Abstract

The rapid expansion of impervious surfaces in urban environments has significantly increased surface runoff and flood risk. Detention basins, implemented as part of Sustainable Urban Drainage Systems (SUDSs), are widely adopted worldwide to control peak discharges and mitigate recurrent flooding. In this study, an explicit flood routing model is applied to simulate the hydraulic behaviour of an urban detention reservoir, offering a computationally efficient alternative to traditional implicit numerical schemes by avoiding iterative solution procedures. In parallel, twenty-eight machine learning (ML) models are evaluated to estimate the percentage reduction in peak discharge required to comply with local regulatory constraints. The proposed framework integrates explicit hydrological routing with data-driven modelling to support decision-making during the design of detention systems. The methodology is applied to an urban catchment in Cartagena, Colombia, comparing an uncontrolled inflow hydrograph (without SUDSs) with an attenuated outflow hydrograph produced by the detention basin. The results demonstrate a substantial reduction in peak discharge and a delay in the time to peak, fully complying with Colombian regulations that require a minimum attenuation of 30%. Among the evaluated ML models, Squared Exponential Gaussian Process Regression achieved the best performance, yielding coefficient of determination (R2) values of 0.999 in both the validation and test sets. The findings confirm the potential of machine learning techniques to quantify peak-flow reduction requirements accurately and to support the planning and design of detention reservoirs in urban environments. The proposed approach constitutes a practical, efficient, and replicable tool for sustainable urban drainage design since the results of this research can be used to design detention pond systems employing ML tools.

1. Introduction

The accelerated growth of urban areas has generated increasing concern about the effective management of water resources, particularly for controlling surface runoff. Progressive land impermeabilisation—associated with pavements, buildings, and other hard surfaces—has substantially increased peak discharges and flood frequency in urban catchments [1,2]. These hydrological alterations disrupt the natural water cycle and intensify pressure on conventional drainage systems, increasing the likelihood of pluvial flooding.
In this context, Sustainable Urban Drainage Systems (SUDSs) have emerged as a technically robust and environmentally sustainable strategy to mitigate the adverse hydrological impacts of urbanisation. SUDSs promote runoff infiltration, temporary storage, and controlled release, thereby reducing flood risk while enhancing the resilience of urban drainage networks [3,4].
Among the various SUDS typologies, detention storage systems play a particularly relevant role. Detention basins operate as temporary reservoirs that store stormwater during rainfall events and regulate its release, reducing both runoff velocity and peak discharge [5,6]. These systems are commonly designed as storm tanks or detention ponds and require accurate flood routing analyses to represent their hydraulic response under extreme rainfall conditions.
Reliable modelling of detention basin behaviour depends on the appropriate selection of flood routing methods. Classical hydrological approaches, such as level-pool routing and the Muskingum method, have been extensively documented and applied since the seminal works of Chow [7], Cunge [8], and Barry and Bajracharya [9]. Although these implicit methods are well established, they often require iterative solution schemes. They may present limitations when high temporal resolution or rapid simulation is needed, particularly in complex urban environments.
To address these limitations, explicit numerical flood routing methods have been developed, offering notable computational advantages by eliminating iterative procedures and enabling faster simulations without compromising numerical stability or accuracy [10,11,12]. Recent studies have validated explicit schemes in urban drainage applications, demonstrating their effectiveness for evaluating the hydraulic performance of detention basins and other SUDS components [13,14]. For example, Nematollahi et al. [15] compared numerical and analytical formulations for storm tanks and showed that explicit methods can outperform traditional approaches under multiple design scenarios. Similarly, Pereira Souza et al. [16] and D’Ambrosio et al. [17] reported significant reductions in peak discharge in European urban catchments using explicit routing schemes. Salvati et al. [18] further highlighted the need to move beyond conventional Muskingum-type formulations towards more dynamic and flexible modelling approaches.
Despite these international advances, the application of explicit flood routing methods in Colombia remains limited. Studies such as Torres et al. [19] have identified technical and regulatory barriers to the widespread adoption of SUDSs in major Colombian cities, including Barranquilla. However, recent regulatory developments—particularly Resolution 0799 of 2021 issued by the Colombian Ministry of Housing, City and Territory—have introduced minimum technical criteria for new urban developments that modify land cover. These regulations require attenuating peak inflow discharges by at least 30% to offset the hydrological effects of increased surface impermeabilisation. Other recent studies have focused on the thermal regime of stormwater ponds, based on measurements collected over a three-year period [20]. Despite these advances, uncertainty quantification for applying machine-learning methods to streamflow prediction under a changing climate remains underdeveloped [21]. In this context, data-assimilation approaches have been investigated by Martin et al. [22] to mitigate uncertainty-related risks.
In recent years, machine learning (ML), as a core component of artificial intelligence, has proven effective for solving complex hydrological problems characterised by nonlinearity, uncertainty, and data heterogeneity. ML models are increasingly integrated into digital twin frameworks for urban water systems, where they complement physically based models by capturing patterns and relationships that are difficult to represent analytically. In the context of detention basin design, ML techniques can efficiently learn the relationship between inflow characteristics, reservoir geometry, outlet conditions, and resulting peak attenuation, enabling rapid estimation of regulatory compliance under multiple design scenarios. By reducing computational burden and supporting scenario-based analysis, ML presets provide a powerful decision-support tool for urban drainage planning.
In light of the above, this study proposes a combined framework that integrates an explicit flood-routing method with machine-learning models to assess the hydraulic performance of an urban detention system designed as part of a SUDS strategy. The methodology is applied to a developing area in the city of Cartagena de Indias, Colombia, where future urbanisation is expected to result in near-total surface impermeabilisation. The analysis demonstrates that appropriate detention basin design can achieve peak discharge reductions exceeding the regulatory threshold of 30%, while complying with national guidelines and established hydraulic criteria.
Accordingly, the main objective of this research is to integrate explicit numerical flood routing with machine-learning-based predictive models to support the design and evaluation of urban detention systems. By explicitly simulating the transformation of an uncontrolled inflow hydrograph into an attenuated outflow hydrograph, the proposed approach captures both peak reduction and time-to-peak delay, highlighting the buffering effect of detention storage. These hydrograph transformations provide a clear quantitative and visual basis for assessing the effectiveness of SUDSs. Ultimately, this study aims to validate explicit schemes as reliable and accessible design tools and to demonstrate how machine learning can enhance decision-making by providing precise and efficient estimates of the required peak-flow attenuation.

2. Materials and Methods

In this research, an explicit hydrological analysis method was developed to evaluate the attenuation effect produced by detention-type reservoirs. The proposed approach quantifies the reduction in inflow discharge ( Q a ) relative to the attenuated outflow hydrograph ( Q d ), considering a reservoir equipped with a weir-type outlet control structure.
In parallel, machine learning (ML) presets are evaluated to identify the most suitable data-driven approach for representing an optimal solution to the problem. The ML component is used to estimate the percentage reduction in peak outflow discharge from hydraulic and hydrological input variables.
Figure 1 summarises the methodological framework adopted in this study and is organised into three main steps. Step I involves applying the Rational Method to compute the inflow hydrograph in accordance with local regulatory requirements. Step II consists of implementing the explicit water-level–pool routing method developed by the authors [10] to simulate the detention reservoir’s dynamic hydraulic behaviour. Step III presents the application of the selected ML presets, which are trained and validated to provide a reliable prediction of the percentage attenuation of the peak outflow hydrograph.

2.1. Estimation of the Inflow Hydrograph

This research focuses on a small urban catchment; therefore, the inflow discharge ( Q a ) to the detention reservoir is estimated using the Rational Method, which is widely applied in hydrological design for urban areas characterised by short concentration times. This method provides a reliable estimate of the design peak discharge by accounting for land use, rainfall characteristics, and catchment size under projected urban conditions. The inflow peak discharge is computed as:
Q a = C r I A c 360
where Q a is the inflow (design) peak discharge (m3 s−1), C r is the runoff coefficient (–), determined according to land use and surface cover conditions and typically ranging between 0.80 and 0.95 for highly impervious urban surfaces such as pavements and rooftops; I is the design rainfall intensity (mm h−1), associated with a given return period ( R p ) and a storm duration equal to the catchment concentration time, as defined by the local Intensity–Duration–Frequency (IDF) curves; and A c is the contributing catchment area (ha) draining directly towards the detention reservoir.
The computed inflow discharge ( Q a ) represents the uncontrolled scenario, that is, conditions without the implementation of the SUDS. This discharge is subsequently used as an input variable in the proposed modelling framework to assess the detention system’s hydraulic attenuation capacity.
The inflow hydrograph is generated assuming a triangular shape, a common simplification for urban catchments with a rapid runoff response. The base time ( T b ) of the hydrograph is defined as T b = 2.67 T p , where T p denotes the time to peak of the rainfall–runoff event. This assumption enables a simplified yet physically reasonable representation of typical urban runoff hydrographs while maintaining consistency with design-oriented hydrological practice.

2.2. Explicit Water Level–Pool Routing Method

Figure 2 schematically illustrates the hydrological behaviour of a detention storage system with weir-controlled outflow during a short-duration, high-intensity rainfall event characteristic of highly impervious urban environments. The detention basin is represented as a temporary storage unit receiving an inflow discharge ( Q a ), corresponding to the uncontrolled urban peak discharge, and releasing an attenuated outflow discharge ( Q d ) regulated by the SUDS through a weir-type outlet structure.
The outflow hydrograph ( Q d ) represents the regulated discharge released after the implementation of the detention system. Both inflow and outflow discharges are analysed over discrete time intervals between instants t and t + Δ t , allowing the transient hydrological response of the storage system to be captured.
The detention basin is modelled assuming a constant horizontal water surface and a constant surface area ( A ), while flow release is governed by a rectangular weir. The lower part of Figure 2 presents the inflow and outflow hydrographs, where the inflow hydrograph ( Q a ) exhibits a higher peak discharge and shorter time to peak. In contrast, the attenuated outflow hydrograph ( Q d ) shows a reduced peak magnitude and delayed response. This behaviour reflects the buffering capacity of detention storage systems to control urban runoff.
This conceptual representation is consistent with the principle of mass conservation and underpins the application of the explicit routing method adopted in this study. Hydrological routing within the detention system is performed using the explicit water level–pool routing scheme proposed by Arrieta-Pastrana et al. [10], which combines mass conservation with the hydraulic formulation of weir flow. This approach enables direct estimation of water-level variations and discharge without resorting to iterative implicit procedures.
The variation in stored volume within the reservoir over the time interval t , t + Δ t is computed as:
Δ V = Q a , t + Q a , t + Δ t 2 Q d , t Δ t
where Q a , t is the inflow discharge (m3 s−1) at time t , Q d , t is the outflow discharge (m3 s−1) at the same instant, and Δ t is the time step (s).
The outflow discharge through the rectangular weir is calculated using:
Q d = C B h 3 / 2
where C is the dimensionless weir discharge coefficient, B is the weir crest length (m), and h is the water head above the weir crest (m).
By combining Equations (2) and (3), and applying Newton’s binomial theorem, an explicit formulation for the variation in water level is obtained:
Δ h = Q a , t + Q a , t + Δ t 2 C B h 3 / 2 3 2 C B h 3 / 2 + 2 A Δ t
where Δ h denotes the variation in water level within the reservoir (m) and A is the constant surface area of the basin (m2). This formulation enables direct updating of the water level and discharge at each time step, thereby significantly improving computational efficiency compared with traditional implicit routing methods. The explicit scheme is particularly suitable for urban applications requiring rapid simulation while maintaining hydraulic accuracy.
The sequential implementation of the explicit routing scheme is summarised in Figure 3 and consists of the following steps:
  • Definition of design parameters: The catchment area ( A c ), runoff coefficient ( C r ), and rainfall intensity ( I ) are defined based on land use conditions and local IDF curves. The inflow peak discharge is then computed using the Rational Method (Equation (1)).
  • Generation of the inflow hydrograph ( Q a ): A synthetic triangular hydrograph is generated based on the calculated peak discharge, assuming a catchment concentration time typically ranging between 10 and 15 min and a temporal distribution representative of urban rainfall events.
  • Definition of detention basin and weir geometry: The reservoir surface area ( A ), rectangular weir crest length ( B ), and total weir height ( H ) are defined. These parameters strongly influence the system’s attenuation capacity, as insufficient storage volume or excessive crest length may limit peak-flow reduction.
  • Selection of the time step ( Δ t ): The time step is chosen to ensure numerical stability and accuracy, satisfying the condition:
Δ t 0.10 T p
where T p is the time to peak of the inflow hydrograph.
  • Initial conditions: The reservoir is assumed to be initially empty, with an initial water depth h 0 = 0   m and outflow discharge Q d = 0 .
  • Application of the explicit routing model: At each time step, the variation in water level is computed using Equation (4), and the updated water depth is obtained as h t + Δ t = h t + Δ h t . The corresponding outflow discharge is then calculated using Equation (3).
  • Computation of the outflow hydrograph ( Q d ): The attenuated discharge is recorded at each time instant, generating the complete outflow hydrograph.
  • Simulation termination criteria: The simulation is terminated once the required percentage reduction in peak discharge is achieved, defined as:
% Reduction = 1 Q d , peak Q a , peak × 100
Additionally, it is verified that the maximum water depth ( h m a x ) maintains sufficient freeboard above the weir crest in accordance with hydraulic safety criteria. If the target attenuation is not achieved, the reservoir surface area ( A ) and/or weir crest length ( B ) are redefined, and the simulation is repeated.

2.3. Machine Learning Methodology

The objective of implementing machine learning (ML) presets is to develop a data-driven surrogate model that reproduces the results obtained from the explicit water-level–pool routing method described in Section 2.2. Given the wide variety of available ML model families, selecting an appropriate preset is a critical step to ensure robustness, accuracy, and generalisability of predictions. Accordingly, this study evaluates 28 ML algorithms to identify the most suitable model for estimating peak flow attenuation in detention storage systems.
The assessed models include linear and stepwise linear regression; decision tree–based models; support vector machines (SVMs); efficient linear models; ensemble learning methods; Gaussian Process Regression (GPR); artificial neural networks; and kernel-based approaches. These model types were selected to represent a broad spectrum of linear and nonlinear, parametric and nonparametric learning strategies.
All ML algorithms were implemented using the standard hyperparameter configurations provided by MATLAB R2024b. This choice ensures methodological transparency and reproducibility while allowing an objective comparison of model performance. The dataset was evaluated using a five-fold cross-validation scheme, with 20% of the data reserved as an independent test set. This validation strategy was adopted to minimise overfitting and to ensure a reliable assessment of predictive performance. Five-fold cross-validation was employed, given the size of the available dataset.
Figure 4 illustrates the predictor–response structure adopted in this study. The predictors correspond to the detention basin and outlet parameters—reservoir surface area ( A ), weir crest length ( B ), and weir discharge coefficient ( C )—while the response variable is the percentage reduction of the peak discharge. The primary objective of the ML framework is therefore to accurately estimate the required peak-flow attenuation, a key design criterion for compliance with local regulatory constraints governing urban drainage systems.
Among the evaluated algorithms, Gaussian Process Regression exhibited the best predictive performance across training, validation, and testing stages. GPR is a probabilistic, nonparametric modelling approach that represents the relationship between predictors and the response using a Gaussian stochastic process. The general formulation of the regression model can be expressed as:
y = x T β + ε
where y denotes the predicted percentage reduction of the peak discharge, x is the vector of input predictors ( A , B , and C ), β represents the regression coefficients estimated during model training, and ε is a zero-mean Gaussian noise term accounting for model uncertainty.
During hyperparameter optimisation, the Squared Exponential kernel provided the best performance for this application. The covariance function is defined as:
k ( x i , x j θ ) = σ f 2 exp 1 2 x i x j ) T ( x i x j σ l 2
where k ( x i , x j ) is the covariance between input vectors x i and x j , θ denotes the kernel hyperparameters, σ l is the characteristic length scale controlling smoothness of the function, and σ f represents the signal standard deviation.
The Squared Exponential kernel enables the model to capture smooth, nonlinear relationships that is presented in the explicit routing method between hydraulic parameters and peak-flow attenuation, making it particularly suitable for detention-basin design applications.

3. Results

3.1. Configuration of a Case Study

The present study was conducted on a plot located in the Villa Rosita neighbourhood, in the eastern sector of the city of Cartagena de Indias, Colombia, with approximate central coordinates of 10°23′59.24″ N and 75°28′8.11″ W. The site is currently undeveloped, featuring predominantly vegetated cover with scattered trees, and is surrounded by consolidated urban areas. Two major road corridors bound it—Pedro de Heredia Avenue and Pedro Romero Avenue—making it a strategically important area for future residential and commercial development.
The contributing catchment area coincides with the plot surface and was delineated using high-resolution satellite imagery freely available from Google Earth. This analysis yielded an estimated catchment area of 12,835 m2 (1.28 ha). The site topography is characterised by gentle slopes, generally below 5%, which facilitate efficient surface runoff towards a defined hydraulic control point where the detention storage system is proposed.
According to the Land Use Plan (Plan de Ordenamiento Territorial in Spanish) of the District of Cartagena de Indias, the study area is classified as a zone suitable for urban consolidation and the development of new urban centres, promoting mixed land use, improved urban infrastructure, and the integration of public space systems with sustainable drainage solutions [23]. Under this planning framework, intensive urbanisation of the plot is anticipated, resulting in substantial surface impermeabilisation due to pavements, rooftops, and other built structures.
This transformation of land-surface conditions is expected to significantly increase surface runoff and peak discharges, thereby justifying the implementation of a hydraulic control measure. In this context, a detention storage system with weir-controlled outflow is proposed. The location of the detention basin within the plot, as illustrated in Figure 5, has been strategically selected to mitigate increases in runoff volume and flow velocity under post-urbanisation conditions.
To estimate the inflow discharge to the detention system, the Rational Method was adopted, as it is widely used for small urban catchments. In accordance with the recommendations of the INVIAS Highway Drainage Manual [24], a runoff coefficient of C r = 0.95 was selected, reflecting the projected entirely impervious condition of the site due to the predominance of hard surfaces and roofed areas.
The time of concentration ( T c ) was set to 10 min, following the guidelines established in Resolution 0330 of 2017 issued by the Colombian Ministry of Housing, City and Territory [25], based on the catchment size and the characteristics of the proposed drainage system. This value is considered conservative and appropriate for surface drainage design in urban catchments smaller than 2 ha. Additionally, a return period ( T r ) of 3 years was selected in accordance with the same regulation, which specifies this criterion for initial drainage sections in residential areas with contributing areas below 2 hectares.
The design rainfall intensity, I = 140.05 mm h−1, was obtained from the Intensity–Duration–Frequency (IDF) curve corresponding to the IDEAM Rafael Núñez Airport meteorological station (Code 1401502), which is considered representative of the study area [26]. These data correspond to a return period of 3 years and a rainfall duration of 10 min. This return period was considered in the design, in accordance with Resolution 0330 of 2017, for sizing the detention basin.
No losses due to infiltration or initial abstraction were considered, as the projected urbanised condition assumes total surface impermeabilisation. The peak inflow discharge, estimated using the Rational Method (Equation (1)), was calculated as 0.474 m3 s−1. This value represents the post-urbanisation scenario without hydraulic control measures and is subsequently used to generate the inflow hydrograph for the routing model applied in the following analysis.
The proposed hydraulic control system consists of a circular detention reservoir with discharge through a free-flow rectangular weir. The basin surface area will be determined by the available plot area and the project’s functional requirements, as shown in Figure 5.
With respect to the design criterion, the provisions of Resolution 0799 of 2021, issued by the Ministry of Housing, City and Territory, were adopted [25]. This regulation establishes that the peak outflow discharge ( Q d , peak ) must be less than 70% of the peak inflow discharge ( Q a , peak ). This requirement is applied during the simulation stage as a minimum acceptable threshold for hydraulic attenuation, in conjunction with verification of the freeboard condition. All these parameters were implemented in the previously described numerical model to evaluate the attenuation capacity of the proposed detention system under complete urbanisation of the plot.
The objective of the machine learning (ML) modelling is to train an algorithm capable of accurately computing the percentage of peak flow reduction ( R ) produced by the detention system. To this end, the explicit water-level pool-routing method described in Section 2.2 [10] was repeatedly applied, considering different combinations of the governing parameters (predictors) listed in Table 1.
The hydraulic model, based on explicit water-level pool routing, was executed in 50 simulations, systematically varying the parameters listed in Table 1. These simulations generated a dataset comprising the predictors ( A , B , and C ) and the corresponding response variable, defined as the percentage reduction of the peak outflow discharge ( R ).
Figure 6 illustrates the distributions of the predictors and the resulting response values used to train and validate the ML models. According to the hydraulic routing results, the percentage reduction in peak discharge ranges from 15.6% to 57.9%. This variability reflects the combined influence of reservoir geometry and weir characteristics on the system’s attenuation capacity. Notably, a significant proportion of the simulated configurations meet the 30% reduction requirement imposed by local regulations [25].
Subsequently, twenty-eight machine learning presets were trained, validated, and tested using the dataset generated from the hydraulic simulations. Table A1 presents the hyperparameters employed for the 28 ML algorithms. The statistical performance of each model is summarised in Table 2, considering the root mean square error (RMSE) and the coefficient of determination ( R 2 ) for both the validation (V) and testing (T) stages. The grey cell represents the best-performing algorithm according to the metrics. The prediction speed and training time of each ML preset are presented in Table A2.
Table 2 presents a comprehensive comparison of the predictive performance of 28 machine learning models for estimating the percentage reduction in peak discharge. Overall, linear and interaction-based regression models perform well (R2 ≈ 0.98), indicating that the relationship between the predictors and the response is partly linear. However, tree-based models (fine, medium, and coarse trees) exhibit noticeably poorer performance, with low R2 values and higher RMSE, suggesting limited capacity to capture the underlying hydraulic behaviour in the available dataset. Support Vector Machines with polynomial kernels (quadratic and cubic) perform well, highlighting the importance of nonlinear representations. Among all evaluated approaches, the Gaussian Process Regression (GPR) models exhibited the best overall performance. In particular, the squared exponential GPR kernel yielded the highest accuracy, achieving coefficients of determination of 0.999 and 1.000 in the validation and test phases, respectively. Correspondingly, the RMSE values were 0.3% during validation and 0.1% during testing, indicating excellent agreement between predicted and simulated peak-flow reduction values.
Figure 7 provides a comparative statistical assessment of the predictive performance of the evaluated machine learning models during the validation and testing stages. In Figure 7a, the boxplots of RMSE indicate that most models achieve low prediction errors, with median RMSE values generally below 0.03 across both the validation and test datasets. A few higher RMSE outliers are observed, particularly in the validation stage, which are mainly associated with poorly performing tree-based or inefficient linear models identified in Table 2. Similarly, in Figure 7b, the R2 values indicate that most models exhibit strong explanatory power, with median values of 0.9–1.0 across both datasets.
A comparison between true values ( R T ) and model predictions ( R P ) of the percentage of peak flow reduction for the selected machine learning model was conducted, as shown in Figure 8. The square-exponential GPR was chosen because it yielded the best results. Figure 8a depicts the validation stage, whereas Figure 8b depicts the testing stage. In both cases, the scatter points are closely aligned with the 1:1 (perfect prediction) line, indicating an excellent agreement between predicted and observed values.
For the validation dataset, the fitted linear relationship R P = 0.9923 R T + 0.0032 shows a slope very close to unity and a negligible intercept, which suggests minimal bias and high predictive accuracy across the analysed range. Similarly, the testing results exhibit an almost perfect linear fit, R P = 1.003 R T 0.0015 .
The SHAP (Shapley Additive Explanations) analysis was performed to identify the predictors with the most significant average influence on the percentage reduction (R). This analysis is critical because it explains deviations in model predictions and provides a quantitative assessment of the relative importance of R for each predictor. Figure 9 presents the results for highlighting the relative influence of the predictors on the machine learning model output (percentage reduction in peak discharges). The results indicate that the weir crest length ( B ) and the reservoir surface area ( A ) are the dominant controlling variables, exhibiting nearly identical and substantially higher SHAP values compared with the remaining predictors, with values of 0.0499 and 0.0491, respectively. This confirms that the geometric characteristics of the detention system primarily govern the attenuation performance.
In contrast, the weir discharge coefficient ( C ) shows a markedly lower contribution to the model response, suggesting a secondary influence within the analysed parameter ranges with a SHAP value of 0.006.

3.2. Design of the Detention Basin

Once the machine learning (ML) model was established, the detention basin design was carried out by exporting the trained model to the Simulink environment, as illustrated in Figure 10. A maximum effective weir head ( h max ) of 0.30 m was defined for system discharge. As a hydraulic safety criterion, a minimum freeboard of 0.10 m above the maximum operating water level was imposed to ensure stable and safe operation under design conditions.
Under these constraints, the optimal detention basin configuration resulted in a reservoir surface area ( A ) of 584 m2 and a weir crest length ( B ) of 4.50 m. A discharge coefficient of C = 1.42 was adopted, which is representative of rectangular weirs operating under free-flow conditions without lateral contraction. These parameters fully define the outlet structure and are directly incorporated into the proposed explicit water level pool routing model.
The trained machine learning model employed in this study, based on a square exponential Gaussian Process Regression (GPR), is provided in the Supplementary Material to facilitate reproducibility and future application.
Hydrological routing within the detention system was simulated using the explicit model described above, with the inflow hydrograph for the post-urbanisation scenario without hydraulic control as input. A time step of Δt = 0.01 h was adopted, with a total simulation duration of 0.60 h (36 min).
The explicit water level pool routing results (Figure 11) indicate a peak outflow discharge ( Q d , p e a k ) of 0.332 m3 s−1, corresponding to a substantial attenuation of the inflow peak. The maximum water depth reached within the reservoir ( h m a x ) was 0.14 m, which remains well below the effective weir height of 0.30 m. Consequently, a freeboard of 0.16 m was preserved, representing approximately 53% of the available effective height and comfortably exceeding the minimum safety requirement.
According to Resolution 0799 of 2021 issued by the Ministry of Housing, City and Territory [25], an urban drainage system is considered hydraulically adequate when the peak outflow is at least 30% lower than the peak inflow. Under the analysed conditions, the machine learning model predicts a 30% reduction in peak flow, confirming that the proposed detention basin design satisfies the hydraulic performance criteria established by the current regulatory framework.

4. Discussion

It should be borne in mind that the proposed methodology enables decision-makers to rapidly assess the behaviour of the peak-flow reduction percentage, given a known inflow hydrograph that must be calculated under prevailing hydrological conditions. Nevertheless, it should be noted that the machine learning model is only valid within the training parameter range.
Local authorities shall verify compliance with the requirement for a 30% reduction in peak flow for the specified return period in the design of Urban Detention Systems, to ensure that flooding does not increase in urban areas. Moreover, the proposed methodology constitutes a practical tool for rapid decision-making when dimensional changes occur during the construction stage of Sustainable Urban Drainage Systems (SUDSs), as compliance with the 30% reduction requirement can be verified immediately.
Although the proposed methodology considers a triangular inlet hydrograph, the ML model can accommodate alternative hydrograph shapes, depending on the hydrological conditions defined by engineers and designers. In this study, the triangular inlet hydrograph was selected because project areas can typically be represented within the acceptable ranges of this hydrograph.
Finally, it is essential to ensure that the trained ML model does not overfit to guarantee reliability. In the analysed case study (Section 3), the performance metrics (R2 and RMSE) yielded satisfactory values both during validation and testing. Figure 12 presents the results of the squared-exponential GPR, showing that, in all cases, the residuals are below 1% of the peak-flow reduction.

5. Conclusions

This study presents an integrated framework that combines an explicit water-level pool-routing method with machine learning techniques for the design and performance assessment of detention systems in urban catchments. The explicit routing formulation was used to generate the training dataset for the machine learning models, considering three key predictors: the weir discharge coefficient ( C ), the reservoir surface area ( A ), and the weir crest length ( B ). The response variable was defined as the percentage reduction of the peak flow ( R ), which is constrained by regulatory requirements established at the national level.
A comprehensive assessment of 28 machine learning presets demonstrated that Gaussian Process Regression with a squared-exponential kernel achieved the best predictive performance. This model exhibited an excellent agreement between predicted and true percentage of R , achieving coefficients of determination close to unity and very low RMSE values during both the validation and testing stages.
The trained machine learning model was successfully incorporated into the detention basin design workflow, enabling rapid and accurate identification of reservoir configurations that comply with regulatory constraints. In the analysed case study, the proposed design achieved a minimum 30% reduction in peak discharge required by Colombian regulations, while maintaining adequate hydraulic safety conditions within the system.
The proposed framework represents a practical and efficient tool for supporting decision-making in the design of Sustainable Urban Drainage Systems (SUDSs). By integrating physics-based explicit hydrological modelling with data-driven machine learning approaches, this research contributes to the consolidation of robust and replicable technical design criteria aligned with current regulatory guidelines and urban flood mitigation strategies.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/w18040483/s1, Simulink model and code text for the Square Exponential GPR ML preset for computing R .

Author Contributions

Conceptualization, T.G., A.J.S.-C. and O.E.C.-H.; methodology, T.G., A.J.S.-C. and A.A.-P.; formal analysis, A.J.S.-C., J.R.C.-H. and T.G.; writing—original draft preparation, A.J.S.-C., O.E.C.-H. and A.A.-P.; writing—review and editing, T.G. and J.R.C.-H. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in this study are included in the article/Supplementary Material. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A

Table A1. Hyperparameters of ML models.
Table A1. Hyperparameters of ML models.
PresetHyperparametersPresetHyperparameters
LinearTerms: LinearEfficient Linear SVMLearner: SVM
Interactions LinearTerms: InteractionsBoosted TreesMinimum leaf size: 8
Robust LinearTerms: LinearBagged TreesMinimum leaf size: 8
Stepwise LinearInitial terms: LinearSquared Exponential GPRBasis function: Constant
Fine TreeMinimum leaf size: 4Matern 5/2 GPRBasis function: Constant
Medium TreeMinimum leaf size: 12Exponential GPRBasis function: Constant
Coarse TreeMinimum leaf size: 36Rational Quadratic GPRBasis function: Constant
Linear SVMKernel function: LinearNarrow Neural NetworkNo. of fully connected layers: 1
Quadratic SVMKernel function: QuadraticMedium Neural NetworkNo. of fully connected layers: 1
Cubic SVMKernel function: CubicWide Neural NetworkNo. of fully connected layers: 1
Fine Gaussian SVMKernel function: GaussianBilayered Neural NetworkNo. of fully connected layers: 2
Medium Gaussian SVMKernel function: GaussianTrilayered Neural NetworkNo. of fully connected layers: 3
Coarse Gaussian SVMKernel function: GaussianSVM KernelLearner: SVM
Eff. Linear Least SquaresLearner: Least squaresLeast Squares Regression KernelLearner: Least Squares Kernel
Note(s): No. = Number, and Eff. = Efficient.
Table A2. Prediction speed and training time of each ML preset.
Table A2. Prediction speed and training time of each ML preset.
PresetPrediction Speed (obs/s)Training Time (s)PresetPrediction Speed (obs/s)Training Time (s)
Linear243.825.1Efficient Linear SVM638.329.5
Interactions Linear242.917.2Boosted Trees318.929.0
Robust Linear331.212.2Bagged Trees317.627.5
Stepwise Linear426.036.3Squared Exponential GPR900.125.8
Fine Tree1010.835.3Matern 5/2 GPR1011.425.2
Medium Tree997.734.4Exponential GPR930.724.4
Coarse Tree902.033.8Rational Quadratic GPR985.523.2
Linear SVM682.233.4Narrow Neural Network370.136.8
Quadratic SVM966.232.7Medium Neural Network528.635.8
Cubic SVM777.032.3Wide Neural Network761.535.1
Fine Gaussian SVM988.431.9Bilayered Neural Network716.834.7
Medium Gaussian SVM1219.731.5Trilayered Neural Network893.633.9
Coarse Gaussian SVM1487.830.9SVM Kernel912.933.3
Eff. Linear Least Squares1076.930.4Least Squares Reg. Kernel868.932.7
Note(s): Eff. = Efficient, and Reg. = Regression.

References

  1. Beckingham, B.; Callahan, T.; Vulava, V. Stormwater Ponds in the Southeastern U.S. Coastal Plain: Hydrogeology, Contaminant Fate, and the Need for a Social-Ecological Framework. Front. Environ. Sci. 2019, 7, 117. [Google Scholar] [CrossRef]
  2. Traver, R.G. Comparison of Routing Techniques in a Stormwater Wetlands BMP. In Global Solutions for Urban Drainage; American Society of Civil Engineers: Reston, VA, USA, 2002; pp. 1–9. [Google Scholar] [CrossRef]
  3. Avila, H.; Sisa, A.; Avila, L. Stormwater Infrastructure for Flash Flood Management and SUDS Master Plan Needs for the City of Barranquilla. In Proceedings of the IAHR World Congress; International Association for Hydro-Environment Engineering and Research: Madrid, Spain, 2019; pp. 1243–1252. [Google Scholar] [CrossRef]
  4. Cubides, E.; Santos, G. Control de escorrentías urbanas mediante Sistemas Urbanos de Drenaje Sostenible (SUDS): Pozos/Zanjas de infiltración. Entre Cienc. E Ing. 2018, 12, 24. [Google Scholar] [CrossRef]
  5. Fonseca Alves, L.G.; de Oliveira Galvão, L.G.; de Farias Santos, B.L.; de Oliveira, E.F.; de Moraes, D.A. Modelling and assessment of sustainable urban drainage systems in dense precarious settlements subject to flash floods. LHB Hydrosci. J. 2022, 108, 2016024. [Google Scholar] [CrossRef]
  6. Zhang, L.; Nan, Z.; Liang, X.; Xu, Y.; Hernández, F.; Li, L. Application of the MacCormack scheme to overland flow routing for a high-spatial resolution distributed hydrological model. J. Hydrol. 2018, 558, 421–431. [Google Scholar] [CrossRef]
  7. Chow, V.; Maidment, D.; Mays, L. Applied Hydrology; McGraw-Hill International Editions, Civil Engineering Series; McGraw-Hill Science/Engineering/Math: Columbus, OH, USA, 1988. [Google Scholar]
  8. Cunge, J.A. On The Subject of a Flood Propagation Computation Method (Musklngum Method). J. Hydraul. Res. 1969, 7, 205–230. [Google Scholar] [CrossRef]
  9. Barry, D.A.; Bajracharya, K. On the Muskingum-Cunge flood routing method. Environ. Int. 1995, 21, 485–490. [Google Scholar] [CrossRef]
  10. Arrieta-Pastrana, A.; Coronado-Hernández, O.E.; Fuertes-Miquel, V.S. Development of an Explicit Water Level Pool Routing Method in Reservoirs. Water 2024, 16, 2042. [Google Scholar] [CrossRef]
  11. Fiorentini, M.; Orlandini, S. Robust numerical solution of the reservoir routing equation. Adv. Water Resour. 2013, 59, 123–132. [Google Scholar] [CrossRef]
  12. Li, X.G.; De Wang, B.; Shi, R.H. Numerical Solution to Reservoir Flood Routing. Hydrol Eng. 2009, 14, 197–202. [Google Scholar] [CrossRef]
  13. Gomes, M.N.; Taha, A.F.; Rápalo, L.M.C.; Mendiondo, E.M.; Giacomoni, M.H. Real-time regulation of detention ponds via feedback control: Balancing flood mitigation and water quality. J. Hydrol. 2024, 643, 131866. [Google Scholar] [CrossRef]
  14. Shen, T.; Wang, R.; Jiao, P.; Wang, Y. Evaluation of Drainage Water Detention Efficiency of Off-Line Ditch-Pond Systems and Its Influencing Factors. Water 2021, 13, 3029. [Google Scholar] [CrossRef]
  15. Nematollahi, B.; Niazkar, M.; Talebbeydokhti, N. Correction to: Analytical and Numerical Solutions to Level Pool Routing Equations for Simplified Shapes of Inflow Hydrographs. Iran. J. Sci. Technol. Trans. Civ. Eng. 2022, 46, 3511. [Google Scholar] [CrossRef]
  16. Pereira Souza, F.; Leite Costa, M.E.; Koide, S. Hydrological Modelling and Evaluation of Detention Ponds to Improve Urban Drainage System and Water Quality. Water 2019, 11, 1547. [Google Scholar] [CrossRef]
  17. D’Ambrosio, R.; Longobardi, A.; Schmalz, B. SuDS as a climate change adaptation strategy: Scenario-based analysis for an urban catchment in northern Italy. Urban Clim. 2023, 51, 101596. [Google Scholar] [CrossRef]
  18. Salvati, A.; Moghaddam Nia, A.; Salajegheh, A.; Shirzadi, A.; Shahabi, H.; Ahmadisharaf, E.; Han, D.; Clague, J.J. A systematic review of Muskingum flood routing techniques. Hydrol. Sci. J. 2024, 69, 810–831. [Google Scholar] [CrossRef]
  19. Torres, M.N.; Fontecha, J.E.; Zhu, Z.; Walteros, J.L.; Rodríguez, J.P. A participatory approach based on stochastic optimization for the spatial allocation of Sustainable Urban Drainage Systems for rainwater harvesting. Env. Model. Softw. 2020, 123, 104532. [Google Scholar] [CrossRef]
  20. Stajkowski, S.; Hotson, E.; Zorica, M.; Farghaly, H.; Bonakdari, H.; McBean, E.; Gharabaghi, B. Modeling stormwater management pond thermal impacts during storm events. J. Hydrol. 2023, 620, 129413. [Google Scholar] [CrossRef]
  21. Liu, S.; Lu, D.; Painter, S.L.; Griths, N.A.; Pierce, E.M. Uncertainty quantification of machine learning models to improve streamflow prediction under changing climate and environmental conditions. Front. Water 2023, 5, 1150126. [Google Scholar] [CrossRef]
  22. Martin, N.; White, J. Water Resources’ AI–ML Data Uncertainty Risk and Mitigation Using Data Assimilation. Water 2024, 16, 2758. [Google Scholar] [CrossRef]
  23. Alcaldía de Cartagena de Indias, Plan de Ordenamiento Territorial Cartagena de Indias, Departamento de Bolívar, Colombia, 2023. Available online: https://seguimientopot.cartagena.gov.co/sites/default/files/2024-12/DOCUMENTO%20RESUMEN.pdf (accessed on 1 February 2023).
  24. INVIAS, Manual de Drenaje Para Carreteras. Republic of Colombia. 2009. Available online: https://www.invias.gov.co/loader.php?lServicio=Tools2&lTipo=descargas&lFuncion=descargar&idFile=29586 (accessed on 1 February 2026).
  25. Ministerio de Vivienda Ciudad y Territorio, “Resolución 0330 de 2017”, 2017, Colombia. Available online: https://minvivienda.gov.co/normativa/resolucion-0330-2017-0 (accessed on 1 February 2023).
  26. Coronado-Hernández, O.E.; Arrieta-Pastrana, A.; Pérez-Sánchez, M. Explicit scheme approach for calculating rainwater harvesting: Proposed model and practical application. Urban Water J. 2025, 22, 751–760. [Google Scholar] [CrossRef]
Figure 1. Methodological framework adopted in this study. Step I involves estimating the inflow hydrograph using the Rational Method, based on local regulatory parameters. Step II consists of the simulation of the detention reservoir using an explicit water level–pool routing method, in which the full range of hydraulic parameters (weir coefficient C , reservoir surface area A , and weir crest length B ) is evaluated to generate the outflow hydrograph. Step III presents the machine learning workflow, including dataset definition, model training, validation, testing, and selection of the optimal ML preset for predicting peak flow attenuation.
Figure 1. Methodological framework adopted in this study. Step I involves estimating the inflow hydrograph using the Rational Method, based on local regulatory parameters. Step II consists of the simulation of the detention reservoir using an explicit water level–pool routing method, in which the full range of hydraulic parameters (weir coefficient C , reservoir surface area A , and weir crest length B ) is evaluated to generate the outflow hydrograph. Step III presents the machine learning workflow, including dataset definition, model training, validation, testing, and selection of the optimal ML preset for predicting peak flow attenuation.
Water 18 00483 g001
Figure 2. Attenuation of peak discharge through detention storage with weir-controlled outflow, based on inflow ( Q a ) and outflow ( Q d ) hydrographs.
Figure 2. Attenuation of peak discharge through detention storage with weir-controlled outflow, based on inflow ( Q a ) and outflow ( Q d ) hydrographs.
Water 18 00483 g002
Figure 3. Flowchart illustrating the hydrological routing procedure in detention storage systems with weir-controlled outflow using an explicit numerical method.
Figure 3. Flowchart illustrating the hydrological routing procedure in detention storage systems with weir-controlled outflow using an explicit numerical method.
Water 18 00483 g003
Figure 4. Predictor–response pairs used in the machine learning framework.
Figure 4. Predictor–response pairs used in the machine learning framework.
Water 18 00483 g004
Figure 5. Satellite image of the Villa Rosita area, in the eastern sector of Cartagena de Indias, showing the location of the study plot.
Figure 5. Satellite image of the Villa Rosita area, in the eastern sector of Cartagena de Indias, showing the location of the study plot.
Water 18 00483 g005
Figure 6. Analysis of predictors ( A , B , and C ) and response ( R ) for the case study simulations.
Figure 6. Analysis of predictors ( A , B , and C ) and response ( R ) for the case study simulations.
Water 18 00483 g006
Figure 7. Box-and-whisker analysis of the machine learning presets: (a) RMSE; and (b) R2.
Figure 7. Box-and-whisker analysis of the machine learning presets: (a) RMSE; and (b) R2.
Water 18 00483 g007
Figure 8. Comparison between observed and predicted values of the percentage reduction in peak discharge considering the square exponential GPR during: (a) the validation stage; and (b) the testing stage.
Figure 8. Comparison between observed and predicted values of the percentage reduction in peak discharge considering the square exponential GPR during: (a) the validation stage; and (b) the testing stage.
Water 18 00483 g008
Figure 9. Analysis of SHAP values for the selected ML model.
Figure 9. Analysis of SHAP values for the selected ML model.
Water 18 00483 g009
Figure 10. A square-exponential Gaussian Process Regression (GPR) model is used to estimate the percentage reduction in peak flow.
Figure 10. A square-exponential Gaussian Process Regression (GPR) model is used to estimate the percentage reduction in peak flow.
Water 18 00483 g010
Figure 11. Comparison between inflow and outflow hydrographs obtained using the machine learning–based solution.
Figure 11. Comparison between inflow and outflow hydrographs obtained using the machine learning–based solution.
Water 18 00483 g011
Figure 12. Analysis of the residuals of the selected ML model for the case study.
Figure 12. Analysis of the residuals of the selected ML model for the case study.
Water 18 00483 g012
Table 1. Range of parameters employed for training the machine learning model.
Table 1. Range of parameters employed for training the machine learning model.
ParameterUnitFromTo
Weir coefficient ( C )-1.31.5
Reservoir surface area ( A )m2350850
Crest length weir ( B )m26
Table 2. Statistical performance metrics of the evaluated machine learning models.
Table 2. Statistical performance metrics of the evaluated machine learning models.
PresetRMSE
(V)
R2
(V)
RMSE
(T)
R2
(T)
Linear0.0130.9830.0090.979
Interactions Linear0.0150.9800.0080.985
Robust Linear0.0140.9820.0090.979
Stepwise Linear0.0130.9830.0090.981
Fine Tree0.0590.6710.0360.686
Medium Tree0.0770.4300.068−0.153
Coarse Tree0.1020.0000.064−0.022
Linear SVM0.0140.9800.0100.974
Quadratic SVM0.0110.9890.0080.985
Cubic SVM0.0080.9940.0050.995
Fine Gaussian SVM0.0890.2420.0520.339
Medium Gaussian SVM0.0350.8790.0130.956
Coarse Gaussian SVM0.0280.9220.0160.940
Efficient Linear Least Squares0.1010.0170.067−0.116
Efficient Linear SVM0.0980.0890.0630.014
Boosted Trees0.0430.8220.0360.682
Bagged Trees0.0550.7060.0350.687
Squared Exponential GPR0.0030.9990.0011.000
Matern 5/2 GPR0.0040.9990.0011.000
Exponential GPR0.0170.9730.0040.995
Rational Quadratic GPR0.0030.9990.0011.000
Narrow Neural Network0.0150.9790.0080.986
Medium Neural Network0.0280.9260.0080.985
Wide Neural Network0.0230.9500.0250.846
Bilayered Neural Network0.0490.7680.0290.788
Trilayered Neural Network0.0260.9360.0170.931
SVM Kernel0.0210.9570.0070.989
Least Squares Regression Kernel0.0360.8770.0170.932
Note(s): V = Validation and T = Testing. The grey cell represents the best model.
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

Guarda, T.; Sotomayor-Cuadrado, A.J.; Coronado-Hernández, O.E.; Arrieta-Pastrana, A.; Coronado-Hernández, J.R. An Integrated Explicit Hydrological Routing and Machine Learning Framework for Urban Detention System Design. Water 2026, 18, 483. https://doi.org/10.3390/w18040483

AMA Style

Guarda T, Sotomayor-Cuadrado AJ, Coronado-Hernández OE, Arrieta-Pastrana A, Coronado-Hernández JR. An Integrated Explicit Hydrological Routing and Machine Learning Framework for Urban Detention System Design. Water. 2026; 18(4):483. https://doi.org/10.3390/w18040483

Chicago/Turabian Style

Guarda, Teresa, Adolfo J. Sotomayor-Cuadrado, Oscar E. Coronado-Hernández, Alfonso Arrieta-Pastrana, and Jairo R. Coronado-Hernández. 2026. "An Integrated Explicit Hydrological Routing and Machine Learning Framework for Urban Detention System Design" Water 18, no. 4: 483. https://doi.org/10.3390/w18040483

APA Style

Guarda, T., Sotomayor-Cuadrado, A. J., Coronado-Hernández, O. E., Arrieta-Pastrana, A., & Coronado-Hernández, J. R. (2026). An Integrated Explicit Hydrological Routing and Machine Learning Framework for Urban Detention System Design. Water, 18(4), 483. https://doi.org/10.3390/w18040483

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