Emergency communication vehicle path planning method and device based on improved ant lion algorithm
By improving the ant lion algorithm, optimizing the path planning process and generating candidate paths, combining roulette and elite ant lion mechanism, the existing ant lion algorithm has solved the problem of slow convergence speed and insufficient accuracy in emergency communication vehicle path planning, and achieved fast and efficient path planning and high-precision convergence.
Patent Information
- Application Number
- CN202411731421.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-28
AI Technical Summary
The existing ant lion algorithm is prone to falling into local extreme values, has a slow convergence speed and insufficient convergence accuracy in emergency communication vehicle path planning, which limits its practical application effect in complex environments.
Improve the ant lion algorithm, optimize the path planning process, use the improved sine function to generate the initial position of the ant lion, and generate more candidate paths through interpolation calculations. Combining the roulette algorithm and the elite ant lion mechanism, dynamically update the ant lion position to improve fitness.
Accelerated path planning is realized, convergence speed and accuracy are improved, the overall optimal solution to the emergency communication vehicle path can be effectively found, and emergency response efficiency and path safety are improved.
Smart Images

Figure CN119533514A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of network communications, and in particular relates to a path planning method and device for an emergency communication vehicle based on an improved ant lion algorithm. Background Art
[0002] The path planning technology for emergency communication vehicles is an important basic technology to ensure its automatic navigation, safe driving and intelligence. This technology aims to find the optimal or near-optimal route from the starting point to the destination for emergency communication vehicles in complex traffic environments based on specific optimization goals and constraints. In recent years, the academic community has achieved remarkable results in the field of path planning and proposed a variety of methods, such as artificial potential field method, A algorithm, vector histogram method, fuzzy logic method, reinforcement learning method and deep learning method. However, these methods have limitations in practical applications. For example, the artificial potential field method performs poorly in environments with dense obstacles, the A algorithm is highly dependent on the selection of heuristic functions, and the deep learning method may lead to overfitting.
[0003] In recent years, the application of intelligent optimization algorithms in emergency communication vehicle path planning has attracted more and more attention. These algorithms, such as particle swarm optimization (PSO), ant colony algorithm (ACA) and artificial bee colony algorithm (ABC), have shown the potential to solve complex path planning problems by imitating phenomena in nature. Although these algorithms can effectively find optimal or near-optimal solutions, there are still some challenges, such as the particle swarm algorithm is prone to fall into local optimal solutions, the ant colony algorithm has slow convergence speed and insufficient global optimization ability, and the artificial bee colony algorithm has low search efficiency on high-dimensional problems.
[0004] In order to solve the shortcomings of existing algorithms, the Ant Lion Algorithm has certain advantages. It can search flexibly in a variety of complex environments. It can not only utilize the feedback mechanism of information, but also has the ability to find the best solution. However, the current Ant Lion Algorithm faces some challenges in the path planning of emergency communication vehicles, such as being prone to falling into local extreme values, slow convergence speed, and insufficient convergence accuracy. These problems limit its practical application effect in complex environments. Summary of the invention
[0005] The technical problem to be solved by the present invention is to address the above-mentioned deficiencies in the prior art and propose a method and device for emergency communication vehicle path planning based on an improved ant lion algorithm. The method can accelerate the completion of path planning and has high-precision convergence and fast convergence speed, thereby effectively finding the overall optimal solution for the emergency communication vehicle path.
[0006] In a first aspect, the present invention provides a path planning method for an emergency communication vehicle based on an improved ant lion algorithm, the method comprising the following steps:
[0007] Step S1: Obtain the starting position coordinates and target position coordinates of the emergency communication vehicle;
[0008] Step S2: setting a path connection between the starting position coordinates and the target position coordinates of the emergency communication vehicle to obtain a path node;
[0009] Step S3: Initializing the ant lion population based on the path nodes; and performing interpolation calculation on the path nodes to obtain interpolation nodes;
[0010] Step S4: Based on the initialized antlion population, randomly select a node from the interpolation nodes as an antlion position; and, according to the fitness value of the antlion position, select the antlion with the highest fitness value as the elite antlion;
[0011] Step S5: using the roulette algorithm of antlion fitness, select an antlion as the target antlion according to the position of the antlion;
[0012] Step S6: Record the trajectories of the ants randomly walking around the positions of the elite ant lion and the target ant lion to determine the positions of the ants;
[0013] Step S7: According to the fitness values of all ants, the position of the ant lion is updated to the position of the ant with a higher fitness value;
[0014] Step S8: updating the position of the elite ant lion according to the updated position of the ant lion;
[0015] Step S9: Determine whether the updated position of the elite ant lion meets the preset iteration
[0016] Generation convergence conditions:
[0017] If the pre-set iterative convergence condition is not met, steps S5 to S9 are repeated until the iterative convergence condition is met; if the pre-set iterative convergence condition is met, the position of the updated elite ant lion is used as the optimal emergency communication vehicle path to complete the emergency communication vehicle path planning based on the improved ant lion algorithm.
[0018] Furthermore, the fitness value of the initial position of the ant lion and the fitness value of the ant are both calculated according to the fitness function;
[0019] The fitness function is constructed based on the criteria of no obstacles and shortest path, and its function expression is as follows:
[0020] H = L*(1+b);
[0021] in,
[0022] H represents the fitness value, which is used to evaluate the quality of the current path solution;
[0023] L represents the path length, which is used to indicate the path length of the emergency communication vehicle from the starting point to the end point; b represents the penalty factor, which is used to indicate whether the path passes through obstacles;
[0024] The calculation formula of the path length L is as follows:
[0025]
[0026] Where n represents the number of interpolation points, x i is the horizontal coordinate of the i-th interpolation point, x i+1 is the horizontal coordinate of the i+1th interpolation point, y i is the ordinate of the i-th interpolation point, y i+1 is the ordinate of the i+1th interpolation point, i=0,1,2,...,n.
[0027] Furthermore, in step S3, the ant lion population is initialized based on the path nodes, which specifically includes the following steps:
[0028] Step A1: Set the number N and dimension D of the antlion population;
[0029] Step A2: Generate the initial position of the ant lion using the improved sine function;
[0030] The calculation formula for generating the initial position of the ant lion using the improved sine function is as follows:
[0031]
[0032] Among them, X n,d is the coordinate of the nth antlion in d-dimensional space; n = 1, 2, ..., N; d = 1, 2, ..., D; U limit is the upper limit; L limit is the lower limit;
[0033] rand(π) is a random number in the range [0, π];
[0034] Step A3: Initialize the ant lion population according to the initial position of the ant lion.
[0035] Furthermore, in step S3, interpolation calculation is performed on the path nodes to obtain interpolation nodes, which specifically includes the following steps:
[0036] Step B1: using a cubic spline interpolation method, interpolating the abscissa of the path node to obtain the abscissa of n interpolation points; and using a cubic spline interpolation method, interpolating the ordinate of the path node to obtain the ordinate of n interpolation points;
[0037] Step B2: Integrate the horizontal coordinates of the n interpolation points and the vertical coordinates of the n interpolation points to obtain the coordinates of the interpolation node, thereby forming a complete interpolation node.
[0038] Furthermore, the step S5 specifically includes the following steps:
[0039] Step S51: Calculate the fitness value F(j) of each ant lion according to the position of the ant lion;
[0040] The calculation formula of the antlion's fitness value F(j) is as follows:
[0041] F(j) = fitness function (antlion(t,j));
[0042] Step S52: Calculate the total fitness value F of the ant lions according to the fitness value F(j) of each ant lion total ;
[0043] The total fitness value F of the ant lion total The calculation formula is as follows:
[0044]
[0045] Step S53: According to the total fitness value F of the ant lion total , calculate the probability P(j) of each antlion being selected;
[0046] The probability P(j) of an antlion being selected is calculated as follows:
[0047] P(j)=F(j) / F total ;
[0048] Step S54: Calculate the cumulative probability C(j) of the antlion according to the probability P(j) of each antlion being selected;
[0049] The cumulative probability of an antlion is calculated as follows:
[0050]
[0051] Step S55: Select the target ant lion according to the random number r and the cumulative probability. The specific selection process is as follows:
[0052] Starting from the first antlion, if r is less than or equal to C(1), select the first antlion;
[0053] If r is greater than C(1) and less than or equal to C(2), select the second antlion;
[0054] And so on, until we find the jth antlion, such that:
[0055] C(j-1) <r≤C(j);
[0056] Then the jth antlion is determined as the target antlion.
[0057] Furthermore, the ant positions in step S6 are obtained through iteration, and the obtaining formula is as follows:
[0058] X(t)=[cumsum(2r(t1)-1),cumsum(2r(t2)-1,…,cumsum(2r(t) n-d )-1)];
[0059] In the formula, x(t) represents the position of the ant at the current time t; cumsum() represents the cumulative sum function; t represents the current number of iterations; nd represents the maximum number of iterations; r() represents the random function; t1, t2, …, t n-d Represents the indexes of the random numbers generated for the 1st, 2nd to ndth iterations respectively.
[0060] Furthermore, the step S6 further includes normalizing the positions of the ants, which specifically includes the following steps:
[0061]
[0062] In the formula,
[0063] represents the normalized position of the i-th dimension at the t-th iteration, a i and b i are the minimum and maximum values of the random moving step length of the i-th dimension variable, and are the minimum and maximum values of the random walk of the t-th iteration of the i-th dimension variable, respectively;
[0064] in, and The calculation of is based on the random number and the position of the antlion, specifically:
[0065] When the random number is less than 0.5,
[0066]
[0067] When the random number is greater than or equal to 0.5,
[0068]
[0069] is the position of the jth antlion at the tth iteration, and are the minimum and maximum values of the random walk of the tth iteration of the i-th dimension variable, c t and d tare the lower and upper bounds of all variables at the t-th iteration, respectively.
[0070] Furthermore, the ant positions in step S6 are obtained by walking around the elite ant lion and the target ant lion and updating them using an improved segmented equilibrium strategy;
[0071] The calculation formula of the ant position is as follows:
[0072]
[0073] Among them, w represents the weight, and the value of w is based on the ratio of the current number of iterations to the maximum number of iterations T p The values are as follows:
[0074] When T p >0.2, w=2;
[0075] When T p >0.5, w=3;
[0076] When T p >0.8, w=4;
[0077] represents the position of the i-th ant at the t-th iteration, The ant chooses the position of the antlion after random walk around the fitness roulette at the tth iteration, is the position of the ant after random walking around the elite ant lion at the tth iteration.
[0078] In a second aspect, the present invention provides an emergency communication vehicle path planning device based on an improved ant lion algorithm, the device comprising:
[0079] An acquisition unit, used to acquire the starting position coordinates and the target position coordinates of the emergency communication vehicle;
[0080] A setting unit, connected to the acquisition unit, for setting a path connection between the starting position coordinates and the target position coordinates of the emergency communication vehicle to obtain a path node;
[0081] An initialization unit, connected to the setting unit, for initializing the ant lion population based on the path nodes;
[0082] A calculation unit, connected to the setting unit, for performing interpolation calculation on the path nodes to obtain interpolation nodes;
[0083] A first selection unit is connected to the initialization unit and the calculation unit respectively, and is used to randomly select a node from the interpolation nodes as an antlion position based on the initialized antlion population;
[0084] A selection unit connected to the first selection unit, configured to select an ant lion with the highest fitness value as an elite ant lion according to the fitness values of the ant lion positions;
[0085] A second selection unit, connected to the selection unit, is used to use a roulette algorithm of antlion fitness to select an antlion as a target antlion according to the position of the antlion;
[0086] a recording unit connected to the second selection unit, and configured to record the trajectories of ants randomly walking around the positions of the elite ant lion and the target ant lion to determine the positions of the ants;
[0087] An updating unit, connected to the recording unit, for updating the position of the ant lion to the position of an ant with a higher fitness value according to the fitness values of all ants; and for updating the position of the elite ant lion according to the updated position of the ant lion;
[0088] A determination unit connected to the updating unit, and configured to determine whether the updated position of the elite ant lion satisfies a preset iterative convergence condition after the updating unit updates the position of the ant lion and the position of the elite ant lion;
[0089] The processing unit is connected to the determination unit and is used to use the updated position of the elite ant lion as the optimal emergency communication vehicle path when the determination unit determines that a preset iterative convergence condition is met, so as to complete the emergency communication vehicle path planning based on the improved ant lion algorithm.
[0090] Furthermore, the initialization unit includes:
[0091] The setting module is used to set the number N and dimension D of the antlion population;
[0092] A generating module, connected to the setting module, for generating an initial position of an ant lion using an improved sine function;
[0093] The calculation formula for generating the initial position of the ant lion using the improved sine function is as follows:
[0094]
[0095] Among them, X n,d is the coordinate of the nth antlion in d-dimensional space; n = 1, 2, ..., N; d = 1, 2, ..., D; U limit is the upper limit; L limit is the lower limit; rand(π) is a random number in the range [0, π];
[0096] The initialization module is connected to the generation module and is used to initialize the ant lion population according to the initial position of the ant lion.
[0097] The present invention adopts the improved ant lion algorithm (HALO), which has faster convergence speed and stronger global search capability than the standard ant lion algorithm (ALO). At the same time, the flexibility and adaptability of the algorithm are improved through adaptive mechanism and optimization parameter adjustment. The algorithm can accelerate the path planning process, achieve high-precision convergence, and quickly find the overall optimal solution for the emergency communication vehicle path. The specific beneficial effects are as follows:
[0098] 1. Improve response speed: Based on the improved ant lion algorithm, the present invention optimizes the path planning process, enables emergency communication vehicles to respond quickly to emergencies, and significantly improves emergency response efficiency.
[0099] 2. Enhanced flexibility of path selection: The present invention enables the algorithm to generate more candidate paths by performing interpolation calculations between path nodes, thereby enhancing the flexibility and adaptability of path selection.
[0100] 3. Optimize path safety: The present invention uses the improved ant lion algorithm to intelligently select and evaluate paths, which can effectively avoid obstacles and improve path safety, thereby reducing potential accident risks.
[0101] 4. Adaptability to complex environments: The present invention is optimized for dynamically changing traffic environments and can adjust path planning in real time to adapt to complex and changing traffic conditions.
[0102] 5. Improve the overall planning quality: The present invention adopts the elite ant lion mechanism, which enables the algorithm to focus on finding a better solution, thereby improving the optimality of the overall path and ensuring that the emergency communication vehicle chooses the best driving route when performing tasks.
[0103] 6. Reduce computing costs: The present invention reduces the required computing resources and time through efficient convergence speed and intelligent update mechanism, thereby improving the overall operating efficiency.
[0104] 7. Improve the quality of path optimization: The present invention optimizes the objective function to ensure that the planned path is not only the shortest path, but also takes into account safety and traffic efficiency.
[0105] 8. Reduce computational complexity: The heuristic rules designed in the present invention reduce computational complexity, so that a high convergence speed and accuracy can be maintained even in a high-dimensional search space.
[0106] 9. Improve user experience: The fast and efficient path planning results of the present invention provide operators with more reliable decision-making support, and improve the intelligence level and operational convenience of emergency communication vehicles. BRIEF DESCRIPTION OF THE DRAWINGS
[0107] Figure 1 Schematic diagram of a path planning method for an emergency communication vehicle based on an improved ant lion algorithm in an embodiment of the present invention;
[0108] Figure 2 A path diagram of an emergency communication vehicle under a general environment in an embodiment of the present invention;
[0109] Figure 3 is a convergence diagram of an emergency communication vehicle under a general environment in an embodiment of the present invention;
[0110] Figure 4 A path diagram of an emergency communication vehicle in a complex environment in an embodiment of the present invention;
[0111] Figure 5 It is a convergence diagram of an emergency communication vehicle in a complex environment in an embodiment of the present invention;
[0112] Figure 6 Schematic diagram of a path planning device for an emergency communication vehicle based on an improved ant lion algorithm in an embodiment of the present invention;
[0113] Among them, the figure marks are: 10, acquisition unit, 20, setting unit, 30, initialization unit, 40, calculation unit, 50, first selection unit, 60, selection unit, 70, second selection unit, 80, recording unit, 90, update unit, 100, determination unit, 110, processing unit. DETAILED DESCRIPTION
[0114] In order to enable those skilled in the art to better understand the technical solution of the present invention, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
[0115] It should be understood that the specific embodiments and drawings described herein are only used to explain the present invention rather than to limit the present invention.
[0116] It can be understood that, in the absence of conflict, the various embodiments of the present invention and the various features in the embodiments can be combined with each other.
[0117] It can be understood that, for the convenience of description, the drawings of the present invention only show the parts related to the present invention, while the parts irrelevant to the present invention are not shown in the drawings.
[0118] It can be understood that each unit and module involved in the embodiments of the present invention may correspond to only one physical structure, or may be composed of multiple physical structures, or multiple units and modules may be integrated into one physical structure.
[0119] It can be understood that, without conflict, the functions and steps marked in the flowcharts and block diagrams of the present invention may occur in an order different from that marked in the drawings.
[0120] It is understood that the flowcharts and block diagrams of the present invention illustrate the possible architectures, functions, and operations of the systems, devices, equipment, and methods according to the various embodiments of the present invention. Each box in the flowchart or block diagram may represent a unit, module, program segment, or code, which contains executable instructions for implementing the specified functions. Moreover, each box or combination of boxes in the block diagram and flowchart may be implemented by a hardware-based system that implements the specified functions, or may be implemented by a combination of hardware and computer instructions.
[0121] It can be understood that the units and modules involved in the embodiments of the present invention can be implemented by software or hardware. For example, the units and modules can be located in a processor.
[0122] Embodiment 1:
[0123] like Figure 1 As shown, this embodiment provides an emergency communication vehicle path planning method based on the improved ant lion algorithm. The emergency communication vehicle path planning method based on the improved ant lion algorithm is mainly used in emergency rescue and emergency event handling scenarios, such as natural disasters, public safety incidents, and large-scale event support. It can quickly and intelligently determine the optimal driving route for the emergency communication vehicle to ensure that the communication efficiency and response speed are improved at critical moments, and support effective emergency management and rescue operations. The method includes the following steps:
[0124] Step S1: Obtain the starting position coordinates and target position coordinates of the emergency communication vehicle.
[0125] The purpose of obtaining the starting position coordinates and the target position coordinates of the emergency communication vehicle is to simplify the problem when performing path planning. In practical applications, although it may involve coordinates in multi-dimensional space, in order to facilitate calculation and implementation, we simplify the starting position of the emergency communication vehicle to the starting point (x0, y0) and the end point (x m+1 ,y m+1 ). This allows for more efficient application of path planning algorithms to quickly find the optimal path from the start point to the end point, while taking into account obstacles and traffic conditions in the map.
[0126] Step S2: Setting a path connection between the starting position coordinates and the target position coordinates of the emergency communication vehicle to obtain a path node.
[0127] When implementing it, the following parameters should be preset: define the fitness function according to the specific environment, determine the number of path nodes m and the number of interpolation points n, set the starting point and end point of the emergency communication vehicle, specify the number of algorithm iterations T and the population size N. These parameters will help optimize the path planning process and ensure that the algorithm can run effectively according to the actual situation.
[0128] Data initialization and storage: Use the improved sine function to initialize the ant lion population, and the position of the ant lion is expressed as:
[0129]
[0130] X n,d represents the initial solution, n=1,2,,,N, d=1,2,,,D, U and L are the upper and lower limits of the solution respectively.
[0131] Initialize the position of the ant lion, and set the coordinates of each ant lion position as follows
[0132] [(x m1 ,x m2 ,...,x mm ),(y m1 ,y m2 ,...,y mm )],(x m1 ,y m1 ),(x m2 ,y m2 ),...,(x mm ,y mm ) are set as the coordinates of the m path nodes.
[0133] Step S3: Initializing the ant lion population based on the path nodes; and performing interpolation calculation on the path nodes to obtain interpolation nodes.
[0134] As a specific implementation, in step S3, the ant lion population is initialized based on the path nodes, which specifically includes the following steps:
[0135] Step A1: Set the number N and dimension D of the antlion population;
[0136] Step A2: Generate the initial position of the ant lion using the improved sine function;
[0137] The calculation formula for generating the initial position of the ant lion using the improved sine function is as follows:
[0138]
[0139] Among them, X n,d is the coordinate of the nth antlion in d-dimensional space; n = 1, 2, ..., N; d = 1, 2, ..., D; U limit is the upper limit; L limit is the lower limit;
[0140] rand(π) is a random number in the range [0, π];
[0141] Step A3: Initialize the ant lion population according to the initial position of the ant lion.
[0142] As a specific implementation, in step S3, interpolation calculation is performed on the path nodes to obtain interpolation nodes, which specifically includes the following steps:
[0143] Step B1: using a cubic spline interpolation method, interpolating the abscissa of the path node to obtain the abscissa of n interpolation points; and using a cubic spline interpolation method, interpolating the ordinate of the path node to obtain the ordinate of n interpolation points;
[0144] Step B2: Integrate the horizontal coordinates of the n interpolation points and the vertical coordinates of the n interpolation points to obtain the coordinates of the interpolation node, thereby forming a complete interpolation node.
[0145] Using the cubic spline interpolation method and the coordinates of each ant lion position (x m1 ,y m1 ),(x m2 ,y m2 ),...,(x mm ,y mm ), find the horizontal coordinates of n interpolation points (x1, x2, ..., x n ). Similarly, the ordinates of the n interpolation points (y1, y2, ..., y n ). At this point, we get the coordinates of n interpolation points (x1,y1),(x2,y2),...,(x m ,y n ). This is the initial solution of the antlion in the algorithm.
[0146] Step S4: Based on the initialized antlion population, randomly select a node from the interpolation node as the antlion position; and, according to the fitness value of the antlion position, select the antlion with the highest fitness value as the elite antlion.
[0147] Step S5: Using the roulette algorithm of antlion fitness, an antlion is selected as the target antlion according to the position of the antlion.
[0148] As a specific implementation, step S5 specifically includes the following steps:
[0149] Step S51: Calculate the fitness value F(j) of each ant lion according to the position of the ant lion;
[0150] The calculation formula of the antlion's fitness value F(j) is as follows:
[0151] F(j) = fitness function (antlion(t,j));
[0152] Step S52: Calculate the total fitness value F of the ant lions according to the fitness value F(j) of each ant liontotal ;
[0153] The total fitness value F of the ant lion total The calculation formula is as follows:
[0154]
[0155] Step S53: According to the total fitness value F of the ant lion total , calculate the probability P(j) of each antlion being selected;
[0156] The probability P(j) of an antlion being selected is calculated as follows:
[0157] P(j)=F(j) / F total ;
[0158] Step S54: Calculate the cumulative probability C(j) of the antlion according to the probability P(j) of each antlion being selected;
[0159] The cumulative probability of an antlion is calculated as follows:
[0160]
[0161] Step S55: Select the target ant lion according to the random number r and the cumulative probability. The specific selection process is as follows:
[0162] Starting from the first antlion, if r is less than or equal to C(1), select the first antlion;
[0163] If r is greater than C(1) and less than or equal to C(2), select the second antlion;
[0164] And so on, until we find the jth antlion, such that:
[0165] C(j-1) <r≤C(j);
[0166] Then the jth antlion is determined as the target antlion.
[0167] Step S6: Record the trajectories of ants randomly walking around the positions of the elite ant lion and the target ant lion to determine the positions of the ants.
[0168] As a specific implementation, the ant position in step S6 is obtained through iteration, and the obtaining formula is as follows:
[0169] X(t)=[cumsum(2r(t1)-1),cumsum(2r(t2)-1,…,cumsum(2r(t) n-d )-1)];
[0170] In the formula, x(t) represents the position of the ant at the current time t; cumsum() represents the cumulative sum function; t represents the current number of iterations; nd represents the maximum number of iterations; r() represents the random function; t1, t2, …, t n-d Represents the indexes of the random numbers generated for the 1st, 2nd to ndth iterations respectively.
[0171] As a specific implementation, the step S6 further includes normalizing the ant positions, which specifically includes the following steps:
[0172]
[0173] In the formula,
[0174] represents the normalized position of the i-th dimension at the t-th iteration, a i and b i are the minimum and maximum values of the random moving step length of the i-th dimension variable, and are the minimum and maximum values of the random walk of the t-th iteration of the i-th dimension variable, respectively;
[0175] in, and The calculation of is based on the random number and the position of the antlion, specifically:
[0176] When the random number is less than 0.5,
[0177]
[0178] When the random number is greater than or equal to 0.5,
[0179]
[0180] is the position of the jth antlion at the tth iteration, and are the minimum and maximum values of the random walk of the tth iteration of the i-th dimension variable, c t and d t are the lower and upper bounds of all variables at the t-th iteration, respectively.
[0181] As a more specific implementation, the position of the ant in step S6 is obtained by walking around the elite ant lion and the target ant lion and updating them using an improved segmented equilibrium strategy;
[0182] The calculation formula of the ant position is as follows:
[0183]
[0184] Among them, w represents the weight, and the value of w is based on the ratio of the current number of iterations to the maximum number of iterations T p The values are as follows:
[0185] When T p >0.2, w=2;
[0186] When T p >0.5, w=3;
[0187] When T p >0.8, w=4;
[0188] Ant i t represents the position of the i-th ant at the t-th iteration, R t A The ant chooses the position of the ant lion after random walk around the fitness roulette at the tth iteration, R t E is the position of the ant after random walking around the elite ant lion at the tth iteration.
[0189] In the specific implementation, the optimal solution is selected from the initial solution of the ant lion, which is the position of the elite ant lion and is recorded as elite ant lion R E , select an antlion R from the initial solution through the antlion fitness roulette A , and then the ants surround R E and R A Use the following formula to walk and record its position.
[0190] X(t)=[cumsum(2r(t1)-1),cumsum(2r(t2)-1)...cumsum(2r(t n )-1)]
[0191] In the formula, X(t) is the position of the ant, cumsum is the cumulative sum, t is the current number of iterations, n is the maximum number of iterations, and r(t) is a random function.
[0192] if rand1≤0.5
[0193] r(t)=0
[0194] else
[0195] r(t)=1
[0196] end if
[0197] rand is a random number uniformly distributed in the interval (0,1).
[0198] However, because the position after wandering is not a standard position, the wandering position is normalized by the following formula:
[0199]
[0200] represents the normalized position of the i-th dimension at the i-th iteration, a i and b i are the minimum and maximum values of the random moving step length of the i-th dimension variable, and are the minimum and maximum values of the random walk of the tth generation of the i-th dimension variable, respectively;
[0201] and Calculated by the formula:
[0202] if rand<0.5
[0203]
[0204] else
[0205]
[0206] end if
[0207] is the position of the jth antlion in the tth generation, and are the minimum and maximum values of the random walk of the tth generation of the i-th dimension variable. t and d t are the lower and upper bounds of all variables at the t-th iteration, respectively.
[0208] In the process of ant lions catching ants, the "trap" is manifested as the ant's wandering boundary is shrinking, but the initial algorithm's c t and d t The reduction is segmented. In order to increase the diversity of the algorithm, the initial algorithm will be sinusoidally improved, which is calculated as follows:
[0209]
[0210] in,
[0211] The initial algorithm c t and d t Adjust as I changes;
[0212] t is the current iteration number, T is the maximum iteration number, and w depends on the current generation.
[0213] Step S7: According to the fitness values of all ants, the position of the ant lion is updated to the position of the ant with a higher fitness value.
[0214] In the specific implementation, the ants are respectively around R A and R E The positions generated by the walk are balanced using the improved segmentation to update the positions of the ants.
[0215]
[0216] T>0.2 w=2
[0217] T>0.5 w=3
[0218] T>0.8 w=4
[0219] in represents the position of the i-th ant at the t-th iteration, The ant chooses the position of the antlion after random walk around the fitness roulette at the tth iteration, is the position of the ant after random walking around the elite ant lion at the tth iteration.
[0220] Calculate the updated ant's objective function value and compare it with the elite ant lion, and select the better one as the global optimal solution. If the ant's fitness value is better than the ant lion, it is considered that the ant lion has successfully captured the ant, and the position of the ant lion is updated:
[0221]
[0222] end if
[0223] Step S8: Update the position of the elite ant lion according to the updated position of the ant lion.
[0224] Step S9: Determine whether the updated position of the elite ant lion meets the pre-set iterative convergence condition:
[0225] If the pre-set iterative convergence condition is not met, steps S5 to S9 are repeated until the iterative convergence condition is met; if the pre-set iterative convergence condition is met, the position of the updated elite ant lion is used as the optimal emergency communication vehicle path to complete the emergency communication vehicle path planning based on the improved ant lion algorithm.
[0226] As a specific implementation manner, the fitness value of the initial position of the ant lion and the fitness value of the ant are both calculated according to a fitness function;
[0227] The fitness function is constructed based on the criteria of no obstacles and shortest path, and its function expression is as follows:
[0228] H = L*(1+b);
[0229] in,
[0230] H represents the fitness value, which is used to evaluate the quality of the current path solution;
[0231] L represents the path length, which is used to indicate the path length of the emergency communication vehicle from the starting point to the end point; b represents the penalty factor, which is used to indicate whether the path passes through obstacles;
[0232] The calculation formula of the path length L is as follows:
[0233]
[0234] Where n represents the number of interpolation points, x i is the horizontal coordinate of the i-th interpolation point, x i+1 is the horizontal coordinate of the i+1th interpolation point, y i is the ordinate of the i-th interpolation point, y i+1 is the ordinate of the i+1th interpolation point, i=0,1,2,...,n.
[0235] Set the fitness function: Take the conditions of no obstacles and shortest path as the evaluation criteria of the fitness function. The fitness function constructed in this way is:
[0236] H=L×(1+b)
[0237] The path length of the emergency communication vehicle from the starting point to the end point is calculated by the following formula, that is, the distance between the starting point and the end point of the n interpolation points:
[0238]
[0239] Among them, (x i ,y i ) is the coordinate of the i-th interpolation point, i = 0, 1, 2, ..., n. The initial value of b is 0, and the solution process is as follows:
[0240] for k=1:bars
[0241]
[0242] if D k ≤bar k
[0243] a=100×bar k
[0244] else
[0245] a=0
[0246] endif
[0247] b=b+a
[0248] end
[0249] Determine whether the emergency communication vehicle passes through an obstacle and obtain the value of variable b. In order to simplify the path model, the obstacle is set to a circle, and bars is the number of obstacles. xx is the set of the horizontal coordinates of all interpolation points on a path, and yy is the set of the vertical coordinates of all interpolation points. (xbar k ,ybar k ) is the center coordinate of the kth obstacle, bar k is the radius of the kth obstacle. Array D k is the distance from all interpolation points on a path to the kth obstacle. Determine whether the path passes through an obstacle. If so, a is amplified; if not, a=0.
[0250] This example conducts experimental comparative analysis on three algorithms, namely, the improved ant lion algorithm (HALO, the present invention), the standard ant lion algorithm (ALO) and the particle swarm algorithm (PSO), under the same simulation environment and map. The experimental environment is WINDOWS10;
[0251] MATLAB R2016a, memory 8GB. Algorithm parameter settings: population size N = 10, maximum number of iterations T = 100; among which, the parameter settings of the particle swarm algorithm, learning factor c1 = c2 = 1.5.
[0252] This section divides the emergency communication vehicle path planning into two examples: (1) in a general environment, 6 obstacles; (2) in a complex environment, 10 obstacles. The experimental results are evaluated by the optimal value, minimum value and average value of the optimization results calculated 100 times independently. The statistical results of the path planning comparison experiment are shown in Tables 1 and 2. Figure 2 and Figure 3 The route map and convergence curve diagram for emergency communication vehicles in general environments. Figure 4 and Figure 5 Route map and convergence curve diagram for path planning of emergency communication vehicles in complex environments.
[0253] Table 1: General environment
[0254]
[0255] Table 2: Complex environments
[0256]
[0257] The optimization results in Table 1 and Table 2 show that the best solution, worst solution and average value of HALO are better than those of ALO and PSO, which shows that HALO has advantages such as good global search ability. Among them, compared with ALO and PSO, HALO's relative optimality is closer to 1, the algorithm has achieved better performance, and the result is close to the optimal solution. The HALO algorithm can generate a path close to the optimal solution in solving the path planning problem.
[0258] From the convergence graph and simulation results, it can be seen that in general and complex environments, the improved ant lion algorithm (HALO), the standard ant lion algorithm (ALO) and the particle swarm algorithm (PSO) can successfully avoid obstacles and plan a path from the starting point to the end point. The path, convergence accuracy and convergence speed of the improved ant lion algorithm (HALO) are better than those of the standard ant lion algorithm (ALO) and the particle swarm algorithm (PSO). This shows that the HALO algorithm can find the optimal solution or a near-optimal solution in the emergency communication vehicle path planning problem.
[0259] In summary, the path planning method for emergency communication vehicles based on the improved ant lion algorithm (HALO) achieves fast and efficient path planning by optimizing the search mechanism and adaptive strategy. In each step of the path planning method for emergency communication vehicles based on the improved ant lion algorithm, HALO uses interpolation calculations between path nodes, generates ant colonies through random walks, dynamically updates the positions of ant lions, continuously improves fitness, and accelerates convergence. The simulation results show that HALO can successfully avoid obstacles in both general and complex environments, and its convergence speed and path accuracy are better than those of the standard ant lion algorithm (ALO) and particle swarm algorithm (PSO), which fully proves the significant advantages of HALO in finding the optimal solution or near-optimal solution for the path of emergency communication vehicles.
[0260] Embodiment 2:
[0261] like Figure 6 As shown, this embodiment provides an emergency communication vehicle path planning device based on an improved ant lion algorithm, the device comprising:
[0262] An acquisition unit 10 is used to acquire the starting position coordinates and the target position coordinates of the emergency communication vehicle;
[0263] The setting unit 20 is connected to the acquisition unit 10 and is used to set a path connection between the starting position coordinates and the target position coordinates of the emergency communication vehicle to obtain a path node;
[0264] An initialization unit 30, connected to the setting unit 20, for initializing the ant lion population based on the path nodes;
[0265] The calculation unit 40 is connected to the setting unit 20 and is used to perform interpolation calculation on the path nodes to obtain interpolation nodes;
[0266] A first selection unit 50 is connected to the initialization unit 30 and the calculation unit 40 respectively, and is used to randomly select a node from the interpolation nodes as an ant lion position based on the initialized ant lion population;
[0267] A selection unit 60, connected to the first selection unit 50, is used to select an ant lion with the highest fitness value as an elite ant lion according to the fitness values of the ant lion positions;
[0268] A second selection unit 70, connected to the selection unit 60, is used to use a roulette algorithm of ant lion fitness to select an ant lion as a target ant lion according to the position of the ant lion;
[0269] A recording unit 80, connected to the second selection unit 70, for recording the trajectories of the ants randomly walking around the positions of the elite ant lion and the target ant lion to determine the positions of the ants;
[0270] The updating unit 90 is connected to the recording unit 80 and is used to update the position of the ant lion to the position of the ant with a higher fitness value according to the fitness values of all ants; and to update the position of the elite ant lion according to the updated position of the ant lion;
[0271] The determination unit 100 is connected to the updating unit 90 and is used to determine whether the updated position of the elite ant lion satisfies a preset iterative convergence condition after the updating unit updates the position of the ant lion and the position of the elite ant lion;
[0272] The processing unit 110 is connected to the determination unit 100, and is used to use the updated position of the elite ant lion as the optimal emergency communication vehicle path when the determination unit determines that a preset iterative convergence condition is met, so as to complete the emergency communication vehicle path planning based on the improved ant lion algorithm.
[0273] As a specific implementation, the initialization unit 30 includes:
[0274] The setting module is used to set the number N and dimension D of the antlion population;
[0275] A generating module, connected to the setting module, for generating an initial position of an ant lion using an improved sine function;
[0276] The calculation formula for generating the initial position of the ant lion using the improved sine function is as follows:
[0277]
[0278] Among them, X n,d is the coordinate of the nth antlion in d-dimensional space; n = 1, 2, ..., N; d = 1, 2, ..., D; U limit is the upper limit; Llimit is the lower limit; rand(π) is a random number in the range [0, π];
[0279] The initialization module is connected to the generation module and is used to initialize the ant lion population according to the initial position of the ant lion.
[0280] The device in this embodiment can execute the method in embodiment 1.
[0281] It is to be understood that the above embodiments are merely exemplary embodiments used to illustrate the principles of the present invention, but the present invention is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also considered to be within the scope of protection of the present invention.
Claims
1. A path planning method for emergency communication vehicles based on an improved ant lion algorithm, characterized in that: The method comprises the following steps: Step S1: Obtain the starting position coordinates and target position coordinates of the emergency communication vehicle; Step S2: setting a path connection between the starting position coordinates and the target position coordinates of the emergency communication vehicle to obtain a path node; Step S3: Initializing the ant lion population based on the path nodes; and performing interpolation calculation on the path nodes to obtain interpolation nodes; Step S4: Based on the initialized antlion population, randomly select a node from the interpolation nodes as an antlion position; and, according to the fitness value of the antlion position, select the antlion with the highest fitness value as the elite antlion; Step S5: using the roulette algorithm of antlion fitness, select an antlion as the target antlion according to the position of the antlion; Step S6: Record the trajectories of the ants randomly walking around the positions of the elite ant lion and the target ant lion to determine the positions of the ants; Step S7: According to the fitness values of all ants, the position of the ant lion is updated to the position of the ant with a higher fitness value; Step S8: updating the position of the elite ant lion according to the updated position of the ant lion; Step S9: Determine whether the updated position of the elite ant lion meets the pre-set iterative convergence condition: If the pre-set iterative convergence condition is not met, steps S5 to S9 are repeated until the iterative convergence condition is met; if the pre-set iterative convergence condition is met, the position of the updated elite ant lion is used as the optimal emergency communication vehicle path to complete the emergency communication vehicle path planning based on the improved ant lion algorithm.
2. The method for emergency communication vehicle path planning based on the improved ant lion algorithm according to claim 1 is characterized in that: The fitness value of the initial position of the ant lion and the fitness value of the ant are both calculated according to the fitness function; The fitness function is constructed based on the criteria of no obstacles and shortest path, and its function expression is as follows: H = L*(1+b); in, H represents the fitness value, which is used to evaluate the quality of the current path solution; L represents the path length, which is used to indicate the path length of the emergency communication vehicle from the starting point to the end point; b represents the penalty factor, which is used to indicate whether the path passes through obstacles; The calculation formula of the path length L is as follows: Where n represents the number of interpolation points, x i is the horizontal coordinate of the i-th interpolation point, x i+1 is the horizontal coordinate of the i+1th interpolation point, y i is the ordinate of the i-th interpolation point, y i+1 is the ordinate of the i+1th interpolation point, i=0,1,2,...,n.
3. The path planning method for emergency communication vehicles based on the improved ant lion algorithm according to claim 1 is characterized in that: In step S3, the ant lion population is initialized based on the path nodes, which specifically includes the following steps: Step A1: Set the number N and dimension D of the antlion population; Step A2: Generate the initial position of the ant lion using the improved sine function; The calculation formula for generating the initial position of the ant lion using the improved sine function is as follows: Among them, X n,d is the coordinate of the nth antlion in d-dimensional space; n = 1, 2, ..., N; d = 1, 2, ..., D; U limit is the upper limit; L limit is the lower limit; rand(π) is a random number in the range [0, π]; Step A3: Initialize the ant lion population according to the initial position of the ant lion.
4. The path planning method for emergency communication vehicles based on the improved ant lion algorithm according to claim 1 is characterized in that: In step S3, interpolation calculation is performed on the path nodes to obtain interpolation nodes, which specifically includes the following steps: Step B1: using a cubic spline interpolation method, interpolating the abscissa of the path node to obtain the abscissa of n interpolation points; and using a cubic spline interpolation method, interpolating the ordinate of the path node to obtain the ordinate of n interpolation points; Step B2: Integrate the horizontal coordinates of the n interpolation points and the vertical coordinates of the n interpolation points to obtain the coordinates of the interpolation node, thereby forming a complete interpolation node.
5. The method for emergency communication vehicle path planning based on the improved ant lion algorithm according to claim 1, characterized in that: The step S5 specifically includes the following steps: Step S51: Calculate the fitness value F(j) of each ant lion according to the position of the ant lion; The calculation formula of the antlion's fitness value F(j) is as follows: F(j) = fitness function (antlion(t,j)); Step S52: Calculate the total fitness value F of the ant lions according to the fitness value F(j) of each ant lion total ; The total fitness value F of the ant lion total The calculation formula is as follows: Step S53: According to the total fitness value F of the ant lion total , calculate the probability P(j) of each antlion being selected; The probability P(j) of an antlion being selected is calculated as follows: P(j)=F(j) / F total ; Step S54: Calculate the cumulative probability C(j) of the antlion according to the probability P(j) of each antlion being selected; The cumulative probability of an antlion is calculated as follows: Step S55: Select the target ant lion according to the random number r and the cumulative probability. The specific selection process is as follows: Starting from the first antlion, if r is less than or equal to C(1), select the first antlion; If r is greater than C(1) and less than or equal to C(2), select the second antlion; And so on, until we find the jth antlion, such that: C(j-1) <r≤C(j); Then the jth antlion is determined as the target antlion.
6. The method for emergency communication vehicle path planning based on improved ant lion algorithm according to claim 1, characterized in that: The ant position in step S6 is obtained through iteration, and the obtaining formula is as follows: X(t)=[cumsum(2r(t1)-1),cumsum(2r(t2)-1,…,cumsum(2r(t n-d )-1)]; In the formula, x(t) represents the position of the ant at the current time t; cumsum() represents the cumulative sum function; t represents the current number of iterations; nd represents the maximum number of iterations; r() represents the random function; t1, t2, …, t n-d Represents the indexes of the random numbers generated for the 1st, 2nd to ndth iterations respectively.
7. The method for emergency communication vehicle path planning based on improved ant lion algorithm according to claim 6, characterized in that: The step S6 further includes normalizing the positions of the ants, which specifically includes the following steps: In the formula, represents the normalized position of the i-th dimension at the t-th iteration, a i and b i are the minimum and maximum values of the random moving step length of the i-th dimension variable, and are the minimum and maximum values of the random walk of the t-th iteration of the i-th dimension variable, respectively; in, and The calculation of is based on the random number and the position of the antlion, specifically: When the random number is less than 0.5, When the random number is greater than or equal to 0.5, is the position of the jth antlion at the tth iteration, and are the minimum and maximum values of the random walk of the tth iteration of the i-th dimension variable, c t and d t are the lower and upper bounds of all variables at the t-th iteration, respectively.
8. The method for emergency communication vehicle path planning based on the improved ant lion algorithm according to any one of claims 1 to 7, characterized in that: The ant positions in step S6 are obtained by walking around the elite ant lion and the target ant lion and updating them using the improved segmented equilibrium strategy; The calculation formula of the ant position is as follows: Among them, w represents the weight, and the value of w is based on the ratio of the current number of iterations to the maximum number of iterations T p The values are as follows: When T p >0.2, w=2; When T p >0.5, w=3; When T p >0.8, w=4; represents the position of the i-th ant at the t-th iteration, The ant chooses the position of the antlion after random walk around the fitness roulette at the tth iteration, is the position of the ant after random walking around the elite ant lion at the tth iteration.
9. A path planning device for emergency communication vehicles based on an improved ant lion algorithm, characterized in that: The device comprises: An acquisition unit, used to acquire the starting position coordinates and the target position coordinates of the emergency communication vehicle; A setting unit, connected to the acquisition unit, for setting a path connection between the starting position coordinates and the target position coordinates of the emergency communication vehicle to obtain a path node; An initialization unit, connected to the setting unit, for initializing the ant lion population based on the path nodes; A calculation unit, connected to the setting unit, for performing interpolation calculation on the path nodes to obtain interpolation nodes; A first selection unit is connected to the initialization unit and the calculation unit respectively, and is used to randomly select a node from the interpolation nodes as an antlion position based on the initialized antlion population; A selection unit connected to the first selection unit, configured to select an ant lion with the highest fitness value as an elite ant lion according to the fitness values of the ant lion positions; A second selection unit, connected to the selection unit, is used to use a roulette algorithm of antlion fitness to select an antlion as a target antlion according to the position of the antlion; a recording unit connected to the second selection unit, and configured to record the trajectories of ants randomly walking around the positions of the elite ant lion and the target ant lion to determine the positions of the ants; An updating unit, connected to the recording unit, for updating the position of the ant lion to the position of an ant with a higher fitness value according to the fitness values of all ants; and for updating the position of the elite ant lion according to the updated position of the ant lion; A determination unit connected to the updating unit, and configured to determine whether the updated position of the elite ant lion satisfies a preset iterative convergence condition after the updating unit updates the position of the ant lion and the position of the elite ant lion; The processing unit is connected to the determination unit and is used to use the updated position of the elite ant lion as the optimal emergency communication vehicle path when the determination unit determines that a preset iterative convergence condition is met, so as to complete the emergency communication vehicle path planning based on the improved ant lion algorithm.
10. The emergency communication vehicle path planning device based on the improved ant lion algorithm according to claim 9, characterized in that: The initialization unit comprises: The setting module is used to set the number N and dimension D of the antlion population; A generating module, connected to the setting module, for generating an initial position of an ant lion using an improved sine function; The calculation formula for generating the initial position of the ant lion using the improved sine function is as follows: Among them, X n,d is the coordinate of the nth antlion in d-dimensional space; n = 1, 2, ..., N; d=1,2,…,D;U limit is the upper limit; L limit is the lower limit; rand(π) is a random number in the range [0, π]; The initialization module is connected to the generation module and is used to initialize the ant lion population according to the initial position of the ant lion.