A linear programming approach to optimise the management of water in dammed river systems for meeting demands and preventing floods

Water in sufficient quantity and quality is indispensable for multiple purposes like domestic and industrial use, irrigated agriculture, hydropower generation and ecosystem functioning. In many regions of the world, water availability is limited and even declining. Moreover, water availability is variable in space and time and often does not match with the spatio-temporal demand pattern. To overcome the temporal discrepancy between availability and consumption, reservoirs are constructed. Monitoring and predicting the water available in the reservoirs, the needs of the consumers and the losses throughout the river and water distribution system are necessary requirements to fairly allocate the available water to the different users, prevent floods and ensure sufficient water flow in the river. In this paper, this surface water allocation problem is considered a Network Flow Optimisation Problem (NFOP) solved by spatio-temporal optimisation using linear programming techniques. doi: 10.2166/ws.2017.144 s://iwaponline.com/ws/article-pdf/18/2/713/207030/ws018020713.pdf Jaime Veintimilla-Reyes (corresponding author) Jos Van Orshoven Department of Earth and Environmental Science, KU Leuven, Leuven 3001, Belgium E-mail: jaime.veintimilla@ucuenca.edu.ec Jaime Veintimilla-Reyes Department of Computer Science, University of Cuenca, Cuenca 010150, Ecuador Annelies De Meyer Flemish Institute for Technological Research–VITO, Boeretang 200, 2400, Belgium Dirk Cattrysse Department of Mechanical Engineering, KU Leuven, Leuven 3001, Belgium


INTRODUCTION
Water is required for multiple purposes such as domestic and industrial use, irrigated agriculture, hydropower generation and ecosystem functioning. The availability of surface water is variable in space and time and this variability often does not match with the spatially and temporally distributed demand pattern of the water consumers. For example, agriculture requires irrigation when precipitation is low and power needs to be generated throughout the year, also when the river discharge is low. To overcome the temporal discrepancy between water availability and consumption, reservoirs have been or need to be constructed. Monitoring the water present in the reservoirs, the needs of the consumers and the losses throughout the water system is indispensable for fair water allocation. The collection and processing of the related data is a tedious issue not only because of the spatially and temporally distributed nature but also due to the fact that various measurements and communication devices are needed (Hanasaki et al. ) Q3 .
Allocation can become controversial when competition for water increases between multiple water users. Increased population shifts and shrinking water supplies magnify this type of user competition in many regions across the globe.
Moreover, the competition will be aggravated if natural conditions become more unpredictable and as concerns for water quantity and quality grow. Hence, a poorly-planned system for allocating water can be at the origin of serious societal problems. All this has led decision-makers to the point that tools are needed for optimising the water resource allocation. It is now recognized that the efficiency, equity and environmental soundness of water allocation and management must be improved by developing innovative techniques for environmental policy implementation including water allocation for various levels of complexity (Ahmad et al. ).

SCIENTIFIC CONTEXT
In order to cope with the spatio-temporal variability of surface water availability and the mismatches of this availability with the demand pattern of water consumers, reservoirs are built to store water and to distribute it when it is needed. In order to get a fair allocation process, several criteria have been used such as economic efficiency, equity, priorities, etc. (Karimi & Ardakanian ). Among them, the most common allocation criterion is using priorities or penalties (Chou & Wu ). Several studies have addressed the optimization of the allocation of water resources. E.g., Tinoco et al. () studied the Macul basin in the north of Ecuador. The objective was to optimise the operation of a river system including three connected reservoirs. Water is transferred from one reservoir to another to allocate it in an optimal way to the different irrigation projects. This modelling approach consists of a trial-and-error process to identify the optimal amount of water and consists of the following steps: (1) River/reservoir system modeling to simulate and to optimise water availability for a period of historical data, (2) Post-statistical analyses of each of the resultant reservoir outflows and reservoir water levels, and (3) Extreme value analysis of the minimum reservoir water levels.
Authors stated that the approach consists in an easy and practical way to optimise water allocation from reservoirs. However, the most common way to optimise the allocation of water resources is through mathematical . This WSN provides a structured mechanism to identify all components of the water management system in order to create a generic optimisation model to be applicable in different regions. To develop this water allocation model artificial data have been used. Artificial rather than real world data help to identify strengths and weaknesses. However, the final aim of this research is to apply this model to real world cases but this is beyond the scope of this paper. Moreover, this optimization model is considering that water availability and water demands are variable in time.

METHODOLOGY Approach
The water allocation problem, addressed in this paper, has the following characteristics: (1) multiple spatially distributed demands which vary in time must be met by the water in the reservoirs and the river system; (2), floods must be prevented, assuming that each river segment has a maximum capacity; (3), the penalties connected to unmet demands and to flood events must be minimized.
A conceptual representation of the problem is shown in

