Reservoir group flood control optimization scheduling method and system based on yin-yang firefly algorithm
The optimization of reservoir group flood control scheduling through the Yin-Yang Firefly algorithm solves the efficiency and effect limitations of traditional methods under high-dimensional, nonlinear and multi-constraints, and realizes a more efficient flood control scheduling strategy, which improves the algorithm's global search and deep learning capabilities.
Patent Information
- Application Number
- CN202411302201.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-07
AI Technical Summary
The efficiency and effectiveness of traditional reservoir scheduling methods are limited when facing high-dimensional, nonlinear and multi-constrained reservoir group flood control scheduling problems, making it difficult to find the optimal flood control scheduling strategy.
The reservoir group flood control optimization scheduling method based on the Yin-Yang Firefly algorithm is adopted. By constructing a flood control scheduling model, combining excellent node set strategies, random attraction search mode and Yin-Yang Firefly autonomous learning strategy, the population search process is optimized, and the ε processing technology is used to process constraints. Improve the algorithm's global search ability and deep learning ability.
It significantly improves the efficiency and effectiveness of flood control scheduling in the reservoir group, can find better solutions in a short time, avoid falling into local optimal dilemma, improves the algorithm exploration function and data mining capabilities, and obtains more effective flood control scheduling strategies.
Smart Images

