1. Introduction
Water distribution systems (WDSs) are critical infrastructures that deliver potable water from water sources to end-users. The design and expansion of WDSs is a well-known research problem in which the planner is seeking the best design that meets the users’ needs. The least-cost design of WDSs has been an active research topic since the 1970s. In this problem, the objective is to find the minimum cost configuration for each of the hydraulic components in the system (such as the pipe diameters, tanks and pump capacities) subject to different operational (e.g., minimum pressure requirement) and physical constraints. The main physical constraints are the steady-state water mass conservation and energy conservation in the network for a given set of demands (e.g., demand-driven approach).
Initially, most research efforts of the WDSs research community focused on using the analytical (i.e., derivative-based) methods to optimize the design and operation costs of WDSs. These traditional analytical methods include dynamic programming [
1], linear programming [
2,
3,
4], and non-linear programming [
5]. One important milestone is the linear programming gradient (LPG) method [
2]. The LPG method is considered one of the most popular, if not the most, traditional analytical methods. The attractiveness of the LPG method is due to the “wise” decomposition of the least-cost problem that utilizes the special mathematical characteristics of the equations. More specifically, the design problem is decomposed into two stages: (1) linear programming stage, in which a WDS is designed for a given flow distribution; and (2) gradient stage, in which shadow variables of the linear programming stage is used to find a new flow distribution that can reduce the overall cost of the WDS design. The ingenious of the LPG method is that it handles the apparently nonlinear optimization problem using LP formulation, without the need to linearly approximate the different equations. This is done by observing that the nonlinear equations of the problem are nonlinear with respect to the diameters of the pipes but they are linear with respect to the pipes’ length. Utilizing this characteristic, one can consider the segmentation of a pipe into segments of given diameters with unknown lengths instead of considering the diameters as unknowns, thus the problem becomes linear for a given set of flows in the first stage of the LPG method.
Two decades later, meta-heuristic techniques, such as genetic algorithms [
6,
7,
8,
9], simulated annealing [
10,
11], tabu search [
12], harmony search [
13,
14], the shuffled frog leaping algorithm [
15], particle swarm optimization [
16,
17], ant colony optimization [
18,
19,
20,
21], memetic algorithm [
22] and differential evolution [
23,
24,
25], became the dominated tools to address the least-cost design problem. The main advantage of using meta-heuristic techniques over the traditional analytical methods is that the meta-heuristic techniques are able to deal with the nonlinear-discrete nature of the WDS design problems without the need for decomposition and/or changing the original decision variables. Moreover, it allows for seamlessly using available hydraulic simulation tools (e.g., EPANET) within a simulation-optimization framework without the need for explicit formulation of the hydraulic simulation equations. Meta-heuristic techniques are demonstrated in many studies as an effective tool to find an optimal or near-optimal WDS design. Nevertheless, recently, traditional analytical methods are regained research interest [
26] for their computational efficiency and the opportunity to utilize the recent developments in analytical optimization solvers. Most of these attempts coupled/embedded traditional analytical methods with/within meta-heuristic techniques to reduce the search space and thus improve the efficiency of the meta-heuristic techniques. These include using (1) LPG method [
10] and genetic algorithm [
27] to replace the second gradient stage and (2) a combined non-linear programming (NLP) and differential evolution (DE) approach [
28], in which NLP is used to locate the approximate region of the optimal solution while the DE is used to explore the identified region.
The least-cost design and operation problem of WDSs can be divided into two interconnected sub-problems: (1) WDS design, a discrete optimization problem, and (2) WDS operation, a continuous optimization problem. Despite the interconnectedness of the two problems (due to the obvious tradeoff between the capital and the operational cost), limited research has been conducted to solve these two problems simultaneously. The first attempt was made by using the pipes’ segmentations technique described above [
2]. As such, the discrete WDS design-operation problem is projected into the continuous domain and the two interconnected sub-problems can be formulated as one continuous optimization problem in which both the design and the operation are solved simultaneously. However, there are two disadvantages that are associated with the LPG method when it is used to solve the design-operation problem: (1) the loop and quasi-loops energy equations are unlikely to be balanced when the number of loading conditions and the size of the network increase; (2) flows from the water sources must be pre-selected for each of the loading conditions. It is proposed in the LPG paper [
2] that two dummy valves have to be added to each loop and quasi-loop in the system. Moreover, a high penalty cost should be assigned to each of the dummy valves such that the LP solver will try to remove these dummy valves if possible. Otherwise, a physical valve must be added to the system [
2], in which it states “If, on the other hand, it is found that one of these dummy valves does appear in the optimal solution, this means that a real valve is needed at that point if the network is to operate as specified”. Using the proposed technique of adding valves, may lead to substantial number of valves added to the system when considering a large network and/or a large number of loading conditions. In addition, the requirement for pre-selecting source flows for each of the loading conditions in the LPG method will determine the tanks size and limit the design options of the pumps. Thus, leading to reduced feasible region of the problem that may result in suboptimal solutions.
In this study, a novel iterative two-stage LP-NLP method is introduced to solve the simultaneous least-cost design and operation problem of WDSs. The proposed two-stage method begins by partitioning a WDS into a spanning tree component and a chord tree component. The flows in the chord tree pipes are randomly initialized, thus the flows in the spanning tree pipes became resultant variables, which can be calculated as a function of the chord flows. The chord tree pipe flows and spanning tree pipe flows are combined to form a flow distribution of the network that will always satisfy the mass conservation equations. Given the flow distribution in the network, the first stage of the proposed two-stage method solves the design problem as an LP by utilizing the segmentation technique described earlier. This reformulated LP stage represents a significant improvement when compared to the LP stage of the LPG method as the penalty cost can be dropped consistently by carrying out the LP solver repeatedly as an inner-loop (as will be explained in Methodology Section), thereby unlike the LPG method, there is no need to add additional network elements. The WDS design obtained in the first stage is then used in an NLP stage to find a new set of chord tree pipe flows that reduce the WDS operational cost, thus unlike the LPG method, it allows for changing the sources’ flows. These updated chord tree pipe flows are then parsed to the reformulated LP stage iteratively. The iterative process will continue until a user-defined stopping criterion is met. The two-stage LP-NLP method has been applied to two case studies, the performance of which is evaluated using average cost, minimum cost, and maximum cost of all trials performed. In addition, the time required to apply the proposed methodology on both case studies is also reported.
There is a number of advantages for using the proposed two-stage method to find the least-cost design and operation of WDSs: (1) the reformulated LP stage can consistently drop the penalty cost when designing a WDS with multiple loading conditions without any inclusion of additional network elements; (2) it is robust against the increase of the number of loading conditions; (3) no parameter tuning is required; (4) the method reduces the computational burden significantly when compared to meta-heuristic methods, and (5) it can cope with a larger WDS when compared with NLP method.
This paper is organized as follows. Definitions and notations are given in the next section. The following section provides the formulation of the linear programming and non-linear programming models, followed by a description of the proposed methodology as well as a discussion about the proposed two-stage method as compared to other methods. This is followed by the applications of the proposed two-stage method on two case study networks that demonstrate the advantages of using the proposed method. These results are then discussed and conclusions are drawn in the last section.
2. Definitions and Notation
Consider a WDS that contains pipes, junctions, tank nodes, pumps, reservoir nodes, chord tree pipes, spanning tree pipes, simulation time steps, and as the time step duration.
The node of the network has two properties: its nodal demand and its elevation head . Let denote the vector of nodal demands, denote the vector of heads, and denote the vector of elevations for junction nodes.
The pipe of the network can be characterized by its diameter , length , flows , and Hazen-Williams resistance factor . Let denote the vector of pipe flows and denote the vector of resistance factors.
The tank of the network can be characterized by its volume , minimum tank volume , maximum tank volume , tank elevation , cross-sectional area , tank outflow , and tank head . Let denote the vector of tank volumes, denote the vector of tank minimum volumes, denote the vector of tank maximum volumes, denote the vector of tank elevations, denote the vector of tank cross-sectional areas, denote the vector of tank flows, and denote the vector of heads for tank nodes.
The pump of the network has four properties: its efficiency , its operating power , flow , and maximum pump power . Let denote the vector of pump efficiencies, denote the vector of pumps operating power, denote the vector of pump flows, denote the vector of pump heads, and denote the vector of maximum pump powers.
The reservoir of the network can be charactrized by its elevation . Let denote the vector of elevations for reservoir nodes.
The matrix is the full column rank node-arc incidence matrix for junction-head nodes, in which is the full column rank node-pipe incidence matrix and is full column rank node-pump incidence matrix. The matrix is the source-arc incidence matrix for fixed-head nodes, in which if the reservoir-pipe incidence matrix, is the tank-pipe incidence matrix, is the reservoir-pump incidence matrix, and is the tank-pump incidence matrix. Denote by , a identify matrix.
4. Simplification of the NLP Constraints Using Reformulated Co-Tree Flows Method (RCTM)
The reformulated co-tree flow method (RCTM) [
29] is proposed to exploit the relationship between the chord-tree flows and spanning-tree flows. This is achieved by applying the Schilders’ factorization [
30] to permute the
matrix into a lower triangular square block matrix at the top, representing a spanning tree, and a rectangular block matrix below, representing the corresponding chord-tree.
The steady-state flows and heads in a WDS system are modelled by the demand-driven model (DDM) continuity equations (Equation (
13)), the pipe energy conservation equations (Equation (
14)), and pump energy conservation equations (Equation (
15)), which can be expressed as:
It is worth noting that the third block row in Equation (
19) is added to create a square 4 by 4 block matrix for the permutation operation later.
The RCTM starts by generating a permutation matrix:
where
is the square orthogonal permutation matrix for the edges, in which
is the permutation matrix that identifies the pipes in the spanning tree as distinct from those in the chord-tree and
is the permutation matrix for the pipes in the chord-tree edges,
is the permutation matrix for the nodes to have the same sequence that are traversed by the corresponding spanning tree edges. It is assumed that the set of all pumps is a subset of chord tree edges, therefore, the spanning tree edges only includes pipes.
The permuted system equation of the RCTM is given below. Note that we omitted the dependency of
on
and dependency the time index
t hereinafter for ease of notation.
The permuted system equation in Equation (
21) can be expressed as:
has been shown to be a lower triangular matrix [
29]. Therefore, the flows in the spanning tree pipes can be written as a function of the flows in the chord tree edges:
Moreover, nodal heads can be written as a function of the spanning tree flows:
where
is a permuted vector of
h,
and
is the resistance factor of the spanning tree pipes, subject to Equations (
15) and (
25).
where
and
is the resistance factor of the chord tree pipes.
Equations (
23)–(
25) imply that the decision variables of the spanning tree flows
and the nodal heads,
h, could be eliminated from the optimization problem of the NLP. This could be done by eliminating the equality constraints in Equations (
13)–(
15), and substituting the definition of
(Equation (
23)) and the definition of the nodal head (Equation (
24)) within the optimization problem defined in the previous section. Nonetheless, the restriction in Equation (
25) must be fulfilled. Noting that
is a function
and
, the LHS of Equation (
25) could be written as a vector of nonlinear functions (of length
) as follows:
That is, the new NLP problem will have
pipes’ flow decision variables instead of
pipes’ flow decision variables, and will have less equality constraints since the equality constraint in Equation (
26) will replace the three equality constraints in Equations (
13)–(
15).
The new constraint in Equation (
26) is a reformulation of the loop and quasi-loops energy balance equations of the simulation problem after defining the spanning-tree flow as a function of the chord-tree flows using the RCTM. It is possible to introduce two vector of non-negative artificial variables that are used to guarantee the mathematical feasibility of the constraint in Equation (
26). Adding, these artificial variables is a key component of the two-stage approach which will be presented in the next section.
where
and
are two vector of positive artificial variables that are used to balance the loop energy balance equations and path energy balance equations. Nonetheless, the addition of the artificial variable, will require adding a penalty cost (
), which is the cost associated with infeasible constraints, in the objective function of the optimization problem. The
can be expressed as:
where
E is the penalty multiplier,
is the index of a chord tree pipe.
6. Relation of the Proposed Method to Other LP Methods
The proposed algorithm is an iterative method that optimizes the operation and design of a WDS simultaneously. It consists of two stages: (1) an iterative LP design stage and (2) an NLP stage as shown in
Figure 1.
In the first stage of the proposed methodology, the flows in the chord tree pipes are required to be initialized instead of having to initialize for the flows in all pipes, which reduces the number of decision variables by
when compared to the existing LPG. In addition, the corresponding spanning tree flows that are calculated from the chord tree flow will satisfy the continuity equations automatically. Moreover, a penalty reduction mechanism is introduced using the new initialization method of the chord tree flows. This is because the penalty cost that is associated with each of the loops and independent paths has to be represented by adding two valves in the original LPG method, whereas the chord tree flows in the proposed method can be corrected within the inner iterations of Stage 1 using Equation (
30). As a result, the penalty cost of output from Stage 1 of the proposed methodology will always be minimal.
In the second stage of the proposed methodology, the resistance factors in all pipes are used as the input for this stage and updated chord tree pipe flows are generated by solving NLP problem. This stage is used to replace the search technique used in the LPG method. The LPG method focuses the search of its second stage on the minimization of the pipe and pump capital cost. This can be seen from each of the two case studies in [
2] that the initial guesses of the sources’ flow are the same as the optimal sources’ flow (i.e., the sources’ flow and as a result the tanks volumes, remained the same during the iteration process). As a result, LPG method cannot change the amount of water supplied from each of the sources of a WDS, thereby (1) restricting the LPG’s ability to design the tanks in a WDS (
) and (2) limiting the LPG’s ability to design and operate the pumps (
) by fixing the pump flows. Contrarily, the proposed methodology focuses the search of its second stage in the minimization of
while using the basic design of the network from the result of the first stage.
Comparing the NLP in the second stage of the proposed method with the original NLP formulation shows that the energy balance constraint is a nonlinear function of the flows in the chord tree pipes
and flows in the pumps
, which has significantly less nonlinearity both in nature and in number compared to the energy balance constraint in original NLP. More specifically the NLP in the second stage is advantageous, because: (1) the number of independent decision variables in flow vector is reduced from the number of pipes to the number of chord tree pipes; (2) the vector of nodal heads is an independent decision variables in NLP formulation whereas it becomes a dependent (and thus it could be eliminated) decision variables in the proposed two-stage formulation; (3) smaller number of constraints is required in the second NLP stage of the proposed two-stage method because of the equality constraint in Equations (
13)–(
15) are eliminated; (4) because the resistance is a parameter in the second stage NLP, the value of which has been determined in the LP stage, the number of nonlinear terms and the degree of nonlinearity in the second stage NLP of the proposed method offers a lower degree of complexity when compared to the original NLP formulation.