Next Article in Journal
Assessing Recent Changes in the Contribution of Rainfall and Air Temperature Effects to Mean Flow and Runoff in Two Slovenian–Croatian Basins Using MLR and MLLR
Previous Article in Journal
Water Demand and Water Application for Plants Based on Plant Coefficient Method: Model Development and Verification on Sites of Green Saudi Arabia
Previous Article in Special Issue
From Raw Water to Pipeline Water: Correlation Analysis of Dynamic Changes in Water Quality Parameters and Microbial Community Succession
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Optimal Water Quality Sensor Placement in Water Distribution Systems: A Computationally Cost-Effective Genetic Algorithm Framework

Polytechnic Department of Engineering and Architecture, University of Udine, Via Delle Scienze, 33100 Udine, Italy
*
Author to whom correspondence should be addressed.
Water 2025, 17(18), 2786; https://doi.org/10.3390/w17182786
Submission received: 23 July 2025 / Revised: 7 September 2025 / Accepted: 17 September 2025 / Published: 21 September 2025

Abstract

Despite advances in water treatment technologies and monitoring systems, contamination events in drinking water supply systems (DWSSs) still pose a threat to public health. Since timing is crucial in effectively mitigating impacts, the implementation of an early warning system (EWS) represents an optimal solution for securing the entire network. In this paper, we present a novel multi-objective approach based on the NSGA-II Genetic Algorithm (GA) for solving the sensor placement optimization (SPO) problem, aiming at defining the optimal water quality sensor system (WQSS) design. We start from the original formulation of the objective functions most commonly used in the literature, which aim, on the one hand, to reduce the impact and, on the other, to maximize the network coverage; such objective functions are rewritten in order to enable a comprehensive perspective of all potential contamination scenarios, including those that remain undetected by the WQSS. Furthermore, we address the issue of computational complexity, increasing with the size of the water distribution system (WDS), and we show that the proposed methodology is computationally cost-effective. Finally, we apply the methodology to two well-known benchmarking water distribution networks (WDNs), showcasing the capabilities and potential advantages it offers.

1. Introduction

Water distribution systems (WDSs) are strategic, infrastructural networks designed for providing potable water to consumers [1] and, as such, represent an essential and critical part of a city’s infrastructure, since the availability of clean water affects both socio-economic prosperity and population safety [2,3]. WDSs face multiple challenges including aging infrastructure (which includes both aging pipes and deteriorating components), water quality concerns, natural disasters, and environmental emergencies, as well as intentional attacks [4], each of which have the potential to affect the level of service, sometimes also with negative effects on the quality of the resource, disrupting large portions of WDSs and causing damage to infrastructure and outages to consumers. Thus, water utilities cope with day-to-day challenges in order to guarantee water security, defined as the capacity to safeguard sustainable access to adequate quantities of acceptable-quality water for sustaining livelihoods, human well-being, and socio-economic development and for ensuring protection against waterborne pollution and water-related disasters [5,6]. Maintaining water quality within the regulations specified by regulatory authorities such as the World Health Organization (WHO) [7], the European Commission [8], or the U.S. Environmental Protection Agency (US EPA) [9] is undoubtedly a challenging task, since quality deterioration events, such as contamination due to pathogens or other substances, may occur in the system, affecting quality and posing a risk to human health [10]. Indeed, due to their complexity, their large spatial extension with up to tens or hundreds of kilometers of pipes, and the large number of consumers served and access points, WDSs are inherently vulnerable to both intentional and accidental contaminations [2].
Even though, especially in developed countries, water utilities have heavily invested in the development of advanced treatment technologies in order to guarantee high-quality water, forming multiple barriers against both microbial and inorganic risk factors and safeguarding public health, risk cannot be totally wiped out and contamination events can still take place. Indeed, the systematic analysis of reported cases showed that, despite advances in water treatment technologies, contamination events in drinking water supply systems (DWSSs), leading in some cases to waterborne outbreaks, are still frequent not only in developing countries but also in developed ones, whether they occur due to natural or accidental events, or even malicious actions [11,12,13,14,15]. Based on epidemiological evidence, casual factors including, but not limited to, poor operational and maintenance practices, aged infrastructure, inadequate monitoring, and failures in the distribution network have been identified among the most common causes of water contamination affecting WDSs [15]. In most cases, the occurrence of these events is attributable to failures in infrastructure and institutional practices and is linked to ineffective treatment protocols, poor operational practices, and negligence [16]. Among the most common causes of contamination are raw water contamination [17,18,19], treatment deficiencies [20,21,22], cross-connections between potable and non-potable water sources resulting in backflow [23,24,25], maintenance or repair works in the water mains [26,27,28], lack of adequate flushing following construction [29], intrusion of sewage [30,31,32,33], reservoir contamination [34,35], and regrowth due to stagnation, low demands, disinfectant loss, and biofilm formation and break-off [36,37,38].
Thus, waterborne diseases still pose a threat to public health and productivity [13], leading to contaminated drinking water that may cause large community outbreaks with up to thousands of cases [16]. As confirmed by several examples of outbreaks of waterborne disease that affected DWSSs not only in underdeveloped or developing countries, but even in developed nations equipped with robust treatment technologies, the supply of potable water is not only contingent on the deployment of robust treatment barriers [39]. Providing high-quality water minimizing the risks to public health encompasses the entire drinking water supply chain, which includes multiple processes from water treatment to its distribution and from the water source all through to the delivery point to the consumer, each with its own inherent management and operational difficulties.
In the absence of sensitive surveillance techniques and with symptoms being mild and self-limiting, outbreak detection can be difficult. Traditionally, identification and confirmation of increased enteric infections and their consequent outbreak scenarios are primarily carried out through laboratory-based testing. As such, the lag time between the onset of an infection and its notification may delay effective outbreak detection and implementation of strategies to prevent additional cases [39]. To monitor water quality, it is common for water authorities to employ laboratory-based methods for measuring the concentrations of different water quality parameters. This procedure, however, is usually conducted in a manual way and is time-consuming, without the ability to provide feedback in near-real time [10]. Considering that the first hours after contamination are crucial for mitigating its impacts [40], the implementation of an early warning system represents a key strategy in detecting contamination events along the entire WDS and in helping to locate the source of contamination. Thus, a widely used strategy for securing WDSs against contamination is the installation of a water quality sensor system (WQSS) [41], whose aim consists of quickly assessing water quality through the continuous monitoring of water quality parameters, playing a key role in early detection of potentially dangerous conditions. With the advancement of Information and Communication Technologies (ICT), it is possible to monitor and control the operation of water systems through the use of Supervisory Control and Data Acquisition (SCADA) systems, wireless networks, and specialized sensors [10]. Specifically, significant research and innovation has been invested in recent decades in relation to water quality monitoring, focusing on the design of reliable online sensors that are able to monitor various chemical and biological parameters within WDSs [10]. The choice of which sensors to install is a crucial aspect that must be addressed and is site-specific. Indeed, even a WQSS equipped with the best sensors will be ineffective if the sensors themselves are not adapted to the existing pollutants. Thus, it is imperative to determine the type of pollutants that must be detected by the sensors and circulate throughout the examined WDS.
In recent decades, there has been increasing interest in the development of sensor networks to cope with both deliberate and accidental hazard intrusions into water distribution systems [42]. Usually, securing the entire network is unfeasible in practice, due to budget constraints that often limit the number of sensors that a Water Utility can deploy. Indeed, water quality sensors are costly [43]; thus, sensors should be strategically placed at selected junctions and, in addressing the issue of identifying the most suitable locations for sensor placement, water operators must consider both performance and economic investment aspects [44].
This trade-off condition, for which different choices and configurations of the WQSS have both benefits and costs that may be mutually exclusive, inherently requires the placement process to be approached as an optimization problem, formally known as the sensor placement optimization (SPO) problem [45]. Since 1991 [46], researchers and practitioners have explored the optimal sensor placement problem in WDSs. Optimization models and solution algorithms have been developed for identifying the most efficient sensor locations [42], many of which were the outcome of the Battle of Water Sensor Networks (BWSN) organized in 2006. Even though a variety of objectives have been proposed in the literature, they can be grouped into two main categories: on one hand, those targeting the minimization of impacts on public health and, on the other hand, those that aim to maximize the probability of detection of all the possible contamination events. Among the most common objectives used in the proposed methodologies, the time of detection (TD), population exposed to contamination (PE), volume of contaminated water consumed by consumers prior to detection (VC), and extent of contamination (EC) belong to the first group, whereas typically the second category is represented by the detection likelihood (DL). Besides the above, other objectives widely used consist of demand coverage (DC) [47] and, less frequently, sensor detection redundancy (DR) [48,49], which aims to increase the reliability of the WQSS considering that false positives can occur in any sensor. In addition, [50] developed a new model to identify an optimal WQSS design, for which the issue of ensuring an efficient discharge of contaminants effectively supporting hydrant flushing was addressed. The impact of objective function selection on the SPO problem outcome is covered in detail in [51], whereas the correlation between a variety of different objective functions was investigated in [52,53].
Several methods have been proposed so far in the literature to identify the optimal WQSS design. Comprehensive literature reviews of the state of the art of SPO problem methodologies for contamination detection in WDSs are provided in [54,55]. Furthermore, a critical review focused on the different objective approaches is also provided in [56]. Briefly, among the most commonly applied techniques are the application of metaheuristic algorithms such as genetic algorithms [57,58,59], evolutionary algorithms [60,61], and particle swarm optimization [62] among others; the integration of complex network theory concepts [63], typically used for network clustering [43,64]; the implementation of risk-based approaches [65,66]; and, in recent years, the deployment of machine learning methodologies such as Graph Neural Networks (GNNs) [45,67]. In addition, in [68], a combined management strategy based on both water network partitioning and water quality sensor placement is proposed. In [69], a comparative analysis of multiple metaheuristic algorithms applied to the SPO problem is provided. Although the SPO methodologies proposed in the literature have consistently presumed that each node of the WDN has an equal contamination probability, some researchers have addressed this issue explicitly accounting for contamination probability variations [58,70]. Furthermore, some studies [58,66,71] have extended their scope beyond the sole definition of optimal WQSS design sets by including ranking and clustering approaches for these solutions to assist decision makers, to achieve a faster identification of the alternatives that best fulfill specific evaluation criteria and requirements.
In this paper, a novel method for WQSS design is proposed. The procedure is suitable for both single-objective and multi-objective optimizations, in the latter case being based on the NSGA-II algorithm. In particular, four different objective functions are investigated in order to define the optimal sensor network layout, that is, TD, PE, VC, and DL. As will be described in the following sections, the major novelty compared to the methods in the literature lies in the reformulation of the most frequently used objective functions [42], which are rewritten to enable a comprehensive perspective of all potential contamination scenarios. Furthermore, the issue of computational complexity, which represents a critical issue especially for optimization-based models [43], is addressed. In this regard, in addition to considering a specific flow scenario, which allows an a priori evaluation of the time spent by the water to travel between any pair of nodes of the WDN, multiple computational optimization strategies have been used for performance enhancement. As a result, the computational burden is significantly reduced, which makes the proposed SPO methodology suitable even for large WDNs.

