1 Introduction

One of the significant issues for water managers and decision makers around the world have been intense and consecutive droughts (Ehteram et al. 2018a). Increased demands and the number of consumers make decisions about planning to manage the water resources significantly. Water release rates and time of release for downstream users are important issues for decision makers and consumers (Anand et al. 2018). Therefore, the best way to meet the water demands is the optimal operation of water resources (Afshar and Hajiabadi 2018).

Optimal reservoir operation seeks to meet downstream demands using the highest reliability index, and prevent reduction of reservoir volume lower than the permitted values (Han et al. 2018). Researchers have used artificial intelligence and evolutionary algorithms in this regard during the recent years. Evolutionary algorithms have high ability to solve issues according to the optimal reservoir operation (Bertoni et al. 2018). Optimal reservoir operation issues include one or more objective function and constraints and the problem will have the optimal response based on the satisfaction of objective function and the constraints. Previous studies have shown that evolutionary algorithms have high adaptation to the hydraulic and hydrologic conditions of the problem and are highly able to resolve optimization problems. In addition, they can reduce computation time, solve problems using more than one objective function, achieve optimal responses, and add different operators to increase the accuracy of responses (Ehteram et al. 2018b).

Applying game theory is another method to solve the water resources management issues (Moradi and Mohammadi Limaei 2018). This method is used where water is going to be allocated among several consumers or various objectives such as agricultural, urban, industrial and environmental. Various methods of game theory have been used in recent years to solve water allocation problems which have been successful in various sectors including irrigation, power generation and optimal production of agricultural products (Game et al. 2018; Adhami et al. 2018; He et al. 2018).

Operation of multi-purpose or multi-objective systems is one of the important issues to manage water resources, where the reservoir is responsible for meeting various demands. These demands can be available in the form of an optimization problem with different objective functions, or in the framework of constraints of an optimization problem with on objective function. Thus, in both cases, the complexity of solving the problem is increased (Ahmad et al. 2018; Jiang and Liu 2018).

Combining evolutionary algorithms and game theory can be one approach to plan and manage water resources of multi-purpose or multi-objective systems. For instance, the volume of required water release can be determined for each operation period or month based on the total needs. This process can be done in the form of an optimization problem to operate the reservoir in an optimal way with one objective function and several constraints (Daddi et al. 2018). The volume of water obtained at the end of each month is then allocated to the consumers using one of the water allocation methods and the game theory (Mochizuki et al. 2018). This strategy leads to manage the multi-purpose systems with various objectives without applying multi-objective algorithms with several constraints.

This study seeks to manage the operation of a multi-purpose system (Shahid Dam Reservoir) in Fars, southern Iran, aiming at meeting the agricultural, environmental, urban and industrial water demands. In this respect, a new Hybrid Algorithm, which combines Bat Algorithm and Particle Swarm Algorithm, is used to optimize total water release volume from the reservoir. Then, one of the methods in the game theory is applied to allocate this water to different stakeholders (agriculture, urban, environment and industry).

Fallah-Mehdipour et al. (2012) used Genetic Programming to calculate optimal water release rate from a reservoir to meet different demands. They then used cooperative-games method in order to allocate this water to agricultural and environmental sectors. The results indicated that the amount of water release based on the Genetic Programming approach provided more reliable water volume to meet the demands as compared to Genetic Algorithm. Ostadrahimi et al. (2012) used PSA in order to operate a multi-reservoir system aiming at increasing hydroelectric energy generation. The results indicated that PSA faced premature convergence during the problem-solving process, which was resolved by modifying the inertial coefficients. Also, the method of non-cooperative games was also used to allocate water to various systems to produce the power. The convergence rate and power generation of PSA was higher than GA and Harmonic Algorithm.

Taghian et al. (2013) used GA and non-linear programming method in order to extract the rule curves to meet downstream irrigation demands. Results indicated that the released water reduced the amount of water shortage based on the GA by 20% compared to the non-linear programming method. Also, although the GA’s responses were more accurate than the non-linear programming method, but its convergence rate was not desirable. Wu and Chen (2013) used the improved PSA in order to optimize the reservoir system operation to increase the energy generation. They also used non-cooperative and cooperative games to allocate the released water among two power plants. Results indicated that both power plants produce high hydroelectric energy with 90% reliability.

