Research on water resources dispatch model based on improved genetic algorithm – water resources dispatch model

According to the research on reservoir water resources scheduling and distribution, the aim is to balance the water supply and demand in each period, and consider the total water supply and the annual external water withdrawal of the reservoir in each period as water rights. The decisionmaking variables are provided for the water supply of the reservoir in this paper, so that water demand of the water-receiving area can be better met to alleviate the water shortage at various stages and realize the effective use of water resources. Moreover, through the constraints of reservoir operation rules and other constraints, a mathematical model is established for optimal operation of water resources in the reservoir system. Meanwhile, optimized genetic algorithms are applied to solve the model according to the characteristics of the model. After simulation tests, compared with the traditional linear binary algorithm used in the reservoir, the improved genetic algorithm studied in the paper improves the accuracy of data calculation and data convergence, which proves that the research results of the paper provide theoretical and practical significance for improving the level of reservoir water resources management and solving the problem of optimal water resources scheduling.


INTRODUCTION
In the field of water environment planning and management, a large number of parameters usually have observational subjectivity and unreliability problems. In addition, according to the linear binary algorithm data used for reservoir water resources scheduling, the uncertainty of parameters is often described in a fuzzy manner. Therefore, in order to ensure the existence of the optimal solution to the planning problem, there is usually a factor gap between one index parameter and another index, and the upper and lower boundaries of the gap will be given.
In practical problems, due to the many parameters and uncertainties involved in the aquatic ecological environment (Chai et al. a, b), the genetic system theory is usually used to construct a water environment management model to solve non-deterministic planning problems.
In the paper, genetic algorithms are adopted to treat each data index as a genetic gene, and each chromosome represents an independent solution in the entire group.
Additionally, the chromosome is composed of a binary combination string (Ai et al. ), which represents the elimination efficiency of the reservoir and the water supply of different water sources. Although a linear binary algorithm can be used to solve the unconstrained production problem, the method is based on a penalty function rather than constraints, and the penalty solution exceeds the constraints given by the system. Therefore, a fitting function is established to improve the genetic genes in the paper (Chai et al. a, b). The paper outlines modern optimization methods for evolutionary search, focusing on applications in the areas of water resources planning, engineering, and management (Tayfur ). In the view of traditional genetic algorithm problem, a fitting function is established to treat each data index as a genetic gene, and a multi-group genetic algorithm based on real coding is proposed to simplify the genetic calculation process while effectively avoiding premature immature convergence problems, which provides conditions for the solution.

OPTIMIZED DISPATCHING METHOD OF WATER RESOURCES Optimal principles of water resources dispatch
Optimal allocation of water resources refers to the reasonable allocation of available water resources between regions within a specific region, and after determining the water demand of the water consumption area and existing projects, the utilization rate of limited water resources will be increased (Fang et al. ).
The optimal scheduling of water resources needs to select the optimal scheduling decision method that meets the system standard functions and constraints to form a model. Moreover, the core of water resources optimization is water regulation. The steps of water resources optimization scheduling are as follows (Luo et al. ).
(2) Establish a model and choose a model solution method.
(3) Analyze the comparison results and optimize the scheduling plan.
Based on an analysis of the balance between water supply and demand, the optimal allocation of water resources needs to understand the current situation of water supply and demand, so as to clarify the overall direction of future water resources. Moreover,, the optimal allocation of water resources is a multi-stage decision-making problem, which requires to allocate water resources rationally in time, space and quantity, so that limited water resources can produce better comprehensive benefits to achieve the purpose of sustainable development (Liu et al. ).

Construction and solution of optimal configuration model
The optimal allocation model of water resources system can adopt the method of constructing system constraints and objective functions, and the model is solved to obtain better benefits under the given requirements. Besides, in order to construct the optimal water resources dispatch model for the water station and reservoir system of the canal, the objectives of models need to be clarified. What is more (Gao et al. ), firstly, for the water station system of the reservoir, the optimization goal is to reduce the system operating cost on the premise of satisfying various water demands to the greatest extent. Secondly, according to the characteristics of regional water resources and reservoir operation rules, the constraints of the model is listed. Then, an appropriate method is chosen to solve the model and draw a program flow chart of the method. Finally, the program is written in the appropriate programming language (Lin et al. ).

