In water distribution network calibration of quality models, bulk and wall decay coefficients are considered to be the adjustable parameters. The bulk decay coefficient is usually gained by using a laboratory bottle test method, but the wall decay coefficient is calibrated with field data of residual chlorine at nodes. This paper aims to present a method to adjust the wall decay coefficients of pipes. A metamodelling approach is developed by the combination of an Ant Colony Optimization (ACO) algorithm and an artificial neural network (ANN) with the EPANET simulator. The proposed method is applied on a two-loop test example and real water distribution network. Results showed that the proposed method can increase the speed of solution 58 times more rapidly than the simple method in the two-loop network. In the real network, the classification based on the average flow velocity produced the best results among all categories, and the classification based on material, diameter, and age of pipes produced the best results among the physical criteria. Also, comparison of results between the measured and calculated data for testing data showed an average error of 3.85% and the calibration model gave good performance.

INTRODUCTION

By population growth and the development of cities, urban water distribution networks (WDNs) have become highly important. Regarding the complexity of WDNs, the need for computerized modelling of WDNs is felt more than ever for understanding the hydraulic and quality behaviour of these systems. One of the most important issues in modelling is to adjust the results of modelling with the real status of the system. To achieve this aim it is necessary to calibrate the model by observed data. The adjustable parameters in the quality model calibration of WDN mainly include bulk decay (BD) and wall decay (WD) coefficients. The BD coefficient depends on the nature of the source water and can usually be estimated by using a laboratory bottle test method (Lansey & Boulos 2006). But the WD coefficient varies for different pipes and it should be calculated from quality calibration of WDNs in which the purpose is to minimize the difference between the measured and calculated chlorine residual at nodes.

Most studies have focused on hydraulic calibration of WDNs (Kang & Lansey 2011; Tabesh et al. 2011; Sabbaghpour et al. 2012; Al-Zahrani 2014; Sanz & Perez 2015), however, there has been less attention towards water quality model calibration of WDNs. Previously, the trial-and-error method (Clark et al. 1995) was used as a water quality model calibration of WDN. Zeirolf et al. (1998) were the first to apply the optimization method to estimate the first-order wall reaction parameter of chlorine transport. Al-Omari & Chaudhry (2001) used finite difference procedures for the determination of overall first-order chlorine decay coefficient(s). Meanwhile, in some studies the WD coefficient was considered to be a function of roughness coefficients and the BD coefficient was calibrated by the optimization process (Shihu 2011). But in most studies the WD coefficient has been considered to be the calibration parameter (Munavalli & Kumar 2005; Wu 2006; Jonkergouw et al. 2008; Pasha & Lansey 2009; Wang & Guo 2010). In several studies, a test example network was used to evaluate the accuracy and performance of the model but only some of them used a real WDN (Nejjari et al. 2014).

In general there are three broad methods to increase the computational efficiency of optimization methods: metamodelling, parallel computing and heuristics (Maier et al. 2014). Each method has been shown to be effective; however, this paper focuses on the use of metamodels to improve the computational efficiency of optimization of WDNs. Metamodels have proven to be useful tools for speeding up optimization in a range of water-resource applications, including model calibration (Behzadian et al. 2009; Afshar & Kazemi 2012), distribution system design (Ghajarnia et al. 2011; Bi & Dandy 2013; Broad et al. 2015) and groundwater model calibration (Bozorg Haddad et al. 2013).

The aim of this research is to perform water quality model calibration of real WDNs with consideration of different criteria such as material, diameter, age and average flow velocity of pipes. For this purpose, a new metamodelling approach is developed based on the Ant Colony Optimization (ACO) algorithm combined with an artificial neural network (ANN) in which a hydraulic and quality model simulator (EPANET) is used to adjust the WD coefficients of a WDN in an extended period simulation. The proposed metamodel is applied on a real WDN to calibrate the quality model. It is clear that in real WDN calibration models, there are a large number of adjustable parameters and computational steps in the simulation models. By considering the high runtime of water quality models compared with hydraulic models, the runtime of the calibration model is very high and in some cases, the optimization program cannot be implemented. In this paper, by the classification of adjustable parameters, the search space of the optimization problem and, by using the proposed metamodel, the runtime of the calibration model are decreased.

METHODS

