<<

Transactions on Ecology and the Environment vol 12, © 1996 WIT Press, www.witpress.com, ISSN 1743-3541

Mathematical optimization of the main distribution system of Hanoi, Vietnam

R.G. Cembrowicz,* S. Ateg," K.M. Nguyen^ "Institut Wasserbau und Kulturtechnik, University of Karlsruhe,

76 128 Karlsruhe, Germany ^Design Company and Sanitation, Hanoi, Vietnam

Abstract

Many expanding in developing countries suffer from insufficient technical . Water supply is considered with priority to improve environmental conditions. The greater part of any cost of urban water supply is due to distribution. Network rehabilitation aims at flow and pressure improvements, leakage and quality control, systems design. With scarce finances, limited trained personnel, with climate, customs and traditions different from foreign standards systems analysis becomes a mandatory tool. Whereas various simulation models are available, few methods of network optimization exist capable to treat large systems. Hence, an optimization program will be presented suited to planning in practice and to include desirable citeria. The program is based upon a sequence of algorithmic steps encompassing a decomposition principle from Graph Theory, Linear Programming, Evolution Strategies. The planning application to the city of Hanoi refers to the year 2010. Taking into account uncertain future data, emphasis was placed upon sensitivity analyses sometimes regarded the true benefit of optimization. The results show the corresponding impact of parameter changes upon the design. Different future scenarios can be investigated in support of the final planning decision.

1 Introduction

In modeling, so far two areas have attracted priority attention. First, historically, network simulation was introduced to calculate flows and head losses of an existing system. Methods for this purpose date back fifty years [1]. Meanwhile, substantial mathematical and algorithmic sophistication has been added [2,3]. Software packages are available handling large networks, counting boosters and , and standpipes. Computer programs, supported by graphics and data bank functions extend the simulation to include dynamic systems behaviour of control and consumption, of time-variant change and travel of constituent concentrations in the network. Simulation, analysing the hydraulic performance, has become a powerful tool serving several ends.

Transactions on Ecology and the Environment vol 12, © 1996 WIT Press, www.witpress.com, ISSN 1743-3541

164 Software

Recent revival of network simulation is attributed to the world-wide pro- liferation of urban water supply without securing adequate maintenance. Complex technical systems necessitate appropriate maintenance lest they forfeit the intended benefit. Networks, working intermittently, deliver- ing more unaccounted water than supplied - of unsafe quality - are in quest for appropriate design criteria. Optimization, the second popular area of network modeling, is the tool to accommodate required criteria. Both the need to economize and the necessity to ensure sustainability by appropriate design criteria are facilitated using optimization models. Hardly an area has been tackeled by a similar onslaught of algorithms as water supply network optimization. First, trial & error estimates of dia- meters were simply supplemented by simulation to subsequently verify the hydraulic feasibility. Recognizing the nonlinearity of the problem gradi- ent methods were introduced [4]. Transportation algorithms also appeared suitable, water supply networks accomplishing principally transportation.

Dynamic Programming was able to follow the flow through the pipes in time-steps. However, a breakthrough came with the mathematical proof that the cost optimal design of a branch networks is obtained by Linear Programming [5]. This ingenious discovery produced, in addition, optimal standard size diameters without resorting to approximations. Recently, the obsolete trial & error techniques of network design were successfully refined by concepts of biological evolution and genetics [6,7,8,9]. This was also extended to calibration by a concept marrying simulation and optimization [10]. Questions are sometimes raised regarding optimization in planning pro- cesses since the exactness of computations is seen in the light of soft data associated with parameter estimates for a design reaching into the future. Though soft data do not automatically call for trial & error designs if bet- ter methods are available, the advantage by optimization is cost savings. Savings can be guaranteed at 10% of a design furnished by a consultant using simulation methods, they may as reach 20 or 30%. These sa- vings weigh in a since large cities are often concerned. Referring to the issue of soft data, knowledge upon the impact of a dif- ferent parameter estimate is desirable. The very capacity of optimization models to perform sensitivity analyses regarding future consumption, in- terest or energy rates, etc. may be as helpful as acquiring a definite cost minimum designfigure ,whil e trial & error methods discourage repeated computations, investigating systematically scenarios. The savings extend to the job of deriving the design in the first place.

It is evident that network optimization should be preferably applied to the main distribution grid rather than including secondary lines as well being unamenable to reduction.

Transactions on Ecology and the Environment vol 12, © 1996 WIT Press, www.witpress.com, ISSN 1743-3541

