Evaluation of Optimal Energy Productıon Usıng Deterministic, Probabilistic and Risky Cases In a Multi-Reservoir System

In a multi-reservoir system, the stochastic nature of basin data resulting from rainfall introduces risk into water management operations. Effective management that accounts for these risks can obtain maximum benefits from the system. This study presents a description of a multi-reservoir water resources system with hydroelectric power plants, utilizing the energy optimization model developed by OPAN in 2007. The model was applied to reservoirs located successively on the Lower Kızılırmak River in the Kızılırmak Basin, with the objective function being the maximization of firm power by using drought period inflows and total energy by using monthly average inflows. The study considered three scenarios: deterministic, probabilistic, and risky (critical cases), with probabilities of inflows from the basin being determined for the latter. Monthly inflows with determined probabilities were used to obtain data for the risky case. Optimum operating levels were determined based on this data to maximize firm power and total energy. According to the operating levels, the reservoir with the largest useful volume manages the operation. The values obtained from the optimization were then used in multivariate regression analysis using the Statistical Package for Social Scientists (SPSS), a statistical analysis program. The analysis explored the effects of monthly operating levels in the reservoirs, the amount of inflow released from the spillway, the amount of inflow released for energy production, the monthly average inflow to the reservoirs, and firm power values on energy production.


Introductıon
Water resources are crucial for human life and development, but population growth, climate change, and environmental factors are increasing challenges in water resource management.Uncontrolled use and increasing demand can lead to water scarcity, posing significant consequences.Effective reservoir management is crucial for maximizing benefits and minimizing costs, considering evolving water demands over time.Reservoir system planning considers constraints and equilibrium equations to ensure the system's performance meets current needs (Rani and Moreira 2010).
System analysis provides an optimal solution for water resource development.This approach involves creating a mathematical model that includes the system's objective function and constraints, which is then solved using optimization methods.Many fields, including water resources planning, engineering, and management, employ mathematical models (analytical, numerical, and optimization) (Tayfur 2017).Labadie (2004) has included multi-reservoir optimization studies in his technical report.He has explained explicit and implicit stochastic optimization, real-time optimization with prediction methods, and heuristic programming methods.Labadie stated that the gap between modeling technologies and general model use will narrow, adding that this will take time.Due to limited water resources, it is important to optimize reservoir systems to maximize hydroelectric power production (Ahmadianfar et al. 2019).Rahimi et al. (2020) attempted to simultaneously maximize hydroelectric power and flood management in the Ostour and Pirtaghi reservoirs, which are important in the Iranian water system.The purpose is to find the optimal quantity of water to be released from the reservoir while maximizing the objective function over a 12-month period.Asvini and Amudha (2022) aimed at maximizing hydroelectric power generation by optimizing the water to be released from the reservoir in model analysis.By improving climate change scenarios in water-scarce locations, Beça et al. (2023) sought to enhance the management of multifunctional reservoirs.Hatamkhani and Moridi (2019) created a simulation-optimization model to address the basin's optimal planning issue.Gonzalez et al. (2020) suggested a co-optimization strategy for hydropower and irrigation at the basin level.The hydro-economic model included the two situations to demonstrate the economic value of co-optimization across the basin.Water resources planning methods include dynamic programming, linear programming, simulation, queuing theory, and nonlinear mathematical programming models.Although the mathematical formulation of dynamic programming may seem complex, it is readily applicable to systems (Tai 1984).Dynamic programming is a suitable approach for solving multi-stage or multi-period problems where parameters change from stage to stage.It decomposes the main problem into sub-programs or stages, with each stage requiring a decision.The optimal solution is found by combining the results of each stage according to the objectives specified for each stage.Dynamic programming can be divided into deterministic and stochastic approaches, with deterministic dynamic programming determining the future state based on current state and policy.Several stochastic models have been developed to address climate change uncertainties (Tai 1984). De Ladurantaye et al. (2009) analyzed deterministic and stochastic models to maximize revenues from the sale of reservoir-generated electricity.Jaafar (2014) combined simulation and stochastic dynamic programming models and applied them to the Qarawn reservoir in Lebanon for energy production.Fayaed et al. (2019) applied an artificial neural network model and stochastic dynamic programming to the St. Langat reservoir in Malasia.They carried out water resource management regarding uncertain parameters, such as inflow to the reservoir and evaporation.One of the working techniques realized through the development of dynamic programming is successive approximation dynamic programming.In the Han Basin, Shim et al. (2002) have utilized successive approximation dynamic programming in real-time flood control operations.Yi et al. (2003) have utilized successive approximation dynamic programming to help plan hourly optimal hydropower units in the Lower Colorado River Dam System.
Energy production in reservoirs plays a crucial role in meeting the growing energy demands worldwide.Accurate estimation and correlation of energy production are vital for optimal energy planning.Bernard et al. (2007) examined the change in energy demand models with multivariate regression using the Monte Carlo simulation method.Malley (2011) examined the connection between water scarcity and hydroelectric energy caused by climate change in the Mtera reservoir, which provides half of the hydroelectricity need.He stated that the primary reason for water scarcity in hydroelectric power generation is climate change.He concluded that there is an increase in the average annual water supply for electricity generation in the reservoir with the increase in the variability in annual rainfall.Özkan (2016) performed a regression analysis with the factors affecting energy efficiency.Zhang et al. (2019) developed a reservoir operation model for real-time hydroelectric power plants operation that addresses long-term, medium-term, and short-term inflow forecasts.To obtain inflow forecasts, they developed artificial neural network models and multiple linear regression models.Danladi and Yunusa (2019) analyzed the relationship between inflows and outflows with rainfall, temperature, and evaporation variables using SPSS for energy production at Jabba Dam.Rahardjo et al. (2021) performed a multivariate regression analysis in SPSS to examine the impacts of water height and rainfall intensity on the energy efficiency of the Kracak Hydroelectric Power Plant.They stated that water height and rainfall intensity have a beneficial impact on increasing energy efficiency.
In this study, the energy optimization model developed by OPAN in (2007a) is used for long-term planning in a multi-reservoir system.The model is applied to reservoirs located successively on the Lower Kızılırmak River in the Kızılırmak Basin.The aim of the model is optimal energy production.The study analyzed three cases, including deterministic, probabilistic, and risky cases.During the analysis, the model aimed to maximize firm power and obtain minimum operating levels using monthly inflows during the drought period.Firm power was used as a constraint, and the model aimed to maximize total energy using monthly average inflow values.Using the results obtained, a multivariate regression analysis was performed on energy production with five independent variables.These variables included monthly operating levels at the reservoirs, the amount of inflow released from the spillway, the amount of inflow released for energy production, monthly average inflows to the reservoirs, and firm power values.The study compared the results of deterministic and risky case analyses.