2. Materials and Methods

The proposed SPO framework integrates two models: the simulation model and the optimization model. With respect to the simulation model, it serves only as a starter to perform WDS network pre-analysis, whereas the core of the framework consists of the optimization model.
The methodology has been entirely implemented in the Python 3.13 environment. For the WDN hydraulic model, the open-source modeling software EPANET [72] is used. Then, once the WDN model is imported, the proposed optimization process can be divided into two macro-steps:
  • Within the simulation model, the WDN undergoes a preprocessing phase, and a hydraulic simulation is run. This analysis, for which contamination scenarios are examined to determine the location, strength, impacts, and start and end times of all possible contamination events, is performed by leveraging the WNTR [4] and NetworkX [73] libraries’ capabilities.
  • Within the optimization model, the results derived from the simulation model are used as inputs for the SPO problem, selecting multiple optimal WQSS designs. The SPO problem is herein treated as a sensor-constrained one; that is, a fixed number of sensors must be set at first, which will be used as a constraint by the optimization model. To deal with the SPO problem complexity, which is proven to be NP-hard [74], a heuristic approach is adopted, which is based on a genetic algorithm. The genetic algorithm has been implemented using the DEAP library [75]. It is worth highlighting that, even though the sole definition of optimal WQSS design sets is addressed and no ranking and clustering approaches are applied, the optimization model provides a ranking list of each sensor position that appears at least once in any of the obtained WQSS design sets as an outcome.
As regards the issue concerning computational complexity, it has been addressed in the development of the code, which has been optimized to reduce computational costs as much as possible. The main optimization techniques used are computations conversion into matrix and array formats, leveraging optimized libraries like NumPy [76]; vectorization, which enables Single-Instruction Multiple-Data (SIMD) processing with performance gains up to 100x improvements compared to pure Python loops; Just-In-Time (JIT) function compilation via Numba [77], which translates Python functions to optimized machine code at runtime and reduces Python’s interpreter overhead, enabling low-level optimization (each function compilation overhead occurs just once, after which subsequent function calls execute at near-C speeds); parallel processing, for which the computational workload is distributed among multiple CPU cores, effectively bypassing Python’s Global Interpreter Lock (GIL) limitation; and caching, applied both on computation results to avoid redundant calculations and at the function level for functions with repeated calls.
Finally, considering that the relocation of existing sensors is unfeasible due to high installation costs, it is worth noting that the procedure herein described has been formulated so that the preexisting WQSS is taken into account. Thus, the water quality sensor placement problem can be run for both WDSs without any existing WQSS or by selecting sensor locations for additional water quality sensors, extending the existing WQSS if present.
In the following sections, a detailed explanation of the two key components of the SPO framework is given.

2.1. The Simulation Model

A contaminant may enter the WDS from any point and at any time. In the proposed methodology, each node of the WDS is considered as a possible entry location at which the contamination event could start. Moreover, the following assumptions are made:
  • Contamination events originate from only one substance injection event at nodes. Scenarios for which the contaminant intrusion takes place at more than one location are omitted.
  • Contaminants are treated as passive traces (i.e., non-reactive substances); thus, the hydraulic conditions are not altered by their presence (or by the volume of the injection).
  • Each node may be the source of injection, with equal probability.
  • Injection is modeled as steady-state, continuous, and constant throughout the simulation.
  • Pollutant decay or deposition processes (or even interactions with pipe walls) are neglected.
  • Once the contamination reaches a given node, its water consumption is treated as fully contaminated.
On the one hand, uncertainties related to the spread of contaminants should be taken into account: contaminants are transported by water flows that continuously vary over time (i.e., changing flow rates and direction due to consumer demands); thus, for a given specific design for the sensor network, performances will change over time too. However, on the other hand, due to high installation costs, once the positioning of the sensors has been established, their reallocation cannot be reconsidered, at least in the short-to-medium term and provided that the WDS configuration remains substantially unchanged. Thus, acknowledging that no single sensor network configuration can perform optimally under all conditions, especially within complex real WDSs, the procedure herein described focuses on the average conditions at which the analyzed WDS operates.
Consequently, instead of running a consistent number of extended-period simulations and source tracing analysis (i.e., at least one for each junction as a trace node, with sufficient simulation time to assure the reaching of steady-state conditions), a single hydraulic simulation needs to be performed. In particular, the simulation, performed using the EPANET hydraulic solver [72], is run with respect to a specific flow scenario. Then, the simulation results are stored in several matrices and arrays, which include a downstream and upstream tracing matrix, denoted by D ̿ and U ̿ , respectively, consisting of bidimensional arrays of size N × N (where N corresponds to the number of nodes in the network), for which entries i j are either zero (i.e., the i - th node is not placed in the downstream or upstream portion of the network with respect to the j - th node, respectively) or one (i.e., the opposite of the first case); a traveling time matrix, denoted by T d ̿ , whose entries correspond to the time spent by the water to travel between any pair of nodes (flow directions are taken into account; thus, t i j is N a N for each pair of nodes i j for which the i - th node does not pertain to the downstream portion of the network associated with the j - th node); the 1d array mapping the entire population directly connected to each node of the WDN, denoted by P ¯ ; and the 1d array mapping the quantity of water per unit of time flowing through each node of the WDN, denoted by Q ¯ .
Hence, the simulation model serves only as a pre-analysis tool, and once performed, it does not play an active part in the optimization process. Therefore, as already highlighted and as will be better clarified in the following subsections, the core of the proposed SPO is based upon simple operations between vectors and matrix calculation. This feature, coupled with the above-mentioned computational optimization techniques, makes the methodology suitable for all types of WDN, especially with reference to large networks for which computational complexity can be challenging.

2.2. The Optimization Model

The optimization model is based on the Genetic Algorithm (GA), developed in Python, exploiting the potentialities offered by DEAP (Distributed Evolutionary Algorithms in Python), an evolutionary computation framework that incorporates tools and data structures to easily implement genetic algorithms (GAs), genetic programming (GP), evolution strategies (ESs), and particle swarm optimization (PSO) [75]. As a metaheuristic approach, the optimization model does not guarantee reaching the global optimal solution but rather constitutes a near-optimization, providing solutions that perform very well but are not necessarily the absolute best. Undoubtedly, in assessing the problem of sensor placement, a clear trade-off exists [71], where no single solution can be deterministically defined and competing objectives must be balanced against each other to find the optimal one. Indeed, optimal solutions associated with one objective function may be significantly suboptimal with respect to another design objective [56]. Thus, the optimization model can manage both single- and multi-objective optimization strategies and, in the case of choosing multiple objective functions, it relies on the NSGA-II method to solve the optimization problem. Four main objective functions are considered, which broadly align with the ones proposed on the occasion of the Battle of Water Sensor Networks (BWSN) by Ostfeld et al. [42]. Indeed, in general terms, the objective functions are the same as those introduced during the above-mentioned battle event, that is, the detection time (TD), population exposure to contamination (PE), volume of contaminated water consumed by consumers prior to detection (VC), and detection likelihood (DL). It is worth highlighting that, with regard to objectives focusing on public health impact minimization, it is assumed the reaction time interval t r e a c t , corresponding in the lag time between the first detection of the contaminant and the WDS service interruption, is null. However, they have been reformulated, as briefly described in the following.
  • Expected Time to Detection ( Z 1 )
