An Analytical Method for Designing of Municipal Water Supply and Distribution Systems

The clean Water Supply provision is one of the major factors greatly contributing to the socioeconomic transformation of a country. However, many countries have problems in fulfilling the water demand of the continuously growing population and populated areas due to the high level of water losses in distribution networks. Optimization of water distribution system design is one of critical research fields, which has been extremely productive. Its primary focus is to minimize the cost of a proposed pipe network infrastructure. The paper presents the results of research on the development of a new analytical design method that allows creating new water distribution systems or strengthening, expanding and rehabilitating existing water distribution systems, inclusive of design timing, parameter uncertainty, water quality, and other operational considerations. The method is based on the solution of hydraulic problem of a linear pipeline and the use of the newly developed software set for studying hydraulic processes. The solution is determined in the Mixed Integer Programming MIP and Discontinuous Nonlinear Programming DNLP connection modes. As research results show it is possible to expand and solve the problems of finding the locations of branching optimal lines connecting the sources (main distribution systems) and consumers. The task set and its solution opens a whole range of opportunities for its successful application in the most diverse branches of science and production.


Introduction
The growth of productive forces, exceptional in scale and rate, outlined by the State Resolutions, has determined a wide scope of hydroeconomic construction to supply water to populated areas, industrial enterprises, agriculture and other water consumers. Of the known raw materials, water is the most involved in the spheres of material production.
Definition symbols and basic graph-theory theorems, Graph G is a collection of two sets: vertices V and edges E, between which the incidence relation is defined. Each edge e of E is incident equal to two vertices v', v", which it connects. The vertex v' and the edge e are called incident to each other, and the vertices v' and v '' are called adjacent ones. It is common to write v', v'' of G and e of G. If |V(G)|=n, |E(G)|=m, then graph G is an (n, m) graph, where n is the order of the graph , m is the size of the graph. The edge (v', v'') can be oriented and have a beginning (v') and an end (v'') (an arc in the digraph) [1,2].
Problem of constructing optimal supply network for consumers and resource producers: In practice, it is often necessary to solve the problem of building supply networks for a group of spatially scattered consumers. These networks may be gas, electricity, Internet information networks, passage of ground and air transport and so on. Here we are interested in the problem of building a water supply network.
Statement of the problem is in relation to water supply issues. Let us assume that the coordinates of the location of a group of water consumers and water sources are known. It is assumed that the pipelines are capable to supply water to all consumers and the water withdrawal is so small that there are no such phenomena as insufficient pressure in the system or a lack of water in the water supply system [3,4,5,13].
It is necessary to connect all consumers to a water source in such a way as to provide the minimal total length of pipelines and minimal costs [3,4].

Materials and Methods
This problem in combinatorial science is called the "traveling salesman problem". A path of minimal length connecting all given points is called the Hamilton cycle. This problem in its classical statement for the first time was described in 1832 in a book titled "The travelling salesman -how he should behave and what he must do to deliver the goods and be successful in his affairs -an advice of old courier". The book described the problem itself, but the mathematical apparatus for its solution was not yet known. Since then, the problem has gained an official name "Traveling salesman problem", abbreviated TSP. The name "Traveling salesman problem," was suggested by Gasler Whitney of the Princeton University [6,7,8]. Particular attention and notable success in solving this problem were achieved in1980-s in connection with rapid development of computer technology. It is interesting that sometimes solutions were close to optimal, but not optimal. Many iterative algorithms have also been developed [2,3,4,5].
In connection with practical importance of this problem, the algorithms have their own names: full search, random search, nearest neighbor method, the method of including the nearest city, the cheapest inclusion method, the minimal spanning tree method, the annealing simulation method, the branches and borders method, the elastic network method.
Mathematical model of the TSP or the model of finding the Hamilton cycle [8,9,10] in the classical notation consists of a group of equations Where -is the total number of points connected by the Hamilton cycle, -is the index of the point in the Hamilton cycle at = 1. . , -is the index of the point in the Hamilton cycle at j= 1. . , but ≠ , -is the distance from point to point , -is the function to be minimized, -is a variable at = 1 , characterizing the presence of transition from point to point or the absence of transition from point to point at = 0, can take the values of a zero or a unit, , -is the order of visiting the point, , at ≠  The first equation does not need clarification due to its logic and simplicity.  The second equation requires one path from each point to another point.
 The third equation requires the path to each point from any other node.  The fourth inequality is somewhat difficult to perceive and it serves to ensure that there is only one Hamilton cycle and no small and loosely coupled loops (small cycles) appear. The meaning of the fourth equation is that when moving around in a circle, there is a growing order of visiting the point. At the number of points in the cycle equal to N, the inequality is satisfied, since one of the points will be the last in the cycle. At the number of points less than N, the same point can have a different visiting order and inequality (4) will not be satisfied. The effect of inequality (4) on the inadmissibility of small cycles has been widely investigated using classical combinatorial and algebra methods. It is the basis of all solution algorithms developed and applied in practice.
