Paddy Water Environ (2005) 3: 29–38 DOI 10.1007/s10333-005-0070-y

ARTICLE

Janejira Tospornsampan · Ichiro Kita · Masayuki Ishii · Yoshinobu Kitamura Optimization of a multiple reservoir system operation using a combination of genetic algorithm and discrete differential dynamic programming: a case study in Mae Klong system,

Received: 12 April 2004 / Accepted: 13 December 2004 / Published online: 12 February 2005 C Springer-Verlag 2005

Abstract A combination of genetic algorithm and dis- Introduction crete differential dynamic programming approach (called GA-DDDP) is proposed and developed to optimize the The coordinated operation of a multiple reservoir system operation of the multiple reservoir system. The demonstra- for efficient management of available water to maximize tion is carried out through application to the Mae Klong the net benefit or minimize the total deficits of the system system in Thailand. The objective of optimization is to is a complex decision-making process. The decision poli- obtain the optimal operating policies by minimizing the cies involve many variables, objectives and considerable total irrigation deficits during a critical drought year. The risk and uncertainty. They must satisfy various constraints performance of the proposed algorithm is compared with on system operation while maximizing releases for various the modified genetic algorithm. The results show that the purposes such as irrigation, energy production or minimiz- proposed GA-DDDP provides optimal solutions, converg- ing spills and losses. Ideally, the reservoirs in a system ing into the same fitness values within a short time. The should be designed and operated together to maximize net GA is able to produce satisfactory results that are very social benefits. This aim can be reached by using optimiza- close to those obtained from GA-DDDP but required alot tion approaches. more computation time to obtain the precise results. The Many successful applications of optimization techniques difficulties in selecting optimal parameters of GA as well have been extensively carried out in reservoir studies. as finding a feasible initial trial trajectory of DDDP are Among them, dynamic programming (DP) has long been significant problems and time-consuming. The significant recognized as a powerful technique and used extensively advantage obtained from GA-DDDP is saving of computa- in the optimization of complex water resource systems. DP tional resource as GA-DDDP requires no need for optimiz- is a systematic recursive procedure for optimizing a mul- ing parameters and deriving feasible initial trial trajectories. tistage decision process. Many variants of DP have been Because DDDP is a part of GA-DDDP, the good perfor- developed to alleviate the major drawback of DP, the “curse mance of GA-DDDP is obtained when applied to a small of dimensionality.” In the works of reservoir management, system where numbers of discretizations and variables have DP includes incremental DP (IDP), discrete differential no influence to the dimensionality problem of DDDP. DP (DDDP), incremental DP and successive approxima- tions (IDPSA), multi interval DP (MIDP), stochastic DP Keywords Multi-purpose . Operating policy . Optimum . (SDP), reliability constrained DP, differential DP (DDP), Rule curve constrained DDP (CDDP), and the progressive optimality algorithm. Among variant versions of DP, IDP, IDPSA, DDDP, and MIDP attempt to alleviate the curse of dimen- J. Tospornsampan () sionality based on the same increment concept for state The United Graduate School of Agricultural Sciences, Tottori variables. DDDP is known as a generalization of IDP. University, In recent years, Genetic Algorithms (GAs) have become Koyama-minami, Tottori 680-8553, increasingly popular as a powerful optimization approach. e-mail: [email protected] GAs are search algorithms based on the mechanics of nat- I. Kita · M. Ishii ural selection and natural genetics (Goldberg 1989). GAs Faculty of Life and Environmental Science, Shimane University, use a vocabulary borrowed from natural genetics, perform Matsue, Shimane 690-8504, Japan a multi-directional search by maintaining a population of Y. Kitamura potential solutions and encourage formation of informa- Faculty of Life and Environmental Science, Tottori University, tion and exchange between these directions (Michalewicz Koyama-minami, Tottori 680-8553, Japan 1996). 30 GAs belong to the class of probabilistic algorithm, re- In this paper, the combination of GA and DDDP (for ferred to as stochastic optimization techniques in which simplification it is called GA-DDDP hereinafter) is pro- the solution space is searched by generating candidate so- posed to overcome their shortcomings and improve their lutions. They maintain a population of potential solutions efficiencies. The GA-DDDP is developed to optimize a while all other methods process a single point of the search multiple reservoir system, namely the Mae Klong system, space. As a result, we can obtain more than one solution in Thailand. The objective of optimization is to obtain the from GAs. Since GAs do not rely on any mathematical operating policies by minimizing the total irrigation deficit properties of the functions employed in the model, such in a critical drought year. The performance of the proposed as differentiability and continuity of the objective function, GA-DDDP is compared with a single GA. The operat- this makes the method more generally applicable and ro- ing policies obtained from optimization are compared with bust than other directed search methods. Because GAs are those obtained from the actual operation as well. heuristic search techniques (of their stochastic nature), the global optimum solution are not guaranteed to be found Description of the Mae Klong River Basin system using GAs. Nevertheless, GAs give alternative solutions close to the optimum after a reasonable number of evolu- The Mae Klong River Basin is located in the west of tions that can be accepted for most of the real-life problem. Thailand, covering a total area of 30,800 km2 in five The ability to provide a number of alternatives near opti- ◦  ◦  provinces and lying from latitude 16 23 Nto13 10 N and mal solutions, in addition to one best solution, of GAs is ◦  ◦  longitude 98 15 Eto10 17 E. Figure 1 shows location and accurately reflecting the real world. general features of the basin. The basin is composed of GAs have been increasingly applied to solve complex two main rivers: the Khwae Yai River and the Khwae Noi optimization problems in a broad spectrum of fields. In River having a length of 380 and 315 km respectively. The the water resources field, GAs with their modifications confluence of these two rivers is the starting point of the and extensions have been applied to pipe network op- main Mae Klong River which ends at the Gulf of Thailand timization problems (Goldberg and Kuo 1987; Simpson and has a length of 132 km. Two major large-scale Dams, et al. 1994; Dandy et al. 1996; Savic and Walters 1997; the Srinagarindra Dam and the Dam, Montesinos et al. 1999), to groundwater management prob- are constructed in the basin, serving multi-purposes for lems (Mckinney and Lin 1994; Cieniawski et al. 1995), to groundwater contamination problems (Ritzel and Eheart 1994; Inoue et al. 2003), and to reservoir operation (Oliveira and Loucks 1997; Wardlaw and Sharif 1999; Sharif and Wardlaw 2000). In addition GAs have been used to calibrate a rainfall-runoff model (Wang 1991), linked with SWMM to calibrate a catchment’s parameters (Liong et al. 1995), used to estimate WGR model parameters to characterize the variation of rainfall fields (Yoo et al. 2003), integrated with an AnnAGNPS (Srivastava et al. 2002) to optimize the selection of best management practices (BMP), and linked with SDP (Huang et al. 2002) to the operation of a multi- ple reservoir system. GAs have been compared with many other optimization techniques as well. In most cases, GAs have performed well and resulted in near optimal solutions. In some cases, GAs have performed better than traditional techniques. Advantage of GAs over conventional optimization is their handling of complex, highly nonlinear problems that are more realistic. Although GAs are flexible enough to handle a wide variety of complex problems, increasing of com- plexity is expected to cost more in terms of the computation time required. GAs may be set up in a number of ways, but as yet there is no standard procedure (Sharif and Wardlaw 2000). Each user exploits the GA concepts in a different way, and it is hard to perceive which are the best implementations for particular applications. Users of GA are forced to try different alternatives, and certainly different GA parame- ter values, and to choose those that perform best for their particular application. On the other hand, this need for ex- perimentation and judgment is not unique to GA (Oliveira and Loucks 1997). Fig. 1 Location map of Mae Klong River Basin 31 irrigation, hydropower generation, domestic and industrial full potential command irrigation area of 4,304 km2. The water supply, recreation and salinity control. In addition, area is utilized in both dry and wet seasons. The average another re-regulating Dam, the Tha Thung Na Dam, is irrigation requirement of the GMKIP is 5,791 MCM/year. located downstream of the Srinagarindra Dam performing In future, according to the development plan, the total irri- as a tail end reservoir for reversible turbines of the gation area will be increased up to 5,984 km2. In addition Srinagarindra reservoir. These three Dams are operated by to the water requirement of the GMKIP, the requirements the Electricity Generating Authority of Thailand (EGAT). from upstream and downstream of the Mae Klong Dam are Besides, the Mae Klong Dam is the diversion Dam, 62.4 and 1,000.1 MCM/year, respectively. Moreover, the situated just downstream of the confluence of the major minimum flow requirement for salinity control of the basin tributaries. The water is diverted from this Dam to supply is about 30–50 m3/s. the irrigation area of the Greater Mae Klong Irrigation For the last few decades, increases of irrigation area, Project (GMKIP) and released downstream for domestic industries, and population have resulted in a rapid increase use and salinity control. This diversion Dam is regulated of water requirement and a shortage of water in the country. by the Royal Irrigation Department (RID). In addition, because of the relatively abundant amount All of the above-mentioned Dams in the system have been of water in the Mae Klong Basin, water from the basin operated since 1985 to fulfill all the water requirements of has been diverted to support other requirements outside the basin. A schematic diagram of the basin is shown in the basin: the Tha Chin Basin (the adjacent basin to the Fig. 2. The basic features of the above Dams except the Mae right of the Mae Klong Basin) in dry season at 30–60 m3/s Klong Dam are summarized in Table 1. The discussion of and the Metropolitan Water Work Authority (MWWA) the historical reservoir operation records of the system can for water supply to the Metropolitan Authority be found in the work of Tospornsampan et al. (2004). (BMA) at 10 m3/s in 2003 and it will be increased to 45 m3/s in the year 2017. As a result, presently the Mae Klong Basin faces a water shortage problem especially in Water requirements of the Mae Klong River Basin the dry season and continued drought years. Note that water from the three Dams is used for Water requirements from the Mae Klong River Basin are hydropower generation too but the hydropower genera- utilized mainly by the GMKIP. The GMKIP has the total tion is considered only as a by-product to supplement the national power requirement. Khwae Yai River y2 Khwae Noi River System formulation e2 y1 Srinagarindra Dam e1 s2 The system for optimization is considered to consist of the Vajiralongkorn Dam u 3x120 + 2 x180 MW Srinagarindra reservoir and the Vajiralongkorn reservoir s1 2 only. The Tha Thung Na reservoir is not included because of 3 x 100 MW Tha Thung Na Dam u its small storage and its operating function. The subscripts 1 1 38 MW and 2 in Fig. 2 represent Vajiralongkorn and Srinagarindra respectively (except those for r). The optimizations were Side Flow (sf) r1 Upstream Water applied to a single year of data (12-month time steps) for Requirements a critical drought year in 1998. The system state equations are: rr Greater Mae Klong Irrigation Project 4,304 km2 + = + − − Water Supply for r2 s1 (n 1) s1 (n) y1 (n) e1 (n) u1 (n) (1) BMA 10-45 m3/s s2 (n + 1) = s2 (n) + y2 (n) − e2 (n) − u2 (n) Mae Klong River Diversion to Tha r3 n = 1, 2 ...,N (2) Chin Basin in Dry Season 30-60 m3/s Mae Klong Diversion Dam which are subject to the following constraints:

  r4 Downstream Water LRCi(n) si(n) URCi(n)(3) Requirements ui,min  ui(n)  ui,max (4) r5 Minimum Flow for Salinity Control 30-50 m3/s where n is an index specifying a time period, N is the total number of time periods into which the time horizon is di- vided (equal to 12), si (n) is the storage level in the reservoir Gulf of Thailand i at the beginning of the period n, yi (n) is the inflow into Fig. 2 Schematic diagram of Mae Klong River Basin reservoir i during time period n, ei (n) is the total losses 32

