Pump schedules optimisation with pressure aspects in complex large-scale water distribution systems

This paper considers optimisation of pump and valve schedules in complex large-scale water distribution networks (WDN), taking into account pressure aspects such as minimum service pressure and pressuredependent leakage. An optimisation model is automatically generated in the GAMS language from a hydraulic model in the EPANET format and from additional files describing operational constraints, electricity tariffs and pump station configurations. The paper describes in details how each hydraulic component is modelled. To reduce the size of the optimisation problem the full hydraulic model is simplified using module reduction algorithm, while retaining the nonlinear characteristics of the model. Subsequently, a nonlinear programming solver CONOPT is used to solve the optimisation model, which is in the form of Nonlinear Programming with Discontinuous Derivatives (DNLP). The results produced by CONOPT are processed further by heuristic algorithms to generate integer solution. The proposed approached was tested on a large-scale WDN model provided in the EPANET format. The considered WDN included complex structures and interactions between pump stations. Solving of several scenarios considering different horizons, time steps, operational constraints, demand levels and topological changes demonstrated ability of the approach to automatically generate and solve optimisation problems for a variety of requirements.


Introduction
Water distribution networks (WDN), despite operational improvements introduced over the last 10-20 yr, still lose a considerable amount of potable water from their networks due to leakage, whilst using a significant amount of energy for water treatment and pumping.Reduction of leakage, hence savings of clean water, can be achieved by introducing pressure control algorithms, see e.g.Ulanicki et al. (2000).Amount of energy used for pumping can be decreased through optimisation of pumps operation.Optimisation of pumping and pressure control are traditionally studied separately; in water companies pump operation and leakage management are often considered by separate teams.
Modern pumps are often equipped with variable speed drives; hence, the pump outlet pressure could be controlled by manipulating pump speed.If there are pumps upstream from a pressure reducing valve (PRV) without any intermediate tank, the PRV inlet pressure could be reduced by adjusting pumping in the upstream part of the network.Further-more, taking into account the presence of pressure-dependent leakage whilst optimising pumps operation may influence the obtained schedules.Therefore, for some WDNs it is beneficial to consider pump operation optimisation in conjunction with pressure control.However, even pump operation optimisation on its own is not an easy task due to significant complexity and inherent non-linearity of WDNs, as well as due to number of operational constraints and interactions between different network elements.For example, in our past studies (Skworcow et al., 2009a) the obtained optimal pumping schedules were not intuitive; whilst the tank levels were far from their limits, some pumps did not operate at their maximum capacity during the cheapest tariff, instead they also operated (albeit at significantly lower speed) during the most expensive tariff.Closer examination revealed that further increase of pumping in the cheapest tariff period and reduction of pumping during the more expensive tariff would in fact increase the overall cost, due to pumps operating further from their peak efficiency.Furthermore, as highlighted P. Skworcow et al.: Pump schedules optimisation in Bunn and Reynolds (2009) pumps usually do not operate in isolation; it is typical that any change in the operating duty of one pump may affect the suction or discharge pressure of other pumps in the same system.Some authors consider optimisation of pump operation as a part of the network design, but the considered case studies are rather small; see e.g.Farmani et al. (2006) and Geem (2009).This paper focuses on optimisation of pump operation in an existing water network.Optimised pump control strategies can be based either on time schedules, see e.g.Ulanicki et al. (2007), or on feedback rules calculated offline, see e.g.Abdelmeguid and Ulanicki (2010).In this paper time schedules approach is considered.The majority of WDN optimisation approaches reported in the literature use a hydraulic simulator or simplified mass-balance models as a key element of their optimisation process and usually consider small scale water distribution systems as case studies, see e.g.Fiorelli et al. (2012) and Lopez-Ibanez et al. (2008).Commercial optimisation packages such as BalanceNet from Innovyze (2013) are able to suggest improvements in operation of complex large-scale WDN, but they typically use mass balance models.
The operational scheduling problem when considering in its full complexity is non-linear and mixed integer and for large scale systems requires huge computational resources.Known approaches try to obtain a suboptimal solution by using simplifying assumptions.Evolutionary algorithms are the most generic search methods and they work efficiently if a simulator of the considered system is available.The simulator can be called tens of thousands of times during the search and in order to reduce the calculation time simplified simulation models are employed, such approach was used for instance by Salomons et al. (2007) and is used by Darwin Scheduler from Bentley Systems (2014).The approach presented by Derceto Aquadapt from Derceto (2014) relies on preparing a highly specialised model of the considered system which is solved using linear and non-linear programming combined with advanced heuristics, the technical details about the algorithm are not available in the literature.To overcome problems with the non-linearity of the hydraulic model Price and Ostfeld (2013) proposed the iterative linearisation procedure, the approach is quite efficient but it solves only continuous version of the optimisation problem in the current formulation.Additional complexity is added to the scheduling problem when the maximum demand charge is considered, this requires the optimisation problem to be formulated over a long time horizon typically 1 month and application of stochastic methods as illustrated in McCormick and Powell (2003).
The approach presented in this paper uses a hydraulic model in the EPANET format as an input, but does not require the EPANET simulator to produce a hydraulically feasible solution.Instead, hydraulic characteristics of the WDN are formulated within the optimisation model itself.Such inclusion of hydraulic characteristics allows taking into ac-count pressure dependent leakage and subsequently including the leakage term in the cost function, thus minimising energy usage and water losses simultaneously.The optimisation model can be automatically adapted to structural changes in the network, such as isolation of part of the network due to pipe burst or installation of additional pumping station, as well as to operational constraints changes, such as allowing lower minimum tank level or higher maximum pump speed.Furthermore, the optimisation model can be generated and solved automatically for different time horizons and different time steps.
The remainder of this paper is structured as follows.Section 2 describes the overall methodology and the developed software.In Sects. 3 and 4 details about obtaining and solving the optimisation model are given.Section 5 describes application of the methodology to a complex large-scale WDN.Finally, conclusions are provided in Sect.6.

