Introduction

Optimal reservoir operation to distinctive classes of dam and reservoir systems such as single reservoir, single-purpose reservoir, multi-reservoir, and multi-purpose reservoirs has been extensively studied to overcome the issue of water availability and water usage in water resource planning and management (Giuliani et al. 2021; Lai et al. 2022). As the frequent occurrences of extreme climate and increasing water demand have amplified risk perception and adaptive management for decision makers, numerous improvements through dam and reservoir re-operation have been adopted to change the existing operation and management procedures in order to maintain or maximize the multiple benefits obtained from the dam–reservoir system (Watts et al. 2011). With the re-operation of the dam and reservoir concept, the efficiency of existing water use is improved, while damages and cost of dam and reservoir operation are reduced (Groves and Bloom 2013). Numerous optimization techniques for reservoir re-operation have been successfully developed over the past few decades for both single- and multi-objective reservoirs such as linear programming (LP), nonlinear programming (NLP), dynamic programming (DP), and network optimization (Lai et al. 2022). Moreover, further development of artificial intelligence (AI) has led to the optimal solutions for reservoir operation problems (Allawi et al. 2018; Yadav 2023).

Constraint programming (CP) is powerful optimization approach for solving combinatorial problem, which is so-called Constraint Satisfaction Problem (CSP) (Freuder and Mackworth 2006). CP offers efficient techniques in a wide range of domains and applications such as scheduling, planning, vehicle routing, computer networks, and bioinformatics (Rossi et al. 2006). The model structures of CP consist of a set of decision variables, objective function, and constraints similarly to mathematical optimization model. The longstanding research in CP model has made tremendous progress (Rossi et al. 2006). One of the advantages of CP is that constraint model (problem) and constraint solver are clearly separated. CP supports many forms of constraints such as numerical constraints, Boolean constraints, and constraints defined over finite domains. In order to solve a problem using CP, the problem needs to be defined as a constraint model.

Generally, a constraint satisfaction problem (CSP) consists of a set of decision variables and a set of constraints, which are relations among the decision variables (Freuder and Mackworth 2006). A CSP consists of:

  • a finite set of variables (x1, x2, x3…xn)

  • a domain (D1, D2, D3 …Dn) for each variable

  • a set of constraints (c1, c2, c3…cn), each of which is a relation over a set of variables.

The solution of CSP is an assignment of values to variables consistent with all constraints. However, this solution may not be optimal solution. Thus, in order to find the optimal solution, an objective function f (x1, x2, x3...xn) needs to be added. Finally, the solution of CSP is an assignment of values to variables consistent with all constraints, where the objective function is optimized. Constraint programming (CP) (Rossi et al. 2006) is a paradigm for solving combinatorial problems that uses a wide range of techniques from artificial intelligence, computer science, and operations research. Constraint programming can support very generic forms of problems since constraint programming supports a wide range of constraints defined over finite domains such as numerical constraints, linear constraints, and Boolean constraints. In addition, CP is equipped with advanced techniques such as constraint propagation (Bessiere 2006), search, and backtracking search (Freuder and Mackworth 2006). Therefore, these make CP more powerful and can handle a number of problems. In addition, CP allows a very flexible modelling language. Let us define CP. CP consists of:

  • a finite set of variables (x1, x2, x3…xn)

  • a domain (D1, D2, D3…Dn) for each variable

  • a set of constraints (c1, c2, c3…cn), each of which is a relation over a set of variables.

  • a set of objective functions f (x1, x2, x3…xn)

The solution of CP is an assignment of values to variables consistent with all constraints, where the objective functions are optimized. This is the reason why CP can be used to solve CSP problems. Furthermore, CP can efficiently handle numerical problems. Let us illustrate an example of CP (Example 1).

Example 1

Given a CSP P as follows:

  • the set of variables X = {x1, x2, x3}

  • the domains D(x1) = {1, 2}, D(x2) = {0, 1, 2, 3}, D(x3) = {2, 3}

  • the set of constraints C = {C1: x1 ̸ = x2 ̸ = x3, C2: x1 > x2, C3: x1 + x2 = x3}

