Automatic planning method of the shortest route based on AIS data
Through the ant colony algorithm and spherical triangular cosine formula based on AIS data, the problems of high cost of updates on offshore chart data and local optimal routes in the existing technology are solved, real-time and economical shortest route planning is realized, ensuring safe navigation of ships and improving shipping efficiency.
Patent Information
- Application Number
- CN202010846375.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-21
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2040-08-21
AI Technical Summary
The existing automatic route planning algorithm requires a large amount of chart data updates. It takes into account complex navigation environment factors and can only calculate local optimal routes, making it difficult to effectively reduce fuel consumption and improve shipping efficiency in practical applications.
Automatic shortest route planning method based on AIS data, search for the shortest path in a two-dimensional raster matrix through an ant colony algorithm, and combines spherical triangular cosine formula and DBScan density clustering algorithm to filter and clean AIS data to build a global navigable raster Network, avoid local optimal solutions.
Without relying on a large number of electronic charts, the navigation data is updated in real time to obtain the shortest route that meets practical applications, ensure safe navigation of the ship and avoid local optimal solutions.
Smart Images

Figure CN111928855B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of ship route speed optimization, and in particular to a method for automatically planning the shortest route based on AIS data. Background Art
[0002] With the rapid development of shipping, crew members need to do more navigation work before sailing to cope with the changing navigation environment at sea. Automatically planning routes based on given starting and ending points can reduce the workload of crew members and improve work efficiency before sailing. In addition, route planning algorithms aimed at the shortest route can help crew members find the shortest route, thereby reducing fuel consumption costs during navigation and improving the operating efficiency of shipping companies. In recent years, with the rapid development of computer networks and control theory, more and more shipping companies have begun to pay attention to hot issues such as unmanned ships. The realization of automatic route planning technology can improve the level of intelligent operation of ships, which plays a vital role in the development of intelligent ships and even unmanned ships.
[0003] Many scholars at home and abroad have conducted in-depth research on route planning. Most scholars use grid charts and improved maze algorithms to accurately analyze and determine the safest or shortest routes. Some scholars have developed a route network method based on a known waypoint library. This method mainly draws on the idea of road traffic networks to obtain the shortest route, but this method requires a comprehensive waypoint library. In actual engineering applications, a comprehensive and reasonable waypoint library is difficult to obtain. Wang Fengwu and other scholars designed a meteorological route determination method under the influence of hydrological meteorology, using technical means such as calculating isochrones to obtain the optimal route. For the vast majority of scholars, they have developed an automatic route generation algorithm based on vector electronic charts. The vector electronic chart is divided into adjacent grids and the Dijkstra algorithm is used to optimize the route.
[0004] However, the above method has the following shortcomings:
[0005] 1. The existing automatic route planning algorithm relies on a large amount of nautical chart data, and dynamically updating this nautical chart data requires a lot of economic and time costs;
[0006] 2. The above route planning algorithms need to consider many navigation restrictions and need to fully study the complex navigation environment;
[0007] 3. In addition, most route planning algorithms can only calculate the locally optimal route.
[0008] The present invention is proposed to address the defects of the prior art. Summary of the invention
[0009] The purpose is to propose an automatic planning method for the shortest route based on AIS data to address the shortcomings of the existing technical structure. This method can be used to plan the shortest route that conforms to the crew's route design habits through the starting point A (longitude φA, latitude αA), the arrival point B (longitude φB, latitude αB), and the ship's draft (D).
[0010] In order to achieve the above-mentioned object of the invention, the present invention proposes a method for automatically planning the shortest route based on AIS data, which is implemented by the following technical solutions:
[0011] A method for automatically planning the shortest route based on AIS data, characterized in that the method comprises the following steps:
[0012] S1. Divide the global longitude and latitude into a two-dimensional grid matrix; determine whether AIS data appears in each grid, if AIS data appears, determine it as a navigable grid, and determine the distances of all adjacent navigable grids;
[0013] S2, converting the given starting point A and the arrival point B into the corresponding grid position starting point A' and the arrival point B' in the two-dimensional grid matrix;
[0014] S3, initializing the initial parameters of the ant colony algorithm, and performing a cyclic search in the two-dimensional grid matrix by the ant colony algorithm to output the shortest path from the starting point A' to the arrival point B', and converting it into the shortest route from the starting point A to the arrival point B;
[0015] The shortest route automatic planning method also includes a route secondary design step, including the following steps:
[0016] Splitting the shortest route obtained in step S3 into multiple sub-routes divided by turning points where the heading changes;
[0017] Divide all sub-routes whose distance exceeds L into segments based on arc length d, and calculate the longitude and latitude of each intermediate point based on the sub-route distance and heading angle;
[0018] Output the shortest route of the secondary design consisting of sub-routes with distance less than L and segmented routes with arc length d.
[0019] The sub-route distance is calculated by the spherical trigonometric cosine formula, and the heading angle is calculated according to the spherical trigonometric calculation formula; the latitude and longitude of the intermediate point are calculated as follows:
[0020] The coordinates of the intermediate points are expressed as Di(ψi, λi), Si is the arc length from any intermediate point Di to the starting point A of the sub-route, Si = i*d, i = 2, 3, ..., n-1;
[0021] According to the spherical triangle formula
[0022] ψi=arcsin(sinψ1cos(Si / (60*57.3))+ cosψ1sin(Si / (60*57.3))cos(C)) to get the latitude ψi of Di; where C is the heading angle of the sub-route;
[0023] According to the formula The longitude difference Ai between the starting point A and the midpoint Di is obtained, and the longitude λi of Di = λ1 + Ai.
[0024] Before step S1, a step of cleaning and screening the original AIS data is also included, including the following steps:
[0025] Clean the AIS data with collection errors, retain the normal data points of longitude and latitude, speed, draft and heading in the AIS data; retain the AIS data that meets the navigation conditions; and use the DBScan density clustering algorithm to remove discrete points in the public navigation area in the AIS data.
[0026] The normal data of longitude is between -180° and 180°, the normal data of latitude is between -90° and 90°, the normal data of speed is between 0 and 50 knots, the normal data of draft is between 0 and 50 meters, and the normal data of heading is between 0 and 360°;
[0027] The standards for meeting navigation conditions are a draft of more than 5 meters and a speed of more than 5 knots;
[0028] The L is 300 nautical miles, and the d is 150 nautical miles.
[0029] The specific steps of step S3 are:
[0030] Initialize each ant population,
[0031] The roulette method is used to select the next adjacent navigable grid, and the adjacent navigable grid and the distance between adjacent navigable grids are derived from the calculation results of the global navigable grid grid division model;
[0032] Each ant finds a path based on the pheromone until it reaches point B;
[0033] Record each ant's navigation route and total navigation distance;
[0034] Renew the pheromones left by ants;
[0035] Determine whether the maximum population size has been reached;
[0036] Output the solution with the shortest route.
[0037] The distance between adjacent navigable grids is calculated by the adjacency matrix algorithm. The starting point geographic coordinates A (ψ1, λ1) and the end point geographic coordinates B (ψn, λn) are used to calculate the distance S between the two points.
[0038] flatten = (ra - rb) / ra (1)
[0039] pA = atan(rb*tan(ψ1) / ra) (2)
[0040] pB = atan(rb*tan(ψn) / ra) (3)
[0041] α = arccos(sin(ψ1) sin(ψn) + cos(λ1)cos(λn)cos(λn- λ1)) (4)
[0042] C1 = (sin(α)-α)* (sin(pA) + sin(pB))^2 / cos(α / 2)^2 (5)
[0043] C2 = (sin(α)+α)* (sin(pA) - sin(pB))^2 / sin(α / 2)^2 (6)
[0044] Dr = flatten*(C1-C2) / 8 (7)
[0045] S = ra*(α+Dr) (8)
[0046] In the above formulas 1-8, ra is the equatorial radius and rb is the polar radius.
[0047] Compared with the prior art, the present invention has the following beneficial effects:
[0048] 1. Without using a large number of electronic charts, the collected AIS data is screened to construct routes that meet actual application requirements;
[0049] 2. Use real-time updated AIS data to fully study the navigation conditions of ships under complex navigation factors, so as to ensure that the target ship can sail safely;
[0050] 3. Use the ant colony algorithm to obtain the shortest route that avoids falling into the local optimum. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The above-mentioned features and advantages of the present invention will become more clear and easily understood through the following description of exemplary embodiments thereof in conjunction with the accompanying drawings.
[0052] Figure 1A simplified flow chart of the method for automatically planning the shortest route based on AIS data of the present invention;
[0053] Figure 2 This is a flow chart of AIS data cleaning and screening of the method for automatically planning the shortest route based on AIS data according to an embodiment of the present invention;
[0054] Figure 3 This is a schematic diagram of AIS discrete points according to an embodiment of the present invention;
[0055] Figure 4 A schematic diagram of a grid matrix according to an embodiment of the present invention;
[0056] Figure 5 This is a flowchart of the shortest route planning of the ant colony algorithm according to an embodiment of the present invention. DETAILED DESCRIPTION
[0057] The present invention is further described in detail below in conjunction with the accompanying drawings to facilitate understanding by those skilled in the art:
[0058] See also Figure 1 As shown, an embodiment of the present invention provides a method for automatically planning the shortest route based on AIS data, the purpose of which is to determine global navigable points based on AIS data, grid-divide and matrix the global nautical chart, determine the matrix value of the global grid network based on the navigable points in the AIS data, and define the navigable grid. The distance is calculated for each navigable grid grid using the adjacency matrix in combination with the global longitude and latitude distance formula. Based on the ant colony algorithm and the calculated adjacency matrix, the optimal distance from the starting point to the end point is found, and the planned route is output. Since the initially planned route is based on the grid network, the output route has many turning points, and it is necessary to re-plan a designed route that conforms to the actual habits according to the crew's route planning habits. The following is a detailed description of each step:
[0059] 1. AIS data cleaning and screening
[0060] See also Figure 2 As shown, the steps of cleaning and screening the original AIS data include:
[0061] 1.1 Clean AIS data and keep the normal data points of longitude, latitude, speed, draft and heading in AIS data. The normal data of longitude is between -180° and 180°, the normal data of latitude is between -90° and 90°, the normal data of speed is between 0 and 50 knots, the normal data of draft is between 0 and 50 meters, and the normal data of heading is between 0 and 360°. The abnormal points of the above field signals are defaulted to data acquisition errors to prevent such errors from interfering with the subsequent division of navigable grid networks.
[0062] 1.2 With a draft of more than 5 meters and a speed of more than 5 knots as the standard, retain AIS data that meets the navigation conditions;
[0063] 1.3 Use DBScan density clustering algorithm to remove discrete points in the public navigation area in AIS data and eliminate the interference of discrete points in AIS data on route planning. Figure 3 The circled points in the figure are the discrete points that need to be excluded. The DBScan density clustering algorithm groups the areas with denser AIS data into clusters and can form spatial clusters that conform to the main waterways.
[0064] 2. Global Navigable Grid Division
[0065] The global navigable area is constructed based on the filtered AIS data, and the navigable grid is established according to the grid division method. Figure 4 As shown, each cell is a grid.
[0066] 2.1 The global longitude and latitude are divided into units of 0.025°, excluding high latitudes, from 75° south latitude to the South Pole and from 75° north latitude to the North Pole, to determine the global grid range;
[0067] 2.2 Divide the global grid range according to the unit division degree determined in step 2.1 to obtain 6000*14400 grids. Based on the filtered AIS data, determine whether AIS data appears in each grid. If AIS data appears, it is determined to be a navigable grid. Use the DBScan density clustering algorithm to group the navigable grids into navigable areas, thereby eliminating the navigable discrete grids, such as Figure 4 As shown, the navigable grid framed by the dotted line in the lower left corner is the discrete grid that needs to be removed;
[0068] 2.3 The distance between adjacent navigable grids is determined using the adjacency matrix algorithm. The specific grid is converted into longitude and latitude, and the distance between two adjacent navigable grids is calculated based on the calculation formula between two points on the earth. The formula is as follows.
[0069] The starting point has geographic coordinates A (ψ1, λ1), and the end point has geographic coordinates B (ψn, λn). The formula for calculating the distance S between the two points is as follows:
[0070] flatten = (ra - rb) / ra (1)
[0071] Where, ra is the equatorial radius, in km;
[0072] rb – polar radius, in km.
[0073] pA = atan(rb*tan(ψ1) / ra) (2)
[0074] pB = atan(rb*tan(ψn) / ra) (3)
[0075] α = arccos(sin(ψ1) sin(ψn) + cos(λ1)cos(λn)cos(λn- λ1)) (4)
[0076] C1 = (sin(α)-α)* (sin(pA) + sin(pB))^2 / cos(α / 2)^2 (5)
[0077] C2 = (sin(α)+α)* (sin(pA) - sin(pB))^2 / sin(α / 2)^2 (6)
[0078] Dr = flatten*(C1-C2) / 8 (7)
[0079] S = ra*(α+Dr) (8)
[0080] 3. Shortest route planning based on ant colony algorithm
[0081] Initialize the initial parameters of the ant colony algorithm, and use the ant colony algorithm to perform a cyclic search in the two-dimensional grid matrix to output the shortest path from the starting point A' to the arrival point B', and convert it into the shortest route from the starting point A to the arrival point B. The specific steps are:
[0082] ①Convert the given starting point A (longitude φA, latitude αA) and the destination point B (longitude φB, latitude αB) into the corresponding grid positions of the starting point A' (XA, YA) and the destination point B' (XB, YB) in the two-dimensional grid matrix;
[0083] ② Initialize the initial parameters of the ant colony algorithm and initialize each ant population;
[0084] ③ Use the roulette method to select the next adjacent navigable grid, the adjacent navigable grid and the distance between adjacent navigable grids are derived from the results obtained in step 2;
[0085] ④ Each ant finds a path based on pheromones until it reaches point B;
[0086] ⑤Record the navigation route and total navigation distance of each ant;
[0087] ⑥ Update the pheromones left by ants;
[0088] ⑦ Determine whether the maximum population size has been reached;
[0089] ⑧Output the solution with the shortest route.
[0090] 4. Design route reconstruction model
[0091] The shortest route obtained in step 3 is redesigned to ensure that the designed route is consistent with the sailing habits of the crew.
[0092] 4.1 Split the shortest route obtained in step 3 into multiple sub-routes separated by turning points where the heading changes. The specific steps are as follows:
[0093] 4.1.1 Extract the points where the heading of the preliminary planned route changes.
[0094] 4.1.2 Convert the extracted turning points from grid coordinates into longitude and latitude;
[0095] 4.1.3 The distance between two adjacent turning points is calculated according to the calculation formula between two points on the earth (see formula (1)-(8)). Distinguish between great circle routes and rhumb lines. If the distance between the two is more than 300 nautical miles, it is a great circle route, otherwise it is a rhumb line.
[0096] 4.2 In order to meet the sailing habits of crew members, the great circle route is divided into sections based on the arc length d, and the longitude and latitude of each intermediate point is calculated based on the sub-route distance and heading angle. The steps for designing the great circle route with equal distance are as follows:
[0097] 4.2.1 Calculating the total distance of a great circle route
[0098] The geographic coordinates of the starting point are A (ψ1, λ1) and the geographic coordinates of the end point are B (ψn, λn). According to the spherical trigonometric cosine formula (10), the distance from the starting point to the end point can be obtained as:
[0099] S = arccos(sinψ1 sinψn + cosψ1cosψncos(λn- λ1)) (9)
[0100] Where S is the total distance of the great circle, expressed in degrees. Multiplying S by 60 gives the spherical distance (n mile). This formula is calculated according to the principle of "positive north, negative south, positive east, negative west". For example, 25°N north latitude is +25°, and 10°W west longitude is -10°.
[0101] 4.2.2 Calculating the heading angle of a great circle route
[0102] According to the spherical trigonometry calculation formula (11), the starting heading angle C from the starting point A to the end point B can be obtained:
[0103] (10)
[0104] Determine the angle of C according to geographical rules, that is (12):
[0105] (11)
[0106] 4.2.3 Calculate the longitude and latitude of each point
[0107] Based on the above assumptions, the great circle route is divided into n-1 segments based on 150 nautical miles per unit, as shown in formula (13), rounded up:
[0108] n = [S / d] (12)
[0109] We get n-2 intermediate points, whose coordinates can be expressed as Di(ψi, λi), where i = 2, 3, ..., n-1, and Si (Si = i*d) is the arc length from the inserted intermediate point Di to the starting point A of the sub-route. According to the spherical triangle formula (14):
[0110] ψi = arcsin(sinψ1 cos(Si / (60*57.3)) + cosψ1sin(Si / (60*57.3))cos(C)) (14)
[0111] Then we can get the latitude ψi of Di, according to formula (15):
[0112] (15)
[0113] The longitude difference Ai between the starting point A and the middle point Di is obtained, so the longitude of Di can be obtained as
[0114] λi = λ1 + Ai (16)
[0115] 4.2.4 Output the secondary designed shortest route consisting of sub-routes with a distance of less than 300 nautical miles and 150 nautical miles of segment routes.
[0116] Compared with the prior art, the present invention has the following beneficial effects:
[0117] 1. Without using a large number of electronic charts, the collected AIS data is screened to construct routes that meet actual application requirements;
[0118] 2. Use real-time updated AIS data to fully study the navigation conditions of ships under complex navigation factors, so as to ensure that the target ship can sail safely;
[0119] 3. Use the ant colony algorithm to obtain the shortest route that avoids falling into the local optimum.
[0120] The above embodiments describe the inventive intent and implementation methods of the present invention in detail, but a person skilled in the art in the art will understand that the above embodiments of the present invention are only preferred embodiments of the present invention. Due to space limitations, not all implementation methods can be listed here one by one. Any implementation that can embody the technical solution of the claims of the present invention is within the protection scope of the present invention.
Claims
1. A method for automatically planning the shortest route based on AIS data, characterized in that The method comprises the following steps: S1. Divide the global longitude and latitude into a two-dimensional grid matrix; determine whether AIS data appears in each grid, if AIS data appears, determine it as a navigable grid, and determine the distances of all adjacent navigable grids; S2, converting the given starting point A and the arrival point B into the corresponding grid position starting point A' and the arrival point B' in the two-dimensional grid matrix; S3, initializing the initial parameters of the ant colony algorithm, and performing a cyclic search in the two-dimensional grid matrix through the ant colony algorithm to output the shortest path from the starting point A' to the arrival point B', and converting it into the shortest route from the starting point A to the arrival point B; the specific steps are: Initialize each ant population, The roulette method is used to select the next adjacent navigable grid, and the adjacent navigable grid and the distance between adjacent navigable grids are derived from the calculation results of the global navigable grid grid division model; Each ant finds a path based on the pheromone until it reaches point B; Record each ant's navigation route and total navigation distance; Renew the pheromones left by ants; Determine whether the maximum population size has been reached; Output the solution with the shortest route; In addition, the shortest route automatic planning method also includes a route secondary design step, including the following steps: Splitting the shortest route obtained in step S3 into multiple sub-routes divided by turning points where the heading changes; Divide all sub-routes whose distance exceeds L into segments based on arc length d, and calculate the longitude and latitude of each intermediate point based on the sub-route distance and heading angle; The sub-route distance is calculated by the spherical trigonometric cosine formula, and the heading angle is calculated according to the spherical trigonometric calculation formula; the latitude and longitude of the intermediate point are calculated as follows: The coordinates of the intermediate points are expressed as Di(ψi, λi), Si is the arc length from any intermediate point Di to the starting point A of the sub-route, Si =i*d, i = 2, 3, ..., n-1; According to the spherical triangle formula ψi=arcsin(sinψ1cos(Si / (60*57.3))+ cosψ1sin(Si / (60*57.3))cos(C)) to get the latitude ψi of Di; where C is the heading angle of the sub-route; According to the formula Get the longitude difference Ai between the starting point A and the middle point Di, the longitude λi of Di = λ1 + Ai; Output the secondary designed shortest route consisting of a sub-route with a distance less than L and a segmented route with an arc length of d; L is 300 nautical miles, and d is 150 nautical miles; In addition, before step S1, a step of cleaning and screening the original AIS data is also included, including the following steps: Clean the AIS data with incorrect collection, retain the normal data points of longitude, latitude, speed, draft and heading in the AIS data; and retain the AIS data that meets the navigation conditions; and use the DBScan density clustering algorithm to remove the discrete points of the public navigation area in the AIS data; among the normal data points, the normal longitude data is between -180° and 180°, the normal latitude data is between -90° and 90°, the normal speed data is between 0 and 50 knots, the normal draft data is between 0 and 50 meters, and the normal heading data is between 0 and 360°; the standard for meeting the navigation conditions is a draft of more than 5 meters and a speed of more than 5 knots; The distance between adjacent navigable grids is calculated by the adjacency matrix algorithm. The starting point geographic coordinates A (ψ1, λ1) and the end point geographic coordinates B (ψn, λn) are used to calculate the distance S between the two points. flatten = (ra - rb) / ra (1) pA = atan(rb*tan(ψ1) / ra) (2) pB = atan(rb*tan(ψn) / ra) (3) α = arccos(sin(ψ1) sin(ψn) + cos(λ1)cos(λn)cos(λn- λ1)) (4) C1 = (sin(α)-α)* (sin(pA) + sin(pB))^2 / cos(α / 2)^2 (5) C2 = (sin(α)+α)* (sin(pA) - sin(pB))^2 / sin(α / 2)^2 (6) Dr = flatten*(C1-C2) / 8 (7) S = ra*(α+Dr) (8) In the above formulas 1-8, ra is the equatorial radius and rb is the polar radius.