For a given contamination scenario, the expected time for its detection, denoted as t d ,   i , consists of the elapsed time from the start of the i -th contamination event to the first identified presence of a nonzero contaminant concentration. Given a sensor network configuration and denoted as t j , the time of first detection of the j -th sensor, the time of detection of a particular event i by the sensor network is defined as the minimum value of t j among all sensors, that is,
t d , i   =   min j   t j
Thus, the objective function to be minimized is defined as
Z 1   =   E ( t d ) ,
where E ( t d ) denotes the mathematical expectation of the minimum detection time t d . Finally, Equation (2) can be rewritten as
Z 1   =   1 C   i = 1 C t d , i
where C is the total number of contamination events that can occur in the WDS (i.e., equal to the number of nodes).
With regard to undetected events, with which no detection time is associated, instead of not including them in the analysis, in the proposed methodology, an upper bound value to the detection time t d , l i m is provided (set to 24 h, corresponding to the considered total simulation time). This choice is justified to reproduce the fact that even if a contamination event slips through the sensor network, its impacts will be noticed at some point. This scenario is reasonable especially for contaminants associated with short-term adverse effects.
  • Expected Population affected prior to Detection ( Z 2 )
Given a specific contamination scenario, the population affected is a function of the ingested contaminant mass, which in turn depends on the time of detection by the sensor network [42]. The key assumption is that the contaminant is no longer ingested after detection. The objective function to be minimized is defined as
Z 2   =   E P a
where E P a denotes the mathematical expectation of the affected population P a .
Finally, Equation (4) can be rewritten as
Z 2   =   1 C   i = 1 C p i
where C assumes the same meaning as described above, whereas p i represents the amount of people affected by the i -th contamination event prior to detection by any sensor of the WQSS.
Since the proposed methodology focuses on the average conditions at which the analyzed WDS operates, given a particular contamination scenario, the amount of people affected at the n -th node is assumed to be a function of two parameters: the number of consumers served by the n -th node, denoted by P n , and the detection delay, denoted by t i , n , defined as the lag time between contamination occurrence at the n -th node (i.e., the instant when the contaminated water reaches the n -th node) and the instant when contamination is detected by any sensor. In addition, since an upper bound value to the detection time ( t d , l i m ) is provided, as previously stated with respect to the objective function Z 1 , the detection delay is expressed in relative terms and thus denoted by t %   i , n , assuming values within the range between 0 (i.e., the case for which a sensor is located at the n -th node) and 1 (i.e., the case for which the contamination event remains undetected or the detection delay t i ,   n for the n -th node is higher than t d , l i m ). From a mathematical point of view, Equation (5) can be rewritten as
Z 2   =   1 C   i = 1 C n = 1 N P n t %   i , n ,     t %   i , n = 0 ,   t i , n = 0 0 ÷ 1 , 0 < t i , n < t d , l i m 1 , t i , n     t d , l i m
Regarding the number of consumers served by each node ( P n ), it can be derived from a GIS database or, when such data is unavailable, its value can be approximated assuming a per capita consumption.
  • Expected Consumption of Contaminated Waterprior to Detection ( Z 3 )
Given a specific contamination scenario, the volume of contaminated water consumed by people prior to its detection comprises the cumulative demand integrals of all the affected nodes. The objective function to be minimized is defined as
Z 3 = E V d
where E V d denotes the mathematical expectation of the affected volume V d .
Thus, Equation (7) can be rewritten as
Z 3 = 1 C   i = 1 C v i
where C assumed the same meaning as that described above, whereas v i represents the amount of contaminated water consumed prior to the detection of the i -th contamination event by any sensor of the WQSS.
Once again, since the average conditions at which the analyzed WDS operates are considered, for Z 2 , the amount of volume delivered to consumers at the n -th node can be expressed as the product of the average demand at the examined node, denoted by D n , and the above-mentioned detection delay, t i ,   n . Consequently, Equation (8) can be rewritten as
Z 3 = 1 C   i = 1 C n = 1 N D n t i , n
However, instead of looping over each node affected by the i -th contamination event (bracketed term in Equation (9)), based on the assumption that the contaminant is no longer ingested after detection, leaving out water losses and assuming that all the water flowing through the contaminant injection point will be delivered to consumers, for a given contamination event, v i can be evaluated as the total volume of water flowing though the injection point prior to detection. Hence, Equation (9) can be simplified as follows:
Z 3   =   1 C   i = 1 C q i ,   u p t d , i
where q i , u p is the overall upstream flowrate passing through the i -th at which the injection of the contaminant takes place.
  • Detection likelihood ( Z 4 )
The detection likelihood, denoted by Z 4 , is defined as the probability of any contamination event being detected by any sensor of the designed WQSS. In contrast with the objective function described so far, each of which is an impact metric, Z 4 needs to be maximized. In other terms, given a specific sensor network design (i.e., number and locations of sensors), it gives an estimation of the fraction of contamination events that are eventually detected by sensors relative to all the possible contamination events. However, considering that in real WDSs, contaminants may enter the system network from any point along the pipes and not only at nodes, an approach that focuses on the network length covered is undoubtedly closer to the mark than one calculating it as a portion of all contamination events. Thus, it can be estimated by
Z 4 = 1 L   e = 1 E l e d r
where L corresponds to the overall length of the WDS pipe network; E denotes the total number of pipes characterizing the system; l e is the length of the e -th pipe; and finally, d r is a binary variable equal to 1 if the e -th pipe belongs to the monitored portion of the WDS network (i.e., the case of a pipe placed in the upstream network of any sensor in the WQSS), whereas it is equal to 0 if the e -th pipe is placed downstream of all the sensors in the WQSS.
As already pointed out, since the uncertainties related to flow and demand rates, both of which typically vary over time in a real WDS, are ignored, focusing on the average conditions at which the WDS operates enables the a priori evaluation of all the variables in Equations (3), (6), (10), and (11) and, in turn, of each of the considered objective functions ( Z 1 Z 4 ). Indeed, once flow and demand rates are fixed, the upstream flows q n , u p and the demands D n are calculated right away. Furthermore, for a given sensor location at the i -th node, it is possible to evaluate the expected time to detection with respect to any other node of the WDS, defining a matrix T d ̿ of detection times between each pair of WDS nodes; in turn, once T d ̿ is evaluated, the calculation of the detection delays is reduced to simple operations between vectors and matrix calculation. Finally, as regards the evaluation of Z 4 , once flow directions are fixed, the identification of the WDS network portion placed upstream of a given WQSS design is straightforward and comes down to a simple graph analysis.
Finally, with regard to GA individual structure, each individual consists of a list of indices corresponding to a specific sensor position (i.e., a specific node in the WDN).

3. Results

The SPO framework herein proposed is applied to two well-known benchmarking WDNs, corresponding with the ones used on the occasion of the BWSN held in Cincinnati in 2006 [42]. In the following text, these two networks are referred to as BWSN 1 and BWSN 2. They are both modeled based on real-world WDSs and have been extensively used in the literature for SPO method performance evaluations.
As mentioned above, the upper bound value for the detection time t d , l i m is set to 24 h. Furthermore, since no additional data is provided about the number of consumers served by each node of both WDSs, the population is estimated, assuming a per capita consumption of 200   L / d a y . This value is purely indicative and is intended for the sole purpose of assessing the objective function denoted by Z 2 (expected population affected prior to detection). The adoption of daily per capita water consumption to define the population served by each node does not reflect a limitation of the proposed method, which would enable us to incorporate such information from external databases, but rather stems from the lack of additional data sources from which this attribute could be derived for each node.
Results are presented by examining distinct pairs of objective functions. Each of the objectives described in the previous section ( Z 1 to Z 4 ) is considered at least once. The pairs of objective functions are Z 1 versus Z 4 ; Z 2 versus Z 4 ; Z 3 versus Z 4 ; and Z 1 versus Z 2 . It is recalled that Z 1 , Z 2 , and Z 3 are to be minimized, whereas Z 4 is to be maximized. As the objective functions compete against each other, especially with reference to the first three pairs of objectives, the output of the optimization consists of a set of trade-off solutions, denoted as the Pareto front. For each combination of the objective functions, the general parameters of the genetic algorithm are listed below:
  • Number of individuals per generation: 5000 ;
  • Maximum number of generations: 500 ;
  • Crossover probability: 0.6 ;
  • Mutation probability: 0.4 .

3.1. BWSN 1 Network