;
Chou & Wu ) approach and more precisely LP methods to allow optimisation of the allocation of the available water to the different demand points. This WSN takes into account the spatial configuration and the hydrology of the river basin since it is assumed that sensor measurements of the water discharges in the rivers and the amounts of water present in the reservoirs are available at a sufficiently high temporal resolution. In addition, the ecological role of the river is taken into account. The ecosystem is modelled as a downstream demand node while simultaneously continuity constraints are set toe ensure that in each time step a minimum amount of water should remains present in the river segments.
Since the goal of the optimisation is to manage the reservoir levels and to allocate available water resources so that spatially and temporally distributed demands are optimally met with no floods, the water allocation problem is con-  (1) (1)

Flow balance constraints
Transport(n)

Limitation and capacity constraints
Start in every time step
d: demand node ∈ D.
n: river node ∈ N. ∝ t n,nþ1 : is loss factor associated a river segment from node n to node n þ 1 in time (t).
β t n : is the percentage of water that must leave the nth node to the next one in time (t).
γ t n : is the percentage of water that must remain in the nth node to the next time step (t). C t n,nþ1 min [m 3 ]: Is the minimum capacity of the n, n þ 1th river segment at time (t).
C t n,nþ1 max [m 3 ]: Is the maximum capacity of the n, n þ 1th river segment at time (t).
R t r min [m 3 ]: Is the minimum capacity required in the reservoir (r) at time (t).
R t r max [m 3 ]: Is the maximum capacity allowed in the reservoir (r) at time (t).
I t i [m 3 ]: Is the amount of water arriving at the input node (i) at time (t).
Variables V t n [m 3 ]: Volume in river segment (n) at time (t). V t r [m 3 ]: Volume in the reservoir (r) at time (t). X t n,nþ1 [m 3 /s]: Flow between two nodes, (n) and (n þ 1) at time (t).
X t r,n [m 3 /s]: Flow between two nodes, a reservoir (r) and river node (n) at time (t).
X t n,r [m 3 /s]: Flow between two nodes, a river node (n) and a reservoir (r) at time (t).

X t i,n [m 3 /s]: Flow between two nodes, (i) input (rainfall) and a river node (n) at time (t).
X t i,r [m 3 /s]: Flow between two nodes, (i) input (rainfall) and a reservoir node (r) at time (t).

Slack Variables
S tÀ d [m 3 ]: Is the amount of water that cannot be allocated to demand (d) at time (t) T tþ n, nþ1 [m 3 ]: Is the amount of water that exceeds the capacity of the node (n) at time (t).
U tþ r [m 3 ]: Is the amount of water that exceeds the capacity of the reservoir (r) at time (t).
Equations (4)-(6) represent the limitations and capacity of the nodes/segments. Equation (5) considers water coming directly from a river (I t i ) to a specific node. Equation (6), is related to the amount of water allocated to a specific demand (D t d ). This equation considers the water that cannot be allocated (S tÀ d ) and the amount of water lost during the transportation process from the previous node (∝ t n, nþ1 ). From Equation (6), we can notice that the excess water in a specific node must be equal to zero. This is to avoid sending extra water to a specific demand. Equation (7) (8) and (9) a limitation capacity is set. Hence, water flowing in each river segment must be less than C t n, nþ1 max and greater than C t n, nþ1 min in order to avoid floods and to ensure water to the ecosystem. To calculate the total penalty to pay T tþ n, nþ1 t is used. This variable stores the exact amount of water that exceeds the capacity of the above-mentioned segment. Finally, in order to enforce a continuous water movement, Equations (13) and (14) are used.

Case-study
The network configuration studied is shown in Figure 3.
There are three types of nodes: reservoir, transportation and demand nodes. In Figure 3, two reservoirs (nodes 1 and 11) are present. These reservoirs can store water coming from several rivers (inputs I1 to I5). The total amount of water available to be allocated to the entire network is the water coming through time in the first it is assumed that the water needs at least one time step to move to a new node. Water flows from node 1 (reservoir node) to node 2 where the link between node 1 and 2 is named X t¼0 12 . Node 2 receives in t ¼ 1 an additional input from the same node (N2). Hence each node is receiving a specific amount of water from the previous time step. For instance, in node 3 and t ¼ 2, two links are connected with node 4 (demand node) and node 5 (transfer node); in this specific case, the total amount of water flowing in that segment is divided into a part corresponding to the allocation to node 4 and the remaining part flowing directly into link 35 and therefore to the other nodes downstream. and water coming directly from the previous river segment (X tÀ1 ij ). In the special situation that the current node is a reservoir node some extra inputs can be present. All nodes in this configuration have at least two outputs. First output is the water flowing to next node in time (V tþ1 i ) and the second one is related to the water losses (∝ t n, nþ1 ). Furthermore, a third output can be present when a demand node is directly connected to a specific transfer node.
The optimisation problem is solved using the optimisation solver Gurobi (Gurobi ). This solver was selected as a main solver due its Python programming language support as well as the availability of referential material.
Summarizing, this use case includes three inputs (I1, I2 and I3) directly to the reservoir and two extra-inputs downstream of the reservoir (I4 and I5) and three demands nodes