Generalization of water supply system
The water supply system includes a single reservoir that supplies water to the water supply channel of the water receiving area and a single supplementary channel water station that draws water from the river network. When the amount of water in the reservoir is insufficient to meet the demand of the water receiving area, water can be extracted from the upstream river network to the channel to reduce the water shortage in each stage of the water receiving area (Hu ). The generalized water supply system is shown in Figure 1.
Among them, L is the amount of water coming from the reservoir, and Z is the amount of evaporative leakage of the reservoir. Besides, Q refers to the amount of water discharged from the reservoir. Additionally, G n indicates the amount of water supplied by the reservoir, and n 1 and n 2 are the water demand of each water-using area.

Model establishment
Aiming at the above generalized system, a single reservoir and a single external drainage water supply station are taken as the research object (Liu et al. ). What is more, the minimum sum of squares of water shortage in each period in the system is the objective function, and the decision variables include the water supply volume G n of the reservoir in each period and the water lift volume P i of the canal-filling station. Moreover, constraint conditions are composed of the annual water supply of the reservoir, the annual diversion of external water diversion which are water rights and the constraints of the reservoir operation rules. Meanwhile, a mathematical model is established for the optimal operation of water resources in the water supply station and reservoir system (Ha et al. ), as shown in Figure 2.
(1) Objective function: In formula (1), ε refers to the minimum square sum of the difference between the water demand in the water receiving area and the total system water supply at each time period, and τ is the sum of the square difference between the water demand in the water receiving area at each time period and the total water supply 10 4 m 3 of the system. What is more, n is the total number of time periods divided during the year, and i refers to the time period number. Besides, G n1 represents the water demand of the water receiving area in the n1-th time period, and P i1 indicates the water supply volume 10 4 m 3 /time of the reservoir.
In addition, PS i1 is the diversion water volume 10 4 m 3 /time of the repair channel station (Wang et al. ).
(2) Restrictions ① Restriction on the annual water availability of the reservoir means under different incoming water frequencies, the amount of water the reservoir can provide, namely In formula (2), φ refers to the total annual water supply of the reservoir10 4 m 3 .
② The total annual water withdrawal (water rights) of the water station means under different incoming water frequencies, the amount of water that the canal water station   can provide (Xiong et al. ). It is formulated as In formula (3), δ is the total allowable annual water extraction of the water extraction station 10 4 m 3 .
③ Restriction of reservoir operation rules are that the storage capacity of the reservoir at the end of each period should not be less than the minimum storage capacity and greater than the corresponding storage capacity of the flood control limit water level (Shao et al. ), that is In formula (4), ξ min is the minimum storage capacity 10 4 m 3 , and ξ p refers to the storage capacity 10 4 m 3 corresponding to the flood control limit of the reservoir.
Among them, ξ i is related to the storage capacity of the reservoir in the previous period, the amount of incoming water from the reservoir, the amount of discarded water, the amount of water supply and the amount of evaporation and leakage, namely: In formula (5), each variable is the water quantity variable at the end of the i-1 period.

THE ESTABLISHMENT AND SOLUTION OF THE OPTIMAL ALLOCATION MODEL OF WATER RESOURCES Decision variables
The decision variables for the rational allocation of water resources are: In Equation (6), λ i jk is the amount of water allocated to the k-th water sector by the j-th water source in the i-th zone, and i refers to the zone number, followed by (i 1 , i 2 Á Á Á , i n ). Moreover, j is the water source number, mainly including weir diversion, diversion of runoff diversion, local reservoir storage and groundwater. In addition, k is the water department number, mainly industrial water, agricultural water, domestic water and ecological water included (Xing ).