Table 1 Basic feature of Features Srinagarindra Dam Vajiralongkorn Dam Tha Thung Na Dam Dams in the Mae Klong River Basin system Hydro plant Unit 1–3 Unit 4–5 Unit 1–3 Unit 1–2 Drainage area (km2) 10,880.00 3,720.00 11,428.00 Mean annual inflow (MCM) 4,330.00 5,122.00 3,817.00 Mean annual losses (MCM) 351.10 210.00 7.00 Normal high water level (m.msl.) +180.00 +155.00 +59.70 Maximum high water level +182.40 +160.50 +59.70 (m.msl) Minimum water level (m.msl.) +159.0 +164.75 +135.00 +55.50 Downstream water level (m.msl.) +55.0 +87.00 +41.50 Max. storage (MCM) 17,745.00 8,860.00 55.03 Min. storage (MCM) 10,265.00 12,054.00 3,012.00 28.95 Active storage (MCM) 7,480.00 5,691.00 5,848.00 26.08 Installed capacity (MW) 3×120 2×180 3×100 2×19 Total installed capacity (MW) 720.00 300.00 38.00 Mean annual power production 1,175.00 777.00 140.00 (106 kWh)

from the reservoir i during time period n, and ui (n) is the the system can be written as follows: decision release from reservoir i during time period n. 5 = + + − LRCi and URCi are the lower rule curve and upper rule surplus(n) u1(n) u2(n) sf(n) r j (n)(6) curve of the reservoir i. The operations of these two reser- j=1 voirs are controlled by a set of operation rule curves con- which is subject to the following constraints: sisting of three curves namely the upper rule curve, the lower rule curve and the flood control rule curve. The flood 0  surplus(n)  chcap + GMD(n) + r4 + r5 (7) control rule curve is set at the same elevation for every pe- where surplus is the surplus water after fulfilling all re- riod at the normal high water level. When the water level quirements except the GMKIP requirement, sf is the natu- is between the upper and the lower rule curve the operator ral side flow between downstream of the two reservoirs and can decide the amount of releases to satisfy downstream re- upstream of the Mae Klong diversion Dam, r is water re- quirements while trying to keep the water level inside these lease for requirement j which are subscribed from 1 to 5 for two rules at the same time. Therefore, it is preferable to use the upstream requirement, Tha Chin diversion requirement, the existing rules as constraints of the reservoir storages of BMA diversion requirement, the downstream requirement, the system as written in Eq. (3). and the minimum flow for salinity control respectively; umin and umax are the permissible minimum and maxi- GMD is the full GMKIP demand, and chacap is maximum mum of reservoir releases respectively. channel capacity. The water release for the GMKIP is ex- The desired state vectors at the initial and final stages are pressed as rr and calculated from the following equations: specified such that  surplus(n); 0  surplus(n)  GMD(n) = < s (0) ∈ a (0) s (N) ∈ a (N) (5) rr (n) GMD(n); GMD(n) surplus(n) (8) 0; otherwise where a(0) is the initial state vector equal to the reservoir storages at the end of March 1997, a(N) is the desired Assume that the releases for salinity control, the BMA final state vector at the end of March 1998. The final target requirement and Tha Chin requirement are fixed at their storage of the Srinagarindra reservoir is designed into five minimum requirements for this critical drought year. levels starting from the final state of the LRC up to the An objective function can be formulated in different ways minimum water level necessary for Hydro plant units 4–5. to evaluate the system performance. The most appropriate Therefore, five operating strategies are to be determined function has been found so far by means of minimization of accordingly. The final target storage of the Vajiralongkorn expected GMKIP demand deficit over a year. The objective function is expressed as is kept constant at the final state of the LRC.  Assume that the total releases from two upstream reser- N [GMD(n) − r (n)]2 voirs together with the natural side flow between down- F = min r GMD(n) stream of those two reservoirs and upstream of the Mae n=1 Klong diversion Dam are prior supplied to fulfill all de-  2 mands of the system except the GMKIP demand. The sur- + , plus water is then served to the GMKIP afterwards. Ac- gi [si (N) ai (N)] (9) cording to this assumption the overall balance equation of i=1 33  generally true in the binary approach. In the floating point − 2 < K [si (N) ai (N)] si (N) ai (N) representation each string vector is coded as a vector of real gi [si (N), ai (N)] = 0; otherwise value of the variables as the solution vector. Each element of a string is initially randomly created as to be within the (10) desired domain. The floating point representation is faster, more consistent from run to run and capable of representing , where F is the total deficits of the GMKIP, gi [si (N) quite large domains. It provides a higher precision where ai (N)] is the function that assesses a penalty to the system binary coding would require prohibitively long representa- when the final state si( N) of reservoir i at final stage N tion and overcomes the problem of increasing of domain less than the target desired state values ai( N), and K is a size when high precision is needed. In addition, compu- penalty weight factor. tation time spent for decoding is not required. Therefore, the real code representation is adopted in this study. Since Genetic algorithms the objective function is based on reservoir releases in each time step, releases are used as decision variables. With two GAs initially start from randomly generating a population reservoirs and 12 time steps, the length of a string is hence of strings (also referred to as a chromosome), each string composed of 24 discrete variables representing a solution is composed of a series of substrings (bits or genes in other to the problem. words) representing components or variables that are re- lated or used to evaluate the fitness of the problem through objective function. One string has its own fitness value ob- Genetic operators tained from the objective function and is one solution for the problem. The entire population of such strings repre- A simple GA consists of three basic operators; selection sents a generation. The initial population undergoes a series or reproduction, crossover, and mutation. Selection is a of genetic operators resulting in a new population with new process in which individual strings are copied according fitness values in each string, which is the initial popula- to their fitness values. Objective function plays the role tion for the next generation. This successive algorithm is of the environment, used to evaluate potential solutions in repeated for many generations till the stopping criterion is terms of their fitness. Copying strings according to their satisfied. The stopping criterion of a GA is determined by fitness values means that strings with a higher value have either the specific number of generations or a convergence a higher probability of contributing one or more offspring to a single solution where the change in the fitness values for the next operation. The selection operator is imple- is insignificant. It is expected that most of the fitness values mented in algorithmic form in a number of ways. Almost of the later generations will be improved after a number any methods that bias selection toward fitness seem to of iterations from the earlier generations. Nevertheless, the work well. The well-known and popular selection opera- best string with the highest fitness value is not necessary to tors applied in many literatures are roulette wheel selection be found from the final generation. The basic principle of or proportionate selection and tournament selection. GAs with review of their applications can be found from The convergence rate of a GA is largely determined by the work of Goldberg (1989) and Michalewicz (1996). the selection pressure and population diversity. In gen- eral, higher selective pressure results in higher convergence rates. However, if the selective pressure is too high, there Genetic representation is an increased chance of the GA prematurely converging to a local optimal solution because the population diversity In GAs, decision variables can be encoded as substrings of the search space to be explored is lost. If the selective of binary digits or real numbers. These substrings of de- pressure is too low, the convergence rate will be slow and cision variables are concatenated to form longer strings the GA will take an unnecessarily long time to find the op- or chromosomes . A string can be represented by binary timal solution because more bits are explored in the search. code, gray code or real code (or a floating point in other An ideal selection strategy should be one that is able to ad- words). The binary and gray strings are used to represent just its selective pressure and population diversity so as to real values of the variables. The length of the vector of fine-tune the GA search performance (Yang and Soh 1997). each string depends on the required precision. The total The selection operator used in this paper is modified from length of string is equal to the summation of the lengths of the ranking selection approach. In the ranking selection ap- all represented vectors of each string. The binary and gray proach the best individuals are always selected into a mating representations traditionally used in GAs have some draw- pool based on the selection indices. The modified ranking backs when applied to multidimensional, high-precision selection approach proposed here is easy and straightfor- numerical problems, that is, the length of the binary solu- ward. It starts from ranking the strings in descending order tion vector becomes very long for such problems. This, in according to their fitness values. The decided amount of turn, generates an excessively large search space that results least fit strings is then eliminated. They are subsequently in poor performance of GAs. But the gray coding represen- replaced by the duplicates of the fittest individuals to fill up tation has the adjacent property that any adjacent integers the mating pool (a tentative new population, for further ge- in the problem space differ by a single bit only which is not netic operators action). The amount of least fit strings to be 34 eliminated is decided in percentage. Neither the selection an admissible trial trajectory is first assumed and used to indices used by Montesinos et al. (1999) nor the probability calculate the trial policy. From the trial trajectory the total values used by Wang (1991) for each individual are nec- return F calculated from Eq. (9) is obtained. essary for selection. The percentage used can be adjusted Consider a set of incremental m-dimensional vectors: to fine-tune the GA search performance. In this paper the   m percentage used is 50%. si = δsi,1,δsi,2,...,δsi,m i = 1, 2,...,T (11) After selection, a crossover operator partially exchanges some bits between a random mated pair of selected strings whose component δsi,j, j = 1, 2,...m, can take any one from the mating pool, this results in two new offspring value σ t, t = 1, 2,..., T from a set of assumed incremental that preserve the best material from their two parent strings values of the state domain. The value σ t is the tth assumed which are expected to have better fitness values than both increment from the state domain and T is the total number of their parent strings. The number of swapping strings of assumed increments from the state domain. One value is approximately designed by probability of crossover of σ t must be zero since the trial trajectory is always in the ( Pc). Michalewicz (1996) pointed out that each crossover is subdomain. In this paper T is used, thus the total number particularly useful for some classes of problems and quite of si (n) vectors at stage n is equal to 9. When added poor for other problems. In this paper the uniform crossover to the trial trajectory at a stage, these vectors form an m- (referred to in Michalewicz 1996) is adopted because it is dimensional subdomain designated by D(n) likely to lead to greater diversity within a population than  others and it results in the effective exploration of the search s (n) + si i = 1, 2,...,9; n = 1, 2 (12) space. The uniform crossover operates on individual bits of the selected strings, rather than on blocks of genetic All D (n) together are called a ‘corridor’ and designated by material, and each bit is considered in turn for crossover C. A corridor C is used as a set of admissible states, and or exchange. In uniform crossover, swapping of bits at the the optimization constrained to these states is performed correspondent position of the mated parent is dependent on by means of the recursive equation of DP. The forward the probability of uniformity that estimates the number of algorithm of DP to optimize Eq. (9) over n stages for the exchanged bit at a random position. In this paper we use Mae Klong system is used as follows: the uniform probability = 0.5.   2 Mutation is the occasional random alteration of the value ∗ [GMD(n − 1) − rr (n − 1)] ∗ F = min + F − (13) of a string position, performs on a bit-by-bit basis with n GMD(n − 1) n 1 small probability (Pm) equal to the mutation rate. In a floating point, mutation changes the floating-point number ∗ where Fn is the minimum deficit of the system from stage to another value inside the domain. When mutation is used 0 to stage n. Figure 3 shows trial trajectory with n = sparingly with selection and crossover, it is an insurance 0, 1,...,12, the boundaries of corridor C and corridor C policy against premature loss of important notions. The which is the space between two solid lines, and optimal mutation operator plays a secondary role in the simple trajectory for a system with m =1 and T = 3$. GA. In this paper the non-uniform mutation (referred to in The return F* obtained from first iteration is at least Michalewicz 1996) is adopted. equal or less than F.If F* is less than F, the corre- Good performance of the GA as suggested by many re- sponding trajectory obtained from corridor C is used in searchers (Dandy et al. 1996) may be obtained using a the next iteration step as the trial trajectory. This iteration high crossover probability (0.5 to 1.0) and low mutation is repeated with the same constant corridor size until no probability (0.001 to 0.05). In this paper a probability of improvement can be achieved. Then the corridor size is crossover equal to 0.7 and a probability of mutation equal reduced to a smaller one in the next iteration step and the to 0.04 (corresponds to one bit per string on average) as iteration is repeated again with the new corridor size. This recommended by Wardlaw and Sharif (1999) are used. algorithm is repeated until no improvement of return can ) Discrete differential dynamic programming s Trial Trajectory State ( The DDDP is an iterative technique in which the recursive Optimal Trajectory equation of DP is used to search for an improved trajectory a(0)+σ1 among the discrete states in the neighborhood of a trial Corridor C a(0)+σ2 trajectory (Heidari et al. 1971). σ a(0)+σ3 a(N)+ 1 The background theory discussed hereinafter is referred a(N)+σ2 to in Heidari et al. (1971). σ In the DDDP approach, a trial sequence of admissible Boundaries of Corridor C a(N)+ 3 decision vectors, u (n), n = 0, 1,..., N−1, called the trial policy, that satisfies Eq. (4) or a trial sequence of values of 0 1 2 3 4 5 6 7 8 9 10 11 12 the state vector, s (n), n = 0, 1,... , N, called the trial Stage (n) trajectory, that satisfies Eq. (3) is assumed. In this paper, Fig. 3 Corridor, trial trajectory and optimal trajectory 35 be achieved even if the corridor is reduced to a smaller one good solutions were found. The improvement became very or improvement is insignificant, and then the iteration is small after about 500 generations and there were slight dif- terminated. ferences of convergences among each run after about 1,000 The initial increments are assumed at about 5% of reser- generations. voir active storages. In this paper, reduction of corridor size In a system which is highly constrained in which many to its half value is adopted from Kita et al. (1994) when no decision variables can be generated inside the large range improvement could not be obtained. that always fail to satisfy the system constraints, the se- lection process of GAs is important to select the feasible individuals and avoid wasting of computational resource. Combination of GA and DDDP The modified ranking selection approach enabled the GA to find the better solutions while spending less computation A combination of GA and DDDP is proposed to take their time compared with the roulette-wheel and tournament se- advantages and overcome their weaknesses. Though DDDP lection approaches when applied to the Mae Klong system. is very efficient in calculation and can provide a convergent The combined GA-DDDP performed for different initial solution, much time is spent to find the feasible initial trial trial trajectories in each strategy. It is found that the finally policy or initial trial trajectory, which is a difficult task obtained solutions converge into the same fitness values in especially in a complex system. On the other hand, GAs can each strategy but their decision policies are little different produce many good solutions that are close to the optimum in each period. There is no assurance that the solutions ob- but deriving precise results requires high computational tained from DDDP are the global optimal solutions. How- cost. Furthermore, finding optimal parameters for GAs is ever when the solutions derived from GA-DDDP converge a significant problem. The effect of parameter adjustments into the same fitness values, it implies that, in practice, is not known until the algorithm terminates making the the optimal solutions are obtained. The example of two process extremely time-consuming. optimal storage trajectories derived from GA-DDDP and The proposed GA-DDDP approach performs in two sep- the one obtained from the best solutions produced by GA arate stages. In the first stage, releases are used as decision are compared with the actual storage trajectory as demon- variables and the GA is carried out to obtain a prescribed strated in Fig. 4. The results obtained from optimizations number of feasible solutions that satisfy all system con- are compared as shown in Table 2. straints. The feasible storage vectors obtained from the The results obtained from GA are very close to the op- feasible solutions are then introduced to DDDP as the ini- timal ones obtained from GA-DDDP but GA spent much tial trial trajectories in the second stage. Those initial trial more computation time to derive good results compared trajectories undergo the DDDP process and they are subse- to the GA-DDDP. It is observed that the optimal storage quently converged to the optimal ones. trajectories obtained from GA-DDDP have similar patterns The significant advantage of the combination approach is throughout the year and they are very close to each other. to save computational resource for optimizing parameters In almost all periods the storage trajectories obtained from and to find feasible initial solutions. Deriving only a fea- optimizations of the Vajiralongkorn reservoir are higher sible solution regardless of the convergence by using GA than that of the actual operation. This is because of the can be accomplished within a short time because an extra constraints used for the lower bound that impose the stor- time is not required to choose the appropriate parameters. age levels. In the actual operation, the storage levels of the Nevertheless, if the good solutions obtained from GA are Vajiralongkorn were lower than the lower rule curve during used as initial solutions for DDDP, the probability that the the last seven months from September to March. subsequent search processes are trapped in the local opti- Based on the preceding assumption in 3.1, the total mum becomes very small. The property of searching for deficits obtained from optimization policies are less than the improvements from alternative initial trial trajectories that resulting from the actual operation (18.478%) except ensures that the optimal solutions are found if they produce for in strategy 5. Anyhow, in strategy 5, the hydropower the same convergences. units 4 and 5 of the Srinagarindra reservoir are able to gen- erate hydropower that results in greater benefit. Following the optimization policies in practice, the benefits obtained Results and discussions from hydropower generation of the Vajiralongkorn reser- voir will be higher than that obtained from the actual oper- The GA with the modified ranking selection was applied to ation. the Mae Klong system with a population size of 500 that is allowed to evolve for 2,000 generations, with a probability of crossover of 0.7, and a probability of mutation of 0.04. Conclusions Ten runs, with different initial random population were car- ried out for each strategy, that is, ten best decision policies The combination of GA and DDDP has been developed and were obtained for each strategy. Although each run pro- applied to optimize the operation of the Mae Klong sys- duced 500 sets of solutions, only the ones that lead to the tem in Thailand by minimizing the irrigation deficits over best fitness values were selected. The GA started with poor a drought year. The performance of the GA-DDDP is com- initial solutions but after 200–300 generations, a number of pared with the GA developed for the same problem with the 36

Srinagarindra Reservoir Vajiralongkorn Reservoir ×106 ×106 14,500 6,000 14,000

) 5,500 3

) 13,500 3 5,000 13,000 12,500 4,500 12,000 4,000 11,500