the set of objective functions F = {min(x2)}.

There are three variables, i.e. x1, x2, and x3 in

P. Each variable xi is associated with D(xi). There are three constraints in P. The definition of each constraints is as follows:

  1. 1.

    C1: it states that all variables must be assigned with different values

  2. 2.

    C2: it states that the value of x1 must be higher than that of x2

  3. 3.

    C3: it states that the addition of x1 and x2 must be equal to the value of x3

The objective of P is to minimize x2. The optimal solution to P is the set of assignment {x1 = 2, x2 = 1, x3 = 3}.

The modelling language that was exploited in this study is MiniZinc (Nethercote et al. 2007). MiniZinc is a medium-level declarative modelling language developed as a standard language for modelling constraint programming problems. It is also high level and expressive enough to express most of the CP problems. As a standard modelling language, MiniZinc is solver-independent. This means that once the problem is modelled in MiniZinc, constraint model of the problem can be solved by different constraint solvers.

In order to solve a problem using constraint programming, there are two components, which are constraint model and constraint solver. A problem needs to be defined as a constraint model. In this section, it mainly focus on constraint modelling. Basically, different constraint solvers are compatible with different modelling languages (Nethercote et al. 2007). Due to this, it is difficult to constraint modellers for conducting experiments using different solvers. Thus, MiniZinc, which is a medium-level declarative modelling language, has been developed (Nethercote et al. 2007). It has been developed as a standard modelling language for modelling constraint programming problems. Program 1 illustrates an example of MiniZinc for CSP P in Example 1.

figure a

The reservoir operation can be viewed as planning problem, which can be encoded into CSP. The objective of this study is to investigate the capability of CP to be the constraint programming-based solution approach to conduct optimal reservoir re-operation by aiming to increase the reservoir water storage of Bhumibol (BB) Dam at the beginning of dry season and minimizing water scarcity in the basin. Consequently, the excessive water released from dam during normal and filling periods and incapability to supply enough water to target water demand during drawdown period are aimed to be optimized.

Over the past decade, recent research has been devoted to the area of reservoir operation and re-operation in finding the optimal water release to reallocate the limited water resources to various demand sectors in view of effective and sustainable uses (Heydari et al. 2015; Wang et al. 2015). From any given region or area, the reservoir re-operation is based on some measures such as increasing water supply or storage efficiently, retraining water demand suitably, and maximizing hydropower production (Heydari et al. 2015; Wang et al. 2015; Kalbali et al. 2015).

Some researchers use multi-objective constraint programming to develop a tool to optimize water resources allocation based on different types of land use in the Heihe River Basin (Wang et al. 2015). They found that the land-use change affects the efficiency of water resources allocation among competing uses in the area. Importantly, it is found that the developed optimization model equipped with land-use constraint can improve the water resources allocation reasonably. A mathematical programming model for water allocation of Voshmgir Dam is developed for maximizing the profits of all consumers in agricultural and aquacultural sectors. From this experiment, it shows that the mathematical programming model can help increase operational performance of irrigation system and gross profit of farmers substantially (Kalbali et al. 2015). Another approach that has been used to optimize irrigation water is double-sided stochastic chance-constrained linear fractional programming (Zhang et al. 2018). A model is developed based on a linear fractional programming optimization framework. It is equipped with double-sided stochastic chance-constrained programming in order to handle enormous uncertainty in the Yingke Irrigation District, Heihe River Basin. The main objective of this approach is to maximize the crop water productivity in growing seasons. It can be drawn that this approach can help managers to make better decisions on resource allocation for different water sectors. In another research, the two-stage stochastic programming (Maqsood et al. 2005) equipped with chance-constrained programming (Charnes and Cooper 1959) is developed to optimize water allocation in the Yingke Irrigation District, Heihe River Basin (Yan and Li 2018). The main objective is to provide maximum irrigation target for different agricultural sectors and minimum fundamental water need for food security. The developed model also considers water cycle process since this preserves the connection between surface water and ground water. The results of this model shows that irrigation target and economic benefit can be maximized. The multi-objective dynamic programming based on reference lines to operate reservoir is proposed in the Yangtze River Basin (He et al. 2019). The main objective of this model is to maximize water resources utilization especially for power generation.

