You are on page 1of 7

2008/4 PAGES 1 7 RECEIVED 18. 5. 2008 ACCEPTED 4. 11.

2008

M. IST, Z. BAJTEK

Milan ist, PhD., Assoc. Prof

Research fields: irrigation, application of soft computing methods in water engineering

OPTIMAL DESIGN OF WATER


DISTRIBUTION SYSTEMS
BY A COMBINATION OF
STOCHASTIC ALGORITHMS AND
MATHEMATICAL PROGRAMMING

Zbynk Bajtek, Eng.

Research fields: design of irrigation networks, programming


Department of Land and Water Resources Management,
Faculty of Civil Engineering, Slovak University of
Technology,
Radlinskho 11, 813 68 Bratislava, Slovak Republic
e-mail: milan.cisty@stuba.sk

ABSTRACT

KEY WORDS

The paper demonstrates a new model for determining the minimum cost for the design of
a water distribution system based on a combination of linear programming methodology
and a genetic algorithms approach. The optimal design of looped hydraulic pipe networks
belongs to the class of large combinatorial optimization problems that are difficult to
handle using conventional operational research techniques. Although many research
efforts have been made for the sake of achieving the optimal design of large loop water
distribution networks, there is still some uncertainty about finding a generally reliable
method. The author of the paper proposes a method in which the complementary usage
of deterministic and soft computing methods will ensure a new level for the quality of
outputs. The method is based on a combination of linear programming methodology and
a genetic algorithms approach and is intended for use in drinking water systems and the
rehabilitation of pressurized irrigation systems as well.

Genetic Algorithm,
Linear Programming,
Optimal design of looped hydraulic pipe
networks

INTRODUCTION
A water distribution network is a system containing pipes, reservoirs,
pumps, and valves of different types, which are connected to each
other to provide water to consumers. It is an important component
of an urban infrastructure or agricultural landscape as an irrigation
project and requires significant investment. Therefore, researchers
are constantly searching for new ways to create more economical
and efficient designs. Although the problem of the optimal design of
water distribution networks has various aspects to be considered, it
is often viewed as a least-cost optimization problem with the pipe
diameters acting as the primary decision variables. In most situations,
the pipe layout, connectivity, and imposed minimum head constraints
at the pipe junctions (nodes) are taken as fixed design targets.

The crudest optimization procedure is to evaluate all the possible


parameter combinations and pick the optimum one. In practice, the
experienced design engineer will rely on his personal experience
to avoid analyzing every possible configuration. The result of the
design is to produce a few feasible solutions (solutions that satisfy
the design constraints), which can then be priced. On large systems,
a number of factors limit the effectiveness of a such manual design
method.
Gessler (1985) suggested a simplified approach based on the
enumeration of a limited number of alternatives. In his work, he
took advantage of two considerations:
After a combination of pipe sizes that give a hydraulically
feasible solution has been found, there is no need to test any other
pipe size combination that is significantly more expensive.

2008 SLOVAK UNIVERSITY OF TECHNOLOGY

Cisty.indd 1

10. 12. 2008 10:03:45

2008/4 PAGES 1 7

After an infeasible solution has been encountered, any other size


