This paper discusses the development of an easy-to-use, all-in-one model for designing optimal water distribution networks. The model combines different optimization techniques into a single package in which a user can easily choose what optimizer to use and compare the results of different optimizers to gain confidence in the performances of the models. At present, three optimization techniques are included in the model: linear programming (LP), genetic algorithm (GA) and a heuristic one-by-one reduction method (OBORM) that was previously developed by the authors. The optimizers were tested on a number of benchmark problems and performed very well in terms of finding optimal or near-optimal solutions with a reasonable computation effort. The results indicate that the model effectively addresses the issues of complexity and limited performance trust associated with previous models and can thus be used for practical purposes.

The conventional approach to designing water distribution pipe networks is trial and error. A designer first assigns reasonable values to the design variables and analyzes the system using a simulation model, such as EPANET, to check whether the system requirements are satisfied. Based on the analysis results, the designer makes some changes in the design and analyzes the system again; the process is repeated until a “satisfactory” solution is found. This method of design, however, does not guarantee a low-cost system, let alone an optimal one. In addition, its application to large distribution systems tends to be exceedingly tiresome and time consuming. An alternative to this method of design is the optimization approach, in which the network design is formulated as an optimization problem to be solved using appropriate methods.

The optimization approach to designing pipe networks has been the focus of several studies in the past, and numerous mathematical models have been developed using different optimization techniques, including classical linear programming (Calhoun, 1971, etc.) and nonlinear programming (Lansey and Mays, 1989; etc.), as well as several stochastic search techniques, such as simulated annealing (Cunha and Sousa, 1999), ant colony optimization algorithms (Maier et al., 2003) and genetic algorithms (GAs), which are by far the most widely used (Simpson et al., 1994; Savic and Walters, 1997; and many others). More recently, mixed-integer nonlinear programming has also been used (Bragalli et al., 2012).

The user interface of the all-in-one model.

Despite such significant research efforts and the development of numerous models, the application of the models for practical purposes has been limited, mainly because of the complexities associated with the use of the models and inadequate trust in their performances. In this study, bearing in mind that pipe network optimization models would be useful in developing countries where there is a need to construct new systems and expand existing ones to cope with high population growth and rapid urbanization, we have attempted to address the issues of complexity and limited trust. To that end, we have developed an easy-to-use, all-in-one model by combining different optimization techniques into a single package in which a user can easily choose what optimizer to use and compare the results of different optimizers to gain confidence in their performances. At present, three optimization techniques are included in the model: linear programming (LP optimizer), genetic algorithm (GA optimizer) and a heuristic one-by-one reduction method (OBORM optimizer). An overview of the model, how each optimizer works and the performance of the optimizers on test problems is presented in the subsequent sections.

The dialogue box for GA parameter adjustment.

The model is organized with special attention to simplicity and ease of use. Figure 1 shows the user interface of the model, which is developed in Microsoft Visual Basic (VB) 6.0. The first step for users is to create an EPANET input file of the system to be designed and save it in the project folder. Here, EPANET's input file format is adopted because EPANET is believed to be the most widely used distribution system modeling software. The next step is to create a text file containing commercial pipe data, which is a list of the available discrete sizes and their unit costs, and save it in the same folder. If the system has to be designed under multiple loading conditions, a demand pattern data file should also be created and saved in the same folder. After specifying the name of the output file and setting the common parameters and pipe diameter and length units, the user simply needs to choose and run one of the three optimizers by checking the radio button. If the first radio button is checked, the LP optimizer will be ready to be run without any parameter adjustment. Both the GA and OBORM optimizers have a few parameters to be adjusted. Figure 2 shows the dialogue box for GA parameter adjustment.

The three optimizers were previously developed by the authors in FORTRAN and have recently been compiled as separate DLL functions and added to the VB project as modules. As a precondition for using the model on a Windows platform, the optimizer DLL functions should be copied to the Windows system folder. It should be clear that while the LP optimizer provides optimal solutions for a branched networks design, there is no guarantee that the solutions obtained using the GA and OBORM optimizers will be optimal. However, in most cases they are “near-optimal” and satisfactory.

A simplified flowchart of the LP optimizer.

Since pipes are only available in discrete sizes, pipe costs and friction losses are both linearly related to pipe length, and pipe flows do not depend on pipe sizes, and the branched network design can be easily formulated as an LP problem by partitioning a pipe section into several segments of different diameters and then finding the optimal lengths of each segment with the aim of minimizing the total pipe cost of the network while satisfying the constraints.

The LP optimizer solves the nonstandard LP problem formulated this way using a two-phase method, which applies the well-known simplex method in two phases. As depicted in Fig. 3, after obtaining the necessary information through the user interface, the LP optimizer first reads input data, which includes network pipes and nodes as well as commercial pipe data. Then it identifies the end nodes in the network and generates the flow paths to each end node. The velocity of flow in each pipe and each discrete size is then calculated to exclude sizes that violate velocity constraints. The generation of first-tableau matrix elements is a crucial step that requires a careful look into the formulation of the branched network LP problem. Once this matrix is generated properly, the problem can be easily solved using the two-phase method.

The basic steps in standard GA.

The application of LP in pipe network design is not new, but the improvement in this study is that routine tasks, such as generating the flow paths and matrix elements of the first tableau as well as interpreting the optimal results, are all automated in order to make the model easy to use, hence saving effort and time for the user.

