Genetic Algorithms Connected Simulation with Smoothing Function for Searching Rule Curves

Rule curves are fundamental guidelines for operating a reservoir system. The objective of this paper is to find a suitable objective function and to propose a smoothing function constraint for searching the optimal rule curves by using genetic algorithms connected simulation model. The results show that an average water shortage is the optimal objective function for searching the optimal rule curves. It can represent the situations of water deficit and excess release. The results also indicate that a moving average applied to be the constraint of searching can reduce the variation of the upper and lower rule curves. Further, the developed model has been applied to determine the optimal rule curves of the Bhumibol and Sirikit Reservoirs (the Chao Phraya River Basin, Thailand). It is shown that the model gives the rule curves which are more mitigate the situations of water deficit and excess release than the existing rule curves. It is also concluded that the genetic algorithms connected simulation with the smoothing constraint is more effective than the model without constraint.


INTRODUCTION
Generally, rule curves of a reservoir are basic monthly guides for long run of reservoir operation. The rule curves have a lower bound that is set to store water for reducing the risk of water shortage in the future. The rule curves also have an upper bound set to maintain water level for controlling flood volume. They are to be created when initially implementing the reservoirs and generally modified after being used for a certain period of time since total water requirements (e.g., water supply, industrial demand and irrigation requirement) supported by the systems usually increase with time.
A simulation model is applied to find the suitable rule curves [1,2] . The model is straightforward and applicable for both simple and complex systems. Generally, this approach assesses the effectiveness (i.e., objective function) of the systems based on several sets of trial rule curves that are adjusted from the preceding ones. However, depending on the result of the adjustment, it does not guarantee to yield the optimal rule curves. Often, a frequency of water deficit was used as the objective function for searching of this approach. However, an extreme maximum magnitude of deficit water possibly occurs because of regard the frequency only.
A dynamic programming (DP) is another optimization technique applied to search the non-linear problems of water resource [3][4][5][6] . Unfortunately, the application of DP to multi-reservoir system is limited due to a curse of dimensionality. Chleeraktrakoon and Kangrang [7] applied the DP with a principle progressive optimality to determine the optimal rule curves using a magnitude of water shortage and excess release as the objective function. However, this method does not guarantee it as the proper objective function for searching rule curves.
Recently, genetic algorithms (GAs) embedded the simulation model (HEC-5) have proposed to search the rule curves of the reservoir system [8][9][10][11] . The best part of GAs is that they can handle any type of objective function. A shortage index (SI) was used as the objective function for searching the curves without any constraint. This objective function considers only the deficit water, so it may not cover the situation of excess water. In order to derive the optimal rule curves, a suitable objective function is required. Often, the obtained rule curves are not feasible for reservoir operation because of the large variations of the intervals between the upper and lower rule curves. Therefore, a smoothing function constraint is required to include into the model for fitting the rule curves.
This paper thus proposes the smoothing-function constraint for fitting rule curves and presents the suitable objective function for determining the optimal rule curves using the genetic algorithm (GAs) with the simulation model. The proposed approach is applied to the Bhumibol and Sirikit Reservoirs (the Chao Phraya River Basin, Thailand).
Simulation models: Simulation models (i.e., HEC-3, HEC-5) are generally used to study the efficiency of the reservoir operation. This study conducted the simulation model based on those concepts, because it is easily connected with an optimization (GAs) model. The developed simulation model can be used to determine both reservoir storage requirements and operational strategies for flood control or conservation. Generally, the multi-reservoir operating policies are based on the rule curves of individual reservoirs and the principles of water balance concept. The reservoir system is operated along the standard operating policy expressed in Eq.(1) and Fig. 1.
in which R ν,τ is the release discharges form the reservoir during year ν and period τ (τ = 1 to 12 representing month, January to December). D τ is the water requirement of month τ, x τ is lower rule curve of month τ, y τ is upper rule curve of month τ and W ν,τ is the available water calculated using simple water balance described in Eq.(2) as , 1 , , , where S υ,τ is the stored water at the end of month τ, Q υ,τ is monthly reservoir inflow, E τ is average value of evaporation loss and DS is the minimum reservoir storage capacity (the capacity of dead storage). In the mention figure and equation, if available water is in a range of the upper and lover rule level, then demands are satisfied in full. If available water over tops the upper rule level, then the water is spilled from the reservoir in downstream river in order to maintain water level at upper rule level and if available water is below the lower rule level, reduce supply is made. The policy usually reserves the available water W ν,τ for reducing the risk of water shortage in future, when 0 ≤ , < − W x D υ τ τ τ . At the end of simulation program, the situation of water shortage and excess release water (e.g., the number of failure year, the number of excess release water, the average annual shortage) will be recorded.