In this paper the Ant System is used for water quality model calibration of a WDN (Dorigo et al. 1996). Here, to carry out a quality model calibration of a WDN, a combination of EPANET simulator and ANN with an ACO algorithm is used in programming in MATLAB software in the form of a metamodelling approach. The objective function of the model is as Equation (1): 
formula
1
where N is the number of observation locations, T is the number of times that field data has been collected, qOtj is the observed residual chlorine, qStj is the calculated residual chlorine at node j during time t, Kw is the decision variable vector that is related to the WD coefficients of the network pipes, Kwl and Kwu are the low and high limits of the WD coefficients and F(Kw) is the objective function to be minimized (Pasha & Lansey 2009).
The probability function of the ACO algorithm (Zecchin et al. 2006) is as Equation (2): 
formula
2
where is the probability of the kth ant situated at node j at stage t choosing an outgoing edge i, is the pheromone intensity present on edge i at node j and stage t, is the desirability factor present on edge i at node j and stage t, and are the parameters controlling the relative importance of pheromone intensity and desirability for each ant's decision. If then the algorithm will make decisions mainly based on the learned information, as represented by the pheromone, and if the algorithm will act as a heuristic selecting mainly the shortest or cheapest edges, disregarding the impact of these decisions on the final solution quality. The pheromone intensity function is as Equation (3) (Zecchin et al. 2006): 
formula
3
where ρ is the pheromone persistence factor representing the pheromone decay (evaporation) rate (0 < ρ < 1), is the pheromone addition on edge i at node j and stage t (the decay of the pheromone levels enables the colony to forget poor edges and increases the probability of good edges being selected), and is the pheromone intensity on edge i at node j and stage . In the proposed method, Nant is the number of ants in every internal cycle of the algorithm, Ncyc is the number of cycles in each iteration and Nuph is the number of best answers selected among Ncyc answers in every iteration which is used to update the pheromone matrix.
For hydraulic and quality simulation of the WDN, EPANET2.0 software (Rossman 2000) was used. Therefore, the hydraulic and quality equations such as mass conservation and transport and mixing in pipes are in the form of the equations used in the EPANET software. In this research the first-order bulk and wall reaction equations are used for chlorine transport. The BD coefficient is obtained through a bottle test for the water inside the network and its amount is −0.094 (m/day). In the proposed metamodelling approach the ANN metamodel has been used in place of EPANET software in a part of the optimization process. The structure of the ANN metamodel used is as shown in Equation (4): 
formula
4
where W1 is the weight matrix connected from the input layer to the hidden layer, B1 is the vector connected with neurons of the hidden layer, W2 is the bias vector connected from the hidden layer to the output layer, B2 is the bias vector connected to the neurons of the output layer; q is the vector for the input variables of the network and F is the vector for the output variables of the network.
The flowchart in Figure 1 outlines the process for the proposed metamodelling approach in ten distinct steps. Each step is subsequently described in detail.
Figure 1

Flowchart of the new metamodelling approach.

Figure 1

Flowchart of the new metamodelling approach.

In the first step, an initial quality model for WDNs is constructed. Every parameter of the WDS and ACO algorithm is defined. Also, the hourly observed residual chlorine at the nodes is defined. In the second step, the initial data for training the ANN is produced by the EPANET simulator.

In the third step, the training data is applied to the ANN. Then the weights of the ANN are adjusted and the ANN is trained. In steps 4 and 5, the Nant set of WD coefficients is generated and this set is applied to the ANN model. Then the best answer for the WD coefficients is chosen and this is repeated as many as Ncyc times.

In steps 6 and 7, the Ncyc number of best answers of the previous step is applied to the WDN model. Then the objective function is evaluated to obtain the real answers. These answers are added to the other training data, and the data which are needed to train the ANN are constructed. In steps 8–10, respectively the Nuph best answers from the Ncyc best answers are selected. Then these answers are used to update the pheromone matrix. Finally the top best answer of the iteration is selected and the model is repeated for a certain number of iterations.

RESULTS AND DISCUSSION

Case study # 1

To describe the results of the proposed method, first, a two-loop pipe network is used. This network has been used previously to test different optimal design models in the literature (e.g., Alperovits & Shamir 1977; Banos et al. 2010; Seifollahi-Aghmiuni et al. 2013). Pipe network data are shown in Table 1 and peaking factor coefficients are presented in Table 2.

Table 1

Two-loop pipe network data

 Pipe characteristics
Node characteristicsNo.L (m)D (mm)RoughnessWD (m/day)
No. E(m) BD(l/s) 1,000 450 130 −0.1 
210 1,000 350 80 −0.6 
150 27.8 1,000 350 130 −0.1 
160 27.8 1,000 150 70 −0.7 
155 33.4 1,000 350 100 −0.4 
150 75 1,000 100 80 −0.6 
165 91.7 1,000 350 100 −0.4 
160 55.6 1,000 250 70 −0.7 
 Pipe characteristics
Node characteristicsNo.L (m)D (mm)RoughnessWD (m/day)
No. E(m) BD(l/s) 1,000 450 130 −0.1 
210 1,000 350 80 −0.6 
150 27.8 1,000 350 130 −0.1 
160 27.8 1,000 150 70 −0.7 
155 33.4 1,000 350 100 −0.4 
150 75 1,000 100 80 −0.6 
165 91.7 1,000 350 100 −0.4 
160 55.6 1,000 250 70 −0.7 

E: Elevation.

Table 2

Peaking factor coefficient of the two-loop network

Time (hour) 10 11 12 
Coefficient (%) 0.96 0.92 0.88 0.84 0.8 0.86 0.90 1.06 1.00 1.01 1.02 1.03 
Time (hour) 13 14 15 16 17 18 19 20 21 22 23 24 
Coefficient (%) 1.04 1.05 1.06 1.07 1.08 1.09 1.08 1.07 1.06 1.05 1.00 0.98 
Time (hour) 10 11 12 
Coefficient (%) 0.96 0.92 0.88 0.84 0.8 0.86 0.90 1.06 1.00 1.01 1.02 1.03 
Time (hour) 13 14 15 16 17 18 19 20 21 22 23 24 
Coefficient (%) 1.04 1.05 1.06 1.07 1.08 1.09 1.08 1.07 1.06 1.05 1.00 0.98 