RESULTS AND DISCUSSION
To execute and validate the model, artificial data has been selected (15 time steps). Results of the execution of the optimised water allocation model are summarized in Figure 5.
In addition, from Figure 5, it is noticeable that in the initialization stage, (i.e. the first time step), only in demand node D6 (X1718) the demand was partially not fully?? met. In this specific case, water received as an input is used directly to meet the demand. Figure 5, also shows that from time step 5 onwards, penalties are becoming lower due to a direct contribution from the first reservoir (node 1). In addition, from   10,000 m 3 (Figure 7) is present in the first reservoir at time step t ¼ 0. This value is the cumulative amount of water that in the previous time period has come to the reservoir directly from the rivers (inputs). Each of the nodes along the network is receiving an additional amount of water in the initialization process. In time step 1 (t ¼ 1), the amount of water flowing directly from node 1 to node 2 through segment 1 (X12_0) is 600 m 3 /s ( Figure 6); this means that 9,400 m 3 of water will remain in the reservoir for the next time step. Figure 6 also shows that the amount of water flowing through the whole system is getting reduced when there is a demand node associated. For instance, between time step 2 and time step 3 there is a demand node (X34_3) and the required water at this point is exactly 100 m 3 per time step. This pattern becomes constant until the end of the river segment at node (18). In this node, there is also a demand of 100 m 3 per time step. Figure 7, shows a graphical representation of the water present daily in the first reservoir (node 1). In this specific use case, maximum and minimum capacity constraints were reached maintaining reservoir levels between 500 m 3 and 10,000 m 3 . Additionally, an extreme rainfall/ input has not been present during this period and due this effect flooding did not occur. So, no flood penalties had to be paid.

CONCLUSIONS AND FUTURE WORK
In this paper, we conceived the spatio-temporal allocation of surface water in a dammed river system to multiple users as a network flow optimization problem. A generic LP model was formulated addressing spatially and temporally distributed inputs of and demands for water to and from the system and specifying reservoir and transportation capacity constraints. The model was tested by means of a hypothetical use case and revealed a satisfactory behaviour. Encouraged by these results, we plan to introduce more complexity into the model in order to make it applicable to real world cases.
One of the extensions considered is to incorporate the capability to determine the best location among different possible locations of additional reservoirs. To this end the LPapproach will be upgraded to a MILP approach.

Author Queries
Journal: Water Science & Technology: Water Supply Manuscript: WS-EM17119R2

Q1
Please provide the city name for given affiliation.

Q2
The abbreviations 'NFOP' and 'NFO' were used for the expansion 'Network Flow Optimisation Problem' in the text. Kindly check and advice which one has to be followed Q3 Hanasaki, Kanae and Oki (2006) has been changed to Hanasaki et al. (2006) as per the reference list.

Q4
Please check whether all equations are display correctly.

Q5
Veintimilla-Reyes et al. (2016) is not cited in the main text. Please confirm where it should be cited, or delete the reference.

Q6
In supplied Figure 1 is not sufficient print quality. Please resupply as a high resolution file (300 dpi or above) with sharp lines and text.

Q7
In supplied Figure 2 is not sufficient print quality. Please resupply as a high resolution file (300 dpi or above) with sharp lines and text.

Q8
In supplied Figure 3 is not sufficient print quality. Please resupply as a high resolution file (300 dpi or above) with sharp lines and text.

Q9
In supplied Figure 4 is not sufficient print quality. Please resupply as a high resolution file (300 dpi or above) with sharp lines and text.

Q10
In supplied Figure 5 is not sufficient print quality. Please resupply as a high resolution file (300 dpi or above) with sharp lines and text.

Q11
In supplied Figure 6 is not sufficient print quality. Please resupply as a high resolution file (300 dpi or above) with sharp lines and text.

Q12
In supplied Figure 7 is not sufficient print quality. Please resupply as a high resolution file (300 dpi or above) with sharp lines and text.