Rather than the variant of constraint programming models, some research exploits other techniques. For example, some researchers integrate artificial fish swarm algorithm (AFSA) and particle swarm optimization algorithm to maximize hydropower production for Karun-4 reservoir in Iran (Yaseen et al. 2018). Another technique called Charged System Search Algorithm is used to develop an optimization model for water supply and hydropower reservoir operation of the Dez reservoir, Iran (Asadieh and Afshar 2019). Similarly, the main objective of this model is to find the optimum releases from the reservoir, where the power production is maximized. This technique shows the feasible solution to the long-term hydropower reservoir operation. Another study aims to optimize the operational policies of a hydropower reservoir system located in the Grijalva Basin, Chiapas, Mexico (de la Cruz Courtois et al. 2021). To achieve this, the Markovian Model with Continuous State Space (MCM-CSS) approach is used. The study considers the climatological effects and variability in inflows due to climate change and is able to compute optimal policies for the reservoir system, accounting for the stochastic nature of inflows and water demand. Researchers have used the multi-objective moth swarm algorithm (MOMSA) to optimize the long-term energy production of the Karun multi-reservoir system in Iran (Sharifi et al. 2022). The study found that MOMSA had a higher sustainability index than the Non-Dominated Sorting Genetic Algorithm-II (NSGA-II) and the Strength Pareto Evolutionary Algorithm-II (SPEA-II). The MOMSA algorithm obtained an average sustainability index of 86.73%, while the NSGA-II and SPEA-II algorithms had sustainability indices of 22.73 and 46.09%, respectively.

BB Dam is a large multiple purposes dam constructed across Ping River which is one of the headstreams of the Chao Phraya River in northern Thailand as shown in Fig. 1. It has been used as the principal water supply source for agricultural and non-agricultural water demand in the Chao Phraya River Basin (CPYRB) which occupies almost 30% of the area in Thailand (Bidorn et al. 2015). BB Dam has been jointly operated with the Sirikit (SK), Khwae Noi Bumrung Dan (KNB) and Pasak Cholasite (PS) Dams by the Electricity Generating Authority of Thailand (EGAT) and Royal Irrigation Department (RID) under the regulation of the Office of the National Water Resource (ONWR) acting as the command centre for water resource planning and management. Operating these multiple dams has been manipulated using the traditional static rule curve corresponding to the seasonal and yearly water allocation plan established. More than 70% of water released from dams has been supplied for agricultural water demand in the Greater Chao Phraya Irrigation Scheme (GCPYIS) covering the irrigation service area of 10 million rai along the Chao Phraya, Lower Ping, and Lower Nan Rivers. Due to the huge reservoir capacity of BB Dam which is approximately 13,462 MCM, therefore, its storage volume has been used to absorb the massive floods and store water to moderate the hazardous droughts in the region. Since the 2011 Thailand Flood, it is reported that the reservoir inflow of BB Dam has been substantially decreased leading to the water scarcity problem in the central region, particularly in 2015, 2018, 2019, and 2020 (Kyaw et al. 2022). In addition, the situations of the consecutive severe droughts have been frequently found in a broad area of CPYRB due to an extremely low rainfall leading to unusually low water levels and inflow in major reservoirs (Kyaw et al. 2022). Therefore, the potential of increasing water storage in reservoir to cope with uncontrolled demand over dry season is definitely important.

Fig. 1
figure 1

Bhumibol Dam in the Chao Phraya River Basin, Thailand

In this study, an alternative approach to encode the reservoir operation system of BB Dam into constraint satisfaction problem was proposed using modern constraint programming technology. Formulating CP model was implemented and encoded into MiniZinc when the condition of joint operation in term of the target water demand between BB and SK–KNB Dams and restriction of total dam release were considerably constrained. In addition, our encoding into MiniZinc is high level and general, with linear time and space complexity. The main advantage of this approach is straightforward and succinct.