combination, with all the sizes equal to or less than those, is an
infeasible solution.
Alperovits and Shamir (1977) presented a linear programming
gradient (LPG) in optimizing a water distribution network.
A segmental length of pipe with a differential diameter was used
as the decision-making variable. Kessler & Shamir (1989) used
the linear programming gradient (LPG) method as an extension to
this method. It consists of two stages: an LP problem is solved for
a given flow distribution and then a search is conducted in the space
of the flow variables. Later, Fujiwara & Khang (1990) used a twophase decomposition method extending that of Alperovits & Shamir
(1977) to non-linear modelling. Also, Eiger, et al. (1994) used the
same formulation as Kessler & Shamir (1989), which leads to the
determination of the lengths of one or more segments in each link
with discrete diameters. Some of these methods impose a restriction
on the type of hydraulic components in the network. For instance,
the presence of pumps in the network increases the nonlinearity of
the problem; as a result networks with pumps cannot be resolved
by some of the methods. These methods also fail in resolving large
looped systems.
Recently, researchers have focused on stochastic optimization
methods. The advantage of these methods is that they allow full
consideration of a systems nonlinearity a problem with which the
previously mentioned methods fail.
Simpson, et al. (1994) used simple genetic algorithms (GA) in
which each individual population is represented in a string of bits
with identical lengths that encode one possible solution. The simple
GA was then improved by Dandy, et al. (1996) using the concept
of the variable power scaling of the fitness function, an adjacency
mutation operator, and gray codes. Savic and Walters (1997) also
used simple GA in conjunction with an EPANET network solver.
Other evolutionary techniques have also been applied to the
optimization of a water distribution system, such as ant colony
optimization algorithms (Maier, et al, 2001), simulated annealing
(Loganathan, et al, 1995; Cunha and Sousa, 2001) and harmony
search (Geem, 2002).

MATERIALS AND METHODS


In the proposed method two algorithmic techniques will be
employed linear programming (LP) and genetic algorithms (GA).
A combination of these two methods with the aim of eliminating
the limitation of LP (it is not suitable for large networks with loops)
is used.
Genetic algorithms are search procedures inspired by the mechanics
of natural genetics and natural selection. This methodology is finding

Cisty.indd 2

increased application to solve difficult problems of engineering,


science, and commerce. The present usage of evolutionary based
optimization techniques stems largely from the development of
evolution strategies by Rechenberg in Germany in the 1960s and
the development of genetic algorithms by Holland in the USA soon
afterwards. The basic ideas are briefly summarized below; a good
introduction to the subject is given by Goldberg (1989).
The first step is to represent a legal solution to the problem by a string
of genes (seeking parameters) that can take on some value from
a specified finite range. This string of genes, which represents the
solution, is known as a chromosome. Then an initial population of
legal chromosomes is constructed at random. With each generation,
the fitness of each chromosome in the population is measured.
The fitter chromosomes are then selected to produce offspring for
the next generation, which inherit the best characteristics of both
parents. This process is repeated until some form of convergence
in fitness is achieved. The goal of the optimization process is to
minimize or maximize the fitness.
In the case of the design of a pipe network the optimization
problem can be stated as follows: minimize the cost of the network
components subject to satisfactory performance. The chromosome
can be a binary or integer string of numbers (representing possible
decisions), which defines the networks design. Care must be taken
to incorporate all reasonably possible choices for each component
in the system, with an appropriate set of costs from which all the
schemes can be priced. In general, the more choices and flexibility
in the design options allowed at this stage, the greater the savings
will be for the optimized design.
A model is then set up, which incorporates all the options for
the individual network components. The GA then generates trial
solutions, each of which is evaluated by simulating its hydraulic
performance. Any hydraulic infeasibility, for example, failure to
reach a specified minimum pressure at any demand point, is noted,
and a penalty cost is calculated. Operational (e.g. energy) costs can
also be calculated at this point if required. The penalty costs are
then combined with the predicted capital and operational costs to
obtain an overall measure of the quality of the trial solution. From
this quality measure the fitness of the trial solution is derived.
The process can continue for many thousands of iterations, and
a population of good, feasible solutions will evolve.
For the purpose of clarity we will also briefly describe also the
optimization procedure of the pipeline networks optimization using
linear programming. The mathematical formulation of this problem
is as follows:
X11 + X12 + ...+ X1n = B1
X21 + X22 + ...+ X2n = B2
etc.
Xm1 + Xm2 + ...+ Xmn = Bm
(1)

OPTIMAL DESIGN OF WATER DISTRIBUTION SYSTEMS BY A COMBINATION ...

10. 12. 2008 10:03:47

2008/4 PAGES 1 7

A11 X11 + A12 X12 + ...+ AxyXxy C1


etc.

(2)

D1 X11 + D2 X11 + ...+ Dj Xmn = min

(3)