Methodology
The proposed method is based on formulating and solving an optimisation problem, similarly to Skworcow et al. (2009bSkworcow et al. ( , 2010)).However, in this paper the considered network is of significantly higher complexity compared to our previous work, which required some changes to the modelling approach when the optimisation model is formulated, and resulted in a more general method applicable to a wider range of WDNs.
The method involves utilisation of a hydraulic model of the network with pressure dependent leakage and inclusion of a simplified PRV model with the PRV set-points included in a set of decision variables.The cost function represents the total cost of water treatment and pumping.Figure 1 illustrates that with such approach an excessive pumping contributes to a high total cost in two ways.Firstly, it leads to high energy usage.Secondly, it induces high pressure, hence increased leakage, which means that more water needs to be pumped and taken from sources.Therefore, the optimizer attempts to reduce both energy usage and leakage by minimising the total cost.
An optimisation model is automatically obtained from a hydraulic model in the EPANET format and from additional files describing operational constraints, electricity tariffs and pump station configurations.In order to reduce the size of the optimisation problem the full hydraulic model is simplified using module reduction algorithm.In the simplified model all reservoirs and all control elements, such as pumps and valves, remain unchanged, but the number of pipes and nodes is significantly reduced.It should be noted that the connections (pipes) generated by the module reduction algorithm may not represent actual physical pipes.However, parameters of these connections are computed such that the simplified and full models are equivalent mathematically.Details about the model reduction algorithm are given in Paluszczyszyn et al. (2013) and Alzamora et al. (2014).
Some decision variables of the considered optimisation problem are continuous (e.g.water production, pump speed, valve opening) and some are integer (e.g.number of pumps switched on).Problems containing both continuous and integer variables are called mixed-integer problems and are hard to solve numerically, particularly when the problem is also non-linear.Continuous relaxation of integer variables (e.g.allowing 2.5 pumps switched on) enables network scheduling to be treated initially as a continuous optimisation problem solved by a non-linear programming algorithm.Subsequently, the continuous solution can be transformed into an integer solution by manual post-processing, or by further optimisation.For example, the result "2.5 pumps switched on" can be realised by a combination of 2 and 3 pumps switched over the time step.Note that an experienced network operator is able to manually transform continuous pump schedules into equivalent discrete schedules.In this work the main focus is on obtaining the continuous schedules; however, two simple schedules discretisation approaches are also presented in Sect.4, one fully-automatic and one interactive.

