1 Introduction

The transformation of a river into a reservoir facilitates water column stratification and then results in changing the downstream water temperature regime and the sensitive downstream ecosystems. Studies have been launched recently to quantify the effects of dams on downstream water temperatures/water quality to minimize those negative influences through structural and/or operational modifications. Coupled simulation and optimization (SO) models may be used for developing a framework that establishes water quantity and quality objectives for optimal reservoir operational strategies (Paredes and Lund 2006; Shirangi et al. 2008; Karamouz et al. 2009; Yin and Yang 2011; Ferreira and Teegavarapu 2012; Castelletti et al. 2012; Teegavarapu et al. 2013; Hu et al. 2014; Soleimani et al. 2016). Evolutionary algorithms (EAs) are computationally intensive methods in SO approaches which require high number of function evaluations to reach termination criteria (Johnson and Rogers 2002). Furthermore, consideration of water quality aspects significantly increases the computational intensity especially when modeling systems in a simulation package is CE-QUAL-W2, a complex and comprehensive 2D numerical hydrodynamic and water quality simulation model (Cole and Wells 2008). Surrogate models are often used to reduce the computational requirements of more detailed methods (Simpson et al. 2011) in the highly expensive SO models. Generally, the form of the surrogate model in different problems varies depending on the nature of desired model output and the problem characteristics (Razavi et al. 2012).

In this study, a dynamic emulation model is used to approximate the time series thermal responses based on the time variable reservoir operational strategy. To construct a surrogate model of HR (high resolution) CE-QUAL-W2, a simplified LR (lower resolution) CE-QUAL-W2 model has been defined which provides quantitatively at least as accurate as descriptions of the dynamics in the reservoir systems at a computational cost much lower than the HR CE-QUAL-W2 model. Although LR CE-QUAL-W2 model reduces extensive computational burden of HR CE-QUAL-W2 model but it would not be applicable as the only surrogate model due to extensive computing time. ANN, known as the data-driven model, could be suitable surrogate model, improving the computational burdens of LR CE-QUAL-W2 model properly.

In this study, the proposed surrogate models are linked to particle swarm optimization (PSO) algorithm (Saadatpour and Afshar 2013) to derive optimal reservoir operational strategies in the selective withdrawal framework (controlling the outflow rate and locations, and time of release). Reservoirs structured with selective withdrawal systems, consist of multiple intakes that draw from multiple depths. In the operational strategy with selective withdrawal framework, multiple intakes could be opened simultaneously at reservoir to mix water from different elevations (Rheinheimer et al. 2014). The optimal reservoir operational strategy in this study encompasses the temperature and quantity aspects to preserve the rare and valuable natural ecosystems in the Karkheh river and to meet the downstream environmental, agricultural, and hydropower water demands, simultaneously.

Although there are advance researches on water quality and/or temperature forecasting models on river and reservoir systems (Abudu et al. 2011; Hong and Bhamidimarri 2011), inclusion and implementation of specified operational strategy in reservoir modeling schemes are rare. Furthermore, deriving optimal reservoir operational strategy in the selective withdrawal scheme considering quality and quantity issues in 2D gradient behavior reservoir has not received considerable attentions due to computational bottleneck of 2D numerical hydrodynamic models. The combination of the proposed techniques and tools in this research provides new approach to solve this high complicated large scale problem.

The structure of present paper is as follows. The model framework consists of the tools and methodology described in Section 2. Case example descriptions are illustrated in Section 3. The case study application (Section 4) is followed by detailed analysis of results and finally conclusions are presented.

2 Model Framework

Deriving optimal reservoir operational strategies encompassing water quantity and quality aspects requires extensive use of WQSMs (water quality simulation models). High fidelity computational WQSMs are still challenging in most SO approaches which could result in prohibitively high computing time.

To overcome the high computational burden of numerical WQSM (Fig. 1a), two different surrogate models (Fig. 1b and c) are applied in this research. Then, various surrogate based optimization techniques (SBOTs) have been structured to derive optimal reservoir operational strategies in the selective withdrawal scheme. More details about the various SBOTs will follow.