Bolouri-Yazdeli et al. (2014) used GA and non-linear rule curve equations to specify the optimal amount of water release from reservoir. Results showed that the equations for which released rate was based on the non-linear third-order power of the inflow and storage, well predicted the amount of downstream demands. Madani and Hooshyar (2014) combined Game Theory and Reinforcement Learning (GT-RL). RL was used to find the systems’ best response strategies and benefits and GT was used to allocate the benefits. Steeger et al. (2014) used the cooperative GT as well as GA, PSA and Harmonic Algorithm to operate a reservoir and allocate water to downstream power plants. Results indicated that Harmonic Algorithm has higher convergence rate compared to GA and PSA. Also, the allocation of water based on the theory of cooperative games caused to increase the total electricity generation capacity by 20% compared to the current reservoir operation conditions.

Dinar and Hogarth (2015) examined the application of different methods in water allocation. Their study indicated that solving the reservoir-operation problems with evolutionary algorithms and game theory has simpler approach, more accurate results, in lesser time periods as compared to multi-objective algorithms. Skardi et al. (2015) used neural network and Ant Colony Algorithm in order to determine the amount of water release and extract rule curves. They also used GT and Shapley and Nash methods to allocate the water among downstream consumers. Results indicated that Nash method caused higher downstream consumer satisfaction. Heydari et al. (2015) used Harmony Algorithm, GA, cooperative GT, and non-cooperative GT to operate a multi-reservoir system and allocate the released water to downstream power plants in order to increase the profits of hydroelectric generation. Results indicated that Harmony Algorithm released more water and cooperative GT generated more hydroelectric.

Ehteram et al. (2018a) used Spider Monkey Optimization Algorithm to optimize the function of a two-reservoir system to meet the irrigation needs. Based on the results, the system’s vulnerability was reduced by 12 and 24% compared to PSA and GA. Ehteram et al. (2018b) achieved the similar results using Kidney Algorithm (KA), GA and PSA and some other algorithms. The KA was superior relative to GA and PSA.

The above literature review indicates that evolutionary algorithms, GT and Nash method are successfully applied to solve the optimal reservoir-operation problems. But each algorithm has its own advantages and disadvantages according to convergence rate, getting trapped in local optimal points, determination of random parameters, or complexity of the structure. Therefore, this study seeks to alleviate some of the problems by presenting a new Hybrid Algorithm (HA), which is based on the BA and PSA. The cooperative method in GT is then used to allocate the released water. Figure 1 shows how to use the methods.

Fig. 1
figure 1

Method of performing the procedure

2 Materials and Methods

2.1 Bat Algorithm

Bats are creatures which can produce sound and then receive its reflection from the surrounding environment. Bats can detect an obstacle or their food by producing loud sounds and receiving the echoes from the surrounding environment through strong audio receivers. BA has the following assumptions (Bozorg-Haddad et al. 2014):

  1. a)

    All bats are equipped with sound capabilities and strong audio receivers that can detect an obstacle from food.

  2. b)

    Bats have random velocity vl in position yl with sound frequency fl. The acoustic amplitude of the bat is represented by symbol A0 and the wavelength of bat sound is represented by symbol λ.

  3. c)

    The amplitude of bat sound varies from A0 to Amin.

The sounds produced by the bat have an acoustic pulse rate of rl, which takes values between zero and 1. The velocity, position, and frequency of bats are updated based on the following equations:

$$ {f}_l={f}_{\mathrm{min}}+\left({f}_{\mathrm{max}}-{f}_{\mathrm{min}}\right)\times \beta $$
(1)
$$ {v}_l(t)=\left[{y}_l\left(t-1\right)-{Y}_{\ast}\right]\times {f}_l $$
(2)
$$ {y}_l(t)={y}_l\left(t-1\right)+{v}_l(t).t $$
(3)