Integration of the GAs and simulation model:
The algorithms of connection the developed simulation model into the GAs are described as follows. GAs requires encoding schemes that transform the decision variables into chromosome. Then, the genetic operations (reproduction, crossover and mutation) are performed. These genetic operations will generate new sets of chromosomes. The most common encoding schemes use binary strings as indicated in Fig. 2. Each bit of the binary string is called a gene. The chromosome in Fig. 2 contains five decision variables, each represented by six bits. In this study, each decision variable represents a monthly level of the rule curves of reservoirs.

Fig. 2: Chromosomes of represented variables
After the chromosomes (rule curves) of the initial population have been determined, the release of the system in every period is calculated by the developed simulation model corresponding to each chromosome. The release of the system for each chromosome is retuned to the GAs to evaluate its fitness. The situation of water shortage of the system is defined as fitness function in this study. Next, the reproduction including selection, crossover and mutation is performed for creating a new rule curve parameters in next generation. This procedure is repeated until the criterion is satisfied as described in Fig. 3. Each parameter of the fitness functions is applied into the model to find the suitable objective function. The objective function of each search is to minimize the parameter of the fitness functions. There are 48 parameters (rule curve levels) of two reservoirs which are represented by the chromosomes. This study used population size = 80, crossover probability = 0.9, mutation probability = 0.01.
There are six objective functions which chosen for searching the optimal rule curve. First, the shortage index (SI) which proposed by the US Army crops of Engineers [12] and can be summarized as in which N is the total number of periods, Sh i is water deficit during the period i, D i is target demand during the period i. A month is taken as the period of reservoir operation.
The others are the average water shortage (Aver--MCM/year), the maximum magnitude of water shortage (Max--MCM/year), Frequency of water shortage (Fre, times/year), Total square deficit (RMS--MCM2) and 000000, 000001, 000010, 000011, 111111 sum of above mention (SUM) which described as follows: Max RMS (8) where n is the total number of considered year.  To reduce the fluctuate of rule curve in order to obtain the optimal rule curves which are suitable in the practice, the moving average is chosen as a base of the smoothing function constraint for fitting the rule curves, for each curve can be present as 2 1 0.1 for 3,...12 3  12 12 0.1 for where x is rule curve level and T is active storage of each reservoir. These smoothing functions are integrated into the fitness function in the procedure of searching.