Implementation
The main software module has been implemented in C# and .NET 4.0.Using a simplified hydraulic model of network in the EPANET format and additional files the optimisation problem is automatically generated by the main software module in a mathematical modelling language called GAMS (Brooke et al., 1998).Subsequently, a non-linear programming solver called CONOPT is called to calculate a continuous optimisation solution.An optimal solution is then fed back from CONOPT into the main software module for analysis and/or further processing and/or export of the results.Specific details of the software functions are as follows: 1. Loads input files required to formulate the optimisation problem (details are given below).
2. Validates the model, i.e. ensures that e.g.: no control rules are associated with pumps or pipes, pressure at leakage nodes is positive, tanks are not emptying or overflowing.
4. Handles manipulation of the EPANET model which is required to: (i) use initial schedules (if required) from external time-series files, (ii) manipulate schedules for the purpose of interactive discretisation described in Sect.4, (iii) produce EPANET file with optimal pump and valve schedules.Note that due to EPANET limitations (Rossman, 2000) valve schedules are implemented as time-based control rules.
5. Handles manipulation of xls files for the purpose of interactive discretisation.
6. Produces time-series files with optimal pump and valve schedules and the resulting tank level trajectories.
Complete information of the WDN and other data required to formulate the optimisation problem is obtained from the following sources: 1. EPANET input file (inp format), 2. EPANET binary simulation results file (bin format) produced by calling the simulator, 3. time-series files (csv format) describing initial schedules; when the scheduler is employed in an on-line receding-horizon environment (Skworcow et al., 2010), the schedules from the previous time step can be used as an initial condition for the current time step, 4. electricity tariffs (csv format),

configuration files (txt format) describing the following:
-lengths of time step and optimisation horizon, -configuration of pump stations: (i) fixed or variable speed, (ii) which pump in EPANET belongs to which pump station, (iii) hydraulic curve and power curve coefficients, (iv) constraints: min.and max.number of pumps switched on, min.and max.speed, max.flow, -min.and max.flow in pipes and valves, -min.and max.pressure at connection nodes, -tank level constraints (which are not necessarily equal to the physical limits described in the EPANET model) and inflow/outflow constraints.

Water distribution network scheduling: continuous optimisation
In this section details on formulating and solving a continuous optimisation problem are given.Initial conditions for all variables (flows, pressures etc.) are obtained directly from the EPANET output file from which the network structure was loaded.The optimisation problem has the following three elements, which are described in details in the following subsections: (i) hydraulic model of the network, (ii) objective function, (iii) constraints.The problem is expressed in discrete time with k denoting time step.

Modelling of WDN for optimisation in GAMS
Each network component has a hydraulic equation.Tanks and pump stations are represented by standard models see e.g.Brdys and Ulanicki (1994) and pipes are represented by the Hazen-Williams formula.A pump station model requires also an additional hydraulic equation and an electrical power characteristic equation.For valves simplified equations are used; details concerning pumps and valves modelling are given below.

Connection nodes
For connection nodes, mass-balance equation is employed; however, since leakage is assumed to be at connection nodes, the standard mass balance equation is modified to include the leakage term: where c is a node branch incidence matrix, q is a vector of branch flows, d c denotes a vector of demands and l c denotes a vector of leakages calculated as: with p denoting a vector of node pressures, α denoting a leakage exponent and κ denoting a vector of leakage coefficients, see Ulanicki et al. (2000) for details.Note that in the GAMS implementation the variables describing pressure at nodes with non-zero leakage coefficient κ are constrained to be positive, whilst the leakage term in Eq. ( 1) is zero for nodes with zero leakage coefficient κ.