Materials and methods

Study area

The Bhumibol Dam is located in the Ping River Basin, Sam Ngao District, Tak Province, in the northern region of Thailand as shown in Fig. 1. The geographical coordinate of Bhumibol Dam is N1714.33 E9858.20. It is the largest multipurpose concrete ash reservoir in Thailand, with the capacity of 13,462 million m3 (MCM). Since it is located in the Ping River Basin, it mainly receives water inflow from the Ping River Basin, which has an area of 25,370 km2. The dam supplies water for irrigation, hydroelectric power production, flood control, fisheries and saltwater intrusion purpose. Particularly for hydroelectric power production, it is equipped with a hydroelectric power plant with a total installed capacity of 779.2 MW.

The Greater Chao Phraya River Basin (GCPYRB) is the largest river basin in Thailand. It occupies almost 30% of the area in Thailand (Reddy and Kumar 2006). Regarding the Greater Chao Phraya Irrigation Scheme (GCPYIS), more than 70% of water supply sources in Thailand have been provided for agricultural water sector including the irrigation service area of more than 10 million rai along the Chao Phraya, Lower Ping, and Lower Nan Rivers. The Bhumibol Dam is one of the principal water supply sources not only to supply water for non-agricultural and agricultural water uses but also to prevent the massive floods and the hazardous droughts in the region.

This shows that the Bhumibol Dam plays an important role in reservoir of Thailand. As a result, the reservoir operation of this dam is important. In this work, we are going to optimize the reservoir operation of this dam.

Data set

The data sets used in this study consist of the daily observed reservoir data of BB Dam, namely reservoir inflow (MCM), water storage (MCM), water level (m msl), reservoir outflow (MCM), and energy data of hydroelectric-power system which were gathered from EGAT from 2000 to 2018. The daily observed runoff data at W.4A station gathered from RID in Fig. 2 were also used as potential side flow downstream of BB Dam to help reduce the amount of released water from BB Dam. In addition, the targeted water demand for agricultural and non-agricultural sectors in CPYRB was generated on the daily basis from 2000 to 2018 in accordance with seasonal and yearly water allocation plan. All the data were preliminarily checked and imputed using the basic statistical method and arranged the data format before entering into the constraint model.

Fig. 2
figure 2

Reservoir system used to identify reservoir operation modelling

Development of constraint programming model

As mentioned above, the reservoir operation of BB Dam was optimized using the concept of constraint programming (CP) via MiniZinc since the operation of a multipurpose single reservoir can be considered as nonlinear problem. The main target is to release daily reservoir water at an optimum level considering the physical constraints of multiple dam–reservoir systems, downstream flow conditions, and multiple objectives for the current operation of BB Dam. The operational responses in terms of increasing reservoir water storage of BB Dam at the end of the wet season (May–October) on the 31st of October were evaluated to envisage the potential in supplying water, particularly for agricultural water needs over dry season in GCPYIS.

The following hypotheses were adopted in this study to define reservoir operation problem for BB Dam:

  1. 1.

    Targeted demand of BB Dam includes local demand (DELP) and joint demand (DECPY) in CPYRB specified with the static proportion of 0.44:0.56 between BB and SK-KNB Dams (Kyaw et al. 2022).

  2. 2.

    Water released from BB Dam should be equal to or higher than the targeted demand in the wet season when the water supply source in the reservoir is sufficient.

  3. 3.

    Water released from BB Dam should be equal to or higher than 80% of the targeted demand in the dry season. This means 20% of the water deficit can be allowed during the dry season in case of limited water supply in the reservoir.

  4. 4.

    20% of potential side flow at W.4A runoff station installed in Wang River is specified, which is discharged into Ping River downstream of BB Dam (Charoenlerkthawin et al. 2021).

  5. 5.

    Minimum and maximum water releases of BB Reservoir are 5 and 69.76 MCM, respectively, according to the operational guidelines and current practice by EGAT.

  6. 6.

    Minimum and maximum water storages of BB Reservoir are 3,800 and 13,462 MCM at minimum pool level and normal pool level, respectively.

Description of the constraints

Firstly, input parameters of the constraint model were identified and decision variables, which aim to solve, were determined as output of the constraint model.

  • Parameters:

  1. 1.

    St = reservoir water storage at time t (MCM)

  2. 2.

    It = reservoir inflow at time t (MCM)

  3. 3.

    SFt = potential side flow at time t (MCM)

  4. 4.

    Et = evaporation loss at time t (MCM)

  5. 5.

    Rmin = minimum water release of BB Dam (MCM)

  6. 6.

    Rmax = maximum water release of BB Dam (MCM)

  7. 7.

    Smin = minimum storage capacity of BB Dam (MCM)

  8. 8.

    Smax = maximum storage capacity of BB Dam (MCM)

  9. 9.

    SURC = reservoir storage of BB Dam at the elevation of upper rule curve (MCM)

  10. 10.

    Dt = proportion of targeted water demand for BB Dam at time t (MCM)

  11. 11.

    Gt = energy production at time t (KWhr)

  12. 12.

    Htt = tail water head at time t (m msl)

  13. 13.

    Htf = front water head at time t (m msl)

  14. 14.

    e = overall efficiency of hydropower plant, which is approximately 91.27% from the analysis of hydroelectric-power system of BB Dam when the working hour is assumed as 24 h per day

  15. 15.

    y = specific weight of water equal to 9.81 m/s.2

  16. 16.

    t = time step, which is a day in this study

  17. 17.

    T = length of operational time horizon

  • Decision variables:

    two decision variables which were needed to solve include:

  1. 1.

    Rt = optimum daily water release at time t (MCM)

  2. 2.

    St+1= reservoir water storage at time t+ 1 (MCM)

  • Constraints:

The mass balance constraint of BB reservoir is determined following the principle of conservation of mass in reservoirs. The final reservoir water storage can be computed by the linear equality constraint equation as expressed in Eq. 1:

$$S_{t + 1} = S_{t} + I_{t} - E_{t} - R_{t}$$
(1)

The reservoir storage capacity during a given time t should be between the minimum and maximum capacity of BB reservoir. Therefore, reservoir storage constraint is mathematically described in Eqs. 2 and 3:

$$S_{{{\text{min}}}} \le S_{t} \le S_{{{\text{max}}}}$$
(2)
$$S_{{{\text{min}}}} \le S_{{t + {1}}} \le S_{{{\text{max}}}}$$
(3)

The reservoir release constraint was set up in accordance with the operational guidelines and current practice of EGAT in supplying water to meet multiple purposes downstream. Determination of the amount of water release during normal and drawdown periods in the constraint programming model is considered based on the targeted water demand and potential side flow downstream of BB Dam. During wet and dry seasons, the 20% of total water demand is partially satisfied by the potential side flow, and the remaining is supplied by the dam. However, 20% of permissible water shortfall can be allowed during critical drought in the dry season when the water storage in the reservoir is certainly limited as mathematically described in Eqs. 4 and 5. In other words, the 100% of targeted water demand can be potentially supplied in the wet season (May–October) and 80% of targeted water demand can be achieved in the dry season (November–April). In other words, setting up 80% of targeted water demand as the certain release during dry season in the CP model is referred to 80% of quantity-based reservoir reliability which is considered as very good reliability in terms of reservoir operation performance (Jain and Bhunya 2008). Consequently, some amount of water can be saved and stored in reservoirs for later use

$$R_{t} \ge D_{t} - (0.{2} * SF_{t} ) ;{\text{wet\;season}}$$
(4)
$$R_{t} \ge (0.{8} * D_{t} ) - (0.{2} * SF_{t} ) ;{\text{dry\;season}}$$
(5)

In addition, the controlled amount of water release is then utilized to generate hydroelectricity as expressed in Eq. 6 when Rt is converted from volume (MCM) into flow rate (cms) and Ht is the effective head which is the difference between front water head and tail water head.

