Water utilities properly treat water for common usage and in some cases for drinking. The practices of most water utilities in developing countries are to disinfect water with chlorine, due to the low cost and easy production 
. Chlorination is the method at which water is disinfected from viruses and bacteria. This process occurs in the Drinking Water Treatment Plant (DWTP) and guarantees safe water until the last consumer node. The problem derived from chlorine decay over time due to WDN conditions which many of them does not count with Chlorine Booster Stations (CBS) a way of redistributing doses of disinfectant. Water utilities to supply the minimum Free Residual Chlorine (FRC) at the end of the WDN, add elevated doses of disinfectant at the exit of the DWTP 
. Reducing chlorine demand from water utilities derives less chlorine manufacture and energy consumption, and a better perception from consumers in tap water safety improves the quotes collection for water utilities; furthermore, there will be a reduction in bottled water and thus a lower environmental impact 
. This is important because chlorine gas is commonly manufactured by electrolysis which in some of its variances uses at least 3560 kWh/Ton Cl2 
. Regulations in the United States of America (USA) established the maximum residual disinfectant level as 4.0 mg/L, above this level exist the potential risk of eyes/nose irritation and possible stomach discomfort, also a minimum of 0.2 mg/L which guarantee disinfection of pathogenic bacteria 
; while there exists different regulations for each country, the World Health Organization (WHO) recommends a maximum FRC concentration of 0.5 mg/L and minimum of 0.2 mg/L in the WDN to guarantee the disinfection of water on consumer nodes.
Low disinfectant concentration at DWTP can result in a poor distribution of chlorine and/or fast chlorine decay 
. This concentration scenario has been responsible for a significant number of waterborne disease outbreaks, associated with microorganisms such as E. coli, norovirus, giardia, cryptosporidium
amongst others 
. Chlorine decay can occur due to the loss of physical integrity caused by diverse factors, such as (a) water main breaks/repair sites, (b) uncovered reservoirs or covered storage tanks with structural deficiencies, (c) cross connections when inappropriately installed, (d) inadequately maintained backflow prevention devices and the loss of hydraulic integrity as incapability to maintain desirable water flow, water pressure, and high residence of water in pipes (i.e., water age) 
The loss of physical integrity in pipelines allows the entrance of microorganisms and other elements that increase chlorine decay 
. As a result, layers of microorganisms attached to the pipeline walls acting as microbial pathogens reservoirs known as biofilms, representing a health risk 
. Even after treatment, the disinfectant in water can interact within algal organic matter in reservoirs and produce by-products 
. Organic matter from biofilms interact with disinfectant and produce carcinogenic by-products, a chemical group known as Trihalomethanes (TTHM’s) 
. The identification of these by-products was studied 30 years ago as potentially harmful chlorinated organic material, the most common by-products being chloroform and haloforms. However, the risk of drinking these unintentional by-products is hard to compare against non-disinfected water 
, as in recent years the studies on disinfectant by-products have focused on the most toxic. After the large amount of disinfection by-products discovered, it is necessary to prioritize a new common data format and data to archive, extract and classify known by-products from those that have not been studied 
. The consumption of drinking water with high concentrations of TTHM’s is associated with bladder cancer, of which at least 47% predominate in those who drank tap water with doses higher than 50 µg/L of TTHM’s, compared with those with 5 µg/L or less 
2. Current Studies
The evaluations for robustness validation in Case Study 1 were made using PSO and GA with the number of CBS that water utilities can build, considered to be two. Evaluation performances are shown in statistical analysis within 100 simulations. CBS represents the number of boosters stations proposed by the algorithm. CBS simulation reached represents the number of times which that number of CBS was proposed during the 100 simulations. Finally, CBS ID represents the name associated with the node where CBS is proposed.
2.1. Statistical Results from GA Location for Case Study 1
For robustness validation of the optimization process, 100 GA simulations were performed. The results showed that 49% of 100 simulations made by GA guaranteed the minimal FRC in all nodes. The best locations for CBS are presented in Table 1. It is considered that the most important CBS is located at node 1 with 100% of the simulations proposing a CBS in that node. The second node, proposed by GA to establish a CBS, was the water supply tank in node 26, with 72% of frequency. Other nodes appeared and a result from the usage of 3 or more CBS associated with nodes 14 and 29 and the remaining nodes were dismissed because of their low frequency.
Table 1. Number of CBS distribution and frequency proposed by GA technique, (Statistical GA Location at Case 1).
||CBS Simulation Reached
||Node 1, Tank
||Node 1, Node 14, Tank
||Node 1, Node 14, Node 29, Tank
||Node 1, Node 29, Node E, Node 32
2.2. Statistical Results from PSO location for the Case Study 1
From PSO simulation was obtained 100 simulations to obtain the best locations for CBS (Table 2). Results have shown higher frequency at the pump station, corresponding to node 1 and the tank, and the others were dismissed due to their low frequency (Figure 1).
Figure 1. CBS location mostly proposed in Case Study 1.
Table 2. Number of CBS distribution and frequency proposed by PSO, (statistical PSO location at Case 1).
||Node 1, Tank
||Node 1, Node 14, Tank
||Node 1, Node 14, Node 29, Tank
||Node 1, Node 14, Node 29, (Node E or Node 8)
Then, the best and worst individuals are reported by the frequency of CBS ID. It is considered the best individual from the 100 simulations with no penalty in the FF and FRC higher than 0.2 mg/L for all consumer nodes. Thus, the best individual has the FF nearer to the value of one. The individuals with the lower penalty reported CBS location in node 1 (proposed by 100% of simulations) and Water Distribution Tank (proposed by 67% of the simulations). As the main objective was to find the best location for guaranteeing the minimal FRC above all the consumer nodes concentrations, zero or one were selected for representing whether there is chlorine injection in the node or not during the string coding in GA. The optimization algorithm in default settings that worked better on these 100 simulations was PSO.
2.3. Scheduling in CBS Results from GA and PSO
The best location was obtained previously for CBS in Net Example 2. This step aims to determine the schedule pattern dosing to reduce the amount of chlorine per day, thus reducing the economic and environmental impact from water utilities applying the FF2. The optimization consisted in adding hourly multipliers in patterns assigned to the CBS previously selected or presented in the WDN. The patterns are considered by 24 h and if the simulation is larger, then the cycle is repeated. The initial concentration of CBS is considered to be 1 mg/L, so the multiplier would range between regulation values until maintaining the FRC in all consumer nodes and reducing the total dosage of chlorine per day. Thus, those patterns with the lowest dosage per day and the minimal penalty for the tank in Figure 2. The upper boundary is considered as the maximum chlorine allowed of 4 mg/L and a minimal of 0.2 mg/L, inducing multipliers between those values.
Figure 2. Tank CBS pattern chlorine injection for GA vs. PSO.
The statistical analysis of scheduling the concentrations in the CBS from the GA shows an average DEL of 0.42 mg/L for 100 simulations and 73% of the simulations reduced the penalty to zero, and only 14% were greater than the average value of the penalty. The best values are obtained in simulation 32 with a zero-penalty value and the lower dosage per day of 1762.75 mg/L. As node 1 works as a pump station, a pattern is assigned (Figure 3), and the injection in WDN from 6 to 12 h and from 17 to 24 h are dismissed because the pump does not supply water in these hours thus chemical neither. The consideration is that at those hours water is distributed from the tank and not from the pump.
Figure 3. Node 1 CBS pattern chlorine injection from GA vs. PSO.
Considering the same procedure, the scheduling in CBS results from PSO shows in the statistical analysis of 100 simulations for PSO that 100% of the simulations reduced the penalty to zero. Therefore, the best value focuses on such individuals that dose the minimal mass of chlorine per day, or with zero-penalty value, and the lower dosage of 1279 g/day was founded in the simulation number 27. As the node 1 works as a pump station, an hourly pattern was assigned and there is no chlorine injection to the WDN from 6 to 12 and from 18 to 24 h.
Both cases use two CBS obtained by solutions from GA and PSO, respectively. This condition guaranteed the minimal concentration of FRC in the scenario of the last 24 h. Figure 4
shows chlorine distribution at hour 72 of simulation, which is considered for dismissing initial water quality conditions and mixing tank effects 
Figure 4. FRC distribution at hour 72. (a) Generated by the GA solution. (b) Generated by the PSO solution.
Both results obtained a full coverage with at least 0.2 mg/L. It was observed that PSO proposes lower concentrations of chlorine (total injected chlorine at 1279.00 g/day while GA maintains higher concentrations (total injected chlorine at 1762.75 g/day. Additionally, while GA have the higher concentration of chlorine injection, this has the lower standard deviation of FRC among the network nodes (Table 3).
Table 3. Statistical values of FRC (mg/L) from the last 24 h of simulation in all nodes.
||Standard Deviation Mean
The results of FRC for the last 24 h of simulation for each optimization program showed that GA for most parts of the day remained between the values of 0.25 and 0.8 mg/L (Figure 5a), while PSO obtained 75% of values equal or lower of 0.6 mg/L (Figure 5b), plot interpretation can be made with Figure 6. Therefore, PSO represents a minor concentration of FRC but still guarantees regulated values, which would help reduce corrosion in pipelines and reduce the TTHM’s formations. Both algorithms can solve the problem through trial and error, however the current methodology does not allow parallel processing and as consequence needs more time and computational resources for getting the final solution.
Figure 5. (a) FRC Distribution concentrations on the nodes of the WDN for the solution by GA. (b) FRC Distribution concentrations on the nodes of the WDN for the solution by PSO.
Figure 6. Box and whisker symbology.
GA results show that even if the concentration injected per day is minimized, nodes; 30, 34 and 36 (Figure 1 and Figure 5a), which are farther from the initial distribution point, reach the minimal FRC. In the same way, the FRC concentration in those nodes guarantees the minimal concentration obtained by the method PSO in the last 24 h of simulation (Figure 5b). FRC analysis from nodes 30, 34 and 36 is presented in Figure 6a–c, respectively.
Figure 6. (a) FRC concentrations on the farthest modes from the initial distribution (node 30). Last day of simulation obtained for GA and PSO. (b) FRC concentrations on the farthest modes from the initial distribution (N = node 34). Last day of simulation obtained for GA and PSO. (c) FRC concentrations on the farthest modes from the initial distribution (node 36). Last day of simulation obtained for GA and PSO.
2.4. CBS Location and Dosage Results for the Case 1
Multiple analyses were simulated through two different optimization models (GA, PSO). Solutions showed by the optimization models selected the best location for two CBS is near the principal water sources as the pump station in node 1 and node 26 (Water Supply Tank).
Finally, the total mass injected by the CBS obtained with GA and PSO is calculated and compared with those described in the literature review (Table 4). It can be observed that the total dosage of chlorine injected per day is 1279 g/day for PSO even if the injection patterns are higher at some hours. Additionally, PSO obtained a value of 66 g/day difference with the minimal dosage obtained from Hybrid optimization with solver Harmony Search. As the results of evaluations show that PSO obtained the significant number of feasible solutions in the optimization model for CBS location and scheduling pattern chlorine injection.
Table 4. Comparison of the total mass injected by the CBS obtained with GA and PSO with those described in the literature review for Case 1.
|Author and Year
|Mean Dosage (mg/L)
||Total Dosage (g/Day)
||GA (Case study 1)
||PSO (Case study 1)
|Boccelli et al., 1998 
||1 Linear Programming. Case IV
||Link 1 (A)
Link 8 (B)
Link 9 (C)
Link 38 (D)
Link 34 (E)
Link 29 (F)
|Propato and Uber, 2004 
||Linear Least Squares
||Link 1 (A)
Link 29 (F)
|Ayvaz et al., 2018 
||Hybrid optimization with solver Harmony Search
2.5. CBS Location Results for the WDN “SF812” in Case Study 2
The WDN “SF812” was evaluated with PSO since previous analysis showed it is more efficient with default settings in the Optimization Matlab Toolkit. It achieved 100% minimal FRC coverage and 71% achieved the goal of established a CBS number decision, which guarantee a reliable solution.
The optimization of chlorine concentration was made considering the CBS location after a time simulation of 232 h. Results proposed 4 CBS in the WDN: RDTOT4045, RDTOT4046, RDTOT4051, RDTOT4052 and a CBS located after the DWTP, in node RDTOT29 (Figure 7). The minimal distance between the nearer CBS is 9.45 m, meaning the more distant is 64.77 m from each other in this group of CBS. The concentration supplied by each node is the maximum allowed of 4 mg/L in each CBS, which could be due to the severe conditions of chlorine decay in the WDN. The CBS locations are in the southwest of the WDN, which represents more than half of the way until the last node supplied by the tank since the sector after this area has the higher quality problems in the WDN.
Figure 7. CBS location proposed by the PSO simulation in Case 2.
Figure 8 shows the chlorine distribution at hour 288 of simulation, with non-scheduled CBS with 4.0 mg/L at each one, a coverage in all consumer nodes with minimal FRC, except (1) the source, which is before the chlorine station, and (2) node RDTOT51 which closes sector with a valve in that point.
Figure 8. FRC distribution at hour 288 with CBS with fixed pattern dosage of 4 mg/L per hour.
The proposal of scheduling with PSO (Figure 9) received a penalty DEL = 5.33 mg/L and a total chlorine injection in the net of 21,912.82 g/day. This increment in the chlorine injection is because of the increment in the range of chlorine injection, and the objective of covering all consumer nodes with minimal FRC, the mean standard deviation is 0.042 mg/L, in the last 24 h for all nodes, and non-consumer nodes with base demand of zero were dismissed. As shown in Figure 9, node RDTOT29 distributes chlorine 24 h per day while auxiliary CBS focuses on distributing chlorine during the night period. This happens because during the night consumers are sleeping, and the water remains in the pipe system, so the water is mainly taken from the pipelines rather than the tank.
Figure 9. Chlorine injection dosage by pattern hour between the limits of 0.2 and 5 mg/L.
Then, to obey local regulations from Mexico 
, chlorine limit ranges are proposed between 0.2 and 1.5 mg/L for scheduling simulations in Figure 10
. Thus, multipliers patterns are assigned to hourly distribution to the initial injection of 1 mg/L. Results show a dosage injection of 14.52 kg/day of chlorine mass, and DEL = 57.85 mg/L. In the chlorination pattern, it can be observed that the quantity of chlorine that can be injected most of the time in RDTOT29 was reduced, and auxiliary CBS works at the top amount of chlorine allowed. This is due to severe conditions in the network associated with chlorine decay coefficients.
Figure 10. Pattern time dosage in Case 2 between local regulations.
Figure 11 shows the contour plot of time statistical mean FRC applied from the pattern in CBS, as shown in Figure 15. As the network remains between FRC Mexican regulations, some points at the end (south-east) of the network which do not comply with the minimum values. Thus, critical nodes are presented (Table 5) and evaluated. These nodes were selected due to their characteristics as elevation, position, and flow velocity from the nearest link.
Figure 11. FRC distribution in Case 2 by scheduling hourly dosage pattern obtained in Figure 15.
Table 5. Characteristics of critical nodes in Case 2.
||Node Demand (L/s)
The obtained results from the pattern limit injection between 0.2 and 1.5 did not guarantee the minimum FRC required in the net due to severe conditions of the network as topography and initial water conditions. However, the application represents a significant improvement to the initial conditions of the network, maintaining a mean FRC of 0.71 mg/L, as well from the total simulation time guaranteed the nodes the FRC upper 0.2 mg/L in 95.85%, as we can see in statistical results (Table 6). From nodes DQ238 and QD106 where box and whiskers plot for critical nodes (Figure 17) minimal FRC could not be obtained; most problems are related to uneven surfaces and low demand, which translates into long-time water stagnation in pipes and CBS would not be a feasible solution. Implementation of CBS in the WDN improves the water quality with a better chlorine distribution and, as a collateral effect, diminishes the risk of disinfection by-product formation.
Figure 12. Box and whisker FRC distribution in Case 2 for critical nodes.
Table 6. Statistical values of FRC (mg/L) from the last 24 h of simulation in all nodes.
||Std Deviation Mean
||Hours Upper 0.2