The solution has to comply with the inequalities:


X11 > 0; X12 > 0 etc. up to Xmn > 0

(4)

Where Xij is
Bi
Amn
Ci
Di

unknown length of selected diameter j on section i


total length of section
hydraulic loss in section m and diameter n
allowable total loss for section
price of pipeline with diameter number i

When, in order to resolve the task of rehabilitating the pipeline


networks, we apply linear programming, the unknown will be the
lengths of the individual pipeline diameters. In conditions (1) we
must mathematically express the requirement that the sum of the
unknown lengths of the individual diameters in each section has
to be equal to its total length. The second type of the equation in
constraints (2) represents the request that the total pressure losses
in a hydraulic path between a pump station and critical node (the
end of the pipeline, extreme elevation inside the network) should
be equal to or less than the known value. This constraint is based
on the minimum network pressure requirement needed for the
operation of the system. Given the minimization requirement for the
investment costs, the objective function (3) sums up the products of
the individual pipeline prices and their required lengths.

RESULTS
Mathematical programming methods, which undisputedly lead
to global optimality, can be applied only in the case of branched
networks with no loops for a single loading. In the case of looped
networks, even for the simplest case of a least cost design, under one
single loading for a gravity fed network (no tanks, no pumps), the
debate about global optimality is still, today (after about 40 years),
a research issue. In fact, for looped networks, no deterministic
theoretical methods exist to reach global optimality. For this reason
various heuristic methods are applied to these problems.
But while using heuristic methods (e.g. GA), problem of testing it
arises. Tasks which heuristic methods are capable of solving (e.g.,
the optimization of a looped network) are often not possible to solve
with any other methods, especially not deterministic methods. So it
is not possible to prove their mathematically reliability of them. For
this reason it is obvious to use the so-called benchmark networks
for testing. The problem which follows is that commonly used

benchmark networks are relatively small water distribution systems,


and the question always remains how the developed methods will
work in large (real life) systems.
We conducted some experiments for this reason. For the GA
method it does not matter if it resolves a looped or branched
network. It is possible to optimize both of these configurations, but
it is advantageous to use it for looped networks, because branched
networks without loops could be absolutely reliably resolved by
a linear programming method. But, for the purpose of testing
we used GA for resolving a large branched network. In the next
step it is also possible to resolve the same network with linear
programming. Because the result from the linear programming is
without doubt global minimum, we can see how close GA gets
to this goal. This is competent testing of GA or another heuristic
methodology on a large network. Because, as previously mentioned,
there is no methodological difference for GA when it is used to
resolve a branch or looped network, we can extrapolate that the
precision in finding an optimal solution will be similar in the case
of a looped network. From the results it could be derived that there
is still a reason to look for a competent method for optimizing
water distribution network, because the differences in the various
hydraulic schemes were about 5-15%.
The proposed method is based on a combination of linear
programming methodology and a genetic algorithms approach. The
main idea is that linear programming is more reliable than heuristic
methods, but because it is not suitable for resolving looped networks,
the GA method is used for decomposing a complex looped network
into a group of branched networks - each with identical hydraulic
behavior as a looped network with identical diameters. Identical
hydraulic behavior means that there are identical flows in the
corresponding pipes and identical pressures in the corresponding
nodes in looped and branch networks. Decomposition by GA
should only be done on large networks - for smaller networks, all
possible branched networks could be found to which it is possible to
transform the original looped network in the optimization process.
The optimization models using LP are then set up for each member
of this group of branched networks. After evaluating (by LP) the
high number of possible branch networks which produce local
minima, an optimal global solution could be easily chosen for the
original looped network.
The loop can be transformed to a branch layout without changing
the hydraulic behavior of the network if we split the loop in the
node in which flows are coming to from both sides. It is one from
the demand nodes (in which water is taken from a network e.g.,
a hydrant). But which node it is depends on other network conditions
as the pump station location, diameters and lengths of pipes, other
demand allocations, etc. Because we do not know these parameters
before the diameters on network are proposed (that is the task which

OPTIMAL DESIGN OF WATER DISTRIBUTION SYSTEMS BY A COMBINATION ...

Cisty.indd 3

10. 12. 2008 10:03:49

2008/4 PAGES 1 7

we are solving), a loop split will be done in every demand node, and
then we will propose diameters in such a manner that this meeting
of flows will happen in this node. In this way we can produce many
alternatives of splitting the network into branched. The node which
was chosen for this splitting must be doubled; the original node
will be assigned to one link from which the flow is coming to the
node and its twin node to another link from the opposite side of the
original node. The demand in the node will be divided into these
two nodes with a rational number of alternatives. The number of
alternatives depends on the amount of the demand a high demand
in a node requires more alternatives. So the number of demand
nodes multiplied by the number of these alternatives of demand
splitting gives the number of possible branch networks to which it
is possible to divide a one-loop network.
A network may consist of more than one loop, of course. For this
reason the following algorithm intended for the transformation of
a looped network to a branched one will be run:
1. The number of loops will be determined on the original
network:
L=PJ+1

4. Every alternative (row in the matrix) for every loop will be


combined with each other row in the matrices for other loops in
the network, which produces a group of branch networks for LP
computation.
5. All the alternatives are evaluated in the case of total enumeration
(for small networks), or the alternatives from step 4 are selected
by a genetic algorithm when searching for the optimal solution in
large networks.

(5)

Where L is the number of loops


P the number of pipes
J the number of junctions

Fig. 1 Schematic network with 3 loops

Tab. 1 Split matrix for loop 1 from Fig. 1


2. For every loop the vector of links (pipes) which it consists of
will be determined. This will be done in successive steps to
loop after loop and when some link has already been assigned to
any previously analyzed loop (it is already part of another loop
vector of pipes) it will not be assigned to a vector of links of the
currently analyzed loop. This assignment of pipes to loops is
graphically shown on fig. 1a (by line types).
3. To every loop a three-column matrix (tab. 1) will be assigned.
Table 1 demonstrates loop 1 from fig. 1. It will consist of
a column for split nodes N in which the loop can be divided
and from the column of split links L (which are part of the loop
vector determined in the previous step and which are connected
to N). The original node N will be cloned to its twin node N-L
for the sake of splitting the loop (this twin node N-L replaces the
original node N on link L fig. 1b or 1c nodes 5-4 or 5-5). For
every node N one or more links L could be assigned for which
we can obtain different branch networks while splitting the loop
in node N. The third parameter is the ratio R in which the original
demand in node N will be divided between nodes N and N-L. In
table 1 only 3 ratios are considered (0.25, 0.5 and 0.75), and as
can be seen for the first combination of N and L, it will produce
3 versions of this split alternative of the loop. The same situation
holds for the other combinations of L and N.

Cisty.indd 4

Split node

Split link

Split ratio

0.25

0.5

0.75

0.25

0.25

0.25

0.25

0.25

0.25

0.25

OPTIMAL DESIGN OF WATER DISTRIBUTION SYSTEMS BY A COMBINATION ...

10. 12. 2008 10:03:52

2008/4 PAGES 1 7

Tab. 3 Node data for the two-loop network

Fig. 2 Two-looped network

The test problem is a two-loop network with 8 pipes, 7 nodes


and one reservoir (Fig. 2) which was obtained from the literature
(Alperovits & Shamir, 1977). All the pipes are 1000 m long, and the
Hazen-Williams coefficient is assumed to be 130 for all the pipes.
The minimum nodal head requirement for all the demand nodes is
30 m (0,3 Mpa). There are 14 commercially available pipe diameters
(Tab. 2).
The network consists of two loops, so two three-column matrices
(described in step 3 above) were determined for each of them.
For the first loop it is for pipes 2, 3, 4 and 7 and for the second
Tab. 2 Cost data for the two-loop network
Diameter

(mm)

152

203

254

Cost

(units)

11

16

23

32

(mm)

305

356

406

457

508

559

610

(units)

50

60

90

130

170

300