The adjusted parameters of the calibration model and the proposed algorithm include T0, , , , NM, Nant, Ncyc and Nuph. These parameters were adjusted by sensitivity analysis on the two-loop network. So that it assumes the pressure in the network is known, model parameters are adjusted in a way that the calibration model calculates the final solution in the least possible time and with high precision. The results of the sensitivity analysis are given in Table 3.

Table 3

Adjusted values of calibration model parameters

ParameterU0ßT0αρΔTij(t)NcycNantNuph
Adjusted value 80 0.98 20 300 10 
ParameterU0ßT0αρΔTij(t)NcycNantNuph
Adjusted value 80 0.98 20 300 10 

Regarding the slow distribution of the residual chlorine from the reservoir to the final nodes of the network, the least time needed for quality analysis of network modelling was considered to be 72 hours. The hourly residual chlorine at nodes in last 24 hours (48 to 72) was taken into consideration as the observed values in the evaluation of the proposed metamodel. Chlorine was injected only in the reservoir and its initial concentration was equal to 0.8 mg/l.

After preparation of the data, the water quality model calibration of WDS was carried out with sampling at nodes 3–7. First calibration was done by using the simple model that used the ACO algorithm coupled with EPANET2 in MATLAB code. In the simple model, the number of ants (Nant) and the number of cycles (Ncyc) were 25 and 10, respectively.

In this research, an Intel (R) Core (TM) i3-2100CPU @ 3.10 GHz was used. Also, the interval change of the WD coefficients in the uncategorized and categorized modes of coefficients was considered to be 0.1 and 0.05, respectively. The results of the simple model are shown in Table 4, which includes the number of objective function evaluations and time to achieve the real answer.

Table 4

Number of objective function evaluations and the time to achieve the real answer in the simple model

No.12345678910Ave
Uncategorized mode of WD coefficients 
 EN*10 2,375 2,975 2,825 2,900 1,725 2,850 2,675 1,800 2,125 2,625 2487.5 
 T (min) 119.4 148.3 142.6 144.7 85.2 143.4 132.9 90.1 105.8 131.5 124.4 
Categorized mode of WD coefficients 
 EN*10 1,375 150 1,300 525 475 1,425 875 450 1,125 120 890 
 T (min) 68.7 7.5 65.0 26.2 23.7 71.2 43.7 22.3 56.0 60.0 44.4 
No.12345678910Ave
Uncategorized mode of WD coefficients 
 EN*10 2,375 2,975 2,825 2,900 1,725 2,850 2,675 1,800 2,125 2,625 2487.5 
 T (min) 119.4 148.3 142.6 144.7 85.2 143.4 132.9 90.1 105.8 131.5 124.4 
Categorized mode of WD coefficients 
 EN*10 1,375 150 1,300 525 475 1,425 875 450 1,125 120 890 
 T (min) 68.7 7.5 65.0 26.2 23.7 71.2 43.7 22.3 56.0 60.0 44.4 

Ave: Average; EN: Evaluation number; T: Time (min).

The results show that in the uncategorized mode of WD coefficients, the average time to achieve the real answer for ten consecutive runs is 124.4 min and during this time the objective function is evaluated 24,875 times on average. In the categorized mode of WD coefficients, as can be seen in Table 1, the WD coefficients are −0.1 (in pipes 1 and 3), −0.6 (in pipes 2 and 6), −0.7 (in pipes 4 and 8) and −0.4 (in pipes 5 and 7). Thus, these pipes can be categorized in a similar category. In this mode, the average time to achieve the real answer for ten consecutive runs is 44.4 min and during this time the objective function is evaluated 8,900 times on average. Also the results show that by classifying the WD coefficients, the number of objective function evaluations and the time to achieve real answers will decrease a lot. But in both, the time to achieve the real answer is very high; especially it can be considered that the two-loop network is a very small network. Therefore, in a real network in which the search space is too large, it is necessary to do more evaluations to achieve the final answer and this lowers the speed of achieving the final answer tremendously. To remove this problem, a proposed metamodelling approach, shown in Figure 1, was used. Results of the proposed metamodel are shown in Table 5. In the uncategorized mode of coefficients, the average time to achieve the real answer for ten consecutive runs is 118 sec and during this time the objective function is evaluated 108,600 times on average. Also in the categorized mode of coefficients, the average time to achieve the real answer for ten consecutive runs is 54.2 sec and during this time the objective function is evaluated 33,600 times on average.

Table 5

The number of objective function evaluations and the time to achieve the real answer in the proposed metamodel

No.12345678910Ave
Uncategorized mode of WD coefficients 
 EN*1000 114 72 120 66 108 114 78 90 162 162 108.6 
 T (s) 126.4 80.2 127.6 74.5 115.9 123.4 86.7 99.4 172.7 173.4 118 
Categorized mode of WD coefficients 
 EN*1000 30 12 18 60 24 12 48 72 36 24 33.6 
 T (s) 46.8 22.3 29.0 103.3 40.6 23.7 75.0 104.8 55.3 41.2 54.2 