BWSN 1 corresponds to the smaller of the two benchmarking WDNs used in the BWSN challenge [42]. It comprises 126 nodes, one fixed head source as a boundary condition, two tanks, 168 pipes, two pumps, and eight valves and is subjected to four variable demand patterns. However, in conformity with the base design assumptions made on the occasion of the above-mentioned challenge, the number of sensors is set to 5.
In Table 1, the maximum values for each objective function Z 1 4 are provided.
Additionally, in Table 2, some statistics about the detection times t i j between any pair i j of nodes, the number of consumers served by each node, and the flowrates flowing through each node are provided.
As already mentioned, the proposed methodology has been applied with respect to four different objective function combinations, each consisting of a total of 2.5   M evaluated individuals and each one corresponding to a specific WQSS design. In Table 3, a summary of the computational costs is proposed. The initial WDN analysis, which has been performed once, took about 3.5   s , while the optimization processes took 9   m i n at most. In particular, the optimization processes for combinations Z 14 and Z 12 are characterized by lower computational costs, with execution times of approximately 6 ÷ 7   m i n per combination, whereas the remaining objective function pairs ( Z 24 and Z 34 ) exhibit longer processing times, typically requiring 7 ÷ 9   m i n each. Overall, assuming that all optimization processes are run sequentially, the total execution time ranges from 26 to 32   m i n .
As regards the optimal WQSS designs obtained, in Figure 1, the Pareto fronts obtained for each objective functions’ combination are shown. As illustrated, for each of the combinations that includes Z 4 (the only objective to be maximized), the detection likelihood, and as such the network coverage, varies in the range between a minimum of 72 % and a maximum of nearly 98 % . Instead, focusing on the horizontal axes of the Pareto fronts of these combinations, the proposed procedure exhibits different performances for Z 1 3 evaluation. In particular, the minimization of both Z 2 and Z 3 is guaranteed, yielding low percentage values in all cases (consistently below 4 % ). In contrast, focusing on   Z 1 , typically elevated values are observed, with all individuals in both Z 14   and Z 12 Pareto fronts exceeding 50 % . Although this outcome may indicate poor performances of the SPO algorithm, analysis of the average value of the detection time matrix reported in Table 2 shows that detection times between any pair of WDN nodes are typically high (approximately 50 % of the maximum threshold), thereby precluding the expectation of enhanced performance for any WQSS configuration.
In Figure 2 is a distribution of all the sensor positions that appear at least once in any of the four Pareto fronts shown in Figure 1. As illustrated, certain WDN sectors are more suitable for implementing a WQSS. In particular, the locations that appear the most within the optimal configurations are at nodes J - 118 (proposed in 449 cases), J - 83 ( 431 occurrences), J - 35 ( 422 occurrences), J - 126 ( 353 occurrences), and J - 105 ( 273 occurrences). Focusing on these sensor locations, which are present in at least 250 WQSS designs among those populating the Pareto fronts, their presence in all the Pareto fronts is reported in Figure 3. As illustrated, among the five most common sensor locations proposed within the optimal WQSS sets, each of them appears at least once for at least two objective function pairs, which shows them to be optimal for more than one objective function. For a comprehensive review of all the sensor locations within the WQSS optimal designs, please refer to the Supplementary Materials.

3.2. BWSN 2 Network

BWSN 2 corresponds to the larger of the two benchmarking WDNs used in the BWSN challenge [42]. It has 12,523 nodes, two fixed head sources as boundary condition, two tanks, 14,822 pipes, four pumps, and five valves and is subjected to five variable demand patterns. In conformity with the base design assumptions made on the occasion of the above-mentioned challenge, the number of sensors is set to 20.
In Table 4, the maximum values for each objective function Z 1 4 are provided.
Additionally, in Table 5, some statistics regarding the detection times t i j between any pair i j of nodes, the number of consumers served by each node, and the flowrates flowing through each node are provided.
As already mentioned, the proposed methodology has been applied with respect to four different objective function combinations, each consisting of a total of 2.5   M evaluated individuals, each one corresponding to a specific WQSS design. In Table 6, a summary of the computational costs is proposed. The initial WDN analysis, which was performed once, took about 80.5   s , while the optimization processes took 21   m i n at most. In particular, as for WDN BWSN 1, the optimization processes for combinations     Z 14 and Z 12 are characterized by lower computational costs, with execution times of approximately 12 ÷ 14   m i n per combination, whereas the remaining objective function pairs ( Z 24 and Z 34 ) exhibit longer processing times, typically requiring 20 ÷ 21   m i n and 14 ÷ 15   m i n , respectively. Overall, assuming that all optimization processes are run sequentially, the total execution time ranges from 60 to 65   m i n .
As regards the optimal WQSS designs obtained, in Figure 4, the Pareto fronts obtained for each objective functions’ combination are shown. As illustrated, for each of the combinations that include Z 4 (the only objective to be maximized), the detection likelihood, and as such the network coverage, varies in the range between a minimum of 44 % and a maximum of nearly 54 % . This outcome should not suggest poor algorithm performances. Indeed, unlike BWSN 1, which is characterized by having a loop structure, the BWSN 2 network consists of a hybrid network configuration, where both loops and tree-like branches are present. As a result, given the lower WQSS sensor percentage over the number of nodes for BWSN 2 compared to BWSN 1— 0.16 % of sensor-equipped nodes for BWSN 2 compared to almost 4 % for BWSN 1—the maximization of the WDN detection likelihood and network coverage is rather challenging. Instead, focusing on the horizontal axes of the Pareto fronts of these combinations, as for the BWSN 1 network, the proposed procedure exhibits different performances for Z 1 3 evaluation. In particular, both Z 2 and Z 3 are easily minimized, resulting in low percentage values in all cases (consistently below 0.5 % ), which is an expected outcome considering the mixed structure of the examined WDN with terminal branches characterized by low flowrates. In contrast, focusing on Z 1 , typically elevated values are observed, with all individuals in both Z 14 and Z 12 Pareto fronts exceeding 70 % . Although this outcome may indicate poor performances of the SPO algorithm, as for WDN BWSN 1, it can be easily explained by analyzing the average value of the detection time matrix reported in Table 5: indeed, the detection times between any pair of WDN nodes are typically high (approximately 70 % of the maximum threshold of 1440   m i n ). This peculiarity is the leading cause that precludes the expectation of enhanced performance for any WQSS configuration in terms of Z 1 minimization.
In Figure 5 is a distribution of all the sensor positions that appear at least once in any of the four Pareto fronts shown in Figure 4. As illustrated, certain WDN sectors are more suitable for implementing a WQSS. In particular, the locations that appear the most within the optimal configurations are at nodes J - 622 (proposed in 1081 cases), J - 8089 ( 722 occurrences), J - 8403 ( 627 occurrences), J - 10367 ( 593 occurrences), and J - 1328 ( 568 occurrences). Focusing on these sensor locations, which are present in at least 550 WQSS designs among those populating the Pareto fronts, their presence in all the Pareto fronts is reported in Figure 6. As illustrated, unlike the findings regarding the BWSN 1 network, in this case, a sensor location that appears to be optimal for one of the four objective function pairs is not necessarily optimal with respect to the others. In particular, while sensors placed at nodes J - 622 and J - 8403 , along with their neighboring nodes, represent optimal solutions for three out of four objective function combinations (and similarly nodes J - 8089 and J - 1328 for two of them), a sensor located at node J - 10367 is optimal only with respect to one of the four objective function pairs. This outcome is far from unexpected, considering both the mixed structure and the large scale characterizing the examined WDN. Indeed, both these peculiarities lead to an increased dispersion among optimal solutions. For a comprehensive review of all the sensor locations within the WQSS optimal designs, please refer to the Supplementary Materials.

4. Discussion