Descrıptıon of the System
A multi-purpose and multi-reservoir water resources system can be defined with many reservoirs and a hydroelectric power plant (HPP) on a stream.The variables associated with the operation of reservoir i at t time are shown in Fig. 1.
Multi-purpose and multi-reservoir systems divide time into phases, representing periods and cycles.In the system, the reservoir's capacity to store water is the state variable, and the amount of water released for energy production is the decision variable.The water balance relationship of the reservoirs at time t can be shown in Eq. (1): where, S i,t is the amount of water stored in reservoir i at time t; F i,t is the amount of inflow from the basin of reservoir i at time t; Q i,t is the amount of inflow released for energy production from reservoir i at time t; R i,t is the amount of inflow released from the spillway of reservoir i at time t; E i,t is the evaporation loss of reservoir i at time t (Opan 2007a).
The amount of water stored in the reservoirs in the system, as shown in Eq. ( 2), with their maximum and minimum storage capacities, and the inflows to be released from the reservoirs can be limited, as shown in Eqs. ( 3) and (4); The average power obtained in reservoir i at time t is shown in Eq. ( 5); where k i is the energy production coefficient; h i,t is the average net head at reservoir i at time t.
The energy to be produced in any period is directly proportional to the average power in that period.The installed capacity of the hydroelectric power plant should not be exceeded by the power generated from the inflow released in each reservoir for energy production.P k i shown in Eq. ( 6) is the installed power for reservoir i; The inflow (F) from the basin is subject to its own probability.The amount of water stored (S), inflows released for energy production (Q), and inflows released from the spillway (R) are all variables that are affected by this probability.In this study, F was considered stochastic because it is a natural event.The probabilities obtained from the analysis were used to identify the risky cases of inflows from the basin. (1)

