Heuristic optimization method
Through the diversity initialization of adaptive distances and intimidation of predators and feather attack strategies, the problem of insufficient population initialization and global exploration in the existing technology is solved, and a more uniform population distribution and faster convergence speed are achieved.
Patent Information
- Application Number
- CN202411819233.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-06-03
AI Technical Summary
The existing population-based metaheuristic optimization methods have shortcomings in population initialization and global exploration, resulting in uneven distribution of individual positions, increasing the probability that the algorithm will fall into local optimality, and it is difficult to balance global exploration and local development when dealing with large-scale and high-dimensional problems.
The diversity initialization method of adaptive distance is used to initialize populations, and the dynamic distance measurement mechanism and weight allocation are used to ensure that individual distribution is more uniform. At the same time, a strategy of intimidating predator and a feather attack strategy are designed to balance local fine search with extensive global exploration, and dynamically adjust the optimal solution position to improve convergence speed.
Through the diversity initialization method of adaptive distance, the diversity and distribution uniformity of populations are improved, and the risk of early maturity convergence is reduced. The intimidation of predators and feathered attack strategies effectively balance exploration and utilization, and improve the quality of the algorithm's convergence speed reconciliation.
Smart Images

Figure CN120087457A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pattern recognition and image processing, and more particularly, to a heuristic optimization method. Background Art
[0002] Optimization techniques play a crucial role in the field of artificial intelligence. Traditional optimization methods, such as gradient descent method, Newton's method, linear programming, nonlinear programming, and constrained optimization, etc., have been widely applied in many key application fields such as machine learning, data mining, energy prediction and management, communication and network. However, these traditional methods still have some drawbacks. For example, they usually require the objective function and constraints to be convex functions, are highly sensitive to the initial values, and may have a high computational complexity. In particular, Newton's method requires the calculation of the Hessian matrix. In addition, these methods may have a slow convergence rate in some cases, cannot guarantee to find the global optimal solution for non-convex problems, and complex constraints may make the solution process more difficult. Many traditional algorithms have strict requirements on the smoothness and differentiability of the objective function. Therefore, when dealing with complex optimization problems, traditional methods may not meet the actual needs, which has promoted the attention and application of emerging optimization methods. In recent years, meta-heuristic optimization methods have gradually become the first choice for practical engineering optimization problems due to their advantages such as being insensitive to initial conditions, simple to implement, strong global search ability, high parallelism, and suitability for dynamic environments.
[0003] Metaheuristic optimization methods are a class of algorithms based on natural inspiration or intelligent mechanisms for solving complex optimization problems. Their core idea is to explore the solution space by simulating certain phenomena in nature (such as biological evolution, swarm behavior, ecosystem, etc.) to find approximate optimal solutions. Existing metaheuristic optimization methods can be divided into two categories: single-based optimization methods and population-based optimization methods. Single-based optimization methods such as genetic algorithms and simulated annealing algorithms are usually local search and have a slow convergence rate. In contrast, population-based optimization methods can explore the solution space through a set of multiple solutions, enhancing the global search ability of the algorithm. Population-based metaheuristic optimization methods can be further divided into: algorithms based on interactions between populations (Swarm Intelligence, SIA), algorithms based on simulating physical and chemical principles (Physics-based, PA), optimization methods based on following the evolutionary process (Evolutionary, EA), and optimization methods based on human daily life behavior (Human-based, HA). Among them, optimization methods based on population interactions (such as particle swarm optimization and ant colony algorithm) show significant advantages compared to other optimization methods. These methods are inspired by the swarm behavior of animals in nature, emphasizing the interaction and cooperation between individuals to achieve an efficient optimization process. These methods are naturally suitable for parallel computing, can make full use of computing resources, and improve the solution efficiency. Secondly, they can dynamically adjust the cooperation and competition mechanisms between individuals during the search process to adapt to nonlinear, discrete, and dynamic problems, showing wide applicability. Finally, these algorithms are usually relatively simple to implement, have a clear structure, and require fewer parameter settings, making them more convenient in practical applications.
[0004] However, there are still some deficiencies in the existing group-based meta-heuristic optimization methods. For example, the document with the application number "CN202011631340" discloses "A method for optimizing the scheduling of a multi-energy power system based on the parrot algorithm". Its technical solution is based on the parrot algorithm, introducing an adaptive weight and a learning factor to enhance its global learning and search capabilities. The optimization process includes two stages: exploration and exploitation. The existing problems are as follows: In the population initialization stage of the parrot algorithm, pseudo-random numbers are usually used to obtain the initial population, which may lead to uneven distribution of the positions among individuals within the cluster, that is, there are situations where the positions of some individuals are too concentrated or too scattered, which will greatly increase the probability of the algorithm falling into a local optimum subsequently. When dealing with large-scale and high-dimensional problems, the parrot algorithm often has difficulty effectively balancing global exploration and local exploitation. When the algorithm focuses too much on local exploitation and ignores global exploration, it may stagnate near the local optimum solution in the search space, thus failing to find the global optimum solution. If the global exploration is insufficient, it may not be able to cover the complex structure of the problem, resulting in a slow convergence speed and poor solution quality. The search strategy lacks the guidance of the optimum solution or high-quality solutions, and the random aggregation of the population increases the risk of prematurely falling into the local optimum solution. At the same time, excessive exploration of some regions will also lead to waste of computing resources. Summary of the Invention
[0005] To solve at least one of the above technical problems, the present invention proposes a heuristic optimization method to solve the problems in the background technology.
[0006] The first aspect of the present invention provides a heuristic optimization method, including the following steps:
[0007] S1. Initialize the population based on the diversity initialization method based on adaptive distance;
[0008] S2. Set the search evaluation criterion and compare the current iteration number t with the maximum iteration number T;
[0009] S3. If the current iteration number t is less than the maximum iteration number T, enter the search stage and determine whether the current random number rand ∈ (0, 1] is less than 0.5;
[0010] If the current random number rand is less than 0.5, execute the group foraging strategy to obtain the candidate solution position;
[0011] If the current random number rand is greater than or equal to 0.5, execute the intimidate predator strategy to obtain the candidate solution position;
[0012] S4. If the current iteration number t is greater than or equal to the maximum iteration number T, output the position where the optimum solution is located;
[0013] S5. Enter the exploitation stage and determine whether the current random number rand ∈ (0, 1] is less than 0.5;
[0014] If the current random number rand is less than 0.5, execute the group hunting strategy to obtain the candidate solution position;
[0015] If the current random number rand is greater than or equal to 0.5, execute the wing attack strategy to obtain the candidate solution position;
[0016] S6. Set the optimal solution update mechanism to dynamically adjust the optimal solution position;
[0017] S7. Let the current iteration number t = t + 1, and return to step S3 until the position where the optimal solution is output.
[0018] In a preferred embodiment of the present invention, in step S1, the population is initialized based on the diversity initialization method based on the adaptive distance, and the specific process is as follows:
[0019] Set the maximum number of the population to N (N≥1), and set the search space D as an n-dimensional cube, where the range of each dimension is:
[0020] D = [l 1 , u 1 × [l 2 , u 2 ×... × [l n , u n
[0021] In the formula, u i and l i are respectively the upper limit and the lower limit of the i-th dimensional search space;
[0022] Set the individual set as S = {x 1} For each subsequent individual x i (i = 2, 3, 4,... N), perform the following steps in sequence:
[0023] First, calculate the distribution of the current population. For the selected individual set S, calculate the minimum distance d min (x i ) between each individual and the selected individuals. The formula is as follows:
[0024]
[0025] When generating a new individual, update the weight ω j based on the distribution of the current population S. This weight can dynamically adjust the distance metric based on the standard deviation of the current population. The formula is as follows:
[0026]
[0027] In the formula, std jis the standard deviation of the j-th dimension, reflecting the degree of variation in this dimension;
[0028] Select the individual with the largest difference in the minimum distance from the selected individuals in the search space;
[0029]
[0030] In the formula, x` j represents the currently selected individual, and d adapt represents the adaptive distance;
[0031] Repeat the above steps until N individuals are generated to obtain a new initial population X.
[0032] In a preferred embodiment of the present invention, the update formula for the subsequent candidate solution position in the group foraging strategy in step S3 is as follows:
[0033]
[0034] In the formula, represents the i-th candidate solution in the current population, q represents the number of 10 - N red-billed blue magpies randomly selected from the population, and m represents the m-th individual randomly selected, represents the candidate solution randomly selected in the current iteration, and rand is a random number between (0, 1].
[0035] In a preferred embodiment of the present invention, the update formula for the subsequent candidate solution position in the intimidate predator strategy in step S3 is as follows:
[0036]
[0037] In the formula, is the position where the optimal solution is located in the current iterative calculation, describes the position of the predator at iteration time t, and σ is a random number conforming to the standard normal distribution.
[0038] In a preferred embodiment of the present invention, the update formula for the subsequent candidate solution position in the group hunting strategy in step S5 is as follows:
[0039]
[0040] In the formula, t represents the current iteration number, and T represents the maximum iteration number.
[0041] In a preferred embodiment of the present invention, the update formula for the subsequent candidate solution position in the wing attack strategy in step S5 is as follows:
[0042]
[0043] In the formula, α is the convergence factor, which determines the speed of convergence, δ is the search factor, which controls the search direction, and γ represents the defense factor in the behavior strategy. is the average force affecting the i-th individual, which is obtained from the law of inelastic collision.
[0044] In a preferred embodiment of the present invention, the value range of the convergence factor α is 0 - 1.
[0045] In a preferred embodiment of the present invention, the search factor δ, the defense factor γ, and the average force are calculated as follows:
[0046]
[0047]
[0048] In the formula, is the mass of the i-th individual, f(x) is the objective function, represents the initial velocity of the i-th individual at the t-th iteration, νi t+1 represents the final velocity of the i-th individual at the (t + 1)-th iteration.
[0049] In a preferred embodiment of the present invention, in step S6, an optimal solution update mechanism is set to dynamically adjust the position of the optimal solution. The position update formula of the optimal solution is as follows:
[0050]
[0051] In the formula, represents the position where the optimal solution is located, and respectively represent the fitness values corresponding to the optimal solution in the previous iteration calculation and the current iteration calculation.
[0052] Compared with the prior art, the beneficial technical effects obtained by the present invention are:
[0053] (1) The present invention designs a diversity initialization method with adaptive distance and applies it to the initialization of the initial population. A dynamic distance measurement mechanism is introduced to dynamically adjust the distance between individuals in the population through weight allocation, so as to ensure that the newly generated individuals are not concentrated in a specific area and enhance the diversity among individuals. This method effectively avoids the defect that individuals gather in certain areas in traditional uniform random initialization and promotes the uniform distribution of the population. By increasing the probability of new individuals appearing in the under-explored area, this method significantly improves the search efficiency, shortens the optimization time, and its strong adaptability enables the algorithm to dynamically adjust according to the population state and better cope with different types of practical optimization problems. In contrast, the traditional initialization method based on random distribution lacks this flexibility, is prone to bias towards local optimal solutions, and results in the defect of premature convergence. In addition, by calculating the distance between individuals, this method can effectively avoid generating new individuals that are too similar to the selected individuals, thus improving the resource utilization efficiency. Generally speaking, the diversity initialization with adaptive distance provides a more robust and uniform initial population for the entire optimization process.
[0054] (2) The present invention designs a strategy of intimidating predators in the global exploration stage to balance the local fine search and the global extensive exploration of the algorithm. On the one hand, when the current solution is close to the worst solution so far, the algorithm will conduct more detailed exploration in the local area between the two to effectively discover and utilize potential improvement directions. By analyzing the gap between the worst solution and the current solution, the algorithm can identify the improvement path, thus moving towards the optimization goal more quickly and accelerating the convergence speed. In addition, this detailed exploration helps the algorithm adapt to the specific environment and characteristics of the current solution, use the "opposite" information of the worst solution for adjustment, and enhance the flexibility of the search strategy to find a suitable optimization path in different solution spaces. On the other hand, when the current solution is far from the worst solution, the algorithm will encourage more extensive exploration to identify the unvisited solution space and discover new potential high-quality solutions. This stage emphasizes the exploration of unknown areas and enhances the diversity and breadth of global search. Generally speaking, this search strategy successfully finds a balance between exploration (discovering new solutions) and exploitation (improving existing solutions) through detailed exploration between the worst solution and the current solution, enabling the algorithm to deeply optimize in the local area while maintaining attention to the entire solution space, thereby improving the overall convergence speed.
[0055] (3) In the local development stage of the optimization method of the present invention, a wing attack strategy is designed. The aim is to guide the current iterative calculation result away from the worst solution by utilizing the optimal solution obtained so far, so as to focus the development on the vicinity of the best solution discovered, accelerate the convergence to a better solution, and concentrate on searching the area near the optimal solution. This strategy can more effectively identify and utilize local features, enabling the algorithm to rapidly improve the quality of the solution through minor adjustments. As the algorithm iteratively progresses, the optimal solution will be gradually updated, and the direction and scope of local search will also be adjusted accordingly. This dynamic feedback mechanism prompts the algorithm to continuously optimize, accelerate the convergence process, reduce unnecessary calculations, improve resource utilization efficiency, and focus on developing the most potential solutions. In addition, the present invention also introduces a convergence factor α to dynamically adjust the convergence speed of the algorithm, and the value range of this parameter is from 0 to 1. Using a larger convergence factor can quickly approach the best solution, while when approaching the optimal solution, gradually reduce the convergence factor for more detailed exploration. By adjusting the convergence factor, the algorithm effectively avoids falling into local optima during the initial search, ensures an appropriate exploration amplitude in the solution space until approaching the global optimal solution. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 is the overall flowchart of a heuristic optimization method of the present invention;
[0057] Figure 2 is the comparison graph of the convergence curves of various meta-heuristic optimization methods on the IEEE CEC2017 open benchmark dataset in the embodiment of the present invention;
[0058] Figure 3 is the comparison scatter plot of the predicted and actual power output of a wind power generation system in the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0059] In order to more clearly understand the above objects, features and advantages of the present invention, the present invention will be further described in detail below in conjunction with the drawings and specific embodiments. It should be noted that, without conflict, the embodiments of the present application and the features in the embodiments can be combined with each other.
[0060] In the following description, many specific details are set forth in order to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Therefore, the protection scope of the present invention is not limited by the specific embodiments disclosed below.
[0061] Please refer to Figure 1As shown in the figure, the present invention initializes the population by using a diversity initialization method with an adaptive distance; secondly, it determines whether the current iteration number t is less than the maximum iteration number T. If t < T is satisfied, two behavioral strategies in the exploration stage are executed to obtain the position where the candidate solution is located. It is judged whether the current random number rand is less than 0.5. If rand < 0.5 is satisfied, the group foraging strategy is executed to obtain the position where the candidate solution is located. Otherwise, the intimidate predator strategy is executed to obtain the position where the candidate solution is located; after obtaining the candidate solution position, it enters the exploitation stage. It is again judged whether the current random number rand is less than 0.5. If rand < 0.5 is satisfied, the group hunting strategy is executed to obtain the position where the candidate solution is located. Otherwise, the wing attack strategy is executed to obtain the position where the candidate solution is located; subsequently, it is judged the fitness value fitnessiold of the optimal solution obtained in the previous iteration calculation and the optimal solution fitnessinew obtained in the current iteration calculation. If fitnessiold > fitnessinew, the optimal solution is the one obtained in the previous iteration calculation. Otherwise, the optimal solution is replaced with the one obtained in the current iteration calculation; finally, let t = t + 1 until t < T is not satisfied, and output the position of the optimal solution obtained so far.
[0062] Example: Refer to Figure 1 , the present invention provides a metaheuristic optimization method, which specifically includes the following steps: S1. Design a diversity initialization method with an adaptive distance for population initialization.
[0063] In this step, the present invention designs a diversity initialization method with an adaptive distance and applies it to the early population initialization to avoid individual aggregation and obtain an initialized population with a uniform distribution.
[0064] The steps specifically include: setting the initialized population size as N and the maximum iteration number T. In this embodiment, the population quantity N is set to 30, the maximum iteration number T is set to 500, setting the search space D as an n-dimensional cube, and the dimension n is set to 30 dimensions, where the range of each dimension is:
[0065] D = [l 1 , u 1 × [l 2 , u 2 × … × [l n , u n (1)
[0066] In the formula, u i and l i are respectively the upper limit and the lower limit of the i-th dimensional search space;
[0067] Set the individual set as S = {x1}, and for each subsequent individual xi (i = 2, 3, 4, … N), the following steps are sequentially executed:
[0068] Set the individual set as S = {x 1}, for each subsequent individual x i (i = 2, 3, 4,... N), perform the following steps in sequence:
[0069] First, calculate the distribution of the current population. For the selected individual set S, calculate the minimum distance d min (x i ) between each individual and the selected individuals. The formula is as follows:
[0070]
[0071] Secondly, when generating new individuals, update the weight ω based on the distribution of the current population S j . This weight can dynamically adjust the distance metric based on the standard deviation of the current population. The formula is as follows:
[0072]
[0073] In the formula, std j is the standard deviation of the j-th dimension, reflecting the degree of variation in this dimension.
[0074] Subsequently, select the individual with the largest difference in the minimum distance from the selected individuals in the search space:
[0075]
[0076] In the formula, x` j represents the currently selected individual, and d adapt represents the adaptive distance.
[0077] Finally, repeat the above steps until N individuals are generated to obtain a new initial population X.
[0078] The present invention improves the diversity of the initial population and enhances the global search ability of the optimization algorithm by introducing a dynamic metric mechanism. The adaptive distance initialization ensures that the newly generated individuals will not be concentrated in a specific area by dynamically adjusting the distance metric, ensuring a more uniform distribution of individuals, thereby reducing the risk of premature convergence. By calculating the distance, it can effectively avoid generating new individuals that are too similar to the selected individuals, thus improving the utilization efficiency of resources.
[0079] Set the search evaluation criterion. The steps of the search evaluation criterion include: comparing the current iteration number t with the maximum iteration number T. Compare the current iteration number t with the maximum iteration number T:
[0080] If the current iteration number t is less than the maximum iteration number T, then enter the search phase and determine whether the current random number rand ∈ (0, 1] is less than 0.5
[0081] If the condition that the current iteration number t is less than the maximum iteration number T is not satisfied, then output the position of the optimal solution obtained so far; enter the search phase and compare whether the current random number rand ∈ (0, 1] is less than 0.5:
[0082] If the current random number rand ∈ (0, 1] satisfies being less than 0.5, then execute the group foraging strategy:
[0083] During the foraging process, red-billed blue magpies will cooperate in groups (more than 10) to forage. They share information with each other through calls and body movements. When one bird discovers food, it will attract other birds. During the foraging process, red-billed blue magpies will show a certain role division. Some focus on finding food, while others are responsible for guarding the surrounding environment to prevent attacks by predators. In addition, red-billed blue magpies conduct social interactions during foraging, enhancing group cohesion, and show a certain food sharing behavior, which not only improves foraging efficiency but also enhances the safety of the group. The update of the subsequent candidate solution position Yit+1 in this behavioral strategy is shown in formula (5):
[0084]
[0085] In the formula, represents the i-th candidate solution in the current population, q represents the number of 10 - N red-billed blue magpies randomly selected from the population, m represents the m-th individual randomly selected, represents the candidate solution randomly selected in the current iteration, and rand is a random number between (0, 1].
[0086] If the current random number rand ∈ (0, 1] does not satisfy being less than 0.5, then execute the predator intimidation strategy:
[0087] The red-billed blue magpie spreads its wings to increase its body size, thus demonstrating an effective self-defense mechanism. This behavior belongs to a visual intimidation strategy. By leveraging the geometric properties and bright colors of its broad wings, the red-billed blue magpie generates strong visual signals, making it appear larger and more threatening to predators. In this situation, the predator has two options: one is to continue moving towards the red-billed blue magpie, and the other is to choose to move away. In the first option, the distance between the predator and the red-billed blue magpie shortens, which prompts the algorithm to effectively explore the area between the predator (the worst solution) and the red-billed blue magpie (the current solution), thereby accelerating the convergence speed. On the contrary, in the second option, the predator moves away from the red-billed blue magpie, and the distance between them continues to increase. At this time, the algorithm encourages the exploration of farther areas to identify unvisited solution spaces. This exploration strategy emphasizes the development of unknown areas and can help the algorithm discover new potential high-quality solutions, thereby enhancing the diversity and breadth of the overall search. To mathematically simulate these two options, the present invention uses the normal distribution to generate random values. When these random values are less than 1 or greater than -1, the predator will approach the red-billed blue magpie; otherwise, the predator will choose to move away. The update of the subsequent candidate solution position in this behavioral strategy is shown in Equation (6):
[0088]
[0089] where, is the position of the optimal solution in the current iterative calculation, describes the position of the predator at iteration time t, and σ is a random number conforming to the standard normal distribution.
[0090] Enter the exploitation stage. Compare whether the current random number rand ∈ (0, 1] is less than 0.5:
[0091] If the current random number rand ∈ (0, 1] satisfies being less than 0.5, then execute the group hunting strategy:
[0092] The red-billed blue magpies demonstrate excellent abilities and teamwork spirit during hunting. They adopt various strategies, including quickly pecking, jumping to catch small prey, and flying in the air to catch insects. The red-billed blue magpies use visual signals to remind each other through efficient communication and coordination, thereby increasing the hunting success rate. When they act in a group, they can jointly target larger prey, such as large insects or small vertebrates. In group hunting, the cooperation between individuals is crucial. Each bird plays a different role, responsible for alerting or guiding the prey, so that the entire team can more effectively capture the target. The update of the subsequent candidate solution position in this behavioral strategy is shown in Equation (7):
[0093]
[0094] Where t represents the current iteration number and T represents the maximum iteration number.
[0095] The method of the present invention is inspired by the collaborative hunting habits of red-billed blue magpies. By introducing the hunting roles of different individuals, it can maintain the diversity of solutions, which helps the algorithm discover novel solutions and potential high-quality solutions. At the same time, collective collaboration accelerates the convergence to the optimal solution, reduces the number of iterations, and further improves the algorithm efficiency. Secondly, the interaction and information sharing among individuals enhance the robustness of the algorithm and reduce the sensitivity to the initial conditions. In summary, these advantages make the optimization algorithm based on the red-billed blue magpie's group hunting strategy perform more excellently when dealing with complex problems.
[0096] If the current random number rand ∈ (0, 1] is not less than 0.5, the wing attack strategy is executed:
[0097] When the red-billed blue magpie detects a predator approaching, it will show a high degree of alertness and continuously move towards the position of the optimal individual in the population. If the predator continues to approach, the red-billed blue magpie will quickly change its strategy and prepare to take a more active defense. Once the predator enters the attack range, the red-billed blue magpie will quickly launch a charge and use the power of its body weight and wings to attack the predator. This attack is often fast and short-lived, similar to an inelastic collision, aiming to cause fright and confusion rather than causing substantial harm. The subsequent candidate solution position is updated as shown in formula (8):
[0098]
[0099] In the formula, α is the convergence factor, and its value ranges from 0 to 1. It determines the speed of convergence. The larger the value, the faster the convergence speed. δ is the search factor, which controls the search direction and is calculated as shown in formula (9). γ represents the defense factor in this behavior strategy and is calculated as shown in formula (10). is the average force affecting the i-th individual, obtained from the law of inelastic collision, and its calculation is shown in formula (11):
[0100]
[0101]
[0102] In formula (11), is the mass of the i-th individual, f(x) is the objective function, represents the initial velocity of the i-th individual at iteration t, and vi t+1 represents the final velocity of the i-th individual at iteration t + 1.
[0103] The method of the present invention is inspired by the behavior of red-billed blue magpies in defending against predators, and a wing attack behavior strategy is designed. The main purpose of this strategy is to use the optimal solution obtained so far to guide the algorithm away from the worst solution and concentrate local development near the best solution, so as to concentrate resources on mining the most potential solutions. This method aims to achieve a faster and more accurate convergence speed and reduce unnecessary calculations.
[0104] Set an optimal solution update mechanism to dynamically adjust the position of the optimal solution. The position update of the optimal solution is shown in formula (12):
[0105]
[0106] In the formula, represents the position where the optimal solution is located, and represent the fitness values corresponding to the optimal solution in the previous iteration calculation and the current iteration calculation respectively. If the optimal solution is obtained from the previous iteration calculation, otherwise, the optimal solution is replaced with the one obtained from the current iteration calculation. During the optimization process, the optimal solution obtained in each iteration calculation will affect the positions of subsequent solutions, and this process will continue until the preset termination criterion is reached, and finally converge to obtain the optimal solution obtained so far.
[0107] Let the current iteration number t = t + 1, and return to step S3 until the position where the optimal solution is located is output.
[0108] Combine a metaheuristic optimization method of the present invention with an extreme learning machine and apply it to predict the power output of a real-world wind power generation system:
[0109] Operating conditions of the embodiment: Intel(R) Core(TM) i9-13900HX CPU with a running frequency of 2.20 GHz, 32 GB of RAM, and a 64-bit Windows 11 operating system, all implemented using Matlab 2023a.
[0110] First, the present invention uses the publicly available classical benchmark set "IEEE CEC2017" to verify the performance advantages of the method of the present invention in terms of convergence speed compared to existing advanced or mature optimization methods. The test benchmark functions include unimodal functions (F1), multimodal functions (F5), composite functions (F14), and hybrid power functions (F28). Then, in order to further verify the excellent performance of the method of the present invention, the present invention compares it with several other advanced or mature optimization methods, including: APO optimization method (2024), BKA optimization method (2024), HO optimization method (2024), SCSO optimization method (2023), DBO optimization method (2022), and WOA optimization method (2015). The four benchmark functions participating in the test are all configured to be 30-dimensional. Each benchmark function is executed 30 times. The maximum number of iterations T for each test is 500 times, and the initial population size N is set to 30.
[0111] Figure 2 Figure shows the comparison of the convergence speeds of different optimization methods on four different types of benchmark functions in the IEEE CEC2017 dataset. Figure 2 a shows the test results of the unimodal function (F1), which contains only one global optimal solution. Figure 2 b shows the test results of the multimodal test function (F5), which contains multiple local optimal solutions and is suitable for testing whether the exploration operator of the newly developed optimization method can effectively avoid getting trapped in local optima. Figure 2 c and Figure 2 d respectively show the test results of the composite function (F14) and the hybrid test function (F28). These two groups of functions are used to evaluate the optimization effect of the optimization method on complex and continuous problems. It can be intuitively seen that the method of the present invention (OURS) shows fast convergence on different test functions. This is due to the fact that the method of the present invention has a more robust and uniform initial population, effectively balancing local fine search and global extensive exploration, and making it more effective to avoid local optima and converge quickly to the optimal solution through strategies such as optimal solution guidance. Figure 2
[0112] To further extend the evaluation to real-world applications, the method of the present invention is combined with an Extreme Learning Machine (ELM) to establish a wind power system power output prediction model (OURS-ELM), so as to improve the prediction accuracy of the output power of wind power generation systems in the real world. Taking the real power generation data of a wind power station in a certain area of northwest China in March 2024 as the research object, the input variable factors for output power prediction include: wind speed (m / s) at 10m / 30m / 50m / 70m of the anemometer tower, wind speed at hub height (m / s), wind direction (°) at 10m / 30m / 50m / 70m of the anemometer tower, wind direction at hub height (°), temperature (°C), air pressure (hPa), humidity (%), and the sampling frequency is set to 15 minutes. The preprocessed dataset contains 41,664 data messages, which are divided into two categories, one for the training dataset to establish the model, and the other for the validation dataset to verify the model. The data in the validation set accounts for 0.2 of the entire dataset.
[0113] The accuracy of the prediction model is measured by the following four key performance indicators in this specific application example:
[0114] R-Square: The closer the value of R-Square is to 1, the higher the fitting degree of the model and the stronger the prediction ability.
[0115]
[0116] In the formula, P meas,i is the actual wind power output at time i, and P pred,i is the wind power output at time i. is the mean value of the wind power output, and N is the number of samples. MAE (Mean Absolute Error): MAE is used to measure the accuracy of the dataset. The smaller the MAE value, the higher the accuracy of the dataset.
[0117]
[0118] RMSE (Root Mean Square Error): RMSE is used to reflect the deviation degree between the model prediction value and the true value. The smaller the RMSE value, the smaller the deviation degree between the prediction value and the true value.
[0119]
[0120] MAPE (Mean Absolute Percentage Error): MAPE is used to measure the accuracy of the model prediction. The smaller the MAPE value, the higher the prediction accuracy of the model.
[0121]
[0122] Figure 3 The fitting curves and scatter plots of specific application examples in different prediction models are shown, intuitively reflecting the relationship between each prediction model and the power output of the wind power system. Especially in the regression graph of the OURS-ELM prediction model of the present invention, the R value is 0.86226, which is significantly closer to 1, showing the superiority and stronger robustness of this prediction model in data fitting.
[0123] Table 1 summarizes the evaluation index results of each prediction model on the validation set. Among them, the OURS-ELM prediction model of the present invention performs best in the R-Square index, showing the highest fitting degree between its predicted value and the true value and the strongest prediction ability. In addition, this model also shows the lowest values in the MAE, RMSE, and MAPE indexes, indicating that the deviation between its predicted value and the true value is the smallest. These results further confirm the importance of the present invention in improving the prediction accuracy of the output power of the wind power generation system.
[0124] Table 1
[0125]
[0126] The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed with each other can be through some interfaces. The indirect coupling or communication connection of the device or unit can be electrical, mechanical, or other forms.
[0127] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units; they can be located in one place or distributed to multiple network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0128] In addition, each functional unit in the embodiments of the present invention can be all integrated in one processing unit, or each unit can be separately used as a unit, or two or more units can be integrated in one unit; the above integrated units can be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.
[0129] As described above, it is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims described above.
Claims
1. A heuristic optimization method, characterized in that: The steps include: S1. Population initialization based on adaptive distance diversity initialization method; S2, set the search evaluation criteria and compare the current number of iterations t with the maximum number of iterations T; S3. If the current number of iterations t is less than the maximum number of iterations T, the search phase is entered to determine whether the current random number rand∈(0,1] is less than 0.5; If the current random number rand is less than 0.5, the group foraging strategy is executed to obtain the candidate solution position; If the current random number rand is greater than or equal to 0.5, the intimidation predator strategy is executed to obtain the candidate solution position; S4. If the current number of iterations t is greater than or equal to the maximum number of iterations T, the location of the optimal solution is output; S5, enter the development stage, determine whether the current random number rand∈(0,1] is less than 0.5; If the current random number rand is less than 0.5, the group hunting strategy is executed to obtain the candidate solution position; If the current random number rand is greater than or equal to 0.5, the wing attack strategy is executed to obtain the candidate solution position; S6. Setting an optimal solution update mechanism to dynamically adjust the optimal solution position; S7. Set the current number of iterations t=t+1, and return to step S3 until the location of the optimal solution is output.
2. The heuristic optimization method according to claim 1, characterized in that: In step S1, the population is initialized using a diversity initialization method based on adaptive distance, and the specific process is as follows: Set the maximum number of populations to N (N ≥ 1), and set the search space D to an n-dimensional cube, where the range of each dimension is: <h2 style=";text-align:left;direction:ltr">D=[l1,u1]×[l2,u2]×...×[l<h2 style=";text-align:left;direction:ltr"> n <h2 style=";text-align:left;direction:ltr"> ,u<h2 style=";text-align:left;direction:ltr"> n <h2 style=";text-align:left;direction:ltr"> ] In the formula, u i and l i are the upper and lower limits of the i-th dimension search space respectively; Assume that the individual set is S = {x1}, for each subsequent individual x i (i=2, 3, 4, ...N), perform the following steps in order: First, calculate the distribution of the current population. For the selected individual set S, calculate the minimum distance d between each individual and the selected individual. min (x i ), the formula is as follows: When generating new individuals, the weight ω is updated based on the distribution of the current population S. j , which can dynamically adjust the distance metric based on the standard deviation of the current population, as follows: In the formula, std j is the standard deviation of the jth dimension, reflecting the degree of variation in this dimension; Select the individual with the largest difference in minimum distance from the selected individual in the search space; In the formula, x` j Indicates the currently selected individual, d adapt represents adaptive distance; Repeat the above steps until N individuals are generated and a new initialized population X is obtained.
3. The heuristic optimization method according to claim 2, characterized in that: The subsequent candidate solution positions in the flock foraging strategy described in step S3 The update formula is as follows: In the formula, represents the i-th candidate solution in the current population, q represents the number of 10-N red-billed blue magpies randomly selected from the population, and m represents the m-th individual randomly selected. represents a randomly selected candidate solution in the current iteration, and rand is a random number between (0,1].
4. The heuristic optimization method according to claim 3, characterized in that: The subsequent candidate solution positions in the predator intimidation strategy described in step S3 The update formula is as follows: Where, X best t is the location of the optimal solution in the current iterative calculation, describes the location of the predator at iteration time t, and σ is a random number that conforms to the standard normal distribution.
5. The heuristic optimization method according to claim 4, characterized in that: The subsequent candidate solution positions in the group hunting strategy in step S5 The update formula is as follows: Where t represents the current number of iterations, and T represents the maximum number of iterations.
6. The heuristic optimization method according to claim 5, characterized in that: The subsequent candidate solution positions in the wing attack strategy in step S5 The update formula is as follows: In the formula, α is the convergence factor, which determines the speed of convergence, δ is the search factor, which controls the search direction, and γ represents the defense factor in the behavior strategy. is the average force affecting the ith individual, obtained from the law of inelastic collisions.
7. The heuristic optimization method according to claim 6, characterized in that: The value range of the convergence factor α is 0-1.
8. The heuristic optimization method according to claim 7, characterized in that: Search factor δ, defense factor γ, average force F i The calculation of t is as follows: In the formula, is the mass of the ith individual, f(x) is the objective function, represents the initial velocity of the i-th individual at iteration time t, νi t+1 represents the final velocity of the i-th individual at iteration t+1.
9. The heuristic optimization method according to claim 1, characterized in that: In step S6, the optimal solution update mechanism is set to dynamically adjust the optimal solution position. The optimal solution position update formula is as follows: In the formula, represents the location of the optimal solution, and They represent the fitness values corresponding to the optimal solutions in the previous iterative calculation and the current iterative calculation respectively.
Citation Information
Patent Citations
A method for optimal scheduling of multi-energy power systems based on the parrot algorithm
CN112580897B