ILLUSTRATIVE APPLICATION
The proposed approach was applied to search the optimal rule curve of a system of major multi-purpose storages (the Bhumibol and Sirikit Reservoirs) locating in the watershed area of the Chao Phraya River (Thailand). Figure 4 and 5 present the location of the Chao Phraya River and the schematic diagram of water resource systems within the drainage basin. The solid lines represent the systems where they are considered in the application. They include the discharges of the two reservoirs and the side flows of River Wang and River Yom. The dashed lines stand for the systems in which they are ignored. For example, these are the discharges of River Sakae Krang and River Tha Chin, the releases of the Pasak Reservoir and the return flows of irrigation projects.
Two sequences of 21-year (1975-1995) monthlyflow records of stations P.12 and SK covering several dry and flooding years were commonly used for searching the optimal upper and lower rule curves. The other average hydrological data for each month included series of evaporation losses and precipitation of the reservoirs and those of side flows of stations W.4A (River Wang) and Y.5 (River Yom). The report of the Electrical Generating Authority of Thailand [2] was used to provide for the considered waterrequirement information of the applied basin. Results of the illustrative application are presented as follows.
Suitable objective function: Figure 6 and 7 respectively present the optimal rule curves of the Bhumibol and Sirikit Reservoirs using all objective functions for searching. The figures appear that the patterns of the rule curves between the two reservoirs generally agree with each other due to the seasonality effects on reservoir inflows and considered water demands. However, there are large variations of the intervals between the upper and lower rule curves.
The rule curves of each objective function were then assessed to examine the situations of water shortage and excess release by considering related characteristics (e.g., frequency, magnitude and duration). A Monte Carlo simulation study against 500 samples of generated monthly flows of stations P.12 and SK [13] was used to compute the interval (mean ± standard deviation) of the referred statistics for the assessment. In the following, the obtained assessment results of the considered water-deficit and excessrelease properties for each objective function are presented. Table 1 and 2 respectively show the assessment intervals of water shortage and excess release characteristics for all objective functions. They indicate that the rule curves of using average water shortage (Aver) as the objective function gives the magnitude bounds of water deficit that are generally less than using the others, while the other bounds are not different. In addition, the maximum magnitude bounds of excess release of using the mention objective function are less than using the others. Therefore, the average water shortage (Aver) is the most suitable for using as an objective function of searching rule curve.

Smoothing function:
The average water shortage (Aver) was then used to search the rule curve with the smoothing function constraint. The developed model was applied to determine the optimal rule curves of the Bhumibol and Sirikit Reservoirs (the Chao Phraya River Basin, Thailand). Figure 8 and 9 present the optimal rule curves of GAs connected simulation with the smoothing function constraint and without it as well as the existing curves of the HEC-3 [14] simulation approach [2] for the Bhumibol and Sirikit Reservoirs respectively.    They demonstrate that the optimal rule curves of the search using smoothing function constraint are smoothly than their search without the constraint. Moreover, the pattern of the obtained curves which using smoothing constraint is similar to the existing ones. Thus smoothing function constraint can reduce the variation of the upper and lower rule curves. The rule curves of them were then assessed to examine the situations of water shortage and excess release by comparing related characteristics (e.g., frequency, magnitude and duration) of the referred circumstances with those of the optimal curves. The Monte Carlo simulation study against 500 samples of generated monthly flows of stations P.12 and SK [13] was used to compute the interval (mean ± standard deviation) of the referred statistics for the assessment. In the following, the obtained assessment results of the considered water-deficit and excess-release properties for the three cases are presented. Figure 10 and 11 show the assessment intervals of water-shortage characteristics for the GAs connected simulation with the smoothing function constraint and without it as well as the HEC-3 simulation approach. They appear that the proposed technique gives the water deficit characteristics (e.g., the durations and magnitudes of water deficits) which are smaller than the existing one does. It can be these concluded that the GAs connected simulation with the smoothing function constraint is able to reduce the effect of the correlations on the water shortage situation. Moreover, the figures also demonstrate the water deficit characteristics of both using smoothing constraint and without smoothing constraint are not much different. Figure 12 and 13 present the referred statistics of excess releases for the three rules. It is evident that the both of using GAs connected simulation techniques do not yield greater excess releases, as compared with the existing one.

CONCLUSION
Rule curves are fundamental guidelines for operating a reservoir system. The objective of this paper is to find the suitable objective function and to propose a smoothing function constraint for searching the optimal rule curves by using GAs connected simulation technique. The curves of all objective functions are compared and assessed on the properties (frequency, magnitudes and consecutive duration) of water deficit and excess release using the Monte Carlo simulation. The results show that the average water shortage is the optimal objective function for searching the optimal rule curves. It can represent the situations of water deficit and excess release.
To reduce the fluctuation of rule curves, the moving average is applied to be the constraint of the searching rule curve. Results indicate that the smoothing function constraint can reduce the variation of the upper and lower rule curves. The optimal rule curves of the developed model which using the average water shortage and smoothing function are used for evaluating the existing rule curves. Results demonstrate that the optimal rule curves of the GAs technique are more mitigate the situation of water deficit and excess release than the existing rule curves. They are also concluded that the GAs connected simulation with smoothing constraint is more effective than the model without constraint.