550

Diameter
Cost

25.4 50.8 76.2 102

Node

Demand
(m3/h)

Ground level
(m)

1 (Reservoir)

-1,120.0

210.00

100.0

150.00

100.0

160.00

120.0

155.00

270.0

150.00

330.0

165.00

200.0

160.00

5, 6 and 8. The computations show, that it was not necessary to


choose a smaller ratio R for dividing the original demand in the
node between the twin nodes than 0.1. This led to 1452 possible
combinations of branch networks to which the original looped
network was transformed. For performing linear programming
computations the solver LPSOLVE was called from software
originally developed by the authors of the paper. Because of
the relatively small number of iterations, it was also possible to
run a total enumeration of the problem. The GA was set up with
integer coding, and the chromosome consists of four genes. The
first gene is the indicator of the pair: split node split link for the
first loop (every possible pair is numbered); the second gene is
the dividing ratio for the first loop R1 multiplied by ten. The third
and fourth genes are analogous to the second loop. Roulette wheel
selection is used to chose the parents for the next generation.
A one-point crossover was selected because of the relatively
short chromosome, and the probability of the selected pair of
strings being subjected to the crossover operator was taken as
pc=0.97. The mutation rate was set to be pm= 0.02. The objective
function is the cost of the solution. No penalty function was used,
because the LP that is in the proposed algorithm final producer
of every partial solution produces in contrast to GA only feasible
solutions. The results together with the results from other authors
testing their methods on this benchmark network are summarized
in table 4.
As can be seen, the optimal solution was reached by the proposed
method. In Eigers work a different interpretation of the HazenWiliams equation was used than in other works (it is common to use
the interpretation which is embedded in the Epanet network solver,
which was also used in our work). This leads to the result that
there are some nodes in the Eiger solution in which there is smaller
pressure of 0,3 MPa than was required.
Our solution gives the same results either using GA or if a total
enumeration is performed.

OPTIMAL DESIGN OF WATER DISTRIBUTION SYSTEMS BY A COMBINATION ...

Cisty.indd 5

10. 12. 2008 10:03:54

2008/4 PAGES 1 7

Tab.4 Results for benchmark network


Pipe
number

Alperovits and
Shamir (1977)

Kessler and Shamir


(1989)

Eiger et al. (1994)

D [mm]

L [m]

D [mm]

L [m]

D [mm]

L [m]

D [mm]

L [m]

D [mm]

256.00

508.0

1000.00

457.2

1000.00

457.2

1000

457.2

1000.00

457.2

744.00

457.2

996.38

8.0

66.00

304.8

238.02

304.8

1000

254.0

202.00

304.8

3.62

152.4

934.00

254.0

761.98

254.0

798.00

254.0

1000.00

457.2

1000.00

406.4

1000.00

406.4

1000

406.4

1000.00

406.4

319.38

8.0

713.00

76.2

1000.00

25.4

1000

101.6

1000.00

25.4

680.62

152.4

287.00

50.8

1000.00

406.4

836.00

406.4

628.86

406.4

1000

406.4

693.00

406.4

164.00

355.6

371.14

355.6

307.00

355.6

990.00

254.0

10.00

203.2

902.00

254.0

98.00

203.2

1000.00

25.4

6
7
8
Cost

784.94

304.8

109.00

304.8

989.05

254.0

215.06

254.0

891.00

254.0

10.95

8.0

1000.00

152.4

819.00

254.0

921.86

254.0

181.00

8.0

78.14

8.0

1000.00

25.4

990.93

152.4

920.00

76.2

9.07

101.6

80.00

50.8

497 525

417 500

402 352

419 000

1000
1000
1000

254.0
254.0
25.4

403 454

SUMMARY AND CONCLUSIONS