$$G_t = \frac{\left(\frac{e}{100} * y * \left(\frac{(R_t * 10^6)}{(24 * 60 * 60)}\right) * H_t * \Delta_t\right)}{10^3}$$
(6)

where Ht = Htf − Htt and ∆t is 24 h. The release from reservoir at time t should also lie between minimum water release and maximum water releases as expressed in Eq. 7. In this study, the permissible value of minimum water release of BB Dam is specified corresponding to the ecological and water supply needs along the Ping River which is approximately 5 MCM per day. The maximum water release is determined according to the maximum turbine discharge of a hydropower system of BB dam which is 69.76 MCM per day

$$R_{{{\text{min}}}} \le R_{t} \le R_{{{\text{max}}}}$$
(7)

During refilled periods, determining the reservoir release in the model is mainly subject to the extent of incoming inflow and the available water storage at different threshold levels. Therefore, four threshold storage levels, namely ST R1, ST R2, ST R3, and ST R4, are assigned to envisage the severity levels of flooding and operational measures currently manipulated by EGAT for flood moderation. Therefore, amount of reservoir release is prescribed as different percentages of inflow as mathematically explained in Eqs. 811.

$$R_{t} = I_{t} |S_{t} \ge S_{{{\text{TR}}1}} \left( {{13},{298}.{\text{9MCM}}} \right)$$
(8)
$$R_{t} = 0.{7} * I_{t} |S_{t} \ge S_{{{\text{TR}}2}} \left( {{12},{8}0{9}.{\text{6MCM}}} \right)$$
(9)
$$R_{t} = \, 0.{5} * I_{t} |S_{t} \ge S_{{{\text{TR}}3}} \left( {{12},{483}.{\text{4MCM}}} \right)$$
(10)
$$R_{t} = 0.{3} * I_{t} |S_{t} \ge S_{{{\text{TR}}4}} ({12},{157}.{\text{2MCM}})$$
(11)

The nonnegative restriction on all variables of the problem is also defined in the constraint programming model as given in Eq. 12

$$S_{t} ,I_{t} ,E_{t} ,{\text{SF}}_{t} ,S_{{t + {1}}} ,D_{t} ,G_{t} \ge 0$$
(12)

Description of the objectives

Multi-objective optimization was applied to characterize the actual operation and physical reservoir system of BB Dam. Minimizing water scarcity and excessive water as a result of reservoir operation of BB Dam by CP model was aimed to achieve. In addition, optimal daily release scheme was expected to solve. Equations 13 and 14 express the objective functions of CP model. The first objective function is to minimize the sum of squared deviation of releases and targeted water demand or water scarcity (Eq. 13). The second objective is to increase the water storage by reducing excessive water during refilled period. Therefore, the sum of absolute value between water storage in specific time periods and water storage controlled by upper rule curve is minimized as mathematically shown in Eq. 14.

$$F_1(x) = \sum_{t=1}^{T}(D_t - R_t)^2$$
(13)
$$F_2(x) = \sum_{t=1}^{T}\lvert S_t - S_{URC}\rvert$$
(14)

Multi-objective (Eq. 15) is transformed into aggregated objective function by multiplying each objective function by the weighting factors, w1 and w2 which are equally assigned and total sum is 1 (Eq. 16).

$${\text{minimize}}{\kern 1pt} F\left( x \right) = w_{1} \cdot F_{1} \left( x \right) + w_{2} \cdot F_{2} \left( x \right)$$
(15)
$$w_{{1}} + w_{{2}} = {1}$$
(16)

Experimental description

All constraints and objectives defined in Sect. “Development of Constraint Programming Model” are implemented in MiniZinc. For the constraint solver, in this study, the constraint solver IPOPT (W¨achter and Biegler 2006) is exploited since this problem can be considered as nonlinear problem. To achieve the study goal, the two settings for optimization model were implemented as follows:

  1. 1.

    Setting 1 is called yearly CP model, which reservoir release constraint is kept the same throughout the whole year similar to release constraint in the wet season.

  2. 2.

    Setting 2 is called seasonal CP model, which release constraint varies seasonally due to changing water supply status in a reservoir.