No.12345678910Ave
Uncategorized mode of WD coefficients 
 EN*1000 114 72 120 66 108 114 78 90 162 162 108.6 
 T (s) 126.4 80.2 127.6 74.5 115.9 123.4 86.7 99.4 172.7 173.4 118 
Categorized mode of WD coefficients 
 EN*1000 30 12 18 60 24 12 48 72 36 24 33.6 
 T (s) 46.8 22.3 29.0 103.3 40.6 23.7 75.0 104.8 55.3 41.2 54.2 

Comparison of the results of the simple model and the proposed metamodel shows that the utilization of the metamodel increases the speed of achieving the final answer a lot. For example, in the uncategorized mode of coefficients, the simple and proposed models will achieve the real answer in 124.4 min and 118 sec, respectively. In other words, in the proposed model the time to achieve the real answer occurs 63 times more rapidly. Also, a comparison of the number of objective function evaluations in the two mentioned models shows that in the uncategorized mode of coefficients, the simple model carried out 24,875 evaluations and the proposed model achieved the real answer in 108,600 evaluations, and in this way the objective functions are evaluated with 4.3 times more evaluations. On the whole, in real WDNs in which the search space is so large, the proposed model will carry out more evaluations during less time and will achieve the final answer very quickly. The convergence curve of the proposed model is shown in Figure 2. As is clear, the proposed model has achieved the final answer in 27 steps. Each step in this figure is equal to 6,000 evaluations of the objective function, so the proposed model achieves the real answer with 162,000 evaluations of the objective function.
Figure 2

The convergence curve of the proposed model.

Figure 2

The convergence curve of the proposed model.

Case study # 2

The second case study in this research is the Ahar WDN. Ahar City is located in Eastern Azerbaijan, 90 km north-east of Tabriz, Iran. By omitting minor and dispensable pipes of the network, the structure of the network can be simplified as is shown in Figure 3. The simplified network includes 192 pipes, 169 nodes, one reservoir and five tanks, and three pumping stations. R1 denotes the reservoir in the water treatment plant with a capacity of 5,000 m3 as the only source of water. T1 to T5 denote water tanks. Q1 to Q3 denote pipe-flow measurement locations that are measured by ultrasonic flow sensors (FLUXUS F401). S1 to S27 denote pressure head and residual chlorine measurement locations that are measured by the Radcom LoLog450 pressure sensor and the M142 chlorimeter. The precision of all pressure, flow and chlorimeter sensors is 0.01 m, 0.01 m/s and 0.01 mg/l, respectively. Due to the limited amount of measurement equipment, the measurement process was implemented from 25 December 2011 to 8 February 2012.
Figure 3

Schematic of the Ahar WDN.

Figure 3

Schematic of the Ahar WDN.

In this case study, if the WD coefficients of the pipes were not categorized, the number of decision variables would be 192. To make the problem easier, the WD coefficients of the pipes are classified into limited categories based on the data collected from the network including material, diameter, and age of pipes. In Table 6, the type of classification of WD coefficients is shown in the form of seven categories.

Table 6

Classification style of WD coefficients based on the materials, diameter, and pipe age

No(C1)(C2)(C3)(C4)(C5)
(C6)
(C7)
MDAM,DM,AD,AM,D,A
DI 20 0–10 D,M1 A,M1 A2,D1 A3,D4 A2,D6 A,D,M1 A2,D4,M4 A5,D5,M4 
GA 75–90 10_20 D1,M2 A2,M2 A1,D2 A4,D4 A4,D6 A2,D1,M2 A3,D4,M4 A2,D6,M4 
PE 100 20–30 D2,M3 A1,M3 A2,D3 A5,D4 A5,D6 A1,D2,M3 A4,D4,M4 A4,D6,M4 
AC 150 30–40 D3,M4 A2,M4 A3,D3 A2,D5 – A2,D3,M4 A5,D4,M4 A5,D6,M4 
 200 50–60 D4,M4 A3,M4 A4,D3 A3,D5 – A3,D3,M4 A2,D5,M4 – 
 300  D5,M4 A4,M4 A5,D3 A4,D5 – A4,D3,M4 A3,D5,M4 – 
   D6,M4 A5,M4 A2,D4 A5,D5 – A5,D3,M4 A4,D5,M4 – 
No(C1)(C2)(C3)(C4)(C5)
(C6)
(C7)
MDAM,DM,AD,AM,D,A
DI 20 0–10 D,M1 A,M1 A2,D1 A3,D4 A2,D6 A,D,M1 A2,D4,M4 A5,D5,M4 
GA 75–90 10_20 D1,M2 A2,M2 A1,D2 A4,D4 A4,D6 A2,D1,M2 A3,D4,M4 A2,D6,M4 
PE 100 20–30 D2,M3 A1,M3 A2,D3 A5,D4 A5,D6 A1,D2,M3 A4,D4,M4 A4,D6,M4 
AC 150 30–40 D3,M4 A2,M4 A3,D3 A2,D5 – A2,D3,M4 A5,D4,M4 A5,D6,M4 
 200 50–60 D4,M4 A3,M4 A4,D3 A3,D5 – A3,D3,M4 A2,D5,M4 – 
 300  D5,M4 A4,M4 A5,D3 A4,D5 – A4,D3,M4 A3,D5,M4 – 
   D6,M4 A5,M4 A2,D4 A5,D5 – A5,D3,M4 A4,D5,M4 – 