Pump stations
It is assumed that all pumps in any pump station have the same characteristics as in Brdys and Ulanicki (1994).In addition to the standard hydraulic equation which forces the pump station to operate along its head-flow curve the following equation for each pump station is added: where h denotes head increase between inlet and outlet and u denotes number of pumps switched on.
When some pump stations are connected in series without intermediate tanks and/or have by-passes with check-valves (see example in Fig. 2), Eq. (3) prevents a pump station from operating at negative head increase when it is switched on.However, at the same time Eq.(3) allows negative head increase between the pump station inlet and outlet nodes when it is off and the water flows through the by-pass.Note that for networks with pump stations connected in series, if Eq. ( 3) was not present in the optimisation model, a negative head increase could potentially occur even for a pump station being turned on.This could happen due to the solver choosing to produce a large head increase on the upstream pump station and a negative head increase on the upstream pump station, such that the total head increase (from both pump stations) would still satisfy other constraints and equations.Consequently, Eq. ( 3) is required for networks with pump stations connected in series to ensure physical feasibility of the solution.
To model electricity usage, instead of using a pump efficiency equation a direct modelling of pump station power is employed, as discussed in Ulanicki et al. (2008).However, the equation is rearranged to allow zero pumps switched on, without introducing if-else formulas: where E, F, G, H are power coefficients constant for a given pump station, q is flow, P is consumed power, s is speed normalised to a nominal speed for which the pump hydraulic curve was obtained.Additionally it is imposed for all pump stations that P (k) ≥ 0, so when all pumps in a given pump station are switched off (i.e.u(k) = 0) the solver (due to minimising the cost) assigns P (k) = 0 for this pump station.Finally, since the coefficients E and F are small compared to G and H , to make a large-scale model easier to solve it is assumed that E = 0 and F = 0, i.e. the consumed power depends linearly on the pump station flow.

Valves
There are different types of valves in WDN that can be controlled remotely and/or according to a time-schedule; for some, valve opening is controlled directly, while for others pressure drop or flow across the valve is controlled.In the approach proposed in this paper all controllable valves are assumed to be PRVs (control variable is PRV outlet pressure) or FCV (control variable is valve flow).Actual implementation of the control variables in the physical WDN depends on valve construction and is not considered here.Since head-loss across the valve can be regulated for both FCV and PRV and their direction of flow is known, to reduce the nonlinearity of the model it is proposed to express both FCV and PRV as two simple inequalities: with the difference between both valve types being their control variables: flow for FCV and outlet pressure for PRV.Consequently, valve flow is defined by other network elements and the mass-balance equation.Check-valves (non-return valves) are described by the following equation: where R is a constant valve resistance.Such formulation ensures that valve head-loss is positive if and only if valve flow is greater than zero; when the flow is zero (i.e.check valve closed) the head-loss can take any negative value, i.e. inlet and outlet pressures are defined by other network elements.Note that in the Hazen-Williams formula | h| 0.54 is used, while here to reduce the nonlinearity of the model it is proposed to use | h|.The justification for such simplification is that head-loss across an open check-valve is relatively small compared to head-loss in other elements, hence such simplification has negligible effects on obtained results.To avoid unnecessary discontinuities, the term sign ( h) in Eq. ( 6) is actually implemented as:

Objective function
The objective function to be minimised is the total energy cost for water treatment and pumping.Pumping cost depends on the consumed power and the electricity tariff over the pumping duration.The tariff is usually a function of time with cheaper and more expensive periods.For given time step τ c , the objective function considered over a given time horizon k 0 , k f is described by the following equation: here J p is the set of indices for pump stations and J s is the set of indices for treatment works.The function γ j p (k) represents the electricity tariff.The treatment cost for each treatment works is proportional to the flow output with the timedependent unit price of γ j s (k).The term P j represents the electrical power consumed by pump station j and is calculated according to Eq. (4).

