A cable laying path planning optimization method and system
By constructing a fragment library and an anchor point retrieval and repair mechanism, the cable laying path planning is optimized, solving the problem of infeasible solutions generated by existing algorithms in a three-dimensional environment, and achieving efficient path planning and cost control.
Patent Information
- Application Number
- CN202611310947.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-27
- Publication Date
- 2026-11-27
AI Technical Summary
Existing path planning algorithms are prone to generating infeasible solutions with incomplete connectivity or local path collisions in three-dimensional constrained environments. Furthermore, they lack mechanisms for reusing and repairing local path segments, making it difficult for algorithms to plan cable laying paths that meet engineering constraints and overall cost requirements in obstacle-dense spaces.
A fragmented segment library is constructed by extracting continuous path segments that do not violate constraints in the cable laying environment. An initial child solution is generated through anchor point retrieval and local repair mechanism. By combining the co-evolution of the main population and the exploration population, the utility index of the path segment and the total cost are optimized to generate a good complete solution.
It improves the accuracy of cable laying path planning, reduces the risk of deadlock, enhances the convergence speed of the algorithm, and ensures that the path has both low laying cost and high engineering practicality.
Smart Images

Figure CN123180481A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of path planning and optimization, and in particular relates to a method and system for cable laying path planning and optimization. Background Technology
[0002] In real-world construction scenarios, cable laying typically requires navigating complex three-dimensional spaces while avoiding various structural obstacles, and must consider factors such as material consumption, construction difficulty, and local laying costs. Currently, cable laying path planning problems are usually solved automatically using swarm intelligence algorithms or heuristic algorithms based on 3D grid maps. These methods continuously iterate within an environment model that includes obstacle information, optional path nodes, and laying cost parameters to search for low-cost connected paths from the starting point to the ending point. However, in a constrained three-dimensional environment, due to the influence of spatial connectivity, obstacle distribution, and construction constraints, the algorithms are prone to generating incomplete solutions—i.e., incomplete solutions—when performing swarm operations such as intersection and mutation, resulting in incomplete connections between the starting and ending points or infeasible solutions where local paths collide or exceed bend limits.
[0003] For the aforementioned infeasible solutions, existing path planning algorithms typically employ a direct elimination strategy or reduce their retention probability by setting a large penalty function, thus removing them from the iterative population. This approach ignores the reusable local path information within the incomplete solution. In reality, even if an incomplete solution cannot achieve global connectivity, it may still contain continuous path segments that can avoid local obstacles, satisfy laying constraints, and have low cumulative costs. Directly discarding such solutions would result in the loss of excellent local search information accumulated in the early stages of the algorithm, increasing the overhead of repeated searches. Furthermore, existing technologies, when facing local path conflicts, typically lack a reuse and repair mechanism based on historical path segments, relying solely on random mutation for re-exploration. It is difficult to call upon existing high-quality segments for replacement and repair based on the safe node positions before and after the conflict point. Simultaneously, existing algorithms often employ a single population evolutionary mode, making it difficult to establish a feedback relationship between the utility of local path segments and the quality of the globally complete solution. This leads to the algorithm easily getting trapped in local optima in confined spaces with dense obstacles, making it difficult to plan cable laying paths that simultaneously meet engineering constraints and overall cost requirements. Summary of the Invention
[0004] This invention proposes a cable laying path planning and optimization method to solve the problem that existing technologies cannot plan cable laying paths that balance engineering constraints and overall cost, including: Based on the 3D grid map of the cable laying environment, an environmental model containing obstacles, optional path points, and laying costs is obtained, and the main population and exploration population are initialized according to the set start and end points. According to the constraint verification and cost evaluation results, when an incomplete solution is identified, the continuous path segments that do not violate the constraints in the incomplete solution are extracted, and an incomplete segment library is constructed based on the start and end coordinates, cumulative cost, and initial utility index of the continuous path segments. Two anchor points are generated based on the parent solutions selected from the main population. Target path segments are retrieved from the incomplete fragment library based on the anchor points, and the target path segments are connected to the two anchor points to obtain an initial child solution. When the initial child solution has constraint conflict points, a repair path segment is retrieved from the incomplete fragment library based on safe path points with a preset interval before and after the constraint conflict point, and the original path that caused the conflict is replaced to obtain a repaired child solution. The main population is updated based on the total cost index. The exploration population is updated based on the comprehensive evaluation value determined by the path segment utility index, the total cost of the candidate paths after connection, and the path segment quantity penalty term. When the main population generates a good complete solution, the utility index of the continuous path segments constituting the good complete solution in the incomplete fragment library is increased. When the preset convergence condition is met, the cable laying path is output based on the complete solution with the lowest total cost in the main population.
[0005] Furthermore, the present invention also relates to a cable laying path planning and optimization system, comprising: The construction module is used to acquire an environmental model containing obstacles, optional path points, and laying costs based on a 3D raster map of the cable laying environment, and initialize the main population and exploration population according to the set start and end points; based on the constraint verification and cost evaluation results, when an incomplete solution is identified, the continuous path segments that do not violate the constraints within the incomplete solution are extracted, and an incomplete segment library is constructed based on the start and end coordinates, cumulative cost, and initial utility index of the continuous path segments; The replacement module is used to generate two anchor points based on the parent solutions selected from the main population, retrieve target path segments in the incomplete fragment library according to the anchor points, and connect the target path segments with the two anchor points to obtain an initial child solution; when the initial child solution has a constraint conflict point, retrieve a repair path segment in the incomplete fragment library according to the safe path points with a preset interval before and after the constraint conflict point, and replace the original path that caused the conflict to obtain a repaired child solution; The output module is used to update the main population based on the total cost index, update the exploration population according to the comprehensive evaluation value determined by the path segment utility index, the total cost of the candidate paths after connection, and the path segment quantity penalty term, and when the main population generates a good complete solution, improve the utility index of the continuous path segments constituting the good complete solution in the incomplete fragment library; when the preset convergence condition is met, output the cable laying path according to the complete solution with the lowest total cost in the main population.
[0006] This invention constructs a fragment library by extracting and retaining continuous path segments that do not violate constraints from incomplete solutions. Simultaneously, it generates anchor points based on parent solutions to retrieve target path segments, and locally replaces constraint conflict points using repaired path segments from the fragment library. This fragment recombination and repair mechanism enhances solution accuracy and reduces deadlock risk. Through the co-evolution of the main population and the exploration population, combined with the feedback improvement of the path segment utility index from excellent complete solutions, the global search direction is rationally guided. This accelerates the algorithm's convergence speed while ensuring that all laying constraints are met, increasing the likelihood of obtaining low-overall-cost cable laying paths, and making the output path possess both low laying cost and high engineering practicality. Attached Figure Description
[0007] Figure 1 A flowchart for cable laying path planning and optimization methods; Figure 2 This is a schematic diagram for constraint conflict detection. Detailed Implementation
[0008] In this application, the terms "exemplarily" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplarily" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of terms such as "exemplarily" or "for example" is intended to present the relevant concepts in a specific manner.
[0009] Example 1 In Embodiment 1 of the present invention, a cable laying path planning and optimization method is provided, such as... Figure 1 As shown, it includes: S1. Based on the 3D grid map of the cable laying environment, an environmental model containing obstacles, optional path points, and laying costs is obtained, and the main population and exploration population are initialized according to the set start and end points. According to the constraint verification and cost evaluation results, when an incomplete solution is identified, the continuous path segments that do not violate the constraints in the incomplete solution are extracted, and an incomplete segment library is constructed based on the start and end coordinates, cumulative cost, and initial utility index of the continuous path segments.
[0010] Point cloud data of the physical environment of cable laying is acquired using LiDAR or 3D modeling software. This data is then divided into 3D cubic voxels with fixed side lengths, and a 3D Cartesian coordinate system is established. Voxels with physical obstacles are marked as impassable nodes, while voxels without obstacles are marked as optional path points. The basic distance cost for each optional path point to move to an adjacent node and the additional construction cost caused by changes in height are defined to construct an environmental model.
[0011] The system receives the user's input of the starting point's 3D coordinates and the ending point's 3D coordinates, and sets the population size. It uses a heuristic search algorithm with random perturbation to generate multiple initial paths connecting the starting and ending points as individuals in the main population, and a random walk algorithm to generate multiple candidate paths that do not fully connect the starting and ending points or partially violate constraints as individuals in the exploration population.
[0012] Constraint verification and cost assessment are performed on each individual in the exploration population. The process involves sequentially checking whether the line connecting adjacent nodes in the path intersects with an obstacle object, whether the deflection angle formed by three adjacent points exceeds the maximum allowable deflection angle, and calculating the total laying cost between all nodes in the path. If, during the verification process, it is found that the path passes through an obstacle or has an excessively large deflection angle that fails to meet the physical laying constraints, the path is determined to be an incomplete solution.
[0013] Disconnect the non-compliant node sequence from the incomplete solution, retaining continuous path segments before and after the breakpoint that are sequentially connected by multiple valid nodes and satisfy the laying constraints. Record the three-dimensional coordinates of the first and last nodes of each extracted continuous path segment, accumulate the laying costs between all adjacent nodes within the continuous path segment as the cumulative cost, and calculate the initial utility index of the continuous path segment based on the reciprocal of the sum of the cumulative cost and a preset zero-prevention constant. Bind and store the first and last coordinates, cumulative cost, and initial utility index into a dedicated data table to obtain the incomplete segment library.
[0014] In some embodiments, initializing the primary population and exploration population according to the set start and end points includes: Based on the set start and end points of the path, using The algorithm plans an unobstructed initial baseline path; Based on the initial baseline path, a normally distributed three-dimensional spatial noise signal with a mean of zero and a standard deviation of a set value is superimposed on the key control points and interpolated and smoothed to obtain all the initial solutions of the main population. Based on a preset map boundary range, multiple random path segments are generated iteratively through Brownian motion simulation and used as the initial solution for the exploration population.
[0015] During population initialization, input the set 3D starting point coordinates S(10.0,10.0,5.0) and ending point coordinates E(90.0,80.0,15.0), and call the standard... The algorithm uses the three-dimensional Euclidean distance between two points as a heuristic function to evaluate the cost. After avoiding obstacles marked as 1 in the three-dimensional occupied grid matrix, it generates an unobstructed initial baseline path composed of a series of discrete coordinate nodes.
[0016] Along the baseline path, at fixed arc length intervals, such as every 5.0 meters, a set of key control points is extracted. A noise vector following a normal distribution is independently superimposed onto the X, Y, and Z coordinate components of each control point. The distribution parameter is set to the mean. The standard deviation σ is set based on the environmental grid resolution and the width of the cable laying channel, and the disturbance control point with random small shifts in coordinate space is calculated. .
[0017] The cubic B-spline mathematical interpolation algorithm is invoked to perform curve fitting on the mutated discrete perturbation control point set, and the output is resampled to produce a smooth 3D path coordinate sequence. In the main thread, the above "noise perturbation + interpolation smoothing" operation is repeatedly executed 50 times using parallel computing, thereby obtaining 50 complete continuous routes with slight trajectory differences, which are used to construct all the initial solutions for the main population.
[0018] The geometric boundary constraints of the 3D working environment are analyzed, such as X∈[0,100]m, Y∈[0,100]m, Z∈[0,30]m. An initial 3D coordinate is randomly generated within the unobstructed airspace using a pseudo-random number generator as the diffusion starting point. Based on the Brownian motion mathematical model, a time step constant is configured. =0.1 seconds, diffusion coefficient The random spatial displacement increments in the X, Y, and Z directions are calculated based on the normal distribution with variance of 2·D·Δt.
[0019] Each random path iterates 20 times to accumulate displacement increments, forming multi-segmented short lines. If an intermediate node touches an obstacle matrix, it is truncated and discarded. This physical diffusion simulation is repeated until 30 qualified 3D random path segments are successfully collected and loaded into the memory pool as the initial solution for the exploration population, thereby realizing the exploration of the panoramic solution space.
[0020] In some embodiments, extracting continuous path segments within the incomplete solution that do not violate constraints includes: Based on the incomplete solution path nodes traversed sequentially from the starting point to the ending point, the angle between the forward connecting vector and the backward connecting vector is calculated according to the three-dimensional coordinates of every three consecutive adjacent path nodes. When the included angle is not greater than the maximum allowable bending deflection angle, and each node is not within the obstacle grid, and the two adjacent connecting lines do not intersect with the obstacle object, then the corresponding three consecutive adjacent path nodes are judged as qualified short chains. Based on the principle of splicing where the first and last nodes are in the same position and continuously extended, multiple qualified short chains are extracted and spliced to obtain the continuous path segment that does not violate the constraints.
[0021] When resolving the incomplete solution, the sequence of all discrete three-dimensional path nodes contained in the current incomplete solution is traversed item by item from the beginning to the end. Using a sliding window mechanism, three consecutive triples of path nodes are extracted each time. For the center point of each window Find the values of each of the following: point to 3D forward link vector and by point to 3D backward link vector .
[0022] The absolute spatial deflection angle of the actual turn is calculated using the vector dot product principle and the inverse cosine formula. Read the cable laying process document and extract the physical bending limit parameters as the maximum allowable bending deflection angle threshold, for example, set... That is, approximately 0.785 radians. The bending deflection angle calculated above... Compare with this threshold, and simultaneously retrieve the 3D octree map interface containing obstacle information for querying. , and The corresponding grid occupancy state. This occurs if and only if the bending deflection angle θ ≤ 45°, and the map Boolean return values of all three nodes are equal to 0, and by… to and by to When none of the adjacent connecting lines intersect with any obstacle element, i.e., when the area is within a safe and free passage region, the corresponding consecutive three-point triplet is considered a basic qualified short chain object. .
[0023] Entering the linked list concatenation phase, the registered list of qualified short links is scanned to find geometric overlaps. For any two short link objects A and B, the spatial three-dimensional distance between the end node of short link A and the start node of short link B is calculated. When this spatial three-dimensional distance is less than... When the absolute error tolerance of meters is met, merge the sequence structures of two short chains, for example, combine the point sequences. and spliced into a coherent long chain sequence .
[0024] Repeat the merging action until no matching node can be found. Output the resulting maximum compliant coordinate sequences that are not contiguous, as the extracted continuous path segments that do not violate constraints.
[0025] In some embodiments, constructing the incomplete fragment library based on the start and end coordinates, cumulative cost, and initial utility index of the continuous path segments includes: The starting point coordinates and the ending point coordinates are obtained based on the coordinates of the first and last nodes of the continuous path segment in the forward direction. The cumulative cost is obtained by weighting and summing the Euclidean distance between all adjacent points in the continuous path segment, the preset three-dimensional map grid reference traffic impedance constant, the additional construction cost due to height changes, and the local laying cost weight of the corresponding grid. The initial utility index of the path segment is calculated based on the reciprocal of the sum of the cumulative cost and the preset zero-prevention constant. A joint primary key is constructed based on the unique identifier of the path segment and the coordinates of the starting point and the ending point. The corresponding cumulative cost and initial utility index are saved to a multidimensional matrix data table to obtain the incomplete fragment library.
[0026] For any valid continuous path segment array L, obtain the total length attribute n of the array object, and extract the node information with index 0 as the starting point spatial three-dimensional coordinates of the segment. Simultaneously, the node information with index value n-1 is extracted as the three-dimensional coordinates of the endpoint space. .
[0027] Start cumulative variables Starting from the first node, traverse all connected points in the path segment. and Through the formula Calculate the Euclidean distance between each node segment. Set the baseline traffic impedance coefficient K=1.25 for the 3D map grid, and calculate the additional construction cost due to height changes based on the height difference between adjacent points. Simultaneously, read the local laying cost weight of the corresponding grid. In each loop, perform a weighted summation of the base distance cost, traffic impedance cost, and additional cost due to height changes, and add the results to the variable. middle.
[0028] When the traversal terminates, the final value obtained, for example, 48.56, is confirmed as the cumulative cost of that segment. The initial utility index is obtained by adding a minimum positive number ε to the calculated cumulative cost and then taking its reciprocal. For example, the aforementioned cumulative cost of 48.56, when calculated in reverse, yields an initial utility index of 0.02059.
[0029] A globally unique 32-character hexadecimal string identifier, such as ID=a1b2c3d4..., is generated using a universally unique identifier algorithm. The extracted ID string, the three-dimensional string representing the starting coordinates, and the three-dimensional string representing the ending coordinates are concatenated to construct a composite primary key such as "a1b2c3d4_10,5,2_40,15,6".
[0030] Create a multidimensional matrix association data table in the in-memory database, using the composite primary key string as the primary index, and store the cumulative cost of 48.56 and the initial utility index of 0.02059 in the corresponding column fields in single-precision floating-point format to obtain the incomplete fragment library.
[0031] S2, two anchor points are generated based on the parent solutions selected from the main population. Target path segments are retrieved from the incomplete fragment library according to the anchor points, and the target path segments are connected to the two anchor points to obtain an initial child solution. When the initial child solution has constraint conflict points, a repair path segment is retrieved from the incomplete fragment library according to the safe path points with a preset interval before and after the constraint conflict point, and the original path that caused the conflict is replaced to obtain a repaired child solution.
[0032] During the evolutionary iteration process, a complete cable path with high fitness is selected from the main population using roulette wheel selection or tournament selection as the parent solution. A random number generator is used to randomly select two non-overlapping nodes with a gap in the node sequence of the parent solution. According to their index order in the node sequence of the parent solution, the node with the smaller index is determined as the first anchor point, and the node with the larger index is determined as the second anchor point.
[0033] Traverse the incomplete fragment library, calculate the spatial Euclidean distance between the first and last coordinates of each continuous path segment in the library and the first and second anchor points, and filter out continuous path segments whose first coordinates are less than a set threshold and whose last coordinates are less than a set threshold. If multiple such segments exist, calculate the fit score by multiplying the reciprocal of the sum of the distance deviations after adding a zero-prevention constant and normalizing by a preset distance scale with the corresponding path segment utility index, and select the one with the highest fit score as the target path segment.
[0034] The first anchor point is connected to the first coordinate of the target path segment using a linear interpolation algorithm or a fast expanding random tree algorithm, and the last coordinate of the target path segment is connected to the second anchor point. At the same time, the original node sequence located between the first and second anchor points in the parent solution is deleted, and the initial child solution is generated by splicing them together.
[0035] The initial sub-solution is subjected to the aforementioned constraint verification, with a focus on checking whether there are any violations due to environmental changes or splicing angles at the splicing connection points and within the target path segment. Once a constraint conflict point is found that involves crossing obstacles or has an excessively small bending radius, a set number of nodes are backed up in front of and behind the constraint conflict point, and the two safe nodes obtained after the backing up are used as new search endpoints.
[0036] Enter the incomplete fragment library and use the same method to search for alternative continuous path segments that match the first and last coordinates of the two safe nodes as repair path segments. If no repair path segment that meets the first and last matching and constraint conditions is found, the local obstacle-free pathfinding algorithm is called to regenerate candidate repair segments between the two safe nodes; if it still cannot be generated, the initial sub-solution is marked as an unrepairable solution and removed from the candidate set in this round.
[0037] Remove the conflict-causing node sequence located between two safe nodes in the initial sub-solution, replace it with the found repair path segment, and perform obstacle, connectivity, and deflection angle checks again. After passing the checks, a repair sub-solution that meets all physical laying conditions is generated.
[0038] In some embodiments, the step of retrieving a target path segment from the incomplete fragment library based on the anchor points and connecting the target path segment with two anchor points to obtain an initial sub-solution includes: Based on the first distance between the starting point coordinates and the previous anchor point coordinates of each path segment in the incomplete fragment library, and the second distance between the ending point coordinates and the next anchor point coordinates, the total distance deviation is calculated. The fit score is obtained by multiplying the reciprocal of the sum of distance deviations after adding a zero-prevention constant and normalizing by a preset distance scale with the utility index of the corresponding path segment. After selecting the target path segment with the highest adaptation score from the incomplete fragment library, the local pathfinding algorithm is used to connect the two ends of the target path segment to the two anchor points without obstacles, forming a complete connected path and obtaining the initial sub-solution.
[0039] Assume that pre-control anchor points are generated around the fracture region of the parent generation of the principal population extracted in the crossover and mutation operation. With rear control anchor point Iterate through all entries stored in the incomplete fragment library of the multidimensional matrix data table. For any candidate fragment... Extract the three-dimensional starting coordinates attached to its composite primary key. and three-dimensional endpoint coordinates .
[0040] By calculating points With the pre-anchor point Spatial distance, to obtain the first Euclidean distance The endpoint was calculated using the same method. With rear anchor point The second Euclidean distance between Add the two together, and then add a very small floating-point constant. To prevent division by zero anomalies, the total distance deviation is obtained. Divide the sum of the distance deviations by the preset distance scale. The dimensionless distance deviation was obtained. .
[0041] Extract the candidate fragment Corresponding current utility index ,according to Calculate the fit score, which will be used as the fit score for this item. If the sum of distance deviations for a certain segment is 15.4 meters, a preset distance scale is used. =1m, the utility index is 0.82, then its fit score is 0.0532.
[0042] After completing the full database comparison and scoring, the maximum score is found, and the segment with the highest score is extracted and marked as the optimal target path segment. Using a local collision-free pathfinding algorithm or a fast expanding random tree algorithm, starting with the segment's initial node... As a target relative to the previous anchor point Generate connected route one, and complete the segment endpoint using the same navigation principle. one anchor point backward Connectivity route planning. These local routes are used to connect the target path segments. By connecting the anchor points of the two system master nodes, the fracture region of the original parent generation is connected, resulting in a set of uninterrupted three-dimensional initial child generation solution trajectories.
[0043] In some embodiments, retrieving repair path segments from the incomplete fragment library based on safe path points at preset intervals before and after the constraint conflict point includes: Based on the spatial coordinates of adjacent nodes before and after the anchor point connection in the initial sub-solution, the physical bending deflection angle of the line connecting adjacent nodes in each turning direction is calculated using inverse trigonometric functions. When it is determined that the physical bending deflection angle is not greater than the preset maximum allowable bending deflection angle, the corresponding node is marked as a safe node. When it is determined that the physical bending deflection angle is greater than the preset maximum allowable bending deflection angle, the corresponding three-dimensional coordinate node is marked as a constraint conflict point, and safe path points with a preset interval before and after the constraint conflict point are extracted to retrieve and repair the path segment.
[0044] Extract the central nodes at the connection points from the initial sub-solution route sequence generated in the previous step. And obtain its forward neighbor nodes. and backward adjacent nodes Construct local geometric review units It will be by point to The connecting vector is confirmed as the incoming connecting vector. , will be point to The connecting vector is confirmed as the outgoing connecting vector. Calling the inverse trigonometric function, from the formula... Calculate the physical deflection angle between two adjacent path segments. Set a maximum allowable deflection angle threshold. .
[0045] The calculated bending deflection angle The logical relationship between θ and the threshold. When θ≤45° holds true, in the current connection center node... Append the 'IsSafe=True' field to the data body to mark it as a safe node. Conversely, for example, when the bending angle... When triggered Conditions. Connect the current 3D coordinates to the center point. The point is labeled as a "constraint conflict point" and the step size parameter value K=2 is returned. That is, the second safe path point is captured from the constraint conflict point in the direction of the starting point. And capture the second safe path point in the direction of the destination. This involves truncating and removing path segments containing excessively large bends or deflections. The principle for determining constraint conflicts at path bends is as follows: Figure 2 As shown.
[0046] The new safe start and end points obtained by truncation and separation and The input database retrieval query function is reused to repair the start and end point parameters, retrieving a smoother transition cable segment from the incomplete segment library.
[0047] S3, update the main population based on the total cost index, and update the exploration population according to the comprehensive evaluation value determined by the path segment utility index, the total cost of the candidate paths after connection, and the path segment quantity penalty term. When the main population generates a good complete solution, increase the utility index of the continuous path segments constituting the good complete solution in the incomplete fragment library. When the preset convergence condition is met, output the cable laying path according to the complete solution with the lowest total cost in the main population.
[0048] After generating a batch of repaired child solutions, the total deployment cost of each repaired child solution is calculated and compared with the total cost index of the original parent solutions in the main population. An elite retention strategy is adopted to eliminate inferior solutions with higher total costs, and repaired child solutions with lower total costs are incorporated into the main population to maintain a constant total number of individuals in the main population.
[0049] For the exploration population, all segments contained in each individual are traversed, and the utility index corresponding to each segment in the incomplete segment library is obtained by looking up a table. The segments are then connected through local pathfinding to form candidate paths. The total laying cost of the candidate paths and the number of path segments are calculated. Based on the normalized results of the path segment utility index, the total laying cost of the candidate paths, and the penalty term for the number of path segments, the comprehensive evaluation value of the exploration individual is calculated. Individuals with the lowest comprehensive evaluation value are eliminated. Candidate segment combinations to be connected are generated using path segment combinations with higher comprehensive evaluation values from the incomplete segment library. These combinations are then connected through local pathfinding and constraint verification to form new exploration individuals to supplement the exploration population.
[0050] In each round of iterative evaluation, the main population is monitored. If the total cost of a newly added repaired child solution is lower than the historical global optimum cost, it is marked as a superior complete solution. At this time, the system backtracks to record which continuous path segments from the incomplete fragment library constitute this superior complete solution, finds these adopted continuous path segments in the incomplete fragment library, calculates the utility increment based on the net performance improvement ratio of this superior complete solution relative to the historical global optimum complete solution before the update, and accumulates the utility increment into the current utility index of the corresponding path segment, increasing the probability of these excellent local fragments being selected in subsequent iterations.
[0051] As iterations continue, at the end of each round, it is checked whether the maximum number of iterations has been reached, or whether the total cost of the optimal solution within the main population has stopped decreasing for several consecutive generations. Once either of the above preset convergence conditions is met, the entire optimization loop of the algorithm is immediately terminated.
[0052] Find the complete cable laying path with the smallest total cost index in the main population that has stopped iterating. Extract the three-dimensional coordinate sequence of all nodes in the order of nodes from the start point to the end point, and output it as the cable laying path.
[0053] In some embodiments, when the main population generates a good complete solution, improving the utility index of the continuous path segments constituting the good complete solution in the incomplete fragment library includes: Based on the total cost difference between the newly generated main population complete solution and the historical global optimal complete solution before the update, and normalizing the total cost difference based on the total cost of the historical global optimal complete solution before the update, the dimensionless net performance improvement ratio is obtained. Based on the unique identifier of all path segments covered by the complete interpretation splicing and positioning of the new main population, the corresponding record entries are tracked within the incomplete fragment library; When the current utility index base number is extracted from the incomplete fragment library, the preset utility increment base number is multiplied by the net performance improvement ratio to obtain the utility increment, and the current utility index base number and the utility increment are summed to obtain the comprehensive cumulative value. The comprehensive accumulated value is used as the current utility index and saved to the corresponding incomplete path segment record.
[0054] After the main population has undergone iterations to generate the latest complete solution for the main population, the archived parameters of that individual are called. The total cost of the travel path of the historical globally optimal complete solution before the update is read. Assume the recorded value is 1800.5. Read the total cost of the complete solution trajectory of the young generation obtained after iteration. Let's assume it's 1730.0.
[0055] The difference in iterative optimization is calculated by subtraction: Divide the iterative optimization difference by Normalization was performed to obtain the net performance improvement ratio. =70.5 / 1800.5≈0.0392.
[0056] By reverse-analyzing the complete solution route, we can extract the set of all child-level historical path segments that were previously retrieved and pieced together from the "incomplete fragment library". For each path segment element Using the preloaded 32-character hexadecimal unique identifier of the element, such as ID=5f4dcc3b... as the positioning parameter, the associated original stored record row is queried in the multidimensional matrix data table. When a specific hash composite primary key in the underlying library is matched, the current utility index cardinality stored in the field is extracted, for example... =0.20.
[0057] The preset utility increment base The utility increment is obtained by multiplying the net performance improvement ratio ΔR. For example, when When the value is 0.20, ΔU = 0.20 × 0.0392 = 0.00784. Then, the current utility index base value is... Summing the utility increment, the total accumulated value is calculated. The database overwrite command is triggered, updating and writing the new cumulative value of 0.20784, which is then overwritten and saved to the incomplete path segment attribute record pointed to by the composite primary key as the evaluation basis, thereby completing the update of the utility index.
[0058] Example 2 Embodiment 2 of the present invention proposes a cable laying path planning and optimization system, comprising the following modules: The construction module is used to acquire an environmental model containing obstacles, optional path points, and laying costs based on a 3D raster map of the cable laying environment, and initialize the main population and exploration population according to the set start and end points; based on the constraint verification and cost evaluation results, when an incomplete solution is identified, the continuous path segments that do not violate the constraints within the incomplete solution are extracted, and an incomplete segment library is constructed based on the start and end coordinates, cumulative cost, and initial utility index of the continuous path segments; The replacement module is used to generate two anchor points based on the parent solutions selected from the main population, retrieve target path segments in the incomplete fragment library according to the anchor points, and connect the target path segments with the two anchor points to obtain an initial child solution; when the initial child solution has a constraint conflict point, retrieve a repair path segment in the incomplete fragment library according to the safe path points with a preset interval before and after the constraint conflict point, and replace the original path that caused the conflict to obtain a repaired child solution; The output module is used to update the main population based on the total cost index, update the exploration population according to the comprehensive evaluation value determined by the path segment utility index, the total cost of the candidate paths after connection, and the path segment quantity penalty term, and when the main population generates a good complete solution, improve the utility index of the continuous path segments constituting the good complete solution in the incomplete fragment library; when the preset convergence condition is met, output the cable laying path according to the complete solution with the lowest total cost in the main population.
[0059] In some embodiments, initializing the primary population and exploration population according to the set start and end points includes: Based on the set start and end points of the path, using The algorithm plans an unobstructed initial baseline path; Based on the initial baseline path, a normally distributed three-dimensional spatial noise signal with a mean of zero and a standard deviation of a set value is superimposed on the key control points and interpolated and smoothed to obtain all the initial solutions of the main population. Based on a preset map boundary range, multiple random path segments are generated iteratively through Brownian motion simulation and used as the initial solution for the exploration population.
[0060] In some embodiments, extracting continuous path segments within the incomplete solution that do not violate constraints includes: Based on the incomplete solution path nodes traversed sequentially from the starting point to the ending point, the angle between the forward connecting vector and the backward connecting vector is calculated according to the three-dimensional coordinates of every three consecutive adjacent path nodes. When the included angle is not greater than the maximum allowable bending deflection angle, and each node is not within the obstacle grid, and the two adjacent connecting lines do not intersect with the obstacle object, then the corresponding three consecutive adjacent path nodes are judged as qualified short chains. Based on the principle of splicing where the first and last nodes are in the same position and continuously extended, multiple qualified short chains are extracted and spliced to obtain the continuous path segment that does not violate the constraints.
[0061] In some embodiments, constructing the incomplete fragment library based on the start and end coordinates, cumulative cost, and initial utility index of the continuous path segments includes: The starting point coordinates and the ending point coordinates are obtained based on the coordinates of the first and last nodes of the continuous path segment in the forward direction. The cumulative cost is obtained by weighting and summing the Euclidean distance between all adjacent points in the continuous path segment, the preset three-dimensional map grid reference traffic impedance constant, the additional construction cost due to height changes, and the local laying cost weight of the corresponding grid. The initial utility index of the path segment is calculated based on the reciprocal of the sum of the cumulative cost and the preset zero-prevention constant. A joint primary key is constructed based on the unique identifier of the path segment and the coordinates of the starting point and the ending point. The corresponding cumulative cost and initial utility index are saved to a multidimensional matrix data table to obtain the incomplete fragment library.
[0062] In some embodiments, the step of retrieving a target path segment from the incomplete fragment library based on the anchor points and connecting the target path segment with two anchor points to obtain an initial sub-solution includes: Based on the first distance between the starting point coordinates and the previous anchor point coordinates of each path segment in the incomplete fragment library, and the second distance between the ending point coordinates and the next anchor point coordinates, the total distance deviation is calculated. The fit score is obtained by multiplying the reciprocal of the sum of distance deviations after adding a zero-prevention constant and normalizing by a preset distance scale with the utility index of the corresponding path segment. After selecting the target path segment with the highest adaptation score from the incomplete fragment library, the local pathfinding algorithm is used to connect the two ends of the target path segment to the two anchor points without obstacles, forming a complete connected path and obtaining the initial sub-solution.
[0063] In some embodiments, retrieving repair path segments from the incomplete fragment library based on safe path points at preset intervals before and after the constraint conflict point includes: Based on the spatial coordinates of adjacent nodes before and after the anchor point connection in the initial sub-solution, the physical bending deflection angle of the line connecting adjacent nodes in each turning direction is calculated using inverse trigonometric functions. When it is determined that the physical bending deflection angle is not greater than the preset maximum allowable bending deflection angle, the corresponding node is marked as a safe node. When it is determined that the physical bending deflection angle is greater than the preset maximum allowable bending deflection angle, the corresponding three-dimensional coordinate node is marked as a constraint conflict point, and safe path points with a preset interval before and after the constraint conflict point are extracted to retrieve and repair the path segment.
[0064] In some embodiments, when the main population generates a good complete solution, improving the utility index of the continuous path segments constituting the good complete solution in the incomplete fragment library includes: Based on the total cost difference between the newly generated main population complete solution and the historical global optimal complete solution before the update, and normalizing the total cost difference based on the total cost of the historical global optimal complete solution before the update, the dimensionless net performance improvement ratio is obtained. Based on the unique identifier of all path segments covered by the complete interpretation splicing and positioning of the new main population, the corresponding record entries are tracked within the incomplete fragment library; When the current utility index base number is extracted from the incomplete fragment library, the preset utility increment base number is multiplied by the net performance improvement ratio to obtain the utility increment, and the current utility index base number and the utility increment are summed to obtain the comprehensive cumulative value. The comprehensive accumulated value is used as the current utility index and saved to the corresponding incomplete path segment record.
[0065] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for optimizing cable laying paths, characterized in that, include: Based on the 3D grid map of the cable laying environment, an environmental model containing obstacles, optional path points, and laying costs is obtained, and the main population and exploration population are initialized according to the set start and end points. According to the constraint verification and cost evaluation results, when an incomplete solution is identified, the continuous path segments that do not violate the constraints in the incomplete solution are extracted, and an incomplete segment library is constructed based on the start and end coordinates, cumulative cost, and initial utility index of the continuous path segments. Two anchor points are generated based on the parent solutions selected from the main population. Target path segments are retrieved from the incomplete fragment library based on the anchor points, and the target path segments are connected to the two anchor points to obtain an initial child solution. When the initial child solution has constraint conflict points, a repair path segment is retrieved from the incomplete fragment library based on safe path points with a preset interval before and after the constraint conflict point, and the original path that caused the conflict is replaced to obtain a repaired child solution. The main population is updated based on the total cost index. The exploration population is updated based on the comprehensive evaluation value determined by the path segment utility index, the total cost of the candidate paths after connection, and the path segment quantity penalty term. When the main population generates a good complete solution, the utility index of the continuous path segments constituting the good complete solution in the incomplete fragment library is increased. When the preset convergence condition is met, the cable laying path is output based on the complete solution with the lowest total cost in the main population.
2. The method according to claim 1, characterized in that, The initialization of the primary population and exploration population based on the set start and end points includes: Based on the set path start and end points, using The algorithm plans an unobstructed initial baseline path; Based on the initial baseline path, a normally distributed three-dimensional spatial noise signal with a mean of zero and a standard deviation of a set value is superimposed on the key control points and interpolated and smoothed to obtain all the initial solutions of the main population. Based on a preset map boundary range, multiple random path segments are generated iteratively through Brownian motion simulation and used as the initial solution for the exploration population.
3. The method according to claim 1, characterized in that, The extraction of continuous path segments within the incomplete solution that do not violate constraints includes: Based on the incomplete solution path nodes traversed sequentially from the starting point to the ending point, the angle between the forward connecting vector and the backward connecting vector is calculated according to the three-dimensional coordinates of every three consecutive adjacent path nodes. When the included angle is not greater than the maximum allowable bending deflection angle, and each node is not within the obstacle grid, and the two adjacent connecting lines do not intersect with the obstacle object, then the corresponding three consecutive adjacent path nodes are judged as qualified short chains. Based on the principle of splicing where the first and last nodes are in the same position and continuously extended, multiple qualified short chains are extracted and spliced to obtain the continuous path segment that does not violate the constraints.
4. The method according to claim 1, characterized in that, The construction of the incomplete fragment library based on the start and end coordinates, cumulative cost, and initial utility index of the continuous path segments includes: The starting point coordinates and the ending point coordinates are obtained from the coordinates of the first and last nodes of the continuous path segment in the forward direction, respectively. The cumulative cost is obtained by weighting and summing the Euclidean distance between all adjacent points in the continuous path segment, the preset three-dimensional map grid reference traffic impedance constant, the additional construction cost due to height changes, and the local laying cost weight of the corresponding grid. The initial utility index of the path segment is calculated based on the reciprocal of the sum of the cumulative cost and the preset zero-prevention constant. A joint primary key is constructed based on the unique identifier of the path segment and the coordinates of the starting point and the ending point. The corresponding cumulative cost and initial utility index are saved to a multidimensional matrix data table to obtain the incomplete fragment library.
5. The method according to claim 1, characterized in that, The step of retrieving the target path segment from the incomplete fragment library based on the anchor point, and connecting the target path segment with two anchor points to obtain the initial sub-solution includes: Based on the first distance between the starting point coordinates and the previous anchor point coordinates of each path segment in the incomplete fragment library, and the second distance between the ending point coordinates and the next anchor point coordinates, the total distance deviation is calculated. The fit score is obtained by multiplying the reciprocal of the sum of distance deviations after adding a zero-prevention constant and normalizing by a preset distance scale with the utility index of the corresponding path segment. After selecting the target path segment with the highest adaptation score from the incomplete fragment library, the local pathfinding algorithm is used to connect the two ends of the target path segment to the two anchor points without obstacles, forming a complete connected path and obtaining the initial sub-solution.
6. The method according to claim 1, characterized in that, The step of retrieving repair path segments from the incomplete fragment library based on safe path points with preset intervals before and after the constraint conflict point includes: Based on the spatial coordinates of adjacent nodes before and after the anchor point connection in the initial sub-solution, the physical bending deflection angle of the line connecting adjacent nodes in each turning direction is calculated using inverse trigonometric functions. When it is determined that the physical bending deflection angle is not greater than the preset maximum allowable bending deflection angle, the corresponding node is marked as a safe node. When it is determined that the physical bending deflection angle is greater than the preset maximum allowable bending deflection angle, the corresponding three-dimensional coordinate node is marked as a constraint conflict point, and safe path points with a preset interval before and after the constraint conflict point are extracted to retrieve and repair the path segment.
7. The method according to claim 1, characterized in that, When the main population generates a good complete solution, improving the utility index of the continuous path segments constituting the good complete solution in the incomplete fragment library includes: Based on the total cost difference between the newly generated main population complete solution and the historical global optimal complete solution before the update, and normalizing the total cost difference based on the total cost of the historical global optimal complete solution before the update, the dimensionless net performance improvement ratio is obtained. Based on the unique identifier of all path segments covered by the complete interpretation splicing and positioning of the new main population, the corresponding record entries are tracked within the incomplete fragment library; When the current utility index base number is extracted from the incomplete fragment library, the preset utility increment base number is multiplied by the net performance improvement ratio to obtain the utility increment, and the current utility index base number and the utility increment are summed to obtain the comprehensive cumulative value. The comprehensive accumulated value is used as the current utility index and saved to the corresponding incomplete path segment record.
8. A cable laying path planning and optimization system, characterized in that, include: The construction module is used to acquire an environmental model containing obstacles, optional path points, and laying costs based on a 3D raster map of the cable laying environment, and initialize the main population and exploration population according to the set start and end points; based on the constraint verification and cost evaluation results, when an incomplete solution is identified, the continuous path segments that do not violate the constraints within the incomplete solution are extracted, and an incomplete segment library is constructed based on the start and end coordinates, cumulative cost, and initial utility index of the continuous path segments; The replacement module is used to generate two anchor points based on the parent solutions selected from the main population, retrieve target path segments in the incomplete fragment library according to the anchor points, and connect the target path segments with the two anchor points to obtain an initial child solution; when the initial child solution has a constraint conflict point, retrieve a repair path segment in the incomplete fragment library according to the safe path points with a preset interval before and after the constraint conflict point, and replace the original path that caused the conflict to obtain a repaired child solution; The output module is used to update the main population based on the total cost index, update the exploration population according to the comprehensive evaluation value determined by the path segment utility index, the total cost of the candidate paths after connection, and the path segment quantity penalty term, and when the main population generates a good complete solution, improve the utility index of the continuous path segments constituting the good complete solution in the incomplete fragment library; when the preset convergence condition is met, output the cable laying path according to the complete solution with the lowest total cost in the main population.
9. The system according to claim 8, characterized in that, The initialization of the primary population and exploration population based on the set start and end points includes: Based on the set path start and end points, using The algorithm plans an unobstructed initial baseline path; Based on the initial baseline path, a normally distributed three-dimensional spatial noise signal with a mean of zero and a standard deviation of a set value is superimposed on the key control points and interpolated and smoothed to obtain all the initial solutions of the main population. Based on a preset map boundary range, multiple random path segments are generated iteratively through Brownian motion simulation and used as the initial solution for the exploration population.
10. The system according to claim 8, characterized in that, The extraction of continuous path segments within the incomplete solution that do not violate constraints includes: Based on the incomplete solution path nodes traversed sequentially from the starting point to the ending point, the angle between the forward connecting vector and the backward connecting vector is calculated according to the three-dimensional coordinates of every three consecutive adjacent path nodes. When the included angle is not greater than the maximum allowable bending deflection angle, and each node is not within the obstacle grid, and the two adjacent connecting lines do not intersect with the obstacle object, then the corresponding three consecutive adjacent path nodes are judged as qualified short chains. Based on the principle of splicing where the first and last nodes are in the same position and continuously extended, multiple qualified short chains are extracted and spliced to obtain the continuous path segment that does not violate the constraints.