The GA optimizer basically applies the standard GA procedure shown in Fig. 4. First, an initial population is generated randomly. The individuals in the population are strings that are usually made up of binary bits (0 and 1), and the decimal value of each string represents a trial solution to the problem. The initial population is transformed into a new population by using the three basic GA operators: selection, crossover and mutation. The new population then undergoes a similar transformation and the process is repeated until a preset maximum generation number is reached. Of the three GA operators, selection is the most important. To select individuals from the current population for further reproduction, the survival probability (SP) of each string should be calculated. This requires analyzing the network represented by each trial solution, adding penalty costs to the objective functions when the pressure head and other constraints are violated, calculating fitness and performing scaling to avoid premature convergence.

A simplified flowchart of the OBORM.

In addition to these basic steps, heuristic improvement is introduced in the GA optimizer to address the slow convergence issue that is associated with standard GA. The improvement is based on the hypothesis that the probability of obtaining better individuals (strings) increases with an increase in the average performance of the population. The average population performance is supposed to, and generally does, increase from generation to generation. However, on some “bad” occasions, it deteriorates, as does the performance of the best string in a given generation, which contributes to the slow convergence. In the heuristic improvement, the strings are ranked based on their objective values, and a deteriorating string is replaced with a string of the same rank from the previous population. This avoids the occasional deterioration of the population while maintaining its variability or randomness.

The OBORM, a simplified flowchart of which is shown in Fig. 5, is a simple yet
efficient heuristic method previously developed by the authors, mainly for
designing looped networks. It can also be applied to solving other
nonlinear combinatorial optimization problems in which the decision variables have finite discrete solution spaces. When applied to pipe
network design, the OBORM initially sets the sizes of all the pipes to
certain
maximum values. At this stage, both the pipe cost and the pressure head at the end nodes
have maximum values. Then the pipe sizes are reduced one by one until any
further reduction will result in a violation of any of the constraints. At
every step, the pipe that
results in the smallest pressure head drop at the most depressed node in the
network (

The layout of a hypothetical branched network.

The layout of a hypothetical branched network.

A comparison of the results for the branched network design problem.

A comparison of the results for problem 2.

The performances of the optimizers have been tested on a number of benchmark problems. Here, only two of the problems are presented for the purpose of performance illustration. The first is a new branched network design, while the second is a simple yet typical looped network expansion problem.

Figure 6 shows the layout of a hypothetical branched network, which was modified
from Lansey and Mays (1989) and has 16 pipes, 16 junction nodes, 7 end nodes
and a single source. The source pump at node 17 is assumed to operate at
a steady condition with a flow of 6400 gpm and a total head of 220.2 ft. Network
nodes and pipe data are given in Table 1. Thirty discrete pipe sizes of 1 in
to 30 in are considered and the unit cost of the pipes (USD ft

The LP model for this problem has 23 equations and 487

The network layout for problem 2 (after Simpson et al., 1994).

The 14-pipe network shown in Fig. 7, which was first studied by Simpson et
al. (1994), is used to illustrate the performance of the GA and OBORM in
designing looped networks. As shown, 5 of the 14 pipes are
new and have to be sized (with 1 of the 8 available discrete sizes), and
3 of the existing pipes may be duplicated with a new pipe in parallel,
but not necessarily so; the remaining 6 existing pipes are to be left
as they are. The network has to be designed to satisfy three demand
patterns: a peak hour demand and two fire demands. With a solution space of
8

The problem was solved using the GA and OBORM optimizers, and both arrived at
the best-known solution that was also found in previous studies. To see how
fast the GA optimizer could converge on the optimal solution, the population
size and maximum generation number were set to 50 and 100, respectively, and
the optimizer was run 10 times with different seed numbers. The optimal
solution was found in all 10 runs. The generation number at which the
optimal solution was attained varied from 19 to 59 and had an average value
of 38. This makes the average number of evaluations needed to arrive at the
optimal solution 5700 (

With the aim of addressing the mathematical complexity and limited-performance trust issues associated with previous pipe network design models, we developed an easy-to-use, all-in-one model by combining three optimization techniques into a single package in which a user can easily choose what optimizer to use and compare the results for different optimizers to gain confidence in their performances. Based on its simplicity and the outstanding performance of the optimizers on several benchmark test problems, it is hoped that the model can be used for practical purposes, particularly in developing countries where a lot has to be done to reach the millions of people living without access to safe drinking water and to cope with the increasing demand in rapidly growing urban areas. However, the authors fully agree with the reviewers that the model should be tested in real-world case studies before it is made available for practical applications. An increase in the scale of the network to be designed will not cause much complexity in branched systems since this problem can be effectively handled using the LP optimizer. However, some challenges are expected in looped systems, such as the computational burden of using GA and the quality of the model outcome. The best way to tackle the challenges is first to solve the problem using the OBORM, which is much less sensitive to model parameters, and then refine the results using the GA optimizer. Research is currently underway to further improve the convergence property of the GA and to include other distribution system components, such as tanks and pumps, into the all-in-one model.

No data sets were used in this article.

The authors declare that they have no conflict of interest. Edited by: E. Abraham Reviewed by: two anonymous referees