Fire escape path optimization method based on improved SWO
By introducing an adaptive trade-off factor rate and an improved dynamic spiral update mechanism in the spider bee optimization algorithm, the problem of insufficient convergence speed and stability in fire escape path planning is solved, and more efficient and accurate path planning is achieved.
Patent Information
- Application Number
- CN202510021348.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-01-07
AI Technical Summary
The existing spider bee algorithm has insufficient convergence speed and stability in fire escape path planning, making it difficult to effectively shorten the algorithm's convergence time and eliminate non-stable optimal solutions.
The improved Spider Bee Optimization Algorithm (ISWO) is adopted to adaptively adjust the search strategy through adaptive trade-off factor rates and improved dynamic spiral update mechanisms, balance global search and local development capabilities, and provide search directions to enhance algorithm adaptability and convergence accuracy.
The search efficiency and convergence accuracy of the algorithm are improved, the accuracy and stability of fire escape path planning are enhanced, the convergence time of the algorithm is shortened, and the non-stable optimal solution is eliminated.
Smart Images

Figure CN119962778A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of path optimization, and in particular to a fire escape path optimization method based on improved SWO. Background Art
[0002] Fire path planning is one of the current hot topics in the field of security research. The purpose of fire path planning is to enable trapped people to avoid obstacles by themselves in a fire scene with many obstacles and complex environment according to the on-site instruction terminal and the optimal solution criterion, so as to choose the optimal path from the trapped starting point to the safe end point.
[0003] When dealing with path planning problems under complex fire scene information, inspiration from nature can often play a good role. Commonly used algorithms include ant colony algorithm, neural network algorithm, particle swarm algorithm, genetic algorithm, etc.
[0004] Patent application number is 202411475567.4. It is a neural network fire trend prediction method based on improved GWO. Although the prediction accuracy can be improved by improving the adaptive convergence factor of the GWO algorithm, this method does not consider the search direction, and the accuracy of path planning needs to be further improved.
[0005] In addition, the SpiderWasp Optimizer (SWO) has been widely used in the field of path planning due to its fast solution, strong global search capability and strong robustness; however, in the SpiderWasp Optimizer, there is still room for improvement in the convergence speed and stability of the algorithm. How to further shorten the convergence time of the SpiderWasp algorithm and eliminate some unstable optimal solutions have become the parts that urgently need to be improved in the SpiderWasp algorithm. Summary of the invention
[0006] In view of the shortcomings of the existing methods, the present invention solves the problem that the convergence speed and stability of the SWO algorithm need to be further improved.
[0007] The technical solution adopted by the present invention is: a fire escape path optimization method based on improved SWO includes the following steps:
[0008] Step 1: Obtain the location of the trapped person, the target location, the obstacle location and the fire location;
[0009] As a preferred embodiment of the present invention, the fire location is collected by a fire detection sensor.
[0010] As a preferred embodiment of the present invention, the positions of trapped persons, target positions, and obstacle positions are two-dimensional models that simulate fire scenes using a grid method.
[0011] Step 2: Construct the objective function of the optimal escape distance;
[0012] As a preferred implementation of the present invention, the objective function uses Euclidean distance to determine the length of the path.
[0013] Step 3: Construct an improved SWO algorithm, adopt an adaptive trade-off factor rate, adaptively adjust the search strategy, and balance the global search and local development capabilities; use an improved spiral update mechanism to optimize the position update of spider bees in the nesting stage, and provide search directions for the exploration process in the nesting stage;
[0014] As a preferred embodiment of the present invention, the adaptive trade-off factor rate-improved SWO algorithm includes:
[0015] Initialize the population number N, the maximum number of iterations; the current location of the trapped person, the location of the obstacle, the location of the target, and the location of the fire;
[0016] Construct the trade-off factor rate TR, the formula is:
[0017] TR=cos(2π(t / t max )) / (1+N / N max )
[0018] In the formula, t represents the current iteration number; t max Indicates the maximum number of iterations; N and N max Represent the current population size and the maximum population size respectively;
[0019] Spider Bee position update during the search phase;
[0020] Updated the position of the spider bee during the pursuit phase;
[0021] Updated the position of the spider bee during the nesting phase;
[0022] Determine whether the maximum number of iterations or the optimal solution has been reached. If the termination condition is not met, repeat the position update. If the termination condition is met, output the optimal fire escape path.
[0023] As a preferred embodiment of the present invention, the formula for updating the position of spider bees in the nesting stage using the improved spiral updating mechanism is:
[0024]
[0025] In the formula, represents the current position of the spider bee, b' represents the dynamic adjustment parameter; t represents the current iteration number; t max Indicates the maximum number of iterations; and represents three random spider bee individuals a, b, and c; r3, r4, and r5 represent random numbers between [0, 1]; U represents a vector that avoids nesting in the same position; and l represents a random number between [-2, 1].
[0026] As a preferred embodiment of the present invention, the improved SWO algorithm is evaluated by the average fitness value and the minimum fitness value.
[0027] As a preferred embodiment of the present invention, a fire escape path optimization system based on improved SWO includes: a memory for storing instructions executable by a processor; and a processor for executing the instructions to implement a fire escape path optimization method based on improved SWO.
[0028] As a preferred embodiment of the present invention, a computer readable medium stores a computer program code, and when the computer program code is executed by a processor, the fire escape path optimization method based on the improved SWO is implemented.
[0029] Beneficial effects of the present invention:
[0030] 1. In the process of exploration, nesting behavior lacks effective search direction. The improved dynamic spiral update mechanism can provide search direction, enhance the adaptability of the algorithm and improve its convergence accuracy;
[0031] 2. Improve the adaptive trade-off factor of the SWO algorithm so that the algorithm can adaptively adjust the search strategy and balance the ability of global search and local development, thereby improving the search efficiency and convergence accuracy of the algorithm. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 It is a flow chart of the fire escape path optimization method based on improved SWO of the present invention;
[0033] Figure 2 is a flow chart of the improved SWO algorithm of the present invention;
[0034] Figure 3 It is a comparison diagram of the data fitness values of the present invention and the existing method;
[0035] Figure 4 It is a comparison chart of the number of iterations of the present invention and the existing method;
[0036] Figure 5 is a path planning diagram of the present invention in which no fire occurs;
[0037] Figure 6 It is a path planning diagram for detecting a fire by the detection terminal 1 of the present invention. DETAILED DESCRIPTION
[0038] The present invention is further described below in conjunction with the accompanying drawings and embodiments. This figure is a simplified schematic diagram, which only illustrates the basic structure of the present invention in a schematic manner, and therefore it only shows the components related to the present invention.
[0039] like Figure 1 As shown, a fire escape path optimization method based on improved SWO includes the following steps:
[0040] Fire path planning for escape is a challenging problem. Traditional path planning algorithms often find it difficult to find the optimal solution in such an environment because the complexity of the target points leads to a very large search space and the existence of many local optimal solutions. How to solve the local optimal trap, slow convergence speed and parameter sensitivity of the algorithm is a technical problem to be solved by the present invention.
[0041] Step 1: Obtain the location of the trapped person, the target location, the obstacle location and the fire location;
[0042] A two-dimensional model simulating a fire scene is constructed through the grid method, and the starting position, target position, obstacles and detection terminal node positions of the trapped persons are set; the detection terminal node position is the location information of the fire obtained through the on-site detection terminal when a fire occurs; the target position is the exit position.
[0043] Step 2: Construct the objective function of the optimal escape distance;
[0044] In order to improve the efficiency of the escape of trapped persons, optimizing the path to shorten the distance of the escape path becomes a key way to improve efficiency. The present invention uses Euclidean distance to determine the length of the path, and the objective function is expressed as:
[0045]
[0046] Among them, x i ,y i is the position of the i-th node, and m is the total number of nodes.
[0047] Step 3: Input the position of the trapped person into the objective function and use the ISWO algorithm to calculate the next optimal position of the trapped person;
[0048] The ISWO algorithm (improved SWO) calculates the next optimal position of the trapped person including:
[0049] Initialize the population size N, the maximum number of iterations, the trade-off rate TR; the current location of the trapped person, the location of the obstacle, the location of the target, and the location of the fire;
[0050] The current position information of the trapped person is input into the objective function, and the position of each female bee represents a safe position information;
[0051] In the search phase, the female spider bee randomly explores the space and updates its position as follows:
[0052]
[0053] μ1=|rn|×r1 (3)
[0054] μ2=B×cos(2πl) (4)
[0055]
[0056] Where SW i t+1 Indicates the updated position of the spider bee; SW i t Indicates the current position of the spider bee; and represents three random spider bee individuals a, b, and c; r1, r2, r3, and r4 represent random numbers between [0,1]; μ1 represents the coefficient for adjusting the step size; B represents the coefficient for controlling the amplitude of μ2, which decreases as the value of l increases; l represents a random number between [-2,1]; H and L represent predefined upper and lower bounds of the parameters.
[0057] In the pursuit phase, the spider bee position update formula is:
[0058]
[0059] In the formula, represents the random selection of individual spider bee a; C represents the factor that controls the speed change of the spider bee; t and t max Represents the current number of iterations and the maximum number of iterations; r5 and r6 represent random numbers between [0,1]; vc represents a vector of [-k,k] normal distribution; k is generated by the following formula:
[0060]
[0061] In the formula, t and t max Indicates the current number of iterations and the maximum number of iterations;
[0062] During the nesting phase, the spider bee position update formula is:
[0063]
[0064] Where SW * Indicates the optimal solution currently generated; and represents three solutions of randomly selecting spider bees a, b, and c from the population; γ represents the number generated by Levy flight; U represents the vector that avoids nesting in the same position.
[0065] Determine whether the maximum number of iterations or the optimal solution has been reached, that is, whether the safe exit has been reached. If the termination condition is not met, repeat the above steps. If the termination condition is met, output the optimal fire escape path.
[0066] The present invention adopts an adaptive trade-off factor rate TR and an improved dynamic spiral update mechanism, and the specific improvements include:
[0067] In the SWO algorithm, the trade-off factor rate TR determines whether the algorithm chooses hunting behavior or mating behavior. The existing fixed trade-off factor rate cannot ensure better optimization every time. The present invention adopts an adaptive trade-off factor to enable the algorithm to adaptively adjust the search strategy and balance the ability of global search and local development, thereby improving the search efficiency and convergence accuracy of the algorithm. The formula of the trade-off factor rate TR is:
[0068] TR=cos(2π(t / t max )) / (1+N / N max ) (10)
[0069] In the formula, t represents the current iteration number; t max Indicates the maximum number of iterations; N and N max Represent the current population size and the maximum population size respectively;
[0070] Since the algorithm lacks an effective search direction during the exploration process of nesting behavior, the present invention adopts an improved dynamic spiral update mechanism, which can provide a search direction, enhance the adaptability of the algorithm and improve its convergence accuracy;
[0071] The spider bee position update of three solutions of spider bees a, b, and c randomly selected from the population of formula 7 is optimized, and an improved spiral update mechanism is constructed to improve the position update of spider bees in the nesting stage. The formula is:
[0072]
[0073] In the formula, b' represents the dynamic adjustment parameter; t represents the current number of iterations; t max Indicates the maximum number of iterations.
[0074] like Figure 3 The average fitness and minimum fitness value of the ISWO of the present invention are compared with those of the existing method. It can be seen that the average fitness value of the ISWO of the present invention is obviously higher than that of the existing method.
[0075] Figure 4 ] is the objective function curve of the present invention and the existing method. It can be seen that after the present invention introduces the adaptive trade-off factor and improves the spiral update mechanism, the convergence speed of the algorithm is significantly improved.
[0076] like Figure 5 and Figure 6 is the path planning diagram of the present invention, Figure 5 The optimal route generated by the system when no fire occurs; Figure 6 The optimal route is generated when the acquisition terminal 1 detects a fire; the acquisition terminal is a fire detection sensor or a fire image detection module.
[0077] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A fire escape path optimization method based on improved SWO, characterized in that: The following steps are involved: Step 1: Obtain the location of the trapped person, the target location, the obstacle location and the fire location; Step 2: Construct the objective function of the optimal escape distance; Step 3: Construct an improved SWO algorithm, adopt an adaptive trade-off factor rate, adaptively adjust the search strategy, and balance the global search and local development capabilities; use an improved spiral update mechanism to optimize the position update of the spider bee during the nesting stage, and provide a search direction for the exploration process during the nesting stage.
2. The fire escape path optimization method based on improved SWO according to claim 1, characterized in that: The adaptive trade-off factor rate improvement of the SWO algorithm includes: Initialize the population number N, the maximum number of iterations; the current location of the trapped person, the location of the obstacle, the location of the target, and the location of the fire; Construct the trade-off factor rate TR, the formula is: TR=cos(2π(t / t max )) / (1+N / N max ) In the formula, t represents the current iteration number; t max Indicates the maximum number of iterations; N and N max Represent the current population size and the maximum population size respectively; Spider Bee position update during the search phase; Updated the position of the spider bee during the pursuit phase; Updated the position of spider bees during the nesting phase; Determine whether the maximum number of iterations or the optimal solution has been reached. If the termination condition is not met, repeat the position update; if the termination condition is met, output the optimal fire escape path.
3. The fire escape path optimization method based on improved SWO according to claim 2, characterized in that: The formula for updating the position of spider bees during the nesting phase using the improved spiral update mechanism is: In the formula, represents the current position of the spider bee, b' represents the dynamic adjustment parameter; t represents the current iteration number; t max Indicates the maximum number of iterations; and represents three random spider bee individuals a, b, and c; r3, r4, and r5 represent random numbers between [0, 1]; U represents a vector that avoids nesting in the same position; and l represents a random number between [-2, 1].
4. The fire escape path optimization method based on improved SWO according to claim 1, characterized in that: The improved SWO algorithm is evaluated by the average fitness value and the minimum fitness value.
5. The fire escape path optimization method based on improved SWO according to claim 1, characterized in that: The fire location is collected through fire detection sensors.
6. The fire escape path optimization method based on improved SWO according to claim 1, characterized in that: The positions of trapped persons, target and obstacles are two-dimensional models that simulate the fire scene by using the grid method.
7. The fire escape route optimization method based on improved SWO according to claim 1, characterized in that: The objective function uses Euclidean distance to determine the length of the path.
8. The fire escape path optimization system based on improved SWO is characterized by: include: a memory for storing instructions executable by a processor; A processor, configured to execute instructions to implement the fire escape path optimization method based on improved SWO as described in any one of claims 1 to 7.
9. A computer readable medium storing a computer program code, characterized in that: When the computer program code is executed by a processor, the fire escape path optimization method based on the improved SWO as described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Neural network fire trend prediction method based on improved GWO
CN119416813A
Multi-AGV task cooperative scheduling method and device applied to flexible manufacturing workshop
CN118036931A
Unmanned aerial vehicle underwater search method and device based on improved spider bee algorithm, and medium
CN118259686A
Carbon emission prediction method and system based on ISWO-LSTM model
CN118350513A