## Abstract

Optimizing hydropower plants is complex due to nonlinearity, complexity, and multidimensionality. This study introduces and evaluates the performance of the Wolf Search Algorithm (WSA) for optimizing the operation of a four-reservoir system and a single hydropower system in Iran. Results indicate WSA could reach 99.95 and 99.91 percent of the global optimum for the four-reservoir system and single reservoir system, respectively. Comparing the results of WSA with a genetic algorithm (GA) also indicates WSA's supremacy over GA. Thus, due to its simple structure and high capability, WSA is recommended for use in other water resources management problems.

## INTRODUCTION

On the one hand, water demand is increasing for reasons related to population and economics, on the other hand, the effect of climate change in many parts of the world has tended to increase drought frequency (Anderson *et al.* 2018) and reduce the available water. This phenomenon has been observed in Iran, in particular, as studies show the precipitation is decreasing and the temperature is increasing (Tabari & Talaee 2011a, 2011b). Given the arid and semi-arid nature of the country, water scarcity is expected to increase and the mismatch between water demand and available water will become greater. This mismatch has encouraged optimizing the allocation of available water in order to make use of water as efficiently as possible.

Optimization methods can be divided into two separate categories as classical methods and evolutionary algorithms (EAs). Linear programming (LP), dynamic programming (DP), stochastic dynamic programming (SDP) and non-linear programming (NLP) are included in the classical methods category (Revelle *et al.* 1969; Karamouz & Houck 1987; Blanchin & Ukovich 1993). Some of the advantages and disadvantages of classical methods and EAs have been previously reviewed (Labadie 2004; Celeste & Billib 2009; Ahmad *et al.* 2014; Moravej 2017a, 2017b). For example, LP can only solve optimization problems with linear objective functions and constraints, DP and SDP suffer from the curse of dimensionality and state-space discretization and NLP may trap in local optimums especially in non-convex optimization problems (Hossain & El-shafie 2013).

Real world water resources optimization problems are non-linear, large scale, non-convex, and may include many local optimums. Therefore, the approach of EAs was introduced as an alternative solution. EAs have been widely used in several fields of water resources system issues such as reservoir operation (Mansouri *et al.* 2017; Nezhad *et al.* 2017; Wang *et al.* 2017; Peng *et al.* 2018), hydrology (Cho & Olivera 2012; Jha & Sahoo 2015), water distribution systems (Odan *et al.* 2015), environmental and watershed management (Szemis *et al.* 2014; Skardi *et al.* 2015) and groundwater management (McPhee & Yeh 2004; Gaur *et al.* 2015).

One of the earliest works on the application of EAs in reservoir system operation is that of Wardlaw & Sharif (1999). They optimized a four-reservoir system using a real-coding genetic algorithm (GA) and reported that a more efficient solution can be obtained using GA. Since then, various EAs have been employed in the optimal operation of reservoir systems. For example, ant colony optimization (Kumar & Reddy 2006), honey bee mating optimization (Bozorg-Haddad *et al.* 2010), intelligent water drops (Dariane & Sarani 2013), water cycle algorithm (Haddad *et al.* 2014), imperialist competitive algorithm (Hosseini-Moghari *et al.* 2015), cuckoo optimization algorithm (Ming *et al.* 2015), bat algorithm (Ahmadianfar *et al.* 2015) biogeography-based optimization (Bozorg-Haddad *et al.* 2015), weed optimization algorithm (Asgari *et al.* 2015), interior search algorithm (Moravej & Hosseini-Moghari 2016) and shark algorithm (Ehteram *et al.* 2017) can be mentioned in this regard.

