Proposal of optimal operation strategy applied to water distribution network with statistical approach

Inefficiency of sanitation companies’ operation procedures threatens the population’s future supplies. Thus, it is essential to increase water and energy efficiency in order to meet future demand. Optimization techniques are important tools for the analysis of complex problems, as in distribution networks for supply. Currently, genetic algorithms are recognized by their application in literature. In this regard, an optimization model of water distribution network is proposed, using genetic algorithms. The difference in this research is a methodology based on in-depth analysis of results, using statistics and the design of experimental tools and software. The proposed technique was applied to a theoretical network developed for the study. Preliminary simulations were accomplished using EPANET, representing the main causes of water and energy inefficiency in Brazilian sanitation companies. Some parameters were changed in applying this model, such as reservoir level, pipe diameter, pumping pressures, and valve-closing percentage. These values were established by the design of experimental techniques. As output, we obtained the equation of response surface, optimized, which resulted in values of established hydraulic parameters. From these data, the obtained parameters in computational optimization algorithms were applied, resulting in losses of 26.61%, improvement of 16.19 p.p. with regard to the network without optimization, establishing an operational strategy involving three pumps and a pressure-reducing valve. We conclude that the association of optimization and the planning of experimental techniques constitutes an encouraging method to deal with the complexity of water-distribution network optimization.


INTRODUCTION
Increasing population as well as rising demand have been putting water resources under increasing pressure, which, along with climate changes, are resulting in water scarcity, a challenging problem which will become more frequent and severe in the future. Thus, global distribution of water resources, essential for life, the economy and the social structure of urban environments, have been affected, putting the population's water safety at risk. (Chini and Stillwell, 2018;Liu et al., 2019). Water leakage can reach 45 billion cubic meters worldwide; reduction by half would be enough to ensure the supply of 200 million people with no need of investments in funding and exploitation of springs, reducing part of sanitation companies' financial loss, which is about US$ 14 billion per year. This problem would limit investment capacity in system improvement and expansion and also implicitly reduce power consumption required for water treatment and distribution. (Coelho and Andrade-Campos, 2014;Kanakoudis and Muhammetoglu, 2014;Mutikanga et al., 2013).
Losses can be divided into apparent losses, caused by commercial issues such as collection errors, faulty hydrometers, and non-authorized consumption, and real losses, caused by leakages in joints, connections or holes (Sanz et al., 2016). Besides financial, power and environmental losses arising from real losses, there is also the sanitary risk due to the possibility of contaminant infiltrations in piping, requiring operational strategies for mitigation (Candelieri et al., 2013). Thus, a strategy for reduction of losses due to leakages is the management of pressures in network; that is, the adequacy of operational procedures to ensure adequate values of pressures in networks, assuring suitable conditions for water supply. (Fontana et al., 2012;Han and Liu, 2017).
For establishing an optimal operational strategy, optimization techniques are employed. These are considered an essential part of water-resource planning and management, especially in the case of water distribution networks in which area studies have been developed. Computational simulation is used in networks to allow application of optimization techniques to ensure an adequate and sustainable water supply with adequate pressures. Pressure management in a network is a great concern for sanitation companies, since excessive pressures are the main cause of real losses. Meanwhile, very low pressures do not allow adequate water supply for the population, leading in many cases to lack of water at particular points of the network (Khatavkar and Mays, 2017;Oikonomou and Parvania, 2018;Tanyimboh and Seyoum, 2017;Vakilifard et al., 2018).
When operating a network, optimization aims to reduce operational costs of collection and distribution system, such as pump activation, treatment and distribution to meet water demand within the system (Soler et al., 2015). The technique usually used to evaluate water-resource problems is genetic algorithms, based on the evolution principle, which states that only the more adapted individual will survive and generate descendants. This technique is used in several problems related to water distribution networks, from operation to design, always aiming for a better meeting of needs with the lowest possible power consumption. (Bi et al., 2015;Creaco and Pezzinga, 2015) Establishing scenarios to be simulated, as well as obtaining optimal levels of network operation, required the use of the Design of Experiments technique (DOE). This method uses data planning and gathering in a systematized manner to process characteristics modeled according to experimental data, also allowing the use of Methodology of Surface Response (MSR), which makes possible the representation of responses of interestin this case, losses in the networkby the use of a polynomial of second order, which can be optimized to reach factors leading to such a result, and is used in several areas (Barimani et al., 2018;Gomes, 2013;Yu et al., 2018).

CASE STUDY
The work phases are defined in the form of a flowchart, as shown in Figure 1. For developing optimization programs, it was necessary to prepare a theoretical network capable of adjusting to the proposal of this paper, intending to include minimum components to allow the adequate analysis of its operation. The objective is to avoid an expensive computational implementation, and at the same time to look for a proximity with irregular relief regions, which is usually complicated when regarding water distribution.
The theoretical network developed for the paper was a branched network with irregular topography, aiming for simplicity of implementation, able to meet the mandatory analysis requirements, created in EPANET software and displayed with elevations and demands of nodes in Figure 2. Data employed for network simulation were based on commercial diameters found in Porto (2006) and in rugosities adopted by Silva (2003), as shown in Table 1.

