Locating Leaks with TrustRank Algorithm Support

This paper presents a methodology to quantify and to locate leaks. The original contribution is the use of a tool based on the TrustRank algorithm for the selection of nodes for pressure monitoring. The results from these methodologies presented here are: (I) A sensitivity analysis of the number of pressure transducers on the quality of the final solution; (II) A reduction of the number of pipes to be inspected; and (III) A focus on the problematic pipes which allows a better office planning of the inspection works to perform atthe field. To obtain these results, a methodology for the identification of probable leaky pipes and an estimate of their leakage flows is also presented. The potential of the methodology is illustrated with several case studies, considering different levels of water losses and different sets of pressure monitoring nodes. The results are discussed and the solutions obtained show the benefits of the developed methodologies.


Introduction
Water supply is one of the most valuable public services of civilized societies [1].Water supply systems comprise two different parts: Transmission mains-pipes transporting water to tanks; and Water Distribution Networks (WDN)-pipes and service connections distributing water to costumers.However, these infrastructures are not completely watertight.Even in the most recent and well-built WDN, some level of leakage and occasional pipe bursts occur, leading to water losses.
Unlike in transmission mains, WDN are topologically complex and have service connections, making water loss control a difficult task.If the water lost is not visible or the consumers do not report service anomalies, such as low pressure or lack of water, leaks can be very difficult to locate.Leak location activity is usually supported by acoustic equipment, but this approach is expensive, requires specialized human labour and can be very time consuming.An automatic, quick and accurate leak location methodology or technique is the aspiration of every water company.
Although manufacturers continue developing new and better equipment, leak location in plastic pipes or in pipes with large diameters is still a problem.To contribute towards the mitigation of this problem, a new computational methodology was developed to help locating unreported leaks and estimating its flow (water loss assessment).This methodology results from linking a hydraulic simulation model to an optimization model.The hydraulic simulation model performs steady state analysis to estimate the water distribution network behaviour.The optimization model aims to minimize the difference between measured and estimated pressures, and its decision variables are the locations and flows from unreported leaks.
The success of methodologies based on pressure measurements is quite dependent on the number and location of the pressure transduces [2][3][4][5].Thus, an innovative tool based on the TrustRank algorithm was developed to help selecting the nodes for pressure monitoring.
This paper presents a methodology to quantify and to locate leaks.The original contribution is the use of a tool based on the TrustRank algorithm for the selection of nodes for pressure monitoring.The results from these methodologies presented here are: (I) A sensitivity analysis of the number of pressure transducers on the quality of the final solution; (II) A reduction of the number of pipes to be inspected; and (III) A focus on the problematic pipes which allows a better office planning of the inspection works to perform atthe field.To obtain these results, a methodology for the identification of probable leaky pipes and an estimate of their leakage flows is also presented.
The potential of the methodology is illustrated with several case studies, considering different levels of water losses and different sets of pressure monitoring nodes.The results are discussed and the solutions obtained show the benefits of the developed methodologies.

