A graph-based method for optimizing the placement of maritime obstacles
By employing a graph theory-based approach, grid discretization, mask construction, and adaptive sampling density, combined with a 0-1 breadth-first search algorithm, the deployment of obstacles at sea is optimized, solving the problems of limited equipment quantity and sea area complexity, and achieving a continuous blockade chain with the fewest equipment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA STATE SHIPBUILDING CORP LTD RESEARCH INSTITUTE 719
- Filing Date
- 2026-03-25
- Publication Date
- 2026-06-19
AI Technical Summary
Existing technologies struggle to achieve optimal global configuration in the deployment of maritime obstacles under conditions of limited equipment quantity and complex sea areas, and fail to effectively utilize natural obstacles to form a continuous blockade chain.
Using a graph theory-based approach, the problem is transformed into a shortest path problem through grid discretization, mask construction, adaptive sampling density, and weighted graph model. Combined with a 0-1 breadth-first search algorithm, the device deployment location and the utilization of natural obstacles are optimized.
It has achieved systematic optimization of the deployment of obstacles at sea, reduced the number of devices, improved computing efficiency, made full use of natural obstacles, formed a continuous blockade chain, and improved the efficiency of equipment resource utilization.
Smart Images

Figure CN122242148A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of marine obstacle placement planning technology, and in particular to a method for optimizing marine obstacle placement based on graph theory. Background Technology
[0002] In setting up maritime barriers, it is necessary to deploy equipment and other obstacles in the target vessel's shipping lane to effectively restrict the passage of vessels. Traditional deployment schemes often rely on manual experience and lack systematic optimization methods, resulting in the use of a large number of devices and difficulty in fully utilizing natural barriers such as islands and coastlines. In actual missions, deployment faces multiple constraints: First, the number of devices is limited, requiring optimal configuration within budget constraints; second, the marine topography is complex, containing different water depth zones, with some areas unsuitable for deployment or navigable; third, it is necessary to ensure a continuous chain of barriers in the lateral direction of the shipping lane, leaving no gaps for target vessels to pass through.
[0003] Existing equipment deployment methods primarily rely on empirical judgment and qualitative assessment. Some studies employ multi-level comprehensive evaluation methods to optimize deployment areas or use heuristic algorithms such as genetic algorithms and simulated annealing algorithms to optimize deployment schemes. However, these methods often struggle to guarantee the global optimality of deployment schemes when considering the coupling of multiple factors such as sea topography, water depth zoning, distribution of natural obstacles, and equipment coverage area. Furthermore, they suffer from low computational efficiency and are unsuitable for the rapid planning needs of large-scale sea areas.
[0004] Chinese patent application publication number CN108564214A discloses an optimal model for mine-laying zones. This technical document constructs a multi-level evaluation system using indicators such as the effectiveness of mine obstacle operations, vessel passage through the minefield, enemy mine-hunting capabilities, troop and firepower requirements, and comprehensive operational indicators of mine-laying aircraft. It employs a fuzzy comprehensive evaluation method to assess and rank multiple pre-selected mine-laying areas, thereby selecting the optimal area. This technical solution primarily focuses on the selection of mine-laying areas. By establishing quantitative models of mine obstacle damage probability, blockade time, and survivability, combined with calculations of route safety and mission effectiveness, it achieves a comprehensive evaluation of candidate areas. However, this method fails to effectively address how to determine the optimal spatial deployment location of equipment within a given equipment deployment area, and how to utilize natural obstacles to form a continuous blockade chain with the minimum number of equipment. Summary of the Invention
[0005] In view of this, the present invention provides a graph theory-based method for optimizing the deployment of obstacles at sea, in order to solve the problems of how to determine the optimal spatial deployment location of equipment within a given deployment area, and how to utilize natural obstacles to form a continuous blockade chain with the minimum number of equipment.
[0006] The technical solution of this invention is implemented as follows: This invention provides a graph theory-based method for optimizing the placement of obstacles at sea, comprising the following steps: S1. The target sea area is processed by the grid discretization method to obtain a two-dimensional grid matrix nautical chart, and the channel area and obstacle connected components in the nautical chart are extracted. S2. The nautical chart is processed using a mask construction strategy to obtain an effective deployment area; S3. An adaptive sampling density mechanism is used to process the available deployment area to obtain a set of candidate deployment point locations; S4. A graph model construction strategy is used to process the candidate deployment point location set, obstacle connectivity and channel boundary to construct a weighted graph model containing nodes, edges and edge weights. S5. A search algorithm is used to process the weighted graph model, transforming the optimal layout chain problem into the shortest path problem from the upper boundary of the channel to the lower boundary of the channel, thus obtaining the optimal layout chain.
[0007] Based on the above technical solutions, preferably, in step S1, the grid points of the target sea area are classified and marked according to the water depth threshold, specifically including: dividing the target sea area into land area, shallow water area, medium water area, deep water area and deep sea area according to the water depth threshold, and classifying and marking according to different areas.
[0008] Based on the above technical solutions, preferably, step S2 specifically includes: S21. Construct various types of masks based on mission requirements and sea area characteristics, including channel masks based on the upper and lower boundaries of the channel, ring masks based on the port radius, permissible deployment masks based on water depth classification results, and obstacle masks based on obstacle connectivity blocks. S22. Calculate the intersection of the channel mask, the ring mask, and the allowed mask to be deployed to obtain the effective deployment area.
[0009] Based on the above technical solutions, preferably, the construction method of the annular mask includes: setting the coordinates of the center point of the port, the inner radius and the outer radius, marking the grid points with a distance from the center point of the port ≥ the inner radius and ≤ the outer radius as the annular region, thereby obtaining the annular mask.
[0010] Based on the above technical solutions, preferably, step S3 specifically includes: dividing the deployable effective area into several grid cells, calculating the reciprocal of the weighted harmonic mean distance from the center point of each grid cell to all connected obstacle blocks as the obstacle field potential, using a mapping function to convert the obstacle field potential into the adaptive sampling density of the grid cell, sampling in each grid cell according to the adaptive sampling density, and obtaining a set of candidate deployment point locations.
[0011] Based on the above technical solutions, preferably, the formula for calculating the adaptive sampling density is as follows: Let the coordinates of the center point of the grid cell be... The baseline sampling density is The obstacle field potential is The reference potential value is Adaptive sampling density of grid cells The calculation formula is: ; in, It is the hyperbolic tangent function. This represents the median of the field potential across all grid cells.
[0012] Based on the above technical solutions, preferably, step S4 specifically includes: abstracting candidate deployment points, obstacle connected blocks, upper boundary of the channel, and lower boundary of the channel as nodes of a graph; establishing edge connections based on the distance relationship between candidate deployment points, the intersection relationship between the action coverage circle of the candidate deployment points and the obstacle connected blocks, and the connection relationship between the channel boundary and other nodes; setting edge weights according to the node type of the edge connection, wherein the edge weight between candidate deployment points is set to 1, and the edge weight between candidate deployment points and obstacle connected blocks is calculated based on the overlap between the action coverage circle and the obstacle, thus obtaining a weighted graph model.
[0013] Based on the above technical solutions, preferably, the edge weight calculation method between the candidate deployment point and the obstacle connectivity block is as follows: Let the candidate deployment point... The function of covering the circle and connecting the obstacle block The area of the intersecting region on the two-dimensional plane is The effective radius of the equipment is overlap The calculation formula is: ; edge weight Defined as: ; in, The penalty coefficient is a small positive number.
[0014] Based on the above technical solutions, the preferred approach is to use a 0-1 breadth-first search algorithm to find the shortest path from the upper boundary to the lower boundary of the channel in the weighted graph model. Specifically, this involves maintaining a double-ended queue and a distance array. Initially, the distance to the upper boundary of the channel is set to zero, and the distances of the remaining nodes are set to infinity. The upper boundary of the channel is added to the double-ended queue. The algorithm iteratively extracts the head node from the double-ended queue and performs relaxation operations on each of its outgoing edges. Based on the edge weight, the updated node is added to the head or tail of the double-ended queue. When the lower boundary of the channel is extracted from the queue, its distance value is the number of devices to be deployed. The optimal deployment chain is obtained by backtracking the predecessor node.
[0015] Based on the above technical solutions, preferably, the rule for adding the updated node to the head or tail of the double-ended queue according to the edge weight is as follows: when the edge weight is less than a preset threshold, the node is added to the head of the queue; when the edge weight is greater than or equal to the preset threshold, the node is added to the tail of the queue. The preset threshold ranges from 0.5 to 1.
[0016] The present invention has the following advantages over the prior art: (1) This invention models the problem of setting up obstacles at sea as a shortest path problem in a weighted graph model, thereby achieving systematic optimization of channel blockade schemes. This method comprehensively considers multiple constraints such as sea area topography, water depth zoning, distribution of natural obstacles, and equipment coverage. Under the premise of ensuring continuous blockade in the lateral direction of the channel, it automatically generates the blockade chain with the fewest equipment, overcoming the limitation of traditional empirical methods in achieving global optimal configuration, and providing quantitative decision support for setting up obstacles at sea.
[0017] (2) This invention employs an adaptive sampling density mechanism, which calculates the obstacle potential to reflect the accessibility of each grid cell to natural obstacles. It utilizes a hyperbolic tangent mapping function to reduce the density of candidate points in densely obstacle-prone areas and maintain the baseline density in sparsely obstacle-prone areas, thus adaptively matching the distribution of candidate deployment points with local terrain features. This mechanism reduces the number of redundant candidate points while ensuring the continuity of the blockade chain and the quality of the solution, thereby reducing the computational scale of graph model construction and path search, and improving the algorithm's execution efficiency.
[0018] (3) This invention employs a 0-1 breadth-first search algorithm to solve the weighted graph model. This algorithm utilizes the hierarchical structure of edge weights, adding nodes to the head or tail of the queue based on edge weights using a double-ended queue, thus avoiding the logarithmic overhead of maintaining priority queues in the traditional Dijkstra algorithm. By abstracting natural obstacle connected components into graph nodes and setting near-zero weight connecting edges, the shortest path algorithm can automatically identify and utilize natural barriers such as islands and coastlines as low-cost relay nodes in the blockade chain. This mechanism fully leverages the blocking effect of natural terrain, significantly reducing equipment consumption and improving the utilization efficiency of limited equipment resources compared to schemes that rely solely on uniform equipment deployment. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart of the graph theory-based method for optimizing the placement of obstacles at sea according to the present invention. Figure 2 This is a flowchart illustrating the mask construction strategy in step S2 of the present invention. Figure 3 This is a schematic diagram of the process for solving the optimal deployment chain path in step S5 of the present invention. Detailed Implementation
[0021] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0022] like Figure 1 As shown, this invention provides a graph theory-based method for optimizing the placement of obstacles at sea, comprising the following steps: S1. The target sea area is processed by the grid discretization method to obtain a two-dimensional grid matrix nautical chart, and the channel area and obstacle connected components in the nautical chart are extracted. S2. The nautical chart is processed using a mask construction strategy to obtain an effective deployment area; S3. An adaptive sampling density mechanism is used to process the available deployment area to obtain a set of candidate deployment point locations; S4. A graph model construction strategy is used to process the candidate deployment point location set, obstacle connectivity and channel boundary to construct a weighted graph model containing nodes, edges and edge weights. S5. A search algorithm is used to process the weighted graph model, transforming the optimal layout chain problem into the shortest path problem from the upper boundary of the channel to the lower boundary of the channel, thus obtaining the optimal layout chain.
[0023] In one embodiment of the present invention, step S1 includes: discretizing the target sea area into grid points according to a certain spatial resolution to form a two-dimensional grid matrix nautical chart, where each grid point records its geographic coordinates and water depth information. The spatial resolution is set according to the size of the sea area and the accuracy requirements; for typical nearshore target sea areas, the grid spacing is usually set to 50 meters to 200 meters. During the grid discretization process, the sea area is divided into... The matrix, where This represents the number of horizontal grid points. The number of vertical grid points, each grid point Corresponding geographic coordinates The depth information is obtained through linear mapping. It is extracted from ocean depth databases or electronic charts, and the continuous depth field is discretized to grid points using bilinear interpolation or nearest neighbor interpolation methods.
[0024] The target sea area is classified and labeled according to water depth thresholds. Specifically, the target sea area is divided into land areas, shallow water areas, mid-water areas, deep water areas, and deep-sea areas based on water depth thresholds, and then classified and labeled according to different areas. Land areas are labeled as Category 4, shallow water areas (0-200 meters deep) as Category 3, mid-water areas (200-500 meters deep) as Category 2, deep water areas (500-1000 meters deep) as Category 1, and deep-sea areas (>1000 meters deep) as Category 0. This water depth classification standard is based on the operating water depth range of typical equipment and the navigation water depth requirements of target vessels. Shallow and mid-water areas are suitable for deploying anchored and bottom-mounted equipment, while the water depth in deep and deep-sea areas is too great, significantly reducing equipment efficiency.
[0025] The navigation channel area is defined by a broken line at the upper boundary. and the lower boundary broken line The channel is delineated to form a passageway for target vessels. The channel boundary is typically formed by connecting multiple polyline segments, each defined by several inflection points. For any x-coordinate... The corresponding upper boundary ordinate is calculated using linear interpolation. and lower boundary ordinate The width of the channel is $ The width of the channel is set according to its actual width, usually 3 to 5 times the width of the target vessel, to ensure that the target vessel has enough maneuvering space.
[0026] Connected components marked as land areas are extracted from nautical charts using a connected component analysis algorithm. These components are then used as obstacle connected components, with each obstacle connected component recording its boundary polygon coordinates and center point position. Connected component analysis employs either 4-connectivity or 8-connectivity criteria, identifying all grid points marked as category 4 from the chart matrix and merging adjacent grid points into the same connected component. For each connected component, a boundary tracing algorithm is used to extract its contour, generating a sequence of vertex coordinates for the boundary polygon. The boundary polygon vertices are stored in clockwise or counterclockwise order for easier subsequent geometric calculations. (Obstacle center point coordinates are also included.) The center position can be obtained by calculating the arithmetic mean of the coordinates of all grid points within the connected component, or by using the polygon centroid calculation method to obtain a more accurate center position. For connected components with very small areas, such as those smaller than the area of the circle covering the device's function. 10% can be filtered out to simplify subsequent calculations.
[0027] In one embodiment of the present invention, such as Figure 2 As shown, step S2 specifically includes: S21. Construct various types of masks based on mission requirements and sea area characteristics, including channel masks based on the upper and lower boundaries of the channel, ring masks based on the port radius, permissible deployment masks based on water depth classification results, and obstacle masks based on obstacle connectivity blocks.
[0028] Channel mask Mark the area actually traversed by the target vessel for any grid point on the nautical chart. If its ordinate satisfies If a grid point is within a channel region, it is marked as 1 in the channel mask; otherwise, it is marked as 0. Constructing the channel mask requires traversing all grid points of the chart matrix and performing boundary checks on each grid point, resulting in a computational complexity of O(n log n). .
[0029] The construction method of the annular mask includes: setting the coordinates of the center point of the port. , inner radius and outer radius Grid points whose distance from the port center is greater than or equal to the inner radius and less than or equal to the outer radius are marked as annular regions, thus obtaining annular masks. Specifically, for any grid point on the nautical chart... Calculate its Euclidean distance to the center point of the port. ,like If the grid point belongs to the annular region, then it is within the annular mask. The inner radius is marked as 1 if it is not in the middle, and 0 otherwise. This is typically set as a protection zone for port facilities, such as 1-3 kilometers, to ensure that no equipment is deployed near the port to avoid accidentally damaging friendly vessels. Outer radius The target mission scope is set according to the distance the target vessel travels from the open sea to the port, typically ranging from 10 to 50 kilometers. For multiple ports, multiple annular masks can be constructed and their union operations performed.
[0030] Allowing the deployment of masks Based on the water depth classification results, for any grid point in the nautical chart If the water depth category is shallow water or medium water (category 2 or 3), deployment is allowed and marked as 1 in the allowed deployment mask. If the water depth category is deep water, deep sea, or land (category 0, 1, or 4), deployment is prohibited and marked as 0 in the allowed deployment mask. The construction of the allowed deployment mask is directly based on the water depth classification result in step S1, without the need to repeatedly calculate the water depth threshold judgment.
[0031] Obstacle Mask Based on the construction of obstacle-connected components, for any grid point in the nautical chart If a node belongs to any connected component of an obstacle, it is marked as 1 in the obstacle mask; otherwise, it is marked as 0. The obstacle mask is used to identify the spatial distribution of natural obstacles. Although obstacles themselves cannot be placed, they participate in path planning as virtual nodes in the subsequent graph model construction.
[0032] S22. Calculate the intersection of the channel mask, the ring mask, and the permitted mask placement area to obtain the effective placement area. For any grid point on the nautical chart... If it is marked as 1 in all three categories of channel mask, annular mask, and permissible deployment mask, then it satisfies the condition. and and If the grid point belongs to the effective deployment area, then a mask is applied within the effective deployment area. If the mask intersection is true, it is marked as 1; otherwise, it is marked as 0. The mask intersection operation uses a pointwise logical AND operation, with a computational complexity of O(n log n). The area of the deployable effective area typically accounts for 50% to 80% of the total waterway area, with the specific proportion depending on the marine topography and port distribution. To eliminate jagged burrs at the mask boundaries, morphological closing or opening operations can be performed on the deployable effective area mask, and smoothing can be achieved using structuring elements with a radius of 1 to 2 times the grid spacing.
[0033] In one embodiment of the present invention, step S3 specifically includes: dividing the deployable effective area into several grid cells, calculating the reciprocal of the weighted harmonic mean of the distance from the center point of each grid cell to all connected obstacle blocks as the obstacle field potential, using a mapping function to convert the obstacle field potential into the adaptive sampling density of the grid cell, sampling in each grid cell according to the adaptive sampling density, and obtaining a set of candidate deployment point locations.
[0034] The deployable area is divided into several square or rectangular grid units according to the set grid size, which is usually the radius of the equipment's effective range. The mesh size is 0.5 to 2 times larger than the solution size. The choice of mesh size needs to be balanced between computational efficiency and solution accuracy. If the mesh size is too small, the number of mesh cells will be too large, increasing the computational cost. If the mesh size is too large, the flexibility of candidate point distribution will be reduced.
[0035] For each grid cell, calculate the coordinates of its center point. The reciprocal of the weighted harmonic mean of the distances to all connected components of obstacles is used as the obstacle potential. The formula for calculating the field potential of an obstacle is: ; in For the set of connected components of obstacles, Center point of the grid cell Connecting blocks to obstacles The shortest Euclidean distance to the boundary. The regularization parameter is used to avoid the denominator being zero, and is usually taken as the radius of the device's action. 0.1 times, This represents the total number of connected components with obstacles. Shortest distance. The calculation is performed by traversing all line segments of the obstacle boundary polygon and calculating the points. The minimum distance to each line segment is taken as the shortest distance. The distance from a point to a line segment is calculated using analytical geometry methods, for each line segment endpoint... and First, determine whether the projection of the point onto the line segment falls within the line segment's range. If the projection falls within the line segment, the distance is the perpendicular distance from the point to the line; otherwise, the distance is the distance from the point to the nearest endpoint. Obstacle potential. The larger the value, the closer the location is to the obstacle, and the greater the potential to utilize the obstacle.
[0036] The formula for calculating adaptive sampling density is: Let the coordinates of the center point of the grid cell be... The baseline sampling density is The obstacle field potential is The reference potential value is Adaptive sampling density of grid cells The calculation formula is: ; in, It is the hyperbolic tangent function. The median of the potential across all grid cells. The baseline sampling density, i.e., the number of candidate points per unit area, is typically set based on the size of the sea area and computational resources. For a typical sea area... The baseline sampling density can be set to 1-5 candidate points per square kilometer. Hyperbolic tangent function. Mapping the potential value to an interval On the spot Much larger than the reference value hour Approaching 1, the current situation Much smaller than the reference value hour Approaching zero.
[0037] According to the calculated sampling density within each grid cell Sampling is performed to generate a set of candidate deployment point locations. Sampling methods can employ Poisson disk sampling or hierarchical sampling to ensure minimum spacing between candidate points and prevent them from becoming too densely packed. Poisson disk sampling generates candidate points that satisfy the minimum spacing constraint through a rejection mechanism; the minimum spacing is typically set to the device's effective radius. The sampling density is 0.5 to 1 times the sampling density to ensure that candidate points are not overly concentrated. Hierarchical sampling further subdivides the grid cells into several sub-grids, and randomly generates a candidate point in each sub-grid. The number of samples is determined by the sampling density. The product of the sampling density and the area of the grid cell determines the sampling point. For grid cells with a sampling density close to zero, the sampling process can be skipped to save computational costs, but it is necessary to ensure that at least one of the adjacent grid cells contains a candidate point to avoid breakage of the chain of blockade.
[0038] This adaptive sampling strategy matches the number of candidate points with the local obstacle distribution characteristics, reducing computational overhead in densely obstacle-prone areas and ensuring solution quality in sparsely obstacle-prone areas. Through a potential-driven density adjustment mechanism, the total number of candidate points can be reduced while maintaining the quality of the blockade chain.
[0039] In one embodiment of the present invention, step S4 specifically includes: abstracting candidate deployment points, obstacle connected blocks, upper boundary of the channel, and lower boundary of the channel as nodes of a graph; establishing edge connections based on the distance relationship between candidate deployment points and the intersection relationship between the action coverage circle of the candidate deployment points and the obstacle connected blocks; setting edge weights according to the node type of the edge connections, wherein the edge weight between candidate deployment points is set to 1, and the edge weight between candidate deployment points and obstacle connected blocks is calculated based on the overlap between the action coverage circle and the obstacle, thereby obtaining a weighted graph model.
[0040] Build a graph model , where the set of nodes From the set of candidate deployment points Set of obstacle connected components and the boundary nodes on the waterway and the lower boundary node of the channel Composition, total number of nodes Boundary nodes on the waterway and the lower boundary node of the channel It is a virtual super node used to connect candidate deployment points or obstacles located near the channel boundary, unifying the optimal deployment chain solution problem into a single-source, single-sink shortest path problem.
[0041] edge set Established according to the following rules: for any two candidate deployment points and If their Euclidean distance satisfies ,in The effective radius of the equipment. and Candidate deployment points and The coordinates are then at the node. and nodes An edge is established between them, with the edge weight set to 1. This distance threshold. Ensure that the coverage circles of two adjacent devices can be connected or partially overlap, forming a continuous blockade zone. To improve the computational efficiency of edge connection establishment, a spatial index data structure such as a kd-tree or quadtree can be used to organize candidate deployment points according to their spatial location, enabling quick lookup of distances to a specific candidate deployment point. All neighboring nodes within the range. The number of edge connections between candidate deployment points is typically [number missing]. The average number of neighbors for each candidate deployment point is constant and does not increase with the total number of nodes.
[0042] The edge weights between candidate deployment points and obstacle connected components are calculated as follows: Let the candidate deployment point... The function of covering the circle and connecting the obstacle block The area of the intersecting region on the two-dimensional plane is The effective radius of the equipment is overlap The calculation formula is: ; in To determine the area of the intersection between the circle and the obstacle, calculations are performed using... Center of the circle The intersection area is obtained by finding the geometric area of the intersection between a circle with a radius equal to the boundary polygon of the obstacle. The intersection area is calculated using either the Sutherland-Hodgman polygon clipping algorithm or the Monte Carlo random sampling method. The Sutherland-Hodgman algorithm approximates the circle as a regular polygon, typically using a 36-sided or 72-sided polygon to ensure accuracy, and then calculates the intersection area of the two polygons. The Monte Carlo method generates random points uniformly within the covering circle, counts the proportion of points falling inside the obstacle polygon, and multiplies this proportion by the area of the circle to obtain an approximate intersection area. This method is simple to implement, but its accuracy depends on the number of sampling points. Overlap The value range is [0, 1]. The overlap is 1 when the covering circle is completely contained inside the obstacle, and close to zero when the covering circle is only tangent to the boundary of the obstacle.
[0043] edge weight Defined as: ; in, This is a small positive penalty coefficient, ranging from 0.01 to 0.1, typically 0.05. When the covering circle does not intersect with an obstacle, no edge connection is established, equivalent to an infinite edge weight; when the covering circle intersects with an obstacle, the edge weight is calculated based on the overlap. The square root function of the overlap is used. Rather than the overlap itself, the goal is to generate a more significant weight difference when the overlap is small, prompting the algorithm to prioritize connections with greater overlap with obstacles. When the overlap... Time weight is zero when overlap is zero Time weighting A smooth transition between the two. Penalty coefficient. The choice affects the cost of obstacle connection. When the value is small, the algorithm tends to utilize obstacles more. When the value is large, the algorithm tends to balance its preference for obstacles and candidate deployment points.
[0044] For the boundary node on the waterway This establishes edge connections between the candidate deployment point and any obstacle located near the upper boundary of the channel. Specifically, for candidate deployment points... If its ordinate satisfies Then at the boundary node on the waterway With candidate deployment points Establish edges connecting the components with obstacles, and set the edge weight to 0. If the shortest distance from any vertex of its boundary polygon to the upper boundary of the channel does not exceed Then at the boundary node on the waterway and obstacles An edge is established between them, with the edge weight set to 0. Similarly, for the lower boundary node of the channel... This connects the candidate deployment point or obstacle located near the lower boundary of the channel with edges, each with a weight of 0. These edges with weights of 0 ensure that the connection from the channel boundary to the candidate deployment point or obstacle does not increase the path cost, allowing the path search algorithm to successfully start from the source node. Departure and eventual arrival at the rendezvous point .
[0045] In the weighted graph model established using the above rules, the edge weights are expanded from strictly 0-1 binary values to... The graph model has a hierarchical structure where an edge weight of 1 between candidate deployment points represents deploying a device, an edge weight close to zero between a candidate deployment point and an obstacle represents the minimal cost of utilizing the obstacle, and an edge weight of 0 between channel boundary nodes represents a virtual connection with no actual cost. The number of edges in the graph model is... Usually to The specific value depends on the spatial distribution density of candidate deployment points and obstacles.
[0046] In one embodiment of the present invention, such as Figure 3 As shown, in step S5, the 0-1 breadth-first search algorithm is used to solve for the shortest path from the upper boundary to the lower boundary of the channel in the weighted graph model. Specifically, this includes: maintaining a double-ended queue and a distance array. Initially, the distance of the upper boundary of the channel is set to zero, and the distances of the other nodes are set to infinity. The upper boundary of the channel is added to the double-ended queue. The algorithm iteratively extracts the head node from the double-ended queue and performs relaxation operations on each of its outgoing edges. The updated node is added to the head or tail of the double-ended queue according to the edge weight. When the lower boundary of the channel is extracted from the queue, its distance value is the number of devices to be deployed. The optimal deployment chain is obtained by backtracking the predecessor node.
[0047] The specific execution process of the 0-1 breadth-first search algorithm is as follows: Initialize the distance array The length is the total number of nodes. Set the distance to the boundary nodes on the waterway. All other nodes distance Initialize the predecessor node array. The length is the total number of nodes. This is used to record the predecessor node of each node in the shortest path. Initially... Represents a node Not yet accessed. Initialize double-ended queue. The boundary nodes on the waterway Add to a deque. A deque supports insertion and deletion operations at both the front and rear, with a time complexity of O(n log n). This can be implemented using a doubly linked list or a circular array.
[0048] The following operation is performed repeatedly until the deque is empty or the lower boundary node of the channel is removed: Remove the head node from the deque. ,like Lower boundary node of the channel If the distance to the array is reached, the algorithm terminates. This is the shortest path cost. For a node... Each outgoing edge ,in For adjacent nodes, Calculate the new distance using the edge weights. .like Then update Record the predecessor node And based on edge weights Node Add to the deque. If the node If a data point is already in the queue, it will not be added again. A boolean array can be maintained. Record the queue status of the node.
[0049] The rule for adding updated nodes to the head or tail of a double-ended queue based on edge weight is as follows: when the edge weight is less than a preset threshold, the node is added to the head of the queue; when the edge weight is greater than or equal to the preset threshold, the node is added to the tail of the queue. The preset threshold is typically set to 0.5, since the edge weight between the candidate deployment point and the obstacle is... Its maximum value is Typically, the weight of an edge is no more than 0.1, far less than the threshold of 0.5. Therefore, the nodes corresponding to these edges are added to the front of the queue, prioritizing the exploration of paths utilizing obstacles. Edges between candidate deployment points have a weight of 1, greater than the threshold of 0.5, so the nodes corresponding to these edges are added to the back of the queue, delaying the exploration of paths requiring additional deployment. Edges at channel boundaries have a weight of 0, less than the threshold, and the corresponding nodes are added to the front of the queue. This queueing strategy essentially prioritizes nodes according to their edge weights; nodes corresponding to edges with smaller weights have higher priority, ensuring the algorithm prioritizes expanding paths with lower costs.
[0050] When the lower boundary node of the channel When removed from the queue, That is, from the upper boundary of the waterway to the lower boundary of the channel The shortest path cost corresponds to the minimum number of devices required to be deployed. Since an edge weight of 1 represents the deployment of one device, the edge weight is... The level represents the minimal cost of utilizing obstacles; therefore, the integer part of the shortest path cost is the actual number of obstacles deployed, and the decimal part is the cumulative cost of connecting obstacles. This is achieved by backtracking the predecessor node array. From the lower boundary node of the waterway Begin, visit in sequence , Wait for the precursor node, until the upper boundary node of the channel is reached. This yields the complete blockade chain path. The candidate deployment nodes corresponding to edges with a weight of 1 in the path are the actual deployment locations; the coordinates of these candidate deployment points are recorded. This forms the optimal spatial layout scheme for the blockade chain. Obstacle nodes in the path are recorded as relay nodes of the blockade chain, identifying which natural obstacles the blockade chain utilizes.
[0051] The time complexity of the 0-1 breadth-first search algorithm is O(n). ,in This represents the total number of nodes in the graph. Let be the total number of edges in the graph. This algorithm can find the shortest path in linear time for graphs with edge weights of 0-1 or approximately 0-1, ensuring computational efficiency for large-scale marine deployment planning. Compared to the traditional Dijkstra's algorithm, its time complexity is significantly lower. The 0-1 breadth-first search algorithm utilizes the special structure of edge weights and maintains the access order of nodes through a double-ended queue, avoiding the maintenance overhead of priority queues and significantly improving the algorithm efficiency.
[0052] This invention introduces an obstacle potential-guided adaptive sampling density mechanism, achieving adaptive matching between candidate point distribution and local terrain features. This reduces the number of candidate points while ensuring the continuity of the blockade chain, lowering the computational complexity of subsequent graph model construction and path search. By introducing an overlap-based edge weighting mechanism, the connection strength between obstacles and candidate deployment points is quantified into continuous weight values, enabling the algorithm to prioritize connection paths with higher overlap with obstacles, improving the geometric rationality and blocking effect of the blockade chain. By transforming the blockade chain optimization problem into a shortest path problem in a weighted graph model and solving it using a 0-1 breadth-first search algorithm, the global optimization of the number of devices is achieved, ensuring a continuous blocking chain in the lateral direction of the waterway and fully utilizing the natural barrier function of natural obstacles.
[0053] The optimal deployment chain output by the algorithm satisfies the following condition: the number of devices in the blockade chain is equal to... That is, the shortest path cost from the upper boundary to the lower boundary of the channel is rounded down; the blockade chain guarantees continuous coverage from the upper boundary to the lower boundary of the channel, and the distance between adjacent candidate deployment points in the path does not exceed The function coverage circles of adjacent devices are connected or overlap, and there are no gaps through which target ships can pass; the blockade chain makes full use of obstacles as low-cost relay nodes, and the obstacle nodes included in the path do not increase or only increase the path cost slightly, thus minimizing the number of devices.
[0054] The final output includes the number of devices and their spatial coordinates in the blockade chain, the numbers of the connected components of obstacles in the blockade chain path, the total path cost and its decomposition, and a nautical chart visualization. The visualization uses the nautical chart matrix as a base map, overlaid with labeled polylines of the upper and lower boundaries of the channel, the outlines of the connected components of obstacles, the deployment ring area, the distribution of candidate deployment points, and the optimal deployment chain path.
[0055] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A graph theory-based method for optimizing the placement of obstacles at sea, characterized in that, Includes the following steps: S1. The target sea area is processed by the grid discretization method to obtain a two-dimensional grid matrix nautical chart, and the channel area and obstacle connected components in the nautical chart are extracted. S2. The nautical chart is processed using a mask construction strategy to obtain an effective deployment area; S3. An adaptive sampling density mechanism is used to process the available deployment area to obtain a set of candidate deployment point locations; S4. A graph model construction strategy is used to process the candidate deployment point location set, obstacle connectivity and channel boundary to construct a weighted graph model containing nodes, edges and edge weights. S5. A search algorithm is used to process the weighted graph model, transforming the optimal layout chain problem into the shortest path problem from the upper boundary of the channel to the lower boundary of the channel, thus obtaining the optimal layout chain.
2. The graph theory-based method for optimizing the placement of obstacles at sea as described in claim 1, characterized in that, In step S1, the grid points of the target sea area are classified and marked according to the water depth threshold. Specifically, the target sea area is divided into land area, shallow water area, medium water area, deep water area and deep sea area according to the water depth threshold, and classified and marked according to different areas.
3. The graph theory-based method for optimizing the placement of obstacles at sea as described in claim 2, characterized in that, Step S2 specifically includes: S21. Construct various types of masks based on mission requirements and sea area characteristics, including channel masks based on the upper and lower boundaries of the channel, ring masks based on the port radius, permissible deployment masks based on water depth classification results, and obstacle masks based on obstacle connectivity blocks. S22. Calculate the intersection of the channel mask, the ring mask, and the allowed mask to be deployed to obtain the effective deployment area.
4. The graph theory-based method for optimizing the placement of obstacles at sea as described in claim 3, characterized in that, The method for constructing the annular mask includes: setting the coordinates of the center point of the port, the inner radius, and the outer radius; marking grid points whose distance from the center point of the port is greater than or equal to the inner radius and less than or equal to the outer radius as annular regions, thus obtaining the annular mask.
5. The graph theory-based method for optimizing the placement of obstacles at sea as described in claim 1, characterized in that, Step S3 specifically includes: dividing the deployable effective area into several grid cells, calculating the reciprocal of the weighted harmonic mean of the distance from the center point of each grid cell to all connected obstacle blocks as the obstacle potential, using a mapping function to convert the obstacle potential into the adaptive sampling density of the grid cell, sampling in each grid cell according to the adaptive sampling density, and obtaining the set of candidate deployment point locations.
6. The graph theory-based method for optimizing the placement of obstacles at sea as described in claim 5, characterized in that, The formula for calculating the adaptive sampling density is as follows: Let the coordinates of the center point of the grid cell be... The baseline sampling density is The obstacle field potential is The reference potential value is Adaptive sampling density of grid cells The calculation formula is: ; in, It is the hyperbolic tangent function. This represents the median of the field potential across all grid cells.
7. The graph theory-based method for optimizing the placement of obstacles at sea as described in claim 1, characterized in that, Step S4 specifically includes: abstracting candidate deployment points, obstacle connected components, upper boundary of the channel, and lower boundary of the channel as nodes of a graph; establishing edge connections based on the distance relationship between candidate deployment points, the intersection relationship between the action coverage circle of the candidate deployment points and the obstacle connected components, and the connection relationship between the channel boundary and other nodes; setting edge weights according to the node type of the edge connection, wherein the edge weight between candidate deployment points is set to 1, and the edge weight between candidate deployment points and obstacle connected components is calculated based on the overlap between the action coverage circle and the obstacle, thus obtaining a weighted graph model.
8. The graph theory-based method for optimizing the placement of obstacles at sea as described in claim 7, characterized in that, The edge weights between the candidate deployment points and the obstacle connectivity blocks are calculated as follows: Let the candidate deployment points... The function of covering the circle and connecting the obstacle block The area of the intersecting region on the two-dimensional plane is The effective radius of the equipment is overlap The calculation formula is: ; edge weight Defined as: ; in, The penalty coefficient is a small positive number.
9. The graph theory-based method for optimizing the placement of obstacles at sea as described in claim 1, characterized in that, In step S5, the 0-1 breadth-first search algorithm is used to solve for the shortest path from the upper boundary to the lower boundary of the channel in the weighted graph model. Specifically, this includes maintaining a double-ended queue and a distance array. Initially, the distance to the upper boundary of the channel is set to zero, and the distances of the other nodes are set to infinity. The upper boundary of the channel is added to the double-ended queue. The algorithm iteratively extracts the head node from the double-ended queue and performs relaxation operations on each of its outgoing edges. The updated node is added to the head or tail of the double-ended queue according to the edge weight. When the lower boundary of the channel is extracted from the queue, its distance value is the number of devices to be deployed. The optimal deployment chain is obtained by backtracking the predecessor node.
10. The graph theory-based method for optimizing the placement of obstacles at sea as described in claim 9, characterized in that, The rule for adding the updated node to the head or tail of the double-ended queue based on the edge weight is as follows: when the edge weight is less than a preset threshold, the node is added to the head of the queue; when the edge weight is greater than or equal to the preset threshold, the node is added to the tail of the queue. The preset threshold ranges from 0.5 to 1.