Route and speed hierarchical planning method based on hybrid algorithm and storage medium
By adopting hybrid algorithms in route planning, combining A-star algorithm, secondary optimization and genetic-chaotic particle swarm algorithm, the problems of poor optimization results and local optimization when there is a lack of reference routes in the existing technology are solved, and efficient and accurate route planning is achieved.
Patent Information
- Application Number
- CN202510111863.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-03-04
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the absence of reference routes, the optimization effect of the existing route planning method is poor, and a single optimization algorithm is prone to falling into local optimal problems.
The route speed hierarchical planning method based on hybrid algorithm is adopted, combined with the A-Star algorithm, secondary optimization strategy, and genetic-chaotic particle swarm algorithm, to build a search space, plan reference routes, divide meteorological routes, and optimize the speed through the genetic-chaotic particle swarm algorithm.
In the absence of reference routes, safe, efficient and green routes are planned, and the hybrid algorithm is used to quickly converge, avoid local optimal problems, and improve the accuracy and efficiency of route planning.
Smart Images

Figure CN119555087A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ship navigation, specifically to a hierarchical planning method for route and speed based on a hybrid algorithm and a storage medium. Background Art
[0002] With the continuous development of large specialized vessels such as container ships, tankers, and bulk carriers, higher demands are being placed on route planning. The complex and ever-changing marine environment, including meteorological factors, seabed topography, and navigation conditions, directly impacts the safety and efficiency of maritime navigation. Furthermore, as significant sources of carbon emissions, the environmental performance of ships is receiving increasing attention. With the development of satellite communication, big data, and artificial intelligence technologies, ship route planning is gradually moving towards intelligentization. Comprehensively considering meteorological factors and the navigation environment, utilizing intelligent technologies to plan safe, efficient, and environmentally friendly routes has become an important method in route planning.
[0003] Considering the marine environment and ship characteristics, several intelligent algorithms have been widely applied in route planning. For example, Tsou applied genetic algorithms to route planning. Zhu proposed a particle swarm optimization-ant colony optimization fusion algorithm for ship route planning. The particle swarm optimization algorithm performs a global search of the route to obtain a suboptimal solution, and then the ant colony optimization algorithm performs a secondary optimization, which can quickly find the optimal path.
[0004] Existing methods perform well in route planning based on reference routes. However, if no reference route from the origin to the destination exists in the route database, a reference route can be obtained by interpolating route points from the origin to the destination. Optimization using intelligent algorithms near the reference route then yields poor results. Furthermore, a single optimization algorithm is prone to getting trapped in local optima. Summary of the Invention
[0005] To achieve the above and other related objectives, this invention discloses a hierarchical route and speed planning method based on a hybrid algorithm, comprising: Construct the search space; Based on the A* algorithm and a secondary optimization strategy, a reference route is planned within the search space; Meteorological routes are divided based on reference routes to obtain meteorological waypoints; Based on the meteorological flight path and taking into account meteorological information, the flight speed is optimized using a genetic-chaotic particle swarm optimization algorithm based on the most fuel-efficient objective function, including: a: Initialize the population Group based on the ship parameters, the number of individuals in the population num_Group, the individual dimension N-1, the number of iterations num_ite, and calculate the corresponding fuel consumption for the route between each two weather waypoints; b: Find the population-optimal solution gBest and the individual-optimal solution pBest based on the objective function; c: Introduce the crossover and mutation of the genetic algorithm to generate sub-individuals, expand the search scope, and prevent the particle swarm algorithm from falling into local optimality. Adopt the monarch strategy to perform crossover processing on adjacent individuals. After crossover and mutation, sort the parent population and the sub-population in ascending order according to fitness, and select the first num_Group individuals as the new population; d: Further update the new population based on gBest and pBest, including: Let represent the fitness value of the i-th particle at the t-th iteration, represent the average fitness value of all particles at the t-th iteration, represent the optimal fitness value of the population at the t-th iteration; When t < num_ite, if , adopt chaotic update, otherwise use the particle swarm algorithm for update, where is the threshold, ; e: Calculate the objective function and the sailing time of each segment for the new population obtained in step (d), and update gBest and pBest. f: When the number of iterations is less than num_ite, repeat steps (c)-(e) until the loop ends, and obtain gBest as the optimal speed solution based on the objective function of the most fuel-efficient consumption.
[0006] Furthermore, the construction of the search space includes: Regard the land and islands in the map as non-navigable areas, and construct a two-dimensional grid map with a grid unit of 0.01°×0.01° as the search space of the A* algorithm.
[0007] Furthermore, the planning of the reference route within the search space includes: Use the A* algorithm to search for the route with the shortest distance as the objective function in the search space; Adopt a quadratic optimization strategy to eliminate redundant nodes, including: Connect the waypoints in ascending order starting from the target waypoint until the connection intersects with the obstacle; Eliminate all the waypoints between the target waypoint and the obstacle as redundant nodes.
[0008] Furthermore, the division of the meteorological route according to the reference route to obtain meteorological waypoints includes: Divide the reference route with grids of the same size as the resolution of the meteorological information, and the intersection points of the reference route and the grids are used as meteorological waypoints. The route between every two adjacent meteorological waypoints is the meteorological route.
[0009] Furthermore, calculate the corresponding fuel consumption for the route between every two meteorological waypoints, including: Construct a stall model and calculate the ship's speed; Calculate the ship's net water resistance, wind resistance, and wave resistance based on the ship's speed; The hourly fuel consumption of the main engine is calculated based on the ship's net water resistance, wind resistance, wave resistance, and transmission efficiency. The total fuel consumption for navigation is calculated based on the weather route and the hourly fuel consumption of the main engine.
[0010] Furthermore, when using chaotic updates, this includes: ; in, It is the solution for the j-th dimension of the i-th individual in generation t+1. Let t represent the solution for the i-th individual in the j-th dimension. Let represent the minimum value of the j-th dimension of the i-th particle, which represents the minimum speed at which the ship travels. This represents the maximum value of the j-th dimension of the i-th particle, which represents the maximum speed of the ship. ; Where, Let j-th dimension of the i-th particle be the chaotic variable in the t-th iteration. It's about controlling the quantity. Let represent the chaotic variable of the j-th dimension of the i-th particle in the (t+1)-th iteration.
[0011] Furthermore, when using particle swarm optimization, this includes: ; ; ; ; Where, Let be the update step size for the j-th dimension solution of the i-th individual in generation t+1. It is the compression factor. and It is a learning factor. It is a random number between 0 and 1. Let t be the update step size for the j-th dimension solution of the i-th individual. It is the solution of the j-th dimension of the optimal solution corresponding to the i-th individual in generation t. It is the solution for the j-th dimension of the optimal individual in the population. It is the solution for the j-th dimension of the i-th individual in generation t+1. Let t be the solution for the i-th individual in the j-th dimension.
[0012] On the other hand, the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that the program, when executed by a processor, implements the above-described method.
[0013] By adopting the above technical solution, a reference route can be planned first using hierarchical planning when no reference route exists in the route database. Then, by comprehensively considering meteorological forecast information, a more precise meteorological route is obtained by further subdividing the reference route. Speed optimization is then completed based on a genetic-chaotic particle swarm optimization algorithm. While genetic algorithms allow individuals to share information and move relatively evenly towards the optimal solution, they reduce iteration efficiency for high-dimensional optimization problems. Particle swarm optimization converges faster but is prone to getting trapped in local optima. Therefore, using a hybrid genetic-particle swarm optimization algorithm enables rapid convergence and reduces the likelihood of getting trapped in local optima. Attached Figure Description
[0014] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. The drawings are provided for a better understanding of the invention and are not intended to limit the scope of this disclosure. In the drawings, the same or similar reference numerals denote the same or similar elements, wherein: Figure 1 is a flow chart of the present invention; Figure 2 This is a diagram illustrating the principles of meteorological flight path division. Detailed Implementation
[0015] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0016] Reference Figure 1 This invention provides a hierarchical route and speed planning method based on a hybrid algorithm, comprising the following steps: S1: Construct the search space.
[0017] S2: Based on the A* algorithm and a secondary optimization strategy, a reference route is planned within the search space.
[0018] S3: Divide meteorological routes based on reference routes to obtain meteorological waypoints.
[0019] S4: Based on the weather route and taking into account meteorological information, optimize the speed using the genetic-chaotic particle swarm optimization algorithm.
[0020] Specifically, S1 includes: Land and islands in the map are designated as non-navigable areas. A two-dimensional raster map is constructed using 0.01° × 0.01° grid units to serve as the search space for the A* algorithm. This embodiment specifically includes: Initialize and construct a one-dimensional array Map to index whether a certain latitude and longitude location is a navigable area; construct multiple one-dimensional arrays Weather_Map to index meteorological information such as wind, waves, and currents at a certain latitude and longitude location at time t.
[0021] A 180°×360° map is rasterized using a 0.01°×0.01° grid size. The raster map size is 18000×36000, and the origin of the raster map coordinates corresponds to (-90°, -180°) on the world map. A one-dimensional array `Map` is created to store information for each raster. Unnavigable areas have a raster value of 0, and navigable areas have a raster value of 1. The location (Lat, Lon) is indexed in the `Map` array as follows: (1) (2) (3) In the formula, index_col and index_row are the indices of the location (Lat, Lon) on the two-dimensional raster map, and index is the index of the location (Lat, Lon) in the Map array.
[0022] Multiple three-dimensional arrays (latitude, longitude, time) are constructed from meteorological files to store various meteorological information related to wind, waves, and currents. These three-dimensional arrays are then compressed into a one-dimensional array, and meteorological information at a specific latitude and longitude position at time t is retrieved using an index. Since the resolution of the meteorological information is 0.5° × 0.5°, the three-dimensional array contains 360 latitude elements and 720 longitude elements. The indexing method for the meteorological information at position (Lat, Lon) at time t in the Weather_Map array is as follows: (4) (5) (6) In the formula, index_col and index_row are the indices of the position (Lat, Lon) in the three-dimensional array, and index is the index in the one-dimensional array. This is the weather update time. Since it is not possible to index weather information at every moment, the weather data at the time closest to the current moment's update time is used as the weather data at moment t.
[0023] Specifically, S2 includes: The objective function of the A* algorithm: (7) In the formula, n is the current search node of the A* algorithm, g(n) is the actual cost from the current node to the starting node, and h(n) is the estimated cost from the current node to the target node.
[0024] The distance between two geographical locations is taken as the distance along a great circle route.
[0025] (8) (9) Where, and R is the latitude and longitude of the geographical location, R is the Earth's radius, and D and C are the great circle distance and orientation between the two points.
[0026] A secondary optimization strategy eliminates redundant waypoints. The route planned by Satellite A is a broken line segment. Considering that actual navigation does not involve frequent turns, the route contains many redundant points. Waypoints are connected sequentially from the target waypoint until the line intersects an obstacle. Waypoints between these two waypoints are considered redundant and are eliminated to obtain the reference route.
[0027] S3 includes: refer to Figure 2 Taking meteorological information into account, the reference flight path is further subdivided into meteorological flight paths. Since the resolution of meteorological information is 0.5°, therefore, during the meteorological update time... Meteorological data within the same meteorological grid are identical. The meteorological information of waypoint n on the meteorological route represents the meteorological information for the segment from waypoint n to waypoint n+1. Let ST be the ship's departure time. It is the time interval between the ship's departure time and the last weather update. For the ship's sailing time. When Equal to weather update time Update the meteorological data within the meteorological grid. The latitude and longitude of the reference route waypoint m are known. waypoint m+1 latitude and longitude The longitude of weather grid g1 between the two waypoints is The latitude of weather grid g2 is The formula for calculating the latitude and longitude of the intersection points of the reference flight path with weather grids g1 and g2 is as follows: (10) Where, It is the constant direction of travel.
[0028] Given the longitude of the weather grid, find the latitude of the intersection point: (11) Where, It is the latitude of the intersection of the reference flight path and the weather grid g1.
[0029] Given the latitude of the weather grid, find the longitude of the intersection point: (12) Where, It is the longitude of the intersection of the reference route and the weather grid g2.
[0030] S4 specifically includes: For weather-related flight routes, based on the objective function of minimizing fuel consumption, the flight speed between every two weather waypoints is optimized, including: a: Initialize the population Group based on the ship parameters, the number of individuals in the population num_Group, the individual dimension N-1, the number of iterations num_ite, and calculate the corresponding fuel consumption for the route between each two weather waypoints; The calculation of the corresponding fuel consumption for each route between two weather waypoints includes: Construct a stall model and calculate the ship's speed.
[0031] The ship stall model is as follows: (13) In the formula, h is the wave height, and q is the angle between the wave direction and the heading. For wind speed, Where is the angle between the wind direction and the heading, and D is the displacement. The initial speed of the ship. , , , These are parameters, which shall be set by those skilled in the art. The meteorological information is determined by indexing the Weather_Map array using formulas (4)-(6) based on the latitude and longitude of the starting point of the corresponding flight segment and the time of arrival at that point.
[0032] Calculate the ship's net water resistance, wind resistance, and wave resistance based on the ship's speed; Ship's water resistance, wind resistance, and wave resistance: (14) (15) (16) Where, It is hydrostatic resistance. It is the density of seawater. It is the wetted surface area of the ship. It is the ship's speed. It is wind resistance, It is air density. It is the projected area of the hull and superstructure above the waterline on the mid-section. It is relative wind speed. It is wave resistance. It is the ship's width. It's about drinking water. It is the length between perpendicular lines. There is a high-pitched wave. , These are parameters that are set by those skilled in the art.
[0033] The hourly fuel consumption of the main engine is calculated based on the ship's net water resistance, wind resistance, wave resistance, and transmission efficiency. Total power output, transmission efficiency, and main engine fuel consumption per hour: (17) (18) (19) Where, It is the total power of the voyage. It's about transmission efficiency. It's the power of the main unit. It is the engine's hourly fuel consumption, and SFOC is the engine's fuel consumption rate.
[0034] The total fuel consumption for navigation is calculated based on the weather route and the hourly fuel consumption of the main engine.
[0035] Total fuel consumption during navigation: (20) Where, It is the great circle route distance of segment i, calculated by formula (8). It is the speed of the ship in segment i. The main engine power is for flight segment i.
[0036] b: Find the population-optimal solution gBest and the individual-optimal solution pBest based on the objective function; c: Introduce crossover and mutation in the genetic algorithm to generate offspring, expand the search range, and prevent the particle swarm algorithm from getting stuck in local optima. Use the monarch strategy to crossover adjacent individuals. After crossover and mutation, sort the parent and offspring populations in ascending order of fitness and select the top num_Group individuals as the new population. d: Further updates to the new population based on gBest and pBest, including: Since the actual optimization process involves fuel consumption calculation and dynamic meteorological elements, it is impossible to determine whether there is a local optimum for the objective function and difficult to determine the theoretical optimum value.
[0037] Let represent the fitness value of the i-th particle at the t-th iteration, represent the average fitness value of all particles at the t-th iteration, represent the optimal fitness value of the population at the t-th iteration. In the early stage of evolution, due to the random distribution of particles, the difference between particles is large, so is relatively small; in the later stage of evolution, the particle swarm continuously converges, making close to 1. Therefore, set the threshold , . When and t < num_ite, it is determined that the algorithm converges prematurely. Chaotic update is adopted to make the particle swarm search the global as much as possible. Otherwise, the particle swarm algorithm is used for update, specifically including: When chaotic update is not adopted: (21) (22) (23) (24) In the formula, is the update step size of the j-th dimension solution of the i-th individual in the (t + 1)-th generation, is the compression factor, <用中文描述的变量名>and are learning factors, is a random number between 0 and 1, is the update step size of the j-th dimension solution of the i-th individual in the t-th generation, is the solution of the j-th dimension of the optimal solution corresponding to the i-th individual in the t-th generation, is the solution of the j-th dimension of the optimal individual in the population. is the solution of the j-th dimension of the i-th individual in the (t + 1)-th generation, is the solution of the j-th dimension of the i-th individual in the t-th generation.
[0038] When chaotic update is adopted: When the particle swarm algorithm converges but the theoretical optimal value is not obtained, the global optimal value at this time is only a local optimal value, that is, premature convergence occurs. When the particle swarm algorithm converges prematurely, the Logistic chaotic equation is introduced, and the particle swarm algorithm can perform chaotic search. The Logistic chaotic equation is as follows: (25) In the formula, 请注意,原文中存在一处未明确的中文变量名(处),我已按照格式要求保留原样。你可根据实际情况进行替换或补充完整。Let j-th dimension of the i-th particle be the chaotic variable in the t-th iteration. It's about controlling the quantity. Let represent the chaotic variable of the j-th dimension of the i-th particle in the (t+1)-th iteration.
[0039] The update formula at this point is: (26) in, It is the solution for the j-th dimension of the i-th individual in generation t+1. Let t represent the solution for the i-th individual in the j-th dimension. Let represent the minimum value of the j-th dimension of the i-th particle, which represents the minimum speed at which the ship travels. This represents the maximum value of the j-th dimension of the i-th particle, which represents the maximum speed of the ship.
[0040] e: Calculate the objective function and the travel time for each segment for the new population obtained in step (d), and update gBest and pBest. f: When the number of iterations is less than num_ite, repeat steps (c)-(e) until the loop ends, and obtain gBest as the speed-optimal solution based on the objective function of the least fuel consumption.
[0041] The present invention also provides a computer-readable storage medium having a computer program stored thereon for implementing the above-described method.
[0042] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined.
[0043] For the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0044] As can be seen from the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or some parts of the embodiments of this application.
[0045] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A route speed hierarchical planning method based on a hybrid algorithm, characterized in that: include: Constructing the search space; Based on the A-star algorithm and the secondary optimization strategy, a reference route is planned in the search space; Divide the weather routes according to the reference routes to obtain weather waypoints; According to the weather route, comprehensive consideration of weather information, based on the most fuel-efficient objective function, the genetic-chaotic particle swarm algorithm is used to optimize the speed, including: a: Initialize the population Group according to the ship parameters, the number of individuals in the population num_Group, the individual dimension N-1, the number of iterations num_ite, and calculate the corresponding fuel consumption of the route between each two meteorological waypoints; b: Find the optimal solution gBest for the population and pBest for the individual according to the objective function; c: Introduce crossover mutation of genetic algorithm to generate sub-individuals, expand the search range, prevent the particle swarm algorithm from falling into local optimality, adopt monarch strategy to crossover adjacent individuals, after crossover mutation, sort the parent population and sub-population in ascending order according to fitness, and select the first num_Group individuals as the new population; d: Further update the new population based on gBest and pBest, including: make represents the fitness value of the i-th particle at the t-th iteration, represents the average fitness value of all particles in the tth iteration, Represents the optimal fitness value of the population at the tth iteration; When t < num_ite, if , chaotic update is adopted, otherwise the particle swarm algorithm is used for update, where is the threshold value, ; e: Calculate the objective function and the flight time of each segment for the new population obtained in step (d), and update gBest and pBest. f: When the number of iterations is less than num_ite, repeat steps (c)-(e) until the loop ends, and gBest is obtained as the optimal speed solution based on the objective function of minimizing fuel consumption.
2. The method according to claim 1, characterized in that The constructing the search space comprises: The land and islands in the map are regarded as non-navigable areas, and a two-dimensional grid map is constructed with 0.01°×0.01° as the grid unit as the search space of the A-star algorithm.
3. The method according to claim 1, characterized in that: Planning a reference route in the search space includes: In the search space, the shortest distance is taken as the objective function, and the A-star algorithm is used to search for routes; A secondary optimization strategy is used to remove redundant nodes, including: Connect the waypoints in positive order starting from the target waypoint until the connecting line intersects the obstacle; The waypoints between the target waypoint and the obstacle are removed as redundant nodes.
4. The method according to claim 1, characterized in that: The weather route is divided according to the reference route to obtain the weather waypoints, including: The reference route is divided into grids of the same size as the resolution of the meteorological information. The intersection of the reference route and the grid is used as the meteorological waypoint, and the route between every two adjacent meteorological waypoints is the meteorological route.
5. The method according to claim 1, characterized in that Calculation of the corresponding fuel consumption for each route between two meteorological waypoints includes: Construct a stall model and calculate the ship speed; Calculate the ship's net water resistance, windward resistance and wave resistance according to the ship's speed; Calculate the main engine's hourly fuel consumption based on the ship's net water resistance, windward resistance, wave resistance and transfer efficiency; The total fuel consumption for navigation is calculated based on the weather route and the hourly fuel consumption of the main engine.
6. The method according to claim 1, characterized in that When using chaos updates, this includes: ; in, is the solution of the jth dimension of the ith individual in generation t+1, is the solution of the jth dimension of the i-th individual in the t-th generation, represents the minimum value of the jth dimension of the ith particle, which represents the minimum speed of the ship. represents the maximum value of the jth dimension of the ith particle, which represents the maximum speed of the ship; ; In the formula, represents the chaotic variable of the jth dimension of the ith particle at the tth iteration, is the control quantity, Represents the chaotic variable of the jth dimension of the ith particle at the t+1th iteration.
7. The method according to claim 1, characterized in that When particle swarm updating is used, it includes: ; ; ; ; In the formula, is the update step length of the j-th dimension solution of the ith individual in the t+1 generation, is the compression factor, and is the learning factor, is a random number between 0 and 1. is the update step length of the j-th dimension solution of the i-th individual in the t-th generation, is the solution of the jth dimension of the optimal solution corresponding to the i-th individual in generation t, is the solution of the jth dimension of the optimal individual in the population, is the solution of the jth dimension of the ith individual in generation t+1, is the solution of the jth dimension of the i-th individual in the t-th generation.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method described in any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Airline planning method based on genetic algorithm
CN118153791A
Arctic route path planning method based on improved sparrow search algorithm
CN118533181A
Navigation speed and route optimization method based on hybrid intelligent optimization algorithm
CN118761531A
Methods, electronic devices and storage media for ship route optimization
US11941553B1
Shipping speed optimization method and apparatus
WO2023035910A1
Cited By
Airline optimization method and system based on genetic algorithm and geographic information
CN120373602A