Operational constraints
In addition to constraints described by the hydraulic model equations defined above, operational constraints are applied to keep the system-state within its feasible range.Practical requirements are translated from the linguistic statements into mathematical inequalities.The typical requirements of network scheduling are concerned with tank levels in order to prevent emptying or overflowing, and to maintain adequate storage for emergency purposes: Similar constraints must be applied to the heads at critical connection nodes in order to maintain required pressures throughout the water network.Another important constraint is on the final water level of tanks, such that the final level is not smaller than the initial level; without such constraint least-cost optimisation would result in emptying of tanks.
The control variables such as the number of pumps switched on in each pump station, pump speeds or valve flow, are also constrained by lower and upper constraints determined by the features of the control components.It is evident from the above equations that the overall optimisation model is nonlinear.Furthermore, GAMS recognizes that the model is non-smooth due to the term | h| in Eq. ( 7).Hence, the overall optimisation model is of the form Nonlinear Programming with Discontinuous Derivatives (DNLP).

Discretisation of continuous schedules
The main focus of this paper is on the continuous optimisation, hence only two simple discretisation approaches are discussed: (i) a fully-automatic discretisation algorithm which does not rely on the EPANET simulation engine but uses GAMS and simple heuristics, and (ii) an interactive discretisation which uses EPANET simulation engine.Both approaches assume that the discretisation time step length is shorter than the continuous optimisation time step length, so for example continuous "2.5 pump switched on for 2 h", can be discretised as "3 pumps on for 1 h and then 2 pumps on for another hour".

Automatic discretisation
The algorithms progresses through the following steps: 1. Load continuous optimisation results produced by GAMS/CONOPT.
2. For each pump station round the continuous pump control (i.e. the number of pumps switched on) to an integer number, while calculating an accumulated rounding error at each time step.The accumulated rounding error is used at subsequent time steps to decide whether the number of pumps switched on should be rounded up or down, using user-defined thresholds.
3. Generate a new GAMS code where the number of pumps switched on for each pump station and at each time step are fixed, i.e. as calculated in step 2. Initial conditions for all flows and pressures in the network are as calculated by GAMS/CONOPT during the continuous optimisation.Note that in this GAMS code the number of pumps switched on for each pump station and at each time step are no longer decision variables but forced parameters.However, the solver (CONOPT) can still change pump speed and can adjust valve flow to match the integer number of pumps switched on.The cost function to be minimised and the constraints are the same as in the continuous optimisation.
4. Call GAMS/CONOPT and subsequently load the results of integer optimised solution.
5. During the continuous optimisation, pump station flow can be zero only when all pumps in this station are off.However, in the integer optimisation over a long time horizon it may happen that pump station control is forced to have e.g. 1 pump switched on during a particular time step, but this pump is unable to deliver the required head at that time step, hence the pump flow is zero.If such event occurs, the above steps 3 and 4 are repeated, but at the time steps when the resulting pump station flow was zero, the number of pumps switched on is forced to be zero.

Interactive discretisation
The interactive discretisation approach involves the use of the EPANET simulation engine and a spreadsheet software.
The role of the user is to manipulate the discrete schedules initially proposed by the scheduler, by modifying at which time steps the number of pumps switched on is rounded up or down.For networks with flow control valves (FCV) diverting the flow from one pump station into multiple branches, the user may also need to modify the FCV control to match the modified discrete pump schedule.For example, if the continuous pump control at a particular time step is 2.5 pump switched on for 2 h, and it is discretised as 3 pumps on for 1 h and then 2 pumps on for another hour, then the required FCV flow which was calculated during the continuous optimisation needs to be modified to account for increased flow during the first hour and decreased flow during the second hour.The interactive discretisation process progresses iteratively through the following steps, note that the points 1 and 2 in both automatic and interactive discretisation are the same: 1. Load continuous optimisation results produced by GAMS/CONOPT.
2. For each pump station round the continuous pump control (i.e. the number of pumps switched on) to an integer number, thus generating initial discrete schedules.
3. Automatically update the EPANET model with new discrete schedules, simulate the model and retrieve the hydraulic results.
4. Automatically generate an xls file with continuous and discrete schedules, hydraulic results and costs.The file also contains tariffs, plots and other features to simplify the analysis and schedules manipulation.
5. The user modifies at which time steps the number of pumps switched on is rounded up or down for each pump station and may also change FCV schedules.The goal is to: (i) match discrete pump and valve flows (calculated by EPANET and averaged over continuous time step) with continuous pump and valve flows, (ii) match discrete and continuous tank level trajectories and (iii) if possible avoid frequent pump switching.
6. Automatically load the updated discrete schedules from the xls file into the scheduler and go to point 3.The process described in points 3-6 is repeated until the user decides that the results obtained from the discrete schedules and from the continuous optimisation are sufficiently close.For small networks or a short time horizon (24 h) only few iterations are required.For large, complex networks and a long time horizon (7 days) more than ten iterations may be required.

Case study: large-scale WDN
This section describes application of the proposed method to optimise operation of a large-scale WDN.The study was based on real data concerning an actual WDN being part of a major water company in the UK.

Network overview
The considered WDN consists of 12 363 nodes, 12 923 pipes, 4 (forced-head) reservoirs, 10 (variable-head) tanks, 13 pumps in 6 pump stations and 315 valves.The average demand is 451 L s −1 (39 ML day −1 ).The system is supplied from 1 major source (water-treatment works) and 2 small imports (under 0.2 ML day −1 ).The model was provided in the EPANET format.The considered WDN includes complex structures and interactions between pump stations, e.g.pump stations in series without an intermediate tank, pump stations with by-passes, mixture of fixed-speed and variablespeed pump stations, valves diverting the flow from one pump station into many tanks, PRVs fed from booster pumps or a booster pump fed from a PRV.Due to the network complexity only its schematic with configuration of pump stations is illustrated in Fig. 2. Due to pump station by-passes, when the demand between two pump stations connected in series is low (i.e. at night), one of the pump stations can be turned off and the water will still reach the downstream part of the network with a sufficient pressure.

Hydraulic model preparation and simplification
Before the automatic model reduction algorithm was applied some manual model preparation was carried out; this included: 1.The model was converted from the Darcy-Weisbach formula to the Hazen-Williams formula, using an operating point when most of the pumps were switched on, i.e. when the flow in pipes was high.
2. Two reservoirs were connected to the system via permanently closed pipelines; these reservoirs were removed.
3. Two connected tanks that follow a similar pressure trajectory were merged into one tank with a suitably chosen diameter.
4. Around 200 permanently closed isolation valves were removed.
5. Several valves that had fixed opening (i.e.throttle control valves (TCV) without any control rules assigned) were replaced with pipes of an equivalent resistance.
6.A TCV to which an open-close control rule was assigned was replaced with an equivalent FCV.

