Application of Hybrid Particle Swarm Optimization Algorithm in the Optimal Water Operation of Cascade Reservoirs in Dry Season

In this paper, a hybrid particle swarm optimization (HPSO) algorithm is proposed to solve the problem of optimal water operation of cascade reservoirs in dry season. Based on the basic particle swarm optimization (PSO) algorithm, chaos algorithm is introduced to traverse the search space to generate the initial population and improve the global searching ability of the algorithm. A self-adaptive inertial weighting method based on optimized inertial weighting coefficient is adopted to improve the ability of particle individual search and avoid local optimum. The proposed algorithm is applied to the optimal water operation in dry season of cascade reservoirs on the mainstream of Xijiang River. The results show that the HPSO algorithm can effectively improve the guarantee degree of ecological flow and suppressing salinity flow in the control reach of Wuzhou station under different typical dry year scenarios.


Introduction
Nonlinear programming (NLP), dynamic programming (DP), progressive optimal algorithm (POA), et al. are commonly used in the optimal operation of cascade reservoirs [1][2][3]. These methods are more or less problematic, such as follows: The NLP method needs to simplify the original problem, which will reduce the precision of optimization results; In the process of optimization solution, the precision of the DP method is limited by the number of discrete points. If the number is small, the calculation accuracy is poor. Conversely, if the number is large, the calculation time increases exponentially and the "curse of dimensionality" is easy to occur; Although the POA method can effectively solve the problem of "curse of dimensionality", the calculation process is over-dependent on the initial solution and easy to fall into local optimum. With the rapid development of computer technology, more and more heuristic intelligent algorithms are applied to reservoir optimal operation [4][5], such as genetic algorithm (GA), simulated annealing algorithm (SA) and ant colony optimization algorithm (ACO). Many scholars have made further research on these intelligent algorithms and improved the operation mechanism of the algorithms, providing effective methods and experience for the study of reservoir optimal operation.
Particle swarm optimization (PSO) algorithm was first proposed by Kennedy and Eberhart in 1995 [6]. This algorithm can solve the deficiencies of conventional optimization methods, and has the advantages of rapid convergence, strong robustness, thorough optimization, and easy programming. The PSO method is effective in solving optimization scheduling problems, but at the same time, there are still some shortcomings, such as premature convergence, stagnation and local optimum. In order to improve the computational performance of PSO, a hybrid particle swarm optimization (HPSO) algorithm is proposed. Based on the basic particle swarm optimization algorithm, the chaos algorithm is introduced to traverse the search space to generate the initial population and improve the global searching ability of the algorithm [7][8]. An adaptive inertial weighting method based on optimized inertial weighting coefficient is adopted to improve the ability of particle individual search and avoid local optimum. The proposed algorithm is applied to the optimal water operation in dry season of cascade reservoirs on the mainstream of Xijiang River. The accuracy of the results obtained from the case analysis is satisfactory.

Objective function
The purpose of this paper is to study the maximum guarantee rate of ecological flow and suppressing salinity flow in the control section in dry season, that is, to fully consider various constraints such as water balance, water storage, discharge and output, etc. according to the known forecast of inflow or situational runoff, so as to realize the maximization of target benefit in the dispatching period. The expression of objective function is shown in equation (1).
T is the total number of time periods during the planning horizon; t is the period number; F is the guarantee degree of ecological flow and suppressing salinity flow in the control section during the dispatching duration; 1 F is the satisfaction degree of ecological flow ( 1 ε ) in a single period; 2 F is the satisfaction degree of suppressing salinity flow ( 2 ε ) in a single period.

