“…Figure 1 shows the graph of a general tree network. To clearly describe the network components and properties, a tree network is represented by a connected graph T(V, E) (Che et al, 2022;Zecchin et al, 2014), which includes the node set (i.e., all vertexes) V = {(v 1 ), (v 2 ), …, (v N )} and the pipe set (i.e., all edges) E = {[e 1 ], [e 2 ], …, [e P ]}, where v n = ID number of the nth node in V and e p = ID number of the pth pipe in E. Node set V can be further classified according to the direct connectivity of a node with boundaries (e.g., reservoirs, valves, and dead ends) -that is internal node set V in , where different pipe ends meet, and external node set V ex , where a pipe connects to a boundary, such that V = V in ∪ V ex , where ∪ = union operator (Karney & McInnis, 1992). An external node links only one pipe, whereas an internal node connects at least two pipes.…”