7.
A pipe to which an open-close control rule was assigned was replaced with an equivalent valve (FCV) to ensure that only control elements are actually controlled in the model.
The above modifications enable further reduction in the number of network elements; for example, if the isolation valves were not removed, the automatic model reduction algorithm would treat them as control elements, thus retaining them in the reduced model.Table 1 presents functions of valves in the original model and actions performed during the model reduction.Subsequently, the automatic model reduction algorithm was applied; the scale of reduction is shown in Table 2.The model reduction algorithm requires an operating point around which the model will be linearised; in such complex WDN selection of the operating point might present a challenge.However, keeping in mind that the operating point should be representative for normal operation of the network and should be chosen for average demand conditions while keeping at least one pumping unit working at each pumping station (Alzamora et al., 2014), the operating point was chosen at 12:30 h.
To validate how the reduced model replicates the hydraulic behaviour of the original model a goodness of fit in terms of R 2 was calculated for flow trajectories of pumps/valves and for head trajectories of reservoirs/tanks.It was found that the reduced model adequately replicates the hydraulic behaviour of the original model.The R 2 for pump and valve flows was 0.94 in the worst case, 0.99 for most cases and 1.0 for some elements.The R 2 for reservoirs and tanks was 0.5 in the worst case, 0.91 in the second-to-worst case, and between 0.98 and 1.0 for all other reservoirs and tanks.The largest discrepancy was at a small tank which was the furthest from the main source and was empty (according to the original model) at around 18:00 h.Typical performance (i.e. with accuracy obtained for most elements) of the reduced model is illustrated in Figs. 3 and 4. Detailed analysis revealed that the most significant errors were introduced due to the conversion from the Darcy-Weisbach formula to the Hazen-Williams formula.

Example scheduling results and discussion
The optimisation algorithm was run for over ten scenarios with different constraints on the allowed tank level and on the allowed number of pumps switched on, with two different www.drink-water-eng-sci.net/7/53/2014/ Drink.Water Eng.Sci., 7, 53-62, 2014 horizons (24 h and 7 days), with/without pressure dependent leakage and with different demand levels (scaled for different seasons).In all considered scenarios the initial tank level for each tank was assumed to be as in the provided EPANET model.Pressure and flow constraints in different elements were either provided by the water company or assumed and were kept constant for all scenarios.In each case a GAMS code was automatically generated and CONOPT managed to find an optimal continuous solution.However, the automatic discretisation required several trials with different thresholds mentioned in Sect.4.1.The automatic discretisation algorithm particularly struggled for scenarios with pressure dependent leakage; for these scenarios the interactive discretisation approach was employed.Subsequently, it was decided to extend the boundaries of the model and include an additional pump station and a tank.After the changes were made in the simplified EPANET model and in an additional file describing pump station constraints, the scheduler successfully generated and solved an updated optimisation model without the need of any changes to the algorithm.Optimisation for 24 h horizon with 1 h timestep and for 7 days horizon with 2 h time-step took around 5 min and 1 h, respectively, on a standard office PC.
It was observed that for all 24 h horizon scenarios it was not possible to fully utilise the allowed capacity of the large tanks and their levels were far from the allowed limits.This was due to the restriction that the final tank level must be at least as the initial tank level.However, for scenarios with 7 days horizon most tanks hit their upper or lower allowed limits.An example schedule for the largest pump station and an example tank level trajectory for one 7 days scenario are illustrated in Fig. 5 and in Fig. 6, respectively.The tank level increases due to an increased pumping during the cheapest tariff and decreases during the peak tariff.In all considered scenarios it has also been observed that this particular tank is slowly emptying up to the middle of the week and then starts to fill up, since the final level has to be at least as the initial level.These observations suggest that, if allowed by other policies, to reduce the operation cost this tank should operate at lower level than its initial level in the provided EPANET model.However, for another tank which was at the network boundary an opposite tendency was observed: slowly filling up to the middle of the week (with oscillations due to varying daily demand and tariff) and then emptying to finish close to the initial level.This behaviour was due to the fact that the import to the tank was modelled as forced inflow (without any pump), so the inflow head was "free" from the els were far from the initial ones for most tanks.However, the costs for different scenarios were compared against each other.This allowed to formulate several conclusions useful for the water company.For example, two scenarios named A and B considered identical constraints, demands, leakage and topology, but in scenario A a pump station in the middle of the network was fixed speed (as is at present in the physical system) and in scenario B this pump station was equipped with variable speed drive, with the hydraulic and power curves for this pump station being identical in both scenarios A and B. It was found that in scenario B the pump station still operated at 100 % speed for majority of time, even when the initial condition was given as 70 %, and the reduction in cost was minimal compared to scenario A. Thus actual installation of a variable speed drive in this pump station in the physical system would not reduce the pumping cost; this demonstrates how the proposed approach can be used to evaluate cost-effectiveness of potential investment in assets related to pumping.

