Skip to main content
Log in

A Depth-First Search Algorithm for Optimizing the Gravity Pipe Networks Layout

  • Published:
Water Resources Management Aims and scope Submit manuscript


The layout is displayed in one of the most complex tasks in the gravity pipe network project because there are several factors to consider and often a choice of unassociated or smaller layout. Currently, the designer’s experience is needed so different layout alternatives be analyzed to reduce the depths of the network. Generally, this operation is manual and does not ensure the best result. For this research, a depth-first search algorithm was presented, which allows the optimization of the layout of a gravity pipe network, assessing the topographic conditions of the manholes (nodes), leading to a layout that has the sum of lower unfavorable slopes. A hypothetical and a real network were used. The computational time required was considered negligible. The results showed a robust model, which works for the complete layout of any network, of any size, resulting in the lowest possible depths.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13

Similar content being viewed by others


  • Afshar MH (2006) Application of a genetic algorithm to storm sewer network optimization. Sci Iran 13(3):234–244

    Google Scholar 

  • Boaventura Netto PO, Jurkiewicz S (2009) Grafos: introdução e prática. Blucher, São Paulo

    Google Scholar 

  • Cormen TH (2013) Algorithms unlocked. MIT Press, Cambridge

    Google Scholar 

  • Cormen TH, Leiserson CE, Rivest RL, Stein C (2009) Introduction to algorithm. MIT Press, Cambridge

    Google Scholar 

  • Dajani JS (1971) Network evaluation of wastewater collection economics. PhD thesis. Northwestern University

  • Dajani JS, Gemmel RS, Morlok EK (1972) Optimal design of urban wastewater collection networks. J Sanit Eng Div Am Soc Civ Eng 98(6):853–867

    Google Scholar 

  • Dasgupta S, Papadimitriou CH, Vazirani U (2008) Algorithms. McGraw-Hill Higher Education, New York

    Google Scholar 

  • Deininger RA (1966) Computer aided design of waste collection and treatment systems. Proc., 2nd American Water Resource Conf., Univ. of Chicago, Chicago

  • Diogo AF, Graveto VM (2006) Optimal layout of sewer systems: a deterministic versus a stochastic model. J Water Res Plan Man 132(9):927–943

    Google Scholar 

  • Gameiro LFS (2003) Dimensionamento otimizado de redes de esgotos sanitários com a utilização de algoritmos genéticos. MSc dissertation. Mato Grosso do Sul Federal University

  • Haghighi A, Bakhshipour AE (2012) Optimization of sewer networks using an adaptive genetic algorithm. Water Resour Manag 26:3441–3456

    Article  Google Scholar 

  • Haith D (1966) Vertical alignment of sewers and drainage systems by dynamic programming. MSc dissertation. Massachusetts Institute of Technology

  • Heaney JP, Pitt R, Field R (2000) Innovative urban wet-weather flow management systems. EPA/600/R-99/029, U.S. Environmental Protection Agency, Cincinnati, USA

  • Holland ME (1966) Computer models of wastewater collection systems. PhD thesis. Harvard University, Cambridge

  • Kulkarni VS, Khanna P (1985) Pumped wastewater collection systems optimization. J Environ Eng Div (Am Soc Civ Eng) 111(5):589–601

    Article  Google Scholar 

  • Liebman JC (1967) A heuristic aid for the design of sewer networks. J Sanit Eng Div Am Soc Civ Eng 93(4):81–90

    Google Scholar 

  • Mai SW, Evans DJ (1984) A parallel algorithm for the enumeration of the spanning trees of a graph. Parallel Comput 1:275–286

    Article  Google Scholar 

  • Mays LW, Yen BC (1975) Optimal design of branched sewer system. Water Resour Res 11(1):37–47

    Article  Google Scholar 

  • Moeini R, Afshar MH (2017) Arc based ant colony optimization algorithm for optimal design of gravitational sewer networks. Ain Shams Engineering J 8(2):207–223.

    Article  Google Scholar 

  • Nzewi EU, Gray DD, Houck MH (1985) Optimal design program for gravity sanitary sewers. Civ Eng Syst 2:132–141

    Article  Google Scholar 

  • Pan TC, Kao JJ (2009) GA-QP model to optimize sewer system design. J Environ Eng 135(1):17–24

    Article  Google Scholar 

  • Russell SJ, Norvig P (2010) Artificial intelligence: a modern approach, 3rd edn. Prentice Hall, Upper Saddle River, NJ

    Google Scholar 

  • Steele JC, Mahoney K, Karovic O, Mays LW (2016) Heuristic optimization model for the optmial laytou and pipe design of sewer systems. Water Resour Manag 30:1605–1620

    Article  Google Scholar 

  • Velon JP (1971) Sewer cost – estimation model: an aplication. MSc dissertation. Northwestern University

  • Villas MV, Ferreira AGM, Leroy PG (1993) Estruturas de dados: conceitos e técnicas de implementação. Ed. Campus, Rio de Janeiro

    Google Scholar 

  • Walsh S, Brown LC (1973) Least cost method for sewer design. J Environ Eng Div 99(3):333–345

    Google Scholar 

  • Walters GA, Lohbeck T (1993) Optimal layout of tree networks using genetic algorithms. Eng Optim 22(1):27–48

    Article  Google Scholar 

  • Walters GA, Smith DK (1995) Evolutionary design algorithm for optimal layout of tree networks. Eng Optim 24(4):261–281

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations


Corresponding author

Correspondence to Gustavo Paiva Weyne Rodrigues.

Additional information

Publisher’s Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Rodrigues, G.P.W., Costa, L.H.M., Farias, G.M. et al. A Depth-First Search Algorithm for Optimizing the Gravity Pipe Networks Layout. Water Resour Manage 33, 4583–4598 (2019).

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: