Pressure-Driven Demand and Leakage Simulation for Pipe Networks Using Differential Evolution

Traditional techniques for hydraulic analysis of water distribution networks, which are referred to as demand-driven simulation method (DDSM), are normally analyzed under the assumption that nodal demands are known and satisfied. In many cases, such as pump outage or pipe burst, the demands at nodes affected by low pressures will decrease. Therefore, hydraulic analysis of pipe networks under deficient pressure conditions using conventional DDSM may cause large deviation from actual situations. In this paper, an optimization model is introduced for hydraulic analysis of water distribution networks using a meta-heuristic method called Differential Evolution (DE) algorithm. In this methodology, there is no need to solve linear systems of equations, there is a simple way to handle pressure-driven demand and leakage simulation, and it does not require an initial solution vector which is sometimes critical to the convergence. Also, the proposed model does not require any complicated mathematical expression and operation.


Introduction
In the recent past, several packages originally developed for steady state analysis of looped water distribution systems.For instance, EPANET2 has been extended to include the possibility of "extended period simulations" (EPS), namely the possibility of simulating long periods of time by means of a succession of steady states, only accounting for the change in storage of reservoirs occurring from one time step to the next [1].
This model, which is used in current engineering practice, is based on the conventional Demand Driven Simulation Method (DDSM).It assumes that nodal outflows are fixed and are satisfied regardless of network pressures.The assumption simplifies the mathematical solution of the problem but is not always appropriate because it is clear that the amount of outflow at nodal outlets depends on network pressures.If the pressure falls below a minimum required level (due to some critical events such as mechanical and hydraulic failures or excess demand), the flow will be significantly reduced.Although some nodes may be able to satisfy their demands, others may meet the demand partially while the rest may fail and may not provide any water at all.The assumption of fixed nodal consumptions is therefore valid only under normal conditions when the pressures can be expected to be adequate to satisfy the stipulated demands.If the operation of the system is simulated under pressure-critical conditions, the relationship between pressure and outflow should, therefore, be taken into account if the simulation results are to be realistic [2][3][4][5][6][7][8].Furthermore, water loss via leakage constitutes a major challenge to the effective operation of municipal distribution networks since it represents not only diminished revenue for utilities, but also undermined service quality [9] and wasted energy resources [10].A typical leakage control program usually starts with a water audit based on available flow measurements.Although this is an important first step, most practical studies do not go beyond it.In order to assist in leakage reduction and conduct more accurate analysis, a hydraulic model capable of accounting for pressuredriven (also known as head-driven) demand and leakage flow at pipe level is introduced by Giustolisi et al. [11].Meanwhile, there is still a chance to develop a new method for pressure-driven demand and leakage simulation in water distribution networks.In this paper, an optimization model is introduced for hydraulic analysis of water distribution networks using a meta-heuristic algorithm called Differential Evolution (DE).Analysis of hydraulic networks can be achieved by treating it as an optimization problem as shown by Arora [12], Hall [13], and Collins et al. [14].Arora considered a simple twopiped loop while Collins et al. have based their approach on rigorous theoretical background and developed nonlinear optimization models, solutions of which yield the hydraulic network analysis [15].Collins's model can be minimized by application of differential evolution algorithm.In this methodology, there is no need to solve linear systems of equations, there is a simple way to handle pressure-driven demand and leakage simulation, and it does not require an initial solution vector which is sometimes critical to the convergence.Also, the proposed model does not require any complicated mathematical expression and operation.In the next part, Collins's model is described.

Co-Content Model Approach
Arora [12] is the first researcher who suggested an approach based on the principle of conservation of energy.This principle states: "Flow in the pipes of a hydraulic network adjust so that the expenditure of the system energy is minimum."Next, Collins et al. [14] proposed a model termed the co-content model, that is based on equations having the unknown nodal heads as the basic unknowns, i.e., based on H equations.The unknown pipe flows are expressed in terms of the nodal heads and the known pipe resistances, so that the energy loss in pipe is given by [15]     In which R x is the hydraulic resistance function, h x is head loss in pipe x, i H and are pressure heads in node i and node j. and H 5 , respectively.Herein also consider a ground node G with fixed known level H 0G , as shown in Figure 1.
The nodes 3, 4, and 5 are connected to the ground node G with pseudo pipes, carrying the known nodal outflows q 3 , q 4 , and q 5 as shown in Figure 1.
The co-content optimization model is expressed as