Month End Storage (m Storage End Month 3,500 11,000 Month End Storage (m Storage End Month 10,000 3,000 Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar (a) Strategy 1 6 ×106 ×10 14,000 6,500

6,000

13,500 ) 3 ) 3 5,500 13,000 5,000 12,500 4,500 12,000 4,000

11,500 (m Storage End Month

Month End Storage (m Storage End Month 3,500

11,000 3,000 Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar (b) Strategy 2 ×106 ×106 14,000 6,500

) 6,000

3 13,500 ) 3

13,000 5,500 5,000 12,500 4,500 12,000 4,000 Month End Storage (m Storage End Month

11,500 (m Storage End Month 3,500

11,000 3,000 Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar (c) Strategy 3 ×106 ×106 14,000 6,500

6,000 ) ) 13,500 3 3 5,500 13,000 5,000 12,500 4,500 12,000 4,000 Month End Storage (m Storage End Month Month End Storage (m Storage End Month 11,500 3,500

11,000 3,000 Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar (d) Strategy 4 ×106 ×106 14,500 6,500 14,000 ) 3

) 5,500 3 13,500 5,000 13,000 4,500 12,500 4,000 12,000 Month End Storage (m Storage End Month

Month End Storage (m Storage End Month 3,500 11,500 11,000 3,000 Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec Jan Feb Mar (e) Strategy 5

GA-DDDP 1 GA-DDDP 2 Best GA Actual Fig. 4 Storage trajectories based on GA-DDDP, GA, and actual operation 37

Table 2 Comparison of Strategy 1 Strategy 2 Strategy 3 Strategy 4 Strategy 5 results obtained from GA and GA-DDDP Optimal results of GA-DDDP 1. Optimal fitness 0.1846 19.5795 70.8979 154.1397 269.3050 2. GMKIP deficits 0.5519% 5.6838% 10.8156% 15.9475% 21.0794% Best results of GA 1. Least fitness 0.1882 19.6332 70.9491 154.4611 269.4295 2. GMKIP deficit 0.5558% 5.6856% 10.8156% 15.9540% 21.0816% 3. SD from 10-best solutions 0.0086 0.0969 0.1144 0.1370 0.2921 4. Ratio of GA/GA-DDDP 101.9502% 100.2743% 100.0722% 100.2085% 100.0462% modified ranking selection approach. The operating policy References of the system consists of five strategies. The combined GA-DDDP provides a number of optimal Chung I, Helweg O (1985) Modeling the California state water solutions having the same fitness values in each strategy. project. J Water Resou Plan and Manag ASCE 111(1):82– The GA produces satisfactory results that are very close 97 to those produced by the GA-DDDP but much more com- Cieniawski SE, Eheart JW, Ranjithan S (1995) Using genetic algorithms to solve a multiobjective groundwater monitoring putation time is spent. All storage levels obtained from problem. Water Resou Res 31(2):339–409 optimizations are kept inside the pre-defined rules. The ir- Dandy GC, Simpson AR, Murphy LJ (1996) An improved genetic rigation deficits obtained from optimizations in Strategies algorithm for pipe network optimization. Water Resou Res 1–4 are less than that obtained from the actual operation. 32(2):449–458 Though the irrigation deficits from optimizations in strat- Electricity Generating Authority of Thailand (2001) Report of rule curve improvement study of srinagarindra reservoir and egy 5 are higher than that obtained from the actual operation vajiralongkorn reservoir. (in Thai) but the higher benefits from hydropower generation can be Electricity Generating Authority of Thailand (1992) Research report obtained in practice. of criteria for water release from reservoirs in Mae Klong river GAs are robust and able to handle a complex and highly basin. (in Thai) Fults DM, Hancock LF, Logan GR (1976) A practical monthly nonlinear problem. They provide robust procedures to ex- optimum operations model. J Water Resou Plan And Manag plore broad and promising regions of solutions that many Div ASCE 102(1):63–76 good solutions close to the optimum are achieved which is Goldberg DE (1989) Genetic algorithms in search, optimization, and practically useful in reality. Nevertheless, GAs have some machine learning. 2nd edn. Addison-Wesley, Reading, Mass Goldberg DE, Kuo CH (1987) Genetic algorithms in pipeline disadvantages, the main shortcoming of GAs is that a high optimization. J Comput Civil Eng ASCE 1(2):128–141 computational cost is required to get the precise solutions Heidari M, Chow VT, Kokotovic PV, Meredith DD (1971) Discrete especially in a complex and large problem. The difficulty differential dynamic programming approach to water resources and uncertainty of finding optimal parameters for GAs are systems optimization. Water Resou Res 7(2):273–282 also significant problems and time-consuming. Huang WC, Yuan LC, Lee CM (2002) Linking genetic algorithms with stochastic dynamic programming to the long-term The significant advantages of GA-DDDP are to save com- operation of a multireservoir system. Water Resou Res putational resource and to derive a number of optimal so- 38(12):40-1–40-9 lutions that produce the same fitness values. Furthermore, Inoue K, Kobayashi A, Aoyama S (2003) Applicability of genetic tuning of the parameters to obtain a good performance in algorithm for idenfying the groundwater contamination source. J Rainwater Catch Sys 8(2):7–14 GA and finding a feasible initial trial trajectory in DDDP are Kita I (1997) Study on reservoirs storage regulation for effective not required. As DDDP is a part of the GA-DDDP, thus the water utilization using DDDP, Proc. of the 8th International GA-DDDP is effective for a small system where numbers Conference on Rainwater Catchment Systems 1:366–373 of discretizations and variables have no influence on the Kita I, Kitamura K, Kawachi T, Kim HT, Minami I (1994) Optimal storage regulation in a multiple-reservoir system using deter- dimensionality problem of DDDP. Anyhow, this problem ministic DDDP. Trans Jap Soc Irri, Drain Recl Engin 174:33–39 can be relieved by spending a longer time for GA in phase (in Japanese) one, which allows DDDP to spend less time in finding the Larson RE (1968) State increment dynamic programming. Elsevier optimum in phase two. Science, New York Because GAs are robust and flexible in handling a wide Liong S-Y, Chan WT, Shreeram J (1995) Peak-flow forecasting with genetic algorithm and SWMM. J Hydraulic Eng ASCE variety of problems and they are not limited with any math- 121(8):613–617 ematic properties as well as the fact that no standard pro- Mckinney DC, Lin M-D (1994) Genetic algorithm solution cedures are required, this makes GAs very interesting and of groundwater management models. Water Resour Res challenging. There exist many ways to implement GAs and 30(6):1897–1906 Michalewicz Z (1996) Genetic algorithms + data structures = improve their ability in the literature. New users can adopt evolutionary programs. 3rd edn. Springer, Berlin Heidelberg those existing approaches that are best-suited to their prob- New York lems or they can develop their own approaches. Montesinos P, Guzman AG, Ayuso JL (1999) Water distribution network optimization using a modified genetic algorithm. Water Acknowledgements The authors would like to extend their ap- Resou Res 35(11):3467–3473 preciation and gratitude to the Electricity Generating Authority of Nopmongcol P, Askew AJ (1976) Multilevel incremental dynamic Thailand for providing data used in this study programming. Water Resou Res 12(6):1291–1297 38

Oliveira R, Loucks DP (1997) Operating rules for multireservoir Veerakcuddy R (1997) Risk based optimal reservoir operation for systems. Water Resou Res 33(4):839–852 irrigation systems: Mae Klong irrigation project, Thailand. AIT Ritzel BJ, Eheart JW, Ranjithan S (1994) Using genetic algorithms Doctoral Dissertation, Asian Institute of Technology to solve a multiple objective groundwater pollution containment Wang QJ (1991) The genetic algorithm and its application to problem. Water Resour Res 30(5):1589–1603 calibrating conceptual rainfall-runoff models. Water Resou Res Savic DA, Walters GA (1997) Genetic algorithms for least-cost 27(9):2467–2471 design of water distribution networks. J Water Resour Plan Wardlaw R, Sharif M (1999) Evaluation of genetic algorithms for Manage ASCE 123(2):67–77 optimal reservoir system operation. J Water Resou Plan and Sharif M, Wardlaw R (2000) Multireservoir systems optimization Manage ASCE 125(1):25–33 using genetic algorithms: case study. J Comput Civil Engin Yang J, Soh CK (1997) Structural optimization by genetic algo- ASCE 14(4):225–263 rithms with tournament selection. J Comput Civil Engine ASCE Simpson AR, Dandy GC, Murphy LJ (1994) Genetic algorithms 11(3):195–201 compared to other techniques for pipe optimization. J Water Yeh WWG (1985) Reservoir management and operations models: a Resou Plan Manag ASCE 120(4):423–443 state-of-the-art review. Water Resou Res 21(12):1797–1818 Srivastava J, Hamlett JM, Robillard PD, Day RL (2002) Watershed Yeh WWG, Becker L, Chu WS (1979) Real-time hourly reser- optimization of best management practices using annAGNPS voir operation. J Water Resou Plan Manag Div ASCE and a genetic algorithm. Water Resou Res 38(3):3-1–3-14 105(WR2):187–203 Trott WJ, Yeh WWG (1973) Optimization of multiple reservoir Yoo C, Jung KS, Ahn JH (2003) Estimating characteristics of system. J Hydraul Div ASCE 99(HY10):1865–1884 rainfall and their effects on sampling schemes: case study for Tospornsampan J, Kita I, Ishii M, Kitamura Y (2004) Operating rule Han River Basin, Korea. J Hydrol Engine ASCE 8(3):145– curves for multiple reservoir system, a case study in mae klong 15 river Basin, Thailand. J Rainwater Catchm Syst 9(2):11–19