Objective function
Objective 1: Net benefit of regional water supply is the largest.
In Equation (7), η 1 refers to the maximum benefit, and x ijk is the water supply benefit coefficient of the j water sources in the i zone to the k water sector.
Objective 2: The region's overall water shortage is minimal.
In Equation (8), y ijk is the total water demand of the ipart k water-using department.
Objective 3: The area has the least amount of groundwater extraction.
Restrictions 1) Water resource constraints. The formula is as follows.
Water supply restriction at the head of the weir: θ t1 , θ t2 , θ t3 and θ t4 respectively represent the head of the canal i, the cross-boundary runoff, the local reservoir, and the available water of groundwater. t is the constraint condition.
(1) Constraints on domestic water demand. The formula is as follows.
In Equation (11), β i is the domestic water demand in the i-th zone.
(2) The design flow restriction of the branch channel.
The formula is as follows.
In Equation (12), θ t5 is the design flow of branch i, m 3 =s t i refers to the number of diversion days of branch i.

Model solution
The steps of the model solving algorithm are as follows.
(1) Real number coding. Real number coding is used in the paper to directly form the individual with the original variables.
(2) Population initialization. The population size is taken as N, and individuals are randomly generated to form a set, while ensuring that it meets the constraints corresponding to the objective function.
(3) Fitness function construction. During the algorithm calculation, each sub-population independently calculates its fitness to determine outstanding individuals. The fitness calculation function is as follows. When When η min i ffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ffi and η t8 respectively represent the mean value, maximum value, and minimum value of the fitness values of genetic genes.
(4) Multi-group genetic algorithm implementation. Operating parameter settings of multi-group genetic algorithm are shown in Table 1.
(5) Output result. By judging whether the population meets the convergence condition and whether the genetic evolution algebra reaches the maximum genetic algebra, the iterations that meet the conditions are terminated, and the best individual obtained is the optimal solution, that is, the optimized various water sources are the optimal water distribution for each division in each department.

SIMULATION AND EXPERIMENT Simulation test environment
The  precipitation. The reservoir is supplied with water as much as possible to meet the planned water demand. During the optimization period, the reservoir is supplied with water as much as possible to meet the discounted water demand.
(1) The decision variable uses water demand discount coefficient ψ(ψ ∈ (0, 1)) as the decision variable for optimal scheduling. In order to improve the optimization efficiency of the optimization model, the lower limit of ψ is increased from 0 to the minimum water supply intensity of 47.28% in the simulated dispatch. The discounted water requirement of the reservoir is: In formula (15), y ψ i ijk refers to the discounted water demand in the optimization period i, and y i jk is the planned water demand in the optimization period i. Besides, ψ i is the discount coefficient in the optimization period i, and ψ i ∈ (47:28%, 100%) .
(2) Objective function In order to solve the problem of low water supply intensity in individual periods during simulated scheduling, and improve the overall water supply during the optimization period, two optimization scheduling goals are set in the model.
Objective a: The minimum value of the water supply intensity in each optimization period is the largest, and the function P i1 is: In formula (16), π is the maximum water supply intensity of the optimized period i.
Objective b: The average value of water supply intensity in each optimization period is the largest, the function P i2 is: In formula (17), i is the optimization period.
There is a certain contradiction among the available storage capacity in the adjacent optimization period, and the planned water demand downstream of the reservoir in the adjacent period is also different, resulting in an inverse proportional relationship between the minimum and average water supply intensity in the optimization period. Therefore, the setting of the two optimization goals is reasonable and effective.
(3) Constraints The water balance equation and reservoir constraints of the optimized model are consistent with the simulation model. In addition, the decision variable constraint 47:28% ψ i 100% should be satisfied, which is the discount coefficient of water demand.
To sum up, the paper uses the fitting function and improves the genetic gene instead of the penalty function to prevent the penalty solution from exceeding the constraints given by the system, thereby reducing the randomness of the classical genetic algorithm and increasing robustness.

Comparison of target extreme value
The traditional linear binary algorithm and the improved genetic algorithm are adopted to solve the dual-objective optimal dispatch model of reservoir water supply. The population size is 100, and the maximum evolutionary generation 2000 is used as the termination condition of the algorithm.
What is more, the optimization calculations are independently performed 10 times. Table 2 shows the average optimization results and average calculation time of the two algorithms for each target.
Conclusions are drawn from Table 2.
(1) Judging from the average optimization results of each target extreme value, the average optimization results of the improved genetic algorithm are better than those of the traditional linear binary algorithm.
(2) From the perspective of average calculation time, the average calculation time of the improved genetic algorithm is 19.41% lower than that of the traditional linear binary algorithm.
Analysis of solutions with similar values for single targets shows that the minimum difference between goal 1 and goal 2 is lower than the average, which also reflects that the inherited genes of genetic factors in this algorithm are significantly higher than that of standard genetic algorithms.
Traditional optimization algorithms cannot solve the model reasonably because of premature convergence and exceeding the constraints given by the model. In this paper, a multi-group genetic algorithm based on real number coding is used to solve it through real-coded multi-group genetic algorithm to solve the model solving problem. The optimal configuration results obtained verify the effectiveness of this algorithm.

