Technical Papers
Nov 16, 2023

Leveraging Deep Reinforcement Learning for Water Distribution Systems with Large Action Spaces and Uncertainties: DRL-EPANET for Pressure Control

Publication: Journal of Water Resources Planning and Management
Volume 150, Issue 2

Abstract

Deep reinforcement learning (DRL) has undergone a revolution in recent years, enabling researchers to tackle a variety of previously inaccessible sequential decision problems. However, its application to the control of water distribution systems (WDS) remains limited. This research demonstrates the successful application of DRL for pressure control in WDS by simulating an environment using EPANET version 2.2, a popular open-source hydraulic simulator. We highlight the ability of DRL-EPANET to handle large action spaces, with more than 1 million possible actions in each time step, and its capacity to deal with uncertainties such as random pipe breaks. We employ the Branching Dueling Q-Network (BDQ) algorithm, which can learn in this context, and enhance it with an algorithmic modification called BDQ with fixed actions (BDQF) that achieves better rewards, especially when manipulated actions are sparse. The proposed methodology was validated using the hydraulic models of 10 real WDS, one of which integrated transmission and distribution systems operated by Hidralia, and the rest of which were operated by Aigües de Barcelona.

Practical Applications

This research presents the DRL-EPANET framework, which combines deep reinforcement learning and EPANET to optimize water distribution systems. Although the focus of this paper is on pressure control, the approach is highly versatile and can be applied to various sequential decision-making problems within WDS, such as pump optimization, energy management, and water quality control. DRL-EPANET was tested and proven effective on 10 real-world WDS, resulting in as much as 26% improvement in mean pressure compared with the reference solutions. The framework offers real-time control solutions, enabling water utility operators to react quickly to changes in the network. Additionally, it is capable of handling stochastic scenarios, such as random pipe bursts, demand uncertainty, contamination, and component failures, making it a valuable tool for managing complex and unpredictable situations. This method can be developed more with the use of model-based deep reinforcement learning for enhanced sample efficiency, graph neural networks for better representation, and the quantification of agent action uncertainty for improved decision-making in uncharted situations. Overall, DRL-EPANET has the potential to revolutionize the management and operation of water distribution systems, leading to more-efficient use of resources and improved service for consumers.

Get full access to this article

View all available purchase options and get full access to this article.

Data Availability Statement