01
H and 02 H are known pressure heads for source nodes.The first five terms of the objective function represent the energy loss in real pipes 1, of the network, respectively, and the last three terms show times the energy loss in the pseudo pipes [15].It should be noted that there are no constraints and therefore an unconstrained model in three decision variables is made.For minimization of optimization model, which are partially differentiating in unknown heads, the nodeflow continuity equations are created.Therefore, the solution of the co-content model gives the values of the unknown heads such that the node-flow continuity relationships are satisfied [15].For simplicity, oG H can be taken as zero, so that the General co-content model can be expressed as Collins et al. [14] suggested the solution of the NLP optimization of the model.Their method were 1) the Frank-Wolfe method; 2) a piece-wise linear approximation; and 3) the convex simplex method.These methods are highly depends on initial guesses and in some cases they converged to an incorrect solution [14].

Head Dependent Analysis
In the common approaches, it is presumed that the nodal demands are always satisfied at all demand nodes, irrespective of the available HGL values at demand nodes [15].But in practice, if the head at a node is insufficient, a reduction in the water flowing from the tap is expected and, in the worst case, the discharge that can be drafted will be zero, regardless to the actual demand [1].There are several solutions in the literature for these conditions.

Open Access WJET
Pressure-Driven Demand and Leakage Simulation for Pipe Networks Using Differential Evolution 51 Wagner et al. [16] and Chandapillai [17] suggested a parabolic relationship between required nodal head and minimum head.Their relationships are min min min min 0 H * is the required nodal head.This formulation is easily handled to co-content model without any mathematical complexity.

Leakage Simulation
Water losses via leakages constitute a major challenge to the effective operation of municipal WDN since they represent not only diminished revenue for utilities, but also undermined service quality [9] and wasted energy resources [10].In order to conduct more accurate analysis of a WDN, such as a better estimate of flow through the network (with respect to both satisfied demand and losses through leakage), a hydraulic analysis based on capable of accounting for pressure-driven (also known as head-driven) demand and leakage flow at the pipe level should prove invaluable.To reach this goal, a leakage model is expressed as follows [3] Where P k = average pressure in the pipe computed as the mean of the pressure values at the end nodes I and j of the kth pipe; and l k = length of that pipe.Variables α k and β k = two leakage model parameters [11].The allocation of leakage to the two end nodes can be performed in a number of ways [18].Here the nodal leakage flow q j−leak is computed as the sum of q k−leak flows of all pipes connected to node j as follows: where . This formulation is also easily handled to co-content model without any mathematical complexity.

Application of Differential Evolution Algorithm for Minimizing Co-Content Model
For the hydraulic analysis, this study introduces Differential Evolution (DE) algorithm.Because the algorithm was originally developed for solving optimization prob-lems, the hydraulic network analysis wasintroduced into an optimization problem (co-content model).One advantage of the DE algorithm is the fact that it does not require an initial solution vector which is sometimes critical to the convergence.Also, application of DE algorithm in co-content model does not require any complicated mathematical expression and operation.In this model, pressure-driven demand and leakage can be simulated.

Differential Evolution (DE)
Differential

Step 1. Initialize the Problem and Algorithm Parameters
In Step 1, the optimization problem is specified as follows: Where   C H is an objective function; H is the set of each decision variable.In this paper, the objective function is the co-content model; the unknown heads are the decision variables.

Step 2. Samples Generation
The initial population, initial values of the mutation factor, F and initial values of the crossover rate, CR for the DE is created arbitrarily by following formula: where 1 2 3 = independently generated random numbers in the range of τ ,τ ,τ   0,1 .

 
min , H i j and H max (i, j) are maximum and minimum limits of variable j and node i.

F
and max F are maximum and minimum limits of mutation factor.min and max are maximum and minimum limits of crossover rate.Then, the fitness values of all the individuals of population are calculated.The position matrix of the population of generation G can be represented as: N is the number of unknown nodes.