C: Category; M: Material; D: Diameter (mm); A: Age (year); DI: Ductile iron; PE: Polyethylene; GA: Galvanized steel; AC: Asbestos cement.

In this part, hydraulic calibration of the WDN is carried out before water quality model calibration of the WDN (Dini & Tabesh 2015). One of the best hydraulic calibrations was achieved in category 3 where the classification criterion was the age of the pipes. The peaking factor and roughness coefficients of category C3 are presented in Table 7. After hydraulic calibration of the WDN, the average flow velocity in the pipes was calculated and another classification was carried out for WD coefficients based on the average flow velocity in the pipes, which is presented in Table 8. In the Ahar WDN, the chlorine is injected into the water in the reservoir R1. The measurements carried out on this site showed that the average concentration of residual chlorine was 1 mg/l.

Table 7

Peaking factor and roughness coefficients of category C3 after hydraulic calibration

T (hr)DPT (hr)DPT (hr)DPCategory C3
0.64 1.40 17 1.24   
0.42 10 1.50 18 1.25   
0.19 11 1.54 19 1.22   
0.15 12 1.54 20 1.13 A1 57 
0.15 13 1.49 21 1.08 A2 109 
0.35 14 1.41 22 1.00 A3 85 
0.83 15 1.34 23 0.87 A4 87 
1.22 16 1.30 24 0.74 A5 82 
T (hr)DPT (hr)DPT (hr)DPCategory C3
0.64 1.40 17 1.24   
0.42 10 1.50 18 1.25   
0.19 11 1.54 19 1.22   
0.15 12 1.54 20 1.13 A1 57 
0.15 13 1.49 21 1.08 A2 109 
0.35 14 1.41 22 1.00 A3 85 
0.83 15 1.34 23 0.87 A4 87 
1.22 16 1.30 24 0.74 A5 82 
Table 8

WD coefficients based on the average flow velocity in the pipes

Subcategory 
Velocity (m/s) V < 0.1 0.2–0.3 0.2–0.3 0.3–0.4 0.4–0.5 0.5–0.6 
Subcategory 10 11 12 
Velocity (m/s) 0.6–0.7 0.7–0.8 0.8–0.9 0.9–1.0 1.0–1.5 1.5 < V 
Subcategory 
Velocity (m/s) V < 0.1 0.2–0.3 0.2–0.3 0.3–0.4 0.4–0.5 0.5–0.6 
Subcategory 10 11 12 
Velocity (m/s) 0.6–0.7 0.7–0.8 0.8–0.9 0.9–1.0 1.0–1.5 1.5 < V 

In this case study, a total of 19 data sets were available, from which 15 data sets (79%) were used for training and four data sets (21%) were used for testing. The water quality model calibration was carried out for eight categories (Tables 6 and 8) separately based on the training data in 400 iterations. The best answer selection criterion was derived based on the best testing data.

In water quality model calibration of WDNs, BD and WD coefficients are considered to be the adjustable parameters. The BD coefficient was determined by using a laboratory bottle test method, and in this case study the value obtained was −0.22. The WD coefficient was calculated by minimizing the objective function of the proposed calibration metamodel. The higher and lower bond limits of the WD coefficient were equal to 0 and −1, respectively and the interval change of the WD coefficients was supposed to be 0.01 (Pasha & Lansey 2009). In Table 9 the best answers of five runs of the calibration model for the WD coefficients and the training and testing data error for each category are presented.

Table 9

WD coefficient and its training and testing data error for eight categories

CategoryC1C2C3C4C5C6C7C8
Best answer −0.31 −0.31 −0.13 −0.27 −0.31 −0.27 −0.43 −0.15 
−0.31 −0.12 −0.26 −0.31 −0.31 −0.12 −0.28 −0.17 
−0.23 −0.20 −0.13 −0.11 −0.31 −0.01 −0.14 −0.01 
−0.19 −0.11 −0.27 −0.20 −0.17 −0.25 −0.01 −0.01 
 −0.06 −0.23 −0.11 −0.13 −0.21 −0.27 −0.07 
 −0.29  −0.02 −0.30 −0.21 −0.16 −0.61 
   −0.30 −0.19 −0.05 −0.19 −0.61 
     −0.10 −0.08 −0.49 
     −0.07 −0.09 −0.34 
     −0.02 −0.07 −0.01 
     −0.01 −0.05 −0.27 
     −0.05 −0.03 −0.01 
     −0.16 −0.25  
     −0.02 −0.32  
     −0.37 −0.25  
     −0.34 −0.32  
     −0.26 −0.49  
      −0.04  