Conclusions
Pump operation optimisation is a difficult task due to significant complexity and inherent non-linearity of WDNs.In this paper a time-schedules optimisation is considered and simultaneous optimisation of pumps and valves schedules is employed.An optimisation model is automatically generated in the GAMS language from a hydraulic model in EPANET format and from additional files describing operational constraints, electricity tariffs and pump station configurations.In order to reduce the size of the optimisation problem the full hydraulic model is simplified using a model reduction algorithm.A nonlinear programming solver CONOPT is used to solve the continuous optimisation problem.Subsequently, the schedules are converted to a mixed-integer form using a simple heuristic.
The proposed approached was tested on a large-scale WDN being part of a major UK water company and provided in EPANET format.The considered WDN included complex structures and interactions between pump stations.Solving of several scenarios considering different horizons, time steps and operational constraints, and also with topological changes to the hydraulic model demonstrated ability of the approach to automatically generate and solve optimisation problems for a variety of requirements.However, further work is required to improve the current discretisation approaches.optimisation point of view.Therefore, maximising the level in that particular tank enabled small reduction in pumping effort on the downstream pumping station.
Note that the current and optimised operations are not compared, since the provided data considered only one day of operation and on that particular day the final tank levels were far from the initial ones for most tanks.However, the costs for different scenarios were compared against each other.This allowed to formulate several conclusions useful for the water company.For example, two scenarios named A and B considered identical constraints, demands, leakage and topology, but in scenario A a pump station in the middle of the network was fixed speed (as is at present in the physical system) and in scenario B this pump station was equipped with variable speed drive, with the hydraulic and power curves for this pump station being identical in both scenarios A and B. It was found that in scenario B the pump station still operated at 100 % speed for majority of time, even when the initial condition was given as 70 %, and the reduction in cost was minimal compared to scenario A. Thus actual installation of a variable speed drive in this pump station in the physical system would not reduce the pumping cost; this demonstrates how the proposed approach can be used to evaluate cost-effectiveness of potential investment in assets related to pumping.

Conclusions
Pump operation optimisation is a difficult task due to significant complexity and inherent non-linearity of WDNs.In this paper a time-schedules optimisation is considered and simultaneous optimisation of pumps and valves schedules is employed.An optimisation model is automatically generated in the GAMS language from a hydraulic model in the EPANET format and from additional files describing operational constraints, electricity tariffs and pump station configurations.In order to reduce the size of the optimisation problem the full hydraulic model is simplified using a model reduction algorithm.A nonlinear programming solver CONOPT is used to solve the continuous optimisation problem.Subsequently, the schedules are converted to a mixed-integer form using a simple heuristic.
The proposed approached was tested on a large-scale WDN being part of a major UK water company and provided in the EPANET format.The considered WDN included complex structures and interactions between pump stations.Solving of several scenarios considering different horizons, time steps and operational constraints, and also with topological changes to the hydraulic model demonstrated ability of the approach to automatically generate and solve optimisation problems for a variety of requirements.However, further work is required to improve the current discretisation approaches.

Figure 1 .
Figure 1.Illustrating how excessive pumping contributes to high total cost when network model with pressure dependent leakage is used.

Figure 2 .
Figure 2. A schematic of the network.

Figure 3 .
Figure 3.Typical discrepancy in tank level in the original and simplified models.

Figure 4 .
Figure 4. Typical discrepancy in performance of a pump station in the original and simplified models.

Figure 5 .Figure 6 .
Figure 5.An example schedule for the largest pump station.

Figure 5 .
Figure 5.An example schedule for the largest pump station.

Table 1 .
Function of each valve in the original model and actions performed during the model reduction.( * ) not classified as a valve in the total valves count in the original model.

Table 2 .
Number of elements in the original and the reduced model.