This paper has introduced a multi-objective approach that aims to solve the SPO problem in order to define the optimal WQSS design. Its application to two well-known benchmarking water distribution networks (WDNs) has been presented, showcasing the capabilities and potential advantages it offers. The described methodology consists of two different phases: the simulation model, within which the WDN pre-analysis is performed, and the optimization model, which is based on the NSGA-II algorithm.
Solutions were searched for in the trade-off between different pairs of objective functions, which include four of the objectives most commonly used in the literature. In particular, the evaluation parameters used for the definition of WQSS are the time of detection (TD), whose objective function is denoted by Z 1 ; population exposed to contamination (PE), whose objective function is denoted by Z 2 ; volume of contaminated water consumed by consumers prior to detection (VC), whose objective function is denoted by Z 3 ; and detection likelihood (DL), whose objective function is denoted by Z 4 . The different pairs of objective functions are Z 1 versus Z 4 ; Z 2 versus Z 4 ; Z 3 versus Z 4 ; and Z 1 versus Z 2 . It is recalled that Z 1 , Z 2 , and Z 3 are to be minimized, whereas Z 4 is to be maximized. As the objective functions compete against each other, the output of the optimization consists of a set of trade-off solutions, denoted as the Pareto front. Furthermore, a ranking list of each sensor position that appears at least once in any of the obtained WQSS design sets has been provided.
As regards PE and the evaluation of the objective function denoted by Z 2 , it is noted that the assumption of daily per capita water consumption has been made. It is worth mentioning that the PE parameter is extremely difficult to determine based solely on a hydraulic model, and thus this assumption could eventually lead to inaccuracies, completely failing to address the issue of required water quality for so-called sensitive consumers such as hospital facilities. However, it is worth highlighting that the decision to assume a daily per capita water consumption to define the population served by each node represents a data availability constraint rather than a limitation of the proposed method. Indeed, no additional data is provided about the number of consumers served by each node for both examined WDSs, whereas the proposed approach could readily incorporate such information from external GIS databases. Finally, the assumption of daily per capita consumption is made only in those cases for which adequate data sources for deriving node-specific population attributes are unavailable.
In this paper, two issues have been addressed, that is, on the one hand, the reformulation of each of the considered objective functions and, on the other hand, the issue concerning computational complexity and costs, increasing with the size of the water distribution system (WDS).
With regard to the issue related to the reformulation of the objective functions, instead of using them in their original formulation, they have been rewritten to enable a comprehensive perspective of all potential contamination scenarios, including those that remain undetected by the WQSS. In particular, in the definition of the objectives that aim to minimize WDN impacts (TD, PE, and VC), an upper bound value for the detection time has been introduced, whereas as regards the fourth objective (DL), the length of each pipe has been introduced in order to define the detection likelihood as a percentage of the covered WDN length instead of covered WDN nodes. With respect to the first reformulation, it allows us to include undetected contamination events in the SPO analysis, assuming that even if they slip through the WQSS, its impacts will be noticed at some point. This assumption is reasonable, especially for contaminants associated with short-term adverse effects.
Focusing on the issue concerning computational costs, since reducing computational overhead was identified as a primary issue to be addressed in the proposed method’s formulation, the selected test WDSs intentionally differ substantially in size. Indeed, the examined network sizes span from little over a hundred nodes in the case of BWSN 1 to roughly 12 , 500 nodes in the case of BWSN2. The results obtained demonstrate that it is applicable to WDNs of any size. Indeed, the algorithm performs well even for large-scale WDNs, resulting in a computationally cost-effective approach where network complexity does not limit its application. The proposed approach proved to be efficient in both cases, generating results within short processing times that ranged from a few seconds for BWSN 1 to a maximum of 15 ÷ 20 min for BWSN 2. This outcome is promising since, typically, optimization-based approaches for solving the SPO problem are computationally costly, especially for large-scale networks, which is the main reason why complex network theory-based approaches are preferred as the size of the WDS grows, taking less computational time.
Furthermore, a key assumption consists of focusing on a specific scenario, that is, the average flow conditions at which the examined system operates. As a consequence, the implemented SPO framework induces the definition of solutions that on average tend to behave well. Furthermore, ignoring the changes in flow patterns results in a substantially reduced computational requirement. Moreover, the assumption of focusing on a specific scenario can certainly limit the effectiveness of the proposed method, especially if applied to WDSs characterized by substantial changes in flow rate directions. To partially address this issue, it is worth nothing that the procedure can be performed in different scenarios, which can be identified with respect to nodal demands, pumping stations regulations (i.e., pump on and off conditions), and storage behaviors (i.e., tank in- and out-flow conditions). Indeed, the performances of different WQSS designs can be investigated with respect to alternative flow scenarios (e.g., one might be interested in examining the WDN for various seasonal scenarios).
As regards future research directions, on the one hand, in terms of computational efficiency, additional techniques, such as cloud computing, can be investigated in order to further optimize the performance of the developed algorithm. On the other hand, focusing specifically on the optimization procedure itself, several key aspects may require further investigation: first, the proposed methodology should be compared to different approaches from the literature. In addition, although the proposed methodology integrates the objective functions most frequently utilized in the existing literature, further objective functions can be examined and integrated into the framework, including demand coverage, extent of contamination, and sensor detection redundancy, among others, as well as combinations of them. Finally, the proposed methodology stops at giving multiple optimal solutions, highlighted in different Pareto fronts, while only few details on the best sensor locations are provided. Hence, in future developments, the issue of clustering and multi-criteria analysis of all the solutions obtained can be addressed in order to prioritize the most convenient solutions. Indeed, in this paper, the sole definition of optimal WQSS design sets is addressed, and no ranking and clustering approaches are applied. The restriction of the solution space, which results in few solution clusters, is useful for decision makers during the planning and development of a WQSS for faster identification of the alternatives that best fulfill specific evaluation criteria and requirements.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/w17182786/s1.

Author Contributions