Our implementation of the BDQ algorithm has been made available as a part of the open-source Tianshou library (https://github.com/thu-ml/tianshou) under the name Branching DQN. The rest of the code and the WDS data are proprietary and sensitive data that belong to Aigües de Barcelona, and may be provided only with restrictions.

References

Agarwal, R., M. Schwarzer, P. S. Castro, A. C. Courville, and M. G. Bellemare. 2021. “Deep reinforcement learning at the edge of the statistical precipice.” Adv. Neural Inf. Process. Syst. 34 (Dec): 29304–29320. https://doi.org/10.48550/arXiv.2108.13264.
Araujo, L., H. Ramos, and S. Coelho. 2006. “Pressure control for leakage minimisation in water distribution systems management.” Water Resour. Manage. 20 (1): 133–149. https://doi.org/10.1007/s11269-006-4635-3.
Berner, C., et al. 2019. “Dota 2 with large scale deep reinforcement learning.” Preprint, submitted December 13, 2019. http://arxiv.org/abs/1912.06680.
Bonthuys, G. J., M. van Dijk, and G. Cavazzini. 2020. “Energy recovery and leakage-reduction optimization of water distribution systems using hydro turbines.” J. Water Resour. Plann. Manage. 146 (5): 04020026. https://doi.org/10.1061/(ASCE)WR.1943-5452.0001203.
Brockman, G., V. Cheung, L. Pettersson, J. Schneider, J. Schulman, J. Tang, and W. Zaremba. 2016. “OpenAI Gym.” Preprint, submitted June 5, 2016. http://arxiv.org/abs/1606.01540.
Cunha, M. D. C., and J. Sousa. 1999. “Water distribution network design optimization: Simulated annealing approach.” J. Water Resour. Plann. Manage. 125 (4): 215–221. https://doi.org/10.1061/(ASCE)0733-9496(1999)125:4(215).
Deuerlein, J. W., A. R. Simpson, and S. Dempe. 2009. “Modeling the behavior of flow regulating devices in water distribution systems using constrained nonlinear programming.” J. Hydraul. Eng. 135 (11): 970–982. https://doi.org/10.1061/(ASCE)HY.1943-7900.0000108.
Hajgató, G., B. Gyires-Tóth, and G. Paál. 2021. “Reconstructing nodal pressures in water distribution systems with graph neural networks.” Preprint, submitted April 28, 2021. http://arxiv.org/abs/2104.13619.
Hajgató, G., G. Paál, and B. Gyires-Tóth. 2020. “Deep reinforcement learning for real-time optimization of pumps in water distribution systems.” J. Water Resour. Plann. Manage. 146 (11): 04020079. https://doi.org/10.1061/(ASCE)WR.1943-5452.0001287.
Jumper, J., et al. 2021. “Highly accurate protein structure prediction with AlphaFold.” Nature 596 (7873): 583–589. https://doi.org/10.1038/s41586-021-03819-2.
Kalashnikov, D., et al. 2018. “Scalable deep reinforcement learning for vision-based robotic manipulation.” In Vol. 87 of Proc., Conf. on Robot Learning, PMLR, 651–673. Breckenridge, CO: Proceedings of Machine Learning Research.
Kiran, B. R., I. Sobh, V. Talpaert, P. Mannion, A. A. Al Sallab, S. Yogamani, and P. Pérez. 2022. “Deep reinforcement learning for autonomous driving: A survey.” IEEE Trans. Intell. Transp. Syst. 23 (6): 4909–4926. https://doi.org/10.1109/TITS.2021.3054625.
Lee, J.-H., and J. W. Labadie. 2007. “Stochastic optimization of multireservoir systems via reinforcement learning.” Water Resour. Res. 43 (11). https://doi.org/10.1029/2006WR005627.
López-Ibáñez, M., T. D. Prasad, and B. Paechter. 2008. “Ant colony optimization for optimal control of pumps in water distribution networks.” J. Water Resour. Plann. Manage. 134 (4): 337–346. https://doi.org/10.1061/(ASCE)0733-9496(2008)134:4(337).
Mala-Jetmarova, H., N. Sultanova, and D. Savic. 2017. “Lost in optimisation of water distribution systems? A literature review of system operation.” Environ. Modell. Software 93 (Jul): 209–254. https://doi.org/10.1016/j.envsoft.2017.02.009.
Mnih, V., et al. 2015. “Human-level control through deep reinforcement learning.” Nature 518 (7540): 529–533. https://doi.org/10.1038/nature14236.
Mosetlhe, T. C., Y. Hamam, S. Du, E. Monacelli, and A. A. Yusuff. 2020. “Towards model-free pressure control in water distribution networks.” Water 12 (10): 2697. https://doi.org/10.3390/w12102697.
Mullapudi, A., M. J. Lewis, C. L. Gruden, and B. Kerkez. 2020. “Deep reinforcement learning for the real time control of stormwater systems.” Adv. Water Resour. 140 (Jun): 103600. https://doi.org/10.1016/j.advwatres.2020.103600.
Prasad, T. D., and N.-S. Park. 2004. “Multiobjective genetic algorithms for design of water distribution networks.” J. Water Resour. Plann. Manage. 130 (1): 73–82. https://doi.org/10.1061/(ASCE)0733-9496(2004)130:1(73).
Rao, Z., and F. Alvarruiz. 2007. “Use of an artificial neural network to capture the domain knowledge of a conventional hydraulic simulation model.” J. Hydroinf. 9 (1): 15–24. https://doi.org/10.2166/hydro.2006.014.
Savic, D. A., and G. A. Walters. 1997. “Genetic algorithms for least-cost design of water distribution networks.” J. Water Resour. Plann. Manage. 123 (2): 67–77. https://doi.org/10.1061/(ASCE)0733-9496(1997)123:2(67).
Savić, D., H. Mala-Jetmarova, and N. Sultanova. 2018. “History of optimization in water distribution system analysis.” In Vol. 1 of Proc., WDSA/CCWI Joint Conf. Kingston, Canada: Queen’s Univ.
Schaake, J. C., Jr., and D. Lai. 1969. Linear programming and dynamic programming application to water distribution network design. Cambridge, MA: MIT Hydrodynamics Laboratory.
Silver, D., et al. 2016. “Mastering the game of Go with deep neural networks and tree search.” Nature 529 (7587): 484–489. https://doi.org/10.1038/nature16961.
Silver, D., et al. 2018. “A general reinforcement learning algorithm that masters chess, shogi, and Go through self-play.” Science 362 (6419): 1140–1144. https://doi.org/10.1126/science.aar6404.
Suribabu, C., and T. Neelakantan. 2006. “Design of water distribution networks using particle swarm optimization.” Urban Water J. 3 (2): 111–120. https://doi.org/10.1080/15730620600855928.
Sutton, R. S., and A. G. Barto. 2018. Reinforcement learning: An introduction. Cambridge, MA: MIT Press.
Tavakoli, A., F. Pardo, and P. Kormushev. 2017. “Action branching architectures for deep reinforcement learning.” Preprint, submitted April 29, 2018. http://arxiv.org/abs/1711.08946.
Vinyals, O., et al. 2017. “StarCraft II: A new challenge for reinforcement learning.” Preprint, submitted August 16, 2017. http://arxiv.org/abs/1708.04782.
Weng, J., H. Chen, D. Yan, K. You, A. Duburcq, M. Zhang, Y. Su, H. Su, and J. Zhu. 2021. “Tianshou: A highly modularized deep reinforcement learning library.” Preprint, submitted January 1, 2022. http://arxiv.org/abs/2107.14171.
Wiering, M. A., et al. 2000. “Multi-agent reinforcement learning for traffic light control.” In Proc., Machine Learning: Proc., 17th Int. Conf. (ICML’2000), 1151–1158.
Yakowitz, S. 1982. “Dynamic programming applications in water resources.” Water Resour. Res. 18 (4): 673–696. https://doi.org/10.1029/WR018i004p00673.
Ye, D., et al. 2019. “Mastering complex control in MOBA games with deep reinforcement learning.” Preprint, submitted April 3, 2022. http://arxiv.org/abs/1912.09729.
Zouitine, A. 2021. “Masking in deep reinforcement learning.” Adil Zouitine blog. Accessed June 16, 2022. https://boring-guy.sh/posts/masking-rl/.

Information & Authors

Information

Published In

Go to Journal of Water Resources Planning and Management
Journal of Water Resources Planning and Management
Volume 150Issue 2February 2024

History

Received: Jan 2, 2023
Accepted: Aug 29, 2023
Published online: Nov 16, 2023
Published in print: Feb 1, 2024
Discussion open until: Apr 16, 2024

Permissions

Request permissions for this article.

ASCE Technical Topics:

Authors

Affiliations

Ph.D. Candidate, Artificial Intelligence, Dept. of Computer Science, Universitat Politècnica de Catalunya, Jordi Girona, 31, Barcelona 08034, Spain (corresponding author). ORCID: https://orcid.org/0000-0002-9391-1350. Email: [email protected]
David Modesto, Ph.D. [email protected]
Established Researcher, Dept. of Computer Applications in Science and Engineering, Barcelona Supercomputing Center—Centro Nacional de Supercomputación, Plaça Eusebi Güell 1-3, Barcelona 08034, Spain. Email: [email protected]
Project Manager/Researcher, Critical Infrastructure Management and Resiliance Area, CETaqua, Water Technology Centre, Ctra. d’Esplugues 75, Cornella del LLobregat, Barcelona 08940, Spain. ORCID: https://orcid.org/0000-0002-0488-7556. Email: [email protected]
Bernat Joseph-Duran, Ph.D. [email protected]
Project Manager/Researcher, Critical Infrastructure Management and Resiliance Area, CETaqua, Water Technology Centre, Ctra. d’Esplugues 75, Cornella del LLobregat, Barcelona 08940, Spain. Email: [email protected]
David Saporta [email protected]
Engineer, Aigües de Barcelona, Dept. of Digitalisation and Operational Excellence, General Batet 1-7, Barcelona 08028, Spain. Email: [email protected]
Jose Antonio Martin Hernandez, Ph.D. [email protected]
Technical Advisor, Advanced Mathematics, Repsol Technology Lab, P.° de Extremadura, Km 18, Móstoles, Madrid 28935, Spain. Email: [email protected]

Metrics & Citations

Metrics

Citations

Download citation

If you have the appropriate software installed, you can download article citation data to the citation manager of your choice. Simply select your manager software from the list below and click Download.

Cited by

  • Fill-and-Spill: Deep Reinforcement Learning Policy Gradient Methods for Reservoir Operation Decision and Control, Journal of Water Resources Planning and Management, 10.1061/JWRMD5.WRENG-6089, 150, 7, (2024).

View Options

Get Access

Access content

Please select your options to get access

Log in/Register Log in via your institution (Shibboleth)
ASCE Members: Please log in to see member pricing

Purchase

Save for later Information on ASCE Library Cards
ASCE Library Cards let you download journal articles, proceedings papers, and available book chapters across the entire ASCE Library platform. ASCE Library Cards remain active for 24 months or until all downloads are used. Note: This content will be debited as one download at time of checkout.

Terms of Use: ASCE Library Cards are for individual, personal use only. Reselling, republishing, or forwarding the materials to libraries or reading rooms is prohibited.
ASCE Library Card (5 downloads)
$105.00
Add to cart
ASCE Library Card (20 downloads)
$280.00
Add to cart
Buy Single Article
$35.00
Add to cart

Get Access

Access content

Please select your options to get access

Log in/Register Log in via your institution (Shibboleth)
ASCE Members: Please log in to see member pricing

Purchase

Save for later Information on ASCE Library Cards
ASCE Library Cards let you download journal articles, proceedings papers, and available book chapters across the entire ASCE Library platform. ASCE Library Cards remain active for 24 months or until all downloads are used. Note: This content will be debited as one download at time of checkout.

Terms of Use: ASCE Library Cards are for individual, personal use only. Reselling, republishing, or forwarding the materials to libraries or reading rooms is prohibited.
ASCE Library Card (5 downloads)
$105.00
Add to cart
ASCE Library Card (20 downloads)
$280.00
Add to cart
Buy Single Article
$35.00
Add to cart

Media

Figures

Other

Tables

Share

Share

Copy the content Link

Share with email

Email a colleague

Share