The Wolf Search Algorithm (WSA; Tang *et al.* 2012), as a new EA, has been used to solve a variety of engineering optimization problems such as power dispatch (Lenin *et al.* 2015), underwater sensor network design (Jiang *et al.* 2016), rule mining (Agbehadji *et al.* 2016), generating diets for elders (Moldovan *et al.* 2017), and bioinformatic feature selection (Fong *et al.* 2016). Fast convergence and the capability of gaining results near the global optimum were concluded in the above-mentioned studies as advantages of WSA over other metaheuristic algorithms. According to the no-free-lunch theorem, no EA can be the most powerful algorithm in all problems (Wolpert & Macready 1997). So, due to the fact that none of these studies dealt with the application of WSA in water resources management, in this study, for the first time, the performance of WSA was evaluated in the field of reservoir operation. Water is a precious resource in semi-arid and arid regions e.g. Iran, hence the use of a powerful method which, although it results in only a slight improvement in optimal water allocation, can have an important role in water management. In this paper, to show the capability of WSA to solve reservoir operation problems, first, a hypothetical four-reservoir system was used as a benchmark problem. Then, the Karun-4 reservoir system was solved using WSA to show this method's ability to resolve large-scale real-world optimal operation of reservoir systems. The data, methods, and results are presented below.

## MATERIAL AND METHODS

First, the WSA concept and procedure are presented, describing the iterative optimization algorithm. This is followed by a description of the reservoir system operation model. Case study specific objective functions and decision variables for the hypothetical four-reservoir system and the Karun-4 reservoir system are then explained. In each optimization iteration, decision variables are calculated based on the position of the wolves determined by the WSA algorithm. Then, the value of the objective function is calculated. The value of the objective function is the key factor for evaluating the algorithm performance. In this study, three questions were asked to analyze the performance of the algorithm. (i) How close is the final objective function value to the global optimum (i.e. NLP results)? (ii) How fast did the algorithm reach that point? (iii) How accurate is the algorithm in different runs? The first question was answered by simply comparing the objective function value obtained by the algorithm with the global optimum. The second question was answered by looking at the number of function evaluations, assuming that the algorithm reaching a global optimum solution with a lower number of function evaluations is more efficient and faster. Finally, the third question was answered by executing the algorithm multiple times and comparing the results of each run, assuming that an algorithm which leads to the same point, near the global optimum, in each different run, is reliable. The same methodology was used by others (*inter alia*Bozorg-Haddad *et al.* 2015; Moravej & Hosseini-Moghari 2016). The global optimum solution was obtained by NLP. The detailed methodology can be found in Leela Krishna *et al.* (2018).

### WSA concept

WSA is based on the social behavior of wolves in their nuclear families for hunting and avoiding enemies. Wolves have unique, semi-cooperative characteristics; that is, they move in a group in a loosely coupled formation but tend to take down prey individually (Tang *et al.* 2012). When hunting, wolves simultaneously search for prey and watch out for threats such as human hunters or tigers (Tang *et al.* 2012). Each wolf in the pack chooses its own position, continuously moving to a better spot and watching for potential threats (Tang *et al.* 2012). WSA is equipped with a threat probability that simulates incidents of wolves bumping into their enemies. When this happens, the wolf dashes a great distance away from its current position, which helps break the deadlock of getting stuck in local optimums. Wolves have an excellent sense of smell and often locate prey by scent. Similarly, each wolf in the WSA has a sensing distance that creates a sensing radius or coverage area – generally referred to as visual distance (Tang *et al.* 2012). This visual distance is applied to the search for food (the global optimum), an awareness of their peers (in the hope of moving into a better position) and signs that enemies might be nearby (for jumping out of visual range). Once they sense that prey is near, they approach quickly, quietly and very cautiously because they do not wish to reveal their presence. In search mode, when none of the abovementioned items are detected within visual range, the wolves move in Brownian motion (BM), which mimics the random drifting of particles suspended in a fluid (Tang *et al.* 2012).

### WSA procedure

Based on the above description the three following rules are considered in WSA (Tang *et al.* 2012). A detailed procedure is given in Tang *et al.* (2012) and Fong *et al.* (2016).

