34 Pages Optimization
34 Pages Optimization
Bruno S. Vieira
Sérgio F. Mayerle
Lucila M.S. Campos
Leandro C. Coelho
June 2018
CIRRELT-2018-29
Document de travail également publié par la Faculté des sciences de l’administration de l’Université Laval,
sous le numéro FSA-2018-16.
Optimizing Drinking Water Distribution System Operations
Bruno S. Vieira1,*, Sérgio F. Mayerle2, Lucila M.S. Campos2, Leandro C. Coelho3
Abstract. Due to the fast pace of urbanization, governments and water supply service
providers have struggled to manage the services and the expansion of investments. The
operation of Water Distribution Systems (WDS) is often complex, especially when
considering the changes in tariffs throughout the day. The cost of energy in these systems
can reach 30% of total operating costs and its careful management can represent increased
efficiency. The optimization of WDS scheduling operation appears as an effective method
to reduce operating costs while ensuring a good service level to the population. In this paper
we propose a new linear relaxation for a non-linear integer programming formulation for
WDS in order to optimize its operation costs. We test our method on three benchmark
instances from the literature improving all solutions from the competing algorithms. We also
apply it to a larger new instance obtained from the WDS from the city of Florianópolis,
southern Brazil, significantly outperforming the current solution employed by the utility
provider. This study makes four main contributions. First, our formulation includes new
aspects related to the capacity of storage tanks that were not considered before, which
yields a more realistic representation of the physics of water and tanks. Second, our
linearization technique includes a variable number of breakpoints, resulting in significantly
fewer binary variables for a given error level. Third, our relaxation reduces the search of the
space solutions. Lastly, we provide a new real-life instance and improve the solutions for
three available benchmark instances.
Acknowledgements. This project was partly funded by the Natural Sciences and
Engineering Research Council of Canada (NSERC) under grant 2014-05764, and by the
Brazilian National Council for Scientific and Technological Development (CNPq). This
support is greatly acknowledged.
Results and views expressed in this publication are the sole responsibility of the authors and do not necessarily
reflect those of CIRRELT.
Les résultats et opinions contenus dans cette publication ne reflètent pas nécessairement la position du
CIRRELT et n'engagent pas sa responsabilité.
_____________________________
* Corresponding author: [email protected]
1 Introduction
Distribution of drinking water is a key service offered to society. By 2030, water demand will exceed the
supply capacity by 40% by current resource management practices [1]. With increased urbanization,
governments cannot improve their infrastructure at the same pace, but changing the way they operate
it can yield significant improvements, which might be critical especially in developing areas [5].
One of the most important costs in Water Distribution Systems (WDS) is that related to the electricity
used to pump water. Indeed, about 2% to 3% of the global energy consumption is used in WDS [15],
which accounts for up to 30% of total WDS operating costs [16]. It is then crucial for water utility
providers to develop efficient water distribution plans to reduce their costs.
However, WDS operation is quite complex. Pumps must be turned on and off to guarantee a flow
of water throughout the system to satisfy all demand points. Conversely, operating pumps increase
the pressure on the pipes. If the pressure is too low, water will not reach the highest points of
the network and will make the system prone to intrusion; if pressure is too high, leaks will occur,
and more energy than the necessary will have been used, increasing costs. In addition to different
energy tariffs throughout the day, the system operation is subject to strongly non-linear hydraulic flow
resistance, called head loss, and several points throughout the network are subject to strict pressure
bounds. Moreover, the system is composed of other infrastructure, some of which can have their
status modified throughout the day. These are the valves and tanks. Valves act on pipes by only
allowing flow in one direction, and tanks are used as an inventory of water. When pressure is high and
demand is low, this inventory increases and the tanks accumulate water. When demand increases and
the surrounding pressure decreases, gravity flows the water from the tanks to the network of pipes.
The combination of these factors makes the optimization of even very small networks difficult [14].
Optimization has been used to help on expansion plans [9, 24], determining pipe size [2, 10], and on
daily operations [3, 13, 18, 19, 26, 27], the focus of this paper, as described next.
Ghaddar et al. [13] used a Lagrangian decomposition applied to a non-linear formulation of pumping
plan and obtained an optimal solution for a schematic version of the WDS of the Richmond region,
UK, which consists of seven pumps, 47 nodes and 44 pipes [25]. Their algorithm took about two
hours of computing time. The same system, with different tariffs, was solved by Giacomello et al. [14],
who used linear programming coupled with a local search method. The solution was presented within
seconds, but did not guarantee optimality. Moreover, the comparison to the original cost structure
CIRRELT-2018-20 1
Optimizing Drinking Water Distribution System Operations
Relaxations of non-linear programming formulations have been used to drive search algorithms.
Geiβler et al. [12] proposed an adaptive refinement of mixed-integer programming relaxations for
a gas network whose operation is similar to that of water networks. Their algorithm computes the
maximum error incurred by the relaxation and refines the constraints associated with them. This
method was shown to outperform commercial mixed-integer non-linear programming solvers on three
instances of their problem, that contained up to 452 pipes, six compressor stations (equivalent to the
pumps in water systems) and 34 valves.
López-Ibáñez et al. [17] developed an ant colony optimization metaheuristic to explicitly define the
times at which pumps must be turned on and off. The authors solved two variants of the Richmond
WDS, the biggest one containing 872 nodes (including six tanks and one water source), 957 arcs, seven
pumps and 21 valves. A genetic algorithm was proposed by Marchi et al. [19] to define control rules
used to optimize a test network described in Van Zyl et al. [26], which consists of one valve and two
consumption nodes, supplied by three pumps and two water reservoirs, for a total of 16 nodes and 18
arcs.
Mathematical programming has recently gained momentum in solving WDS, which can be well de-
scribed by a mixed-integer non-linear programming (MINLP) formulation. D’Ambrosio et al. [7]
describe some algorithmic paradigms widely applied to MINLPs and show how they have been ap-
plied to water network optimization. The authors highlight that mixed-integer linear programming
(MILP) approximations have been used to solve WDS problems, especially those exploiting piecewise
approximations and relaxations. The interested reader is referred to Rovatti et al. [22] and to Geiβler
et al. [11]. An overview of the mathematical techniques used in WDS can be found in D’Ambrosio
et al. [7], while a more general overview of the main methods, results and networks studied in the
literature can be found at Coelho and Andrade-Campos [4].
Besides financial gains, determining the best pumping plan in order to satisfy all constraints and
minimizing pumping costs can have several side benefits. An efficient plan can avoid the unnecessary
use of resources and minimize the ecological impact of pollution and emissions of greenhouse gases
[13]. Moreover, high pressure is known to be a major cause of leakage [28], and thus, of wasting treated
water, which is not environmental friendly.
In this paper we propose a new linear relaxation for a MINLP formulation for WDS in order to
optimize its operation costs. The relaxation yields approximations, and we develop a new method
2 CIRRELT-2018-29
Optimizing Drinking Water Distribution System Operations
which iteratively refines them, based on Geiβler et al. [12]. In our method, we initially stipulate a
maximum error for each piecewise relaxation, defining each breakpoint in a way not yet explored in the
literature. The relaxations are computed such that they reduce the solution space, and the breakpoints
are defined such that for each pipe, each piecewise relaxation stretch has the same maximum error,
which is monotonically decreasing. Aiming at the feasibility of the solution to the original problem,
we developed a procedure to systematically correct linearization-induced errors. If the procedure does
not lead to a feasible or satisfactory result, the maximum tolerated error is tightened and computed,
and the linearization and optimization procedures are iterated once more.
We test our algorithm on three benchmark instances from the literature, besides applying it to a new
instance obtained from the WDS from the city of Florianópolis, southern Brazil. Our results improve
all the solutions from the literature and we provide solutions that are significantly better than the
current practice employed by the utility provider in Florianópolis.
This paper has four main contributions. First, our MINLP formulation includes new aspects related
to the tanks capacity that were not considered before, which yields a more realistic representation
of the physics of water and tanks. Second, our linearization of the non-linearities includes a variable
number of breakpoints, resulting in significantly fewer binary variables for a given error level. Third,
our algorithm has always been able to convert relaxed solutions into feasible ones, for all benchmark
instances studied. Finally, we improve the solutions of all available benchmarks and provide a new
real-life instance, larger than any of those available in the literature.
The remainder of this paper is organized as follows. In Section 2 we provide a formal description of
the problem along with mathematical models, including the non-linear and linear formulations of the
problem. Our main technical and algorithmic developments are presented in Section 3. We describe
the computational experiments used to validate our model on benchmark instances from the literature
in Section 4, where we also describe a new WDS made available for the community. Our conclusions
follow in Section 5.
A WDS can be modeled on a graph consisting of arcs and nodes. Nodes represent water sources, tanks
and junctions, which may have a demand. Let A be the set of all nodes, partitioned into the set R of
water sources, the set K of tanks and the set J of junctions. Arcs on the graph represent the pipes
CIRRELT-2018-20 3
Optimizing Drinking Water Distribution System Operations
of the system, identified by the set N . To each pipe with endpoints i and j, there is an associated
maximum flow Qij (in liters per second), a length Lij (in meters), a radius Rij (in meters), and a
roughness coefficient Kij . Let P ⊂ N be the subset of pipes containing pumps and V ⊂ N be the
subset of pipes containing valves, such that P ∩ V = ∅.
The problem is defined over a finite horizon in the set T , with |T | = H and 4T being the length of
each time period. When a pump is operating, an electricity cost is due. Let Cijt be the cost for pump
(i, j) ∈ P at time period t ∈ T , measured in monetary units per kW.
For each node i, its elevation Ei (in meters) is known, its minimum and maximum pressure bounds
are given by PiL and PiU (in meters), and the demand of each junction j in period t is given by Djt (in
liters per second). Water source r is associated with its pressure per period Prt (in meters). A tank i
is associated with a surface area Ai (in squared meters) and a capacity Bi (in meters). Finally, let γ
represent the specific weight of water (N/m3 ).
We now present two models for the operations of a WDS. In Section 2.1 we present a MINLP formu-
lation, and in Section 2.2 a MILP formulation using piecewise linear relaxations as an approximation
for the MINLP model. Section 2.3 describes some simplifications and tightening we have developed
for our models.
The variables of the model as are follows. Let qijt represent the flow through pipe (i, j) in period t,
and hijt be the head loss in pipe (i, j) in period t. Let binary variables sijt be equal to one if pump,
valve or outflow of tank (i, j) is active in period t, and binary variables fit be equal to one if the level
of water in the tank i is at the limit of its capacity at the beginning of period t. Let the pressure on
node i in period t be represented by variable pit and its auxiliary variable p0it . Finally, let ηij represent
the efficiency of pump installed on pipe (i, j), which is a flow function. The problem (P) can then be
formulated as follows:
subject to
4 CIRRELT-2018-29
Optimizing Drinking Water Distribution System Operations
The objective function (1) minimizes the total power consumption. Constraints (2) impose an upper
bound on the flow on each pipe, while constraints (3) ensure that the flow on a pipe occurs only if
the corresponding pump, valve or pipe leading to the tank is active. Constraints (4) enforce water
conservation, while constraints (5)–(9) model energy conservation based on the hydraulic properties of
the system. Equations (5) ensure that the flow can only happen in one direction at a time, respecting
energy conservation laws. Inequalities (6) guarantee that when the flow is zero from j to i and from
CIRRELT-2018-20 5
Optimizing Drinking Water Distribution System Operations
i to j, energy conservation is satisfied. Constraints (7) ensure that the flow through the pump is
in accordance with the energy conservation and (8) ensure the conservation of energy for pipes with
valves and tank outputs. Constraints (9) represent the Hazen-Williams (HW) head loss equation.
Constraints (10) and (11) represent the pump characteristic and yield curves, respectively, and both
depend on the flow. Constraints (12) represent the minimum and maximum pressure for nodes without
water sources, which in turn, have their pressure bounded by (13). Constraints (14) correspond to
mass balance equations and (15) impose that the level of the tanks at the end of the horizon to be
at least that of the initial period. Constraints (16) and (17) allow the auxiliary pressure variable to
exceed its maximum value when the tank is full. In this case, constraints (18) allow disjoining arcs
that flow into the tank, while (3) and (6) enforce their connection when the water is flowing from the
tank. Moreover, if the tank is full, i.e., variable fit is equal to 1, constraints (19) require the tank
pressure to be at its upper limit. On the other hand, when fit equals zero, constraints (20) impose
the auxiliary pressure variable p0 to be equal to the original pressure variable p. These tank-related
restrictions allow us to consider the conditions when the tank is full. In this situation, the system
usually operates in a very particular condition, which must be considered in the search for optimal
solutions. We did not find other studies that consider this feature. Finally, constraints (21) define the
domain and nature of the variables.
This formulation is based on MINLP model (P) just presented, but relaxes and approximates its non-
linearities. These are depicted in Figure 1. The objective function (1) will be approximated using
a piecewise linear function as shown in Figure 1a. Pump characteristic curves representing the pair
flow-pressure of constraints (10) will be bounded as in Figure 1b, and the HW conditions (constraints
(9)) will be relaxed and bounded via a piecewise linear function as in Figure 1c. The use of piecewise
relaxations instead of an approximation, as used by Geiβler et al. [11] and Geiβler et al. [12], for pump
characteristics and the HW curves are chosen because they offer several advantages. First, solutions to
the original problem are feasible in the relaxed one, allowing us to exploit initial solutions and warm
starts in our MILP formulation. Second, if we can prove that the relaxed problem is infeasible, the
original problem will also be [12], which is not the case in the use of approximations. Finally, since
the objective function of the relaxed problem is an underestimation of (1), all solutions of the MILP
are valid lower bounds for the original problem.
6 CIRRELT-2018-29
Optimizing Drinking Water Distribution System Operations
hj − hi
hj − hi
$
(a) Objective function curve (b) Characteristic pump curve (c) Hazen-Williams curve
In order to develop the linear version of the model, let us define additional sets, parameters and
variables. Let O be the set of breakpoints of the HW function and pump curves, G be the set of
straight lines coefficients of all segments that define bounds for the relaxations, partitioned into G U
and G L being the subsets of straight lines coefficients that define upper and lower bounds, respectively.
New parameters are defined as follows. Let QHW
oij be the flow points o ∈ O where the linearized curves
HW (QHW )
will necessarily have the same pressure values of the original HW curve (i, j). Hence, let Hoij oij
1.852
QHW
oij
10.641L if QHW
ij 1000
oij > 0
1.852 4.87
Cij Dij
HW
Hoij (QHW
oij ) = −QHW
1.852 (22)
oij
10.641Lij 1000
− if QHW < 0.
1.852 D 4.87
Cij ij
oij
Also, let QPoij be the flow points o ∈ O where the linearized curves will necessarily have the same
pressure values of the original pump curve and the same cost values of the original objective function,
P (QP ) be the pressure corresponding points of QP value in
for the pipe (i, j). In this case, let Hoij o,ij oij
P (QP ) be the cost corresponding points of QP value in the original
the original curve. Finally, let Zoij o,ij nij
curve, where:
T X γCijt QP P
oij Hoij
X
P
Zoij (QP
oij ) = . (23)
t=1
106 ηij
(ij)∈P
The following variables must also be defined. Let λoijt be equal to 1 if the piecewise segment o of pipe
CIRRELT-2018-20 7
Optimizing Drinking Water Distribution System Operations
(i, j) is active in period t, and 0 otherwise. This is used for approximating the objective function. We
develop our piecewise approximation of the objective function using the convex-combination method
[8], which is based on the principle that it is possible to compute the function at a given point by
the convex combination of neighboring nodes. Thus, the objective function (1) must be replaced by
(24)–(28):
X X X
P
min λoijt Zoij (24)
t∈T (i,j)∈P o∈O
X
qijt = λoijt QP
oij (i, j) ∈ P, t ∈ T (25)
o∈O
X
λoijt = 1 (i, j) ∈ P, t ∈ T (26)
o∈O
In turn, the HW equations (9) and the pump flow-pressure curves (10) have been relaxed and each
convex portion has been limited by four straight inequalities, forming an envelope around the original
function. Each envelope is activated by the value of a corresponding binary variable. It is noteworthy
that the outside of the concavity could be bounded by countless straight lines, without the need of
extra binary variables. Thus, these constraints must be changed by inequalities with the generic form
shown in (29) and (30):
where Agoij and Bgoij are the straight lines coefficients that limit the original curve. Inequalities (29)
and (30) are non-linear, but linearizing them is trivial. The same method was used to linearize (7),
(8), (19) and (20). Furthermore, one of the envelopes of each pipe must necessarily be activated, as
indicated by constraints (31):
|O|−1
X
bo,ij,t = 1 (i, j) ∈ N , t ∈ T . (31)
o=1
8 CIRRELT-2018-29
Optimizing Drinking Water Distribution System Operations
Note that once the equation (9) is linearized, hijt may assume positive and negative values. Equations
(11) are no longer necessary since the efficiency functions are embedded in the objective function.
Finally, the domain of the q variables in (21) must now allow negative flows.
In this section we describe some simplifications and valid inequalities we have developed for our models.
First, we simplify it by what we call notable flows. For arcs that follow a tank towards the end of
a network without any loops, the flow can be predetermined as a function of the demands. Figure
2 shows a small part of a network, in which the flow of arcs (6,4), (6,5), (7,6) and (8,7) can be pre
calculated as follows, assuming QPijtre is the predetermined flow on arc (i, j) in period t:
QP6,4,t
re = D
4,t + D3,t + D2,t + D1,t
QP6,5,t
re = D
5,t
QP7,6,t
re = D P re P re
6,t + Q6,5,t + Q6,4,t
QP8,7,t
re = D P re
7,t + Q7,6,t
Moreover, in some cases some shortcuts can be derived. These appear when the maximum head loss
on a pipe has a negligible value. This strategy was used, for example, in Geiβler et al. [12]. We can
then simplify (8) and (32) as follows:
CIRRELT-2018-20 9
Optimizing Drinking Water Distribution System Operations
Also, it is common practice by utility providers to limit the number of times a pump is turned on and
off. This can be incorporated in our models by using a new binary variable mijt equal to 1 if pump
(i, j) is switched on in period t. Letting M be the maximum number of switches allowed per pump,
we can add the following constraints to the model:
Moreover, it is known that valid inequalities can accelerate the resolution of MILP models [6]. We
now introduce some classes of valid inequalities.
As is typical in this literature and to ensure sustainable operations over time, the volume of water at
the tanks at the end of the planning horizon must be at least equal to that at the initial period. Given
this characteristic, we can determine a lower bound on the number of switches performed. This is
achieved by defining the set Pr as that of pumps drawing water from sources. The constraint is then:
X H
X H
X X
Ak (pk1 − pkt ) + 3.6 Dit0 ≤ 3.6 sijt0 Qij t∈T. (38)
k∈K t0 =t (i,j)∈Pr t0 =t
We have also observed in real networks that parallel valves can direct the flow of water through a
pump (or not in case these valves are closed). In any way, the water either flows through the pump
or loops it completely, but never via both ways. When such a structure is present, we can add the
following cut:
Finally, when two identical pumps are installed in parallel, the number of combinations for their
activation can be reduced via lexicographic ordering:
10 CIRRELT-2018-29
Optimizing Drinking Water Distribution System Operations
3 Solution algorithm
In this section we describe the ideas used to simplify the solution of the mathematical model just
presented and to ensure a feasible and good solution is obtained. In Section 3.1 we describe how we
define breakpoints to limit the maximum tolerated error and to refine them at each iteration. Then,
in Section 3.2 we develop an algorithm to derive feasible solutions from the relaxations obtained from
the first phase. In general, our algorithm works in four main steeps, as follows:
2. linearization of the mathematical model using binary variables to enforce the maximum error,
yielding a model which is piecewise linear;
4. computation of the real costs of the solution from step 3 (using a water distribution system
simulation solver).
In the previous model, the efficiency curves of the pumps of the system and the HW head loss curves are
non-linear and complicating in terms of solving the problem. In Geiβler et al. [12], the vertical distance
hijt was used as the maximum error. We better estimate and bound this error by encapsulating each
curve by a set of straight lines, corresponding to a small portion of the curve defined for a pair
(qijt , hijt ). Hence, for each pump we can define and compute the maximum horizontal distance qijt
for each point hijt . Moreover, for each arc we can define and compute the maximum vertical distance
hijt for each point qijt . These are depicted in Figures 3a and 3b.
Note that these error values can be established a priori for each arc. Each linearized area is then
defined by its minimum and maximum flow points, determining the breakpoints of the linearization.
The maximum error can be refined by adding an additional breakpoint between two existing ones. We
have observed that when doing so, the two new regions should have the same maximum error (i.e.,
CIRRELT-2018-20 11
Optimizing Drinking Water Distribution System Operations
Max error
Max error
hij
0
hij
qij 0
qij
(a) Example of maximum errors for pump
(b) Example of maximum errors for HW
curves
be symmetric) in order to efficiently use the newly introduced binary variables. This is depicted in
Figure 4.
From the procedure described in Section 3.1 one determines the maximum allowed error and thus
computes the number of breakpoints (and binary variables) used to linearize pump curves and HW
conditions. This model is then solved by means of a commercial MIP solver, and two situations may
occur. First, if no solution exists to the linearized model, then the original model is also infeasible. If
a solution to the linearized model exists, then it must be further examined to ensure it respects all
constraints and conditions of the original model. This is done as follows and the overall procedure is
described in Algorithm 1.
The solution is first tested on the EPANET simulator of water movement. If this solution is feasible
and the cost obtained from EPANET is within a given error of the one obtained from the optimization
phase, the solution is deemed feasible and is accepted, ending the optimization phase. Otherwise, if
the solution cost from EPANET differs from that of the optimization, or if it is not feasible, we first
try to repair the solution. If this is not successful, new tighter error bounds are computed and the
12 CIRRELT-2018-29
Optimizing Drinking Water Distribution System Operations
Max
hij
0 error 1
0
qij
process is reiterated. We now describe how we repair a solution that does not respect all constraints
of the problem.
We first check all pressure values, which cannot be negative for any nodes with demand. We describe
in Algorithm 2 how we try to increase the initial volume of the water tanks and switching on pumps
that are close to the node with an irregular pressure value. This is done in periods prior to the moment
when the irregular pressure occurs, with preference to time periods with cheaper energy tariffs. If these
steps are not sufficient to fix the pressure values, a new tighter error is computed and the process is
reiterated.
Moreover, after pressure checks, the volume of water within the water tanks must be at least equal to
that at the initial state. In Algorithm 3 we describe the procedure used to match the volume of water
within the tanks. This is done by setting the initial values to those obtained at the end of the planning
horizon. If this yields irregular pressure at nodes with demands, Algorithm 2 is applied. If the problem
is now feasible, the solution is accepted. Otherwise, new tighter errors must be determined and the
process is reiterated.
4 Computational experiments
In this section we describe the computational experiments carried out to evaluate the performance
of our algorithm. All formulations were implemented using GAMS and solved with CPLEX version
CIRRELT-2018-20 13
Optimizing Drinking Water Distribution System Operations
14 CIRRELT-2018-29
Optimizing Drinking Water Distribution System Operations
CIRRELT-2018-20 15
Optimizing Drinking Water Distribution System Operations
16 CIRRELT-2018-29
Optimizing Drinking Water Distribution System Operations
12.6.3. All computations were executed on machines equipped with a Intel(R) Xeon(R) CPU E5-2698
processor running at 2.3GHz and 4 GB of memory. In the following, Section 4.1 provides a description
of existing and new instances used in this research. In Section 4.2 we present the results of our
experiments and our analysis.
We have gathered instances available from the literature and introduce a new large one in this study.
A small size instance used by Van Zyl et al. [26] contains two consuming nodes and one source with
two parallel pumps. A booster pump and two water tanks complete the network for a total of 16
nodes and 18 arcs. Its schematic representation is depicted in Figure 5 and we will refer to it as Mini.
A medium size instance is depicted in Figure 6 and is refereed to as Richmond Skeleton. It was used
by Van Zyl et al. [26] and Giacomello et al. [14] and contains 48 nodes with six tanks and one source,
and 51 arcs including seven pumps and one valve.
The largest instance available in the literature is the Richmond Standard one, introduced by Van Zyl
[25]. This network contains 872 nodes including six tanks and one reservoir, and 957 arcs including
seven pumps and 21 valves. This network is depicted in Figure 7.
CIRRELT-2018-20 17
Optimizing Drinking Water Distribution System Operations
Table 1 presents the best results available in the literature for these three existing networks.
We introduce a new real instance from the city of Florianópolis, southern Brazil. This network
serves a population of about 80,000 people with approximately 600,000 m3 of water per month. The
Florianópolis network consists of 654 arcs, seven of which are pumps and four valves, and 630 nodes
including 560 consumer points, four tanks. We depict this new network in Figure 8.
This newly introduced network has a different energy pricing scheme, in four different levels as follows:
1. monomial: in this type of energy tariff, the user pays for the amount of energy consumed.
4. blue hourly seasonal: here two maximum energy consumption levels exist: one for peak hours
(between 18:00 and 21:00) and one for off-peak hours.
18 CIRRELT-2018-29
Optimizing Drinking Water Distribution System Operations
In Florianópolis, one pump operates in a blue hourly seasonal scheme, two in the green scheme, two
in the conventional pricing, and two in the monomial pricing scheme. The real data obtained from
the utility provider indicates that they incur a monthly cost of $75,216. This network and associated
data can be made available upon request.
We now present the results of computational experiments performed to evaluate the performance of
our algorithms, and to compare the solutions obtained with those from the literature.
We start with the Mini network. We observe that it is defined with 15 arcs, but our preprocessing
identified 10 short-cuts reducing this number to only five. No notable flows exist in this network. We
first established a maximum error value of 0.96 meters for all pipes. This yields a model with 1392
binary variables. The average error for the pipes was computed at only 0.47 m.
Analyzing the results, we observed that for this case, the limitation of switching the pumps on and
off does not seem to have contributed to the speed of convergence, nor did it influence the achieved
value of the objective function. We noted that most of the time, the objective function of the model
without limiting the number of switches was lower than in other instances (Figure 9). Indeed, for this
case, at the end of 8 hours all instances converged to the same value (Table 2), which suggests that
CIRRELT-2018-20 19
Optimizing Drinking Water Distribution System Operations
the limitation of switching the pump on and off does not exclude the best primal solutions.
For this network, we improved the solution from the literature [19] to 306.94, reducing it by 1.62%.
The time to reach the best solution was 7 hours and 22 minutes. It is worth noting that we allow
our method to change the initial volumes of the tanks, as long as their final levels are larger than the
initial ones.
For the Richmond Skeleton network we set a maximum tolerated error value of 4.91 m for all pipes.
With this maximum error, the problem was modeled using 1584 binary variables. We identified four
arcs with notable flows and we define 11 arcs with short cuts, which reduced the number of arcs in
which the head losses had to be defined from 44 to 33. After solving it, the mean maximum error of
the pipes was only 1.04 m.
The results of our experiments are presented in Table 3 and Figure 10 and show that setting the
maximum number of switches to 5 converged faster and yielded the best results.
Again, our method improved the solutions from the literature. Our best solution improved that of
20 CIRRELT-2018-29
Optimizing Drinking Water Distribution System Operations
350
Solution 2 switches
LB 2 switches
Solution 3 switches
340 LB 3 switches
Solution 4 switches
LB 4 switches
Solution and LB values ($)
310
300
290
0 1 2 3 4 5 6 7 8
Time (hours)
Figure 9: Evolution of the solutions over time for the Mini network
CIRRELT-2018-20 21
Optimizing Drinking Water Distribution System Operations
150
Solution 2 switches
LB 2 switches
140 Solution 3 switches
LB 3 switches
Solution 4 switches
130
LB 4 switches
Solution and LB values ($)
Solution 5 switches
120 LB 5 switches
Solution ∞ switches
LB ∞ switches
110
100
90
80
70
0 1 2 3 4 5 6 7 8
Time (hours)
Figure 10: Evolution of the solutions over time for the Richmond Skeleton network
22 CIRRELT-2018-29
Optimizing Drinking Water Distribution System Operations
Giacomello et al. [14] by 10.82%. This type of problem can be solved over several hours, making our
solution method usable in practice, as long as the utility provider has the solution on time to use it
and save on operational costs.
For the last network from the literature, the Richmond Standard network, we defined a maximum
error value of 17.07 m in height as maximum error for all pipes. Thereby, initially the problem was
modeled with 1440 binary variables. As a simplification, we defined 190 arcs with notable flow and
122 short-cuts. After solving the problem, the mean maximum error of the pipes was only 0.37 m.
We provided a known poor initial solution for the model and got the best result in the instance with
3 switches, in which we had a daily cost of $88.80, (including switches costs). This solution had to go
through proposed adjustments in Algorithms 2 and 3 resulting in a cost of $ 86.41 in the EPANET
simulator (excluding switches costs).
The best result of the literature we found for this network is presented in López-Ibáñez et al. [18]
where the authors obtained an annual cost of $ 32,581.4, resulting in a daily cost of $89.26. They
did not report accounting for switching costs, although they limited their quantity. Thus, for this
network, our method improved the best literature solution by 3.20%. We also emphasize that for the
instance with 3 switches, after 2 and a half hours the objective function had already reached a solution
of $90.03, a value very close to the value found after 8 hours (see Figure 11).
The Florianópolis network requires further modeling efforts to account for its non-standard energy
consumption rates. This is now presented in Section 4.2.1 followed by the computational results for
this network in Section 4.2.2.
CIRRELT-2018-20 23
Optimizing Drinking Water Distribution System Operations
145
Solution 2 switches
LB 2 switches
135
Solution 3 switches
LB 3 switches
125 Solution 4 switches
LB 4 switches
Solution and LB values ($)
Solution 5 switches
115 LB 5 switches
Solution ∞ switches
LB ∞ switches
105
95
85
75
65
0 1 2 3 4 5 6 7 8
Time (hours)
Figure 11: Evolution of the solutions over time for Richmond Standard network
24 CIRRELT-2018-29
Optimizing Drinking Water Distribution System Operations
To represent the new energy rates, we define the following new sets:
• P A ⊂ P: subset of pipes containing pumps subject to the blue hourly seasonal rate
• P V ⊂ P: subset of pipes containing pumps subject to the green hourly seasonal rate
• Cij
DaP : electricity cost during the peak hours of the blue hourly seasonal rate of pump (i, j) (in
monetary units/kW)
• Cij
DaF P : electricity cost during out-of-peak hours of blue hourly seasonal rate of pump (i, j) (in
monetary units/kW)
• Cij
DV : electricity cost during the green hourly seasonal rate of pump (i, j) (in monetary units/kW)
• Cij
DC : electricity cost of the conventional rate for pump (i, j) (in monetary units/kW)
• Woij
P (QP ): amount of kW consumed by pump P in the flow point QP , where: W P (QP ) =
oij oij oij oij
γQP P
o,ij Ho,ij
P
Zo,ij
106 ηij
⇔ Cijt .
• aPij : contracted demand for peak times, for pump (i, j) subject to the blue hourly seasonal rate
(in kW)
• aFijP : contracted demand for out-of-peak times, for pump i, j) subject to the blue hourly seasonal
rate (in kW)
• vij : contracted demand for pump (i, j) subject to the green hourly seasonal rate (in kW)
• cij : contracted demand for pump (i, j) subject to the conventional rate (in kW).
CIRRELT-2018-20 25
Optimizing Drinking Water Distribution System Operations
P
DaF P F P DaP P DV DC
P P P
XX X ij∈P A Cij aij + ij∈P A Cij aij + ij∈P V Cij vij + ij∈P C Cij cij
P
min λo,ij,t Zo,ij +
M
t∈T ij∈P o∈O
(41)
X
P
λo,ij,t Wo,ij ≤ aP
ij ∀(i, j) ∈ P A , ∀t ∈ T P (42)
o∈O
X
P
λo,ij,t Wo,ij ≤ aF
ij
P
∀(i, j) ∈ P A , ∀t ∈ T \T P (43)
o∈O
X
P
λo,ij,t Wo,ij ≤ vij ∀(i, j) ∈ P V , ∀t ∈ T (44)
o∈O
X
P
λo,ij,t Wo,ij ≤ cij ∀(i, j) ∈ P C , ∀t ∈ T . (45)
o∈O
We have arbitrated a maximum error of 10 m for all pipes. Using this value, most pipes could be
modeled with only one feasible region in the relaxed model, resulting in very few binary variables.
The mean maximum error of the pipes was then 1.24 m. Out of the 654 arcs whose flow variables
would have to be computed, we determined 233 arcs with a predefined flow, reducing the number of
flow variables to 421, which represented a reduction of approximately 35% in the number of variables.
In addition, another 13 arcs were identified as shortcuts and had their head loss set to zero.
Since there is no benchmark for this instance, we have first analyzed the effects of simplifications
presented in Section 2.3. These are compared on the basis of the convergence of the models, without
any limitation on the number of switches of the pumps. We present the evolution of the solution
quality in Figure 12, and in Table 5 we present the final results of the model and the EPANET
simulation.
26 CIRRELT-2018-29
Optimizing Drinking Water Distribution System Operations
2,200
Solution without simplifications
LB without simplifications
Solution with simplifications
2,000
LB with simplifications
Solution and LB values ($)
1,800
1,600
1,400
1,200
1 2 3 4 5 6 7 8
Time (hours)
Figure 12: Comparison of the evolution of solutions with and without simplifications
Analyzing the results of the optimization phase, we observe that the model with simplifications started
from a significantly better solution, but that both versions of the model converged to the same solution
at the end of the optimization phase. Regarding the evolution of the lower bounds, the results were
similar over the time, and at the end of the 8 hours of computing time, the lower bound of the non-
simplified model was higher, indicating that at that point, no solution was lost from simplifying the
model.
The best solution resulted in a cost of $1709 and was emulated in EPANET, yielding a solution cost
of $1905, but with irregular pressure values. After applying our corrective algorithms, we reached a
feasible value of $2085.48, which is 16.82% lower than the solution used by the water service provider.
These results are presented in Table 6.
We have also observed that not only the energy cost was lower, but also the energy consumption
decreased. This means that our solution is not using more energy from cheap tariffs, but is decreasing
energy consumption overall. For the optimized solution, the pumps required a total of 7481 kW,
against 8995 kW for the solution in used by the utility provider, representing a reduction of 16.83%.
It can be seen that the percentage reduction obtained in energy consumption (16.83% in kW) was
CIRRELT-2018-20 27
Optimizing Drinking Water Distribution System Operations
higher than the reduction of costs related to consumption (7.84% in $). This is a very positive outcome
of this method, and could lead to further analysis and optimization.
The reduction of the energy supplied is also due to the fact that the total energy lost by friction in the
pipes has been lower in the optimized solution. The value decreased from 2958 kW lost by friction in
the solution of the provider, to 2146 kW in the optimized solution. Table 7 summarizes the differences
in energy consumption in the two scenarios.
Table 7: Comparison between the optimized and the service provider solutions
We deduce that the difference between the energy use between the optimized solution and the service
provider ones does not derive solely from the reduction of losses. For this difference of 1514 kW of
energy consumed, only 812 kW (53.63%) are explained by the reduction of losses by friction. We
assume that the remaining savings come from the increased use of the most efficient pumps in the
system and the reduction of usage of less efficient pumps; moreover, our solution makes better use of
reservoirs, as it is known that working with reservoirs at different levels changes the amount of energy
consumed by the pumps.
In addition, another reason for lower losses in our solution may come from use of the most central
28 CIRRELT-2018-29
Optimizing Drinking Water Distribution System Operations
pumps in the system, since these are closer, on average, to the demand points. These results show
that the use of the optimization tool in the WDS operation is not only able to reduce the cost with
energy, but also to reduce the energy consumption itself, which represents an environmental benefit
of its use.
The proposed gains obtained in this research are compatible with those of other applications found
in the literature, such as the city of Valencia (Spain) [20], and in Haifa (Israel) [23], where financial
gains of 17.6% and 25% were reported, respectively.
5 Conclusions
In this paper we have proposed a new linear relaxation for a non-linear integer programming formula-
tion for optimizing water distribution. In order to help in obtaining good solutions, new simplifications
were presented in order to reduce the number of combinations of feasible solutions and significantly
reducing the number of variables and constraints of the model. We have tested our methods in three
benchmark instances from the literature, improving all previous results.
We have also introduced a new large network to the literature, based on the WDS of the city of
Florianópolis, Brazil. Our method reduced the cost of the service provider by more than 16%, in
addition to a reduction of 27.45% of the load losses. A side benefit of our solution is that not only
costs have been reduced, but energy consumption has decreased by almost 17% as well. We have thus
demonstrated that the optimization of the WDS operation can not only bring financial gains, but can
also bring environmental benefits.
Future research can focus on improving the optimization method or on the side benefits of the cost
optimization. New valid inequalities and simplifications could be developed, which would reduce the
need for correction phases, which inevitably increases costs. Different works on reducing network
complexity exist, such as those dealing with gas, electricity and water (see, e.g., Paluszczyszyn [21]).
Moreover, the use of initial solutions based on previous knowledge of the system operation can sig-
nificantly enhance its performance [14]. Finally, we have demonstrated that when optimizing for cost
reductions, a side benefit we have observed is an overall reduction in energy consumption. From an
environmental perspective, using fewer resources is more important than reducing a few percentage
points in costs.
CIRRELT-2018-20 29
Optimizing Drinking Water Distribution System Operations
References
[1] L. Addams, G. Boccaletti, M. Kerlin, and M. Stuchtey. Charting our water future: Economic
frameworks to inform decision-making. McKinsey & Company, New York, 2009.
[2] C. Bragalli, C. D’Ambrosio, J. Lee, A. Lodi, and P. Toth. On the optimal design of water
distribution networks: a practical MINLP approach. Optimization and Engineering, 13(2):219–
246, 2012.
[3] J. Burgschweiger, B. Gnädig, and M. C. Steinbach. Nonlinear programming techniques for op-
erative planning in large drinking water networks. Open Applied Mathematics Journal, 3:14–28,
2009.
[4] B. Coelho and A. Andrade-Campos. Efficiency achievement in water supply systems: A review.
Renewable and Sustainable Energy Reviews, 30:59–84, 2014.
[5] R. Connor. The United Nations world water development report 2015: Water for a sustainable
world. Technical report, UNESCO Publishing, 2015.
[6] G. Cornuéjols. Valid inequalities for mixed integer linear programs. Mathematical Programming,
112(1):3–44, 2008.
[8] G. B. Dantzig. On the significance of solving linear programming problems with some integer
variables. Econometrica, Journal of the Econometric Society, 28(1):30–44, 1960.
[9] M. M. Eusuff and K. E. Lansey. Optimization of water distribution network design using the
shuffled frog leaping algorithm. Journal of Water Resources Planning and Management, 129(3):
210–225, 2003.
[10] Z. W. Geem. Optimal cost design of water distribution networks using harmony search. Engi-
neering Optimization, 38(03):259–277, 2006.
[11] B. Geiβler, A. Martin, A. Morsi, and L. Schewe. Using piecewise linear functions for solving
MINLPs. In J. Lee and S. Leyffer, editors, Mixed Integer Nonlinear Programming, pages 287–
314. Springer, Spring Street, New York, NY 10013, USA, 2012.
30 CIRRELT-2018-29
Optimizing Drinking Water Distribution System Operations
[12] B. Geiβler, A. Morsi, and L. Schewe. A new algorithm for MINLP applied to gas transport energy
cost minimization. In M. Jünger and G. Reinelt, editors, Facets of Combinatorial Optimization,
pages 321–353. Springer, Cologne, Germany, 2013.
[14] C. Giacomello, Z. Kapelan, and M. Nicolini. Fast hybrid optimization method for effective pump
scheduling. Journal of Water Resources Planning and Management, 139(2):175–183, 2012.
[15] K. James, S. L. Campbell, and C. E. Godlobe. Watergy: Taking advantage of untapped energy
and water efficiency opportunities in municipal water systems. Technical report, Alliance to Save
Energy, 2002.
[16] F. Liu, A. Ouedraogo, S. Manghee, and A. Danilenko. A primer on energy efficiency for municipal
water and wastewater utilities. Technical report, World Bank, 2012.
[17] M. López-Ibáñez, T. D. Prasad, and B. Paechter. Ant colony optimization for optimal control of
pumps in water distribution networks. Journal of Water Resources Planning and Management,
134(4):337–346, 2008.
[18] M. López-Ibáñez, T. D. Prasad, and B. Paechter. Ant colony optimization for optimal control of
pumps in water distribution networks. Journal of Water Resources Planning and Management,
134(4):337–346, 2008.
[19] A. Marchi, A. R. Simpson, and M. F. Lambert. Optimization of pump operation using rule-based
controls in EPANET2: New ETTAR toolkit and correction of energy computation. Journal of
Water Resources Planning and Management, 186:210–217, 2017.
[20] F. Martı́nez, V. Hernández, J. M. Alonso, Z. Rao, and S. Alvisi. Optimizing the operation of the
Valencia water-distribution network. Journal of Hydroinformatics, 9(1):65–78, 2007.
[21] D. Paluszczyszyn. Advanced modelling and simulation of water distribution systems with discon-
tinuous control elements. PhD thesis, De Montfort University, 2015.
[22] R. Rovatti, C. D’Ambrosio, A. Lodi, and S. Martello. Optimistic MILP modeling of non-linear
optimization problems. European Journal of Operational Research, 239(1):32–45, 2014.
CIRRELT-2018-20 31
Optimizing Drinking Water Distribution System Operations
[23] E. Salomons, A. Goryashko, U. Shamir, Z. Rao, and S. Alvisi. Optimizing the operation of the
Haifa-a water-distribution network. Journal of Hydroinformatics, 9(1):51–64, 2007.
[25] J. E. Van Zyl. A methodology for improved operational optimization of water distribution systems.
PhD thesis, University of Exeter, 2001.
[26] J. E. Van Zyl, D. A. Savic, and G. A. Walters. Operational optimization of water distribution
systems using a hybrid genetic algorithm. Journal of Water Resources Planning and Management,
130(2):160–170, 2004.
[27] D. Verleye and E.-H. Aghezzaf. Optimising production and distribution operations in large water
supply networks: A piecewise linear optimisation approach. International Journal of Production
Research, 51(23-24):7170–7189, 2013.
[28] Z. Y. Wu, P. Sage, and D. Turtle. Pressure-dependent leak detection model and its application to
a district water system. Journal of Water Resources Planning and Management, 136(1):116–128,
2009.
32 CIRRELT-2018-29