Where fl represents sound frequency of the bat, fmin is minimum frequency, fmax is maximum frequency, β is a random number, Y is the best bat position, and vl(t) is bat velocity. The local search process for bats is calculated as:

$$ y(t)=y\left(t-1\right)+\varepsilon A(t) $$
(4)

Where, ε is a random number in the range of 1 and − 1 and A(t) represents amplitude of the bat sound. At each stage, the bat sound amplitude and sound pulse rate are updated. The bat’s amplitude is decreased and its sound pulse rate is rised when it finds its bait. The bat sound pulse rate is updated based on the following equation:

$$ {r}_l^{t+1}={r}_l^0\left[1-\exp \left(-\gamma t\right)\right]{A}_l^{t+1}=\alpha {A}_l^t $$
(5)

Where, α and γ are constant values. Figure 2 presents the flowchart of BA.

Fig. 2
figure 2

Flowchart of the Bat Algorithm (Bozorg-Haddad et al. 2014)

2.2 Particle Swarm Algorithm

If the search space of the problem is considered with D dimensions, the particles’ position will be displayed as Xi = (xi1, xi2, ..., xiD). Moreover, the particle velocity is represented by the component Vi = (vi1, vi2, ..., viD). The best particle position in each replication is also represented by the symbol Pi = (pi1, pi2, ..., piD) and the g symbol represents the best position of a particle in all replications. In the PSA, the velocity and particle position are updated based on the following equations (Ehteram et al. 2018a):

$$ {v}_{id}^{n+1}=\chi \left[w{v}_{id}^n+{c}_1{r}_1\frac{\left({p}_{id}^n-{x}_{id}^n\right)}{\varDelta t}+{c}_2{r}_2\frac{\left({p}_{gd}^n-{x}_{id}^n\right)}{\varDelta t}\right] $$
(6)
$$ {x}_{id}^{n+1}={x}_{id}^n+\varDelta t{v}_{id}^n $$
(7)

where, \( {v}_{id}^{n+1} \) represents the particle velocity at the new time step, w is inertia coefficient, c1 and c2 are acceleration coefficients, Δt is time step, n is time index, χ is contraction coefficient, and \( {x}_{id}^{n+1} \) is new particle position. First, parameters of the PSA are set. Decision variables are then inserted into the algorithm in the form of position and initial velocity of the particles and the initial population. The objective function is calculated for each particle. The best particle position is determined and the position and particle velocity are updated based on eqs. (6) and (7), and the cycle continues until the completion of the convergence process.

2.3 The Hybrid Algorithm

The structure of the HA is based on the relationship between the two algorithms (BA and PSA). The main idea of ​​the HA is the substitution of weak individuals of an algorithm with stronger ones of the other algorithm. Several parallel population-groups work separately on the HA. The BA and PSA operate in independent cycles, and the best particles and best position of the bats are specified after calculating the objective function for particles and bats. The substitution of bats is then done for the BA with better position with weaker particles for the PSA, as well as substitution of particles with better position with bats with weaker position. If the total population is equal to N, then the bat population and PS population will be equal to \( \frac{N}{2} \). Figure 3 shows the relationship among two algorithms. In this figure, R represents the number of times that BA and PSA substitute bats and particles.

Fig. 3
figure 3

Hybrid Algorithm of BA and PSOA

The steps in the HA are as follows:

  1. 1.

    First, random parameters of both algorithms are set based on the initialization.

  2. 2.

    Value of the objective function is calculated separately for both bats and particles.

  3. 3.

    Particle velocity and position are updated for PSA based on the eqs. (6) and (7).

  4. 4.

    Position, velocity and frequency of the bats are updated based on eqs. (1) to (3).

  5. 5.

    K bats or particles with better positions are selected in both algorithms and then these bats or particles substitute the weaker ones of the other algorithm.

  6. 6.

    This process continues until convergence is achieved.

2.4 Game Theory

Shortage of water resources and various droughts have resulted in serious competition among different users of water to allocate the water resources (Shen et al. 2018). Game Theory (GT) is a significant strategy that plays an effective and decisive role to allocate the water among users of water with different hydraulic and hydrologic conditions. Each stakeholder has its own objective function and each stakeholder or decision-maker attempts to optimize and satisfy its own objective function regardless of other objective functions in issues related to GT, (Faria et al. 2018). This results of competition among stakeholders for water resources allocation (Du et al. 2018).