For the practical problem of optimal construction of water supply network for a group of consumers the Hamilton cycle may not be as optimal as it will be shown in the following examples. Lines connecting water consumers can branch. That is, the consumer may get water from one line but more than one line can leave the consumer. There may be simultaneously non-overlapping cyclic link-ups and branches connecting the lines of water consumers. To find the minimal water supply chains for consumers, a more generalized model is built based on (1), (2), (3), (4) models and the solution is shown.
Define the variable as a variable , depending on the number of the visiting time interval denoted by symbol . Obviously, the number of intervals for consecutive visits of each of N points will require a maximum of N time intervals, that is = 1. . .
Write the equations of the TSP modified model by the following group of equations Provided that i≠j and i does not belong to some pre-determined point or even a group of points, as discussed below. This fixed point is associated with the source of water "S" or the start of the path.
So, "S" is the subset of sources from the common set of points " " or " ". Let the water source be at the point " j 1 ". Equations (5) -> (9) Z are written according to the rules of the GAMS [11,12,13] optimization system and are presented without any transformations. The optimization 202 An Analytical Method for Designing of Municipal Water Supply and Distribution Systems mode of MIP and solver "CPLEX" are used. A special VBA script is written to graphically display the optimal solution in the MICROSOFT EXCEL environment. Time of the Hamilton cycle for 16 arbitrary points is 2 seconds on a 2-GHz processor machine. This shows not only the working capacity, but also the efficiency of the constructed mathematical model. Solution by an independent method yields the result 1426.686 and the same result is obtained when solving model (5) -> (9). It is important to note that if to set V <N =16, then some of the nodes do not get into the cycle and this will be an optimal elimination of the most remote nodes from the cycle. Obviously, the classical statement of the TSP cannot do this. If to add inequality (10) to the model (5) -> (9), then there will appear greater certainty in the TSP solution. This inequality prohibits a return to the start point of an open loop, which according to equation (9) can begin only at a point belonging to a set of source points.  Figure 2 shows that all points are connected to the source and the length of the links is 1211.615; this path is undoubtedly shorter than the Hamilton cycle shown in the figure by dotted lines. The end of the path is determined automatically, and it is optimally located. In this case, this is the right lower corner of the drawing (see Fig. 2).
It is easy to add to model (5) -> (10) the equations that force the path to end at a pre-determined point. For a set of points of the path end, we introduce the symbolic name Ԑ.
Equation (11) denotes that no one line leaves the point if it belongs to the set Ԑ.
For the case V <N (part of the points does not participate in the path formation), it is necessary to add an equation that causes the end point to be the part of the optimal path. Otherwise, the path can be determined without the point from which further motion is prohibited. The version "Nothing comes out of the point and nothing goes into the point" is satisfied. In other words, the point may be outside the optimal path. Figure 3 shows the optimal path with a fixed start and end. It is seen that the path has changed. The path became longer than the path with a free end (see Fig.2 L=1211.615) and is 1260.571 without the last additional section 148.216. If the coordinates of end and start points are set equal, then the mathematical model (5) -(12) results in the Hamilton cycle. It is necessary to remember that the starting point of the cycle and the end of the cycle, even if they are spatially coincident, will still be two different points belonging to different subsets. Organization of the model, more general than the classical one, allows to solve an additional range of problems. Suppose that it is possible to organize two or more optimal cycles or optimal (open) cycles having one starting point. Let's make the model start a cycle from each of the two starting points, and let the coordinates of the two starting and two end points coincide. First of all, it is stated that there are no two optimal cycles instead of one optimal Hamilton cycle. One of the cycles always degenerates to zero (there is a direct link between starting and end points) and the remaining cycle turns into a Hamilton cycle. Even the order of the model to the impossibility of zeroing the cycles leads to the formation of a cycle containing only one point. It is possible to draw a conclusion that has not yet been proven mathematically -the hypothesis that the Hamilton cycle is a minimally possible closed cycle from the group of cycles having one common point. The group has a total length greater than the Hamilton cycle. An example of the degeneration of a cycle into a single point is shown in Figure 4. The model behaves quite differently when searching for optimal paths with fixed ends of branches and free ends of branches, provided that the start points of the branches coincide. Figure 5 shows the optimal locations of open cycles with fixed start points and with free end points. is obvious due to the removal of one of the arcs of the graph. If the obtained branches are minimal in length, then the statement is proved. If the branches obtained are not minimal, then there is an even smaller branch or a pair of branches, which are surely smaller than the Hamilton cycle and the statement, is proved for the entire set of options.
Theoretical results obtained allow us to solve practical problems, which until now have been solved on the basis of personal preferences of the developers and planners. The general TSP does not allow to solve in the optimal way the problem of connection of water consumers to water sources. For example, the TSP could not solve the following problem: there is a constructed pipeline with water. There are three points of connection to this pipeline. There are a number of water consumers. The task is to connect water consumers to the pipeline using a minimum number of connecting pipes. Model (5) -(12) easily solves this problem, and the example is shown in Figure 6. The final consumer can be specified or selected by the model automatically and in an optimal way. However, in practice, the construction of water supply networks requires an increased reliability of water supply to consumers. This may be achieved by the condition of constructing ring networks -cycles in mathematical definition, in which each consumer can receive water from two directions. Sometimes a situation may arise when two consumers can not be connected to a pipeline due to relief of the terrain or the presence of structures hindering the supply. This practical problem is easily solved by model (5) -(12).
Enter into the scheme more than one start of the cycle and exactly the same number of the ends of the cycle. That is, there may be "M" number of cycles. The ends of the cycle and the starting points of the cycle must be the same. It seems that on the basis of above-stated, we would obtain a single cycle -the Hamilton cycle, the remaining ("M-1") cycles must degenerate into zeros. But this will happen if "N" intervals of time are used for "N" points, that is t=1..N.
If the number of calculated time intervals " " will be subject to inequality. = 1. . and ≤ ≤ Then it is possible that the number of optimal ring cycles will be more than one cycle, since the cycle will contain no more than " " Hamilton points. The value N o will determine the maximum number of consumers in one cycle. At = one Hamilton cycle is obtained. At = we would have M cycles with an approximately equal number of consumers in each cycle. Why approximately? Because will not always be an integer and the value shows the maximum permitted number of consumers in one cycle. For example: 22 consumers at 3 cycles at a number of time intervals equal to 8 can be distributed in cycles as follows 8 +8 + 6 = 8 +7 + 7 = 8 +6+8=7+7+8 and so on. Figure 7 shows three path (three cycles) optimal (in terms of the pipe length) water supply system, under assumption that the path can supply no more than 11 consumers. Figure 7. Connection of groups of 11 consumers to the existing pipeline in three optimal cycles; with the prohibition of link "j12" -"j21" and without the prohibition Figure 7 shows that if the link "j12" -"j21" between the consumers is prohibited then the three links are reconfigured and the point "j11" previously related to "j13" and "j10" turns out to be related to the points "j12" and "j21". The prohibition can be introduced into scheme by direct indication on the absence of a forbidden link or by increasing the path between the points to large values for which such a prohibition is introduced. It should be noted that other cycles have not changed. This is understandable since they are optimal.
In practice a problem of connecting distributed consumers to a single source often arise; the connection is allowed not only by sequential traversing of all consumers by any path, but also by branching.
To do so, it is necessary to slightly modify equations (9) and (10) in the form of (14) and (15) Where is the permitted number of branches at the point i, is the permitted number of connections to the source.
Equation (14) by mathematical formulas describes the fact that outgoing branches can be four times larger than the incoming ones. Equation (15) is so simple that it does not need an explanation. A series of calculations with different values of and has been carried out. The results are shown in Figure 8; they correspond to the parameters = 4 and .=4. As the check -up has shown the permission for 4 branches starting from one point and 4 branches leaving the source is excessive. The optimum is observed at two branches and two branches leaving the source are sufficient. The branching system turned out to be better than the Hamilton cycle and is optimal from the point of view of minimizing the segments connecting 27 points of this scheme.
Four branches or even three on a given spatial scheme of point's arrangement are not optimal.
By combining equations (5) -(15) into different groups, it is possible to find optimal schemes connecting the consumers to the sources. These are closed loops, open loops with fixed and free end points. This is a path with given number of consumers. These are branching schemes. The trivial TSP problem of one optimal path -the Hamilton cycle -is extended mathematically and more adequately corresponds to the practical tasks of logistics.

Conclusions
1. The task solved within the framework of this research will allow creating optimal water supply systems not only across the whole range of influencing parameters of pipelines but also in spatial arrangement of the pipelines. The solution is determined in the Mixed Integer Programming -MIP and Discontinuous Nonlinear Programming = DNLP connection modes. 2. The set and solved task opens up a whole range of possibilities for its use in various fields of science and production: electrical networks; network of Internet connections, and many others. It is quite possible to expand and solve the problem of finding the location of branching optimal lines connecting the sources and consumers. 3. The solved task also creates significant opportunities in design of roads and interchanges; in planning acceptable routes for flights and in the absence of direct flights. 4. New statement of the TSP problem will undoubtedly entail the development of new solution algorithms, which may well prove to be more efficient and just as successful as the one proposed in this article using the GAMS optimization system.