Water and Energy Demand Management in Pressurized Irrigation Networks

Minimizing energy expenditure is one of the main purposes of the managers of pressurized irrigation systems. From the energy consumption standpoint, they can reduce energy consumption by supplying a constant flow into the system (a scheme different from urban water pressurized networks in which water demands depend on users). Managers can keep energy demands (opening and closing valves) while meeting pressure restrictions. We developed a computer application in MATLAB containing a genetic algorithm to find the best moment to open and to close valves to minimize an objective function which measures the differences between the objective and the real injected flows. We tested this program in the pressurized irrigation network of the San Vicente Campus, University of Alicante (Southeast Spain) and we calculated the water and energy balance (from the later and present irrigation network) and the carbon credits not emitted to the atmosphere.


Introduction
The International Energy Agency [1] declared that energy used in water processes (850 TWh) is 4% of global electricity consumption plus 50 million tons of oil equal of thermal energy (used for desalination technologies and diesel pumps). The situation is similar in Europe, where the water sector is the main purchaser [2] and the energy expenditure is proportionate to 3% of overall electricity consumption [3,4].
One challenge that utility managers must handle is to reduce energy consumption in urban water pressurized networks (WPN). Only adequate diagnosis entails efficient and sustainable operation. To date, the European Commission presents as one of its fundamental purposes to reduce emissions and establishes in its targets for 2050, such reduction with commercial, industrial and social transition strategies [5]. The European Union (EU) highlights the European dependency on oil and gas, which in 2018 produces 55% of the energy demand. The EU aims to reduce 20% of the full energy need for the year 2050.
On a nationwide scale, we cannot relate the rise in energy expenditure to drip irrigation -linked to classical flood irrigation-But to the silent revolution [6] that assisted the demanding use of groundwater. In the 1970s, there was a progressive conversion of irrigation from gravity irrigation to pressurized irrigation. Between 1950 and 2007, the irrigated region grew 2.5 times, while water consumption doubled and energy expenditure multiplied by 19 [7]. Other authors quantified that energy consumption ranges between 0.28 kWh/m 3 (dealing with water supply, conveyance and distribution) and 0.34 kWh/m 3 (if water treatment is to be embodied) [8].