Ec 0.747 0.457 0.724 0.439 0.730 0.483 0.473 0.371 
Et 0.250 0.186 0.236 0.201 0.210 0.176 0.080 0.086 
(Ec + Et) 0.998 0.643 0.960 0.640 0.940 0.660 0.553 0.457 
CategoryC1C2C3C4C5C6C7C8
Best answer −0.31 −0.31 −0.13 −0.27 −0.31 −0.27 −0.43 −0.15 
−0.31 −0.12 −0.26 −0.31 −0.31 −0.12 −0.28 −0.17 
−0.23 −0.20 −0.13 −0.11 −0.31 −0.01 −0.14 −0.01 
−0.19 −0.11 −0.27 −0.20 −0.17 −0.25 −0.01 −0.01 
 −0.06 −0.23 −0.11 −0.13 −0.21 −0.27 −0.07 
 −0.29  −0.02 −0.30 −0.21 −0.16 −0.61 
   −0.30 −0.19 −0.05 −0.19 −0.61 
     −0.10 −0.08 −0.49 
     −0.07 −0.09 −0.34 
     −0.02 −0.07 −0.01 
     −0.01 −0.05 −0.27 
     −0.05 −0.03 −0.01 
     −0.16 −0.25  
     −0.02 −0.32  
     −0.37 −0.25  
     −0.34 −0.32  
     −0.26 −0.49  
      −0.04  
Ec 0.747 0.457 0.724 0.439 0.730 0.483 0.473 0.371 
Et 0.250 0.186 0.236 0.201 0.210 0.176 0.080 0.086 
(Ec + Et) 0.998 0.643 0.960 0.640 0.940 0.660 0.553 0.457 

Ec: Calibration data error; Et: Test data error.

Comparison of the results of eight categories based on the least testing data errors show that the highest amount of training and testing data error is related to category C1. The lowest amount of training data error is related to category C8 and the lowest amount of testing data error is related to category C7, and these are also considered to be the best water quality model calibration criteria.

In categories C1, C2 and C3, only one criterion such as material, diameter, and age of the pipe was considered in the classification of pipes. Category C2, which was classified with pipe diameter, achieved relatively good results. By increasing the classification criteria into two parameters, which happened in categories C4 (pipe material and diameter), C5 (material and age of the pipe) and C6 (diameter and age of the pipe), the results in categories C4 and C6 were better. Finally by considering the three criteria of material, diameter, and age of pipes concurrently and classifying the coefficients with them, the results were improved compared with the previous categories. On the whole, it can be inferred that category C7 with classification criteria of material, diameter and age of pipes is the best classification in consideration of physical characteristics.

In category C8, the classification criterion is the average flow velocity in the pipes for 24 hours in extended period conditions. Comparison of the results of this category with others shows that the total amount of training and testing data errors in this type of classification is the lowest (=0.457). Thus, the classification based on hydraulic criteria such as average flow velocity can be proposed as an appropriate alternative for classifying the WD coefficients of pipes.

Comparison of the number of subcategories of categories C1–C7 may create the image that increasing the number of classes is an important factor in improving the results. This is almost true in the first seven categories. In other words, by increasing the number of subcategories, the results have been improved, as can be seen in Table 9. Classification based on the average flow velocity in pipes shows that the classification criterion is a more important factor than the number of subcategories. Thus, better results can be obtained by selecting the appropriate criteria for classifying the coefficients with fewer subcategories. This is true regarding category C8 compared with categories C6 and C7.

To show the performance of water quality model calibration of the WDN, the results of the calibration model with category C7 for the testing data are shown in Table 10. Also, in Figures 4 and 5 the measured data are compared with the calculated data for nodes 2 and 27, respectively.
Table 10

Comparison of the measured and calculated data after quality calibration

 S2
S16
S20
S27
Time (hr)Me-ChCa-ChMe-ChCa-ChMe-ChCa-ChMe-ChCa-Ch
0.42 0.46 0.6 0.58 0.63 0.67 0.6 0.63 
0.43 0.47 0.58 0.57 0.64 0.67 0.61 0.62 
0.43 0.45 0.58 0.55 0.65 0.65 0.6 0.59 
0.44 0.44 0.58 0.55 0.65 0.62 0.57 0.60 
0.46 0.44 0.59 0.55 0.63 0.61 0.57 0.61 
0.44 0.46 0.58 0.52 0.62 0.61 0.57 0.58 
0.41 0.47 0.55 0.51 0.63 0.64 0.59 0.59 
0.41 0.45 0.6 0.57 0.61 0.68 0.6 0.65 
0.41 0.42 0.58 0.57 0.63 0.63 0.6 0.62 
10 0.43 0.42 0.61 0.59 0.64 0.62 0.61 0.61 
11 0.4 0.42 0.6 0.59 0.63 0.61 0.62 0.61 
12 0.43 0.41 0.61 0.59 0.63 0.61 0.61 0.61 
13 0.4 0.41 0.62 0.59 0.63 0.62 0.62 0.61 
14 0.43 0.41 0.62 0.59 0.62 0.62 0.61 0.61 
15 0.42 0.42 0.61 0.59 0.65 0.62 0.6 0.61 
16 0.4 0.42 0.6 0.58 0.63 0.62 0.61 0.61 
17 0.42 0.42 0.59 0.58 0.64 0.63 0.62 0.61 
18 0.43 0.42 0.6 0.58 0.65 0.63 0.62 0.61 
19 0.42 0.45 0.6 0.62 0.65 0.67 0.58 0.66 
20 0.43 0.45 0.61 0.62 0.62 0.68 0.63 0.66 
21 0.43 0.45 0.62 0.62 0.63 0.68 0.63 0.66 
22 0.42 0.45 0.61 0.61 0.66 0.68 0.63 0.65 
23 0.43 0.45 0.61 0.60 0.67 0.68 0.62 0.65 
24 0.42 0.46 0.6 0.60 0.63 0.68 0.62 0.64 
Min Err 0.003 0.001 0.001 0.002 
Ave Err 0.023 0.022 0.022 0.019 
Max Err 0.061 0.063 0.063 0.079 
 S2