Step 3. Start Iterative Process
In this step, two main steps of DE, mutation, and crossover, are performed sequentially and new solution vectors are created.

Mutation Operator
In this step, mutation operator is used, for each solution vector in the population, to create new solutions in DE according to the following formula: A, B, and C are random solution vectors.

Cross-Over Operator
In the crossover operator, the new vector is generated by choosing some parts of mutation vector, and other parts come from the target vector.The crossover operator of DE is shown as follows: where CR represents the crossover probability.If random number rand is larger than CR value, the component of mutation vector will be chose to the trial vector.Otherwise, the component of target vector is selected to the trial vectors.The mutation and crossover operators are used to diversify the search area of optimization problems [19].

Step 4. Selection
The trial vector is carried to the next generation only if it yields a reduction in the value of the objective function in the case of the minimization problem.Otherwise, the target vector will be selected for the next generation.
The population of the next generation is selected as follows: where  

 
C H j represents the cost of the jth individual in the current generation.The F selections for the next generation is given by where G is the generation number.It should be noted that 0 G  in the initial generation.

Step 5. Check the Stopping Criterion
In this section, Steps 3, 4 and 5 are repeated until the termination criterion is satisfied.

Numerical Examples
In this section, the hydraulic analyses for several conditions in some water distribution networks are done.All of computations were executed in MATLAB programming language environment with an Intel(R) Core(TM) 2 Duo CPU P8700 @ 2.53 GHz and 4.00 GB RAM.In this study proposes the use of mass balance and energy bal- In all numerical examples , min max min and max .To check the performance of the DE for the minimization of co-content model, ten optimization runs were performed using different random initial solutions in all examples.

Numerical Example 1
In order to demonstrate the advantages of the proposed model in pressure-driven demand condition, the simplified water distribution network shown in Figure 3, was used.For the sake of simplicity, the same Hazen-Williams roughness coefficient C = 130 was assumed for all the 14 pipes of identical length of 1000 m, while no minor losses have been added.The following diameters have been used in the example: 500 mm (P-2); 400 mm (P-1); 300 mm (P-4, P-7); 250 mm (P-10); 200 mm (P-3, P-5, P-6, P-13); 150 mm (P-8, P-9, P-11, P-12, P-14).The nodal demands are q 2 = 1, q 3 = 1, q 4 = 2, q 5 = 15, q 6 = 15, q 7 = 10, q 8 = 5 (m 3 /min).Without loss of general- ity, in this example, the minimum head requirement * i H has been assumed equal to the ground elevation Z i [1].So the relationship between required nodal head and minimum head is: Todini [1] proposed a three steps approach for solving this network and its solution is reported in the 4th column of Table 1.In proposed methodology, pressuredriven model can be applied in hydraulic analysis without any mathematical formulation.In this situation, an if-then rule is added to co-content model and optimization process is conducted.The DE technique is applied to solve this problem in three cases.DE model parameters selected are as follows: number of decision variables = 7; number of population for case 1 = 10, case 2 = 20, case 3 = 20; number of iteration for case 1 = 1000, case 2 = 1000 and case 3 = 5000.The bound variables were set between 50 and 140.The best, worst and average solutions of DE algorithm in three cases are shown in Table 2.This table compares the average of mass and energy balance of the three cases with those obtained using Todini algorithm.As it can be seen in Table 2, DE found the optimal solution more accurately than Todini method in all cases.Results of the best performance of DE and convergence history are reported in Table 1 and Figure 4, respectively.
As you can see in the Figure 4, after about 400 iterations the parameter δ becomes convergent and then it doesn't change.The minimum value of δ calculated by DE algorithm is 2.07E-02, while the value obtained for this parameter, by the method introduced by Todini equals to 2.76E-02.Values of δ at each node are compared in the seventh and eighth columns of Table 1, using the two proposed methods and the method of Todini.As you can see at all the nodes, in calculating the minimum value of δ, the proposed method works better than the Todini method.