Fig. 1
figure 1

a HR CE-QUAL-W2 model of Karkheh reservoir; b LR CE-QUAL-W2 model of Karkheh reservoir; c: data driven model of temperature simulation model in Karkheh reservoir (Wind Speed, Air Temperature, Inflow Thermal Fluxes, Reservoir Water Level, Outflow, and Middle Outlet Withdrawal Percentage as the Input Data of Static ANN Model)

2.1 Description of LR CE-QUAL-W2 Model

In CE-QUAL-W2 model, the computational elements are defined as finite difference representation of the water body. The governing partial differential equations in each computational element are solved by numerical approach to calculate the water body responses. CE-QUAL-W2 includes a variable time step algorithm to ensure numerical stability requirements. As the dimensions of a grid cell decrease, the time step must also decrease to maintain numerical stability. Defining coarser grid (LR) with fewer computational cells will result in decreased runtimes in numerical model (Liu and Minsker 2002).

Replacing HR CE-QUAL-W2 model with the LR will reduce the computational time while sacrificing the accuracy. The computational time reduction versus sacrificing the accuracy in various process based surrogate model alternatives of the studied water body is compared with HR CE-QUAL-W2 and the efficient one will be selected. The LR CE-QUAL-W2 model should be capable of capturing the dominant system characteristic predicted by the HR model based on temperature model in the calibration, verification, and scenario evaluation periods.

2.2 Description of ANN as Surrogate Model

ANN, as surrogate model of large-scale and complicated WQSM, effectively is used to depict the dynamic thermal responses of reservoir due to various reservoir operational strategies in the selective withdrawal scheme. Selective withdrawal is the capability which could be used to selectively release the quality of water that is desired and to determine the appropriate available operation of release structures (Cahskan and Elci 2009).

The surface heat exchange, stratification and longitudinal temperature distributions in a reservoirs depend on air temperature, dew point temperature, cloud cover, wind velocity, thermal inflow and outflow fluxes, water depth and water volume (Edinger 2002; Afshar and Saadatpour 2009). Also, the delay between cause and effect in the environmental dynamic system is a process whose outputs lag behind its inputs in some fashion. The sensitivity analysis performed by the authors on some large reservoirs revealed that the time dependent response of the system may not properly be forecasted with only input and output fluxes to the system (Saadatpour 2012). Therefore, proper lags should be included in the data input set to define model behavior properly. Furthermore, due to effects of the selective withdrawal scheme on the local and outflow water temperature variations in deep reservoirs, the withdrawal framework should be considered as the ANN input data.

To determine the appropriateness of feature selection in ANN model, an information theoretic approach is applied (Tourassi et al. 2001). The approach is based on the mutual information (MI) concept which measures the general dependence of random variables without making any assumptions about the nature of their underlying relationships. MI expresses the quantity of information one has obtained on X by observing Y. On a discrete domain, the MI of two random variables X and Y is defined as (Tourassi et al. 2001).

$$ I\left( X; Y\right)=\sum_{x\in X, y\in Y} \Pr \left[ X= x, Y= y\right].{log}_2\left(\frac{ \Pr \left[ X= x, Y= y\right]}{ \Pr \left[ X= x\right]. \Pr \left[ Y= y\right]}\right) $$
(1)

Pr [X = x, Y = y] is the joint probability distribution, Pr[X = x] and Pr[Y = y] are marginal probability distribution of variable X and Y, respectively. The mutual information, I (X; Y), measures how much the uncertainty of variable X is reduced if Y has been observed. It quantifies the amount of information that one random variable contains about the other. The MI can captures the linear and non-linear dependence (Tourassi et al. 2001).

The MI between each feature with the reservoir outflow water temperature is calculated based on Eq. 1 and the effective parameters are determined. Lagged inputs of each of these variables are also included in the ANN model to consider the dynamic behavior of this environmental system (Fig. 1c). The good performance of the proposed static ANN is due to proper feature selection and providing data input from various long term reservoir operational strategies to consider the effects of unsystematic patterns of human interventions.

2.3 Simulation-Optimization (SO) Model