The Energy Optimization
Dynamic programming is a powerful tool for optimizing multi-stage decisions in reservoir operation.It divides problems into smaller stages and finds the optimal decision at each stage, with computation increasing exponentially as state variables increase.In 2007, Opan developed the optimal energy operation optimization model and software for multireservoir systems, using the successive approximation dynamic programming technique for long-term planning.The energy optimization model and software developed by OPAN in (2007a) are used in this study.The purpose of the successive approximation dynamic programming method is to decompose a dynamic programming problem with multiple decision variables into dynamic programming problems, each of which has a single decision variable.It is to solve the main problem by considering the decision variables one by one.The initial solution (operating policy) is determined, and the first acceptable values for state and decision variables are determined.A state variable is selected, and the values of other state variables at the predicted stage are kept constant.A single state variable dynamic programming problem is solved, resulting in a new solution that changes the decision variables and selected state variable, increasing the objective function's value.The process is repeated by selecting another state variable, considering each value at least once.These operations continue until no change in the selected variables occurs, and the process is stopped and switched to the other state value.This method reduces computation time and computer memory requirements by reducing an (n) dimensional dynamic programming problem to a set of one-dimensional problems (Opan 2007a, b).
Reservoirs construct various purposes, including hydroelectric power generation, irrigation, flood control, and recreation.This study selects four reservoirs for energy production, aiming to maximize energy production.The objective function comprises two stages.In the first stage, monthly drought inflows were used to maximize firm power, and monthly minimum operating levels were determined.The objective function is shown in Eq. ( 7); where the minimum among the total power values obtained for the system's t time is assigned as the maximized firm power value.In the second stage of the objective function, the maximized firm power is used as a constraint in the same model, the total energy is maximized with the monthly average inflows, and the monthly normal operating levels are determined.The formulation of the maximum energy production (Opan 2007a) is shown in Eq. ( 8); In line with the targeted objective function, iteration processes are repeated until the steady state is reached for the optimal operating policy.

Application Area
In the Kızılırmak Basin, a multi-reservoir water resources system located successively on the main branch of the Lower Kızılırmak River was chosen for application.Kızılırmak, Turkey's longest river with a length of 1,151 km, discharges the waters of ( 7) an area of 78,180 km 2 into the Black Sea.The Kızılırmak Basin is Turkey's second largest basin after the Fırat River.The basin, located in the eastern part of Central Anatolia at 37°56'-41°44' North (N) latitude and 32°48-38°24' East (E) longitude, has a total precipitation area of 78,646 km 2 and an annual average precipitation height of 446 mm.The region is known for its intense droughts due to its mainland climate.The summers are hot and dry, and the winters are cold and snowy.The average air temperature in the region is 13.7 °C, with annual precipitation 300-800 mm range.The Kızılırmak River, the second largest in Turkey's water storage area after the Fırat River, has an irregular regime due to its dependence on rain and snow waters (Çakmak 2002;Balcanlı et al. 2012).Figure 2 shows a schematic view of the Kızılırmak Basin, while Fig. 3 illustrates the schematic view of the reservoirs on the Lower Kızılırmak River in the Kızılırmak Basin that were studied in this research.On the river, there are a lot of reservoirs.Obruk was constructed for energy and irrigation objectives, Boyabat and Altnkaya were constructed for energy objectives, and Derbent was built for energy, irrigation, and flood control objectives.These reservoirs were utilized in the study.The features of these reservoirs are shown in Table 1.

