Optimizing the Locations of Intermediate Rechlorination Stations in a Drinking Water Distribution Network

The preservation of the water quality in the distribution network requires maintaining permanently minimum residual chlorine at any point of the network. This is possible only if we plan chlore’s injections in various points of the network for intermediate rechlorination, or when increasing the initial level of chlorine in the tank outlet. In the latter case, there is a risk of disruption of the taste and smell of water for consumers near the tanks. Therefore, to avoid an excessive increase in the chlorine concentration in the tanks and to avoid affecting the taste of the distributed water, intermediate rechlorination stations should be implemented. These stations will proceed with the chlorine regulation. Given the high cost of the implementation of such stations, the optimization of the number and the choice of location of these stations are needed. This paper is focused on the implementation of an algorithm for such optimization. We used dynamic programming in this algorithm. Performance tests of our decision support system were done on real sites of the Wilaya Rabat-Sale (network of Morocco's capital). Keywords—Simulation of chlorine distribution; drinking water distribution network; deficit nodes; optimizing the locations of rechlorination stations; Dynamic programming


I. INTRODUCTION
Water is essential for life.However, in nature, water is rarely directly consumable.Indeed, its contact with the ground, the water pollutes and its charges by suspended matter, clay particles, vegetation waste, living organisms (plankton, bacteria, viruses), salts various (nitrates, chlorides, sulfates, sodium carbonate, etc…), gas (1).The presence of these impurities requires processing before use, to make it potable.Traditionally considered as a symbol of purity, water has gradually become the nutrition product most monitored and subject to the strictest quality standards imposed by the World Health Organization (WHO).
The urban distribution is the potential seat of numerous causes of degradation of the quality of water that lead to sanitary risks aswell as to organoleptic degradations directly perceived by consumers (2) (3).The evaluation of this quality requires a follow-up of control and prevention, through sampling in the network.Indeed, chlorine is an agent of effective disinfection (4) (5) which has helped solve the problem of the major epidemics of the last centuries (Typhoid, cholera, etc…) (6).This efficiency is only possible if we permanently maintain a residual of free chlorine in the distribution network (7) (8).In order to achieve this, it is necessary to plan the implantation of intermediate chlorination stations.
The objective of this work is, thus, to propose the rechlorination station locations in a distribution network.To minimize the number of deficit nodes in chlorine and the stations to be implanted, it is necessary that the choice of these locations has to be optimal.
The modeling of the distribution of chlorine is an important step in the search of optimal locations of rechlorination stations.In this regard, the second section of this paper describes the method used to simulate the chlorine distribution in every point of the network.
In the third section, we present the method retained for the optimization of the locations of intermediate rechlorination stations, particularly with regard to the approach of the dynamic programming.
The results of this study with regard to the optimization of the locations of intermediate rechlorination stations in some stages of the drinking water distribution network of Wilaya Rabat-Sale, Morocco's capital, will be the object of the fourth section.
The last section will be devoted to the description of the tool to aid decision.This tool facilitates, among others, simulating the distribution of chlorine content in every point of www.ijacsa.thesai.org the network and furthermore, it proposes the best locations of intermediate rechlorination stations.

II. SIMULATION OF CHLORINE DISTRIBUTION IN A DISTRIBUTION NETWORK
In order to control the water quality in the network, it is imperative first to model the degradation of chlorine in a pipe as a function of residence time.Other parameters needed for the concentration of chlorine, will implicitly be introduced into the reaction rate constant of chlorine.This will allow us to monitor the changes in chlorine level as a function of time in function of time throughout the distribution network.
The degradation of the chlorine concentration at each network point requires the establishment of a mathematical model describing the degradation of chlorine in the network.
The database for the chlorine distribution simulation in a network contain, firstly, information related to the geometric structure and the hydraulic regime (flow distribution and residence time) of the nodes and pipes, and secondly, the initial conditions i.e. the level of chlorine injected into the supply sources and the locations of the already implanted chlorination stations in the network.
By using these data, we simulated the distribution of chlorine in a distribution network.
We present in Fig. 1, a node j, in which the chlorine level will be determined using the known chlorine rate values in three other nodes.To calculate the chlorine level in the node j, we must first know the level of chlorine in each of the pipes (TCl (i) where i= i 1 , i 2 and i 3 ) that supply the node j.
We have two cases (9) :  First case: if the pipe(i,j) has a chlorination station, then the following is applied: TCl(i,j) = setpoint of the station (initial rate that is assumed to be known)  Second case: if absence of chlorination station on the pipe (i, j), then the following is applied: Where: t i,j : the residence time of water in the pipe(i,j) k i,j : coefficient of chlorine degradation in the pipe(i,j) and Q(i,j) : the debit of the pipe (i,j) Equation ( 1) is a weighted average of the partial chlorine rate of pipes serving the node j, with weighting coefficient the debit rate Q(i,j) transiting in each conduit.
Proceeding out from the source of supply (reservoir, wells, etc...) where the chlorine level is known, we can calculate step by step the rate of chlorine in every point of the network.This simulation (10), allows us to identify the deficit nodes in chlorine, i.e. the nodes where the chlorine concentration levels are below a preset minimum value.It is necessary thereafter, remedied by implantation of rechlorination stations.Our simulation was enriched by a technique of optimization of intermediate rechlorination station locations.

III. METHOD OF OPTIMIZING THE LOCATIONS OF RECHLORINATION STATIONS
The optimization of there chlorination stations' locations in a distribution network aims mainly to reduce the number of deficit nodes in chlorine with the minimum of stations to implant.
Before the description of this algorithm, we recall the various basic principles of dynamic programming.

A. Definition
Dynamic programming can be applied to optimization by formulating them as a sequence of decisions.It was identified by mathematician Richard Belman in 1954 (11).
A problem can be solved by the dynamic programming if it is decomposable into n phases, any phase i being defined by two vectors (state vector and decision vector) and two functions (transfer function and return function) (12) (13).
 The input state vector E i-1 characterizes the state of the system studied  The decision vector X i expresses the intervening decisions to phase i.


The transfer function E i = E i (E i-1 , X i ) giving the output vector.
 The return function r i = r i (E i-1 , X i ) expressing the result of decisions taken at the phase i.

B. Calculation method
From the calculation of the distribution of chlorine in the network, we identify deficit nodes and their number.The location of a rechlorination station that reduces this number is obtained by calculating the number of nodes deficit associated with each pipe (the number of deficit nodes associated with a pipe corresponds to the number of deficit nodes by placing a station of rechlorination on this pipe).
When all the pipes are tested, we hold positions (pipes) which give the minimum of deficit nodes.
Since a chlorination station modifies totally or partially the chlorine distribution on the network, we proceed by phase(cf Fig. 2).It is therefore, in our case a dynamic programming (9). The states (E i ) represents the information on the network hydraulic status (pipes, nodes, setpoint at reservoirs and the threshold below which a node is declared deficit).
 The decisions (X i ) are the possible locations of a rechlorination station in the network.
 The function return (r i ) proposes the optimal locations.
 The transfer functions (E i ) calculate the distribution of chlorine in the network.
The algorithm based on dynamic programming is the following (14) (9): Tclini :represents the level of chlorine at the outlet of the feed points (reservoirs, wells and the existing stations).
Tclmin : rate of minimal chlorine below which a node is declared deficit Simulation(K) :is a function that calculates the distribution of chlorine in the light of a rechlorination station on the pipe K.
Cout(K) :is a function that gives the number of deficit nodes after implantation of a station on the pipe K.

IV. OPTIMIZATION RESULTS
The performance tests of our decision support system decision we developed (See section V) were performed on real sites of the distribution networks of the Wilaya Rabat-Sale (Network of Morocco's capital).The models established within the framework of the study of the functioning of the networks of REDAL (autonomous governance of water and electricity of the Wilaya Rabat-Sale) have taken into account that the pipes ensure a transfer of water from one zone to the other of each floor.So, the pipes whose function was reduced to distribution in a street were excluded from the analysis.This is the conducts of weak diameters (d<150mm), or conducts antenna.
For this study, we took as chlorine minimum threshold the value 0.25 mg / l below which a node is counted among the (2) www.ijacsa.thesai.orgdeficits (15).Indeed, this value, which is defined by the World Health Organization (WHO) (16) (7) ensures effective disinfection and maintain water quality in the network.
We wish to look for the best intermediate station locations that minimize the number of nodes deficit chlorine for different stages of the distribution network of the Wilaya Rabat-Sale.
The distribution network of the Wilaya of Rabat-Salé is divided into several pressure stages (17) (18).We present in this paper the optimization results on the following:  19) is supplied by a tank with a volume of 3500 m3.The number of nodes that fall within the scheme of this stage is 26 and the number of pipes is 29 (Cf.Fig. 4).The stage 61 of Agdal ( 17) is a distribution network that includes neighborhoods Médina, l'Océan and Orangers.The two reservoirs of that stage have an overall storage capacity of 6000m3.It is so called because the altimetry side of the reservoirs of "stage 61" is about 61.28m.The number of nodes contained in the scheme of this stage is 52, while the number of pipes is 73 (cf Fig. 6).We learn from Fig. 7 that the number of deficit nodes decreases with the implantation of rechlorination stations.We also note that the installation of two rechlorination stations is enough for having a null number of deficit nodes.20) is powered by a 2500m3 storage tank, the coast of the raft is 68.5.The number of nodes that enter into the constitution of this stage is 24, by against the pipes are 28 (see Fig. 8).The pressure stage 68-réduit is a distribution network created following the separation of the stage 61 into two parts (17).The scheme of this stage consists of 105 nodes and 141 pipes (see Fig. 10).Fig. 5, 7, 9 and 11 illustrate the variation in the number of deficit nodes according to the iterations.An iteration references the execution of the algorithm of optimization following a chlorine distribution in the network that is determined based on the instruction, the minimum threshold of chlorine, and the number of stations in the network.Each iteration will consider the results of the previous (station implanted in the network).For this study, we gave priority to install a station on the pipe whose service area is the most extensive.
The interpretation of these figures shows that the number of deficit nodes decreases with the number of iterations of the optimization algorithm.Indeed, at each iteration, a chlorination station is implanted in the network, which increases the chlorine content, and therefore results in a reduction of the deficit nodes.

V. PRESENTATION OF THE TOOL TO AID DECISION
The objective of the decision aid tool is to obtain an overview of the variations of the concentrations of chlorine inside a drinking water distribution system, and determining optimal locations of rechlorination stations that minimize the number of deficit nodes in chlorine.
To accomplish its tasks, the tool uses as data input the information on nodes (name, code) and pipes (code, start node, destination node, length, diameter, velocity of water conveyed in the pipe, coefficient of chlorine degradation in driving) representing the hydraulic state (flow distribution andresidence time) and the geometric network studied, the chlorine setpoint of entry points (tanks, wells and pipes having a rechlorination station) and the minimum chlorine level below which a node is declared deficit.From these data, the tool determines the distribution of chlorine in every point on the network and proposes optimal locations of rechlorination stations.

General architecture
Any real system can be decomposed into several components, each of which performs a specific processing.These components which we call modules, cooperate together to describe the operation of the complete system.This decomposition into modules can facilitate the development, maintenance and extensibility of our system.Figure 6 shows the overall organization of the tool realized.The decision support tool is an integration of the algorithms described in our rechlorination simulation work (20) and the algorithm of Fig. 3.It in fact includes two modules, simulation and optimization, using these algorithms.To enable map management, an additional module is developed.

 Module "Simulation"
This module simulates the distribution of chlorine in the network studied, compared with a definite hydraulic regime (flow distribution, and residence times).By giving the chlorine concentration at entry points, this module allows the calculation of the concentrations of chlorine in all network nodes.Textual form: the result, in this case, is a textual description of the graphic form.It contains all information related to the nodes and pipes, and can be edited or printed.Fig. 15 is an example of this mode of presentation.The locations of the proposed rechlorination stations are ranked in descending order of degree of influence (fig.16).Indeed, in practice the priority when installing a station is given to the pipe which supplies a wider service area.This process of calculating the number of remaining deficit nodes for each iteration can be continued until there are no more deficit nodes or stopped at any time by the operator.

 Module « Map Management »
This module offers the functionality of a database manager, it is composed of a set of utilities allowing the presentation, handling of graphics cards (zoom, selection, etc…), and management of the database.Management operations (adding, updating, deleting and consulting) are performed on two tables, one on the other nodes and the pipes (Fig. 17   To assure permanently a rate of minimal chlorine in any point of a drinking water distribution system, we developed a decision aid tool.The tool proceeds, on one hand, to the IT control of the chlorine content in a network, which allows to obtain a fast knowledge on the distribution of chlorine in the network compared to a definite hydraulic regime, and to reduce the cost of measures (sampling, displacement, etc...).On the other hand, it allows to optimize the locations of intermediate rechlorination stations.
In the term of this work, the managers of REDAL (autonomous governance of water and electricity of the Wilaya Rabat-Sale (network of Morocco's capital).)will have at their disposal an operational software adapted to their needs.However, the operation of the system within the administration concerned, requires a preliminary preparation by integrating the actual data with the current structure of the distribution network of the Wilaya Rabat-Sale.This will allow a new evaluation of our system of which the obtained results will be confronted with the data collected in the field.

Fig. 1 .
Fig. 1.Illustration schema of the chlorine concentrations in a distribution network

Fig. 2 .
Fig. 2. Phases of a problem solved by dynamic programming

Fig. 4 .
Fig. 4. Map of the stage "Temara bas" Fig. 5 illustrates the variation in the number of deficit nodes according to the setpoint.An iteration corresponds to implantation of the station.The study of this figure shows that to have no deficit node in this stage, it is necessary to implant two rechlorination stations.

Fig. 5 .
Fig. 5. Variation in the number of deficit nodes according to the iterations (the case of Temara bas)  Case of Stage 61 of Agdal

Fig. 7 .
Fig. 7. Variation in the number of deficit nodes according to the iterations (the case of stage 61)  Case of Stage Skhirat This stage (20) is powered by a 2500m3 storage tank, the coast of the raft is 68.5.The number of nodes that enter into the constitution of this stage is 24, by against the pipes are 28 (see Fig.8).

Fig. 8 .
Fig. 8. Map of the stage "Skhirat" Fig. 9 shows the evolution of number of deficits nodes according on the iterations.By this figure, we can see that the

Fig. 9 .
Fig. 9. Variation in the number of deficit nodes according to the iterations (the case of stage bas de Skhirat)  Case of stage 86-réduit

Fig. 10 .
Fig. 10.Map of the stage "68-réduit" Fig.11 shows the number of deficit nodes according to the iterations.This figure shows that to have no deficit node in this stage, it is enough to implant two rechlorination stations.

Fig. 11 .
Fig. 11.Variation in the number of deficit nodes according to the iterations (the case of stage 86-réduit)

Fig. 12 .
Fig. 12. Data flow of the decision aid tool

Fig. 13 .
Fig. 13.Architecture of the decision aid tool www.ijacsa.thesai.orgIt also offers the flexibility to generate the chlorine distribution in the network studied for different concentrations of chlorine in the tanks.The result of the simulation can be presented to the operator in two forms: Graphic form: the result is displayed on screen.This mode of graphical representation is more significant.It indicates deficit nodes in a color different from those of the other nodes.

Fig. 15 .
Fig. 15.Example of textual presentation (case of stage  bas")  Module « Optimization »:We solicit this module to optimize the location of rechlorination stations inside the network studied.The optimization function integrates the algorithm based on dynamic programming described in Section 3.

Fig. 16 .
Fig. 16.Optimization interfaceWhen a location of a station is selected among those proposed by the optimizer, the system recalculates the distribution of chlorine and the number of deficit nodes before starting the next iteration. ).

Fig. 17
Fig. 17.The different interfaces of the database manager Fig. 17.The different interfaces of the database manager VI.CONCLUSION