Conceptualization, E.Z. and M.N.; methodology, E.Z.; software, E.Z.; writing—original draft preparation, E.Z.; supervision, M.N. and D.G. 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 WDN EPANET input files presented in the study can be downloaded from and are openly available at BWSN–Water Simulation (http://www.water-simulation.com/wsp/about/bwsn/ (accessed on 20 May2025)). Algorithms are implemented in Python version 3.11. The EPANET tool version 2.2, released under MIT license and available from the US EPA website (EPANET|US EPA) (https://www.epa.gov/water-research/epanet (accessed on 20 May 2025)), was used to run the hydraulic models. Any other additional data presented in this study is available on request from the corresponding author.

Conflicts of Interest

The authors declare no conflicts of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript; or in the decision to publish the results.

Abbreviations

The following abbreviations are used in this manuscript:
DWSSDrinking Water Supply System
WDSWater Distribution System
WDNWater Distribution Network
WQSSWater Quality Sensor System
SPOSensor Placement Optimization
WHOWorld Health Organization
EPAEnvironmental Protection Agency
GAGenetic Algorithm
GPGenetic Programming
ESEvolution Strategy
PSOParticle Swarm Optimization
GNNGraph Neural Network
SCADASupervisory Control and Data Acquisition
ICTInformation and Communication Technologies
TDTime of Detection
PEPopulation Exposed
VCVolume of Contaminated water
ECExtent of Contamination
DLDetection Likelihood
DCDemand Coverage
DRDetection Redundancy

References

  1. Nicolini, M. Complex Networks Theory for Evaluating Scaling Laws and WDS Vulnerability for Potential Contamination Events. Water 2020, 12, 1296. [Google Scholar] [CrossRef]
  2. Giudicianni, C.; Herrera, M.; Di Nardo, A.; Creaco, E.; Greco, R. Multi-Criteria Method for the Realistic Placement of Water Quality Sensors on Pipes of Water Distribution Systems. Environ. Model. Softw. 2022, 152, 105405. [Google Scholar] [CrossRef]
  3. UN Water (Ed.) Water for Prosperity and Peace; The United Nations World Water Development Report; UNESCO: Paris, France, 2024; ISBN 978-92-3-100657-9. [Google Scholar]
  4. Klise, K.; Hart, D.; Bynum, M.; Hogge, J.; Haxton, T.; Murray, R.; Burkhardt, J. Water Network Tool for Resilience (WNTR). User Manual, Version 0.2.3; Sandia National Lab. (SNL-NM): Albuquerque, NM, USA, 2020. [Google Scholar]
  5. Grey, D.; Sadoff, C.W. Sink or Swim? Water Security for Growth and Development. Water Policy 2007, 9, 545–571. [Google Scholar] [CrossRef]
  6. Intergovernmental Panel on Climate Change (IPCC). Climate Change 2022—Impacts, Adaptation and Vulnerability: Working Group II Contribution to the Sixth Assessment Report of the Intergovernmental Panel on Climate Change, 1st ed.; Cambridge University Press: Cambridge, UK, 2023; ISBN 978-1-009-32584-4. [Google Scholar]
  7. World Health Organization (Ed.) Guidelines for Drinking-Water Quality; Fourth Edition Incorporating the First and Second Addenda; World Health Organization: Geneva, Switzerland, 2022; ISBN 978-92-4-004506-4. [Google Scholar]
  8. European Union. Directive (EU) 2020/2184 of the European Parliament and of the Council of 16 December 2020 on the Quality of Water Intended for Human Consumption. Off. J. Eur. Union 2020, 435, 1–62. [Google Scholar]
  9. EPA. National Primary Drinking Water Regulations: Long Term 1 Enhanced Surface Water Treatment Rule. Final Rule. Fed. Regist. 2002, 67, 1811–1844. [Google Scholar]
  10. Eliades, D.G.; Vrachimis, S.G.; Moghaddam, A.; Tzortzis, I.; Polycarpou, M.M. Contamination Event Diagnosis in Drinking Water Networks: A Review. Annu. Rev. Control. 2023, 55, 420–441. [Google Scholar] [CrossRef]
  11. World Health Organization. Outbreaks of Waterborne Diseases: Fact Sheet 1.1, December 2009; World Health Organization: Geneva, Switzerland, 2009.
  12. Moreira, N.A.; Bondelind, M. Safe Drinking Water and Waterborne Outbreaks. J. Water Health 2017, 15, 83–96. [Google Scholar] [CrossRef]
  13. World Health Organization. Surveillance and Outbreak Management of Water-Related Infectious Diseases Associated with Water-Supply Systems; World Health Organization: Geneva, Switzerland, 2019.
  14. Centers for Disease Control and Prevention. Waterborne Disease and Outbreak Surveillance System (WBDOSS) Summary Report, United States, 2015; Department of Health and Human Services, CDC: Atlanta, GA, USA, 2022.
  15. Kunz, J.M. Surveillance of Waterborne Disease Outbreaks Associated with Drinking Water—United States, 2015–2020. MMWR Surveill. Summ. 2024, 73, 1–23. [Google Scholar] [CrossRef]
  16. Nascetti, S.; Busani, L.; Bartoli, F.; Orioli, R.; Stenico, A.; Regele, D. Community Waterborne Outbreak Linked to a Firefighting Response during the COVID-19 Emergency. Ann. Dell’Ist. Super. Sanità 2021, 57, 226–232. [Google Scholar] [CrossRef]
  17. Gallay, A.; De Valk, H.; Cournot, M.; Ladeuil, B.; Hemery, C.; Castor, C.; Bon, F.; Mégraud, F.; Le Cann, P.; Desenclos, J.C. A Large Multi-Pathogen Waterborne Community Outbreak Linked to Faecal Contamination of a Groundwater System, France, 2000. Clin. Microbiol. Infect. 2006, 12, 561–570. [Google Scholar] [CrossRef]
  18. Riera-Montes, M.; Brus Sjölander, K.; Allestam, G.; Hallin, E.; Hedlund, K.-O.; Löfdahl, M. Waterborne Norovirus Outbreak in a Municipal Drinking-Water Supply in Sweden. Epidemiol. Infect. 2011, 139, 1928–1935. [Google Scholar] [CrossRef]
  19. Giammanco, G.M.; Di Bartolo, I.; Purpari, G.; Costantino, C.; Rotolo, V.; Spoto, V.; Geraci, G.; Bosco, G.; Petralia, A.; Guercio, A.; et al. Investigation and Control of a Norovirus Outbreak of Probable Waterborne Transmission through a Municipal Groundwater System. J. Water Health 2014, 12, 452–464. [Google Scholar] [CrossRef] [PubMed]
  20. Mac Kenzie, W.R.; Hoxie, N.J.; Proctor, M.E.; Gradus, M.S.; Blair, K.A.; Peterson, D.E.; Kazmierczak, J.J.; Addiss, D.G.; Fox, K.R.; Rose, J.B. A Massive Outbreak in Milwaukee of Cryptosporidium Infection Transmitted through the Public Water Supply. N. Engl. J. Med. 1994, 331, 161–167. [Google Scholar] [CrossRef] [PubMed]
  21. Bjelkmar, P.; Hansen, A.; Schönning, C.; Bergström, J.; Löfdahl, M.; Lebbad, M.; Wallensten, A.; Allestam, G.; Stenmark, S.; Lindh, J. Early Outbreak Detection by Linking Health Advice Line Calls to Water Distribution Areas Retrospectively Demonstrated in a Large Waterborne Outbreak of Cryptosporidiosis in Sweden. BMC Public Health 2017, 17, 328. [Google Scholar] [CrossRef] [PubMed]
  22. Jacqueline, C.; Del Valle Arrojo, M.; Bellver Moreira, P.; Rodríguez Feijóo, M.A.; Cabrerizo, M.; Fernandez-Garcia, M.D. Norovirus GII.3[P12] Outbreak Associated with the Drinking Water Supply in a Rural Area in Galicia, Spain, 2021. Microbiol. Spectr. 2022, 10, e01048-22. [Google Scholar] [CrossRef] [PubMed]
  23. Fernandes, T.M.A.; Schout, C.; De Roda Husman, A.M.; Eilander, A.; Vennema, H.; Van Duynhoven, Y.T.H.P. Gastroenteritis Associated with Accidental Contamination of Drinking Water with Partially Treated Water. Epidemiol. Infect. 2007, 135, 818–826. [Google Scholar] [CrossRef]
  24. Altzibar, J.M.; Zigorraga, C.; Rodriguez, R.; Leturia, N.; Garmendia, A.; Rodriguez, A.; Alkorta, M.; Arriola, L. Outbreak of Acute Gastroenteritis Caused by Contamination of Drinking Water in a Factory, the Basque Country. J. Water Health 2015, 13, 168–173. [Google Scholar] [CrossRef][Green Version]
  25. Kuhn, K.G.; Falkenhorst, G.; Emborg, H.-D.; Ceper, T.; Torpdahl, M.; Krogfelt, K.A.; Ethelberg, S.; Mølbak, K. Epidemiological and Serological Investigation of a Waterborne Campylobacter jejuni Outbreak in a Danish Town. Epidemiol. Infect. 2017, 145, 701–709. [Google Scholar] [CrossRef]
  26. Nygard, K.; Wahl, E.; Krogh, T.; Tveit, O.A.; Bohleng, E.; Tverdal, A.; Aavitsland, P. Breaks and Maintenance Work in the Water Distribution Systems and Gastrointestinal Illness: A Cohort Study. Int. J. Epidemiol. 2007, 36, 873–880. [Google Scholar] [CrossRef]
  27. Lambertini, E.; Spencer, S.K.; Kieke, B.A.; Loge, F.J.; Borchardt, M.A. Virus Contamination from Operation and Maintenance Events in Small Drinking Water Distribution Systems. J. Water Health 2011, 9, 799–812. [Google Scholar] [CrossRef][Green Version]
  28. Oussou, K.R.; Kouassi, D.P.; Kouamé, D.A.; Irika, O.; Koffi, K.C.; Soumahoro, S.I.; Yéo, S.; Coulibaly, M. Investigation of a Waterborne Gastroenteritis Outbreak in Bouaké South Health District, Côte d’Ivoire, March 2024. J. Public Health Epidemiol. 2024, 16, 133–137. [Google Scholar][Green Version]
  29. Jalava, K.; Rintala, H.; Ollgren, J.; Maunula, L.; Gomez-Alvarez, V.; Revez, J.; Palander, M.; Antikainen, J.; Kauppinen, A.; Räsänen, P.; et al. Novel Microbiological and Spatial Statistical Methods to Improve Strength of Epidemiological Evidence in a Community-Wide Waterborne Outbreak. PLoS ONE 2014, 9, e104713. [Google Scholar] [CrossRef]
  30. Beaudeau, P.; De Valk, H.; Vaillant, V.; Mannschott, C.; Tillier, C.; Mouly, D.; Ledrans, M. Lessons Learned from Ten Investigations of Waterborne Gastroenteritis Outbreaks, France, 1998–2006. J. Water Health 2008, 6, 491–503. [Google Scholar] [CrossRef] [PubMed]
  31. Jakopanec, I.; Borgen, K.; Vold, L.; Lund, H.; Forseth, T.; Hannula, R.; Nygård, K. A Large Waterborne Outbreak of Campylobacteriosis in Norway: The Need to Focus on Distribution System Safety. BMC Infect. Dis. 2008, 8, 128. [Google Scholar] [CrossRef]
  32. Giammanco, G.M.; Bonura, F.; Urone, N.; Purpari, G.; Cuccia, M.; Pepe, A.; Li Muli, S.; Cappa, V.; Saglimbene, C.; Mandolfo, G.; et al. Waterborne Norovirus Outbreak at a Seaside Resort Likely Originating from Municipal Water Distribution System Failure. Epidemiol. Infect. 2018, 146, 879–887. [Google Scholar] [CrossRef] [PubMed]
  33. Kauppinen, A.; Pitkänen, T.; Al-Hello, H.; Maunula, L.; Hokajärvi, A.-M.; Rimhanen-Finne, R.; Miettinen, I.T. Two Drinking Water Outbreaks Caused by Wastewater Intrusion Including Sapovirus in Finland. Int. J. Environ. Res. Public Health 2019, 16, 4376. [Google Scholar] [CrossRef]
  34. Richardson, G.; Thomas, D.R.; Smith, R.M.M.; Nehaul, L.; Ribeiro, C.D.; Brown, A.G.; Salmon, R.L. A Community Outbreak of Campylobacter Jejuni Infection from a Chlorinated Public Water Supply. Epidemiol. Infect. 2007, 135, 1151–1158. [Google Scholar] [CrossRef]
  35. Smith, S.; Elliot, A.J.; Mallaghan, C.; Modha, D.; Hippisley-Cox, J.; Large, S.; Regan, M.; Smith, G.E. Value of Syndromic Surveillance in Monitoring a Focal Waterborne Outbreak Due to an Unusual Cryptosporidium Genotype in Northamptonshire, United Kingdom, June–July 2008. Eurosurveillance 2010, 15, 19643. [Google Scholar] [CrossRef]
  36. Gan, Y.; Kurisu, F.; Simazaki, D.; Yoshida, M.; Fukano, H.; Komine, T.; Nagashima, H.; Hoshino, Y.; Kasuga, I. Unveiling Significant Regrowth and Potential Risk of Nontuberculous Mycobacteria in Hospital Water Supply System. Water Res. 2025, 275, 123188. [Google Scholar] [CrossRef]
  37. Menekşe, Ş.; Tanrıverdi, E.S.; Altınay, E.; Oğuş, H.; Aydoğan, A.A.; Sağlam, D.; Çelik, Ö.; Otlu, B.; Kırali, M.K. A Long-Lasting Sphingomonas paucimobilis Outbreak: A Potential for Pathogens to Persist on Environmental Devices despite Disinfection Measures. Am. J. Infect. Control 2023, 51, 765–771. [Google Scholar] [CrossRef]
  38. Wang, S.; Xie, H.; Liu, L.; Du, L.; Yin, F.; Chen, Y.; Liu, Z.; Sun, G.; Zhang, X.; Sun, D.; et al. A Rare Waterborne Outbreak of Bacillus paranthracis in Shandong Province, China, 2020: Epidemiologic Survey, Genomic Insights, and Virulence Characteristics. Emerg. Microbes Infect. 2024, 13, 2348498. [Google Scholar] [CrossRef]
  39. Onyango, L.A.; Quinn, C.; Tng, K.H.; Wood, J.G.; Leslie, G. A Study of Failure Events in Drinking Water Systems as a Basis for Comparison and Evaluation of the Efficacy of Potable Reuse Schemes. Environ. Health Insights 2015, 9s3, EHI.S31749. [Google Scholar] [CrossRef]
  40. Zulkifli, S.N.; Rahim, H.A.; Lau, W.-J. Detection of Contaminants in Water Supply: A Review on State-of-the-Art Monitoring Technologies and Their Applications. Sens. Actuators B Chem. 2018, 255, 2657–2689. [Google Scholar] [CrossRef] [PubMed]
  41. Edzwald, J.K. Water Quality & Treatment: A Handbook on Drinking Water; American Water Works Association: Denver, CO, USA, 2011. [Google Scholar]
  42. Ostfeld, A.; Uber, J.G.; Salomons, E.; Berry, J.W.; Hart, W.E.; Phillips, C.A.; Watson, J.-P.; Dorini, G.; Jonkergouw, P.; Kapelan, Z.; et al. The Battle of the Water Sensor Networks (BWSN): A Design Challenge for Engineers and Algorithms. J. Water Resour. Plann. Manag. 2008, 134, 556–568. [Google Scholar] [CrossRef]
  43. Namtirtha, A.; Kumar, K.R.S.; Jain, S.; Simmhan, Y.; Kumar, M.S.M. Placement Strategies for Water Quality Sensors Using Complex Network Theory for Continuous and Intermittent Water Distribution Systems. Water Resour. Res. 2023, 59, e2022WR033112. [Google Scholar] [CrossRef]
  44. Murray, R.; Baranowski, T.; Hart, W.E.; Janke, R. Risk Reduction and Sensor Network Design. In Proceedings of the Water Distribution Systems Analysis 2008; American Society of Civil Engineers: Kruger National Park, South Africa, 2009; pp. 1–11. Available online: https://ascelibrary.org/doi/10.1061/41024%28340%2996 (accessed on 22 July 2025).
  45. Salem, A.K.; Abokifa, A.A. Optimal Sensor Placement in Water Distribution Networks Using Dynamic Prediction Graph Neural Networks. In Proceedings of the 3rd International Joint Conference on Water Distribution Systems Analysis & Computing and Control for the Water Industry (WDSA/CCWI 2024), Ferrara, Italy, 1–4 July 2024; MDPI: Basel, Switzerland, 2024; p. 171. [Google Scholar]
  46. Lee, B.H.; Deininger, R.A. Optimal Locations of Monitoring Stations in Water Distribution System. J. Environ. Eng. 1992, 118, 4–16. [Google Scholar] [CrossRef]
  47. Rathi, S.; Gupta, R. A Simple Sensor Placement Approach for Regular Monitoring and Contamination Detection in Water Distribution Networks. KSCE J. Civ. Eng. 2016, 20, 597–608. [Google Scholar] [CrossRef]
  48. Preis, A.; Ostfeld, A. Multiobjective Contaminant Sensor Network Design for Water Distribution Systems. J. Water Resour. Plann. Manag. 2008, 134, 366–377. [Google Scholar] [CrossRef]
  49. Shen, H.; McBean, E. Pareto Optimality for Sensor Placements in a Water Distribution System. J. Water Resour. Plann. Manag. 2011, 137, 243–248. [Google Scholar] [CrossRef]
  50. Khaksar Fasaee, M.A.; Monghasemi, S.; Nikoo, M.R.; Shafiee, M.E.; Berglund, E.Z.; Bakhtiari, P.H. A K-Sensor Correlation-Based Evolutionary Optimization Algorithm to Cluster Contamination Events and Place Sensors in Water Distribution Systems. J. Clean. Prod. 2021, 319, 128763. [Google Scholar] [CrossRef]
  51. Tinelli, S.; Creaco, E.; Ciaponi, C. Impact of Objective Function Selection on Optimal Placement of Sensors in Water Distribution Networks. Ital. J. Eng. Geol. Environ. 2018, 173–178. [Google Scholar] [CrossRef]
  52. Watson, J.-P.; Greenberg, H.J.; Hart, W.E. A Multiple-Objective Analysis of Sensor Placement Optimization in Water Networks. In Proceedings of the Critical Transitions in Water and Environmental Resources Management; American Society of Civil Engineers: Salt Lake City, UT, USA, 2004; pp. 1–10. Available online: https://www.researchgate.net/publication/221936281_A_Multiple-Objective_Analysis_of_Sensor_Placement_Optimization_in_Water_Networks (accessed on 22 July 2025).
  53. Krause, A.; Leskovec, J.; Guestrin, C.; VanBriesen, J.; Faloutsos, C. Efficient Sensor Placement Optimization for Securing Large Water Distribution Networks. J. Water Resour. Plann. Manag. 2008, 134, 516–526. [Google Scholar] [CrossRef]
  54. Hu, C.; Li, M.; Zeng, D.; Guo, S. A Survey on Sensor Placement for Contamination Detection in Water Distribution Systems. Wirel. Netw 2018, 24, 647–661. [Google Scholar] [CrossRef]
  55. Adedoja, O.S.; Hamam, Y.; Khalaf, B.; Sadiku, R. A State-of-the-Art Review of an Optimal Sensor Placement for Contaminant Warning System in a Water Distribution Network. Urban Water J. 2018, 15, 985–1000. [Google Scholar] [CrossRef]
  56. Rathi, S.; Gupta, R. Sensor Placement Methods for Contamination Detection in Water Distribution Networks: A Review. Procedia Eng. 2014, 89, 181–188. [Google Scholar] [CrossRef]
  57. Hu, C.; Ren, G.; Liu, C.; Li, M.; Jie, W. A Spark-Based Genetic Algorithm for Sensor Placement in Large Scale Drinking Water Distribution Systems. Clust. Comput 2017, 20, 1089–1099. [Google Scholar] [CrossRef]
  58. Cardoso, S.M.; Barros, D.B.; Oliveira, E.; Brentan, B.; Ribeiro, L. Optimal Sensor Placement for Contamination Detection: A Multi-Objective and Probabilistic Approach. Environ. Model. Softw. 2021, 135, 104896. [Google Scholar] [CrossRef]
  59. Harif, S.; Azizyan, G.; Dehghani Darmian, M.; Givehchi, M. Selecting the Best Location of Water Quality Sensors in Water Distribution Networks by Considering the Importance of Nodes and Contaminations Using NSGA-III (Case Study: Zahedan Water Distribution Network, Iran). Environ. Sci. Pollut. Res. 2023, 30, 53229–53252. [Google Scholar] [CrossRef] [PubMed]
  60. Zhang, Q.; Zheng, F.; Kapelan, Z.; Savic, D.; He, G.; Ma, Y. Assessing the Global Resilience of Water Quality Sensor Placement Strategies within Water Distribution Systems. Water Res. 2020, 172, 115527. [Google Scholar] [CrossRef] [PubMed]
  61. Ponti, A.; Candelieri, A.; Archetti, F. A New Evolutionary Approach to Optimal Sensor Placement in Water Distribution Networks. Water 2021, 13, 1625. [Google Scholar] [CrossRef]
  62. Marlim, M.S.; Kang, D. Optimal Water Quality Sensor Placement by Accounting for Possible Contamination Events in Water Distribution Networks. Water 2021, 13, 1999. [Google Scholar] [CrossRef]
  63. Nazempour, R.; Monfared, M.A.S.; Zio, E. A Complex Network Theory Approach for Optimizing Contamination Warning Sensor Location in Water Distribution Networks. Int. J. Disaster Risk Reduct. 2018, 30, 225–234. [Google Scholar] [CrossRef]
  64. Giudicianni, C.; Herrera, M.; Di Nardo, A.; Greco, R.; Creaco, E.; Scala, A. Topological Placement of Quality Sensors in Water-Distribution Networks without the Recourse to Hydraulic Modeling. J. Water Resour. Plann. Manag. 2020, 146, 04020030. [Google Scholar] [CrossRef]
  65. Weickgenannt, M.; Kapelan, Z.; Blokker, M.; Savic, D.A. Risk-Based Sensor Placement for Contaminant Detection in Water Distribution Systems. J. Water Resour. Plann. Manag. 2010, 136, 629–636. [Google Scholar] [CrossRef]
  66. Naserizade, S.S.; Nikoo, M.R.; Montaseri, H. A Risk-Based Multi-Objective Model for Optimal Placement of Sensors in Water Distribution System. J. Hydrol. 2018, 557, 147–159. [Google Scholar] [CrossRef]
  67. Menapace, A.; Zanfei, A.; Herrera, M.; Brentan, B. Graph Neural Networks for Sensor Placement: A Proof of Concept towards a Digital Twin of Water Distribution Systems. Water 2024, 16, 1835. [Google Scholar] [CrossRef]
  68. Ciaponi, C.; Creaco, E.; Di Nardo, A.; Di Natale, M.; Giudicianni, C.; Musmarra, D.; Santonastaso, G. Reducing Impacts of Contamination in Water Distribution Networks: A Combined Strategy Based on Network Partitioning and Installation of Water Quality Sensors. Water 2019, 11, 1315. [Google Scholar] [CrossRef]
  69. Siadatpour, S.A.S.; Aghamolaei, Z.; Jafari-Asl, J.; Baniasadi Moghadam, A. A Single-Objective Optimization of Water Quality Sensors in Water Distribution Networks Using Advanced Metaheuristic Techniques. Water 2025, 17, 1221. [Google Scholar] [CrossRef]
  70. He, G.; Zhang, T.; Zheng, F.; Zhang, Q. An Efficient Multi-Objective Optimization Method for Water Quality Sensor Placement within Water Distribution Systems Considering Contamination Probability Variations. Water Res. 2018, 143, 165–175. [Google Scholar] [CrossRef]
  71. Brentan, B.; Carpitella, S.; Barros, D.; Meirelles, G.; Certa, A.; Izquierdo, J. Water Quality Sensor Placement: A Multi-Objective and Multi-Criteria Approach. Water Res. Manag. 2021, 35, 225–241. [Google Scholar] [CrossRef]
  72. Rossman, L. EPANET 2 User Manual; Environmental Protection Agency: Cincinnati, OH, USA, 2000.
  73. Hagberg, A.A.; Schult, D.A.; Swart, P.J. Exploring Network Structure, Dynamics, and Function Using NetworkX. In Proceedings of the 7th Python in Science Conference, Pasadena, CA, USA, 19–24 August 2008; pp. 11–15. [Google Scholar]
  74. Berger-Wolf, T.Y.; Hart, W.E.; Saia, J. Discrete Sensor Placement Problems in Distribution Networks. Math. Comput. Model. 2005, 42, 1385–1396. [Google Scholar] [CrossRef]
  75. Fortin, F.-A.; De Rainville, F.-M.; Gardner, M.-A.G.; Parizeau, M.; Gagné, C. DEAP: Evolutionary Algorithms Made Easy. J. Mach. Learn. Res. 2012, 13, 2171–2175. [Google Scholar]
  76. Harris, C.R.; Millman, K.J.; Van Der Walt, S.J.; Gommers, R.; Virtanen, P.; Cournapeau, D.; Wieser, E.; Taylor, J.; Berg, S.; Smith, N.J.; et al. Array Programming with NumPy. Nature 2020, 585, 357–362. [Google Scholar] [CrossRef]
  77. Lam, S.K.; Pitrou, A.; Seibert, S. Numba: A LLVM-Based Python JIT Compiler. In Proceedings of the Second Workshop on the LLVM Compiler Infrastructure in HPC, Austin, TX, USA, 15 November 2015; pp. 1–6. [Google Scholar]
Figure 1. Pareto fronts obtained for all the objective functions pairs with respect to BWSN 1 (results for both x- and y-axis are presented in relative terms).
Figure 1. Pareto fronts obtained for all the objective functions pairs with respect to BWSN 1 (results for both x- and y-axis are presented in relative terms).
Water 17 02786 g001
Figure 2. Distribution of all the sensor locations that appear at least once in the SPO processes’ Pareto fronts with respect to BWSN 1. The name of the WDN node and the number of occurrences associated with its location are shown only for nodes that appear more than 250 times for better readability.
Figure 2. Distribution of all the sensor locations that appear at least once in the SPO processes’ Pareto fronts with respect to BWSN 1. The name of the WDN node and the number of occurrences associated with its location are shown only for nodes that appear more than 250 times for better readability.
Water 17 02786 g002
Figure 3. Sensor location presence within the Pareto fronts for the five most frequent sensor locations with respect to BWSN 1 ( J - 118 , J - 83 , J - 35 , J - 126 , and J - 105 ). The × red markers over an individual denote the sensor location presence among its genes. Moreover, the [ + ] green markers over an individual denote the presence of a neighboring node proposed as a sensor location among its genes.
Figure 3. Sensor location presence within the Pareto fronts for the five most frequent sensor locations with respect to BWSN 1 ( J - 118 , J - 83 , J - 35 , J - 126 , and J - 105 ). The × red markers over an individual denote the sensor location presence among its genes. Moreover, the [ + ] green markers over an individual denote the presence of a neighboring node proposed as a sensor location among its genes.
Water 17 02786 g003
Figure 4. Pareto fronts obtained for all the objective function pairs with respect to BWSN 2 (results for both x- and y-axis are presented in relative terms).
Figure 4. Pareto fronts obtained for all the objective function pairs with respect to BWSN 2 (results for both x- and y-axis are presented in relative terms).
Water 17 02786 g004
Figure 5. Distribution and number of occurrences of all the sensor locations that appear at least once in the SPO processes’ Pareto fronts with respect to BWSN 2. The name of the WDN node and the number of occurrences associated with its location are shown only for those nodes that appear more than 500 times for better readability.
Figure 5. Distribution and number of occurrences of all the sensor locations that appear at least once in the SPO processes’ Pareto fronts with respect to BWSN 2. The name of the WDN node and the number of occurrences associated with its location are shown only for those nodes that appear more than 500 times for better readability.
Water 17 02786 g005
Figure 6. Sensor location presence within the Pareto fronts for the five most frequent sensor locations with respect to BWSN 2 ( J - 622 , J - 8089 , J - 8403 , J - 10367 , and J - 1328 ). The × red markers over an individual denote the sensor location presence among its genes. Moreover, the [ + ] green markers over an individual denote the presence of a neighboring node proposed as a sensor location among its genes.
Figure 6. Sensor location presence within the Pareto fronts for the five most frequent sensor locations with respect to BWSN 2 ( J - 622 , J - 8089 , J - 8403 , J - 10367 , and J - 1328 ). The × red markers over an individual denote the sensor location presence among its genes. Moreover, the [ + ] green markers over an individual denote the presence of a neighboring node proposed as a sensor location among its genes.
Water 17 02786 g006
Table 1. Maximum values for each objective function Z 1 4 with respect to BWSN 1.
Table 1. Maximum values for each objective function Z 1 4 with respect to BWSN 1.
Z 1 , m a x [ m i n ] Z 2 , m a x [ p ] Z 3 , m a x [ M L ] Z 4 , m a x [ k m ]
1440 23,350 4.596 37.566
Table 2. Statistics for detection times, nodal population, and flowrates with respect to BWSN 1.
Table 2. Statistics for detection times, nodal population, and flowrates with respect to BWSN 1.
ParameterMinimumAverageMaximum
Detection times [ m i n ] * 0 732.48 1440
Nodal population [ n ° ] 0 189 4713
Flowrates [ L / s ] 6 × 10 6 6.49 53.19
Note: * An upper limit Z 1 ,   m a x for detection times has been assumed.
Table 3. SPO process execution times and number of evaluated solutions per second with respect to BWSN 1 *.
Table 3. SPO process execution times and number of evaluated solutions per second with respect to BWSN 1 *.
Parameter Z 14 Z 24 Z 34 Z 12
Execution time [ m i n ] 6 ÷ 7 8 ÷ 9 7 ÷ 8 6 ÷ 7
Evaluated individuals per second 6000   ÷ 7000 4500   ÷ 5200 5200   ÷ 6000 6000   ÷ 7000
Note: * The presented values refer to a laptop with AMD Ryzen 7 5800H 8-core CPU @ 3.20 GHz and 16.0 GB RAM.
Table 4. Maximum values for each objective function Z 1 4 with respect to BWSN 2.
Table 4. Maximum values for each objective function Z 1 4 with respect to BWSN 2.
Z 1 , m a x [ m i n ] Z 2 , m a x [ p ] Z 3 , m a x [ M L ] Z 4 , m a x [ k m ]
1440 611,125 105.735 1843.920
Table 5. Statistics for detection times, nodal population, and flowrates with respect to BWSN 2.
Table 5. Statistics for detection times, nodal population, and flowrates with respect to BWSN 2.
ParameterMinimumAverageMaximum
Detection times [ m i n ] * 0 997.64 1440
Nodal population [ n ° ] 0 49 7527
Flowrates [ L / s ] 0 8.32 967.36
Note: * An upper limit Z 1 ,   m a x for detection times has been assumed.
Table 6. SPO process execution times and number of evaluated solutions per second with respect to BWSN 2 *.
Table 6. SPO process execution times and number of evaluated solutions per second with respect to BWSN 2 *.
Parameter Z 14 Z 24 Z 34 Z 12
Execution   time   [ m i n ] 12 ÷ 13 20 ÷ 21 14 ÷ 15 13 ÷ 14
Evaluated individuals per second 3200   ÷ 3500 1900   ÷ 2100 2700   ÷ 3000 3000   ÷ 3200
Note: * The presented values refer to a laptop with AMD Ryzen 7 5800H 8-core CPU @ 3.20 GHz and 16.0 GB RAM.
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

Zanelli, E.; Nicolini, M.; Goi, D. Optimal Water Quality Sensor Placement in Water Distribution Systems: A Computationally Cost-Effective Genetic Algorithm Framework. Water 2025, 17, 2786. https://doi.org/10.3390/w17182786

AMA Style

Zanelli E, Nicolini M, Goi D. Optimal Water Quality Sensor Placement in Water Distribution Systems: A Computationally Cost-Effective Genetic Algorithm Framework. Water. 2025; 17(18):2786. https://doi.org/10.3390/w17182786

Chicago/Turabian Style

Zanelli, Elia, Matteo Nicolini, and Daniele Goi. 2025. "Optimal Water Quality Sensor Placement in Water Distribution Systems: A Computationally Cost-Effective Genetic Algorithm Framework" Water 17, no. 18: 2786. https://doi.org/10.3390/w17182786

APA Style

Zanelli, E., Nicolini, M., & Goi, D. (2025). Optimal Water Quality Sensor Placement in Water Distribution Systems: A Computationally Cost-Effective Genetic Algorithm Framework. Water, 17(18), 2786. https://doi.org/10.3390/w17182786

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