Hydraulic Input Data
We request a calibrated irrigation model which considers water delivered to crops. Managers calibrate pressurized irrigation models by collecting observed flows in pipelines and pressures in consumption nodes. We can consider the model as calibrated if we achieve good agreement between the simulated (i.e., model predicted) and observed values over the entire simulation period. A calibrated model represents properly the measured data (reality). We likewise need the minimum pressure required by standards P γ threshold (MWC), a value representing the smallest pressure for the correct operation of the sprinklers. We adopt this value regarding technical recommendations and the practical experience of gardeners. At lower values of pressure, the manufacturer does not sprinkler pop-up and proper functioning.
Once we have this information, we can perform hydraulic calculations. No errors should appear when running the hydraulic simulation as any error in the hydraulic solver returns an error in our simulation step (described in the following section. With the hydraulic model, we can get the irrigation time for every consumption node.

Upper and Lower Threshold Flow Rate
The lower networks flow rate threshold (Q low,th ) is the least injected flow which does not comply with the pressure conditions (for smaller flow rates, pressure specifications are satisfied). Meanwhile, the upper network flow rate threshold (Q up,th ) is the greatest value maintaining the pressure above the standards (greater flow rates do not satisfy the pressure requirements), and they are infrastructure constraints [34]. This limit depends on the installation (not modifiable by managers) and the network layout, diameters, pipe materials, lengths and the flow delivered to plots (values depending on the irrigated surface and the number of emitters).
We can calculate the lower network flow rate threshold simulating various scenarios in a hydraulic simulation program such as EPAnet [39]. We can calculate the smallest pressure at each node in the simulation period running UAEnergy (a graphical user interface developed in Matlab [40]. Finding this lowest value involves a higher number of combinations and we made this calculation once as it is time-consuming, and their value is constant for the irrigation scheme.

Water and Energy Audit of the Pressurized Irrigation Network
We calculate the volume injected into the network (V inj (t)) and the volume infused/accumulated into the network by the tank (V tank (t)). This input volume into the PIN is balanced to the amount of the volume delivered to purchasers (V R (t)) and the volume wasted through leakages (V L (t)) (Equation (1)).
We obtain these values in an extended period (t p ), which can take values such as 1 year, 1 month, 1 day, etc.). We divide this duration time into m i intervals of time (∆t k ) (being this ∆t k the length of the pattern time step; 5, 10, 15, 30 min, etc.). Thus, we get the total volume injected in the extended period (t p = m i · ∆t k ) from the sum of the water injected in each of the m i the time interval of the steady-state simulation.
UAenergy again computes the energy audit in water distribution networks (in fact, this is its key objective). We calculate the energy supplied by reservoirs (E N (t p )), by pumps (E P (t p )) and by tanks (∆E C (t p )). This input energy into the PIN is equal to the energy delivered to the users (E U (t p )), the energy lost through water losses (E L (t p )) and the energy dissipated in friction at pipes (E F (t p )). This balance results in Equation (2).
The flow injected into the network is the parameter to be optimized here. It is widely known that constant flows injected into the PIN (always meeting pressure restrictions) involve minimum energy consumption. In this stage, we calculate the V inj (t) (through the total simulation time t p = m i · ∆t k ) and we aim to supply the same volume with a constant flow (the lower threshold flow rate, Figure 1). With this new data, the new simulation time should be Equation (3).
Being k i the intervals of time required to supply the V inj (t) with a constant flow.
The flow injected into the network is the parameter to be optimized here. It is widely known that constant flows injected into the PIN (always meeting pressure restrictions) involve minimum energy consumption. In this stage, we calculate the ( ) (through the total simulation time = ⋅ Δ ) and we aim to supply the same volume with a constant flow (the lower threshold flow rate, Figure  1). With this new data, the new simulation time should be Equation (3).
Being the intervals of time required to supply the ( ) with a constant flow.

Carbon Credits Calculation
We consider CO2 emissions from every energy source. The standard values of CO2 per kWh emitted by every energy source such as natural gas, 554 g/kWh; oil burned, 865 g/kWh, coal burned, 1432 and others (nuclear and renewable sources) 0 g/kWh [41].

Objective Function
The objective function is to obtain as good as the possible agreement between the simulated (i.e., model predicted) and observed values over the entire simulation period. Here, this goal is achieved by minimizing the root-mean-square error (RMSE) between observed and simulated flows (Equation (4)): where are the number of flow observations at pipe/link L,

Carbon Credits Calculation
We consider CO 2 emissions from every energy source. The standard values of CO 2 per kWh emitted by every energy source such as natural gas, 554 g/kWh; oil burned, 865 g/kWh, coal burned, 1432 and others (nuclear and renewable sources) 0 g/kWh [41].

Objective Function
The objective function is to obtain as good as the possible agreement between the simulated (i.e., model predicted) and observed values over the entire simulation period. Here, this goal is achieved by minimizing the root-mean-square error (RMSE) between observed and simulated flows (Equation L (just before and after time t j ). Note that if the observed flow coincides with the pattern time step, n mQ = k i .

Optimization Parameters
We gather the optimization parameter considered here in a 1 × n (being n the number of consumption nodes in the irrigation network) vector has n integer numbers (X 1 , X 2 , . . . , X n ). These numbers reveal the starting irrigation time of each consumption node. Note that any additional restriction involves reducing this potential (X 1 , X 2 , . . . , X n ) values.
As data to our problem, we may retrieve from the PIN model the irrigation duration for each consumption node. This is a 1xn integer vector n integer numbers (D 1 , D 2 , . . . , D n ) showing the number of ∆t k intervals of time per node.
EPAnet2 is a demand-driven water distribution network modeling software that uses temporal demand pattern multipliers to represent a diurnal demand curve, i.e., the temporal variation of demand, often for 24 h. In the case study shown here, there is no a priori knowledge of the demand pattern multipliers (DPM) values. We only know these values must be integers from 1 to k i − d i . This means that if consumption node irrigates for d 1 · ∆t k minutes, the irrigation start time (X 1 ) may be any of values oscillating from 1 to k 1 − d 1 (if the number is 1, we irrigate from 0 to d 1 · ∆t k , and if the number With these numbers, each combination creates a binary matrix (n × m) described with Equation (5).
where each row shows the irrigation time of each node (from 1 to n) and the column j shows the instant of time where the i-node is delivering water. As an example, if the length of the pattern time step is 10 min, if we select the values X 2 = 1 and d 2 = 2, we know that node 2 is supplying water to the garden from 0:10 h and it will last for 2 ∆t k = 20 min. Other values as X 10 = 6 and d 10 = 4 shows that node 10 irrigates from 1:00 to 1:40 h (4 ∆t k = 40 min).

Optimization Algorithm
In our approach, we adopt the integer version of the GA algorithm since we can assign all the genes with integer numbers. Now, we embody these earlier results, but our ambition is to diminish energy consumption. Hence, we do the relevant PIN simulations using the EPAnet2 software [39], and we compute energy expenditure [31]. We get this from the energy equation in integral form, and its time integration extended over a period (day, month or year). To ease this step, we have used the software UAenergy [40], planned for academic and professional purposes, to calculate the energy audit losses in PINs. The program package and source codes are available at https://bit.ly/2FbNqdr. The analysis allows checking for the energy, showing that the energy balance is maintained.
We can solve constrained and unconstrained optimization problems with a GA [36]. Being the GA a method based on the natural selection which changes a population of individual solutions including selection + crossover + mutation + elitism [42][43][44][45]. At each step, the algorithm selects individuals from the current population and uses them as parents to produce the children for the next generation. Over consecutive generations, the population drives toward an optimal resolution. We use this GA as an alternative to other optimization algorithms, where the objective function is not continuous or nonlinear, non-differentiable or stochastic. The GA algorithm makes a population of points at each iteration. The best point in the population approaches an optimal solution, and the algorithm takes the children for the next population by computation, which uses random number generators.
The accompanying draft outlines how the GA works: 1.
The algorithm creates a random initial population; Water 2020, 12, 1878 It creates a sequence of new populations. At each step, the algorithm uses the individuals in the current generation to create the next population (children) according to the following steps: • Scores each member of the current population by computing its fitness value (the raw fitness scores); • Scales the raw fitness scores to convert them into a more usable range of values (expectation values); • It selects members called parents based on their expectation; • The GA chooses individuals in the current population with lower fitness as elite. They pass these elite individuals to the next population; • Produces children from their parents. The GA produce children by changing a single parent-mutation-or by combining the vector entries of a pair of parents, crossover; • Replaces the current population with the children to form the next generation.

3.
The algorithm stops when it meets the stopping criteria (reaching the maximum number of iterations or where the calculated objective function is below a ε value equal to 10 −15 ).
We create options of the GA algorithm using the global optimization toolbox in MATLAB ® and created the random first population with a 64-bit multiplicative lagged Fibonacci generator [46]. The lower bound and upper bound values range between 1 ≤ X i ≤ (k i − d i ) for the n values of X i . Note that the potential values of each consumption node depend on the duration 1xn integer vector described in Section 2.4. The positive integer specifying how many individuals in the current generation survive to the next generation is equal to 15 (Elite count), the fraction of the population at the next generation, not including elite children, that the crossover function creates is equal to 0.8 (recommended value by the software). Migration options specify how individuals move between subpopulations, we set migration direction to Both ('both'), as the nth subpopulation migrates into both the (n − 1)th and the (n + 1)th subpopulation. The migration factor specifies how many individuals move between subpopulations, and we set this number to 0.2, this means that for example, if individuals migrate from a subpopulation of 50 individuals into a subpopulation of 100 individuals, the number of individuals that migrate is 0.2 × 50 = 10. The maximum iterations before the algorithm halts are 2 × 10 5 . The result of the optimization problem is a 1 × n integer vector which minimizes the objective function (Equation (4)).

The Process to Balance the Irrigation Network
The general flowchart of this method visualizes the process ( Figure 2). We describe it here: Step 1: It shows the input hydraulic data required (illustrated in Section 2.1).
Step 2: We should incorporate the values of the upper and lower threshold flow rates for the irrigation pressurized network if know these figures or to calculate them from the model (Section 2.2.1). We do the water and energy audit calculations (Section 2.2.2). Later, we calculate the carbon CO 2 emissions (Section 2.2.3).
Step 3: With the water consumption and the lower threshold flow rate, we calculate the new total irrigation time at a constant flow rate (Equation (3)). Then, the GA algorithm (Section 2.5) minimizes the objective function (defined in Section 2.3), changing the starting irrigation time of every consumption node (Section 2.4).
Step 4: The result of the GA algorithm returns the best value of the optimization parameters. Then, we reduce the number of hours that the pumps are working; we calculate the water and energy audit, and we calculate the emissions. We can now calculate the savings reached by our method. Water 2020, 12, x FOR PEER REVIEW 7 of 16 Figure 2. Workflow for the process to balance the irrigation network.

Case Study
To explain this procedure, we analyze the programmed sprinkling device used for watering the garden of the University of Alicante, SE Spain (38°23′4.06" N, 0°30′44.06" W; Figure 1), (Figure 3; Case 0). The irrigation zone of this garden has grown through time, and the gardeners have included new species to the grass meadow (i.e., Festuca arundinacea and Poa annua). We divided the plot into hydro-zones grouped corresponding to the landscape coefficient method depending on water needs and crop evapotranspiration values. For the months of greatest water need, overall water needs are 1.7 and 3.9 L·mm −2 ·day −1 , comparable to the water use of the least and most exposed areas of the garden.
We supply the water into the irrigation pressurized network by the reservoir (lake near the University) although the irrigation network allows taking it from the drinking WPN in San Vicente del Raspeig.
The full scheme comprises a reservoir, a pumping house, (a water treatment plant is downstream of the lake) and the water irrigation piping network ( Figure 3). We spread the latter over an area of 0.67 Km 2 and consist of two parts: one dating back to the first part of the University and the second one built later. The network is mixed mesh and the pipe materials are fiber cement and PVC. The network contains 23 km of pipes (891 pipes whose diameter varies among 1"-8") (Hazen-Williams roughness coefficients equal to 100) supplying water to some 160 consumption nodes We provide each consumption node with an electro valve that controls when to irrigate (valve opened) each plot or when not to irrigate (valve closed). The maximum and minimum base demands consumption is 0.83 L/s and 25.97 L/s. Opening and closing times are the optimization criterion in our approach. The irrigation network is notably flat, the difference in height between the highest and lowest elevation is 93 − 90 = 3 m.
The irrigation network is equipped with a pumping station consisting of 4 pumps working in parallel. The specific model of the pump is "EVM 32 2-0F5/4.0" of the "Ebara" company [47]

Case Study
To explain this procedure, we analyze the programmed sprinkling device used for watering the garden of the University of Alicante, SE Spain (38 • 23 4.06" N, 0 • 30 44.06" W; Figure 1), (Figure 3; Case 0). The irrigation zone of this garden has grown through time, and the gardeners have included new species to the grass meadow (i.e., Festuca arundinacea and Poa annua). We divided the plot into hydro-zones grouped corresponding to the landscape coefficient method depending on water needs and crop evapotranspiration values. For the months of greatest water need, overall water needs are 1.7 and 3.9 L·mm −2 ·day −1 , comparable to the water use of the least and most exposed areas of the garden.
We supply the water into the irrigation pressurized network by the reservoir (lake near the University) although the irrigation network allows taking it from the drinking WPN in San Vicente del Raspeig.
The full scheme comprises a reservoir, a pumping house, (a water treatment plant is downstream of the lake) and the water irrigation piping network ( Figure 3). We spread the latter over an area of 0.67 Km 2 and consist of two parts: one dating back to the first part of the University and the second one built later. The network is mixed mesh and the pipe materials are fiber cement and PVC. The network contains 23 km of pipes (891 pipes whose diameter varies among 1"-8") (Hazen-Williams roughness coefficients equal to 100) supplying water to some 160 consumption nodes We provide each consumption node with an electro valve that controls when to irrigate (valve opened) each plot or when not to irrigate (valve closed). The maximum and minimum base demands consumption is 0.83 L/s and 25.97 L/s. Opening and closing times are the optimization criterion in our approach. The irrigation network is notably flat, the difference in height between the highest and lowest elevation is 93 − 90 = 3 m.
The irrigation network is equipped with a pumping station consisting of 4 pumps working in parallel. The specific model of the pump is "EVM 32 2-0F5/4.0" of the "Ebara" company [47], a vertical multistage electric pump in cast iron, The pump curve is H = −0.2163Q 2 + 0.3509Q + 44.713. The pump efficiency is η = 0.75 for simplicity, the power is equal to 4 kW and the nominal flowrate is equal to 540 L/min, being their corresponding head equal to 26.5 m. The duration of the extended period simulation is 72 h (as this period represents the irrigation time). The gardeners repeat this pattern twice per week (Figure 4). The pattern time step represents the time interval after which, a change in time patterns is produced we set pattern time step to 15 min in this case study, a value which allows flexibility through the management and operation of the irrigation network. To get real values of the demand pattern multipliers coefficients; we set the hydraulic time step to 5 min. The 72-h demand multiplier patterns are used to represent the relative temporal demand variations, being 1 for opened valves and 0 if locked.
The technicians and gardeners selected the irrigation management plan on rotation scheduled delivery [33]. They grouped electro valves in irrigation segments operating remote-controlled.  The duration of the extended period simulation is 72 h (as this period represents the irrigation time). The gardeners repeat this pattern twice per week (Figure 4). The pattern time step represents the time interval after which, a change in time patterns is produced we set pattern time step to 15 min in this case study, a value which allows flexibility through the management and operation of the irrigation network. To get real values of the demand pattern multipliers coefficients; we set the hydraulic time step to 5 min. The 72-h demand multiplier patterns are used to represent the relative temporal demand variations, being 1 for opened valves and 0 if locked.
The technicians and gardeners selected the irrigation management plan on rotation scheduled delivery [33]. They grouped electro valves in irrigation segments operating remote-controlled. The duration of the extended period simulation is 72 h (as this period represents the irrigation time). The gardeners repeat this pattern twice per week (Figure 4). The pattern time step represents the time interval after which, a change in time patterns is produced we set pattern time step to 15 min in this case study, a value which allows flexibility through the management and operation of the irrigation network. To get real values of the demand pattern multipliers coefficients; we set the hydraulic time step to 5 min. The 72-h demand multiplier patterns are used to represent the relative temporal demand variations, being 1 for opened valves and 0 if locked.
The technicians and gardeners selected the irrigation management plan on rotation scheduled delivery [33]. They grouped electro valves in irrigation segments operating remote-controlled.

Injected Flow into the System for the UA Irrigation Network
The analysis shows that the flow injected is divided into 2 blocks (Figure 5), the first concerns the volume of water delivered from 19:00 h on the first day (Sunday or Wednesday) to 8:00 h on the second day (Monday or Thursday) with an interval at 6:45 a.m. just 15 min. The second concerns the volume of water delivered from 19:00 h on (Monday or Thursday) and ends at 6:30 h on (Tuesday or Friday).

Lower Network Flowrate Threshold
To test the relationship between the smallest pressure and inlet flow, we worked out 15,000 simulations ( Figure 5). In each of the simulations, we open several hydrants and subunits. The inlet flow rates then followed differs from 0 to 50 L/s (the number of expenditure nodes opened reaching from one to 160). The lower network flow rate threshold is 28.57 L/s (the smallest flow rate that may encompass at least pressure below 25 MWC, marked in black in Figure 6) and the upper network flow rate threshold is 51.37 L/s (the greatest flow rate for which we can maintain pressure specifications). We have performed the 15,000 simulations using random consumption values for the irrigation pressurized network. We consider the potential risk of combining several valves opening involving pressures below the required by standards P

Injected Flow into the System for the UA Irrigation Network
The analysis shows that the flow injected is divided into 2 blocks (Figure 5), the first concerns the volume of water delivered from 19:00 h on the first day (Sunday or Wednesday) to 8:00 h on the second day (Monday or Thursday) with an interval at 6:45 a.m. just 15 min. The second concerns the volume of water delivered from 19:00 h on (Monday or Thursday) and ends at 6:30 h on (Tuesday or Friday).

Lower Network Flowrate Threshold
To test the relationship between the smallest pressure and inlet flow, we worked out 15,000 simulations ( Figure 5). In each of the simulations, we open several hydrants and subunits. The inlet flow rates then followed differs from 0 to 50 L/s (the number of expenditure nodes opened reaching from one to 160). The lower network flow rate threshold is 28.57 L/s (the smallest flow rate that may encompass at least pressure below 25 MWC, marked in black in Figure 6) and the upper network flow rate threshold is 51.37 L/s (the greatest flow rate for which we can maintain pressure specifications). We have performed the 15,000 simulations using random consumption values for the irrigation pressurized network. We consider the potential risk of combining several valves opening  The lower network flow rate threshold is a value in which utility managers know that the irrigation pressure network will work meeting the pressure standards (as observed after performing the previous simulations, Figure 5). We get the best energy efficiency combination in the upper network flow rate as we supply higher flow rates. Should we have chosen an alternative with the more injected flow? If we had, these combinations (injected flow rates equal to 51.37 L/s) we get no certainty that we meet the service standards. As the lowest threshold gains a very important role, we calculate the probability of meeting pressure requirements for the injected flow rate. We group the injected flow rates in a 2 L/s range, we will get the successful simulations performed per every group (Table 1). The lower network flow rate threshold is a value in which utility managers know that the irrigation pressure network will work meeting the pressure standards (as observed after performing the previous simulations, Figure 5). We get the best energy efficiency combination in the upper network flow rate as we supply higher flow rates. Should we have chosen an alternative with the more injected flow? If we had, these combinations (injected flow rates equal to 51.37 L/s) we get no certainty that we meet the service standards. As the lowest threshold gains a very important role, we calculate the probability of meeting pressure requirements for the injected flow rate. We group the injected flow rates in a 2 L/s range, we will get the successful simulations performed per every group (Table 1).
In the flow rates among 25.56 L/s and 51.37 L/s, we found 1550 simulations, 1100 of them successful. We may get the probability of meeting pressure conditions if we combine flow with the 450 unsuccessful simulations. If the flow rate is above 28.57 L/s, the probability of not matching the pressure standards is 1/450 (or 1 − 1/450 = 99.77% of matching), and later the flow rate is above 3408 L/s (the second combination under pressure standard) the probability of not meeting the standards is 2/450 (or 1 − 2/450 = 99.55% of meeting them). Extrapolating this, we identify the relationship between probability and flow rate ( Figure 6).  In the flow rates among 25.56 L/s and 51.37 L/s, we found 1550 simulations, 1100 of them successful. We may get the probability of meeting pressure conditions if we combine flow with the 450 unsuccessful simulations. If the flow rate is above 28.57 L/s, the probability of not matching the pressure standards is 1/450 (or 1 − 1/450 = 99.77% of matching), and later the flow rate is above 3408 L/s (the second combination under pressure standard) the probability of not meeting the standards is 2/450 (or 1 − 2/450 = 99.55% of meeting them). Extrapolating this, we identify the relationship between probability and flow rate ( Figure 6). In this new scheme, three pumps are running in parallel providing 9.52 L/s with each one (values very close to its best efficiency point, 9 L/s). We have installed a variable-frequency drive to control the head added to the flow and optimized its speed (once the flow rates are constant) for a value equal to α = 0.7 (a value which allows the pump to satisfy the requested flow rate) reducing the excess of pressure. In this new scheme, three pumps are running in parallel providing 9.52 L/s with each one (values very close to its best efficiency point, 9 L/s). We have installed a variable-frequency drive to control the head added to the flow and optimized its speed (once the flow rates are constant) for a value equal to α = 0.7 (a value which allows the pump to satisfy the requested flow rate) reducing the excess of pressure.

New Model of the Irrigation Pressurized Network
There are 160 consumption nodes in the UA irrigation network, n = 160. Being the maximum water demand equal to 861.94 L/s (all hydrants opened). The irrigation duration of the nodes varies from 15 min to 8 × 15 = 2 h.
We can calculate the intervals of time (k i ) required to supply injected volume V inj (t) = 1539.85 m 3 , as a constant flow Q low,th = 28.57 L/s (Section 4.3) (a value that complies with the pressure conditions) with Equation (6). Being the new simulation time equal to t * p = k i · ∆t k = 900 min = 15 h. With this information, we know that the values of the result provided are integers from 1 to k i − d i . For example, the two first consumption nodes are n8 and n9 and their irrigation duration is equal to 2 and 4 ∆t k minutes (d 1 · ∆t k = 30 and 60 min). The irrigation starts time X 1 and X 2 may be any integer oscillating from 1 to k i − d i . In other words, X 1 and X 2 may be any integer ranging from 1 to 60 − 2 = 58 or from 1 to 56.
The solution of the optimization problem returns the least RSME value equal to 1.8643. Discrepancies among the objective and calculated values are depicted in Figure 7.
There are 160 consumption nodes in the UA irrigation network, n = 160. Being the maximum water demand equal to 861.94 L/s (all hydrants opened). The irrigation duration of the nodes varies from 15 min to 8 × 15 = 2 h.
We can calculate the intervals of time ( ) required to supply injected volume

Energy Audit of the UA Irrigation Network Case 0 and Case I
UAEnergy [40] is a software that calculates the energy audit of a pressurized water network (Section 2.2.3). We get this from the energy equation in integral form, and its time integration

Energy Audit of the UA Irrigation Network Case 0 and Case I
UAEnergy [40] is a software that calculates the energy audit of a pressurized water network (Section 2.2.3). We get this from the energy equation in integral form, and its time integration extended over a period (day, month or year). We calculate this energy audit for the current case and the new model generated by the GA algorithm (Table 2).
Being E N the energy supplied by reservoirs and E P the energy supplied by pumps. These two terms represent the input energy into the PIN, a value that is equal to the sum of energy delivered to the users (E U ) and the energy dissipated in friction at pipes (E F ). The greatest part of the energy spent in our case study comes from the reservoir (lake) as we are studying the water pressurized network management which gathers water from the lake. We are not debating the energy footprint of water (got by a desalination plant in the University of Alicante).

Environmental Calculations
We calculated CO 2 emissions (tons) in the pump's operation (Table 3). According to each country energy mix, we can calculate the emissions savings. The energy mix in Spain is oil-fired, 31.8%, natural gas, 13.5%; coal-fired 21.0%; nuclear and renewables 33.7% for the year 2017 [48]. The energy consumed is 191.54 and 61.77 kWh for case 0 and I (the pump efficiency equal to 0.75 is considered here). The CO 2 emissions are computed in Table 2. In the calculations performed, note that we irrigate in these 72 h, which is the half of the water required weekly.

Discussion
The average water consumption is 3077.74 m 3 ·week −1 for both cases. The results bear no surprise if we get a constant flow injected into the irrigation network; we reduce energy consumption and the number of hours the pumps are running. Table 2 shows we somewhat increase friction (35.05 − 31.88 = 3.17 kWh), but we also get energy consumed by pumps savings (143.66 − 46.32 = 101.34 kWh). We reduce the surplus of pressure at irrigation plots as we deliver water close to the minimum threshold pressure, but always above this limit. This energy savings means 10,336.68 kWh/year. And 8.80 tons of CO 2 /year not emitted to the atmosphere.
The pumping hours in Case 0 are 24, 22.5, 11.5 and 7, while Case I, three pumps work for 15 h and 15 min each, being one pump turned off for the entire day (reserved for managerial purposes). In case I we save 29 h and 15 min which means 2983.5 h per year. In case 0, we need 0.093 kWh/m 3 (a common value for surface water in urban WPN; 0.058 kWh/m 3 [49]) and this value decreases up to 0.028 kWh/m 3 in Case I, saving 0.065 kWh/m 3 . We can consider this irrigation network as flat (as before mentioned) and the 80.4% of the energy comes natural energy (or only 19.6% comes from pumping devices). These energy savings must be more relevant in hilly irrigation networks directly supplied by pumps.
In this approach, we were particularly conservative for selecting the aim injected flow (28.57/s with a 99.91% percentage of success (Table 1). Higher energy saving could have been taken with greater risk (i.e., if the injected flow were 38 L/s, the risk of not meeting pressure requirements were 100 − 95.51 = 4.49%).
One limitation of our research is that irrigation time in our PIN should be proportional to the pattern time step in the model. For example, if the pattern time step is 15 min, we can irrigate a plot for 15, 30, 45 min, etc. Authors appreciate that if the pattern time step is one minute, we may get any irrigation time, but the procedure complicates. We make the irrigation data vector as an integer 1 × n vector (being n the number of consumption nodes in the irrigation net). This is the time that every consumption junction is open (and feeding the plots). In our problem, once the electro valve or hydrant is open, we supply the demanded water in this plot; we do not irrigate this demand in two periods of time.
Another condition is that to deal with water and energy demand, the schedule must be rigid rotation delivery (where the irrigation time each hydrant is not flexible) [50].

Future Developments
We submitted a proposal to the Ministry of Spain in his last call, "Knowledge generation and scientific and technological strengthening of the R&D&i system". This project comprises assembling a pilot plant of a standalone PV pressurized irrigation network, where we can handle the energy demand. We wait to build a graphical user interface (GUI) to decide the objective energy demand, providing them to pick if they want stable injected flow (as represented in this text) or a parabolic energy demand (same than the energy generated in PV arrays). The second will minimize the number of PV panels needed.

Conclusions
Utility managers, technicians and gardeners can change water and energy demand in pressurized irrigation networks (different from urban WPN, where water demands depend on final users). They can deliver water to crops at every hour of the day. With this premise, we adjust the irrigation time for every consumption node getting relevant energy savings (lower energy consumption in pumping devices).
We must calculate the constant flow rate meeting standard need (lower threshold flowrate which keeps pressure above the threshold; 25 MWC) and the total duration of the recent simulation period (Figure 1). Both values must achieve the same volume delivered to crops as in the current state to allow comparison. To reach this objective, we proposed an objective function (the RMSE) which assesses the variations between the target flowrate and the real injected flow. We optimize an integer constrained vector considering this as an optimization problem with a GA included in a programming software as MATLAB ® . The GA detects the moment where we must open and/or close valves to minimize energy use.
This approach was tested in the pressurized irrigation network in San Vicente Campus, University of Alicante (southeast Spain). It resulted in 10.4 MWh, nine tons of CO 2 and 3000 pumping hours saved per year in a flat PIN (not the most favorable scenario). We can save 0.065 kWh/m 3 without no economic investments. This procedure must be the first step of a protocol to assess energy requirements. This method can help local water management authorities in the decision-making process and tasks related to water and energy demand. Funding: This research was conducted within the projects GRE-16-08 and GRE17-12 coordinated by the University of Alicante. Antonio Jodar-Abellan acknowledges financial support received from the Spanish FPU scholarship for the training of university teachers. In the same way, this work was funded partially by the Cátedra del Agua of the University of Alicante and the Diputación Provincial de Alicante (https://catedradelaguaua.org/).