Different studies have been conducted on GT. The Proportional Method (PM), with improved coefficients, is one of the most widely used methods in water allocation issues such as allocating irrigation water to farmers, allocating groundwater, pollutant-related issues and river inflow to reservoirs (Bozorg-Haddad et al. 2018a). The PM in cooperative GT has high capabilities in balancing between the stakeholders and choosing different policies. This method could be used in this case study due to a serious competition between the stakeholders to allocate the water. In addition, the PM is the best option to allocate the water due to its serious shortage since the volume of available water is usually less than the required volume (Madani et al. 2017; Kruitwagen et al. 2017).

If the amount of available water is represented by Et and the stakeholder’s claim is denoted by Ct, then Et ≤ Ct is the water-short conditions and the shortage (Yt) will be calculated as:

$$ {Y}_t={C}_t-{E}_t $$
(8)

The PM considers water allocation to i-th stakeholder (αi, t) as:

$$ {\alpha}_{i,t}={w}_t\times {c}_{i,t} $$
(9)
$$ {w}_t=\frac{E_t}{C_t} $$
(10)

Where, wt is proportion coefficient. The following nonlinear equation is used to calculate the shortage fraction (yi, t) as well:

$$ {y}_{i,t}={c}_{i,t}\times \left(1-{w}_{i,t}\right) $$
(11)

Where, wi, t represents the amount of water supplied to each stakeholder, which is calculated based on the optimization process and the following nonlinear equations. Considering that the present research aims at optimal reservoir operation and allocation of released water to agricultural, urban, industrial and environmental demands, thus, there are four values of wi, t (Bozorg-Haddad et al. 2018b).

$$ \mathit{\operatorname{Minimize}}(O)=\sum \limits_{t=1}^T\left({Y}_t-\sum \limits_{i=1}^4{y}_{i,t}\right) $$
(12)
$$ {\displaystyle \begin{array}{l} subject\kern0.17em to:\\ {}0.95\le {w}_{1,t}\le 1\end{array}} $$
(13)
$$ {\displaystyle \begin{array}{l}0\le {w}_{2,t}\le 1\\ {}0\le {w}_{3,t}\le 1\\ {}0\le {w}_{4,t}\le 1\\ {}{w}_4\le {w}_3\le {w}_2\le {w}_1\end{array}} $$
(14)

Where, O represents the objective function, and w1, t, w2, t, w3, t and w4, t are allocated water percent to urban, environment, agriculture industrial demands. Equation (13) indicates that the urban water allocation should not be less than 95% of the total demands.

3 Case Study

3.1 Study Site

The case study is operation of Shahid Dam Reservoir, located in the north of Fars and near to Semirom city in Isfahan, southern Iran. The earth dam has a crest length of 395 m, height of 80.5 m, and body volume 2.98 million cubic meters (MCM). Normally, the reservoir volume is 150 MCM and its useful volume is 133 MCM. Reservoir outflow has always been a controversial issue among decision-makers such that it could meet the agricultural, urban, industrial and environmental demands.

Therefore, the initial parameters of BA and PSA are first determined. Total volume of water to be released from the reservoir is then determined based on the total declared demands (agricultural, industrial, urban and environmental) and applying an optimization algorithm. Figure 4 shows this process schematically. This study considers 5 years of the Shahid Reservoir operation period (1996-1997 to 2000-2001). The standard precipitation index (SPI) of the basin in this period was negative, drought conditions have prevailed, the volume of available water was less than the volume of demands on the basis of published reports by Iran Water Resources Management Organization and thus optimal operation and allocation of required water has significant importance in this basin. Figure 5 shows the location of dam and the inflow water into the Shahid Reservoir for the 5-year period.

Fig. 4
figure 4

Structure of reservoir operation and water allocation of Shahid Dam

Fig. 5
figure 5

a Dam location, b Inflow to Shahid Dam

The objective function is defined based on minimizing deviation of released water and the total downstream demands:

$$ \mathit{\operatorname{Minimize}}(Z)=\sum \limits_{t=1}^T\left(\frac{D_t-{R}_t}{D_t}\right) $$
(15)

Where, Z is objective function, Dt is total monthly downstream demands by the stakeholders (agricultural, industrial, environmental and urban), Rt is total monthly water release and T is total number of operation periods (months).

The continuity equation to calculate the storage at each month is as follows:

$$ {S}_{t+1}={S}_t+{I}_t-{R}_t-S{P}_t- Los{s}_t $$
(16)

Where, St + 1 is storage at the new time, It is inflow, Rt is released water, SPt is spill and Losst is water loss from the reservoir. Reservoir loss, which refers to evaporation, is calculated as:

$$ Los{s}_t=E{V}_t\times {\overline{A}}_t $$
(17)

Where, EVt is depth of evaporation from the reservoir, and \( {\overline{A}}_t \) is average reservoir level at time t.

The calculated storage is compared to the values of problem constraints (eq. 18). If the calculated reservoir storage is not in the permissible range, penalty functions (eqs. 19 and 20) will be then used:

$$ {S}_{\mathrm{min}}\le {S}_t\le {S}_{\mathrm{max}} $$
(18)
$$ P{F}_1=a{\left(\frac{\mid {S}_{\mathrm{min}}-{S}_t\mid }{S_{\mathrm{max}}-{S}_{\mathrm{min}}}\right)}^2+b $$
(19)
$$ P{F}_2=c{\left(\frac{\mid {S}_t-{S}_{\mathrm{max}}\mid }{S_{\mathrm{max}}-{S}_{\mathrm{min}}}\right)}^2+d $$
(20)

Also, the amount of released water will be compared to the permissible water-release values (eq. 21), and if it is not within the permitted range, penalty functions (eqs. 22 and 23) will be then used:

$$ 0\le {R}_t\le {D}_t $$
(21)
$$ P{F}_3=e{\left(\frac{\mid {R}_t-{D}_{\mathrm{max}}\mid }{D_{\mathrm{max}}}\right)}^2+f $$
(22)
$$ P{F}_4=g\left(\frac{\mid {R}_t\mid }{D_t}\right)+h $$
(23)

Where,

S max :

maximum storage,

S min :

minimum storage,

D max :

maximum demand,

c, d, e,f, g and h:

constant coefficients

3.2 Evaluation Indices

It is possible to evaluate the evolutionary algorithms used in this study to manage the reservoir operation through various indices (Hashimoto et al. 1982):

3.2.1 Reliability Index

Reservoirs or water resources systems should be able to meet downstream needs. There are two types of indices for water system reliability. The first one is known as time reliability which is defined according to the water system or reservoir should not encounter with the probability of failure or inability to meet the demands. The second one is volumetric reliability, which is according to the ratio of released water to the total needs (Hashimoto et al. 1982):

$$ {\displaystyle \begin{array}{l}{D}_i^t=\left[\begin{array}{l}{X}_{t\arg et,t}^i-{X}_{Supplied,t}^i\leftarrow if\left({X}_{t\arg et,t}^i\right)>{X}_{Supplied,t}^i\\ {}0\leftarrow if\left({X}_{t\arg et,t}^i\right)=\left({X}_{Supplied,t}^i\right)\end{array}\right]\\ {}R{T}_i=\frac{No. of(Times){D}_i^t=0}{T}\end{array}} $$
(24)
$$ R{V}_t=\frac{\sum \limits_{t=1}^T\left({X}_{t\arg et,t}^i-{X}_{Supplied,t}^i\right)}{\sum \limits_{t=1}^T{X}_{t\arg et,t}^i} $$
(25)

Where, RTt is time-reliability index, RVt is volume-reliability index, \( {X}_{t\arg et,t}^i \): water demand for the ith user, \( {X}_{Supplied,t}^i \):water supplied for the ith user, and T is total number of reservoir operation periods. The higher percentage for these indices represents the more desirable performance of the system (the algorithms in this study).

3.2.2 Resiliency Index