Results From Models
Three scenarios were considered in the study: deterministic, probabilistic, and risky (critical cases).The average monthly inflow data for each reservoir was obtained, and the values below the monthly average were used to calculate the probabilities of these values nearing the monthly average inflow.The risk case, or the likelihood of not happening, was then calculated by deducting the probability value from 1.  First, for each case, the monthly inflow values of the drought period were used to maximize the firm power and obtain the monthly minimum operating level.The Lower Kızılırmak Basin inflow observations from 1990 to 2011 were moved to the reservoir axis and organized as 10 7 m 3 (Alemdar 2019).It was determined that the entire year 2008 was the drought period after assessing the total inflows between 1990 and 2011.The reservoirs' monthly inflow values between October and September of the drought period ( 2008) are shown in Table 2.The monthly inflow values of the drought period are used as input to the program in the form of 10 7 m 3 (Table 2).
By identifying the values below the monthly average inflow data, the probabilities of these values nearing the monthly average inflow were computed.The probability of not occurring, which is the risky case, was determined by deducting the probability value from 1.By decreasing the inflows for the drought period with the probability values, probabilistic and risky drought period inflows were obtained (Table 2).
The monthly minimum operating levels of the reservoirs as a result of the operation that maximizes firm power are shown in Fig. 4. When looking at monthly minimum operating levels for all reservoirs, there was a decrease in the first month (October) for all cases.The reason for this decrease is that the inflow value is close to the maximum inflow value that can be released for energy production in the first month.Since no inflow was released for energy production in the second month (November), accumulation was made.Therefore, the level of operating started to increase in the third month (Fig. 4a, b, c).As of the eleventh month (August), the increase in the operating level started, and the maximum level of operating study was completed in the last month (Fig. 4a, b, d).In Fig. 4c, since the third month, probabilistic and risky case minimum operating levels remain approximately constant since no inflow is released.
The highest monthly power in all cases is obtained in the first month of the drought period, as seen by the monthly total power values during the drought period given in Fig. 5. Reservoirs with the largest storage volume make significant changes in their operating levels to store inflows from their basins, indicating reservoirs control and manage the optimization process.No changes were observed in reservoirs with small storage volumes.The change in operating levels in the reservoirs with the biggest useful volume is efficient in maximizing the firm power when taking into account the obtained monthly minimum operating levels.According to the monthly minimum operating levels, Boyabat Reservoir has the biggest beneficial storage and is therefore efficient in maximizing the firm power.The model utilized firm power values during the drought period and monthly average inflows as restrictions to obtain monthly normal operating levels in order to maximize the total energy.Inflow observations from the Lower Kızılırmak Basin between 1990 and 2011 were transferred to the reservoir axes (Alemdar 2019), and monthly average inflows were calculated using these data (Table 3).The values under the monthly average inflow data were identified, and the probabilities of these values nearing the monthly average inflow were computed.The probability of not occurring, which is the risk case, was determined by deducting the probability value from 1.By decreasing the monthly average inflows with probability values, the monthly average inflows for the probabilistic and risky cases were obtained (Table 3).
The monthly normal operating levels of the reservoirs resulting from the maximization of total energy are shown in Fig. 6.The normal operating levels obtained by operating all reservoirs with monthly average inflows in the deterministic case were found to be very close to the maximum operating levels (Fig. 6a, b, d).This is due to the fact that the reservoirs are operating at the maximum level in a deterministic case.In Fig. 6c, the risky case normal operating levels showed a great decrease in the 6th month.Since no inflow is released for energy production from the 7th month, normal operating levels have remained constant.In Fig. 7, the monthly total power values for the reservoirs are shown.Boyabat Reservoir is effective in maximizing the total energy according to normal operating levels.Boyabat Reservoir, that has the biggest storage volume, manages the operation by maximizing the total energy.When the monthly inflows from the basin to the reservoirs are met at the monthly normal operating levels, all the inflows released from the reservoirs are released for energy production.
Because of the optimization, multivariate regression analysis was performed.The relationship between the monthly operating levels in the reservoirs, the amount of inflow released from the spillway, the amount of inflow released for energy production, the monthly average inflow in the reservoirs, the firm power values, and the energy production were examined.