S16
S20
S27
Time (hr)Me-ChCa-ChMe-ChCa-ChMe-ChCa-ChMe-ChCa-Ch
0.42 0.46 0.6 0.58 0.63 0.67 0.6 0.63 
0.43 0.47 0.58 0.57 0.64 0.67 0.61 0.62 
0.43 0.45 0.58 0.55 0.65 0.65 0.6 0.59 
0.44 0.44 0.58 0.55 0.65 0.62 0.57 0.60 
0.46 0.44 0.59 0.55 0.63 0.61 0.57 0.61 
0.44 0.46 0.58 0.52 0.62 0.61 0.57 0.58 
0.41 0.47 0.55 0.51 0.63 0.64 0.59 0.59 
0.41 0.45 0.6 0.57 0.61 0.68 0.6 0.65 
0.41 0.42 0.58 0.57 0.63 0.63 0.6 0.62 
10 0.43 0.42 0.61 0.59 0.64 0.62 0.61 0.61 
11 0.4 0.42 0.6 0.59 0.63 0.61 0.62 0.61 
12 0.43 0.41 0.61 0.59 0.63 0.61 0.61 0.61 
13 0.4 0.41 0.62 0.59 0.63 0.62 0.62 0.61 
14 0.43 0.41 0.62 0.59 0.62 0.62 0.61 0.61 
15 0.42 0.42 0.61 0.59 0.65 0.62 0.6 0.61 
16 0.4 0.42 0.6 0.58 0.63 0.62 0.61 0.61 
17 0.42 0.42 0.59 0.58 0.64 0.63 0.62 0.61 
18 0.43 0.42 0.6 0.58 0.65 0.63 0.62 0.61 
19 0.42 0.45 0.6 0.62 0.65 0.67 0.58 0.66 
20 0.43 0.45 0.61 0.62 0.62 0.68 0.63 0.66 
21 0.43 0.45 0.62 0.62 0.63 0.68 0.63 0.66 
22 0.42 0.45 0.61 0.61 0.66 0.68 0.63 0.65 
23 0.43 0.45 0.61 0.60 0.67 0.68 0.62 0.65 
24 0.42 0.46 0.6 0.60 0.63 0.68 0.62 0.64 
Min Err 0.003 0.001 0.001 0.002 
Ave Err 0.023 0.022 0.022 0.019 
Max Err 0.061 0.063 0.063 0.079 

Me-Ch: Measured chlorine; Ca-Ch: Calculated chlorine; Min: Minimum; Ave: Average; Max: Maximum; Err: Absolute error between the measured and calculated data.

Figure 4

Comparison of the measured and calculated residual chlorine in node S2.

Figure 4

Comparison of the measured and calculated residual chlorine in node S2.

Figure 5

Comparison of the measured and calculated residual chlorine in node S27.

Figure 5

Comparison of the measured and calculated residual chlorine in node S27.

Comparison of the results in Table 10 shows that the average absolute error between the measured and calculated data in nodes S2, S16, S20 and S27 is equal to 0.023, 0.022, 0.022 and 0.019 mg/l, respectively. The average absolute error for all testing data is also equal to 0.022 mg/l. In other words, this error is equal to 3.85%, which indicates there is an acceptable adjustment between the two types of data and that the calibration model has given good performance.

CONCLUSION

Generally the adjusted parameters of water quality model calibration of a WDN include BD and WD coefficients. The present research focused on the WD coefficient calibration. For this purpose, a new metamodelling approach was developed by the combination of ACO algorithms and an ANN with the EPANET simulator. To measure the correctness of the calibration model, this proposed metamodel was tested on a two-loop test example and was compared with the simple model. The results showed that the simple model carried out a low number of objective function evaluations in a long time. Thus it was not useful for the real WDNs, where there was a need to do more evaluations, while the proposed metamodel was able to carry out a lot of evaluations within a short time. For example, the simple model carried out 24,875 evaluations in 124.4 min to achieve the real answer in the uncategorized mode of coefficients, while the proposed metamodel carried out 108,600 evaluations during only 118 sec under the same conditions.

The purpose of the water quality model calibration of the WDN in Ahar City was to consider some different criteria such as material, diameter, age of pipes and the average flow velocity in pipes, in a way that the best classification criteria of pipes were chosen. For this purpose, seven categories based on physical characteristics such as material, diameter, and age of the pipes and another category based on the hydraulic characteristics including the average flow velocity in the pipes were designed and the quality calibration was carried out separately for each one by using the proposed metamodel. The results showed that between the physical characteristics of the classifications, category C7 with criteria of material, diameter, and age of pipes had the most desirable results while category C8 based on the average flow velocity in the pipes had the best results among all the classifications. The outputs also showed that the selection of suitable criteria was highly important in classification, in that the number of subcategories of C8 was less than the number of subcategories of C7, but C8 produced better results than C7. In other words, classification based on hydraulic criteria gave better performance than classification based on physical criteria. Furthermore it was observed that the average error between the measured and calculated data for the testing data was equal to 3.85%. Therefore the proposed metamodel used in this research had a good ability for water quality model calibration of a real WDN.