The resiliency index indicates the quality and rate of the system resiliency after the failure periods (fail to meet the demands in the critical and drought periods) to normal conditions:

$$ \operatorname{Re}=\frac{NO. of(times){D}_i^t=0 follows\left({D}_i^t\right)>0}{NO. of(times){D}_i^t>0(occured)} $$
(26)

Where in, Re is resiliency index,

3.2.3 Vulnerability Index

The vulnerability index examines the water shortage after water release planning for the reservoir. This index indicates average water shortage in each failure period:

$$ Vul=\frac{\frac{\sum \limits_{t=0}^{t=T}{D}_i^t}{No. of(times){D}_i^t>0(occured)}}{water\left( deman{d}^i\right)} $$
(27)

Where,

Vul :

is vulnerability index and

Max(shk):

is maximum shortage occurred during the operation period.

3.2.4 Statistical Indices

The mean absolute error (MAE) and root mean square error (RMSE) indices were used in order to evaluate the evolutionary algorithms in meeting the water demands and management of Shahid Reservoir operation:

$$ MAE=\frac{\sum \limits_{t=1}^T\mid {D}_t-{R}_t\mid }{T} $$
(28)
$$ RMSE=\sqrt{\sum \limits_{t=1}^T\frac{{\left({D}_t-{R}_t\right)}^2}{T}} $$
(29)

3.3 Multi Reservoir Operation

The problem of the 4-reservoir system is considered as one of the benchmark issues and functions that has always been of interest to researchers for evaluating new optimization algorithms. Having multiple constraints and, in addition, multiple reservoir systems, makes it possible to evaluate an evolutionary algorithm well. The objective function is to maximize the profit from the production of hydropower energy in 12 periods:

$$ MaximizeB=\sum \limits_{r=1}^R\sum \limits_{t=1}^T{b}_r(t){\operatorname{Re}}_r(t) $$
(30)

where, B the system total profit, r is the reservoir number, t is the period number, T is the total number of periods, Rer(t) is water release and br(t) is the profit of releasing water from each reservoir. The continuity equation is based on the following relation:

$$ {S}_r\left(t+1\right)={S}_r(t)+{I}_r(t)- RC{M}_{R\times R}{\operatorname{Re}}_r(t) $$
(31)

where, Sr(t + 1) is the reservoir storage at time t + 1, Sr(t) is the reservoir storage at time t, and Ir(t) is the reservoir inlet and RCMR × R is the r-order matrix of the reservoir connections that is based on the following relation:

$$ RC{M}_{4\times 4}=\left[\begin{array}{cccc}-1& 0& 0& 0\\ {}0& -1& 0& 0\\ {}0& +1& -1& 0\\ {}+1& 0& +1& -1\end{array}\right] $$
(32)

Figure 1 illustrates the 4-reservoir system.

The reservoir constraints in relation with release and storage of water are as follows:

$$ \operatorname{Re}{\min}_r(t)\le {\operatorname{Re}}_r(t)\le R{\max}_r(t) $$
(33)

where, Reminr(t) is the minimum amount of water release.

$$ S{\min}_r(t)\le {S}_r(t)\le S{\max}_r(t) $$
(34)

where, Sminr(t) is the minimum storage of the reservoir and Smaxr(t) is its maximum value. Another constraint regarding the reservoir storage at the start and the end of the operation period is also considered based on the following relation:

$$ {P}_{1,t}=\left[\begin{array}{l}0\leftarrow if\left({S}_r(t)>S{\min}_r(t)\right)\\ {}g\times {\left({S}_r(t)-S{\max}_r(t)\right)}^2\leftarrow otherwise\end{array}\right] $$
(35)
$$ {P}_{2,t}=\left[\begin{array}{l}0\leftarrow if\left({S}_r(t)<{S}_{\max r}\right)\\ {}g\times {\left[{S}_r(t)-{S}_{\max_r}(t)\right]}^2\leftarrow otherwise\end{array}\right] $$
(36)
$$ {P}_{3,t}=\left[\begin{array}{l}0\leftarrow if\left({S}_r(t)> St\arg e{t}_r(t)\right)\\ {}g\times {\left[{S}_{t\arg e{t}_r}(t)-{S}_r\left(T+1\right)\right]}^2\leftarrow otheriwse\end{array}\right] $$
(37)