Numerical Example 2
The second considered network is a real planned network designed for an industrial area in Apulian town (Southern Italy).The network layout is shown in Figure 5 and the corresponding data are provided in Table 3.With respect to the leakages, they have been assumed as pressuredriven (see Equation ( 5)) since they are implemented in the pressure-driven network simulation model as above described [11].The parameter β = 1.0632 × 10 − 7 and α = 1.2, as reported in Giustolisi et al. [11] for this network.Giustolisi et al. [11] proposed a hydraulic simulation model, which fully integrates a classic hydraulic simulation algorithm, such as that of Todini and Pilati [20] found in EPANET 2, with a pressure-driven model that entails a more realistic representation of leakage.They applied their model in this network and results are dem-  case 4 = 20 and case 5 = 50; number of iteration for case 1 = 500, case 2 = 1000, case 3 = 10,000, case 4 = 5000 and case 4 = 2500.In proposed method, there is no need to change mathematical formulation for hydraulic analysis.An if-then rule is added to co-content model and optimization process is done easily.In this example, the bound variables were set between 0 and 36.4.Table 5 compares different cases of algorithm DE for minimization of model.The best result is related to the case in which the number of population is equal to 50 and the number of iterations equal to 2500.After performing 10 different runs, the best value of δ is obtained equal to 0.0026, while the best result is obtained equal to 0.0181 in Giustolis method.The results of two mentioned methods are compared in the fifth and sixth columns of Table 4.In this table, the best result is shown in bold, and it is considered the method DE has calculated the best value of δ at 17 nodes and Gistulishi method has calculated it at 5 nodes.The convergence process of algorithm DE has been shown in two forms in Figures 6  and 7.The absolute value of δ is calculated for each iteration in Figure 6 and the amount of objective function C(H) is calculated for each iteration in Figure 7.The algorithm becomes convergent after 2500 iterations.

Numerical Example 3
Figure 8 shows the network from Mallick et al. [21].The network consists of 2 reservoirs, 13 nodes and 21 pipes.The detailed properties are shown in Tables 6 and  7.It is supposed that the desired pressure for each node (H * ) is 30 m, and the minimum pressure (H min ) is 10 m [22].The pipe leakage coefficients are β = 5 × 10 − 7 and In this example, the network has been analyzed according to two cases.In the first case, the dependence of pressure on the demand is not included, but in the latter case, the analysis is performed by taking into account the dependence of pressure on the demand.how the accuracy of parameter δ depends on the iteration number of convergence in the first case.As it can be seen, the value of δ reaches the accuracy 1e-2 after 1000 iterations, the accuracy 1e-4 after 2500 iterations, 1e-6 after 5000 iterations and 1e-8 after 10,000 iterations.Figure 9 compares the nodal pressures in the mentioned two cases.As it can be observed, if the dependence of pressure on the demand is not included, a negative pressure is made at the nodes 6, 8, 11 and 12, but all pressures in the second case are greater than 5 meters and the minimum pressure of 10 meters has been partly supplied in most of the nodes.Figure 10 shows the process of changing the parameter δ towards the number of iterations.

Conclusions
The purpose of this paper has been to introduce a novel methodology for hydraulic analysis of water distribution systems under deficient pressure conditions considering the pressure-driven demand and leakage.The methodology is illustrated using three networks with different layouts.
The overall results indicate that the proposed method has the capability to handle various pipe networks problems without changing in model and mathematical formulation.Application of DE to co-content model can solve pressure-driven demand and leakage simulation with applying if-then rules in co-content model.The advantage of the proposed methodology is its flexibility in employing different formulation and specifying parameters related to pressure-driven demand.Another advantage of this method is that it can be easily developed for

jHFigure 1 .
Figure 1.Schematic representation of the looped pipe network with 5 pipes.

Figure 3 .
Figure 3. Schematic representation of the looped pipe network used in the numerical example 1.

Figure 5 .
Figure 5. Schematic representation of the looped pipe network used in the numerical example 4. onstrated in Table 4.The DE technique is applied to solve this problem and DE model parameters selected are as follows: number of decision variables = 23; number of population for all case 1 = 50, case 2 = 50, case 3 = 20,

Figure 8 .
Figure 8. Schematic representation of the looped pipe network used in the numerical example 3.

Table 6 . Pipe characteristics of Sample network from Mal- lick et al. [21].
Pressure-Driven Demand and Leakage Simulation for Pipe Networks Using Differential Evolution 57