Hydraulic Engineering Software 165

2 Mathematical Model

The standard engineering objective is to minimize cost subject to con- straints defining additional criteria. Let the capital cost including install- ment, appurtenance and maintenance of a network of lines j, consisting of dj diameters of lengths /y, be:

J.VJA/fiT. lit,) . /\/ ^ Cr*~ j•1 L J• - ,— — /\ 7^ /vULJ • f /tj />,{J rj L • (~\ \j \11)

3 J

With Cj denoting the unit cost per length (commonly 1 < /? < 1.5). In case of pumping, the present value of pumping costs amounts to:

the cost factor cf summarizing present value, maintenance, dimension factor and unit pumping cost. At high pressure pumping nodes, i £ /p, the input flow

*i =<"&-£, (3)

u>j containing dimension and friction, roughness, capacity factors with respect to the pipe material. The exponents in different formulations of eq. (3), e.g. 8 = 1.85 or

2.0,6 = 4.87 or 5.0 according to 'Hazen-Williams' or 'Darcy-Weisbach', are indicating an equal nonlinear behaviour. Substituting the diameters in eq. (1), using eq. (3), the overall objective function including investment and operation cost follows to:

Introducing the incidence matrix A whose activities [a^] are +1 and/or — 1 if the flow in line j enters and/or leaves node 2, and are 0 if line j is not incident upon node 2, also defining the vector of demand and input flow q = (<%), of the pressure potential p = (pj, of the potential pressure requirement P = (?;), of head loss h = (hj) and flow / = (fj) the hydraulic constraints to be observed reduce to a linear set of equations:

Af = q (5)

A^p = h (6) P>P (7)

Transactions on Ecology and the Environment vol 12, © 1996 WIT Press, www.witpress.com, ISSN 1743-3541

166 Hydraulic Engineering Software

The pressure requirement P at any node is a design criterion, likewise demand and flow input q. Note, that eq. (5) and (6) correspond to Kirchhoff's first and second law, stating mass and energy balance, eq. (6) serving in addition to define the pressure potential p in terms of h. Since the hydraulic formulation (3) has been incorporated into the model, the optimization program (4) - (7) includes the 'hydraulic network balance % previously also referred to as Network Simulation.

This formulation of the water supply network optimization problem yields a nonlinear model whose objective function (4) is nonconvex and multi- modal with respect to the variables / and h (and/or p) [11] to be determined. However, the objective function is concave with respect to the flows / and convex with respect to the head losses h. Hence, since the constraints set (5) - (6) is linear, the program has a unique solution if the flows are known. It can then be solved for the unknown head losses. On the other hand, the concavity of the objective function with respect to the flows indicates economies-of-scale with respect to the flows. Hence, as a necessary condition for a minimum cost solution, the flows must be con- centrated as much as possible in as few mains as possible. This condition is met by any 'tree' derived from the original reticulation according to graph theory. The flows in a 'tree' (i.e. branch network) are known for any given supply/demand at the nodes.

Any branch network represents a local cost minimum. The cost optimiza- tion of a branch network is achieved by Linear Programming [12,13,14].

In this, using eq. (3), the lengths of unknown standard size diameters are substituted by the previously unknown head losses being a function of the length of the diameter installed. The results of the LP are optimal standard size diameters and corresponding pumping heads. It remains the problem to evaluate the existing number of local minima represented by the number of branch networks derived from a given reticulation. Only small networks allow for a total enumeration of the number of existing trees, given by T = \AA^\ of the original reticulation [15]. An intelligent search is required. This is provided by Genetic Algorithms and Evolution

Strategies.

3 The Algorithm

Over the last years Genetic Algorithms and Evolution Strategies have al- most become established in water supply network optimization. Whereas binary coding is associated with Genetic Algorithms and influencing the choice of the variables thus leading to a 'genotype' model, Evolution Stra- tegies tend to respond more to the physical properties of the problem complying with engineering perception, leaning towards 'phenotype' mo- dels [16]. Usually a mix proves efficient. The driving mechanisms common to either technique include mutation, recombination, selection.

Transactions on Ecology and the Environment vol 12, © 1996 WIT Press, www.witpress.com, ISSN 1743-3541 Hydraulic Engineering Software 167

The approach chosen here also reflects that these techniques rather happen to be an art than a rigorous school. Like a gear-shift two different Evolution Strategies, each devised for its respective purpose, are applied in series performing,first , a search into the dictance of the solution space, second, scanning the vicinity of a local solution thus driving into the direction of the global according to the principles of evolution. The first strategy derives from the fact that local cost minima of the network optimization problem are associated with the branch networks, as explained above, concentrating the network flow in as few mains as possible. Evidently, given the reduction to a skeleton network represented by a branch network, offspring designs generated may differ significantly in terms of topology and cost. Generating trees is tantamount to screening the solutions space for distinctly different designs available in the set of branch networks. The 'chords' are the missing lines of the original reticulation producing a tree. The corresponding operations of mutation and recombination are therefore applied to the chords. Random changes serve to select new chords in a loop - representing the process of mutation - chosen randomly from at most 50 % of the loops of an initial population of trees, determined randomly; two random parent trees of the population are recombined in a way that the offspring obtains his chords from either parent alternatively, determined randomly [9]. Thus, the first Evolution Strategy of the algorithm works on the topology.

In any network whose flows are known the optimal diameters can be determined by Linear Programming. The branch network generated above must be supplemented by the chords to regain the original reticulation.

Since the flows in the existing branch networks are balanced a correction term A/ is introduced for any loop in order to observe the flow balance and to allow for flow adjustments at the same time. After any adjustment another LP run serves to determine the optimal diameters in the reticulate system. The variation of A/ is implemented by random increments of A/, applied to at most 20% of the loops, the standard deviation of the increments being adjusted according to the performance of the design in terms of cost [9]. Thus, the second Evolution Strategy of the algorithm works on the . The application of these two strategies in sequence resembles a gear-shift.

4 Hanoi Existing Water Supply

Hanoi, capital of Vietnam, located on the Red 100 km inland of the sea of China, occupies an area of 49km'*. The estimated population of about 1.1 million (1995) enjoys a mean yearly temperature of 23.4°C.

Within the city area are numerous and ponds, and streams. The annual rainfall varying between 1200 and 2200 mm is also held responsible for a flow fluctuation of the Red River between 350 and 22000mV«s (1956- 1985).

Transactions on Ecology and the Environment vol 12, © 1996 WIT Press, www.witpress.com, ISSN 1743-3541 168 Hydraulic Engineering Software

The existing public water supply, operated by the Ha Noi Water Company, reaches into all four urban districts of Hanoi: Hoan Kiern, Ba Dinh, Dong Da and Hai Ba Trung. The only water source used by the Company is . The safe yield of the wellfields presently in use plus new wellfields identified for exploitation is estimated at 685 000 m?/d satisfying the demand projected for 2010. Except in the southern parts of the city the quality of the groundwater is still considered good. Eight main plants with corresponding pumping stations are located within the urban area, half of them rehabilitated and expanded under the Hanoi Water Supply Program assisted by FINNIDA, two additional plants recently constructed:

Plant Year of Initial Design Prodiuction

Constr./ Capaicity Captacity in 1994 Rehabil. m*Id raVd m »/d

Mai Dich I&II 1988 30 000 60 000 56 570 1991 30 000 Phap Van 1989 30 000 30 000 27 837 Ngoc Ha I 1939/79 1 000 25 000 15 054

Ngoc Ha II 1992 30 000 30 000 28 384 Luong Yen I 1959/88 9 000 15 000 Luong Yen II 1991 30 000 30 000 40 136 Ngo Si Lien 1978/92 60 000 60 000 40 648

Yen Phu 1970/92 20 000 40 000 39 683 Tuong Mai 1962/87 18 000 30 000 27 853 Ha Dinh 1967 18 000 40 000 27 474

Total 360 000 323 639

Water is supplied to the consumers either through individual service connections or public hydrants. The greater part of people served by house connections suffer from insufficient pressure, intermittent supply, inadequate . Several problems have been identified. For example, seven elevated tanks (total volume 3600ra^) are not connected to the network due to insufficient pressure and poor structural conditions. The function of elevated tanks would be to improve the pressure gradient in the network. A vicious circle existed since the state and capacity of the existing mains prevented raising the pressure in order not to increase water losses, and the supply continued to decrease. The most serious problem is still considered the high level of unaccounted water, defined as proportion of water produced without generating the desirable revenue.

Consequently, a comprehensive network replacement program has been executed over the last years. At the horizon is the concern that a large city cannot rely on groundwater in the long run unless waste water is also adequately collected and controlled.

Transactions on Ecology and the Environment vol 12, © 1996 WIT Press, www.witpress.com, ISSN 1743-3541

Hydraulic Engineering Software 169

5 Hanoi Planned Main Distribution

Optimization of the main water supply network defined by diameters > 300mm was performed for the year 2010, based upon a population estimate of 1.6 million people and a design flow of 11.22 m* /s correspon- ding to a domestic consumption of 180 led, industrial use of 35 m* /ha/d, peak load factor of 1.68 (peak day factor 1.4, peak hour factor 1.2). The system will be fed by 11 water treatment plants with subsequent high lift pumping, three of which still to be constructed, each with a capacity of 140000 m*/d. The graph of the network layout (Fig. 1) comprises 170 lines, 124 nodes and 47 loops, a total network length of 155.27 km. The total number of trees T - 1.069 x 10" certainly precludes total enumeration.

The following set of standard size diameters of ductile and steel, k — 0.5 mm, except PE for 300 mm, k — 0.3 mm, with corresponding capital cost including installation and appurtenance per unit length, was to be used in the design: Diameter mm 300 400 500 600 800 1000 1200 1500

Cost $/m 42 63 115 154 244 305 374 460 Maximum velocities in the pipes were restricted to 2.2 m/s, the energy rate was assumed to 0.05 $/KWh. A 'social rate of discount' i [17] was employed to transfer the time stream of pumping cost to a present value, represented in the objective function, considering an economic operating time horizon of 15 years (1995-2010), as the reference time in the optimization. The lifetime of the pipes was subject to sensitivity analysis. Investigating a lifetime of 30 and 50 years, respectively, the capital pipe cost were discounted to corresponding annuities, 15 years of which to be considered in the objective function. Though the concept of a salvage value was introduced this way the economic operating time horizon can also be derived from a balance of revenue and cost rather than assuming an arbitrary value. Other scenarios included the variation of the interest rate assumed to i — 3% and 5%, and of the minimum supply pressure at any node with P = 28.5 m and 35.0 m, respectively.

The sensitivities encountered bear significance upon the data collection and care devoted to data projections. Some of the conclusions from the results of the sensitivity analyses were: - A shorter lifetime of the pipes increases the annuity resulting in higher total cost without hardly raising pumping

- Higher pressure requirements at the nodes is mainly answered by increase of pumping rather than larger diameters for lower interest rates - Lower interest rates increase the present value of pumping, they

consequently raise investment and total cost.

Transactions on Ecology and the Environment vol 12, © 1996 WIT Press, www.witpress.com, ISSN 1743-3541 170 Hydraulic Engineering Software

The optimal results of seven scenarios are displayed in the following table:

No Life- Mi:Q P i F Pipe Emergy Total Total time rn (?\ Cost^ C Cost* Cost% 10* $ 10* $ 10* $ 10* $ 10* $

1 30 35.00 5 10.662 15.790 21.135 31.797 36.925 2 30 28.50 5 11.737 17.382 17.477 29.214 34.859 3 30 35.00 3 10.197 16.742 23.408 33.605 40.150 5 16.819 17 27.540 34.796 4 50 28.50 9.563 .977 5 50 35.00 3 8.208 17.691 23.397 31.605 41.088 6 50 28.50 3 8.249 17.779 19.517 27.766 37.296 37 30 35.00 5 14.852 21.995 17.681 32.533 38.676

* Present value of annuities accounted over 15 years operation time ^ Present value of total investment cost ^ Excluding existing pipes

Fig. 2 shows the two-step Evolution Strategies optimizing Scenario No. 4. TREEGEN started with initial costs of a population of 10 designs between $ 30.461 and $ 36.176 mill., converging after 65 generations to $ 24.572 mill, and $ 24.657 mill., respectivley, after evaluating a total of 650 feasible and 2 infeasible trees. Convergence was assumed after 5 generations showing no improvements. The final population contained three different trees. Based upon these trees the generation of flows, FLOWGEN, started with designs complemented to the original reticulation by adding chords.

The initial cost differed between $ 32.661 and $ 35.372 mill., accordingly. After 90 generations convergence was reached to a single design at $ 27.540 mill., having evaluated a total of 900 feasible and 15 infeasible solutions. The crossing-over probability decreased, imitating a learning population, from initially 0.3 to 0.004528. Using a Workstation HP-UX 9000 the computing time with TREEGEN was about 6 sec, and with FLOWGEN about 4 sec for one design, the greater part due to solving the LP.

6 Summary

Water supply network optimization has become a valuable tool. This is in particular true for developing countries if both cost minimization is achieved and desirable design criteria are observed. A model is presented consisting of a sequence of algorithms including Graph Theory, Linear

Programming, Evolution Strategies. Planning the main distribution grid of the city of Hanoi in 2010 sensitivity tests also showed the impact of a change of parameter estimates upon the optimal design. The authors acknowledge partial funding by the Deutsche Bundesstiftung Umwelt

(German Environmental Federal Foundation). The DA AD (German Academic Exchange) supported the graduate work of Ms Kim Minh Nguyen at the University of Karlsruhe including her contributing thesis 'Hanoi Water Supply Systems Simulation and Optimization'.

Transactions on Ecology and the Environment vol 12, © 1996 WIT Press, www.witpress.com, ISSN 1743-3541

Hydraulic Engineering Software 171

LEGEND Treatment Plant Not to Scale

Figure 1 : Hanoi - Main Water Distribution Network 2010 40

TREEGEN FLOWGEN Population size: 10 Population size : 10 35 -

i so

o o

25 -

20 -i ' 1 1 1 1 1 1 1 1 1 1 1 1 h 0 20 40 60 80 100 120 140

Generation Figure 2 : Convergence of Evolution Strategies, Scenario No. 4

Transactions on Ecology and the Environment vol 12, © 1996 WIT Press, www.witpress.com, ISSN 1743-3541

172 Hydraulic Engineering Software

References

1. Cross, H. Analysis of Flow in Networks of Conduits or Conductors, Bulletin No. 286, University of Illinois, Engineering Experimental

Station, Urbana, Illinois, 1936. 2. Nielsen, H.B. Methods for Analyzing Pipe Networks, ASCE Journal Hydr. Eng., 1989, Vol. 115, No. 2, 243-257. 3. Rossman, L.A. EPANET - Users Manual, US Environmental Protec-

tion Agency, Risk Reduction Eng. Lab., Cincinnati, Ohio, 1993. 4. Alperovits, E. & Shamir, U. Design of Optimal Water Distribution Systems, Research, 1977, Vol. 13, No. 6, 885-900. 5. Labye, Y., Etudes des Precedes de Calcul ayant pour But de Rendre

Minimal le Cout d'un Reseau de Distribution d'Eau sous Pression, La Houille Blanche, 5, 1966, 577-583. 6. Goldberg, D.E., Genetic Algorithms in Pipeline Optimization, Jour- nal of Computing in , 1987, 1, 128-141.

7. Walters, G. & Lohbeck, T. Optimal Layout of Tree Networks Using Genetic Algorithms, Engineering Optimization, 1993, 22, 27-47. 8. Dandy, G.C., Simpson, A.R. & Murphy, L.J. An Improved Genetic Al- gorithm for Pipe Network Optimisation, Water Resources Research,

1996, Vol. 32, No. 2, 449-458. 9. Cembrowicz, R.G. Evolution Strategies and Genetic Algorithms in Water Supply and Waste Water Systems Design, Water Resources and Distribution, ed W.R. Blain & K.L. Katsifarakis, Computational

Mechanics Publ., Southampton-Boston, Vol. 1, pp 27-41, 1994. 10. Savic, D.A. & Walters, G.A. Genetic Algorithm Techniques for Cali- brating Network Models, Report No. 95/12, Centre for Systems and Control Engineering, University of Exeter, England, 1995.

11. Cembrowicz, R.G. Water Supply Systems Optimization for Deve- loping Countries, Pipeline Systems, ed. B. Coulbeck & E. Evans, Kluwer Academic Publishers, Dordrecht, The Netherlands, 1992. 12. Karmeli, D., Gadish, Y. & Meyers, S. Design of Optimal Water

Distribution Networks, ASCE Journal Pipeline Div., 1968, Vol. 94, No. PL1, 1-10. 13. Deb, A.K. Optimization of Water Distribution Network Systems, ASCE Jour. Env. Eng. Div., 1976, Vol. 102, No, EE4, 837-851. 14. Bhave, R. Optimization of Gravity-Fed Water Distribution Systems:

Theory, ASCE Journal Env. Eng., 1983, Vol. 109, No. 1, 189- 205. 15. Trent, H.M. A Note on the Enumeration and Listing of all Possible Trees in a Connected Graph, Proc. Math. Academy of Science, 1954, No. 10, Vol. 40, 97-102.

16. Rechenberg, I. Evolutions strategic, Friedrich Frommann Verlag, Stutt- gart, 1973. 17. Marglin, St.A. Public Investment Criteria, The M.I.T. Press, Cam- , Mass., 1967.