- 1.Each wolf has a visual area with a radius defined by
*v*for*X*as a set of continuous possible solutions. In 2D, the coverage would simply be the area of a circle by the radius*v*. In hyper-plane, where multiple attributes dominate, the distance would be estimated by the Minkowski distance as Equation (1). where*x*is the current position;_{i}*x*are all the potential neighboring positions near_{c}*x*and the absolute distance between the two positions must be equal to or less than_{i}*v*; and*λ*is the order of the hyperspace;*v*and the number of the wolves are two parameters of the algorithm; finally,*k*is the counter for decision variables. Each wolf can only sense companions who appear within its visual circle and the step distance by which the wolf moves at a time is usually smaller than its visual distance. - 2.
The result or the fitness of the objective function represents the quality of the wolf's current position. The wolf always tries to move to better terrain but rather than choose the best terrain it opts to move to better terrain that already houses a companion. If there is more than one better position occupied by its peers, the wolf will choose the best terrain inhabited by another wolf from the given options. Otherwise, the wolf will continue to move randomly in BM.

- 3.
At some point, it is possible that the wolf will sense an enemy. The wolf will then escape to a random position far from the threat and beyond its visual range.

### Reservoir system operation model

*t*= number of time steps;

*i*and

*j*

*=*number of reservoir; and = storage volume of

*i*th reservoir at the time step of

*t*+ 1 and

*t*, respectively; = volumetric inflow to

*i*th reservoir during period

*t*; = connectivity matrix of reservoirs; = volumetric release from

*j*th reservoir during period

*t*; = volumetric overflow spilled from

*j*th reservoir during period

*t*; = cumulative volumetric losses from

*i*th reservoir during period

*t*including evaporation loss etc.;

*n*= total number of reservoirs;

*T*= total number of time steps. The volumetric evaporation loss is defined in Equation (3). Other losses are not considered as those are minor.

*i*th reservoir during period

*t*; and = area of the

*i*th reservoir at the beginning of time step

*t*and

*t*+ 1 respectively. The volumetric spill from reservoirs is calculated using Equation (4). where = maximum designed capacity of the

*i*th reservoir during period

*t*. Reservoir systems operation models have the following constraints on release and storage at any given time step.

in which, and = minimum and maximum release from *i*th reservoir during period *t*, respectively; = minimum permissible volumetric storage of *i*th reservoir at the beginning of time step *t*; and = volumetric storage of *i*th reservoir in the beginning and the end of the operation period, respectively. If the constraints mentioned in Equations (5)–(7) were violated, a penalty was applied to the objective function.

### Four-reservoir system operation

*B*= total benefits of the entire system; = benefit of reservoir

*i*in the time step of

*t*;

*P*= penalty function as defined in Equations (9)–(11); = volumetric release from reservoir

*i*during period

*t*. Other parameters were defined in previous sections. Also, it should be noted that this problem is hypothetical so the benefit has no unit. where = penalty of carry over violation; = penalty of reservoir storage range violation. The data including inflow to the reservoirs, benefit in each period, and

*S*related to the four-reservoir system were presented in Chow & Cortes-Rivera (1974).

_{mx}### Single-reservoir (Karun-4) system operation

^{6}(m

^{3}), 2,190 × 10

^{6}(m

^{3}) and 1,000 × 10

^{6}(W), respectively (Moravej & Hosseini-Moghari 2016). Operation of the Karun-4 reservoir system was optimized by WSA once a month over a 5-year period from 1996 to 2001. The objective function presented in Equation (12) was considered. where

*Z*= objective function;

*P*

_{t}= power generated by the hydroelectric plant during period

*t*(W) as defined by Equation (13); and

*PPC*= power plant capacity (total capacity of the hydroelectric plant) equal to 1,000 × 10

^{6}(W). where

*g*= gravity acceleration (9.81 m/s

^{2}); = the efficiency of the hydro-electric plant;

*PF*= plant factor;

*R*= volumetric release from the Karun-4 reservoir during period

_{t}*t*;

*h*= effective head of the hydro-electric plant;

_{t}*H*= height of water reservoir at time step

_{t}*t*;

*H*= height of water reservoir at time step

_{t+1}*t*

*+*

*1*; and