To prove that CP can be an effective tool and provide good operational results for dam operators, increased reservoir water storage at the end of the wet season and reservoir release scheme were considerably diagnosed for these two scenarios. The operational performances performed by CP models were benchmarked against the current operation.

Results and discussion

Optimal release scheme obtained from CP model

Daily reservoir release of BB Dam obtained from CP models for long-term and short-term operation is explored as graphically exhibited in Figs. 3, 4, 5. It is envisaged that the daily long-term reservoir release scheme of BB Dam obtained from two different sorts of CP models conforms well with the current operation in a broad range of reservoir inflow. In the worst flood year 2011, as unusually heavy rainfall was likely increased throughout CPYRB from August to November creating severe flood in vast areas of the lower basin, consequently, the determination of reservoir release by CP models with seasonal and yearly constraints is found to be different in comparison with the current operation in term of release volume. Pre-depletion of reservoir with higher release volume by CP model is recommended from the beginning of August up to the peak in October and declined volume in November as shown in Fig. 4. It is also investigated that initial water storage and incoming reservoir inflow are two key factors influencing the determination of release volume during the refilled period of flood year. In contrast, the determination of reservoir release by the CP model is considerably subject to the targeted water demand in specific drought years. It is found that the water release scheme in the dry season (November–April) in the critical drought year 2015 is specified as the same amount as the targeted water demand due to the availability of water storage in the reservoir. In addition, it is very close to those observed values for current operation as shown in Fig. 5. Because the considerable amount of side flow during wet season (May–October) is potentially high, the release pattern performed by CP model with seasonal and yearly constraints is different compared to the current operation. However, the yearly amount of water release by CP models in 2015 is higher than the current operation of 1.87%. This indicates that CP model can generate the proper reservoir release scheme during dry and wet seasons in specific drought year in accordance with the demand pattern and potential side flow to alleviate the water deficit in the basin. Figure 5 also shows the comparison between the pattern of reservoir release as a result of the current operation and targeted water demand in critical dry years. It is explicit that the release pattern substantially differed from targeted water demand in some periods, particularly during mid- to end-periods of the wet season when the water demand is very crucial for crop growth in the Greater Chao Phraya Irrigation Scheme. This leads to the crop yield reduction for the current operation due to insufficiency of irrigation water.

Fig. 3
figure 3

Daily reservoir release of BB Dam obtained from CP models for long-term operation

Fig. 4
figure 4

Daily reservoir release of BB Dam obtained from CP models in critical flood year

Fig. 5
figure 5

Daily reservoir release of BB Dam obtained from CP models in critical drought year

Response of increased water storages

The increase in agricultural production and usage of water in all economic activities are the most important beneficial impact of reservoir operation task of water resource development project. As the higher availability of water in reservoir can significantly yield increased crop production in the irrigation command area in particular, the response of increased water storage in the reservoir as a result of CP models in this study is explored and presented in Figs. 6 and 7.

Fig. 6
figure 6

Increased BB Dam reservoir storage from the Seasonal CP model

Fig. 7
figure 7

Increased BB Dam reservoir storage from the Yearly CP model

It is illustrated that before the 2011 Flood, the yearly reservoir water storages were substantially increased particularly during 2006–2010 with the highest increased storage volumes of 3,858 MCM and 4,099 MCM for seasonal and yearly CP models, respectively. Moreover, when manageability in handling excessive flooded water in 2011 was under control, the yearly reservoir water storage in consecutive drought years during 2013–2015 was found to be slightly increased by approximately 37–329 MCM and 88–381 MCM for the seasonal and yearly CP models, respectively. This reflects that altering reservoir operation by CP model can help increase the availability of water for multiple uses in the basin.

Response of hydroelectricity production