The SO approach would be widely applicable in water resources management. In this research, sequential and adaptive surrogate models are developed in SBOTs. In the sequential approach, either LR CE-QUAL-W2 model or the static ANN model are linked to PSO (Fig. 2). The SBOTs apply the surrogate models as the WQSMs, sequentially.

Fig. 2
figure 2

Sequential surrogate model in SBOT applied in deriving optimum reservoir operational strategy

In an adaptive technique, the precision of static ANN is improved based on LR CE-QUAL-W2 model as the more fidelity surrogate model (Fig. 3). LR CE-QUAL-W2 model provides feedback information to static ANN model in an online routine. In predetermined number of iterations, the crowding distance function is called to approximate the distance between the particles of PSO algorithm and ANN input data (archive). The minimum crowding distance value of each particle is found as the distance index of that particle (Eq. 2). Then, the distance indexes are sorted in descending order and the most widely spread solutions (particles) from ANN trained data (archive) are simulated based on LR CE-QUAL-W2 model. Based on the results of the LR CE-QUAL-W2 model, the static ANN is re-sampled and re-modeled.

$$ {\mathrm{distance}\ \mathrm{i}\mathrm{ndex}}_{\mathrm{j}}=\operatorname{Min}\left(\mathrm{d}{\left({\mathrm{X}}_{\mathrm{ANN}}^{\mathrm{i}},{\mathrm{X}}^{\mathrm{j}}\right)}^{\forall}\mathrm{i}=1,2,..,\mathrm{n}\mathrm{\hbox{'}}\forall \mathrm{j}=1,2,..,{\mathrm{n}}_{\mathrm{p}}\right) $$
(2)
Fig. 3
figure 3

Adaptive surrogate model in SBOT applied in deriving optimum reservoir operational strategy

XiANN and Xj are the ith ANN archive data and jth particles, respectively. n’ and n p are the number of ANN archive populations and the number of particles in the predetermined swarm iteration.

Due to highly complex nature of the problem, it is necessary to carefully monitor the infeasible solutions. In this problem two types of infeasibilities may occur; (1) minimum reservoir storage volume violation and (2) upper outlet withdrawal where water surface level is below the upper outlet location.

In order to eliminate the minimum reservoir volume violations, the mass balance equation is solved based on monthly reservoir operational strategies generated by PSO in the sequential daily time step to diagnosis the time periods in which the infeasibility occurs. If constraint violation is identified, the random mutation between zero and available water volume determines the release volume in that time step. To avoid the water withdrawal from empty layers in the reservoir, the fraction of water withdrawal from the upper outlet is pushed to zero resulting in total withdrawal from the lower outlet. The infeasibility handling technique eliminates the unnecessary evaluation of infeasible solutions and increases the accuracy of the static ANN model via disregarding infeasible solutions in the training stage.

2.4 Model Formulation

The chosen objective functions in this research integrate water quality and quantity objectives. To evaluate the performance of various SBOTs, the weighted sum method is applied to aggregate the normalized quality and quantity issues (Eq. 3). The defined objective functions can be expressed as below:

$$ \boldsymbol{ObjFun}=\alpha .\mathbf{B}.{f}_{quality}+\beta .{f}_{quantity} $$
(3)
$$ {f}_{quality}=\sum_{Dtime=1}^{tend}{\left(\frac{\ {Temp}_{River}^{Dtime}-{Temp}_{outflow}^{Dtime}}{\ {Temp}_{river}^{Dtime}}\right)}^2 $$
(4)
$$ {f}_{quantity}=\sum_{t=1}^{t final}{\left(\frac{\ {demand}^t-{Release}^t}{\ {demand}^t}\right)}^2 $$
(5)

In the above equations, \( {Temp}_{\mathrm{River}}^{\mathrm{Dtime}} \) and \( \mathrm{T}{emp}_{\mathrm{outflow}}^{\mathrm{Dtime}} \) are the temperature of the downstream river and the reservoir outflow water temperature at time Dtime, respectively; demand t and Release t are the downstream water demands and the allocated water to the downstream demands at month t, respectively. The quality objective function (f quality ) is aimed to minimize the negative effects induced by the altered downstream water temperature in the Karkheh river and is calculated in each 10-day time step (Eq. 4) during March to June, native fish spawning months in Karkheh river, of each year. The quantity objective (f quantity ) is defined to increase the downstream agricultural and environmental demand satisfaction (Eq. 5). The quantity and quality objective functions are calculated at monthly and 10-day interval, respectively. To compensate the differences between the numbers of comparing the quality and quantity criteria in two objective functions, coefficient “B” is used (Eq. 3). Release t is the decision variable in this research which affects reservoir outflow water temperature and also downstream water demand satisfactions. Release t is determined with PSO algorithm in the structure of SBOT and its effects on reservoir outflow water temperature are determined by surrogate WQSM. α and β are the weights assigned to quality and quantity objectives. The defined problem in Eqs. 3 to 5 is solved during 5-year time horizon.

Then the best and high performance one of SBOTs is applied on deriving optimum reservoir operational strategies in the selective withdrawal framework in Karkheh reservoir during 15-year time horizon. The quantity objectives are minimization the downstream agricultural and environmental demand deficits and maximizing annual hydropower peak energy generation. The defined problem is solved in an efficient SBOT framework applying multi objective PSO (MOPSO) (Saadatpour and Afshar 2013) known as an optimization technique. The problem objective formulations are Min f quality , Min f quality , and Max Annual Hydropower Peak Energy.

3 Case Study

The Karkheh reservoir is located in the south west region of Iran. With 5 × 109 m3 capacity, 60 km length, and 162 km2 surface areas in normal water level, this reservoir is one of the largest reservoir in Iran. Its average and maximum depth are 61.8 and 117 m, respectively. Karkheh dam has four outlets located in longitudinal and vertical positions in the impoundment. Dasht Abbas tunnel as a longitudinal outlet located in the length 45 km along the Karkheh reservoir. The remains three outlets located in the length 60 km as the reservoir intake; the bottom outlet is used for sediment flushing and the middle and upper outlets can be used for the selective withdrawal. The hydrological, meteorological, hydraulic, agricultural, and hydropower data for Karkheh reservoir model setup are provided from “Integrated Soil and Water Study in Karkheh River Basin” (MGCE 2011a).

Karkheh reservoir provides many benefits to society and promotes development in the Karkheh river basin. Impounding the Karkheh river like any dam around the world, not only alters the pattern of downstream flow, it also changes the seasonal thermal variations in Karkheh river. The losses of seasonal variability in the downstream thermal regime due to present release patterns have altered the biota of the river, particularly native fishes and the aquatic food web. Based on a field observations and evidence reported by the researchers, there are valuable resources in Karkheh river. The natural thermal variation during middle of March to June is important for valuable native fish (Glyptothorax silviae and Leuciscus cephalus) spawning in Karkheh river (MGCE 2011b). Furthermore, any degradation of Karkheh river ecosystem could affect the health of HAWR AL-AZIM wetland ecosystem in which Karkheh river joints to it (Makvandi et al. 2006).

To reduce the effects of Karkheh reservoir on altering downstream thermal variation, reservoir outflow water temperature is considered as the quality objective in deriving reservoir operational strategies in the selective withdrawal framework.

4 Model Application

Replacing HR CE-QUAL-W2 model of Karkheh reservoir (with 55 layers and 66 segments) (Afshar and Saadatpour 2009) with the LR CE-QUAL-W2 will reduce the computational time while sacrificing the accuracy. Considering the computational efficiency and desirable accuracy (Table 1), the model with presented properties in alternative 8 has been selected as the suitable surrogate model of Karkheh reservoir. The LR CE-QUAL-W2 model of Karkheh reservoir is constructed with 19 longitudinal segments and up to 28 vertical layers depending on the local reservoir depth. The computational time in the selected process based surrogate model is reduced to 93% compared with HR CE-QUAL-W2 during a 15-year time horizon. The accuracy of the LR CE-QUAL-W2 is sacrificing about 4% compared with the HR CE-QUAL-W2 model in Karkheh reservoir. The comparisons between the thermal responses of the Karkheh reservoir LR with HR CE-QUAL-W2 model based on various scenario analyses are investigated. The statistical measures demonstrate the LR CE-QUAL-W2 model’s ability to simulate hydrodynamic and thermal behaviors of the Karkheh reservoir compared with HR CE-QUAL-W2 model (Fig. 4). Average mean and root mean square error for 1825 days (5 years) reservoir outflow water temperature compared with HR model do not exceed 1.22 °C and 0.97 °C, respectively.

Table 1 Percentage of time reduction versus the sacrificing the accuracy in various LR process based surrogate model compared with HR CE-QUAL-W2 of Karkheh reservoir
Fig. 4
figure 4

Outflow water temperature variation predicted from HR and LR CE-QUAL-W2 model for various reservoir operational strategies in Karkheh reservoir (a and b)

The MI criteria is calculated to determine the most effective factors on Karkheh reservoir outflow water temperature. The MI between each feature with the reservoir outflow water temperature is presented in Table 2. Based on the MI criteria in Table 2, Karkheh reservoir outflow water temperature is more dependent on air temperature, inflow thermal flux, water surface elevation (WSE), outflow, wind speed, and withdrawal scheme, respectively. These important features (factors) are considered as input data of static ANN. Cloud cover, wind directions, dew point temperature, and water inflow have fewer influences by comparison. In this research, time lag and averaging time intervals are selected as 90 and 10-day, respectively. These numbers are selected based on extensive sensitivity analysis and hydrodynamic response analyses in Karkheh reservoir (Saadatpour 2012). To set up ANN model, 20 various reservoir operational strategies during simulation periods (20 various time series) are generated based on uniform random distributions. The thermal responses of LR CE-QUAL-W2 model in 10-day interval are considered as the ANN model output. 10-day averaging of more effective factors are introduced as the input data to static ANN model. It should be noticed that the Karkheh reservoir daily outflow water temperature is less affected by the same hourly/daily hydrological, meteorological, and reservoir operational strategy events due to large size of the water body. The lag time between Karkheh thermal responses and leading causes is about 3 months (90 days). Therefore an array with 9 dimensions is assigned to each feature of the static ANN model inputs. The input and output structure in temperature response approximations is depicted in Fig. 1c.

Table 2 MI criteria for the features extracted from the prior knowledge of the reservoir thermal model

Determining an appropriate architecture of ANN is also an important issue since the network topology directly affects its computational complexity and its generalization capability. In this research, the results of the various training and learning functions and neuron numbers are analyzed and the best structure is selected to approximate the temperature responses in Karkheh reservoir. The thermal responses of 20 various time series reservoir operational strategies are considered as the training data. The prediction accuracy of ANN model is estimated by 5 various series of reservoir operational strategy.

The comparison between static ANN prediction and Karkheh reservoir LR CE-QUAL-W2 model is presented in Fig. 5. The statistical criteria demonstrates the high correlation coefficients between the predicted reservoir outflow water temperature values through ANN model and CE-QUAL-W2 model (R2 > 98%).

Fig. 5
figure 5

Comparison of Karkheh reservoir outflow water temperature variations for static ANN and LR CE-QUAL-W2 model in various scenarios (a and b)

The computational and accuracy performance of various SBOTs are compared in the problem deriving reservoir operational strategies during 5-year simulation period. Enhancing downstream water temperature and downstream water demand satisfaction are defined in sum weighted approach to aggregate two quality and quantity objectives. Comparisons between various SBOTs and the HR CE-QUAL-W2 model linked to PSO are presented in Table 3. All the SO models are executed in the same computational time (48 h. has been defined as the termination criteria in SO approach). The comparison results illustrate the adaptive surrogate model (ANN_LR CE-QUAL-W2) is more efficient compared with the other ones.

Table 3 Comparing the performance of various sbots with the Karkheh reservoir HR CE-QUAL-W2 model

Then the adaptive surrogate model applied to derive optimum monthly reservoir operational strategies in the selective withdrawal scheme during a 15-year time horizon considering maximization of annual hydropower peak energy generation, minimization of downstream water demand deficits, and downstream water temperature violations in the specific months. The final Pareto fronts derived with SBOT in an adaptive structure are evaluated with HR CE-QUAL-W2. The final results are presented in Table 4. Annual peak energy generation, downstream water demand deficits, and downstream water temperature violations are compared with Karkheh reservoir operational strategy based on standard operation policy (SOP).

Table 4 Pareto front derived in SBOT in problem maximizing hydropower peak energy generation, minimizing downstream water demand deficit, and downstream water temperature violations and comparison with SOP scenario

The time series of reservoir outflow water temperature in the best downstream water temperature scenario and high hydropower peak energy generation scenario compared with downstream river temperature and reservoir outflow water temperature in SOP scenario. The comparisons are presented in Figs. 6 and 7, respectively. The results (Table 4) show in reservoir operational strategy based on SOP, the downstream water temperature violation is 3.46 °C during March to April whereas this objective is 2.49 °C in suitable downstream water temperature scenario, derived with SBOT (Table 4). The objective, downstream water temperature violation, shows the standard deviation of difference between downstream river water temperature and Karkheh reservoir outflow water temperature.

Fig. 6
figure 6

Time series of reservoir outflow water temperature in suitable downstream water temperature scenario and SOP scenario compared with downstream river water temperature

Fig. 7
figure 7

Time series of reservoir outflow water temperature in high hydropower peak energy generation scenario and SOP scenario compared with downstream river water temperature

Applying the proposed approach in this research could help to reduce downstream ecosystem degradation in Karkheh river. In this way, it is possible to achieve quantity objectives (considering economic and social aspects; generating hydropower peak energy and supplying agricultural and environmental water demands) whereas lessen adverse environmental effects of development. Greater annual hydropower peak energy generation is provided in scenario with high downstream water temperature violation (3.67 °C). The tendency to generate more hydropower energy leads to more upper intake withdrawal and then less water blending is possible to decrease downstream water temperature violations (Table 4). Concentration on derived reservoir operational strategies in last mentioned scenario shows upper outlet withdrawal is limited only to reservoir WSE. In this scenario, when the reservoir is completely/partially full and WSE is more than 185 masl., water always is withdrawn from upper intake.

The SBOTs for long term operational strategies driving took 43 h on computer with a 3.4 GHz Pentium IV processor and 8 GB RAM, Core i7–2600 CPU which shows the prominent efficiency of the proposed technique in a large scale problem.

5 Conclusion

CE-QUAL-W2 as the 2D simulation model could be proper model to estimate the hydrodynamic responses in Karkheh reservoir with longitudinal and vertical gradient behaviors. Coupling this numerical model with EAs in deriving optimum reservoir operational strategy is prohibitive computational effort. Surrogate models are the efficient tools to overcome the high computational bottleneck of this numerical model. Defining Karkheh reservoir LR CE-QUAL-W2 model and ANN were two surrogate models proposed in this study. Static ANN network was implemented to approximate the dynamic thermal responses in reservoir based on various reservoir operational strategies during time horizon. Appropriate input selection, proper time lag definition, relevant ANN structure, and network type were the main features considered accurately based on profound perception of hydrodynamic and water quality knowledge and sensitivity analysis.

Sequential and adaptive surrogate models were applied in this research to evaluate the efficiency and accuracy of various SBOTs. The adaptive surrogate model, as the more efficient and accurate one, was applied in deriving optimal reservoir operational strategy in selective withdrawal scheme during 15-year time horizon considering quality and quantity objectives. The Karkheh downstream scarce natural ecosystem merits valuable attentions. Deriving optimal reservoir operational strategy considering the downstream environment, water demands, and hydropower energy generation could be favorable practice to diminish downstream ecosystem deterioration and improves the social and economic satisfactions.

The proposed techniques would be applied in deriving optimal reservoir operational strategy encompassing salinity, dissolved oxygen, and other water quality issues in reservoirs. Furthermore the proposed tools and approaches in this research could be applied in management of larger scale environments such as some interconnected river and reservoir systems, watershed-water body and etc.