Statistical Analysis
Multivariate regression analysis is utilized to determine the correlation among dependent (Y) and independent (X 1 , X 2 ,X 3 ,………X k ) variables, as illustrated in Eq. ( 9); where the dependent variable's cutoff point at X = 0 is denoted by β0, while β1 shows the regression coefficient and ε shows the error term.The regression coefficient shows the average change a one-unit change in the independent variable causes in the dependent variable.The difference between the real and estimated values is the error term.The goal is to find no difference or minimal differences.The coefficient of determination (R 2 ) gives the rate at which the independent variables account for the change in the dependent variable.If the coefficient is close to one, it suggests that the independent variable accounts for a large portion of the change in the dependent variable (Tranmer et al. 2020).

Monthly total power values
In the regression analysis, deterministic and risky cases were evaluated.Multivariate regression analysis was performed using the statistical analysis program SPSS on energy production with five independent variables.Monthly operating levels in the reservoirs, the amount of inflow released from the spillway, the amount of inflow released for energy production, the monthly average inflow to the reservoirs, and the firm power values were used as independent variables.

Deterministic Case
Correlation coefficients (r) between energy production and independent variables from deterministic case regression analysis with the SPSS program and their significance were determined and given in Table 4.
The correlation coefficient (r), expressed in numerical values ranging from -1 to + 1, indicates the direction and strength of the association among the variables.Negative coefficient values indicate an inversely proportional relationship between variables, while positive values indicate a directly proportional relationship (Durmuş et al. 2011).
From the correlation coefficients in Table 4, there is a positive association among the monthly operating level of the reservoirs (r = 0.928), the inflow released for energy production (r = 0.822), the firm power (r = 0.621) and the monthly average inflow (r = 0.374) and energy production.There is a negative relationship between the inflow released from the spillway (r = -0.467)and energy production.86% of energy production can be explained by the change in monthly operating levels in reservoirs.The results obtained from the deterministic case regression analysis are shown in Table 5.
The deterministic case model's explanatory power, indicating how much of the dependent variable's change can be explained by the independent variables, has been determined, and the model summary is shown in Table 5.When the R and R 2 values are examined in Table 5, it is understood that the model's explanatory power is high.With regard to the regression analysis's findings, the inflow released from the spillway, the inflow released for energy production, the monthly average inflow, the monthly operating level, and firm power explain 98.1% of the variance.In the deterministic case, it can be said that these factors shape the energy production in reservoirs at a rate of 98.1%.
According to the analysis of variance in Table 5, the hypothesis H 0 is not accepted since the F value is 423.85 and ρ (sig.) is 0.000.The outcome indicates that the regression model created is statistically significant.It is possible to explain the energy variable in reservoirs with at least one of the inflow released from the spillway, the inflow released for energy production, the monthly average inflow, the operating level, and the firm power values.The regression coefficients used for the deterministic case regression equation, their  significance, the association between the dependent variable and the independent variables were determined, and the regression coefficients are given in Table 5.
The regression formula obtained from the regression analysis is shown in Eq. ( 10); According to the regression coefficients in Table 5, the B values show whether there is a positive or negative relationship between the energy produced and each forecast variable.B values show the impact of each prediction variable on the dependent variable, while standard B values show the impact of a standard deviation change on the dependent variable.
According to Table 5, the operating level, the inflow released for energy production, the monthly average inflow, and the firm power have a positive effect on energy production, while the inflow released from the spillway has a negative effect.The monthly average inflow variable is the factor that has the most effect on energy production among the coefficients.
The variance inflation factor (VIF) tests multicollinearity between explanatory variables.A high VIF coefficient increases regression coefficient variance, leading to misinterpretation of independent variables' effects on dependent variables, making the regression model invalid (Özdamar 2011).
As a result of the analysis, the variables are statistically significant because ρ (sig.)< 0.05.VIF is in the desired range.