P1, t, P2, t and P3, t are penalty functions and g is constant coefficient. The values of the penalty functions will be reduced from the objective function.

4 Results and Discussion

4.1 Sensitivity Analysis

Evolutionary algorithms have some random parameters and require accurate sensitivity analysis. Sensitivity analysis means examining the changes in a parameter versus changes of the objective function. Since the objective is to minimize the objective function, thus, if the value of objective function against the value of one parameter reaches its minimum, this parameter value is then considered as the best parameter to be used in the optimization process. For instance, Table 1 shows the sensitivity analysis of parameters for the algorithms in our case study. For example, if the population of BA and PSA is 50, the objective function becomes minimum (0.98). Also, maximum frequency of BA was different from 3 to 9 Hz, and the best value of the objective function (0.97) was obtained by maximum frequency of 7 Hz. T Minimum frequencies of 2 Hz was used to obtain the best value of the objective function (0.98). The inertia coefficient of PSA was different from 0.3 to 0.9, and the best value of the objective function (0.98) pertained to inertia coefficient of 0.5. Table 1 shows other coefficients of HA .

Table 1 Results of sensitivity analysis for Hybrid Algorithm

4.2 Results of 10 Random Implementations

Table 2 shows the results of 10 random runs of different algorithms. These results are significant because they represent the quality of responses provided by different algorithms:

  1. a)

    The average response obtained for the HA is equal to 0.98, which is 12.5% ​​and 19.6% lower than the PSA and BA, respectively. Therefore, the HA has minimized the objective function and has reduced the difference between water demands and released water from the Shahid Reservoir better than BA and PSA.

  2. b)

    The time is calculated 12 s for HA, which is reduced by 20% and 29% compared to BA and PSA.

  3. c)

    The coefficient of variation of HA is less than the other two algorithms, indicating that even the results of one program run of HA are reliable.

  4. d)

    Figure 6 shows the convergence of different algorithms. It indicates that HA converged faster than BA and PSA.

Table 2 Results of 10 random runs for different algorithms
Fig. 6
figure 6

Convergence trend for different algorithms

4.3 The Allocated Water to Different Demands

Table 3 shows the allocated water to different demands. The time reliability-index, based on the HA, for urban demands is equal to 0.98. The lowest index (0.65) belongs to the agricultural sector. This means that meeting the urban water demands, based on the HA, is related to the higher probability of non-failure. Also, it is clear that more volume of urban water demands are provided when volumetric reliability-index values are compared to each other, based on the HA and various demands. The volumetric reliability-index of urban demands by HA is 0.92 and that of agricultural demands is 0.75. Therefore, less volume of agricultural water demands is met by the HA and PM in GT. Also, HA has the more value for SI index compared to the other methods.

Table 3 Different indices in allocation of water to various demands by the three algorithms

The vulnerability value is 0.005 × 106 m3 for HA and urban water demand; while the agricultural sector has the highest vulnerability value (0.24 × 106 m3), which indicates that the higher shortages are supposed to be observed in the agricultural sector during the reservoir operation period. Also, resilience coefficient of different water demands in Table 3 shows that the HA meets urban demands better than agricultural demands (Re=0.99 vs. 0.61). Comparing the results of MAE and RMSE shows that these indices for HA are better than for BA and PSA. Also, comparing the time and volume reliability of BA and PSA shows that these indices are lower than BA for PSA. In general, HA, in cooperation with GT, outperformed BA and PSA in providing water demands of different sectors, leaving the failures and reducing the maximum water shortages. Figure 7 shows how different demands are provided. Average urban water demand was 4.6 MCM, and the average released water volumes for urban consumption by HA, BA and PSA were 4.2, 3.8 and 3.2 MCM.

Fig. 7
figure 7

Allocated water to different demands in downstream of Shahid Dam: a Urban, b Environmental, c Industrial and d Agricultural