*TWL*= downstream (tail-water) height of the hydro-electric plant. During the study period, the average annual inflow into the reservoir was about 4,904 million cubic meters (MCM) and the minimum and maximum annual inflows were 3,127 and 7,431 MCM, respectively. This information shows that during the study period, both wet and dry conditions occurred over the study region. Further description and information including inflow and evaporation data can be found in Haddad

*et al.*(2014) and Moravej & Hosseini-Moghari (2016).

## RESULTS AND DISCUSSION

### Four-reservoirs system operation optimization

As the four-reservoir system is a benchmark in reservoir systems operation optimization problems, it has been solved with different methods, the results of which can then be compared. Chow & Cortes-Rivera (1974) solved the four-reservoir problem using LP and an optimal solution equal to 308.26 was reported. Murray & Yakowitz (1979) used differential dynamic programming (DDP) to solve the four-reservoir problem and reported that the optimal solution was equal to 308.23. Bozorg-Haddad *et al.* (2010) solved this problem with Lingo 8.0 software and the global optimum of 308.29 was reported. A global optimum of 308.29 was considered in the current study. Global optimums of 300.47, 306.92, 308.12, 302.42, 306.76 and 307.92 were reported using GA (Haddad *et al.* 2014), water cycle algorithm (Haddad *et al.* 2014), biography-based optimization (Bozorg-Haddad *et al.* 2015), GA (Hosseini-Moghari *et al.* 2015), imperialist competition algorithm (Hosseini-Moghari *et al.* 2015) and cuckoo optimization algorithm (Hosseini-Moghari *et al.* 2015), respectively.

The best solution reported for the four-reservoir system is 308.15 achieved by the weed optimization algorithm (Asgari *et al.* 2015). Considering 10 wolves and 10,000 iterations (100,000 function evaluations) the WSA was executed to solve the four-reservoir optimization problem. The results of 10 different executions are presented in Table 1. It should be noted that the number of wolves, and ultimately the number of function evaluations, are designed in a way to make the WSA results comparable with the literature.

Number of runs | WSA results |
---|---|

1 | 308.05 |

2 | 307.70 |

3 | 307.48 |

4 | 307.12 |

5 | 307.65 |

6 | 308.15 |

7 | 307.77 |

8 | 307.59 |

9 | 307.68 |

10 | 307.99 |

Global optimum | 308.29 |

Maximum (best) | 308.15 |

Average | 307.72 |

Minimum (worst) | 307.12 |

Coefficient of variation | 0.00096 |

Number of runs | WSA results |
---|---|

1 | 308.05 |

2 | 307.70 |

3 | 307.48 |

4 | 307.12 |

5 | 307.65 |

6 | 308.15 |

7 | 307.77 |

8 | 307.59 |

9 | 307.68 |

10 | 307.99 |

Global optimum | 308.29 |

Maximum (best) | 308.15 |

Average | 307.72 |

Minimum (worst) | 307.12 |

Coefficient of variation | 0.00096 |

The best result of WSA is similar to the best result of the weed optimization algorithm which is 308.15. This solution is very close to the global optimum (99.95%). The results in Table 1 show the capability and strength of WSA to reach the global optimum. Also, the low coefficient of variation shows that the initial random selection of the initial population has minimal effect on producing a final optimum solution. Attaining values close to the global optimum and low variation over different runs can be listed as the main advantages of WSA over other algorithms.

### Karun-4 reservoir system operation optimization

The global optimum of the Karun-4 hydropower optimization problem obtained by NLP was reported by Moravej & Hosseini-Moghari (2016) and Haddad *et al.* (2014) to be 1.2132. Other algorithms such as GA (Haddad *et al.* 2014), water cycle algorithm (Haddad *et al.* 2014), biography-based optimization (Bozorg-Haddad *et al.* 2015) and interior search algorithm (Moravej & Hosseini-Moghari 2016) have been recently employed to solve the Karun-4 hydropower optimization problem. The best solution so far is 1.2180 achieved by Moravej & Hosseini-Moghari (2016) using the interior search algorithm. WSA is used to solve the Karun-4 reservoir system operation optimization problem considering 20 wolves and 3,500 iterations, therefore 70,000 function evaluations were made. The aim of this selection is to provide fair comparable results with those of Moravej & Hosseini-Moghari (2016). It is noteworthy that *v* was set to 0.3. The results of 10 different executions of WSA are presented in Table 2.