METHODOLOGY
Once the network in EPANET was in place and the first set of data was obtained, the optimization program was written in the FORTRAN 90 language, as well as the modulus responsible for network optimization by using genetic algorithms and hydraulic calculations. The calibration algorithm of Silva (2003) was used for the calibration of the theoretical network throughout the data obtained by EPANET.
The optimization program has a genetic algorithm coupled with a hydraulic calculus module for network optimization, divided in subroutines. First, data passes through a rugosity optimization subroutine, which generates slight changes in rugosity to simulate the aging of pipe materials. Afterwards, the data goes through crossover and then passes to a mutation subroutine, which has a 10% mutation probability.
After this, the data goes through the reservoir-level optimization subroutine, which uses one of the reservoir heads pre-established in Table 2 and goes to the hydraulic calculation module, which recalculates the pressure on the network, and goes to Pressure Optimizationa Valves subroutine where the program checks if node heads are below the established levels for the scenario, as seen in Table 2. If the heads are below the levels established, this subroutine will adjust the heads to the desired level and engage a pressure-reducing valve (PRV) on the pipe upstream of the node. In the same way, the data passes through Pressure Optimization -Pumps and the subroutine checks if the heads are under the desired level on the nodes and Rev. Ambient. Água vol. 15 n. 2, e2455 -Taubaté 2020 engages a pump on the pipe upstream from the node. The optimization program considers only the pressures downstream of the pumps and valves implemented for the calculations. Finally, the pressure values of the network go to the hydraulic recalculation subroutine and then it is verified that the pressures are within the limits established for the nodes, as shown in Table 2. If they are within the limits, the pressure values at the nodes and the sections where the pumps and valves were implemented are printed until the end of the algorithm iterations Figure 3. For calculation of losses, an approach of Tucciarelli et al., (1999) was chosen, which points out a correlation of water losses in a network with pressures is an equation which considers the small leaks surround each node and the force of the water pressure, as found in Silva (2003), where losses are represented in percentages and average pressure (Pmedia), arithmetic average of pressures in network nodes. Equation 1 is adjusted to represent a Brazilian average leak rate, which is approximately 40% according the Brazilian water and sewer services report (SNIS, 2019). (1) Operational levels of factors (variables) involved in loss calculation were obtained by the Design of Experiments technique, employing Montgomery's adapted factorial approach (Montgomery, 1999); this is, where the quantity of experiments to be achieved is given for 2 k , where k is the number of variables, and also includes central and axial points, as per Table 2, which results in 32 scenarios to simulate.
The second-order model, for regression analysis and obtaining surface response, is based on an Equation 2 employed in study of Kanigalpula et al. (2016).
Where: • N = number of observations. For obtaining estimated parameters, the ordinary least squares method was used, as per Rossi and Neves (2014), by Equation 4: Where, in Equation 5 sources which compound least squares method can be observed.
Being X the codified experimental matrix, ̂ the matrix of coefficients to be estimated and ̂ the matrix with obtained responses (results). For obtaining an optimal point, the electronic chart with algorithm of optimization Generalized Reduced Gradients was used to, by response surface equation, obtain optimal responses for problems by minimization of equations.

RESULTS AND DISCUSSION
Simulations carried out for the complete factorial experiment obtained an average loss of 41.01%. In scenarios 12, 16, 22 and 24, there was a deterioration of network conditions, with Rev. Ambient. Água vol. 15 n. 2, e2455 -Taubaté 2020 worsening of water losses. On the other hand, the best scenarios were numbers 1, 3 and 9, as displayed in Figure 4.
The analysis of interferences of each factor individually shows what influences losses the most is the variation of pumping head levels, while what influences the least is the variation of reservoir heads, as displayed in Figure 5. Analysis of interactions between factors shows that interactions between the piping diameter and the pumping pressure cause a major reduction of water losses in the network, while interactions between the piping diameter and the reservoir head cause a major increase of losses. Interactions between the pumping head and valve head have little statistical significance, as per Figure 6, where the X axis is the factor level, and Y axis the losses.     The equation modelling the response in electronic chart was launched and then the optimization algorithm Generalized Reduced Gradients was employed to obtain decision variables; that is, codified values of factors A, B, C and D resulting in lower possible loss, respecting restriction of -2 to 2, minimum and maximum values of factors, making adjustments for an operational level closer to rule or commercial, as shown in Table 3. For such values, applied on optimization algorithms, expected loss was 27.86%. one factor which needed to be adjusted was factor C -Pump Head, once it was modified for 10 m.c.a., to meet rule NBR 12218 (ABNT, 2017), which set out that value of pressure as the required minimum in a water-distribution system. The value of the diameter was rounded to 0.300 m, the commercial value displayed by Porto (2006), and other factors were rounded to the second decimal place for launching the same in network optimization routines. Thus, the optimal scenario results appear in Figure 10. In this scenario, pumps were introduced in following pipes: Pipe 5: head of 26.19 m.w.c.; Pipe 8: head of 3.86 m.w.c.; Pipe 9: head of 47.03 m.w.c.
A valve was also introduced in pipe 7, generating a head loss of 22.19 m.w.c. to keep the head at 21.94 m.w.c. Losses in this scenario were 26.61%, a reduction of 16.19 p.p. in relation to the scenario without optimization, a value situated within error R² of 89.12% for the response. This was within the range predicted by the equation of the model. Thus, this scenario defined the operational strategy for the network.

CONCLUSIONS
The genetic algorithm of optimization obtained a good performance, being able to maintain pressures within established limits in the study and indicated the quantity of pumps and valves employed, as well as pumping pressures or the head loss generated by the valves and portions of pumps and valve implantation. Thus, the planning of experiments proved to be a potential tool to assist in the operation optimization of a water distribution network, making possible optimization of the equation of obtained response surface and, consequently, obtention of optimal parameters and evaluation of interactions. However, more studies should be done to evaluate performance on more complex and real network scenarios to validate the tool under different conditions.