Moreover, the highest demand belongs to the agricultural sector. As Table 3 shows, the volumetric and time reliability in the agricultural sector have a smaller value for all the algorithms compared to other sectors. The average demand in the agricultural sector for 5-year period was 14.97 MCM, and water released by HA, BA and PSA was equal to 14.74, 12.01 and 11.99, indicating the outperformance of HA. The performance of HA was good in other two sectors too. Bozorg-Hadad et al. (2018b) used a standard operation policy (SOP) and genetic programming (GP) for optimal operation of the mentioned reservoir. Comparing the results of the hybrid algorithm shows that the volumetric reliability for genetic programming and standard operation policy for all water supply sectors is less than the new hybrid algorithm. For example, volumetric reliability value is equal to 87% for urban sector and 82%, based on genetic programming and standard operation policy, while this coefficient is 92% in urban section. Also, the algorithm in other sections and indexes has been able to improve the results of genetic programming and standard operating policy methods.

4.4 Discussion about Multi Reservoir System

Table 4 presents the sensitivity analysis of the hybrid algorithm. The objective function of the 4-resvoir system is to increase energy production, and thus, the values of the parameters that can maximize the objective function are known as the desired value. For instance, the most appropriate population is equal to 50, in which the objective function has its highest value, which is equal to 308.29. Moreover, the best values of maximum frequency parameters, minimum frequency and loudness are equal to 7, 2, and 0.5. Other parameters are shown in Tables 4 and 5. Table 6 shows the results of 10 random runs, based on which, the average of the 10 HA runs (i.e., equalling 308.29) is greater than the two other algorithms. Also, the calculated value is perfectly consistent with the value obtained from the Lingo software, as the absolute optimum. In addition, the answers obtained from HA are of less variation coefficients compared with the bat and particle swarm algorithms. In the case of comparing the results with other studies, it can be seen that HA has achieved a higher value of the objective function that is equivalent to higher profits in comparison with other methods such as WCA, FA, MFA and HBMO and addition, this values is obtained based on less NFE, which indicates the better ability of the new hybrid algorithm. Figure 8 also presents the values of water release and storage associated with the hybrid algorithm and the convergences of different algorithms are compared, based on which the new hybrid algorithm has been able to achieve a higher objective function with better convergence speed.

Table 4 Information and details for the multi reservoir system
Table 5 Sensitivity Analysis for multi reservoir system
Table 6 Ten random results for the multi reservoir system
Fig. 8
figure 8

a Relased water, b: reservoir storage and c: convergence curve d: multi reservoir systes

5 Conclusion

Shortage of water resources, optimal exploitation of these resources and significance of water-allocation studies make optimal reservoir-operation a priority among decision-makers. This study tried to optimize the Shahid Dam Reservoir operation aiming at providing various demands (agricultural, environmental, industrial and urban). First, a new evolutionary Hybrid Algorithm was used to calculate total monthly volume of needed water, which is a combination of Particle Swarm Algorithm and Bat Algorithm. Removing the weak responses from one algorithm and substituting it with the strong responses of the other algorithm developed the new algorithm. This issue increased the convergence rate of Bat Algorithm, as well as resolving the problem of immature responses of Particle Swarm Algorithm. The released water from the reservoir was then allocated to each downstream need based on the Proportional Method in Game Theory. Based on the results, the average responses obtained for the objective function by the Hybrid Algorithm was better than the Particle Swarm and Bat Algorithms. In addition, the computation time by the Hybrid Algorithm was less than the other two algorithms. Also, the values of different evaluation indices confirmed the superiority of the Hybrid Algorithm. For example, the RMSE for environmental demands was equal to 0.25 MCM based on the Hybrid Algorithm, while it was 0.29 and 0.41 MCM for Bat and Particle Swarm Algorithms. The volumetric reliability index for agricultural sector was 0.75 based on the Hybrid Algorithm; while, it was 0.74 and 0.72 for the Bat and Particle Swarm Algorithms. In general, the method of water release by the Hybrid Algorithm to meet different water demands outperformed other algorithms. It is recommended that in the future studies, water allocation can be conducted based on different Game Theory policies, such that the results are associated with further promotions.