REFERENCES

REFERENCES
Al-Omari
A. S.
Chaudhry
M. H.
2001
Unsteady-state inverse chlorine modelling in pipe networks
.
Journal of Hydraulic Engineering
127
(
8
),
669
677
.
Alperovits
E.
Shamir
U.
1977
Design of optimal water distribution systems
.
Water Resources Research
13
(
6
),
885
900
.
Al-Zahrani
M. A.
2014
Modeling and simulation of water distribution system: a case study
.
Arabian Journal for Science and Engineering
39
,
1621
1636
.
Baños
R.
Gil
C.
Reca
J.
Montoya
F. G.
2010
A memetic algorithm applied to the design of water distribution networks
.
Journal of Applied Soft Computing
10
(
1
),
261
266
.
Behzadian
K.
Kapelan
Z.
Savic
D.
Ardeshir
A.
2009
Stochastic sampling design using a multi-objective genetic algorithm and adaptive neural networks
.
Environmental Modelling & Software
24
(
4
),
530
541
.
Bi
W.
Dandy
G. C.
2013
Optimization of water distribution systems using online retrained metamodels
.
Water Resources Planning and Management
139
(
2
),
175
183
.
Bozorg Haddad
O.
Rezapour Tabari
M.
Fallah-Mehdipour
E.
Mariño
M. A.
2013
Groundwater model calibration by meta-heuristic algorithms
.
Water Resources Management
27
(
7
),
2515
2529
.
Clark
R. M.
Rossman
L. A.
Wymer
L. J.
1995
Modeling distribution system water quality: regulatory implications
.
Water Resources Planning and Management
121
(
6
),
423
428
.
Dorigo
M.
Maniezzo
V.
Colorni
A.
1996
The ant system: optimisation by a colony of cooperating agents
.
IEEE Transactions on Systems, Part B
26
(
1
),
29
41
.
Ghajarnia
N.
Bozorg-Haddad
O.
Mariño
M. A.
2011
Performance of a novel hybrid algorithm in the design of water networks
.
Proceedings of the Institution of Civil Engineers: Water Management
164
(
4
),
173
191
.
Jonkergouw
P. M. R.
Khu
S. T.
Kapelan
Z. S.
Savic
D. A.
2008
Water quality model calibration under unkown demands
.
Water Resources Planning and Management
134
(
4
),
326
336
.
Kang
D.
Lansey
K.
2011
Demand and roughness estimation in water distribution dystems
.
Water Resources Planning and Management
137
(
1
),
20
30
.
Lansey
K.
Boulos
P.
2006
Comprehensive Handbook on Water Quality Analysis for Distribution Systems
. 2nd edn.
MWH Soft Press
,
Broomfield, CO, USA
.
Nejjari
F.
Puig
V.
Perez
R.
Quevedo
J.
Cuguero
M. A.
Sanz
G.
Mirats
J. M.
2014
Chlorine decay model calibration and comparison: application to a real water network
.
Procedia Engineering
70
,
1221
1230
.
Pasha
M. F. K.
Lansey
K. E.
2009
Water quality parameter estimation for water distribution systems
.
Civil Engineering and Environmental Systems
26
(
3
),
231
248
.
Rossman
L. A.
2000
EPANET2: Userȧs Manual
.
US Environmental Protection Agency, Risk Reduction Engineering Laboratory, Cincinnati, OH, USA
.
Sabbaghpour
S.
Naghashzadehgan
M.
Javaherdeh
K.
Bozorg Haddad
O.
2012
HBMO algorithm for calibrating water distribution network of Langarud city
.
Water Science & Technology
65
(
9
),
1564
1569
.
Seifollahi-Aghmiuni
S.
Bozorg Haddad
O.
Mariño
M. A.
2013
Water distribution network risk analysis under simultaneous consumption and roughness uncertainties
.
Water Resources Management
27
,
2595
2610
.
Wang
H. X.
Guo
W.
2010
Calibrating chlorine wall decay coefficients of water distribution systems based on hybrid PSO
. In:
Proceedings of the Sixth International Conference on Natural Computation (ICNC 2010)
,
Volume 7, S. Yue, H.-L. Wei, L. Wang & Y. Song (eds). IEEE, New York, USA
, pp.
3856
3860
.
Wu
Z. Y.
2006
Optimal calibration method for water distribution water quality model
.
Environmental Science and Health Part A
41
,
1363
1378
.
Zecchin
A. C.
Simpson
A. R.
Maier
H. R.
Leonard
M.
Roberts
A. J.
Berrisford
M. J.
2006
Application of two ant colony optimization algorithms to water distribution system optimization
.
Mathematical and Computer Modeling
44
,
451
468
.
Zeirolf
M. L.
Polycarpou
M. M.
Uber
J. G.
1998
Development and auto calibration of an input–output model of chlorine transport in drinking water distribution systems
.
IEEE Transactions on Control Systems Technology
6
(
4
),
543
553
.