Water stored in a hydropower reservoir can provide a certain amount of water supply as well as potential hydraulic head which are beneficial to hydroelectricity production. In principle, the hydroelectric generation is sensitively affected by the changes in water availability of the reservoir system, volumetric released water, hydraulic head and overall efficiency of the hydropower plant. Thus, if the water storage in the reservoir is increased, this indicates that the ability to produce hydropower is potentially enlarged. In this study, the response of hydroelectricity production of BB Dam is explored as a result of the CP models, and the yearly estimated energy of the two CP models is compared to the current operation as shown in Fig. 8. It is illustrated that the dam release from 2000 to 2018 obtained by CP model is slightly lower than the current operation. However, the release volume and pattern from 2012 to 2018 are definitely approach to current operation. Overall, there is not much difference in the yearly hydroelectricity production between the CP model and current operation except at the initial stage of developing the hydropower project in 2008.

Fig. 8
figure 8

Comparison of hydroelectricity production between CP models and current operation

In addition, the operational results by CP model evaluated in terms of percentage decrease in reservoir release volume and percentage increases in water storage and hydropower production are given in Table 1. It is revealed that percentage decrease in release volume by CP models with seasonal constraint and yearly constraint are – 0.88% and – 0.93%, respectively. Moreover, when potential side flow downstream of BB Dam is harvested with the seasonal CP model, the percentage decrease in reservoir release is changed to – 1.93%. This means that some amount of reservoir water of approximately 47.12–103.83 MCM/year can be saved and stored in reservoir for subsequent use in CPYRB when different sorts of CP models are deployed. This leads to the increase in yearly reservoir water storage of ranging from +11.03% to +15.21% when CP models are performed. Moreover, it has been observed that the reservoir storage has increased by 7.10% and 7.94% at the end of the wet season (the 31st of October), when seasonal and yearly constrained models are used, respectively. This is because the CP models and its solver take into account the necessary targeted demand with respect to the modelled constraints. Additionally, the storage capacity can go up to 10.49% when potential side flow is considered. This envisages the higher possibility of supplying reservoir water for agricultural water needs over dry season in GCPYIS. In addition, it is comparable that the yearly CP model can provide a higher percentage increase in water storage volume than the seasonal CP model in both the wet season and dry season. As the potential hydraulic head is subject to increased reservoir water storage, therefore, the increase in hydropower production is definitely found of ranging from +6.10% to +13.79% by these different sorts of CP models.

Table 1 Reservoir operation performance of CP model compared to current operation

According to the operational results as aforementioned, improvement in reservoir operation performances of multi-purpose dam through CP multi-objective optimization is achieved when water scarcity and excessive water are minimized. The minimum and maximum water released from dam is identified as a restricted constraint in the model. The success of the CP model is that it can use constraints to reduce the set of values that each variable can take to find the best solution. In this study, the specific constraints are specified including mass balance constraint, reservoir storage constraint, reservoir release constraint during refilled and drawdown periods, and overflow constraint. In addition, the CP model can provide a realistic and detailed representation of the reservoir system and its operations. Importantly, it can generate optimal and transparent values of the water release scheme based on the assigned objectives and complex constraints of a specific reservoir system.

Conclusions

Application of modern constraint programming technology for reservoir operation optimization was demonstrated aiming to minimize water scarcity and excessive water as a result of the release decision of BB Dam in CPYRB, Thailand. Formulating CP model for the reservoir operation of BB Dam was implemented, while the condition of joint operation between BB and SK–KNB Dams including targeted water demand and restriction of total release to the downstream river were systematically constrained in the model based on the physically-based reservoir system. The potential of downstream flow condition was also considered to partially supply downstream water demand and store savable water in the reservoir for subsequent use during the planting season. Improvement in the reservoir operation performances to secure the benefit of multi-purpose dam through CP multi-objective optimization was proven. It is revealed that CP model can diminish some extent of yearly release volume from the reservoir, while the daily release scheme conforms well with the actual operation. The substantial increase in reservoir water storage and hydropower production as a result of CP models is found in comparison with the current operation. In addition, risk-based management in flood and drought years by CP models can be well handled as the specific release constraints during refilled and drawdown periods are used to define the constraint satisfaction problem.