Figure CN119273050A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of reservoir dispatching, and in particular to a method and system for optimizing flood control dispatching of a reservoir group based on a Yin-Yang firefly algorithm. Background Art
[0002] With the influence of climate change and human activities, extreme flood events occur frequently, which puts higher requirements on the flood control and dispatching of reservoir groups. The flood control and dispatching system of reservoir groups can effectively reduce flood disasters and flood losses through the regulation and storage between different reservoirs. However, the traditional reservoir dispatching problem has the characteristics of multi-constraints, high dimensions and nonlinearity, which makes it extremely difficult to solve the optimal dispatching strategy.
[0003] In the past few decades, researchers have actively explored a variety of technologies to solve reservoir operation problems, including traditional optimization methods and modern intelligent optimization algorithms. Although traditional optimization methods such as linear programming, dynamic programming and genetic algorithms have solved optimization problems to a certain extent, with the continuous expansion of the scale of reservoir groups and the increasing complexity of their structures, the efficiency and effectiveness of traditional methods have gradually been limited. Modern intelligent optimization algorithms such as particle swarm optimization (PSO), genetic algorithm (GA) and ant colony algorithm (ACO) have attracted widespread attention due to their superiority in solving complex problems, but their application in flood control operation of reservoir groups still has room for improvement.
[0004] The Yin-Yang Firefly Algorithm is an intelligent optimization algorithm based on natural phenomena that simulates the luminescence and movement of fireflies. Compared with the traditional firefly algorithm, the Yin-Yang Firefly Algorithm enhances population diversity and global search capabilities by introducing the concept of Yin-Yang. The algorithm can find a better solution in a shorter time by simulating the mutual attraction and repulsion between fireflies. Therefore, the Yin-Yang Firefly Algorithm shows significant potential in solving high-dimensional, nonlinear and multi-constrained flood control scheduling problems of reservoir groups.
[0005] Although some optimization solutions for flood control scheduling models have been proposed, with the expansion of the scale of reservoirs and the complexity of their structures, obtaining the optimal flood control scheduling strategy still faces great challenges. Therefore, further in-depth research on flood control scheduling models and new solution technologies to obtain more effective flood control scheduling strategies has become an urgent need. Summary of the invention
[0006] In view of the defects of the prior art, the present invention provides a reservoir group flood control optimization dispatching method and system based on the Yin-Yang Firefly Algorithm, which combines the global search capability of the Yin-Yang Firefly Algorithm with the actual needs of reservoir dispatching.
[0007] In order to achieve the above invention object, the technical solution adopted by the present invention is as follows:
[0008] A flood control optimization dispatching method for a reservoir group based on the Yin-Yang Firefly Algorithm, characterized by comprising the following steps:
[0009] Step 1: Construct a flood control dispatching model for a reservoir group and determine the objective function and constraints;
[0010] Step 2: Set the algorithm parameters: the maximum number of iterations T, the population size M, the number of autonomous learning times SL of the firefly algorithm, and the initial constraint violation degree ε(0);
[0011] Step 3: Use the excellent node set strategy to initialize the population, solve the fitness and violation of each individual in the initial population, and sort each firefly through the ε processing technology to obtain the optimal individual in the current population;
[0012] Step 4: An innovative random attraction search mode is adopted and applied to the initial population after the node set strategy is updated. Then, each firefly is sorted by the ε processing technique to obtain the best individual in the current population;
[0013] Step 5: Through the Yin-Yang firefly autonomous learning strategy, the optimal individuals in the population after random attraction are deeply mined for effective information. After the learning is completed, the ε processing technology is applied to sort each firefly to obtain the optimal individual in the current population;
[0014] Step 6: Determine whether the model has reached the maximum number of iterations. If so, output the global optimal solution and its fitness in the firefly population. Otherwise, repeat steps 3-5 until the preset maximum number of iterations is reached.
[0015] Step 7: The optimal solution finally obtained corresponds to the flood discharge process after the optimized scheduling solution. Furthermore, the objective function in step 1 is as follows:
[0016] F=min(ω1*V1'+ω2*V′2+ω3*V′3+ω4*Q')
[0017] Where: V1', V'2 and V'3 represent the normalized maximum storage capacity of the three reservoirs after flood control operation; Q' is the peak flow of the downstream control point; ω1, ω2, ω3 and ω4 are the weight factors of each target. In order to eliminate the influence of different units, the original values are normalized by the following formula:
[0018]
[0019] Where: V i represents the maximum storage capacity of the i-th reservoir during the dispatch period; V z,i is the total flood control capacity of the i-th reservoir; V l,iis the storage capacity corresponding to the flood control limit water level during the i-th reservoir operation process; Q is the peak flow at the downstream control point during the operation period; Q max It indicates the maximum discharge flow of the downstream control point when no disaster occurs based on historical data;
[0020] Furthermore, the constraints in step 1 are as follows:
[0021] a. Water balance constraints
[0022] V t+1,i -V t,i =(Q t+1,i -q t+1,i )·△t
[0023] Where: V t+1,i is the storage capacity of the i-th reservoir at the end of the period; V t,i is the initial storage capacity of the i-th reservoir; Q t+1,i is the inflow of the i-th reservoir in period t; q t+1,i is the i-th discharge flow in the t-th period; Δt is the calculation step length.
[0024] b. Reservoir water level constraints
[0025] Z min,i ≤Z i ≤Z max,i (i=1,2,3)
[0026] Where: Z i is the water level of the reservoir during flood control operation; Z min,i is the flood limit water level; Z max,i It is to check the water level.
[0027] c. Downstream flow restriction
[0028] 0≤q i ≤q max,i (i=1,2,3)
[0029] Where: q i is the flow rate of the i-th reservoir; q max,i is the discharge capacity of the i-th reservoir at each time period.
[0030] d. Water level limit constraints
[0031] Z end,i =Z e,i (i=1,2,3)
[0032] Where: Z end,i , Z e,i They are the water level at the end of reservoir scheduling and the limit water level respectively.
[0033] Furthermore, the excellent node set strategy in step 3 performs population initialization according to the following formula:
[0034] x i =lb+P m (k)*(ub-lb)
[0035] Where: x i represents the generated initial population; lb is the lower bound of the decision variable; ub is the upper bound; the excellent node set P m (k) is generated by the following formula:
[0036] P m (k)={({r1*k},{r2*k},...,{r t *k}),l=1,2,...,m}
[0037] r i =2cos((2πi) / p),1≤i≤t
[0038] Where: r i is the smallest prime number satisfying p≥2t+3; {r t *k} is r i *The fractional part of k.
[0039] Furthermore, the ε processing technology in step 3 updates the sorting of the population according to the following formula: the fitness F(x) and constraint violation G(x) of the population generated by the excellent node set strategy are solved, where the constraint violation is defined as follows:
[0040]
[0041] Where: x is a d-dimensional vector, g i (x) is the i-th inequality constraint.
[0042] Furthermore, the acquisition of the current population x i The best individual in the population. Compare any two individuals x1 and x2 in the population using the following formula:
[0043]
[0044] Among them: The parameter ε is solved by the following formula:
[0045]
[0046] Where: t is the current iteration number.
[0047] Furthermore, the random attraction search mode in step 4 is introduced into the firefly algorithm, and the position update equation is as follows:
[0048] x id (t+1)=x id (t)+α(x jd (t)-x id (t))+β(t)w
[0049] Where: w is a random variable, the step factor β and the attraction α are updated by the following formula, and other parameters remain consistent with the original firefly algorithm.
[0050]
[0051] Where: α min is the minimum attraction, and the meanings of other parameters are consistent with the original firefly algorithm.
[0052] Furthermore, the Yin-Yang firefly autonomous learning strategy in step 5 uses the following formula to update the Yin-Yang firefly dimension by dimension:
[0053] x od =x pd +levy*(x r1d -x r2d )
[0054] Where: x od and x pd are the Yin and Yang of the dth dimension, levy represents the random number generated by Levy distribution, x r1d and x r2d are two fireflies randomly selected from the population.
[0055] The present invention also discloses a reservoir group flood control optimization dispatching system based on the Yin-Yang Firefly Algorithm, which can be used to implement the above-mentioned reservoir group flood control optimization dispatching method based on the Yin-Yang Firefly Algorithm, specifically, including:
[0056] Data Input Module: Collects and inputs basic data and historical flow data related to the reservoir, including reservoir capacity, downstream peak flow, flow restrictions and water level restrictions.
[0057] Model building module: Build a reservoir group flood control dispatch model based on the input data and define the objective function and constraints.
[0058] Algorithm parameter setting module: configure various parameters of the Yin-Yang Firefly Algorithm, including the maximum number of iterations, population size, number of autonomous learning times, and initial constraint violation degree.
[0059] Population initialization module: Generate the initial population according to the excellent node set strategy, calculate the fitness and violation of each individual, and use the constraint violation processing technology to sort the individuals to find the current optimal individual.
[0060] Fitness calculation and sorting module: evaluates the fitness of each individual in the population, calculates the constraint violation, sorts the individuals, and determines the current optimal individual.
[0061] Random attraction search module: introduces a random attraction search mode to update the position of the population, explores new solution space through random attraction strategy, and calculates and sorts the fitness of the updated population.
[0062] Autonomous learning strategy module: Apply the autonomous learning strategy in the Yin-Yang Firefly Algorithm to deeply mine the best individuals in the population, optimize individuals through dimension-by-dimensional updating and learning strategies, and sort the updated population to find new optimal individuals.
[0063] Iteration control module: manages the iteration process of the algorithm and checks whether the maximum number of iterations has been reached. If not, the population update and optimization process will continue; if reached, the algorithm will be terminated and the results will be output.
[0064] Output and analysis module: Output optimized flood control scheduling plan, analyze and generate reports, including the flood discharge process of each reservoir and the final reservoir water level.
[0065] The present invention also discloses a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the reservoir group flood control optimization scheduling method based on the Yin-Yang firefly algorithm is implemented.
[0066] The present invention also discloses a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the reservoir group flood control optimization scheduling method based on the Yin-Yang firefly algorithm is implemented.
[0067] Compared with the prior art, the advantages of the present invention are:
[0068] 1. The excellent node set strategy is used to initialize the position of the firefly algorithm population. The deviation generated by the excellent node set strategy is much smaller than the deviation of the initial population randomly generated by the original firefly algorithm, which affects the spatial characteristics of the search space, enables the population to obtain better information, and improves the representativeness of the data and the quality of the optimization solution;
[0069] 2. The random attraction search mode is used to replace the full attraction mode of the original firefly algorithm. As the number of populations and the number of iterations increase, this attraction mode consumes less computing resources than the full attraction mode, and more computing resources are used for the deep learning stage, improving the exploration function of the algorithm;
[0070] 3. Through the Yin-Yang Firefly autonomous learning strategy, a certain number of deep learning times are given, so that the algorithm can conduct deeper data mining for the optimal solution while exploring the search space, thereby improving the algorithm's development capabilities and avoiding falling into the local optimal dilemma;
[0071] 4. Use ε constraint processing technology to handle various constraints. By relaxing the constraints, make full use of the available information in the infeasible domain, and use effective comparison rules to relax and shrink to obtain the global optimal solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 It is a flow chart of the flood control optimization scheduling method of a reservoir group based on the Yin-Yang Firefly Algorithm.
[0073] Figure 2 Schematic diagram of point distribution generated by excellent node set strategy and random distribution in two-dimensional space according to an embodiment of the present invention, wherein (a) is the excellent node set strategy and (b) is the random distribution strategy. DETAILED DESCRIPTION
[0074] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and examples.
[0075] Firefly Algorithm (FA) is a classic and efficient swarm intelligence heuristic algorithm, which is inspired by the flashing behavior of fireflies. Compared with other algorithms, Firefly Algorithm has the advantages of simple structure and strong operability, so it is widely used in many fields to solve optimization problems.
[0076] In the search space, assuming the dimension is D, the position of each firefly represents a feasible solution, and its brightness reflects the fitness value of the optimization problem. Based on the characteristic that firefly i tends to move towards firefly j that is brighter than itself, its position update formula is as follows:
[0077] x id (t+1)=x id (t)+α(x jd (t)-x id (t))+β(t)w
[0078] Where: x id (t) and x jd (t) represents the d-th dimension position of the i-th and j-th fireflies at the t-th iteration, α represents the attraction, β(t) represents the step size of the t-th generation, and w is a random number uniformly distributed in the range of [-0.5, 0.5].
[0079] In the above formula, the step length β of the tth generation is calculated using the following formula:
[0080] β(t)=β0θ t
[0081] Where: β0-dimensional initial step size is 1; θ is [0.95, 0.99].
[0082] The brightness I, attraction α and distance r of firefly i to firefly j ij The calculation formula is as follows:
[0083]
[0084] Where: I0, α0 is r ij = brightness and attractiveness at 0; γ is usually 1.
[0085] Although the firefly algorithm has the advantages of simple structure and easy operation, it still has some limitations, such as being prone to falling into local optimality and reduced convergence ability in the later stages of iteration. In order to overcome the limitations of the algorithm, the present invention proposes a flood control optimization scheduling method for a reservoir group based on the Yin-Yang Firefly Algorithm (YYFA), such as Figure 1 As shown, the following steps are included:
[0086] Step 1: Construct a reservoir flood control operation model and determine the objective function and constraints.
[0087] For single reservoir scheduling, this method uses maximum peak shaving as the objective function; for a joint scheduling model consisting of multiple reservoirs and downstream control points, this method uses the maximum reserved storage capacity of the reservoir and the minimum peak flow of the downstream control point as the objective function; the constraints include water balance constraints, water level constraints, downstream flow constraints and water level limit constraints. Specifically, the objective function and constraints are as follows:
[0088] (1) Objective function
[0089] The objective function for the joint operation consisting of a reservoir group and downstream control points is as follows:
[0090] F=min(ω1*V1'+ω2*V′2+ω3*V′3+ω4*Q')
[0091] Where: V1', V'2 and V'3 represent the normalized maximum storage capacity of the three reservoirs after flood control operation; Q' is the peak flow of the downstream control point; ω1, ω2, ω3 and ω4 are the weight factors of each target. In order to eliminate the influence of different units, the original values are normalized by the following formula:
[0092]
[0093] Where: V i represents the maximum storage capacity of the i-th reservoir during the dispatch period; V z,i is the total flood control capacity of the i-th reservoir; V l,i is the storage capacity corresponding to the flood control limit water level during the i-th reservoir operation process; Q is the peak flow at the downstream control point during the operation period; Q max It indicates the maximum discharge flow of the downstream control point when no disaster occurs based on historical data;
[0094] (2) Constraints
[0095] a. Water balance constraints
[0096] V t+1,i -V t,i =(Q t+1,i -q t+1,i )·△t
[0097] Where: V t+1,i is the storage capacity of the i-th reservoir at the end of the period; V t,i is the initial storage capacity of the i-th reservoir; Q t+1,i is the inflow of the i-th reservoir in period t; q t+1,i is the i-th discharge flow in period t; Δt is the calculation step length.
[0098] b. Reservoir water level constraints
[0099] Z min,i ≤Z i ≤Z max,i (i=1,2,3)
[0100] Where: Z i is the water level of the reservoir during flood control operation; Z min,i is the flood limit water level; Z max,i It is to check the water level.
[0101] c. Downstream flow restriction
[0102] 0≤q i ≤q max,i (i=1,2,3)
[0103] Where: q i is the flow rate of the i-th reservoir; q max,i is the discharge capacity of the i-th reservoir at each time period.
[0104] d. Water level limit constraints
[0105] Z end,i =Z e,i (i=1,2,3)
[0106] Where: Z end,i , Ze,i They are the water level at the end of reservoir scheduling and the limit water level respectively.
[0107] Step 2: Set the algorithm parameters: maximum number of iterations T, population size M, number of autonomous learning times SL of the firefly algorithm, and initial constraint violation degree ε(0).
[0108] Step 3: Use the excellent node set strategy to initialize the population, solve the fitness and violation of each individual in the initial population, and sort each firefly through the ε processing technology to obtain the optimal individual in the current population.
[0109] Good Nodes Set (GNS) is a concept derived from number theory. The GNS initialization method aims to ensure that the initial population is evenly distributed in a broad search space and reliably locate good nodes for in-depth exploration in subsequent iterations. This helps to converge to the feasible domain quickly and stably in the later stages, while its accuracy is not limited by the spatial dimension. The following is the specific process of initializing the population using the good node set strategy:
[0110] x i =lb+P m (k)*(ub-lb)
[0111] Where: x i represents the generated initial population; lb is the lower bound of the decision variable; ub is the upper bound; the excellent node set P m (k) is generated by the following formula:
[0112] P m (k)={({r1*k},{r2*k},...,{r t *k}),l=1,2,...,m}
[0113] r i =2cos((2πi) / p),1≤i≤t
[0114] Where: r i is the smallest prime number satisfying p≥2t+3; {r t *k} is r i *The fractional part of k.
[0115] The fitness (objective function value) F(x) and constraint violation G(x) of the generated population are solved, where the constraint violation is defined as follows:
[0116]
[0117] Where: x is a d-dimensional vector, g i (x) is the i-th inequality constraint.
[0118] Further, from the current population x of YYFA i Select the best individual. Compare any two individuals x1 and x2 in the population using the following formula:
[0119]
[0120] Among them: The parameter ε is solved by the following formula:
[0121]
[0122] Where: t is the current iteration number.
[0123] Step 4: An innovative random attraction search mode is adopted and applied to the initial population after the excellent node set strategy is updated. Subsequently, each firefly is sorted by the ε processing technique to obtain the best individual in the current population.
[0124] The original firefly algorithm uses the full attraction mode to update the population evolution, that is, each firefly moves to the brighter fireflies in order of brightness. If there are M fireflies in the population, the maximum total number of moves required in each iteration is M*(M-1) / 2. This strategy wastes computing resources and is prone to oscillation when approaching the global optimal point. In order to improve the efficiency of computing resource utilization, an innovative random attraction mode is used to replace the full attraction mode.
[0125] In the random attraction mode of the Yin-Yang firefly algorithm, it is ensured that the brightness of individuals in the input population is arranged in order from strong to weak. During the movement of fireflies, it is hoped that the fireflies with weaker brightness will become brighter after moving towards brighter fireflies. Therefore, in the random attraction mode, all fireflies can maintain this trend, that is, they do not avoid the influence of fireflies with weaker brightness. Starting from the second firefly, each firefly will randomly select one from the fireflies with smaller serial numbers to move, and then and so on until the Mth firefly. This ensures that the total number of moves required for each iteration is M-1. As the number of fireflies and the number of iterations increase, this random attraction mode consumes less computing resources than the full attraction mode, allowing more computing resources to be used for the next step of the Yin-Yang firefly autonomous learning stage.
[0126] Therefore, the position update equation of the Yin-Yang fireflies is as follows:
[0127] x id (t+1)=x id (t)+α(x jd (t)-x id (t))+β(t)w
[0128] Where: the step factor β and the attraction α are updated by the following formula, and other parameters remain consistent with the original firefly algorithm.
[0129]
[0130] Where: α min is the minimum attraction, and the other parameters have the same meaning as above.
[0131] Step 5: Through the Yin-Yang firefly autonomous learning strategy, the optimal individuals in the population after random attraction are deeply mined for effective information. After the learning is completed, the ε processing technology is applied to sort each firefly to obtain the optimal individual in the current population.
[0132] After the Yin-Yang Firefly Algorithm is updated through random attraction search mode, it selects the firefly with the best fitness as the Yang Firefly and allocates a certain number of deep learning times to it. Then, a new firefly is randomly generated as the Yin Firefly, and in a single learning process, the Yin Firefly is updated dimension by dimension using the following formula.
[0133] x od =x pd +levy*(x r1d -x r2d )
[0134] Where: x od and x pd are the Yin and Yang of the dth dimension, levy represents the random number generated by Levy distribution, x r1d and x r2d are two fireflies randomly selected from the population.
[0135] After updating each dimension, the Yin firefly will calculate its fitness and violation, and use the ε processing technique to compare it with the Yang firefly. If the fitness and violation of the Yin firefly are poor, the next dimension will be updated. Once the exploration is successful, that is, the fitness and violation of the Yin firefly are better than the Yang firefly, the position of the Yin firefly will be assigned to the Yang firefly, realizing the "Yin and Yang complement each other".
[0136] Step 6: Determine whether the model has reached the maximum number of iterations. If so, output the global optimal solution and its fitness in the firefly population. Otherwise, repeat steps 3-5 until the preset maximum number of iterations is reached.
[0137] Step 7: The optimal solution finally obtained corresponds to the flood discharge process after optimized scheduling.
[0138] This embodiment selects a mixed reservoir group in a certain river basin and a downstream control point as a research example, and uses the Xin'anjiang model to forecast multiple flood processes. Specifically, the predicted flood duration is 144 hours, and the calculation period is 3 hours. The present invention aims to establish a flood control optimization scheduling model with the maximum reserved storage capacity of each reservoir and the minimum peak flow of the downstream control point as the objective function, such as Figure 1 As shown, the YYFA algorithm is used to solve it.
[0139] In terms of setting algorithm parameters, the number of groups M = 200, the maximum number of iterations T = 100000, and the initial constraint violation degree ε(0) = 100 are uniformly set; in the YYFA algorithm, the number of self-learning is set to 1000, α min =0.1, β0=0.5, γ=1.
[0140] By performing multiple solutions under the same conditions, the YYFA algorithm can not only efficiently find flood control scheduling solutions that meet the constraints, but also demonstrates efficient solution speed and stability when dealing with the highly complex problem of flood control scheduling of reservoir groups. In general, YYFA has fast calculation speed and high solution accuracy, and can better solve high-dimensional, nonlinear and strongly constrained scheduling problems, providing an effective method for optimizing flood control scheduling of reservoir groups.
[0141] In another embodiment of the present invention, a reservoir group flood control optimization dispatching system based on the Yin-Yang Firefly Algorithm is provided. The system can be used to implement the above-mentioned reservoir group flood control optimization dispatching method based on the Yin-Yang Firefly Algorithm, specifically including:
[0142] Data Input Module: Collects and inputs basic data and historical flow data related to the reservoir, including reservoir capacity, downstream peak flow, flow restrictions and water level restrictions.
[0143] Model building module: Build a reservoir group flood control dispatch model based on the input data and define the objective function and constraints.
[0144] Algorithm parameter setting module: configure various parameters of the Yin-Yang Firefly Algorithm, including the maximum number of iterations, population size, number of autonomous learning times, and initial constraint violation degree.
[0145] Population initialization module: Generate the initial population according to the excellent node set strategy, calculate the fitness and violation of each individual, and use the constraint violation processing technology to sort the individuals to find the current optimal individual.
[0146] Fitness calculation and sorting module: evaluates the fitness of each individual in the population, calculates the constraint violation, sorts the individuals, and determines the current optimal individual.
[0147] Random attraction search module: introduces a random attraction search mode to update the position of the population, explores new solution space through random attraction strategy, and calculates and sorts the fitness of the updated population.
[0148] Autonomous learning strategy module: Apply the autonomous learning strategy in the Yin-Yang Firefly Algorithm to deeply mine the best individuals in the population, optimize individuals through dimension-by-dimensional updating and learning strategies, and sort the updated population to find new optimal individuals.
[0149] Iteration control module: manages the iteration process of the algorithm and checks whether the maximum number of iterations has been reached. If not, the population update and optimization process will continue; if reached, the algorithm will be terminated and the results will be output.
[0150] Output and analysis module: Output optimized flood control scheduling plan, analyze and generate reports, including the flood discharge process of each reservoir and the final reservoir water level.
[0151] In another embodiment of the present invention, a terminal device is provided, the terminal device includes a processor and a memory, the memory is used to store a computer program, the computer program includes program instructions, and the processor is used to execute the program instructions stored in the computer storage medium. The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc., which are the computing core and control core of the terminal, which are suitable for implementing one or more instructions, and are specifically suitable for loading and executing one or more instructions to implement the corresponding method flow or corresponding functions; the processor described in the embodiment of the present invention can be used for the operation of the reservoir group flood control optimization scheduling method based on the Yin-Yang Firefly Algorithm.
[0152] In another embodiment of the present invention, a storage medium is provided, specifically a computer-readable storage medium (Memory), which is a memory device in a terminal device for storing programs and data. It is understandable that the computer-readable storage medium here can include both the built-in storage medium in the terminal device and the extended storage medium supported by the terminal device. The computer-readable storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space, and these instructions can be one or more computer programs (including program codes). It should be noted that the computer-readable storage medium here can be a high-speed RAM memory, or a non-volatile memory (non-volatile memory), such as at least one disk storage.
[0153] One or more instructions stored in a computer-readable storage medium can be loaded and executed by a processor to implement the corresponding steps of the reservoir group flood control optimization scheduling method based on the Yin-Yang firefly algorithm in the above-mentioned embodiment; one or more instructions in the computer-readable storage medium are loaded and executed by the processor.
[0154] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0155] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0156] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0158] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the implementation methods of the present invention, and should be understood that the protection scope of the present invention is not limited to such special statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A flood control optimization dispatching method for a reservoir group based on the Yin-Yang Firefly Algorithm, characterized in that: The steps include: Step 1: Construct a flood control dispatching model for a reservoir group and determine the objective function and constraints; Step 2: Set the algorithm parameters: the maximum number of iterations T, the population size M, the number of autonomous learning times SL of the firefly algorithm, and the initial constraint violation degree ε(0); Step 3: Use the excellent node set strategy to initialize the population, solve the fitness and violation of each individual in the initial population, and sort each firefly through the ε processing technology to obtain the optimal individual in the current population; Step 4: Adopt an innovative random attraction search mode and apply it to the initial population after the node set strategy is updated; Then, each firefly is sorted by ε processing technique to obtain the best individual in the current population; Step 5: Through the Yin-Yang firefly autonomous learning strategy, the optimal individuals in the population after random attraction are deeply mined for effective information. After the learning is completed, the ε processing technology is applied to sort each firefly to obtain the optimal individual in the current population; Step 6: Determine whether the model has reached the maximum number of iterations. If so, output the global optimal solution and its fitness in the firefly population. Otherwise, repeat steps 3-5 until the preset maximum number of iterations is reached. Step 7: The optimal solution finally obtained corresponds to the flood discharge process after optimized scheduling.
2. The method for optimizing flood control and dispatching of a reservoir group according to claim 1, characterized in that: The objective function in step 1 is as follows: F=min(ω1*V1'+ω2*V'2+ω3*V'3+ω4*Q') Where: V1', V'2 and V'3 represent the normalized maximum storage capacity of the three reservoirs after flood control operation; Q' is the peak flow of the downstream control point; ω1, ω2, ω3 and ω4 are the weight factors of each target. In order to eliminate the influence of different units, the original values are normalized by the following formula: Where: V i represents the maximum storage capacity of the i-th reservoir during the dispatch period; V z,i is the total flood control capacity of the i-th reservoir; V l,i is the storage capacity corresponding to the flood control limit water level during the i-th reservoir operation process; Q is the peak flow at the downstream control point during the operation period; Q max It indicates the maximum discharge flow of the downstream control point when no disaster occurs based on historical data.
3. The method for optimizing flood control and dispatching of a reservoir group according to claim 1, characterized in that: The constraints in step 1 are as follows: a. Water balance constraints V t+1,i -V t,i =(Q t+1,i -q t+1,i )·△t Where: V t+1,i is the storage capacity of the i-th reservoir at the end of the period; V t,i is the initial storage capacity of the i-th reservoir; Q t+1,i is the inflow of the i-th reservoir in period t; q t+1,i is the ith discharge flow rate in the tth period; Δt is the calculation step length; b. Reservoir water level constraints Z min,i ≤Z i ≤Z max,i (i=1,2,3) Where: Z i is the water level of the reservoir during flood control operation; Z min,i is the flood limit water level; Z max,i It is the check water level; c. Downstream flow restriction 0≤q i ≤q max,i (i=1,2,3) Where: q i is the flow rate of the i-th reservoir; q max,i is the discharge capacity of the i-th reservoir at each time period; d. Water level limit constraints WITH end,i =Z e,i (i=1,2,3) Where: Z end,i , Z e,i They are the water level at the end of reservoir scheduling and the limit water level respectively.
4. The method for optimizing flood control and dispatching of a reservoir group according to claim 1, characterized in that: The excellent node set strategy in step 3 is used to initialize the population according to the following formula: x i =lb+P m (k)*(ub-lb) Where x i represents the generated initial population; lb is the lower bound of the decision variable; ub is the upper bound; the excellent node set P m (k) is generated by the following formula: P m (k)={({r1*k},{r2*k},...,{r t *k}),l=1,2,...,m} r i =2cos((2πi) / p),1≤i≤t Where r i is the smallest prime number satisfying p≥2t+3; {r t *k} is r i *The fractional part of k.
5. The method for optimizing flood control and dispatching of a reservoir group according to claim 1, characterized in that: The ε processing technology in step 3 updates the sorting of the population according to the following formula: the fitness F(x) and constraint violation G(x) of the population generated by the excellent node set strategy are solved, where the constraint violation is defined as follows: Where x is a d-dimensional vector, g i (x) is the i-th inequality constraint.
6. The method for optimizing flood control and dispatching of a reservoir group according to claim 1, characterized in that: The current population x is obtained i The best individual in Compare any two individuals x1 and x2 in the population using the following formula: The parameter ε is solved by the following formula: Where t is the current iteration number.
7. The method for optimizing flood control and dispatching of a reservoir group according to claim 1, characterized in that: The random attraction search mode in step 4 is introduced into the firefly algorithm, and the position update equation is as follows: x id (t+1)=x id (t)+α(x jd (t)-x id (t))+β(t)w Where w is a random variable, the step size factor β and the attraction α are updated by the following formula, and other parameters are consistent with the original firefly algorithm; In the formula, α min is the minimum attraction, and the meanings of other parameters are consistent with the original firefly algorithm.
8. The method for optimizing flood control and dispatching of a reservoir group according to claim 1, characterized in that: The Yin-Yang Firefly autonomous learning strategy in step 5 uses the following formula to update the Yin-Yang Firefly dimension by dimension: x od =x pd +levy*(x r1d -x r2d ) Where x od and x pd are the Yin and Yang of the dth dimension, levy represents the random number generated by Levy distribution, x r1d and x r2d are two fireflies randomly selected from the population.
9. A reservoir group flood control optimization dispatching system based on Yin-Yang Firefly Algorithm, characterized by: The system can be used to implement the reservoir group flood control optimization dispatching method according to any one of claims 1 to 8, specifically including: Data Input Module: Collect and input basic data and historical flow data related to the reservoir, including reservoir capacity, downstream peak flow, flow restrictions and water level restrictions; Model building module: builds a reservoir group flood control dispatch model based on input data and defines the objective function and constraints; Algorithm parameter setting module: configure various parameters of the Yin-Yang Firefly Algorithm, including the maximum number of iterations, population size, number of autonomous learning times, and initial constraint violation degree; Population initialization module: Generates the initial population according to the excellent node set strategy, calculates the fitness and violation of each individual, and uses constraint violation processing technology to sort the individuals to find the current optimal individual; Fitness calculation and sorting module: evaluates the fitness of each individual in the population, calculates the constraint violation, sorts the individuals, and determines the current optimal individual; Random attraction search module: introduces random attraction search mode to update the position of the population, explores new solution space through random attraction strategy, and calculates and sorts the fitness of the updated population; Autonomous learning strategy module: Apply the autonomous learning strategy in the Yin-Yang Firefly Algorithm to deeply mine the best individuals in the population, optimize individuals through dimension-by-dimensional updating and learning strategies, and sort the updated population to find the new best individuals; Iteration control module: manages the iteration process of the algorithm and checks whether the maximum number of iterations has been reached; if not, the population update and optimization process continues; if reached, the algorithm is terminated and the results are output; Output and analysis module: Output optimized flood control scheduling plan, analyze and generate reports, including the flood discharge process of each reservoir and the final reservoir water level.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the method for optimizing flood control and scheduling of a reservoir group as described in one of claims 1 to 8 is implemented.