Basic PSO algorithm
Particle swarm optimization is a stochastic global optimization algorithm based on the simulation of bird feeding behavior. It starts with the randomly generated initial solution and searches for the optimal solution through continuous iteration, with the position of each particle as the possible solution to the problem. The objective function is obtained by solving the position coordinates of the particle iteratively updated to determine the fitness of the population particle. In the calculation, the individual extremum and global extremum are updated through the iteration of particle position and velocity, and reflected to the solution space, so as to obtain the optimal solution of the problem.
In the PSO algorithm, the velocity and position of particles are iterated, and the equation is as follows: where i is the sequence number of particles; n is the number of iterations; n i P is the location of contemporary particles; , n best i p is individual optimum (the optimal location of the particle is found in itself); , n best i g is global optimum of the whole population (the optimal location of the current particle population); Besides, in the process of particle update, the velocity should be limited within [

(1) Introducing chaos search mechanism
Chaos is a kind of random phenomenon, the behavior is complex but has certain internal rule. When using chaotic mechanism to solve optimization problems, its own ergodicity will make the search more thorough, and better than the blind random search results. The chaotic mechanism can greatly reduce the possibility of the optimization algorithm falling into local optimum and make it easier to obtain the global optimal solution. Logistic mapping equation is as follows: where j y is the value of variable y in jth iteration, and 0 1 j y < < ; u is the adjustment parameter, value range is [0,4], and when the maximum value is taken, the equation becomes chaotic.
(2) Optimized inertia weighting factor In the PSO algorithm, the optimization process of particles can be balanced to avoid the possibility of falling into local optimum by properly optimizing the inertial weight ω . If the algorithm falls into the local extremum, the particles will gather around the local extremum and repeat similar search paths, making it difficult for the algorithm to jump out of the local extremum. Generally, in the PSO algorithm iteration, the inertial weight linear reduction method is more commonly used. However, the optimization process of PSO algorithm is nonlinear, and the method of linear reduction is too single. The adjustment effect and adaptability of the nonlinear and complex optimization process are limited, and it is easy to fall into local extremum. Therefore, an adaptive method of inertial weight is adopted. The calculation method is shown in equation (10). iterations; D is the particle dimension; K is the iteration coefficient, which is calculated by using equation (12).
By dynamically adjusting the distance between the particle and the extreme position of the population, the weight change is related to the position information of the particle and the weight of inertia is adjusted more accurately. When l i x Δ is large, it means that the particle is far away from the position of the current optimal solution, then equation (10) will give a larger value of ω in the velocity updating equation (7), so that the particle has a higher flight speed, which can be closer to the current optimal solution and guarantee the global search ability of the population. When l i x Δ is small, it indicates that the particle is close to the position of the current optimal solution, then equation (10) will give a smaller value of ω in the velocity updating equation (7), so that the particle has a lower flight speed, which can search the optimal solution position to the nearest neighbor region more precisely and ensure the local development ability of the population. At the same time, the iteration coefficient k decreases with the increase of the number of iterations, which can meet the different needs of the algorithm for larger or smaller value of l i x Δ in the iteration process.
Through the above method of weight adjustment, the adaptability of the weights is improved, the searching behavior of particles is improved, the possibility of the algorithm falling into local optimum is reduced, and the convergence of PSO algorithm is enhanced.

Algorithm flow for HPSO
Step 1: Initialization of algorithm parameters.
Set the particle population size S, the maximum number of iterations of the population max T , the number of initial population chaotic iterations J, the particle flight acceleration 1 c and 2 c , the maximum and minimum values of inertia weight max ω and min ω .
Step 2: Population initialization. Within the allowable range of water levels for each period, according to Logistic mapping equation (9), the initializer takes J iterations to obtain S sets of water levels at the end of the period: Step 3: Fitness selection. The current particle fitness, the individual optimal solution of particle population and the global optimal solution of particle population can be obtained by calculation. The current particle fitness was compared with the optimal individual extreme of particle population. If the fitness is better than the extremum of the individual, the optimal position of the individual is replaced by the current particle position. Compared with the optimal global extreme value of particle population, the current particle position is taken as the global optimal position if the fitness is better than the global extreme value.
Step 4: Update of the particle population. Iterate particle weight l i ω according to equation (10), and obtain the velocity and position of particle population by iteration refer to equation (7) and (8).
Step 5: Stopping criterion for iteration. If the calculation meets the maximum number of iterations or the error accuracy, the iteration is terminated; otherwise, go to Step 3 to continue the iteration until the end.
The HPSO algorithm flow is shown in Fig. 1.

Case study
In order to verify the feasibility and effectiveness of the proposed algorithm, the optimal water operation in dry season of cascade reservoirs on the mainstream of Xijiang River is taken as the example. The topological structure of the cascade reservoirs and the control section of Wuzhou station is shown in Fig. 2. Among them, the reservoirs involved in the optimization is Tianyi, Guangzhao and Longtan, and the ecological flow and suppressing salinity flow of Wuzhou station are respectively 1800 m 3 /s and 2100 m 3 /s. Three typical year inflow processes are selected for the case study: 1989.10~1990.3 (P=91%), 1992.10~1993.3 (P=98%) and 1998.10~1999.3 (P=97%).
The optimization takes a day as the calculation period, in which the initial water level of each reservoir is obtained through the long series monthly scale calculation. According to the empirical algorithm and the statistics of multiple test results, the initial parameters of HPSO were assigned as follows: S=200, max 38. Tab. 1 shows the statistical results of the guarantee degree of ecological flow and suppressing salinity flow in each typical year at Wuzhou station. Fig. 3~5 show the dispatching process of Wuzhou station in each typical year. As shown in the table, in typical dry year scenario 1989.10~1990.3 (P=91%), the number of qualified days of ecological flow at Wuzhou station in dry season increased from 87d before dispatching to 125d, the ecological flow guarantee rate increased by 21%, the number of qualified days of suppressing salinity flow increased from 65d before dispatching to 77d, and the guarantee rate of suppressing salinity flow increased by 6%; Meanwhile, in scenario 1992.10~1993.3 (P=98%), the number of qualified days of ecological flow in dry season increased from 59d before dispatching to 94d, the ecological flow guarantee rate increased by 20%, the number of qualified days of suppressing salinity flow increased from 25d before dispatching to 49d, and the guarantee rate of suppressing salinity flow increased by 6%; Similarly, in scenario 1998.10~1999.3 (P=97%), the number of qualified days of ecological flow in dry season increased from 54d before dispatching to 117d, the ecological flow guarantee rate increased by 34%, the number of qualified days of suppressing salinity flow increased from 37d before dispatching to 58d, and the guarantee rate of suppressing salinity flow increased by 12%.

Conclusions
In the development process of cascade reservoirs optimal operation, the advantages of rapid convergence rate, strong robustness and simple optimization mechanism of PSO have made it widely applied, but how to avoid premature convergence and local optimum have always been the focus of research by scholars. In this paper, an improved hybrid particle swarm algorithm is proposed to solve the problem of optimal water operation in dry season of cascade reservoirs on the mainstream of Xijiang River under different typical dry years. The results show that the proposed HPSO algorithm can effectively improve the guarantee degree of ecological flow and suppressing salinity flow in the control reach of Wuzhou station.