Number of runs | WSA results |
---|---|

1 | 1.2150 |

2 | 1.2187 |

3 | 1.2142 |

4 | 1.2155 |

5 | 1.2160 |

6 | 1.2155 |

7 | 1.2185 |

8 | 1.2215 |

9 | 1.2180 |

10 | 1.2240 |

Global optimum | 1.2132 |

Maximum (worst) | 1.2240 |

Average | 1.2177 |

Minimum (best) | 1.2142 |

Coefficient of variation | 0.0025 |

Number of runs | WSA results |
---|---|

1 | 1.2150 |

2 | 1.2187 |

3 | 1.2142 |

4 | 1.2155 |

5 | 1.2160 |

6 | 1.2155 |

7 | 1.2185 |

8 | 1.2215 |

9 | 1.2180 |

10 | 1.2240 |

Global optimum | 1.2132 |

Maximum (worst) | 1.2240 |

Average | 1.2177 |

Minimum (best) | 1.2142 |

Coefficient of variation | 0.0025 |

Table 2 shows that WSA can attain values as close as 99.91 percent of the global optimum, while GA, water cycle algorithm, biography-based optimization, and interior search algorithm achieved 79, 96, 98 and 99.90 percent of the global optimum, respectively. In addition, the average of the objective function values of 10 different runs obtained by WSA (i.e. 99.63%) is closer to the global optimum than the average values of the above-mentioned algorithms which are 69, 94, 96, and 99.60 percent for GA, water cycle algorithm, biography-based optimization, and interior search algorithm, respectively. The low coefficient of variation obtained from WSA demonstrates that the algorithm attains values close to the global optimum each time it is executed. Due to the fact that all EAs enjoy a random process, the results of the algorithm might be a bit different in each run. For this reason, 10 runs were considered for the algorithm. Figure 1 shows the Min (the best), the average and the Max (the worst) values of the objective function in each iteration (convergence plot).

Figure 1 shows how, with the increase in function evaluations, the maximum, minimum, and average of the objective function in 10 different runs converged with each other. This convergence, in accordance with the low coefficient of variation, illustrates the reliability of the algorithm. It can be interpreted that the algorithm is not sensitive to the initial random selection of the initial population because it reaches almost the same end solution. Figure 2 shows the release, storage, and power generated in each month of operation. From these figures, it can be seen that all constraints are met. Also, the high accordance between the results of WSA and the global optimum (achieved by NLP) can easily be observed.

## CONCLUSION

Optimal water allocations play an important role in water resources management. Due to the complexity of water resources systems, these optimal allocations can only be determined by using optimization algorithms. So, a powerful algorithm can be beneficial in this field. Therefore, this study dealt with the application of WSA as a new algorithm for the first time in reservoirs system operation optimization. WSA was applied to solve the operation of a hypothetical four-reservoir system and the Karun-4 dam as a large-scale real-world hydropower reservoir in Iran. The result showed that WSA has high potential to solve water resources problems. The best solutions achieved by WSA showed this algorithm can attain values which are 99.95 and 99.91 percent of the global optimums for four-reservoir and the Karun-4 dam systems, respectively, which are among the best results reported so far. Comparisons between WSA results and other metaheuristic algorithms show that WSA solves optimization problems with higher efficiency. Considering the ability of WSA to produce solutions close to the global optimum with low computational effort, it can be stated that WSA is a powerful method for solving water resources engineering problems. Application of WSA in different case studies or other water-related optimization problems could be of interest for future studies. Also, more standardization on WSA parameter tuning could be a topic for future studies.

## ACKNOWLEDGEMENTS

The author gives special thanks to Mr Afshin Mansouri for sharing some codes and data.

## REFERENCES

*IFMBE Proceedings*