State of the Art
According to Pilcher [6], in the 1850s water loss control in WDN was already a concern.Although these are fundamental infrastructures to communities, being buried, they often pass unnoticed to the public, and this distracts people's awareness away from the water loss problem.
Water loss has several negative impacts, for both the water companies and the society itself, namely: operational (lower service level), economic (lower income and higher operating and capital costs), environmental (higher amount of water and energy usage, and consequent higher water and carbon footprints), public health (potential focus of contamination) and social (service disruptions, traffic disturbances and damage to people and their belongings).These impacts will be more severe with the increase of water demand, the climate change and water scarcity.
Water loss includes apparent losses (unauthorized consumption and customer meter inaccuracies) and real losses (leakage on transmission and/or distribution mains, leakage and overflows at utility's storage tanks and leakage on service connections up to the point of customer metering).Real losses are an operational problem and correspond to the annual volume of water lost through leakage and overflows at tanks and leaks and bursts in pipes and service connections up to the point of customer metering [7].
The reduction of real losses in WDN can be attained by adopting active leakage control (ALC) policies.But ALC is not a simple task because unreported leaks can be very difficult to locate, in particular if the water lost is not visible or the customers do not report service anomalies (low pressure or lack of water).The leak location activity is usually supported by acoustic equipment, but it has some drawbacks: is quite expensive, requires specialized human labour, can be very time consuming and is not very effective in plastic pipes and pipes with large diameters.An automatic, quick and accurate leak location methodology or technique is the aspiration of every water company.
Monitoring is important in the water loss control context.Tank monitoring is the most common and usually comprises: water level (to avoid overflows and test for leakage) and flow, particularly during the night when consumption is at its minimum-minimum night flow (for real losses estimation and to support ALC activities).However, measurements in other parts of the WDN is also common, like flow measurement at the entrance of each district metered area (DMA) or pressure measurement at the entrance of each pressure management area (PMA) and at critical points [8].Nevertheless, the opportunity to monitor pressure in other spots can play an important role in the context of WDN operation.
In the last few years the monitoring technology has undergone a remarkable evolution.Nowadays equipment is easily achievable, smaller, accurate and precise, can be battery powered and last for years, and can communicate through wireless networks.These new features contributed to widespread monitoring in WDN.Data collected through monitoring has been used for years to calibrate hydraulic models, and it is helpful in planning and operation activities, including leak location.But the location of the flow and pressure sensors plays an important role, and the optimal sensor placement is still an open research subject.For example, for leak location purposes, Candelieri et al. [9] selected the best locations by identifying the best trade-off between reliability and deployment costs, Bort et al. [10] compared two alternatives using pressure sensitivity; Blesa [11] used robustness analysis and clustering and Steffelbauer [12] investigated the use of Monte Carlo simulation.Some of the existing methodologies developed for leak detection/location are based solely on the analysis of flow and/or pressure measurements: Artificial Neural Networks have been used for leak detection [13][14][15] and also for leak location [16]; Poulakis et al. [17] and Qi [18] proposed a Bayesian system identification methodology for leak location; Fuzzy Inference Systems, which are computational techniques from the field of Artificial Intelligence, were used by Mounce et al. [19] to detect leaks in WDN, and Fuzzy set theory was also used by Islam et al. [20] for leak detection and location; Aksela et al. [21] used self-organizing maps, combining flow data with a leak function to model leakages, to solve the leakage detection problem; Gertler et al. [22] applied principal component analysis to locate leaks; Jung et al. [23] used nonlinear Kalman filter; Okeya et al. used a modified Kalman filter [24]; Kang et al. [25] used control limit analysis to detect bursts; and Goulet et al. [5] used a model-falsification methodology for leak-detection.
Flow and/or pressure sensors data, combined with the energy and mass conservation laws, provide the necessary conditions to build state-estimation (or inverse) problems.This methodology was traditionally used to calibrate WDN models [26], given a set of flow and/or pressure measurements.Pudar and Liggett [27] presented a methodology based on this idea considering equivalent orifice areas of possible leaks as the unknowns.Andersen and Powell [28] presented an implicit formulation of the standard weighted least squares state-estimation problem, solved using an implicit Lagrangian approach.Poulakis et al. [17] used a Bayesian probabilistic framework to handle the unavoidable uncertainties in measurement and modeling errors, while Puust et al. [29] used the Shuffled Complex Evolution Metropolis (SCEM-UA) algorithm to estimate the probability density functions of unknown leak areas.
The same data combined with hydraulic simulation models can also be used to locate leaks in WDN.These hydraulic models can be based on steady state or unsteady state (transient) conditions.The arising of hydraulic transient based techniques to locate leaks occurred in the 1990s [30] and they consist inartificially introduce transients in the WDN and analyse the pressure data to locate the leaks.Despite that leak location with transients can be excellent for tank-pipe-tank systems, in real WDN its application can be much compromised.Due to the transients behaviour, the pressure data must be recorded with very short time steps and the accuracy of the procedure is very dependent on the celerity (pressure wave velocity), which can be difficult to estimate accurately in real world conditions.Notwithstanding, transient test-based techniques have proved to be effective in locating leaks in transmission mains.The pioneering work from Liggett and Chen [30] opened a new field of research.The main advances observed in the following two decades can be found in Colombo et al. [31] and Puust et al. [32] present extensive reviews of these methodologies.More recently signal processing has demonstrated its capabilities to help in this problem [33,34], the impedance method was used [35], wavelet analysis has improved [36,37], a portable pressure wave-maker has been designed [38] and experiments were carried out in real pipe systems to demonstrate the reliability of this approach [39,40].
Even knowing that true steady state conditions do not occur, leak location with steady state models seems to be a suitable approach for real world WDN [41].The steady state based techniques simulate different hypothetical leakage scenarios, corresponding to different leak locations and severities (leak flows), trying to match the flow and/or pressure data obtained from transducers installed in the WDN.The implementation of this approach requires a calibrated model of the WDN and its accuracy depends on the pressure measurements and the head loss estimation.Leakage modelling can be performed using Demand-Driven-Analysis (DDA)-leak flows are pressure independent [42,43] or Pressure-Driven-Analysis (PDA)-leak flows depend on the pressure values [44,45], however, due to the pressure/leakage relationship, the latter approach is theoretically more sound.Wu and Sage [46] used DDA while Wu et al. [47] used PDA, but in both works the optimization problem to identify the leak locations was solved with genetic algorithms.Based on previous work [27,46], Ribeiro et al. [48] used a calibrated model and a simulated annealing algorithm to locate leaks during the minimum night flow period.The hydraulic simulations were performed assigning leak flows to pipes and these were equally distributed among the pipe endpoints.Solutions from this methodology helped to identify the most probable leak locations and estimate the respective leak flows.
As location and number of pressure transducers contribute to the success of methodologies to locate and quantify leaks, this paper presents an innovative tool based on the TrustRank algorithm to help in selecting the nodes for pressure monitoring.

Methodology
Firstly, a computational methodology was developed to help in locating unreported leaks and estimating its flow (water loss assessment).This methodology results from linking a hydraulic simulation model [49] to an optimization model [50].The hydraulic simulation model performs steady state analysis to estimate the water distribution network behaviour.The optimization model aims to minimize the difference between measured and estimated pressures, and its decision variables are the locations and flows from multiple unreported leaks.
Secondly, a selection of the nodes to be monitored is made with an adaptation of the TrustRank algorithm and a sensitivity analysis to the number of pressure transducers on the quality of the final solution is evaluated.The results allow the identification of probable leaky pipes and an estimate of their leakage flow is also presented.Consequently, the pipes not identified in any solution have a reduced probability of having leaks.The results allow a better problem diagnosis and a supported planning of the inspection works to be performed at the field, with the number of pipes to be inspected considerably reduced.

Link between Hydraulic Simulator and Optimization Model
Given a WDN with a certain total leakage flow, the methodology proposed here is intended to identify the most probable leaky pipes and estimate their leakage flows.It uses a calibrated model of the WDN to predict its hydraulic behaviour assuming that water consumption during the Minimum Night Flow period is known.
The WDN is being monitored (tanks are equipped with flow meters and a set of nodes is equipped with pressure transducers) and the information gathered in the past has been used to calibrate the model and the actual monitoring data will now be used to locate leaks.
The leak location is achieved by simulating hypothetical leakage scenarios.The scenarios presenting pressure values close to those obtained from the field observations are selected.This is done by using an optimization model, which is solved by linking a simulated annealing algorithm with a hydraulic solver (Figure 1).The objective function is formulated to minimize the differences between measured (monitoring data) and estimated (simulation results) pressures.

Optimization Model
The objective function of the optimization model ( 1) is the minimization of the differences between the pressures measured "in situ" and the correspondent pressures estimated with the simulation model, for all monitored nodes: where: = pressure head measured at node i (m); = pressure head estimated at node i (m); γ = specific weight of water; NPT = number of nodes with pressure transducers.The constraints of the optimization model are the common hydraulic constraints, like energy and continuity equations, and are implicitly tackled by the hydraulic simulation model.

Hydraulic Simulation Model
The WDN hydraulic behaviour is studied assuming steady state conditions, by using the mass and energy laws [51].At the minimum night flow period water demand is usually very low and less uncertain.Head loss gets reduced and pressure head and leakage reach their maximum values.Although WDN hydraulic behaviour is always changing, under these conditions the steady state assumption does not introduce major inaccuracies [52].For each leakage scenario, the hydraulic simulation model [49], compiled in FORTRAN, uses the node equations to estimate the pressure for the monitored nodes, under steady state conditions.These equations are solved by the Newton-Raphson method.This method has been successfully applied in several works [13,[53][54][55], and here it is supported by a line search algorithm to optimize the step length in order to improve convergence and avoid the drawbacks of the original method.The node equations implicitly ensure the mass conservation and the energy laws, and the head losses were estimated with the Hazen-Williams Formula (2): where: ∆ = head loss in the pipe between nodes i and j (m); = length of the pipe between nodes i and j (m); = flow in the pipe between nodes i and j (m 3 /s); = diameter of the pipe between nodes i and j (m); = Hazen-Williams coefficient of the pipe between nodes i and j.
The Hazen-Williams formula is very simple and is widely used to estimate the friction losses from turbulent water flows in circular pipes at normal temperatures [27,56].It was obtained empirically and is valid for pipes bigger than 50 mm and flow velocities under 3 m/s.Due to its simplicity and accuracy, since the beginning of the twentieth century this formula has been frequently used in the design and analysis of WDN.

Simulated Annealing Algorithm
The optimization model presented in Section 2.1.2is non-linear, non-convex and contains continuous variables (leakage flow at each pipe), and so it was decided to use a simulated annealing algorithm [57,58] to solve it.Simulated annealing is a randomized search method [59] that is known to quickly find good solutions, even in extended search spaces.This method has been used to solve different problems from the water supply field, as documented in the literature: least cost design of WDN [60], robust design of WDN [61,62], optimal operation of WDN [63], optimal design and operation of WDN [55,64], pressure management in WDN [65], District Metered Areas design [66], and optimization of reservoir operation [67,68].
The simulated annealing method was inspired by the physical annealing process.The temperature is increased to a value considered high enough to melt a solid, following a slow cooling process in order to allow the molecular structure to reorganize and reach the minimum energy state-A crystal.Theoretically the algorithm converges to the global optimal solution [69] but in real world applications, due to the necessity to limit the number of solutions to evaluate, it is impossible to guarantee its global convergence.A simulated annealing algorithm requires the definition of an initial solution, an initial temperature, a procedure to build neighbourhoods, a cooling schedule (temperature decay and number of evaluations to be performed at each temperature), and a stopping criterion.The algorithm starts the search from an initial solution, which at this stage also plays the roles of best solution found so far and current solution.Then the neighbourhood procedure is used to identify a candidate solution in the neighbourhood of the current solution.The hydraulic behaviour of this candidate solution is estimated with the hydraulic simulation model, and its quality is assessed by the objective function (1).The acceptance or rejection of each candidate solution is governed by the Metropolis criterion (if the candidate solution is better than the current solution it is accepted, otherwise it may be accepted with a certain probability).The algorithm implemented comprises the following steps and the information presented in Table 1: Table 1.Simulated annealing algorithm implementation.

Part of the algorithm Implementation
Initial solution (x 0 ) The total leakage flow is split and each part is assigned to a selected pipe Initial temperature (Tqt_initial) Tqt_initial = −0.1 × F(x 0 )/Log(0.Step 1: Choose the initial solution (x0), the initial temperature (Tqt_initial) and fix the number of solutions to be evaluated at each temperature (IA multiplied by the number of pipes in the WDN).The initial solution assumes the roles of current solution (xcurrent) and best solution found so far (xbest); Step 2: Generate a candidate solution accessible from the current solution (xcandidate) by applying one of the next two processes: (I) Transfer an elementary unit of the leakage flow from one pipe to one of its adjacent pipes (diversification mechanism); (II) Randomly select a leaky pipe and concentrate in it all the leaks from its adjacent pipes (concentration mechanism); Step 3: Check the hydraulic behaviour of the candidate solution and assess the solution quality with the objective function (1); Step 4: Apply the Metropolis criterion: If the candidate solution is better than the current solution or fulfils the condition established in Equation (3) it is accepted and becomes the next current solution (if this candidate solution is better than the best solution found so far, it takes its place), otherwise the candidate solution is rejected and the current solution is maintained: Step 5: Increment the counter of solutions evaluated at this temperature.If this counter does not exceed the number of solutions to be evaluated at this temperature, go to Step 2; Step 6: Apply the cooling schedule (Table 1) that defines the temperature decrease (Tqti+1) and the number of solutions to be evaluated at the new temperature as a function of the percentage of accepted solutions (Pa) at the previous temperature (Tqti); Step 7: If the stopping criteria is not met, restart the counter of solutions evaluated at the new temperature and return to Step 2, otherwise stop and the final solution is xbest.

Methodology for Pressure Transducers Location
In the context of leak location in WDN, fixing the adequate number of pressure transducers and its optimal placement is not an easy task.They are expensive and there are no simple rules to define the number of pressure transducers as a function of the WDN characteristics (for example, based on the length, total flow or leakage flow).If the WDN is divided in DMAs, it is common to install at least one pressure transducer at the critical node of each DMA (node with minimum pressure closer to the minimum required), and if the DMA is also a PMA it may also include a pressure transducer at the entrance node.
On the other hand, in networks without DMAs, to obtain a good coverage of the entire WDN, the spots where to install pressure transducers depend on their quantity and different quantities will certainly lead to different placements.It is known that all these variables can be interrelated and constrain the optimal solution [3].
The cost of acquiring the pressure transducers and gathering data limits the number of nodes to be monitored.In theory, if data was collected at all nodes, the methodology proposed here would certainly identify correctly all the leaks.In a previous paper [48], an attempt was made assuming that all end nodes of branched pipes were monitored and the methodology produced promising results.However, in real WDN there are usually also space and functional limitations for placing pressure transducers.Being so, this paper presents a methodology for pressure transducers location and a sensitivity analysis of the impact of increasing the number of pressure transducers on the quality of the final solution.

Adaptation of the TrustRank Algorithm to Water Distribution Networks (WDN)
The selection of the nodes to be monitored is made with an adaptation of the TrustRank algorithm for WDN.The TrustRank algorithm [70] was originally developed to separate the good web pages from bad (spam) and it is used by internet search engines.For every webpage, the algorithm assigns a trust score.The foundations of the algorithm for assigning the trust score are: a good page has high trust score and rarely points to bad pages ("approximate isolation of the good set"); In the transition from one web page to another there is transmission of trust, and trust reduces as we move away from the good pages ("trust attenuation").The trust transmitted from a webpage (source) to the following (destination) is inversely proportional to the number of links from the source page ("trust splitting").
The adaptation of the TrustRank algorithm to WDN is straightforward.Based on the water demand, this algorithm can easily select the nodes where the uncertainty of the pressure head is higher.In WDN all nodes are connected by pipes and the water flows from the source nodes (reservoirs/tanks) to the junction nodes downstream.Thus, the nodes of the WDN can be organized in a way similar to the web pages.The adapted trust transmission law is represented by Equation ( 4): where, T(d) = trust transmission of the source node (s) to the destination node (d); R(s) = trust score of the source node; N = number of pipes that discharge from node (s).Reservoirs/tanks are the nodes with the highest trust scores (1.0).They are sources, the most influential nodes [71], this means, nodes where the water level is known as well as the total flow (demand and leakage) is provided and measured.At the minimum night flow period, the hydraulic simulator is used to calculate flows in pipes, and this flow pattern rules the order of the trust transmission law.
The trust score of a junction node is the sum of the trust transmissions from all the nodes that supply it (closest upstream nodes).In pipes with a flow below the stop criterion of the hydraulic simulator (head loss close to zero), it is assumed that there is no reliable trust transmission.Endpoints with the lowest trust scores are the first to be monitored because they are the less influential nodes (nodes with higher uncertainty and the transducers information will serve to reduce it).If the number of nodes with equal trust score exceeds the number of points to be monitored, the pressure transducers are randomly placed in those nodes (Figure 2).

Computer Application
The methodology described below was implemented as a computer application with a user interface to facilitate the communication between the user and the different modules.It assumes that there is a calibrated model of the WDN, actual total leakage flow can be estimated by comparing the actual minimum night flow with historical data or by estimating the minimum night consumption and subtracting it to the actual minimum night flow.The hydraulic simulation model has a stop criterion of one centimetre in pressure and one centilitre per second in flow.Taking into account the hydraulic simulation model and the pressure sensors accuracies, the pressure measurements were truncated at the millimetre.
The procedure starts by dividing the total leakage flow in a user defined number of flow units and the result is the elementary unit of leakage flow (Δql).
The construction of the initial solution (x0) starts by assigning the water consumption to the junction nodes.Then, sequentially, each Δql is assigned to a pipe using the following procedure: assign one Δql to one of the pipes in the network (a half of each elementary unit of leakage flow is assigned to its end nodes), use the hydraulic simulation model to simulate the hydraulic behaviour of the WDN (considering both water consumption and leakage-Δql already assigned), assess the objective function (1), repeat the simulation for each of the pipes in the network and finally assign this Δql to the pipe that obtained the lowest value of the objective function (1); Repeat the process until all Δql are assigned.At this stage the total leakage flow is completely assigned (note that some pipes may have more than one Δql) and this is the initial solution to start solving the optimization model.The objective function value of the initial solution (F(x0)) is then used to calculate the initial temperature (Tqt_initial) to start the simulated annealing algorithm.
Due to the stochastic nature of the simulated annealing algorithm, the robustness of the search process was tested by solving the optimization problem with fifty different sets of random numbers (different seeds).The search procedure evolves by generating different combinations of leakage flows assigned to pipes (candidate solutions) looking for the one that best fits the pressure measurements.Each set of random numbers produces one solution (if the search procedure is robust these solutions should be equal or, at least, similar) and at the end the methodology builds the final solution by combining the fifty solutions, identifying for each pipe the number of times that it was part of a solution.Pipes figuring more times in the fifty solutions are potential leaky pipes-greater probability of having leaks, while pipes that were not identified have zero probability of being leaky pipes.

Case Study
The performance of the proposed methodology is illustrated with 240 case studies created specifically for that purpose.All the case studies use the same WDN (one tank, 100 junction nodes, 111 pipes and 11 loops), but considering two different lengths (each pipe has its original length-first WDN, and half-second WDN), two leakage flow scenarios (1.5 and 15.0 L/s), 10 random spatial distributions of the leakage flows (situations presented in Table 2 and illustrated in Figure 3) and collecting data from six different sets of monitoring nodes (10,12,14,16,18 and 20 pressure transducers).
Table 2. Leakage flow spatial distributions (situations) for scenario 1 (1.5 L/s).The use of the same WDN with different lengths is intended to assess the methodology performance under the influence of different head losses.
The original length of the WDN is almost forty-three kilometres (42.935 km) and during the minimum night flow period the water consumption equals 2.315 L/s.For each situation the leaky pipes were randomly chosen and the leakage flows range from 0.1 to 0.5 L/s in scenario 1 (Table 2) and for scenario 2 the leakage flows are ten times those from scenario 1 in the same pipe.

TrustRank Algorithm Application
The results from the TrustRank algorithm (trust score for each node) are presented in Table A1 (Appendix), in which the first ten nodes with pressure transducers are in bold.Each of the six sets of monitoring nodes (pressure transducer placement) is presented in Table 3 and illustrated in Figure 4.The sets of monitoring nodes represent from 10% up to 20% of the nodes in the WDN.As previously mentioned, the methodology starts by calculating fifty solutions, obtained with different sets of random numbers, and builds the final solution afterwards in which each pipe is represented by the number of times it was identified as a probable leaky pipe in those solutions.To facilitate the analysis, results are presented in the format of reliable leaky pipes (those that were identified at least ten times, that is, in 20% of the solutions) and total leaky pipes (those that were identified at least once).

First WDN
The total length of the first WDN is 42.935 km (each pipe presents its original length).During the minimum night flow, if there was no leakage (only 2.315 L/s of water consumption), the head loss between the tank (node 101) and the hydraulically furthest node (node 13) is 0.039 m. Results from the proposed methodology (number of reliable and total leaky pipes) are presented in Tables 4 and 5, where the crossing of the situation (horizontally) with the number of pressure transducers (vertically) leads to the number of reliable and total leaky pipes for scenarios 1 (Sc1) and 2 (Sc2).For leakage scenario 1 (Sc1), situation 1 (St1) described in Table 2 (identification of the leaky pipes and respective leak flows), and using the first transducers set described in Table 3, seven pipes were identified as reliable leaky pipes (first number in the cell defined by row "Situation 1" and column "Number of pressure transducers 10" in Table 4).The same pipes were identified as total leaky pipes (first number in the cell defined by row "Situation 1" and column "Number of pressure transducers 10" in Table 5).Five from these seven pipes were precisely the correct leaky pipes presented in Table 2.
For leakage scenario 2 (Sc2), situation 1 (St1) described in Table 2 (identification of the leaky pipes and the respective leak flows are ten times the leak flows presented), and using the first transducers set described in Table 3, five pipes were identified as reliable leaky pipes (second number in the cell defined by row "Situation 1" and column "Number of pressure transducers 10" in Table 4), as well as total leaky pipes (second number in the cell defined by row "Situation 1" and column "Number of pressure transducers 10" in Table 5).five pipes were precisely the correct leaky pipes presented in Table 2.
Figures 5 and 6 compare the number of reliable and total leaky pipes, respectively, for ten situations (St1 to St10), with the different sets of pressure transducers, in scenario 1 (right side) and in scenario 2 (left side), for the first WDN.For all situations and independently of the number of pressure transducers, the leak flow of each pipe is assigned to the correct pipe or to its adjacent pipes.As a consequence the pipes that might have leaks are circumscribed to a reduced area of the WDN.
The evaluations with fewer pressure transducers tend to spread the leak flow among the correct pipe and its adjacent pipes.Nevertheless, using only ten pressure transducers, there were only two over twenty situations that identified only four out of the five leaky pipes in Table 2.Both occurred in scenario 1, and all other situations identified the leaky pipes correctly.Increasing the number of pressure transducers tends to improve the identification of the leaky pipes and/or the leak flows.
In scenario 2 (bigger leakage flow), the final solutions are globally better than those from scenario 1.The bigger leakage flow is associated with a bigger head loss and the impact in the pressure transducers observations is also bigger.Against the expected, in scenario 2, for situation 4 with 12 monitoring nodes and for situation 10 with 14 monitoring nodes, the searching process stopped prematurely with poor final solutions identifying too many leaky pipes.Nevertheless all leaky pipes were correctly identified in all solutions.

Second WDN
The second water distribution network has a total length of 21.468 km (each pipe presents a half of its original length) and, for the night consumption without leakage, the maximum head loss observed is 0.0196 m. Results from the application of the proposed methodology to both scenarios, with each situation, and assuming different sets of pressure transducers, are summarized in Tables 6 and 7.
The second WDN has the same consumption and leakage flow of the first WDN, but each pipe has half of the original extension.Consequently, the head loss is also reduced to a half in each correspondent pipe and the pressure transducer observations approach the static pressure value.As previously observed for the first WDN, increasing the number of pressure transducers also yields benefits.
For the second WDN the solutions tend to identify more leaky pipes and the number of reliable pipes increases.Pipes adjacent to the reliable pipes in the first WDN now become reliable pipes.As the number of probable leaky pipes increased, the leakage flow assigned to those pipes decreased.
Figures 7 and 8 compare the number of reliable and total leaky pipes, respectively, for the second WDN.

Discussion of Results
The methodology presented here to locate and quantify leaks is able to identify as many leaky pipes as necessary.It showed its ability to deal with WDN with different characteristics: total length, total leakage flow and leakage flow spatial distribution.
Results confirm that the methodology is effective and robust.In fact, despite the dispersion observed in some of the results, the majority of the pipes with leaks were identified in all the case studies.Solutions from scenario 2 were always better than those from scenario 1, this means, in all situations considered, pipes with greater leakage flows were better identified than the others.It becomes evident that the search procedure tends to get focused on the most problematic pipes (bigger leakage flows) and in those cases the dispersion gets reduced.
The results of the TrustRank algorithm locate the pressure transducers in the periphery, covering the entire WDN.
Concerning the monitoring nodes, results showed that, as expected, more pressure transducers improve the quality of the solutions, reducing the dispersion and increasing the confidence on the identification of the probable leaky pipes and pipes without leakage problems.Results also showed that leaky pipes close to the tank were more difficult to identify and this can be explained by the lower head losses.
In some of the case studies the solutions identified only the correct leaky pipes (mostly for scenario 2 and with more pressure transducers), demonstrating that the methodology can be effective.Additionally, in many other case studies the number of reliable pipes is only slightly higher than the correct number of leaky pipes, which is also a good contribution for the methodology effectiveness.However, in a reduced number of case studies (with fewer pressure transducers) the number of reliable leaky pipes is considerably high showing that the methodology still can be improved.The introduction of more monitoring nodes certainly would contribute to increase the quality of the solutions, but on the other hand it would also increase the cost of acquiring the equipment and gathering data.An alternative is to maintain the number of monitoring nodes and improve their effectiveness by artificially increase the head loss in the WDN [53], but this is a subject to be explored in a future work.A third alternative is to improve the stopping criterion in the simulated annealing algorithm that would continue to search for a longer time.
It was observed that the quality of the solutions depends on the total leakage flow and its spatial distribution, the number of monitoring nodes and the position of the leaky pipes in the WDN.Increasing the number of monitoring nodes contributes to improve the quality of the solutions in terms of total leaky pipes identified: the duplication of the monitoring nodes reduces to less than a half the total leaky pipes (Figures 9 and 10).But the total leakage flow also plays an important role: the number of total leaky pipes is reduced to about a half with a ten times increase in the total leakage flow (scenarios 1 and 2), eliminating most of the false leaky pipes (Figure 9).
Figure 10 presents a relationship between the number of transducers and the average number of potential leaky pipes identified.As expected, when the number of pressure transducers increases, the number of potential leaky pipes decreases, which means that the pipes identified have a high probability of being leaky.The presence of additional pressure transducers decreases mainly the average number of total pipes for both scenarios, and it can be seen that the improvement obtained follows a power law.

Conclusions
Minimize water loss is an important task for any water company.This paper presented a methodology that uses a hydraulic model of the WDN to quickly and economically identify probable leaky pipes.This methodology is based on pressure measurements and explores the exchange of information between an optimization model and the hydraulic simulation of the WDN in steady state conditions.The pressure transducer placement is carried out by a novel tool based on the TrustRank algorithm, specifically developed to select the monitoring nodes, demonstrating ability to gather the necessary information for the methodology to work.The optimization model used to identify the leaky pipes is solved by a simulated annealing algorithm, a reliable, fast, and easy to implement method.
The results obtained for a set of 240 case studies (two networks, two leakage flow scenarios, ten spatial distributions of the leakage flow and six sets of pressure transducers) are very encouraging.The implementation of the methodology does not affect the regular activity of the WDN and it is able to identify existing leaky pipes.Results showed that, in general, this leak location procedure identifies a small number of pipes, confining the inspection works to a considerably reduced extension of the WDN.
Future works include the analysis of the WDN in quasi-steady state conditions and apply it to a real WDN to confirm its effectiveness.

Figure 1 .
Figure 1.Methodology to predict leak location and quantity.

Figure 2 .
Figure 2. Methodology for selection of pressure transducers placement.

Figure 4 .
Figure 4. Network layout with the pressure transducers placement.

Figure 5 .
Figure 5. Number of reliable leaky pipes in the first WDN.

Figure 6 .
Figure 6.Number of total leaky pipes in the first WDN.

Figure 7 .
Figure 7. Number of reliable leaky pipes in the second WDN.

Figure 8 .
Figure 8. Number of total leaky pipes in the second WDN.

Figure 9 .
Figure 9. Average of total and reliable leaky pipes for both scenarios and the two WDN.

Figure 10 .
Figure 10.Relationship between the number of pressure transducers and the number of total and reliable pipes.

Table 4 .
Number of reliable leaky pipes in the first WDN (scenario 1/scenario 2).

Table 5 .
Number of total leaky pipes in the first WDN (scenario 1/scenario 2).

Table 6 .
Number of reliable leaky pipes in the second WDN (scenario 1/scenario 2).

Table 7 .
Number of total leaky pipes in the second WDN (scenario 1/scenario 2).