Determining the Contamination Source in Water Distribution Networks Using Genetic Algorithm

Document Type : Research Paper


1 MSc Graduate, Dept. of Civil Engineering, College of Engineering, University of Tehran, Tehran, Iran

2 Prof., School of Civil Engineering, College of Engineering, University of Tehran, Tehran, Iran

3 PhD Candidate, Dept. of Civil Engineering, College of Engineering, University of Tehran, Tehran, Iran


Contamination of drinking water is known as a major threat of water security around the world. As contamination enters a water distribution network, it spreads rapidly into the network and poses health and safety risks to the community. Using a set of sensors to report the concentration of chlorine or any other chemical, useful observations can be made to detect, identify and manage pollution. Based on these observations, location, concentration and start time of contamination can be determined and decision makers can be informed. In this paper, a simulation-optimization approach is used to solve the problem of contamination source characterization in which the EPANET software is used as a simulator and the Genetic Algorithm is used as an optimizer. The model developed in this paper is implemented on EPANET example 3. Modeling of water distribution networks uses information as input data which can cause error in model simulation. Pipe roughness and chlorine deterioration rate are among these inputs. The model has been implemented to find the location, start time and concentration of inlet pollution and the effect of pipe roughness and chlorine deterioration rate on the model responses have been investigated. The pollution entry scenario is applied to the network and the model presented is accurate in finding the location and time of the contamination. As the variables increase, the model accurately estimates the location and time of entry of the contamination but does not have complete accuracy in estimating the concentration of contamination, which is calculated with standard deviation of σ = 4.8% -8.1%.


Aral, M., Guan, J. & Morris, L. M. 2001. Identification of contaminant source location and release history in aquifers. Journal of Hydrologic Engineering, 6(3), 225-34.
Cristo, C. D. & Leopardi. A. 2008. Uncertainty Effects on Pollution Source Location in Water Networks, 8th Annual Water Distribution Systems Analysis Symposium, Cincinnati, Ohio, USA, 1-10.
EPAUS. 2003. Framework for cumulative risk assessment. Washington, DC: US Environmental Protection Agency, Office of Research and Development, USA.
Goldberg, D. E. & Holland, J. H. 1988. Genetic algorithms and machine learning, Machine Learning, 3(2),
Holland, J. H. 1975. Adaptation in natural and artificial systems, MIT Press. USA.
Hosseinifard, S. M., Aroon, M. A. & Dahrazma, B. 2020. Application of PVDF/HDTMA-modified clinoptilolite nanocomposite membranes in removal of reactive dye from aqueous solution. Separation and Purification Technology, 251, 117294.
Hu, C., Zhao, J., Yan, X., Zeng, D. & Guo, S. 2015. A mapreduce based parallel niche genetic algorithm for contaminant source identification in water distribution network, Ad Hoc Networks, 35, 116-26.
Kumar, J., Brill, E. D., Mahinthakumar, G. & Ranjithan, S. R. 2012. Contaminant source characterization in water distribution systems using binary signals, Journal of Hydroinformatics, 14(3), 585-602. 
Liu, L., Zechman, E. M., Mahinthakumar, G. & Ranjithan, S. R. 2012. Identifying contaminant sources for water distribution systems using a hybrid method. Civil Engineering and Environmental Systems, 29(2), 123-136.
Pasha, M. K. & Lansey, K. 2011. Effect of parameter uncertainty on water distribution systems model prediction, World Environmental and Water Resources Congress: Bearing Knowledge for Sustainability, Palm Springs, California, USA, 68-78.
Pérez, R Sanz, G., Cugueró, M. À., Blesa, J. & Cugueró, J. 2015. Parameter uncertainty modelling in water distribution network models. Procedia Engineering, 119, 583-592.
Preis, A. & Ostfeld, A. 2011. Hydraulic uncertainty inclusion in water distribution systems contamination source identification. Urban Water Journal, 8(5), 267-277.
Preis, A., Ostfeld, A. & Perelman, L. 2007. Contamination source detection with fuzzy sensors data, World Environmental and Water Resources Congress: Restoring Our Natural Habitat, Tampa, Florida, USA, 1-13.
Rossman, L. A. 2000. EPANET 2 user's manual, water supply and water resources division, National Risk Management Research Laboratory, US Environmental Protection Agency, Cincinnati, Ohio, USA.
Shirzad, A., Tabesh, M., Farmani, R. & Mohammadi, M. 2013. Pressure-discharge relations with application to head-driven simulation of water distribution networks. Journal of Water Resources Planning and Management, 139(6), 660-70.
Tabesh, M. 2016. Advanced modeling of water distribution networks. University of Tehran press, Tehran, Iran. 585p. (In Persian)
Tabesh, M., Shirzad, A., Arefkhani, V. & Mani, A. 2014. A comparative study between the modified and available demand driven based models for head driven analysis of water distribution networks. Urban Water Journal, 11(3), 221-30.
Tabesh, M., Tanyimboh, T. T. & Burrows, R. 2002. Head-driven simulation of water supply networks, International Journal of Engineering Transactions A: Basics, 15(1), 11-22.
Vankayala, P., Sankarasubramanian, A., Ranjithan, S. R. & Mahinthakumar, G. 2009. Contaminant source identification in water distribution networks under conditions of demand uncertainty. Environmental Forensics, 10(3), 253-63.
Vrachimis, S. G., Lifshitz, R., Eliades, D. G., Polycarpou, M. M. & Ostfeld, A. 2020. Active contamination detection in water-distribution systems. Journal of Water Resources Planning and Management, ASCE, 146(4), 324-335
Wagner, J. M., Shamir, U. & Marks, D. H. 1988. Water distribution reliability: analytical methods. Journal ofWater Resources Planning and Management, ASCE, 114(3), 235-275.
Xuesong, Y., Jie, S. & Chengyu, H. 2017. Research on contaminant sources identification of uncertainty water demand using genetic algorithm. Cluster Computing, 20(2), 1007-1016.
Zafari, M. 2015. Minimization the effects of contaminant emission in water distribution system based on head driven simulation method. MSc. Thesis, University of Tehran, Tehran, Iran. 107p. (In Persian)
Zahraie, B. & Hosseini, S. M. 2015. Genetic algorithms and optimization engineering, Gutenberg Pub., 298p. (In Persian)