Although the genetic algorithms method helps in many areas of
engineering, including the design or operation of water distribution
systems, it has some disadvantages:
it cannot guarantee the generation of an optimal solution,
particularly for large-scale systems
it requires extensive fine-tuning of the algorithmic parameters,
which are highly dependent on the individual problem
it can produce solutions in which the diameters can be optimally
found from an economic point of view, but the diameters could
in some conditions be distributed randomly: for instance, for the
branched part of networks there could be bigger diameters in
some parts after smaller ones in the direction of the flow which
is wrong.
For these reasons the authors of this paper propose a method in
which genetic algorithms are incorporated, but the final solution is

Cisty.indd 6

ist (2008)

L [m]

Geem (2002)

produced by linear programming. This method is described in the


paper and tested on a benchmark network successfully. The method
can also be run without GA with a total enumeration (e.g., totally
eliminate randomness), which of course takes more CPU time. This
gives opportunity for comparing the results with and without GA.
By involving GA, we get results much earlier. In the paper this
testing is done on a benchmark model; large network testing will be
presented in future works.

ACKNOWLEDGEMENT
This study was supported by the Scientific Grant Agency of the
Ministry of Education of the Slovak Republic and the Slovak
Academy of Sciences, Grants No. 1/0496/08, 1/0585/08 and by
Slovak Research and Development Agency, Grant No. APVV0443-07.

OPTIMAL DESIGN OF WATER DISTRIBUTION SYSTEMS BY A COMBINATION ...

10. 12. 2008 10:03:57

2008/4 PAGES 1 7

REFERENCES

ALPEROVITS, E. AND SHAMIR U. (1977): Design of


Optimal Water Distribution Systems. Water Resources Research,
AGU, vol.13, no. 6, pp.885-900
CUNHA, M. C. AND SOUSA, J., (2001): Hydraulic
infrastructures design using simulated annealing. Journal of
Infrastructure Systems, ASCE, 7(1), 32-39.
DANDY, G. C., SIMPSON, A. R., AND MURPHY, L. J.
(1996): An Improved Genetic Algorithm for Pipe Network
Optimization, Water Resources Research, 32(2), 449.
EIGER, G., SHAMIR, U. AND BEN-TAL, A. (1994): Optimal
Design of Water Distribution Networks, Water Resources
Research, 30(9), 2637-2646.
FUJIWARA, O. AND KHANG, D.B. (1990): A Two-Phase
Decomposition Method for Optimal Design of Looped Water
Distribution Networks, Water Resources Research, 26(4), 539549.
GEEM, Z. W., KIM, J. H. AND LOGANATHAN, G.
V. (2002): Harmony search optimization: application to
pipe network design. International Journal of Modelling and
Simulation, 22(2), 125-133.
GOLDBERG, D.E. (1989): Genetic Algorithms in Search,
Optimisation and Machine Learning. New York, AddisonWesley.

KESSLER, A. AND SHAMIR, U. (1989): Analysis of the


Linear Programming Gradient Method for Optimal Design
of Water Supply Networks, Water Resources Research, 25(7),
1469-1480.
LOGANATHAN, G. V., GREENE, J. J. AND AHN, T. J.
(1995): Design heuristic for globally minimum cost waterdistribution systems. Journal of Water Resources Planning and
Management, ASCE, 121(2), 182-192.
MAIER, H. R., SIMPSON, A. R., FOONG, W. K., PHANG,
K. Y., SEAH, H. Y., AND TAN, C. L. (2001): Ant Colony
Optimization for the Design of Water Distribution Systems,
Proceedings of the World Water and Environmental Resources
Congress, Orlando, Florida, USA
SAVIC, D. A. AND WALTERS, G. A. (1997): Genetic
algorithms for least-cost design of water distribution networks,
Journal of Water Resources Planning and Management, ASCE,
123(2), 67-77.
SIMPSON, A.R., DANDY, G.C., AND MURPHY, L.J.
(1994): Genetic Algorithms Compared to Other Techniques for
Pipe Optimization, Journal of Water Resources Planning and
Management, ASCE, 120(4), 423-443.

OPTIMAL DESIGN OF WATER DISTRIBUTION SYSTEMS BY A COMBINATION ...

Cisty.indd 7

10. 12. 2008 10:04:00

You might also like