Risky Case
From the risky case regression analysis, correlation coefficients (r) and significance between energy production and independent variables were determined and are given in Table 6.
From the correlation coefficients in Table 6, there is a positive relationship between the risky case reservoirs monthly operating level (r = 0.787), the risky case inflow released for energy production (r = 0.641), the risky case firm power (r = 0.648) and the risky case monthly average inflow (r = 0.384) and the risky case energy production.There is a negative relationship between the inflow released from the spillway (r = -0.177)and energy production.62% of risky case energy production can be explained by the change in monthly operating levels in risky case reservoirs.The results obtained from the risky case regression analysis are shown in Table 7.
The risky case model's explanatory power, indicating how much of the dependent variable's change can be explained by the independent variables, has been determined and the summary of the model is given in Table 7.When the R and R 2 values are examined in Table 7, it is understood that the model's explanatory power is high.With regard to the regression analysis's findings, risky case the inflow released from spillway, risky case inflow released for energy production, the risky case monthly average inflow, the risky case monthly operating level and the risky case firm power explain 89.5% of the variance.In the risky case, it can be said that the energy production in reservoirs is shaped depending on these factors at a rate of 89.5%.According to the analysis of variance in Table 7, the hypothesis H 0 is not accepted since the F value is 71,770 and ρ (sig.) is 0.000.It gives the result that the created regression model is statistically significant.It is possible to explain the risky case energy variable in reservoirs with at least one of the risky case inflow released from spillway, risky case inflow released for energy production, risky case monthly average inflow, risky case operation level, and risky case firm power values.The regression coefficients used for the risky case regression equation, their significance, the association between the dependent variable and the independent variables were determined, and the regression coefficients are shown in Table 7.
The risky case regression formula obtained as a result of the regression analysis is shown in Eq. ( 11); According to Table 7, risky case operation level, risky case inflow released for energy production, risky case monthly average inflow, and risky case firm power have a positive effect on energy production, while risky case inflow released from the spillway has a negative effect.Among the coefficients, the factor that has the most effect on risky case energy production is the inflow released for risky case energy production.As a result of the analysis, the variables are statistically significant because ρ (sig.)< 0.05.VIF is in the desired range.

Conclusions
In this study, the energy optimization model developed by OPAN in (2007a) for long-term planning in the multi-reservoir system was applied to the reservoirs located successively on the Lower Kızılırmak River in the Kızılırmak Basin.Multivariate regression analysis was performed on energy production with five independent variables from the optimization data.
The optimization results showed that the reservoir with the largest storage is effective in maximizing firm power and total energy when looking at the operating levels.Moreover, the firm power and average power obtained from the deterministic case operating model were greater than the firm power and average power obtained from the risky case dynamic programming model.This is because the monthly average inflow values in the risky case are reduced inflow data with probability, whereas the power values in the deterministic case were found to be larger.Optimum operation was provided by comparing the power values obtained monthly in the programming.
The regression analysis performed as a result of optimization shows that R 2 is close to 1, indicating that independent variables explain a large part of the deterministic and risky case energy production dependent variable.When examining the R 2 value of the model in the deterministic case, it is observed that the explanatory power is higher compared to the risky case, as it is found to be greater.
The results also showed that the operating level, the inflow released for energy production, the average monthly inflow, and firm power had a positive effect on energy production in both deterministic and risky cases, while the inflow released from the spillway had a negative effect.The correlation coefficients indicated a positive and strong relationship between the monthly operating level in reservoirs and energy production in both cases, while a negative relationship was observed between the inflow released from the spillway and energy production.This means that there would be a decrease in the energy production value as the inflow value released from the spillway increases.According to the correlation (r) and coefficients of determination (R 2 ), it was concluded that the deterministic case model with a higher coefficient was better.
In future studies, it would be useful to evaluate whether an increase in energy production in reservoirs can be achieved by applying different operating policies.Additionally, the feasibility of statistical estimates on energy production can be checked by applying different methods.

Fig. 1
Fig.1Variables related to the operation of reservoir i for time t(Opan 2007a)

Fig. 3
Fig. 3 Schematic view of the reservoirs on the Lower Kızılırmak River in the Kızılırmak Basin (DSI 2014)

Table 2
Drought period monthly inflows of reservoirs for all casesReservoirs Drought period monthly inflows (10 7 m 3 )

Table 3
Monthly average inflows of reservoirs for all casesReservoirs Average monthly inflows (10 7 m 3 )

case monthly average inflows (10 7 m 3 )
Fig.6Monthly normal operating level of reservoirs

Table 4
Correlation Coefficient and Significances