Comparison of multiple iteration calculations
The best one is respectively selected from the 50 results of reservoir optimal operation in two algorithms, as shown in Figure 3.
The following conclusions can be seen from Figure 3.
(1) For the extreme value analysis of the two targets, W 1 is higher than the corresponding value of W 2 in the two target extreme values, and E 1 is higher than the corresponding value of E 2 in the extreme value of target b.
However, due to the inverse proportional relationship between goal a and goal b, it is acceptable that the corresponding value of E 1 is lower than E 2 at the extreme value of goal a.
(2 (3) For the shape analysis of the genetic factors convergence, although the accuracy distribution of the traditional linear binary algorithm is wider, its overall distribution position is lower, and the continuity in the upper left part of the coordinates is severely damaged.
While the genetic factor of the improved genetic algorithm still maintains a higher overall distribution position of the gene after multiple iterations, and the continuity is better.
In summary, the genetic factor inheritance of the improved genetic algorithm is better than the calculation accuracy of the traditional linear binary algorithm, and the overall optimal solution set corresponding to the improved genetic algorithm calculation accuracy is also better than the optimal solution set corresponding to the traditional linear binary algorithm.

Simulation scheduling of data in different time periods
It can be seen from Figure  solution set of the improved genetic algorithm as a whole is better than that of the traditional linear binary algorithm.
Therefore, D, which is the optimal solution set of the improved genetic algorithm, is selected as the basis for formulating the optimal operation plan of reservoir water supply in the paper. In addition, the water supply situation corresponding to the optimal solution L is shown in Table 3, and the water supply situation during the destruction period in simulated dispatch and optimized dispatch is shown in Figure 4.
The following conclusions can be seen from Figure 4 and Table 3.
(1) There are a total of 57 water supply destruction periods in the optimized dispatch, and the corresponding guarantee rate during the water supply period is 94.03%, which is slightly lower than the 96.75% guarantee rate during the water supply period for traditional linear binary algorithm scheduling. It shows that the overall adverse effect of optimized dispatch on the water supply of the reservoir is small.
(2) From the perspective of the minimum water supply inten- In general, the improved genetic algorithm optimization scheduling improves the minimum and average water supply intensity, which makes the water supply intensity change process more stable, thereby reducing the adverse impact of large fluctuations in water supply intensity on downstream production and life.

CONCLUSION
Aiming at the multiple objectives of optimal allocation of water resources, comprehensive consideration should be given to the objectives of optimal allocation of regional water resources such as water supply benefits, water shortage, and groundwater development. Meanwhile, water resource constraints are established. In terms of demand and water supply, a multi-objective water resource optimization configuration model has been established. What is more, the model solution problem is solved by real-coded multiple sets of genetic algorithms, and the obtained optimal configuration results verify the rationality of the built model. Due to the problem of premature convergence in traditional genetic algorithms, a multi-group genetic algorithm based on real number coding is proposed.
The use of real number coding effectively avoids the tedious coding and decoding process, can realize that each sub-population searches for the optimal solution at the same time, and prevents the penalty solution from exceeding the constraints given by the system. The algorithm reduces the influence of randomness of classical genetic algorithms and increases robustness. At present, the problem of water conservancy scheduling is limited to the two target mathematical models of data for a certain period of time and the current supply and demand, and the third target model for future demand has not been established. Therefore, how to efficiently solve the multi-objective optimization problem with more than two objectives and combine it with the optimal operation of reservoirs will be the difficulty and focus of future research.

DATA AVAILABILITY STATEMENT
All relevant data are included in the paper or its Supplementary Information.