A method for planning a ship route in a coastal water area
By constructing a quadtree multi-strategy environment model and introducing the A* algorithm with a channel preference factor, the problem of path deviation in coastal waterways is solved, generating paths that conform to channel priority and collision avoidance rules, thus improving the standardization and reliability of the paths.
Patent Information
- Application Number
- CN202511454120.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-13
- Publication Date
- 2025-12-23
- Estimated Expiration
- 2045-10-13
AI Technical Summary
Existing technologies generate vessel paths in coastal waterways that are prone to deviating from or crossing the waterway, failing to effectively comply with Article 9 of the International Regulations for Preventing Collisions at Sea, and affecting the compliance and safety of the paths.
By parsing electronic nautical chart data to generate vectorized geographic feature files, a quadtree multi-strategy environment model is constructed. The A* algorithm is used to introduce channel preference factors for path search, and segmented optimization is performed after the initial path is generated to ensure that the path is generated within the channel and complies with the channel priority rule.
The generated paths can effectively comply with channel priority and the International Regulations for Preventing Collisions at Sea in complex coastal waterways, improving the standardization, reliability and practical feasibility of the paths, and avoiding the problems of deviating from and crossing the waterway.
Smart Images

Figure CN120907564B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of ship path planning methods, and more particularly, to a coastal waterway ship path planning method. BACKGROUND
[0002] The "Intelligent Ship Specification 2025" released by China Classification Society points out that an intelligent ship is composed of six functional modules, and the intelligent navigation module is one of the main research directions. Path planning, as one of the core technologies of the intelligent navigation module, plays an important supporting role in realizing the autonomous, safe and efficient navigation of ships. Unlike general shortest path search or pure obstacle avoidance problems, the path planning of intelligent ships faces higher compliance and safety requirements, and needs to design the route under the premise of following the "International Regulations for Preventing Collisions at Sea". Especially in coastal waters, maritime agencies generally demarcate channels, requiring ships to navigate within the channel to maintain navigation order and safety. At the same time, the ninth article (narrow waterway) of the "International Regulations for Preventing Collisions at Sea" clearly requires ships to "travel as close as practicable to the outer edge of the waterway or channel on their right side", and not to obstruct the safe passage of other ships.
[0003] However, the existing technology mainly focuses on environmental modeling, search algorithm improvement and path smoothing optimization, although it has achieved rich results, most of the research has not fully considered the mandatory constraints of coastal channels, and lacks clear compliance with the narrow waterway navigation rules, resulting in the generated path deviating from the channel and crossing the channel in actual application, affecting the compliance and safety of the path. SUMMARY
[0004] The purpose of the present application is to overcome the deficiency that the path generated by the intelligent ship in the prior art deviates from the channel and crosses the channel in actual application, and to provide a coastal waterway ship path planning method that considers channel priority in the planning process to avoid the problem of the generated path deviating from the channel and crossing the channel in actual application.
[0005] To solve the above technical problems, the technical solution adopted by the present application is:
[0006] A coastal waterway ship path planning method is provided, comprising the following steps:
[0007] Electronic chart preprocessing: analyzing electronic chart data to extract geographic features, and converting the geographic features into a vectorized geographic feature file;
[0008] Adjacency graph generation: constructing an environment model based on the vectorized geographic feature file based on a quadtree multi-strategy modeling method, and generating an adjacency graph that can be used for path search based on the environment model;
[0009] Channel division: generating a center line of a channel according to the vectorized geographic element file, and dividing the channel into an upbound channel and a downbound channel along the center line, the channel directions of the upbound channel and the downbound channel being parallel to the center line;
[0010] Initial path generation: performing path search based on an A-star algorithm according to the adjacency graph, and introducing a channel preference factor into a cost function of the A-star algorithm to generate an initial path; the channel preference factor is specifically: judging whether a currently explored path point is located in a channel region; if the path point is in a non-channel region, the cost is not changed; if the path point is in the channel region, the cost is adjusted according to a heading determination function in combination with a channel zoning type in which the path point is located; the heading determination function is determined according to a current heading of a ship and a channel direction defined by a channel in which the ship is currently located;
[0011] Final optimized path generation: reducing redundant nodes and unnecessary turns of the initial path to generate a final optimized path.
[0012] The coastal waterway ship path planning method of the present application analyzes electronic chart data, extracts geographic elements, converts the geographic elements into a vectorized geographic element file conducive to rapid calculation and spatial analysis, constructs an environment model based on a quadtree multi-strategy modeling method according to the vectorized geographic element file, generates an adjacency graph that can be used for path searching, simultaneously performs waterway division, generates a center line of the waterway according to the vectorized geographic element file, divides the waterway along the center line into an upstream waterway and a downstream waterway, the waterway directions of the upstream waterway and the downstream waterway are both parallel to the center line, performs path searching based on the A-star algorithm according to the adjacency graph, and introduces a waterway preference factor into the cost function of the A-star algorithm to generate an initial path. The waterway preference factor is specifically: judging whether the currently explored path point is located in a waterway region: if the path point is in a non-waterway region, the cost is not changed; if the path point is in a waterway region, the cost is adjusted according to a heading determination function in combination with the waterway zoning type in which the path point is located; the heading determination function determines according to the current heading of the ship and the specified waterway direction of the waterway in which the ship is currently located; the waterway priority is considered in the planning process to avoid the problem that the generated path deviates from the waterway or crosses the waterway in actual application. After the initial path is generated, the redundant nodes and unnecessary turns of the initial path are reduced to generate a final optimized path. By introducing the waterway preference factor into the cost function of the A-star algorithm when the A-star algorithm is used for path searching, the waterway priority is considered in the planning process of the initial path, that is, the initial path is generated in the waterway region where there is a waterway, avoiding the problem that the generated path deviates from the waterway or crosses the waterway in actual application, and by setting the upstream waterway and the downstream waterway, the initial path is generated as close as possible to the outer edge of the waterway on the right side of the ship. Thus, not only can a feasible path be generated in a complex coastal waterway, but also the waterway priority and the constraint of Rule 9 of the International Regulations for Preventing Collisions at Sea can be considered in the planning process, thereby improving the standardization, reliability and actual executability of the path.
[0013] Preferably, in the waterway division, a segmentation line is set at a turning point of the waterway according to the vectorized geographic element file, the waterway is segmented and regularized to obtain waterway segments, and the center line of the waterway is obtained by connecting the midpoints of adjacent two segmentation lines. The main traffic lane and two transition lanes are divided in the upstream waterway and the downstream waterway, the main traffic lane is located between the two transition lanes, and the division lines for dividing the main traffic lane and the two transition lanes are parallel to the center line of the waterway. The waterway is segmented and regularized to simplify irregular waterways and facilitate subsequent processing. The main traffic lane and the two transition lanes are divided in the upstream waterway and the downstream waterway to facilitate subsequent driving of the ship in the middle position of the upstream waterway and the downstream waterway.
[0014] Preferably, the cost function is specifically:
[0015]
[0016] wherein, represents the current leaf node; represents the cost of node . represents the neighbor leaf node of the current leaf node; represents the cost of node . represents the channel preference factor; represents the Euclidean distance from the current leaf node to the neighbor leaf node; represents the Euclidean distance from node to the end point of the planned path.
[0017] Preferably, the heading decision function is specifically:
[0018]
[0019]
[0020] wherein, represents the angle difference between the current heading of the ship in path planning and the channel heading defined by the channel in which the ship is currently located; represents the minimum value; represents the heading of the current ship in path planning; represents the channel heading defined by the channel in which the ship is currently located; represents the coordinates of the current position of the ship; represents the coordinates of the previous position of the ship; represents the inverse tangent function.
[0021] Preferably, the channel preference factor is specifically:
[0022]
[0023]
[0024] wherein, represents the channel preference factor; represents the basic cost; represents the weight; represents the weight when the channel zoning type is the main traffic zone; represents the weight when the channel zoning type is the transition zone.
[0025] Preferably, the method for segmenting and regularizing the channel according to the vectorized geographic element file, to obtain a channel segment, specifically comprises the following steps:
[0026] extracting a channel boundary from the vectorized geographic feature file, the channel boundary being composed of a plurality of channel line segment boundaries;
[0027] calculating an included angle of adjacent channel line segment boundaries along the channel boundary, and determining an intersection point of the adjacent channel line segment boundaries as a turning point of the channel when the included angle is greater than a threshold value;
[0028] at the turning point, setting a segment line direction according to an azimuth angle of the channel line segment boundary: when the azimuth angle falls within a range of 0°±45° or 180°±45°, setting the segment line direction as a horizontal direction; when the azimuth angle does not fall within the range of 0°±45° and 180°±45°, setting the segment line direction as a vertical direction; and extending the segment line to both sides until the segment line intersects the channel line segment boundary, to obtain a plurality of channel initial segments;
[0029] when a length of the channel initial segment is not greater than a preset length, setting the channel initial segment as a channel final segment; when the length of the channel initial segment is greater than the preset length, supplementally setting a segment line to the channel initial segment at equal intervals, so that the length of the channel initial segment is not greater than the preset length, to obtain the channel final segment;
[0030] collecting the plurality of channel final segments to obtain a channel segment.
[0031] Preferably, the final optimized path generation specifically comprises the following steps:
[0032] dividing the initial path located in the channel into channel initial paths, and dividing the initial path not located in the channel into free space segment paths;
[0033] segmenting each channel initial path according to the channel segment to obtain a channel segment path;
[0034] respectively simplifying the channel segment path and the free space segment path by using an RDP algorithm to reduce redundant nodes and unnecessary turns of the initial path, to generate a final optimized path. This facilitates the final optimized path to be more consistent with the shape of the channel boundary, and avoids directly crossing the channel.
[0035] Preferably, in the electronic chart preprocessing, the electronic chart data comprises S-57 or S-101 standard data, and the extracted geographic features comprise channels, lands, and water depth areas.
[0036] Preferably, in the abutment graph generation, the area with water depth less than the safe water depth of the ship in the water depth area is divided into a shallow water area, the area with water depth not less than the safe water depth of the ship in the water depth area is divided into a deep water area, the shallow water area and the land are divided into an unnavigable area, and the deep water area is divided into a navigable area; the channel, the unnavigable area and the navigable area are differentiated and marked based on a four-tree multi-strategy modeling method to construct an environment model.
[0037] Preferably, the environment model construction specifically includes the following strategies:
[0038] Generate a leaf node:
[0039] Generate an initial four-tree node;
[0040] A uniform subdivision strategy is adopted for the channel, and the initial four-tree node located in the channel is subdivided to a preset depth to generate a leaf node with equal size;
[0041] A boundary trigger subdivision strategy is adopted for the unnavigable area, and subdivision is triggered only when the boundary of the unnavigable area intersects with the initial four-tree node, and the leaf node is generated after subdivision to a specified depth;
[0042] A hierarchical marking strategy is adopted for the navigable area, and the initial four-tree node located in the deep water area is subdivided to a specified depth to generate a leaf node;
[0043] Mark the leaf node:
[0044] Add a channel mark on the leaf node located in the channel, add an unnavigable mark on the leaf node located in the unnavigable area, and add a navigable mark on the leaf node located in the navigable area. The environment model is constructed based on the four-tree multi-strategy modeling method, different areas can obtain corresponding subdivision and marking effects according to their characteristics, which not only ensures the fine expression of the model in key areas, but also avoids generating redundant nodes in non-key areas, thereby balancing the modeling accuracy and efficiency.
[0045] Compared with the prior art, the present application has the following advantages:
[0046] 1. The coastal waterway ship path planning method of the present application, by introducing a channel preference factor in the cost function of the A* algorithm when searching for a path, considering channel priority in the planning process of the initial path, that is, generating the initial path in the channel area to avoid the problem of deviating from the channel and crossing the channel in actual application, and setting the uplink channel and downlink channel to generate the initial path as close as possible to the outer edge of the waterway or channel on the starboard side of the ship; thereby not only generating a feasible path in a complex coastal waterway, but also considering channel priority and the constraints of Rule 9 of the International Regulations for Preventing Collisions at Sea in the planning process, thereby improving the standardization, reliability and actual executability of the path.
[0047] 2. The coastal waterway ship path planning method of the present application, by segmenting and normalizing the channel, not only obtaining the channel heading of the channel segment path, but also determining the spatial range of the main traffic lane and the transition zone, so that in the cost function, the angle difference between the current heading of the ship in the path generation and the channel heading specified by the channel can be compared, and the channel zoning type is given a differentiated weight; the A* algorithm can consider distance, heading consistency and channel zoning priority when accumulating the cost, thereby tending to generate a path located in the main traffic lane with a reasonable heading, effectively avoiding reverse and deviating from the channel.
[0048] 3. The coastal waterway ship path planning method of the present application, by segmenting and normalizing the channel to obtain a channel segment path, performing a segment optimization strategy based on the initial path, and using the RDP algorithm to simplify the channel segment path and the free space segment path, respectively, setting differentiated thresholds according to different environmental characteristics, which can effectively remove redundant nodes and unnecessary turns, and obtain a more smooth, simple and practical path.
[0049] 4. The coastal waterway ship path planning method of the present application, by constructing an environment model based on a four-tree multi-strategy modeling method, different regions can obtain corresponding subdivision and marking effects according to their characteristics, which not only ensures the fine expression of the model in key areas, but also avoids generating redundant nodes in non-key areas, thereby balancing modeling accuracy and efficiency. BRIEF DESCRIPTION OF DRAWINGS
[0050] Figure 1 is a flowchart of the coastal waterway ship path planning method of the present application;
[0051] Figure 2 is a flowchart of the channel division in the present application;
[0052] Figure 3 is a schematic diagram of the initial path generated by the coastal waterway ship path planning method of the present application;
[0053] Figure 4 is a flowchart of calculating a channel preference factor in the present application;
[0054] Figure 5 is a flowchart of generating a final optimized path in the present application;
[0055] Figure 6 is an environmental map used in the present application;
[0056] Figure 7 is a quadtree grid map generated by applying the ship path planning method for coastal waterway to the present application;
[0057] Figure 8 is a schematic diagram of an adjacency graph generated by applying the ship path planning method for coastal waterway to the present application;
[0058] Figure 9 is a path comparison diagram of the results of the traditional A-star algorithm and the final optimized path of the present application;
[0059] Figure 10 is a comparison diagram of the results of the traditional A-star algorithm and the results obtained by the present application. DETAILED DESCRIPTION
[0060] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. The present application will be further described below with reference to specific embodiments.
[0061] In the description of the present application, it should be understood that the orientations or positional relationships indicated by the terms "upper", "lower", "left", "right", etc. are based on the orientations or positional relationships shown in the drawings, and are only for the convenience of describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a particular orientation, be constructed and operated in a particular orientation, therefore the terms describing the positional relationships in the drawings are only used for exemplary illustration, and cannot be understood as a limitation of the present patent, for those skilled in the art, the specific meanings of the above terms can be understood according to the specific circumstances.
[0062] Embodiment one
[0063] The present embodiment is a first embodiment of a ship path planning method for coastal waterway, as shown in Figure 1 , comprising the following steps:
[0064] Electronic chart preprocessing: analyzing electronic chart data to extract geographic elements, and converting the geographic elements into a vectorized geographic element file;
[0065] Adjacency graph generation: An environmental model is constructed based on the quadtree multi-strategy modeling method from the vectorized geographic feature file, and an adjacency graph that can be used for path search is generated based on the environmental model;
[0066] Channel delineation: Channel boundaries are extracted from vectorized geographic feature files. Channel boundaries consist of multiple channel segment boundaries, such as... Figure 2 As shown in (a); calculate the included angle between adjacent channel segment boundaries along the channel boundary. When the included angle is greater than a threshold, for example, the threshold can be set to 5°, the intersection of adjacent channel segment boundaries is determined as the channel turning point. At the turning point, the segment line direction is set according to the azimuth of the channel segment boundary. The azimuth is defined as 0° north on the map, increasing clockwise: 90° east, 180° south, and 270° west. When the azimuth is within the range of 0°±45° or 180°±45°, it is determined to be approximately vertical, that is, north-south, and the segment line direction is set to horizontal. When the azimuth does not fall within 0°±45° and 180°±45°, it is determined to be approximately vertical, that is, north-south, and the segment line direction is set to horizontal. Within a 5° range, it is determined to be approximately horizontal, i.e., east-west, and the segment line direction is set to vertical. The segment line extends to both sides until it intersects the channel segment boundary to ensure complete transection of the channel and the formation of regular sub-regions, resulting in multiple initial channel segments. When the length of an initial channel segment is not greater than a preset length, it is designated as the final channel segment. When the length of an initial channel segment is greater than the preset length, segment lines are added to the initial channel segment at equal intervals to ensure that the length of the initial channel segment is not greater than the preset length, resulting in the final channel segment. This is to avoid generating excessively long sub-regions. Multiple final channel segments are combined to obtain a channel segment, such as... Figure 2 As shown in (b). After the channel is segmented, each segment line intersects with the left and right boundaries of the channel. The geometric midpoint of the intersection of each segment line and the channel boundary is calculated, and the midpoints of two adjacent segment lines are connected to obtain the centerline of the channel. The channel is divided into an upstream channel and a downstream channel along the centerline according to the right-hand driving rule. The course of the upstream and downstream channels is parallel to the centerline. The course direction is determined according to the right-hand driving rule, that is, when the centerline direction is θ, the prescribed course of the left and right halves of the channel is θ+180° and θ, respectively. A main passage zone and two transition zones are divided in both the upstream and downstream channels. The main passage zone is located between the two transition zones. The dividing lines of the main passage zone and the two transition zones are set parallel to the centerline of the channel, as shown in (b). Figure 2 As shown in (c), the channel is segmented and regularized to simplify irregular channels and facilitate subsequent processing. Both the upstream and downstream channels are divided into a main passage zone and two transition zones. That is, the channel zone types in the upstream and downstream channels include a main passage zone and a transition zone. The main passage zone is the area for priority path generation, and the transition zone is the area for auxiliary path generation, so that ships can navigate in the middle of the upstream and downstream channels.
[0067] Initial path generation: path search is performed based on A* algorithm according to the adjacency graph, and a channel preference factor is introduced into the cost function of the A* algorithm to generate an initial path to control the preferential selection of the main traffic lane of the channel during path search, as shown in FIG. 2. The specific calculation steps of the channel preference factor are shown in FIG. 3: it is judged whether the current explored path point is located in the channel region: if the path point is in the non-channel region, the cost is not changed; if the path point is in the channel region, the cost is adjusted according to the heading determination function in combination with the channel sub-zone type where the path point is located; the heading determination function determines according to the current heading of the ship and the channel heading specified by the current channel. Figure 3 Figure 4
[0068] The cost function is specifically as follows:
[0069]
[0070] wherein, represents the current leaf node; represents the cost of the node ; represents the neighbor leaf node of the current leaf node; represents the cost of the node ; represents the channel preference factor; represents the Euclidean distance from the current leaf node to the neighbor leaf node, , , , and are the coordinates of the node and the node , respectively; represents the Euclidean distance from the node to the end point of the planned path.
[0071] The heading determination function is specifically as follows:
[0072]
[0073]
[0074] wherein, represents the angle difference between the current heading of the ship during path generation and the channel heading specified by the current channel; represents the minimum value; represents the heading of the current ship during path generation; represents the channel heading specified by the channel where the ship is currently located; represents the coordinates of the current position of the ship; represents the coordinates of the previous position of the ship; represents the arctangent function.
[0075] The channel preference factor is specifically:
[0076]
[0077]
[0078] wherein, represents the channel preference factor; represents the basic cost; represents the weight; represents the weight when the channel zoning type is the main traffic zone; represents the weight when the channel zoning type is the transition zone. The weight in the above expression is iteratively adjusted according to a specific generation scheme until the generated initial path preferentially travels along the channel when there is a channel, and the initial path is within the channel area.
[0079] Specifically, the above channel preference factor expression is explained as follows:
[0080] If the angle difference is within 60°, it is considered that the heading is consistent. At this time, the cost is further adjusted according to the channel zoning type: the cost is significantly reduced when in the main traffic zone, as a preferential navigation area; when in the transition zone, the cost is moderately increased, higher than the main traffic zone but still lower than the non-channel area;
[0081] If the angle difference is greater than 60° and less than 90°, it is considered that the heading is acceptable, but the cost of the path point is not changed;
[0082] If the angle difference is more than 90°, it is considered that the heading is inconsistent, and the cost is significantly increased, so that the path point cannot be selected, thereby avoiding the ship from reversing or deviating from the channel direction.
[0083] Final optimized path generation: reduce the redundant nodes and unnecessary turns of the initial path, and generate the final optimized path.
[0084] The ship performs autonomous navigation in the coastal channel water area according to the final optimized path.
[0085] The working principle of the coastal channel water area ship path planning method of the embodiment is as follows:
[0086] The electronic chart data is parsed, geographical elements are extracted, the geographical elements are converted into vectorized geographical element files conducive to rapid calculation and spatial analysis, an environmental model is constructed based on a four-tree multi-strategy modeling method according to the vectorized geographical element files, an adjacency graph that can be used for path searching is generated, channel division is carried out, a center line of the channel is generated according to the vectorized geographical element files, the channel is divided into an uplink channel and a downlink channel along the center line, the channel directions of the uplink channel and the downlink channel are both parallel to the center line, path searching is carried out based on the A-star algorithm according to the adjacency graph, and a channel preference factor is introduced into a cost function of the A-star algorithm to generate an initial path. The channel preference factor is specifically: judging whether a currently explored path point is located in a channel region; if the path point is in a non-channel region, the cost is not changed; if the path point is in the channel region, the cost is adjusted according to a heading determination function in combination with a channel zoning type in which the path point is located; the heading determination function is determined according to a current heading of a ship and a channel direction specified by the channel; channel priority is considered in the planning process to avoid problems that the generated path deviates from the channel and crosses the channel in actual application. After the initial path is generated, redundant nodes and unnecessary turns of the initial path are reduced to generate a final optimized path, as shown in FIG. 8. Figure 9
[0087] By introducing the channel preference factor into the cost function of the A-star algorithm when the A-star algorithm is used for path searching, the channel priority is considered in the planning process of the initial path, that is, the initial path is generated in the channel region in the place where there is a channel, and problems that the generated path deviates from the channel and crosses the channel in actual application are avoided.
[0088] By channel segmentation division, not only the center line direction of each segment is obtained, but also the spatial range of the main traffic zone and the transition zone is determined. These information is directly called in the improved A-star algorithm path searching: when the algorithm expands from the current node n to the neighbor node m, first, the specified heading and the zoning type of the segment to which the node m belongs are determined according to the position of the node m. Then, in the cost function, the specified heading is compared with the actual heading (calculated by n→m direction) to obtain the angle difference, and the zoning type is combined to give different weights. In this way, the A-star algorithm can consider distance, heading consistency and zoning priority when accumulating the cost, so as to tend to generate a path located in the main traffic zone and with reasonable heading, effectively avoiding reverse and deviation from the channel.
[0089] At the same time, by setting the uplink channel and the downlink channel, the initial path is generated as close as possible to the outer edge of the waterway or the channel on the right side of the ship; so as to not only be able to generate a feasible path in a complex coastal channel water area, but also be able to consider the channel priority and the constraint of the ninth rule of the International Regulations for Preventing Collisions at Sea in the planning process, so as to improve the standardization, reliability and actual executability of the path.
[0090] Embodiment Two
[0091] The second embodiment of the ship route planning method in the coastal waterway is based on the first embodiment. The specific process of generating the final optimized route is shown in Fig. 2(b), which includes the following steps: Figure 5
[0092] The initial route is shown in Fig. 2(a); Figure 5
[0093] The initial route located in the waterway is divided into waterway initial routes, and the initial route not located in the waterway is divided into free space segment routes;
[0094] Each waterway initial route is segmented according to the waterway segment route to obtain a waterway segment route, as shown in Fig. 2(b); Figure 5
[0095] The RDP algorithm is used to simplify the waterway segment route and the free space segment route. Specifically, for a regular-shaped waterway segment route, a larger threshold value is set to make the optimized route more consistent with the waterway direction. For an irregular-shaped waterway segment route, a smaller threshold value should be set to avoid excessive simplification of the optimized route, which may deviate from the waterway. If the free space route segment is in a complex environment, a smaller threshold value should be set to avoid excessive simplification of the optimized route, which may lead to an unsafe route. Conversely, the free space segment route is in a relatively safe environment, and a larger threshold value should be set to more effectively reduce the number of path points, thereby improving the efficiency of route simplification.
[0096] By optimizing the initial route, the redundant nodes and unnecessary turns of the initial route are reduced. By setting different threshold values according to the environmental conditions of the area where the initial route is located, the segment optimization is performed to make the final optimized route more consistent with the shape of the waterway boundary and avoid directly crossing the waterway, thereby generating the final optimized route, as shown in Fig. 2(c). Figure 5
[0097] Embodiment Three
[0098] The third embodiment of the ship route planning method in the coastal waterway is based on the first embodiment. In the electronic chart preprocessing, the electronic chart data includes S-57 or S-101 standard data, and the geographic features of the waterway, land, and water depth area are extracted. The geographic features are converted into a vectorized geographic feature file, which is an ESRI Shapefile format file in this embodiment, for environmental modeling, as shown in Fig. 3. Figure 6 The electronic chart used in the embodiment follows the S-57 standard. In the electronic chart conversion process, GDAL (Geospatial Data Abstraction Library) is adopted. The library is an open source cross-platform tool, supports multiple formats including S-57 and ESRI Shapefile, and the conversion process is stable and reliable. The ogr2ogr tool of GDAL is used to read the S-57 file in ISO / IEC 8211 format, extract the geometric and attribute information of the object, and output as an independent Shapefile layer according to the geographic feature type, which is used for subsequent environment modeling and path search.
[0099] In the adjacency graph generation, the geographic coordinate system of the vectorized geographic feature file is converted into a projection coordinate system, the area with a water depth less than the ship safety water depth in the water depth area is divided into a shallow water area, and the area with a water depth not less than the ship safety water depth in the water depth area is divided into a deep water area. The ship safety water depth is the sum of the ship full load draft and the freeboard. The shallow water area and the land are divided into non-navigable areas, and the deep water area is divided into navigable areas. The channel, non-navigable area and navigable area are differentiated and marked based on the four-tree multi-strategy modeling method, the environment model is constructed, and the adjacency graph for path search is generated.
[0100] The constructed environment model is as shown in Figure 7 The specific strategies include the following:
[0101] Generate leaf nodes:
[0102] Generate initial quadtree nodes;
[0103] For the channel, a uniform subdivision strategy is adopted to subdivide the initial quadtree nodes located in the channel to a preset depth to generate leaf nodes of equal size;
[0104] For the non-navigable area, a boundary trigger subdivision strategy is adopted to trigger subdivision only when the boundary of the non-navigable area intersects with the initial quadtree node, and the leaf nodes are generated after subdivision to a specified depth;
[0105] For the navigable area, a hierarchical marking strategy is adopted to subdivide the initial quadtree nodes located in the deep water area to a specified depth to generate leaf nodes;
[0106] Mark the leaf nodes:
[0107] Add channel marks on the leaf nodes located in the channel, add non-navigable marks on the leaf nodes located in the non-navigable area, and add navigable marks on the leaf nodes located in the navigable area.
[0108] The environment model is constructed based on a quadtree multi-strategy modeling method. Different regions can obtain corresponding subdivision and marking effects according to their characteristics, which ensures the fine expression of the model in key areas and avoids the generation of redundant nodes in non-key areas, thereby balancing modeling accuracy and efficiency.
[0109] After completing the environment modeling of the electronic chart, all quadtree leaf nodes are traversed to filter out the navigable nodes located in the channel and deep water area. Then, the adjacent nodes in the neighborhood range of each navigable node are searched, and if there is no land or shallow water barrier between the two nodes, a connected edge is established to form the passing relationship between the nodes. Through the above method, the navigable nodes and their connected edges constitute an undirected graph structure, which provides a reliable topological basis for subsequent path planning, as shown in Figure 8 .
[0110] Example Four
[0111] In this example, the coastal waterway ship path planning method is applied to path planning in the Zhanjiang Port electronic chart environment. Based on examples one to three, the electronic chart used in this example is the Zhanjiang Bay area data obtained by fusing three electronic charts CN203315, CN488103 and CN488102. The longitude and latitude range of the study area is 110.398°-110.569° east and 21.063°-21.150° north, covering the main channel of Zhanjiang Bay and its surrounding waters, as shown in Figure 6 . To facilitate subsequent modeling and path planning calculations and ensure the accuracy of distance and angle calculations, this paper converts the longitude and latitude coordinates (WGS84 geographic coordinates) to UTM projection coordinates. This projection has smaller distortion in a single projection zone and can ensure the accuracy of spatial calculations on a regional scale.
[0112] The ship parameters of this experiment are as follows: total length 147 m, type width 22.6 m, type depth 11.2 m, full load draft 8.2 m, rich water depth set as 20% of the ship draft, and safety water depth as the sum of the ship draft and the rich water depth. Therefore, the safety water depth of this ship is 9.84 m. In order to reflect the actual ship navigation water depth limit condition, the area with water depth less than 10 m is divided into shallow water area. The environment modeling results are shown in Figure 7 .
[0113] As shown in Figure 9 and Figure 10As shown, the path length generated by the traditional A-star algorithm is the shortest, but the path fails to select the channel and does not comply with the channel navigation rules, and has obvious defects. Compared with the traditional A-star, the A-star algorithm of the application can generate a path in the main traffic lane of the channel, and meet the requirement that the ship should sail as close as possible to the right side edge of the channel, the path length increases by 6.7%, the number of nodes and the number of inflection points increase, and the path presents more small broken lines. After the A-star algorithm result of the application is segmented and optimized as an initial path, the path length is shortened, and is close to the traditional A-star algorithm, the number of nodes is reduced to only 18, the number of inflection points is only 14, and the path is always kept in the channel, while the key path characteristics are retained, the simplicity and smoothness of the path are significantly improved.
[0114] In summary, the traditional A-star algorithm is superior in path length, but lacks practical application value due to the failure to select the channel and comply with the navigation rules; the A-star algorithm of the application can generate a path in the main traffic lane of the channel, and meet the requirement that the ship should sail as close as possible to the right side edge of the channel, but the path complexity increases, affecting the executability; the segmented optimization strategy further improves the path quality on the basis of the A-star algorithm of the application, retains the key path characteristics, significantly reduces the number of nodes and the number of inflection points, makes the path more simple and smooth, and has practical feasibility, and is more suitable for actual ship navigation.
[0115] In the description of the present specification, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the present specification, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, different embodiments or examples described in the present specification and the features of different embodiments or examples can be combined and combined by those skilled in the art without contradiction.
[0116] Obviously, the above embodiments of the application are only examples for clearly illustrating the application, and are not intended to limit the implementation manner of the application. Based on the above description, those skilled in the art can make other different forms of changes or modifications. Here, all the implementation manners do not need to be exhausted. Any modification, equivalent replacement and improvement made within the spirit and principle of the application should be included in the protection scope of the claims of the application.
Claims
1. A method for planning a ship route in a coastal water area, characterized by, The method comprises the following steps: electronic chart preprocessing: analyzing electronic chart data to extract geographic elements, and converting the geographic elements into a vectorized geographic element file; adjacency graph generation: constructing an environment model based on a quadtree multi-strategy modeling method according to the vectorized geographic element file, and generating an adjacency graph that can be used for path searching based on the environment model; channel division: generating a center line of a channel according to the vectorized geographic element file, and dividing the channel into an uplink channel and a downlink channel along the center line, wherein the channel directions of the uplink channel and the downlink channel are parallel to the center line; initial path generation: performing path searching based on an A-star algorithm according to the adjacency graph, and introducing a channel preference factor into a cost function of the A-star algorithm to generate an initial path; the channel preference factor is specifically: judging whether a currently explored path point is located in a channel region: if the path point is in a non-channel region, the cost is not changed; if the path point is in a channel region, the cost is adjusted according to a heading determination function in combination with a channel zoning type in which the path point is located; the heading determination function is determined according to a current heading of a ship and a specified channel direction of a channel in which the ship is currently located; final optimized path generation: reducing redundant nodes and unnecessary turns of the initial path to generate a final optimized path.
2. The coastal waterway ship route planning method according to claim 1, characterized by, In the channel division, segment lines are set at turning points of the channel according to the vectorized geographic element file, the channel is segmented and regularized to obtain channel segments, the center line of the channel is obtained by connecting midpoints of adjacent two segment lines, and a main traffic zone and two transition zones are divided in the uplink channel and the downlink channel, wherein the main traffic zone is located between the two transition zones, and the division lines for dividing the main traffic zone and the two transition zones are parallel to the center line of the channel.
3. The coastal waterway ship route planning method according to claim 2, characterized by, The cost function is specifically: wherein, represents the current leaf node; represents the cost of node ; represents the neighbor leaf node of the current leaf node; represents the cost of node ; represents the lane preference factor; represents the Euclidean distance from the current leaf node to the neighbor leaf node; represents the Euclidean distance from node to the end point of the planned path.
4. The coastal waterway ship route planning method according to claim 3, characterized by, The heading determination function is specifically: wherein, represents an angle difference between a current heading of the ship and a channel heading prescribed by a channel in which the ship is currently located in the path generation; represents a minimum value; represents a heading of the ship in the path generation; represents a channel heading prescribed by a channel in which the ship is currently located; represents a coordinate of a current position of the ship; represents a coordinate of a previous position of the ship; represents an arc tangent function.
5. The coastal waterway ship route planning method according to claim 4, characterized by, The channel preference factor is specifically: wherein, represents a channel preference factor; represents a basic cost; represents a weight; represents a weight when the channel zoned type is a main traffic zone; represents a weight when the channel zoned type is a transition zone.
6. The coastal waterway ship route planning method according to claim 2, wherein The setting of the segment lines at the turning points of the channel according to the vectorized geographic element file to segment and regularize the channel to obtain channel segments specifically comprises the following steps: extracting channel boundaries from the vectorized geographic element file, wherein the channel boundaries are composed of a plurality of channel segment boundaries; calculating an included angle of adjacent channel segment boundaries along the channel boundaries, and determining an intersection point of the adjacent channel segment boundaries as a turning point of the channel when the included angle is greater than a threshold value; at the turning point, setting a direction of a segment line according to an azimuth angle of a channel segment boundary: when the azimuth angle falls within a range of 0°±45° or 180°±45°, the direction of the segment line is set as a horizontal direction; when the azimuth angle does not fall within the range of 0°±45° and 180°±45°, the direction of the segment line is set as a vertical direction; the segment line extends to the channel segment boundary on both sides until it intersects the channel segment boundary, and a plurality of channel initial segments are obtained; when a length of a channel initial segment path is not greater than a preset length, the channel initial segment is set as a channel final segment; when the length of the channel initial segment is greater than the preset length, an equal-interval segment line is supplemented to the channel initial segment to make the length of the channel initial segment not greater than the preset length, and a channel final segment is obtained; the plurality of channel final segments are summarized to obtain channel segments.
7. The coastal waterway ship route planning method according to claim 2, characterized by, The final optimized path generation specifically comprises the following steps: The initial paths located in the fairway are divided into fairway initial paths respectively, and the initial paths not located in the fairway are divided into free space segment paths respectively; Each of the fairway initial paths is segmented according to a fairway segment to obtain a fairway segment path; The fairway segment paths and the free space segment paths are respectively simplified by using an RDP algorithm to reduce redundant nodes and unnecessary turns of the initial paths, and a final optimized path is generated.
8. The coastal waterway ship route planning method according to any one of claims 1 to 7, characterized by, In the electronic chart preprocessing, the electronic chart data comprises S-57 or S-101 standard data, and the extracted geographic elements comprise a fairway, land and a water depth area.
9. The coastal waterway ship route planning method according to claim 8, wherein, In the adjacency graph generation, an area with a water depth less than a ship safety water depth in the water depth area is divided into a shallow water area, an area with a water depth not less than the ship safety water depth in the water depth area is divided into a deep water area, the shallow water area and the land are divided into an unnavigable area, and the deep water area is divided into a navigable area; the fairway, the unnavigable area and the navigable area are differentiated and subdivided and marked based on a quadtree multi-strategy modeling method to construct an environment model.
10. The coastal waterway ship route planning method according to claim 9, wherein The construction of the environment model specifically comprises the following strategies: Generating a leaf node: Generating an initial quadtree node; For the fairway, a uniform subdivision strategy is used to subdivide the initial quadtree node located in the fairway to a preset depth to generate leaf nodes of equal size; For the unnavigable area, a boundary trigger subdivision strategy is used to trigger subdivision only when the boundary of the unnavigable area intersects with the initial quadtree node, and the leaf nodes are generated after the initial quadtree node is subdivided to a specified depth; For the navigable area, a hierarchical marking strategy is used to subdivide the initial quadtree node located in the deep water area to a specified depth to generate leaf nodes; Marking the leaf nodes: Adding a fairway mark on the leaf nodes located in the fairway, adding an unnavigable mark on the leaf nodes located in the unnavigable area, and adding a navigable mark on the leaf nodes located in the navigable area.
Citation Information
Patent Citations
Ship path planning method based on improved fast search random tree
CN118362130A
Robot path planning method based on K-value adaptive multi-algorithm cooperation
CN120370907A