Method and system for automatic wiring of mechanical and electrical pipelines of prefabricated buildings

By constructing a grid space in prefabricated buildings, assigning weights to pipeline media, performing multi-level pruning, and using A-star search, the problem of low efficiency in the layout of electromechanical pipelines in prefabricated buildings is solved, achieving high-density, collision-free, precise layout and efficient wiring.

CN122634813APending Publication Date: 2026-08-25CHINA CONSTR FIFTH ENG DIV CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611135304.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-29
Publication Date
2026-08-25

AI Technical Summary

Technical Problem

Existing technologies have low efficiency in laying electromechanical pipelines in prefabricated buildings, and are prone to problems such as insufficient spatial judgment, omissions in local layout, physical collisions, insufficient clearance and media conflicts, making it difficult to meet the needs of high-density electromechanical pipeline automatic wiring.

Method used

By constructing a grid space, assigning conflict weights to different pipeline types, generating a comprehensive sorting key, employing a multi-level pruning strategy and the A* search algorithm, combining Manhattan distance and seam crossing cost to construct a heuristic function, setting a soft no-go zone mechanism, achieving precise layout of high-priority pipelines, and backtracking to reconstruct the path when there is no solution.

Benefits of technology

It enables high-density, collision-free, and highly adaptable integrated layout of electromechanical pipelines in prefabricated buildings, improving wiring efficiency and quality, reducing invalid search space, and ensuring construction standardization and success rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122634813A_ABST
    Figure CN122634813A_ABST
Patent Text Reader

Abstract

The application provides an assembled building electromechanical pipeline automatic wiring method and system, constructs a grid space by relying on a building information model, extracts forbidden area and pipeline port coordinates, and gives grid medium conflict weight according to pipeline type; generates a comprehensive sorting key by combining pipe diameter, pressure grade and space bottleneck quantity, performs descending order sorting on the pipeline, removes isolated grids based on connectivity, and takes bottleneck cross-sectional area reciprocal as congestion penalty; expands the direction according to the turning constraint weight, matches the threshold to limit pipeline turning, fuses Manhattan distance and joint cost to construct a heuristic function, adjusts node cache screening multiple according to cache occupancy rate, completes grid space wiring by using A-star algorithm, and adjusts and regulates the soft forbidden area according to high-priority pipeline parameters; when the subsequent pipeline has no solution, backtrack the previous suboptimal node and rewire, and if the same pipeline has no solution for multiple times, reduce the conflict weight and modify the soft forbidden area thickness, and write the wiring path meeting the constraint to the building information model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of cabling, and in particular relates to an automatic cabling method and system for electromechanical pipelines in prefabricated buildings. Background Technology

[0002] The integrated layout of electromechanical pipelines is a crucial step in ensuring the realization of building functions, improving space utilization, and guaranteeing the precise installation of prefabricated components. Its quality directly impacts the building's later operation and maintenance. Prefabricated buildings typically have compact interior spaces, with beams, columns, wall panels, and other prefabricated components arranged in an interwoven manner, easily creating numerous rigid structural no-go zones and narrow spatial bottlenecks. Traditional methods of pipeline layout based on manual experience in building information models are not only inefficient but also prone to problems such as insufficient spatial judgment and omissions in local layouts. Different professional pipelines differ in pipe diameter, pressure rating, media properties, and insulation requirements. When laid out in confined three-dimensional spaces, issues such as physical collisions, insufficient clearance, and media conflicts can easily occur. When multiple pipelines compete for limited corridor or manhole resources, without a reasonable wiring sequence plan and a global assessment of spatial bottlenecks, laying pipelines first may excessively occupy prime passageways, forcing subsequent pipelines to detour or even creating situations where no feasible path exists, making it difficult to meet the needs of automated wiring for high-density electromechanical pipelines.

[0003] Existing technologies typically discretize building space into a three-dimensional grid space and combine heuristic pathfinding methods such as the A* algorithm to complete pipeline routing. They also determine the routing order through basic priority rules and introduce turning costs, Manhattan distance heuristics, or node pruning strategies to reduce the search scale. However, existing pipeline sorting rules are relatively simple and cannot simultaneously characterize the relationship between pipeline entity attributes and the difficulty of traversing spatial bottlenecks, easily leading to channel resource congestion or path deadlock in complex bottleneck areas. Existing pruning strategies also lack the ability to coordinate and adjust connectivity, spatial congestion levels, and turning constraints at multiple levels. Static turning thresholds and fixed heuristic parameters are difficult to adapt to dynamic changes in spatial congestion, easily resulting in invalid node expansion and wasted cache resources. Furthermore, traditional search algorithms often employ rigid exclusion zone delineation when dealing with space occupancy caused by existing pipelines, lacking a soft exclusion zone mechanism that combines insulation thickness, safety clearance, and media conflict weights for flexible adjustment. When subsequent pipelines are stuck in an unsolvable state, there is also a lack of a rewiring mechanism that allows for cross-pipeline node backtracking and adaptive adjustment of conflict weights, which can easily lead to interruptions in the wiring process or output of low-quality paths with excessive detours, making it difficult to meet the actual needs of high-density, high-quality automatic wiring in prefabricated buildings. Summary of the Invention

[0004] To achieve collision-free and highly adaptable integrated layout of pipelines in high-density, confined spaces, one or more embodiments of the present invention provide an automatic wiring method for electromechanical pipelines in prefabricated buildings, comprising the following steps:

[0005] A grid space is constructed by acquiring a building information model, and the coordinates of restricted areas and pipeline ports are extracted. Different grid media conflict weights are assigned according to pipeline type. A comprehensive sorting key is generated based on the pipe diameter, pressure level, and the equivalent number of bottlenecks after preset upper limit truncation and normalization of the pipeline to be routed. The pipelines to be routed are sorted in descending order according to the comprehensive sorting key. The equivalent number of bottlenecks is determined based on the situation where the line connecting the start and end points of the pipeline crosses the spatial bottleneck.

[0006] Multi-level pruning is performed based on the sorting. The first level removes isolated grids based on connectivity marking of reachable domains, and injects the congestion penalty term into the heuristic function as the reciprocal of the reachable domain bottleneck cross-sectional area. The second level weights the expansion direction based on turning constraints, and prohibits changing direction when the extension length in the same direction is less than the threshold positively mapped by the reachable domain bottleneck cross-sectional area. The third level constructs a heuristic function based on Manhattan distance and seam crossing cost, and pushes nodes whose comprehensive cost exceeds the product of the minimum comprehensive cost of the current open list and the node cache filtering ratio into the cache. The filtering ratio increases with the cache occupancy rate.

[0007] In the grid space, an A* search is used to define a soft exclusion zone for the grid neighborhood occupied by high-priority pipelines, based on half the pipeline diameter, the insulation layer thickness, and the preset safety gap. The thickness of the soft exclusion zone is adjusted according to the media conflict weight. If there is no solution for subsequent pipelines, the second-best node of the preceding pipeline is popped out in ascending order according to the comprehensive sorting key and re-routed. If there is no solution for the same pipeline three times in a row, the media conflict weight of the conflict area is reduced and the thickness of the soft exclusion zone is readjusted. The output path is written back to the building information model.

[0008] Furthermore, the first level eliminates isolated rasters based on connectivity marking reachable domains, and injects a heuristic function with the reciprocal of the bottleneck cross-sectional area of ​​the reachable domain as a congestion penalty term, including:

[0009] Obtain the initial grid of the pipeline starting point coordinate mapping, and use a breadth-first search algorithm to traverse all non-hard restricted area grids that are connected to the initial grid and allow pipeline passage;

[0010] Assign a reachable state tag to the connected grid cells that are found during the traversal, and remove the coordinates of the non-connected grid cells that do not carry the reachable state tag from the search space matrix;

[0011] Collect the actual usable cross-sectional area data corresponding to all grids carrying the reachability status marker, find the minimum cross-sectional area and set the area value of the area as the bottleneck cross-sectional area of ​​the reachability domain;

[0012] The bottleneck cross-sectional area of ​​the reachable domain is normalized and reverse-mapped to generate a hole congestion penalty factor. The hole congestion penalty factor is then multiplied by a preset spatial weight coefficient and added as a congestion penalty term to the evaluation value of the heuristic function.

[0013] Furthermore, the second level weights the extension direction based on turning constraints, prohibiting direction changes when the extension length in the same direction is less than a threshold positively mapped from the reachable domain bottleneck cross-sectional area, including:

[0014] During the expansion of the search node, the expansion direction vector of the current path is monitored in real time. When the expansion directions are consistent for two consecutive times, the direction inheritance mechanism is triggered, and the turning penalty value is reduced by a preset step size coefficient. The turning penalty value is not lower than the preset minimum turning penalty value.

[0015] Count the number of grids that extend continuously in the same straight direction in the current pipeline, and calculate the current extension length in the same direction;

[0016] Obtain the bottleneck cross-sectional area of ​​the reachable domain, generate a dimensionless positive adjustment factor based on the ratio of the bottleneck cross-sectional area of ​​the reachable domain to the reference cross-sectional area, and map the positive adjustment factor to a threshold for the number of unidirectional extended grids that prohibits direction changes.

[0017] Compare the current same-direction extension length with the threshold. If the current same-direction extension length is less than the threshold, then lock the vector angle of the current extension direction and block the extension permissions of all non-same-direction neighbor nodes in the search space.

[0018] Furthermore, the third level constructs a heuristic function based on Manhattan distance and seam traversal cost, pushing nodes whose comprehensive cost exceeds the product of the minimum comprehensive cost of the current open list and the node cache filtering ratio into the cache. The filtering ratio increases with the cache occupancy rate, including:

[0019] Calculate the sum of the absolute differences between the center coordinates of the current search node and the center coordinates of the target endpoint in the three-dimensional coordinate system to generate a basic Manhattan distance evaluation value;

[0020] Detect the properties between the current search node and its adjacent nodes. If the connection between the current search node and its adjacent nodes crosses the joint surface of the prefabricated component, or if the two nodes are located in the component areas on both sides of the marked joint, then extract the preset impedance constant as the joint crossing cost.

[0021] The dimensionless basic Manhattan distance evaluation value, the seam crossing cost, and the congestion penalty term are linearly weighted and summed to generate the heuristic value of the heuristic function.

[0022] Calculate the current memory usage of the cache, and increase the node cache filtering ratio based on the memory usage using a positive correlation function;

[0023] When the overall cost of a node is greater than the product of the minimum overall cost in the current open list and the node cache filtering ratio, the expansion of the node is paused and the node is pushed into the cache for later use. When the search needs to supplement candidate branches or perform backtracking for no solution, nodes with low cost are extracted from the cache to continue participating in path planning.

[0024] Furthermore, the method employs an A* search in the grid space, defining soft exclusion zones by setting the grid neighborhood occupied by high-priority pipelines as the sum of half the pipe diameter, the insulation layer thickness, and a preset safety gap. The thickness of the soft exclusion zone is adjusted according to the media conflict weight, including:

[0025] Extract the set of spatial occupancy coordinates of high-priority pipelines with completed path planning, and obtain the outer diameter of the high-priority pipelines and the corresponding insulation layer thickness parameters.

[0026] Centered on the set of space occupancy coordinates, a grid area extending outward at a distance equal to half the outer diameter, the thickness of the insulation layer, and the sum of the preset safety gap is set as the initial soft restricted area;

[0027] Read the pre-assigned media conflict weights of each grid within the initial soft zone, and use the media conflict weights to linearly scale and adjust the outward extension distance to complete the adjustment of the soft zone thickness. The adjusted soft zone thickness is not less than the lower limit thickness corresponding to the outer contour of the entity and the minimum safety clearance.

[0028] When the A-star search enters the soft restricted area, the expansion cost of the horizontal direction perpendicular to the high-priority pipeline at the same elevation is set to infinity. This allows vertical crossing of the high-priority pipeline at different elevations while meeting the minimum clearance requirement, and allows cost calculation for nodes whose expansion direction is parallel to the high-priority pipeline.

[0029] Further, a comprehensive sorting key is generated based on the pipe diameter, pressure rating, and the equivalent bottleneck quantity after preset upper limit truncation and normalization of the pipeline to be routed, and the pipelines to be routed are sorted in descending order according to the comprehensive sorting key; wherein, the equivalent bottleneck quantity is determined based on the situation where the line connecting the start and end points of the pipeline crosses a spatial bottleneck, including:

[0030] Traverse the set of pipelines to be routed and extract the pipe diameter value and the dimensionless pressure rating parameter corresponding to the transport medium for each pipeline.

[0031] Calculate the three-dimensional straight line connecting the center of the starting point and the center of the ending point of a single pipeline, and count the equivalent number of bottlenecks generated when the three-dimensional straight line passes through a passable restricted area, a reserved hole in a prefabricated component, a casing area, or a narrow passage in a well.

[0032] Multiply the pipe diameter value by the dimensionless pressure rating parameter to obtain the basic pipeline weight;

[0033] Multiply the weight of the basic pipeline by the number of equivalent bottlenecks to generate a comprehensive sorting key for a single pipeline.

[0034] Compare the comprehensive sort keys of all pipelines to be routed, sort them in descending order of numerical value, and generate a priority execution queue for global multi-pipeline automatic routing.

[0035] Furthermore, when there is no solution for the subsequent pipeline, the suboptimal nodes of the preceding pipeline are popped out in ascending order according to the comprehensive sorting key and re-routed, including:

[0036] During the search for A-star in subsequent pipelines, if the open list is empty and the destination has not been reached, the current pipeline is determined to be in an unsolvable state, and the coordinates of the conflicting grid that caused the path blockage are recorded.

[0037] Based on the conflict grid coordinates, query the set of routed pipelines occupying the coordinates, and select the lowest priority preorder pipeline as the concession pipeline according to the ascending order of the comprehensive sorting key of the priority execution queue.

[0038] Extract the suboptimal node with low overall cost recorded at the front end of the conflict area of ​​the concession pipeline from the cache, and delete the local path of the concession pipeline from the suboptimal node to the original endpoint and the corresponding soft restricted area occupancy record.

[0039] Starting from the suboptimal node, the conflict grid and its neighborhood that caused the path blockage are set as high-cost avoidance zones, and the local A-star search path planning is re-executed on the concession pipeline.

[0040] Furthermore, if the same pipeline fails to resolve the issue three times consecutively, the conflict weight of the medium in the conflict zone is reduced and the thickness of the soft exclusion zone is readjusted, including:

[0041] Initialize a backtrack counter for each pipeline, and increment the backtrack counter by one whenever a pipeline triggers a local rerouting and a feasible path cannot be generated;

[0042] When the backtracking counter value of a certain pipeline is detected to have accumulated three times, the spatial boundary of the target conflict area that is obstructing the passage of the pipeline is extracted.

[0043] Reduce the grid medium conflict weight of the soft exclusion zone or medium conflict penalty item in the target conflict area by a preset gradient level, reduce the soft rejection strength of the current area for wiring, and keep the hard exclusion zone, structural entity occupancy area and pipeline entity collision constraints unchanged.

[0044] Based on the updated media conflict weights, the thickness of the soft restricted area is readjusted, and the adjusted thickness is limited to above the preset minimum safe thickness, driving the system to enter a new round of search wiring cycle.

[0045] One or more embodiments of the present invention also provide an automatic wiring system for electromechanical pipelines in prefabricated buildings, comprising the following modules:

[0046] The generation module is used to acquire building information model to construct a grid space, extract the coordinates of restricted areas and pipeline ports, and assign conflict weights to different grid media according to pipeline type; it generates a comprehensive sorting key based on the pipe diameter, pressure level, and equivalent bottleneck number after preset upper limit truncation and normalization of the pipeline to be routed, and sorts the pipelines to be routed in descending order according to the comprehensive sorting key; wherein, the equivalent bottleneck number is determined according to the situation of the pipeline starting point and ending point line crossing the spatial bottleneck.

[0047] The execution module is used to perform multi-level pruning based on the sorting. The first level removes isolated grids based on connectivity marking reachable domains, and injects the congestion penalty term into the heuristic function as the reciprocal of the reachable domain bottleneck cross-sectional area. The second level weights the expansion direction based on turning constraints, and prohibits changing direction when the extension length in the same direction is less than the threshold positively mapped by the reachable domain bottleneck cross-sectional area. The third level constructs a heuristic function based on Manhattan distance and seam crossing cost, and pushes nodes whose comprehensive cost exceeds the product of the minimum comprehensive cost of the current open list and the node cache filtering ratio into the cache. The filtering ratio increases with the cache occupancy rate.

[0048] The output module is used to perform an A* search in the grid space, setting up soft exclusion zones for the grid neighborhood occupied by high-priority pipelines based on half the pipe diameter, the insulation layer thickness, and the preset safety gap. The thickness of the soft exclusion zone is adjusted according to the media conflict weight. When there is no solution for subsequent pipelines, the second-best node of the preceding pipeline is popped out in ascending order according to the comprehensive sorting key and re-routed. When the same pipeline has no solution three times in a row, the media conflict weight of the conflict area is reduced and the thickness of the soft exclusion zone is readjusted, and the output path is written back to the building information model.

[0049] Preferably, the first level eliminates isolated graticles based on connectivity marking reachable domains, and injects a heuristic function with the reciprocal of the bottleneck cross-sectional area of ​​the reachable domain as a congestion penalty term, including:

[0050] Obtain the initial grid of the pipeline starting point coordinate mapping, and use a breadth-first search algorithm to traverse all non-hard restricted area grids that are connected to the initial grid and allow pipeline passage;

[0051] Assign a reachable state tag to the connected grid cells that are found during the traversal, and remove the coordinates of the non-connected grid cells that do not carry the reachable state tag from the search space matrix;

[0052] Collect the actual usable cross-sectional area data corresponding to all grids carrying the reachability status marker, find the minimum cross-sectional area and set the area value of the area as the bottleneck cross-sectional area of ​​the reachability domain;

[0053] The bottleneck cross-sectional area of ​​the reachable domain is normalized and reverse-mapped to generate a hole congestion penalty factor. The hole congestion penalty factor is then multiplied by a preset spatial weight coefficient and added as a congestion penalty term to the evaluation value of the heuristic function.

[0054] Preferably, the second level weights the extension direction based on turning constraints, and prohibits changing direction when the extension length in the same direction is less than a threshold positively mapped by the reachable domain bottleneck cross-sectional area, including:

[0055] During the expansion of the search node, the expansion direction vector of the current path is monitored in real time. When the expansion directions are consistent for two consecutive times, the direction inheritance mechanism is triggered, and the turning penalty value is reduced by a preset step size coefficient. The turning penalty value is not lower than the preset minimum turning penalty value.

[0056] Count the number of grids that extend continuously in the same straight direction in the current pipeline, and calculate the current extension length in the same direction;

[0057] Obtain the bottleneck cross-sectional area of ​​the reachable domain, generate a dimensionless positive adjustment factor based on the ratio of the bottleneck cross-sectional area of ​​the reachable domain to the reference cross-sectional area, and map the positive adjustment factor to a threshold for the number of unidirectional extended grids that prohibits direction changes.

[0058] Compare the current same-direction extension length with the threshold. If the current same-direction extension length is less than the threshold, then lock the vector angle of the current extension direction and block the extension permissions of all non-same-direction neighbor nodes in the search space.

[0059] Preferably, the third level constructs a heuristic function based on Manhattan distance and seam traversal cost, pushing nodes whose comprehensive cost exceeds the product of the minimum comprehensive cost of the current open list and the node cache filtering ratio into the cache. The filtering ratio increases with the cache occupancy rate, including:

[0060] Calculate the sum of the absolute differences between the center coordinates of the current search node and the center coordinates of the target endpoint in the three-dimensional coordinate system to generate a basic Manhattan distance evaluation value;

[0061] Detect the properties between the current search node and its adjacent nodes. If the connection between the current search node and its adjacent nodes crosses the joint surface of the prefabricated component, or if the two nodes are located in the component areas on both sides of the marked joint, then extract the preset impedance constant as the joint crossing cost.

[0062] The dimensionless basic Manhattan distance evaluation value, the seam crossing cost, and the congestion penalty term are linearly weighted and summed to generate the heuristic value of the heuristic function.

[0063] Calculate the current memory usage of the cache, and increase the node cache filtering ratio based on the memory usage using a positive correlation function;

[0064] When the overall cost of a node is greater than the product of the minimum overall cost in the current open list and the node cache filtering ratio, the expansion of the node is paused and the node is pushed into the cache for later use. When the search needs to supplement candidate branches or perform backtracking for no solution, nodes with low cost are extracted from the cache to continue participating in path planning.

[0065] Preferably, the step of using A-star search in the grid space to set up a soft exclusion zone for the grid neighborhood occupied by high-priority pipelines based on half the pipe diameter, the insulation layer thickness, and a preset safety gap, wherein the thickness of the soft exclusion zone is adjusted according to the media conflict weight, includes:

[0066] Extract the set of spatial occupancy coordinates of high-priority pipelines with completed path planning, and obtain the outer diameter of the high-priority pipelines and the corresponding insulation layer thickness parameters.

[0067] Centered on the set of space occupancy coordinates, a grid area extending outward at a distance equal to half the outer diameter, the thickness of the insulation layer, and the sum of the preset safety gap is set as the initial soft restricted area;

[0068] Read the pre-assigned media conflict weights of each grid within the initial soft zone, and use the media conflict weights to linearly scale and adjust the outward extension distance to complete the adjustment of the soft zone thickness. The adjusted soft zone thickness is not less than the lower limit thickness corresponding to the outer contour of the entity and the minimum safety clearance.

[0069] When the A-star search enters the soft restricted area, the expansion cost of the horizontal direction perpendicular to the high-priority pipeline at the same elevation is set to infinity. This allows vertical crossing of the high-priority pipeline at different elevations while meeting the minimum clearance requirement, and allows cost calculation for nodes whose expansion direction is parallel to the high-priority pipeline.

[0070] Preferably, a comprehensive sorting key is generated based on the pipe diameter, pressure rating, and the equivalent bottleneck quantity after truncation and normalization of the pipeline to be routed, and the pipelines to be routed are sorted in descending order according to the comprehensive sorting key; wherein, the equivalent bottleneck quantity is determined based on the situation where the line connecting the start and end points of the pipeline crosses a spatial bottleneck, including:

[0071] Traverse the set of pipelines to be routed and extract the pipe diameter value and the dimensionless pressure rating parameter corresponding to the transport medium for each pipeline.

[0072] Calculate the three-dimensional straight line connecting the center of the starting point and the center of the ending point of a single pipeline, and count the equivalent number of bottlenecks generated when the three-dimensional straight line passes through a passable restricted area, a reserved hole in a prefabricated component, a casing area, or a narrow passage in a well.

[0073] Multiply the pipe diameter value by the dimensionless pressure rating parameter to obtain the basic pipeline weight;

[0074] Multiply the weight of the basic pipeline by the number of equivalent bottlenecks to generate a comprehensive sorting key for a single pipeline.

[0075] Compare the comprehensive sort keys of all pipelines to be routed, sort them in descending order of numerical value, and generate a priority execution queue for global multi-pipeline automatic routing.

[0076] Preferably, when there is no solution for the subsequent pipeline, the suboptimal nodes of the preceding pipeline are popped out in ascending order according to the comprehensive sorting key and re-routed, including:

[0077] During the search for A-star in subsequent pipelines, if the open list is empty and the destination has not been reached, the current pipeline is determined to be in an unsolvable state, and the coordinates of the conflicting grid that caused the path blockage are recorded.

[0078] Based on the conflict grid coordinates, query the set of routed pipelines occupying the coordinates, and select the lowest priority preorder pipeline as the concession pipeline according to the ascending order of the comprehensive sorting key of the priority execution queue.

[0079] Extract the suboptimal node with low overall cost recorded at the front end of the conflict area of ​​the concession pipeline from the cache, and delete the local path of the concession pipeline from the suboptimal node to the original endpoint and the corresponding soft restricted area occupancy record.

[0080] Starting from the suboptimal node, the conflict grid and its neighborhood that caused the path blockage are set as high-cost avoidance zones, and the local A-star search path planning is re-executed on the concession pipeline.

[0081] Preferably, when the same pipeline fails to resolve the issue three times consecutively, the conflict weight of the medium in the conflict zone is reduced and the thickness of the soft exclusion zone is readjusted, including:

[0082] Initialize a backtrack counter for each pipeline, and increment the backtrack counter by one whenever a pipeline triggers a local rerouting and a feasible path cannot be generated;

[0083] When the backtracking counter value of a certain pipeline is detected to have accumulated three times, the spatial boundary of the target conflict area that is obstructing the passage of the pipeline is extracted.

[0084] Reduce the grid medium conflict weight of the soft exclusion zone or medium conflict penalty item in the target conflict area by a preset gradient level, reduce the soft rejection strength of the current area for wiring, and keep the hard exclusion zone, structural entity occupancy area and pipeline entity collision constraints unchanged.

[0085] Based on the updated media conflict weights, the thickness of the soft restricted area is readjusted, and the adjusted thickness is limited to above the preset minimum safe thickness, driving the system to enter a new round of search wiring cycle.

[0086] This invention achieves high-precision modeling of building spaces by constructing a grid space and assigning media conflict weights to different pipeline types. A comprehensive sorting key is generated using pipe diameter, pressure rating, and the number of equivalent bottlenecks to establish wiring priorities. The number of equivalent bottlenecks serves as an auxiliary correction factor in the sorting, after amplitude limiting, ensuring that trunk pipes and high-pressure pipelines are prioritized, while also considering the difficulty of traversing pipelines with many bottlenecks. This avoids distorted priority amplification caused by simply accumulating bottleneck counts, ensuring priority placement for critical and complex pipelines and reducing overall layout complexity. A multi-level pruning strategy is employed, eliminating isolated grids and utilizing congestion penalties, applying turning constraints to limit unreasonable detours, and constructing a heuristic function combining Manhattan distance and joint crossing costs. This reduces the invalid search space, improves the computational efficiency of path planning, and ensures the construction standardization of pipeline routes. A soft-no-go zone mechanism based on pipe diameter and insulation layer is used to reasonably reserve installation and maintenance space. When local wiring is unsolvable, the reconstruction mechanism of backtracking previous suboptimal nodes and reducing conflict weights improves the global wiring success rate in high-density pipeline scenarios and enables precise layout of electromechanical pipelines in prefabricated buildings. Attached Figure Description

[0087] Figure 1 A flowchart of an automatic wiring method for electromechanical pipelines in prefabricated buildings;

[0088] Figure 2 This is a schematic diagram of the same-direction extension length and the variable-direction penalty constraint mechanism. Detailed Implementation

[0089] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this invention, and not all of them. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0090] Reference Figure 1This invention proposes an automatic wiring method for electromechanical pipelines in prefabricated buildings, comprising the following steps:

[0091] S1: Obtain the building information model to construct a raster space, extract the coordinates of restricted areas and pipeline ports, and assign different raster media conflict weights according to pipeline type.

[0092] The system parses IFC format files (or other Building Information Modeling (BIM) formats) to extract the boundary geometric data of building beams, columns, walls, and prefabricated components. Using a 3D voxelization algorithm based on the separating axis theorem, the 3D bounding box of the building is discretized into a 3D Boolean array-represented raster space with a set precision. It traverses the equipment connector entities in the model, obtaining the normal vectors and 3D coordinates of the center points. Based on the pipeline system type, equipment connection relationships, or a preset wiring task list, the corresponding connectors are identified as the start and end ports of the pipelines to be routed. Grids occupied by beams, columns, and walls but not occupied by reserved holes, sleeves, or permitted passageways are marked as hard restricted areas. Reserved holes, sleeves, and permitted pipeline passageways are marked as passable restricted grids or high-cost passable grids. A hash mapping table is constructed, setting media conflict weight constants for power, low-voltage, water supply, drainage, and HVAC pipeline types. Higher passage penalty coefficients are set for corresponding pipeline types in sensitive intersection areas, forming a conflict cost mapping relationship between pipeline types and spatial grids.

[0093] S2, a comprehensive sorting key is generated based on the pipe diameter, pressure rating, and equivalent bottleneck quantity after preset upper limit truncation and normalization of the pipeline to be routed, and the pipeline to be routed is sorted in descending order according to the comprehensive sorting key; wherein, the equivalent bottleneck quantity is determined based on the situation where the pipeline's starting point and ending point cross spatial bottlenecks.

[0094] The process involves processing a 3D grid array, calculating the shortest straight-line distance from each non-restricted grid cell to the nearest hard restricted zone boundary, and identifying continuous grid areas with clearance distances below a preset passage threshold and located within connected channels as spatial bottleneck areas. Alternatively, channel contraction areas can be extracted based on the inverse field of the distance field as spatial bottleneck areas. The process simulates the straight-line trajectory connecting the start and end points of each pipeline to be routed, and counts the number of continuous segments that penetrate spatial bottleneck areas within the 3D grid. This number of continuous segments is used as the initial bottleneck count. Then, based on a preset upper limit for the bottleneck count and a normalized conversion function, the initial bottleneck count is converted into an equivalent bottleneck count for sorting calculations. When the actual number of continuous segments exceeds the preset upper limit for the bottleneck count, the upper limit is used in subsequent calculations to prevent the bottleneck count from excessively amplifying the pipe diameter and pressure rating. The nominal pipe diameter is obtained by reading the corresponding pipeline attributes in the building information model. The operating pressure, medium hazard or system importance are mapped to dimensionless pressure level parameters. The product of the nominal pipe diameter, dimensionless pressure level parameters and the number of equivalent bottlenecks is calculated. The result is used as the comprehensive sorting key for the pipeline to participate in priority ranking. All pipelines to be laid are stably sorted in descending order according to the comprehensive sorting key.

[0095] In one embodiment, a comprehensive sorting key is generated based on the pipe diameter, pressure rating, and the equivalent bottleneck number after preset upper limit truncation and normalization of the pipeline to be routed. The pipelines to be routed are then sorted in descending order according to this comprehensive sorting key. The equivalent bottleneck number is determined based on the situation where the pipeline's starting and ending points cross spatial bottlenecks, including:

[0096] Traverse the set of pipelines to be routed and extract the pipe diameter value and the dimensionless pressure rating parameter corresponding to the transport medium for each pipeline.

[0097] Calculate the three-dimensional straight line connecting the center of the starting point and the center of the ending point of a single pipeline, and count the equivalent number of bottlenecks generated when the three-dimensional straight line passes through a passable restricted area, a reserved hole in a prefabricated component, a casing area, or a narrow passage in a well.

[0098] Multiply the pipe diameter value by the dimensionless pressure rating parameter to obtain the basic pipeline weight;

[0099] Multiply the weight of the basic pipeline by the number of equivalent bottlenecks to generate a comprehensive sorting key for a single pipeline.

[0100] Compare the comprehensive sort keys of all pipelines to be routed, sort them in descending order of numerical value, and generate a priority execution queue for global multi-pipeline automatic routing.

[0101] During the automatic pipeline system layout initialization phase, the list of pipelines to be routed is loaded into an iterator for polling. For each pipeline instance, the data interface is called to parse the attribute structure tree of the pipeline instance and extract the nominal pipe diameter value variable. and the dimensionless pressure rating parameter variable that maps the hazard level of the medium transported by the pipeline instance. The internal high-pressure fire water pressure is 1.5, the low-pressure rainwater pressure is 0.8, and the conventional air duct pressure is 1.0. For topological resistance prediction, the spatial three-dimensional start and end nodes of the pipeline are extracted. A three-dimensional straight-line grid traversal algorithm is used to map the straight-line segment between the pipeline's start and end points into a continuous three-dimensional grid coordinate sequence, which is used to count the number of continuous segments that the straight-line segment traverses in spatial bottleneck areas. The intersection collision operator is used to compare this set of straight lines with the voxels corresponding to reserved sleeves, passable restricted openings, narrow passages in manholes, and other bottleneck areas marked in the BIM model. Clustering statistics are performed on overlapping continuous segments to obtain the original bottleneck quantity variable. Assuming the straight line traverses the precast beam's reserved sleeve twice and the core area of ​​the secondary beam once, the frequency is 3. The equivalent bottleneck number is not directly calculated using the infinitely accumulated original bottleneck number, but rather based on the original bottleneck number, a preset upper limit for the bottleneck number, and a minimum correction benchmark, ensuring its value remains within a preset range. This allows the foundation pipeline weight formed by pipe diameter and pressure rating to maintain its dominant role in the comprehensive sorting key. To represent the wiring sequence hierarchy, the foundation pipeline weight is generated by integrating size and hazard constraints through the product of the pipe diameter value and the dimensionless pressure rating parameter. Taking the main pipe as an example, the result is 225. Considering the spatially distributed impedance, the original number of bottlenecks crossed will be statistically analyzed. Based on the preset maximum number of bottlenecks The bottlenecks are truncated and converted into equivalent bottleneck quantities. ,For example Where λ is the bottleneck adjustment coefficient, preferably 0.1 to 0.5, so that The value is between 1 and 1.5; then, this basic weight is multiplied by the equivalent number of bottlenecks to generate a single pipeline comprehensive sorting key. For example, the weight of basic pipelines. The original number of bottlenecks is 225. It is 3. If λ is 5 and 0.3, then the number of equivalent bottlenecks is... The overall sorting key is 265.5, with a value of 1.18. This method retains the trend that the more bottlenecks a pipe crosses, the earlier it should be arranged, while avoiding the abnormal overtaking of the main pipe by low-diameter, low-pressure branch pipes due to excessive original bottlenecks. After obtaining the overall sorting key of each pipeline to be routed through parallel computing, a sorting array space is allocated in memory, and a stable sorting algorithm is called to sort the pipelines in O(NlogN) time complexity. The array is arranged in descending order from largest to smallest. Main trunk lines and lines that frequently cross bottlenecks are stably placed at the front of the execution array, which helps to form a global priority pathfinding sequence with clear priorities and high fault tolerance.

[0102] S3 performs multi-level pruning based on the sorting. The first level removes isolated grids based on connectivity labels of reachable domains, and injects the heuristic function with the reciprocal of the bottleneck cross-sectional area of ​​the reachable domain as the congestion penalty term.

[0103] The starting grid of the current priority pipeline is extracted as the seed node. A breadth-first search algorithm is invoked to perform 3D connectivity branch marking within non-hard-no-go grids, setting unvisited, disconnected, isolated grids as unreachable and removing them from the current search graph node set. The total number of 3D connected grid pixels traversed by each cross-section is calculated along a preset main traffic direction or the direction connecting the starting and ending points to determine the bottleneck cross-sectional area of ​​the reachable domain. This bottleneck cross-sectional area is normalized to a preset reference cross-sectional area, and a dimensionless congestion penalty coefficient is generated based on the reverse mapping of the normalization result. In subsequent pathfinding formulas, this congestion penalty coefficient is multiplied by a preset spatial weight coefficient to calculate a cost penalty term, which is then added to the expected total cost heuristic value of the A* algorithm.

[0104] In one embodiment, the first level eliminates isolated graticules based on connectivity-labeled reachable domains, injecting a heuristic function with the reciprocal of the bottleneck cross-sectional area of ​​the reachable domain as a congestion penalty term, including:

[0105] Obtain the initial grid of the pipeline starting point coordinate mapping, and use a breadth-first search algorithm to traverse all non-hard restricted area grids that are connected to the initial grid and allow pipeline passage;

[0106] Assign a reachable state tag to the connected grid cells that are found during the traversal, and remove the coordinates of the non-connected grid cells that do not carry the reachable state tag from the search space matrix;

[0107] Collect the actual usable cross-sectional area data corresponding to all grids carrying the reachability status marker, find the minimum cross-sectional area and set the area value of the area as the bottleneck cross-sectional area of ​​the reachability domain;

[0108] The bottleneck cross-sectional area of ​​the reachable domain is normalized and reverse-mapped to generate a hole congestion penalty factor. The hole congestion penalty factor is then multiplied by a preset spatial weight coefficient and added as a congestion penalty term to the evaluation value of the heuristic function.

[0109] During the first-level multi-level pruning, the 3D space of the Building Information Model (BIM) is discretized into a 3D raster matrix. The side length resolution of a single raster is preferably set to 50mm to 100mm, such as a 50mm×50mm×50mm grid size. The 3D coordinates of the starting point of the pipeline to be routed are extracted, rounded down, and mapped to the starting raster index. A first-in-first-out (FIFO) queue is initialized, and a 3D breadth-first search algorithm is used. Following a six-sided connectivity expansion rule, the set of raster cells in the space that are not blocked by obstacles and belong to the allowed passage area, reserved opening area, or restricted passage area is continuously traversed. All expanded raster cells are marked with a Boolean reachability flag in the data dictionary. The entire search space matrix is ​​traversed, and nodes corresponding to non-connected isolated areas without this flag are removed from the current search node set to reduce the memory footprint of the search space. For the remaining reachable domains, the connected components of the raster cells with flags are scanned layer by layer along the preset main passage direction or the direction connecting the starting and ending points. The number of raster cells in each cross-sectional layer is counted and multiplied by the area of ​​a single raster cell to calculate the actual usable cross-sectional area. By comparing and filtering, the minimum area points in the connected paths are identified, and the area values ​​corresponding to these minimum points are assigned to the variable representing the bottleneck cross-sectional area of ​​the reachable domain. Set reference cross-sectional area. And the stability constant ε, to calculate the hole congestion penalty factor. Furthermore, an additional congestion cost is added to the heuristic term h(n) of the A* algorithm's heuristic function f(n) = g(n) + h(n). Here, the preset spatial weight coefficients are invoked. The preferred range is set to 10.0 to 50.0, with an example value of 25.0. The congestion penalty term appended to the current extended node's evaluation value is... This increases the path cost when traversing narrow areas on a numerical level, forcing the algorithm to prioritize exploring more open corridor spaces.

[0110] S4, the second level weights the extension direction based on turning constraints, and prohibits changing direction when the extension length in the same direction is less than the threshold positively mapped by the cross-sectional area of ​​the reachable domain bottleneck.

[0111] The extended structure of the search tree node maintains two state variables: the current 3D vector of the travel direction and the current number of consecutive straight-line travel grids. A reference cross-sectional area, a stability constant, and a base number of grids extending in the same direction are set. The bottleneck cross-sectional area of ​​the reachable domain extracted in the first level is normalized and positively mapped, and then rounded up and constrained to generate a threshold integer. During the node neighbor generation phase, when the current node has formed a valid travel direction, the current number of consecutive straight-line travel grids is compared with the threshold integer. If the current number of consecutive straight-line travel grids is less than the threshold integer, the edge connection cost of all non-same-direction neighbor grids is set to positive infinity, thus prohibiting direction changes and only allowing the extension of the next grid along the current travel direction. If the current node has not yet formed a valid travel direction, the prohibition of direction changes is not performed. When the current number of consecutive straight-line travel grids is greater than or equal to the threshold integer, direction changes are allowed, and additional nonlinear turning resistance weights are added to the actual path movement cost of the neighboring nodes that have changed direction.

[0112] In one embodiment, the second level weights the extension direction based on turning constraints, prohibiting direction change when the same-direction extension length is less than a threshold positively mapped by the reachable domain bottleneck cross-sectional area, including:

[0113] During the expansion of the search node, the expansion direction vector of the current path is monitored in real time. When the expansion directions are consistent for two consecutive times, the direction inheritance mechanism is triggered, and the turning penalty value is reduced by a preset step size coefficient. The turning penalty value is not lower than the preset minimum turning penalty value.

[0114] Count the number of grids that extend continuously in the same straight direction in the current pipeline, and calculate the current extension length in the same direction;

[0115] Obtain the bottleneck cross-sectional area of ​​the reachable domain, generate a dimensionless positive adjustment factor based on the ratio of the bottleneck cross-sectional area of ​​the reachable domain to the reference cross-sectional area, and map the positive adjustment factor to a threshold for the number of unidirectional extended grids that prohibits direction changes.

[0116] Compare the current same-direction extension length with the threshold. If the current same-direction extension length is less than the threshold, then lock the vector angle of the current extension direction and block the extension permissions of all non-same-direction neighbor nodes in the search space.

[0117] In the second-level search node expansion mechanism, a three-dimensional vector attribute recording the preceding displacement vector is attached to each node. When generating child nodes, the expansion direction vector of the current node is calculated in real time and a dot product operation is performed with the preceding vector. When the dot product result shows that the two expansion directions are consistent or the included angle is less than a preset angle tolerance, the direction inheritance mechanism is triggered. The basic steering penalty value is extracted, and a preset step size attenuation coefficient between 0.8 and 0.95 is input, so that the penalty value required for subsequent directional changes is calculated accordingly. Decreasing, where k is the number of consecutive steps in the same direction. To minimize the turning penalty value. Maintain the same-direction extension length of integer variables. Each time a grid expansion occurs in the same direction, this variable is incremented by 1, recording the number of grids that the current pipeline segment continuously extends along a single coordinate axis. The bottleneck cross-sectional area parameter of the reachable domain obtained from previous calculations is extracted. Using a preset reference cross-sectional area Stability constant ε and basic threshold Forward mapping is performed by calculating the product of the base threshold and the positive adjustment factor. Then round up to obtain the target calculated value, which is limited to a certain range. Within the range, the threshold is obtained. ,in To adjust the index, the threshold is set to 5 grid cells for open areas, while for confined areas, the threshold automatically decreases to 1 to 2 grid cells. (See reference...) Figure 2 The gray area represents the same-direction extension threshold restriction zone, during which the pipeline can only extend in the current direction. Once the threshold is reached, the ability to change direction is unlocked, allowing extension in multiple directions. The comparison and judgment module is triggered: if the current same-direction extension length... If the threshold is less than 5, when using a six-neighbor search, the expansion permissions of all neighboring nodes in the current loop except for the original direction are blocked. This ensures that when laying pipelines in open corridors and other areas, they maintain a relatively long straight line to unlock the turning permission, suppressing branching of the search tree and irregular twisting of pipelines. When crossing narrow bottlenecks such as manholes and congested areas under beams, the pipeline can quickly unlock the turning permission due to the positive reduction of the threshold, giving it extremely high flexibility in turning and avoiding obstacles.

[0118] S5, the third level constructs a heuristic function based on Manhattan distance and seam crossing cost, and pushes nodes whose comprehensive cost exceeds the product of the minimum comprehensive cost of the current open list and the node cache filtering ratio into the cache. The filtering ratio increases with the occupancy rate of the cache.

[0119] Extract the spatial surface equation of the splicing surface of prefabricated building components. When the extended line from a child node to a parent node intersects geometrically with any splicing surface, superimpose the cost of seam crossing. Calculate the 3D Manhattan distance from the current node to the target port grid. Then, after dimensionless processing of the 3D Manhattan distance, seam crossing cost, and preceding congestion penalty term, perform a weighted summation as the basic heuristic value. Initialize a spare priority queue data structure containing floating-point type filtering multiplier parameters and the maximum capacity value of the suboptimal node as a cache. When the comprehensive cost of neighboring node expansion... Greater than the minimum comprehensive cost in the current open list When multiplying the selection factor parameter, the node is prevented from entering the main open list of the A* algorithm. Instead, it is inserted into the heap-style standby priority queue according to the comprehensive cost key. The ratio of the current total number of elements in the standby priority queue to the maximum capacity value is calculated in real time as the occupancy rate floating-point number. The initial selection factor parameter is added to the product of the occupancy rate floating-point number and the adjustment coefficient to update the selection factor parameter for the current period. When the main open list is empty, a backtracking redistribution is triggered, or the release condition is met, the node is released from the cache in ascending order of comprehensive cost to participate in the search again or be available for subsequent backtracking calls.

[0120] In one embodiment, the third level constructs a heuristic function based on Manhattan distance and seam traversal cost, pushing nodes whose combined cost exceeds the product of the minimum combined cost of the current open list and the node cache filtering ratio into the cache. The filtering ratio increases with the cache occupancy rate, including:

[0121] Calculate the sum of the absolute differences between the center coordinates of the current search node and the center coordinates of the target endpoint in the three-dimensional coordinate system to generate a basic Manhattan distance evaluation value;

[0122] Detect the properties between the current search node and its adjacent nodes. If the connection between the current search node and its adjacent nodes crosses the joint surface of the prefabricated component, or if the two nodes are located in the component areas on both sides of the marked joint, then extract the preset impedance constant as the joint crossing cost.

[0123] The dimensionless basic Manhattan distance evaluation value, the seam crossing cost, and the congestion penalty term are linearly weighted and summed to generate the heuristic value of the heuristic function.

[0124] Calculate the current memory usage of the cache, and increase the node cache filtering ratio based on the memory usage using a positive correlation function;

[0125] When the overall cost of a node is greater than the product of the minimum overall cost in the current open list and the node cache filtering ratio, the expansion of the node is paused and the node is pushed into the cache for later use. When the search needs to supplement candidate branches or perform backtracking for no solution, nodes with low cost are extracted from the cache to continue participating in path planning.

[0126] In the third-level heuristic search phase, the heuristic module extracts the center coordinates of the current node. and the center coordinates of the target node Execute the formula The basic Manhattan distance assessment value is obtained. In the topology connectivity test, the node component's ID is queried in real time, and the connection between the current node and its adjacent nodes is determined using a preset joint surface equation to see if the connection crosses the prefabricated component joint. When a joint is found to be crossed, the impedance constant set in the system configuration table is extracted. As a cost for traversing seams, the sum of the maximum spans of the environment bounding box in the X, Y, and Z directions is used. The Manhattan evaluation value is normalized, and the impedance upper limit is used to normalize the seam cost. The two values ​​are then summed with the dimensionless congestion penalty term using empirical weight vectors of 0.5, 0.3, and 0.2 to synthesize the comprehensive heuristic value h(n). At the pathfinding memory management level, a backup node buffer pool data structure is built-in. During each search cycle, the underlying API is called to read the current buffer pool memory occupancy rate. The initial benchmark for the selection ratio variable is set to 1.5, and the update mechanism follows a positively correlated linear adjustment equation: ratio At a 45% occupancy rate, the multiplier is amplified to 1.95. The comparison and verification logic is initiated: if the overall cost of the current node... Greater than the minimum comprehensive cost extracted from the open list Multiplying by a factor of 1.95, the result indicates a lack of search potential in the short term. The engine then suspends all subsequent expansion processes for that node, serializes and packages the coordinate data and cost value, and inserts it into a backup priority queue for later use. When the main open list of nodes is insufficient, the open list is empty, or a suboptimal branch is needed for subsequent backtracking and redistribution, cached nodes are extracted from low to high overall cost and added back to the open list or used as suboptimal nodes. When the current capacity of the cache reaches the preset maximum capacity, a preset number of candidate nodes are retained from low to high overall cost, while candidate nodes with higher overall costs are discarded or their retention is delayed. When the open list is empty and candidate nodes still exist in the cache, the node with the lowest overall cost in the cache is released first and added back to the open list to avoid premature interruption of the search process due to the caching strategy.

[0127] S6, A-star search is used in the grid space to set up soft exclusion zones for the grid neighborhood occupied by high-priority pipelines according to half the pipe diameter, the insulation layer thickness and the preset safety gap. The thickness of the soft exclusion zone is adjusted according to the media conflict weight.

[0128] After successfully finding the optimal 3D grid coordinate sequence that satisfies the constraints using the 3D A* algorithm for the preceding pipeline, a multidimensional morphological dilation algorithm is invoked to spatially expand the physical grid corresponding to the coordinate sequence. The outer diameter of the corresponding pipeline, the thickness of the external thermal insulation layer, and the preset safety gap are read. The basic expansion radius is obtained by dividing half the outer diameter, the sum of the insulation layer thickness and the preset safety gap, by the global grid cell side length and rounding up. This basic expansion radius is multiplied by the floating-point number of the medium conflict weight assigned to the pipeline to obtain the number of pixel layers for the soft exclusion zone thickness. The soft exclusion zone thickness is limited to no less than the number of grid layers corresponding to the pipeline's physical outer contour, the insulation layer's outer contour, and the minimum safety clearance. Grids corresponding to the number of pixel layers for the soft exclusion zone thickness are marked as soft exclusion zones outwards from the original coordinate sequence grid. An additional passage resistance value, which gradually decreases with increasing distance from the centerline of the routed pipeline, is injected into the basic passage cost of the soft exclusion zone grid.

[0129] In one embodiment, the A-star search is used in the grid space to define a soft exclusion zone based on the sum of half the pipe diameter, the insulation layer thickness, and a preset safety gap for the grid neighborhood occupied by high-priority pipelines. The thickness of the soft exclusion zone is adjusted according to the media conflict weight, including:

[0130] Extract the set of spatial occupancy coordinates of high-priority pipelines with completed path planning, and obtain the outer diameter of the high-priority pipelines and the corresponding insulation layer thickness parameters.

[0131] Centered on the set of space occupancy coordinates, a grid area extending outward at a distance equal to half the outer diameter, the thickness of the insulation layer, and the sum of the preset safety gap is set as the initial soft restricted area;

[0132] Read the pre-assigned media conflict weights of each grid within the initial soft zone, and use the media conflict weights to linearly scale and adjust the outward extension distance to complete the adjustment of the soft zone thickness. The adjusted soft zone thickness is not less than the lower limit thickness corresponding to the outer contour of the entity and the minimum safety clearance.

[0133] When the A-star search enters the soft restricted area, the expansion cost of the horizontal direction perpendicular to the high-priority pipeline at the same elevation is set to infinity. This allows vertical crossing of the high-priority pipeline at different elevations while meeting the minimum clearance requirement, and allows cost calculation for nodes whose expansion direction is parallel to the high-priority pipeline.

[0134] In the collaborative anti-collision cabling mechanism, the three-dimensional mesh coordinate set of high-priority pipelines already laid is queried through an index in the global status table, and the outer diameter variable is read from the BIM parameter dictionary. and the corresponding medium's insulation layer thickness variation The spatial expansion algorithm is employed, using the high-priority pipeline center mesh as the source, and performing three-dimensional outward expansion according to Euclidean distance to calculate the baseline expansion radius. ,in A preset safety clearance is established. The calculated outward extension distance is approximately 130mm, equivalent to spanning approximately three 50mm standard grid squares. All three-dimensional neighborhood points covered by this extension radius are uniformly marked as initial soft exclusion zones with collision resistance. The media conflict weight variables set by each discipline are read from the global attribute configuration. This weight fluctuates between 0.5 and 2.0 depending on the hazard level of the medium; for example, 2.0 for high-voltage cables and 0.8 for gravity drainage pipes. The actual effective thickness is then adjusted outwards. ,in The lower limit radius corresponds to the outer contour of the entity, the outer contour of the insulation layer, and the minimum safe clearance. Therefore, the soft exclusion zone around pipelines with higher media conflict weights is appropriately expanded, while the soft exclusion zone around pipelines with lower media conflict weights can be appropriately contracted, but not smaller than the minimum boundary required for actual collision avoidance. When the A-star search path of a secondary branch pipe enters the soft exclusion zone, a cost-oriented blocking device is activated: if the Z-axis elevation of the current exploration node is completely consistent with the main pipe, and the inner product of the candidate horizontal direction vector and the main pipe direction vector is close to zero, the cost attribute g(n) of the candidate expansion node entering the queue is assigned positive infinity to block the connectivity of that layer; however, if the node attempts to perform an elevation jump along the Z-axis to cross the top, and the clearance after the jump meets the preset safe clearance requirement, or explores a translational direction with a non-zero inner product, and the clearance verification meets the preset safe clearance requirement, then the passable state is restored, but the attenuated soft exclusion zone additional cost is still added based on its distance from the centerline of the already laid pipeline, maintaining queue calculation, thereby ensuring the algorithmic implementation of the pipeline three-dimensional staggered laying specification.

[0135] S7. When there is no solution for the subsequent pipeline, pop up the suboptimal node of the preceding pipeline in ascending order according to the comprehensive sorting key and reroute it.

[0136] A conflict-based search algorithm framework is employed. When the currently traversed successor pipeline is completely cleared from the open list during the main A-star search process and has not reached the target point, it is determined that there is no solution for pathfinding. The current search state is paused, triggering a backtracking mechanism. Based on the generated comprehensive sorting key, instances of pre-routed pipelines that have spatially collided with the current successor pipeline are searched in ascending order. Pre-routed pipelines with lower comprehensive sorting keys and allowing for local concessions are selected as concession pipelines. The local path from the suboptimal node to the original endpoint and the corresponding soft restricted area occupancy record of this concession pipeline are deleted, while the confirmed path from its starting point to the suboptimal node is retained. From the backup priority queue cache corresponding to the concession pipeline stored in the third level, a suboptimal branch node located at the front of the conflict region and with a lower comprehensive cost is retrieved as a new starting point through a heap pop operation. After restoring the context travel state vector corresponding to this node, the cooperative A-star algorithm is invoked to continue pathfinding, guiding the concession pipeline to replan its local path towards surrounding non-crowded areas to free up traversable space.

[0137] In one embodiment, when there is no solution for the subsequent pipeline, the suboptimal nodes of the preceding pipeline are popped out in ascending order according to the comprehensive sorting key and re-routed, including:

[0138] During the search for A-star in subsequent pipelines, if the open list is empty and the destination has not been reached, the current pipeline is determined to be in an unsolvable state, and the coordinates of the conflicting grid that caused the path blockage are recorded.

[0139] Based on the conflict grid coordinates, query the set of routed pipelines occupying the coordinates, and select the lowest priority preorder pipeline as the concession pipeline according to the ascending order of the comprehensive sorting key of the priority execution queue.

[0140] Extract the suboptimal node with low overall cost recorded at the front end of the conflict area of ​​the concession pipeline from the cache, and delete the local path of the concession pipeline from the suboptimal node to the original endpoint and the corresponding soft restricted area occupancy record.

[0141] Starting from the suboptimal node, the conflict grid and its neighborhood that caused the path blockage are set as high-cost avoidance zones, and the local A-star search path planning is re-executed on the concession pipeline.

[0142] In the backtracking and correction engine's operation mechanism, when performing A-star pathfinding for subsequent low-optimal pipelines, if all the surrounding six-directional extension nodes of the low-optimal pipeline touch the rigid collision model or closed envelope region, causing the memory-maintained open list to be cleared prematurely and the verification flag not to reach the endpoint, the core scheduling module will throw an exception and trigger a path-unsolvable state. At this time, the exception detection module immediately locks the search terminal point in the A-star closed list that is closest to the endpoint using Manhattan ranging, reverse-extracts the coordinates of all occupied grid entities blocking the terminal point, and stores them in the array. In the middle. The three-dimensional spatial occupancy reverse mapping hash table is invoked, and comparisons are performed. The scheduler identifies and locates all existing completed pipeline objects that are currently traversing the aforementioned space. To reduce the scope of modifications, the scheduler loads the previously globally pre-sorted execution array and performs an ascending backtracking iteration in ascending order within the involved existing pipeline pool, utilizing the previously calculated comprehensive sort key. The system compares and extracts the target object with the smallest sorted primary key that allows for local redistribution, assigning it a concession pipeline identity label. After determining the concession pipeline, it queries the corresponding backup node cache record and adds it to the corresponding backup node buffer pool Cache. Based on the stored records, it extracts the second-best grid coordinates with the lowest overall cost that were sealed and reserved just before the concession pipeline entered the conflict core area, and uses these as the second-best node. Load into main memory. The algorithm module detaches the linked list bindings and executes the slice clear operator to release the data from the linked list. The coordinate state variables and occupancy locks of the subsequent local pipeline model are extended from the initial target anchor point to the original target anchor point, and the starting point is retained. The confirmed path between them. Taking this suboptimal node as the new local search starting point, the coordinate block of the core conflict area that caused the path blockage, along with the three-dimensional protective shell that expands outward by 2 units in one direction, is rewritten as a high-cost avoidance area with a high penalty value. Under the above high-cost constraint, local A-star path planning is performed again on this low-priority concession pipeline. The path generation of the pipeline prioritizes spatial avoidance and trajectory change towards the surrounding non-crowded areas, releasing key bottleneck passage channels for the currently unsolvable pipeline. After the concession pipeline completes local rerouting, the global occupancy grid table, soft exclusion zone marker table, and media conflict cost table are updated, and the new path of the concession pipeline is checked against other already routed pipelines, hard exclusion zones, and structural entity occupancy areas. If the check fails, it is rolled back to the state before rerouting, and the next concedeable preceding pipeline is selected or the conflict weight reduction process is triggered.

[0143] S8. When there is no solution for the same pipeline three times in a row, the conflict weight of the medium in the conflict area is reduced and the thickness of the soft restricted area is readjusted. The output path is written back to the building information model.

[0144] An integer failure retry counter is assigned to each pipeline instance. The counter is incremented by 1 each time backtracking and rerouting fails to resolve the issue. When the counter reaches 3, the bounding box coordinates with the highest density of obstacles encountered in the backtracking search tree are identified as the core conflict region. The grid media conflict weights within this region that belong to soft exclusion zones or media conflict penalty items are multiplied by a 0.5 attenuation factor. Hard exclusion zones, structural entity occupancy areas, and the outer contours of already routed pipeline entities are not included in the weight reduction process. The number of pixel layers for the soft exclusion zone thickness is recalculated using rounding up and combined with lower bound constraints. The shrunk soft exclusion zone thickness is not less than the lower bound layer number corresponding to the entity outer contour, insulation layer outer contour, and minimum safety clearance. Under these conditions, the 3D A* algorithm is executed to connect both ends. If the search still fails to connect the two ends, the soft media conflict weight continues to be reduced according to the preset attenuation level, but the media conflict weight must not be lower than the preset weight lower limit. When the preset maximum number of retries or the preset weight lower limit is reached and no feasible path is generated, the automatic search is terminated and an unsolvable alarm message, the bounding box coordinates of the core conflict area, the affected pipeline number, and suggested objects for manual adjustment are output. If a path is successfully generated and passes the collision check, the failure retry counter for that pipeline is cleared. The three-dimensional continuous center point coordinate set obtained from the pathfinding is sent to the Douglas-Peucker algorithm to perform redundant collinear node thinning, converting it into path geometry data composed of straight pipe segments and elbow segments that meet the minimum bending radius requirement, and performing a collision check before writing it back; the corresponding pipe, cable tray, or duct object generation interface in the Revit application interface is called to generate a solid pipeline component data stream based on the curve geometry data and the originally set pipe diameter and material properties, and the data stream is persistently stored and written to the original building information model file.

[0145] In one embodiment, when the same pipeline fails to resolve the conflict three times consecutively, the media conflict weight in the conflict region is reduced and the thickness of the soft exclusion zone is readjusted, including:

[0146] Initialize a backtrack counter for each pipeline, and increment the backtrack counter by one whenever a pipeline triggers a local rerouting and a feasible path cannot be generated;

[0147] When the backtracking counter value of a certain pipeline is detected to have accumulated three times, the spatial boundary of the target conflict area that is obstructing the passage of the pipeline is extracted.

[0148] Reduce the grid medium conflict weight of the soft exclusion zone or medium conflict penalty item in the target conflict area by a preset gradient level, reduce the soft rejection strength of the current area for wiring, and keep the hard exclusion zone, structural entity occupancy area and pipeline entity collision constraints unchanged.

[0149] Based on the updated media conflict weights, the thickness of the soft restricted area is readjusted, and the adjusted thickness is limited to above the preset minimum safe thickness, driving the system to enter a new round of search wiring cycle.

[0150] To address topology deadlock within extremely limited, confined prefabricated nodes, a dedicated integer variable object—a backtracking counter—is loaded into the background data stack for each instantiated pipeline entity during the initial allocation of multi-pipeline pathfinding tasks. The baseline starting point is set to 0. During pathfinding, whenever a pipeline performs a backtracking based on a suboptimal node and re-activates the restricted quadratic A-star calculation, and still encounters path exploration tree exhaustion and no solution for open table traversal, the built-in exception handling component automatically pushes an increment command to the corresponding pipeline registration information interface. The global status monitoring process periodically checks the parameter status of each queue element at high frequency. Once the backtracking counter integer variable of the blocked pipeline is detected, If the constant preset upper limit is reached three times, the line is declared to be in a geometric deadlock. The engine selects all the discrete points of the clustered blocking meshes accumulated from the three collisions, extracts the maximum and minimum values ​​along the three axes of the coordinate system, adds an expansion tolerance to each, and generates a three-dimensional bounding box based on XYZ rectangular coordinates, which is fixed as the clear geometric boundary of the target conflict zone. After entering the highest level of parameter degradation and takeover stage, the global structure dictionary within the bounding boundary is traversed, and parameter rewriting is initiated for all soft forbidden zones or medium conflict penalty terms involved in this subset. Medium conflict weight reduction adjustment based on linear gradient difference is implemented: the current initial weight coefficient is read. And subtract the set gradient constant. Furthermore, the reduced weight is not lower than the preset minimum weight threshold. The overwriting of the weight parameter library synchronously triggers a linked update of the soft-zone thickness, calling the newly rewritten weights to overwrite the original previous elastic expansion thickness calculation formula. This causes the collision protection thickness of exclusive soft restricted areas around ducts and cable trays within the conflict envelope to rapidly shrink from a relatively wide 120mm isolation zone to a narrower 100mm isolation zone, but not lower than the lower limit thickness corresponding to the outer contour of the entity and the minimum safe clearance. This operation of removing local spatial soft restrictions releases crucial passage margins in the core conflict area. The pathfinding drive immediately clears the cached data of the historical closed list and, relying on the remaining tolerance gap freed up, initiates a search probe wave loop task with reduced constraints to increase the probability of breaking the pathfinding deadlock bottleneck.

[0151] This invention also proposes an automatic wiring system for electromechanical pipelines in prefabricated buildings, comprising the following modules:

[0152] The generation module is used to acquire building information model to construct a grid space, extract the coordinates of restricted areas and pipeline ports, and assign conflict weights to different grid media according to pipeline type; it generates a comprehensive sorting key based on the pipe diameter, pressure level, and equivalent bottleneck number after preset upper limit truncation and normalization of the pipeline to be routed, and sorts the pipelines to be routed in descending order according to the comprehensive sorting key; wherein, the equivalent bottleneck number is determined according to the situation of the pipeline starting point and ending point line crossing the spatial bottleneck.

[0153] The execution module is used to perform multi-level pruning based on the sorting. The first level removes isolated grids based on connectivity marking reachable domains, and injects the congestion penalty term into the heuristic function as the reciprocal of the reachable domain bottleneck cross-sectional area. The second level weights the expansion direction based on turning constraints, and prohibits changing direction when the extension length in the same direction is less than the threshold positively mapped by the reachable domain bottleneck cross-sectional area. The third level constructs a heuristic function based on Manhattan distance and seam crossing cost, and pushes nodes whose comprehensive cost exceeds the product of the minimum comprehensive cost of the current open list and the node cache filtering ratio into the cache. The filtering ratio increases with the cache occupancy rate.

[0154] The output module is used to perform an A* search in the grid space, setting up soft exclusion zones for the grid neighborhood occupied by high-priority pipelines based on half the pipe diameter, the insulation layer thickness, and the preset safety gap. The thickness of the soft exclusion zone is adjusted according to the media conflict weight. When there is no solution for subsequent pipelines, the second-best node of the preceding pipeline is popped out in ascending order according to the comprehensive sorting key and re-routed. When the same pipeline has no solution three times in a row, the media conflict weight of the conflict area is reduced and the thickness of the soft exclusion zone is readjusted, and the output path is written back to the building information model.

[0155] The above description is merely an embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the claims of the present invention.

Claims

1. An automatic wiring method for electromechanical pipelines in prefabricated buildings, characterized in that, Includes the following steps: Obtain the building information model to construct a grid space, extract the coordinates of restricted areas and pipeline ports, and assign different grid media conflict weights according to pipeline type; A comprehensive sorting key is generated based on the pipe diameter, pressure rating, and the equivalent number of bottlenecks after truncation and normalization of the pipeline to be routed. The pipelines to be routed are then sorted in descending order according to the comprehensive sorting key. The equivalent number of bottlenecks is determined based on the situation where the pipeline's starting and ending points cross spatial bottlenecks. Multi-level pruning is performed based on the sorting. The first level removes isolated grids based on connectivity marking of reachable domains, and injects the congestion penalty term into the heuristic function as the reciprocal of the reachable domain bottleneck cross-sectional area. The second level weights the expansion direction based on turning constraints, and prohibits changing direction when the extension length in the same direction is less than the threshold positively mapped by the reachable domain bottleneck cross-sectional area. The third level constructs a heuristic function based on Manhattan distance and seam crossing cost, and pushes nodes whose comprehensive cost exceeds the product of the minimum comprehensive cost of the current open list and the node cache filtering ratio into the cache. The filtering ratio increases with the cache occupancy rate. In the grid space, an A* search is used to define a soft exclusion zone for the grid neighborhood occupied by high-priority pipelines, based on half the pipeline diameter, the insulation layer thickness, and the preset safety gap. The thickness of the soft exclusion zone is adjusted according to the media conflict weight. If there is no solution for subsequent pipelines, the second-best node of the preceding pipeline is popped out in ascending order according to the comprehensive sorting key and re-routed. If there is no solution for the same pipeline three times in a row, the media conflict weight of the conflict area is reduced and the thickness of the soft exclusion zone is readjusted. The output path is written back to the building information model.

2. The method according to claim 1, characterized in that, The first level eliminates isolated rasters based on connectivity-labeled reachable regions, injecting a heuristic function with the reciprocal of the bottleneck cross-sectional area of ​​the reachable region as a congestion penalty term, including: Obtain the initial grid of the pipeline starting point coordinate mapping, and use a breadth-first search algorithm to traverse all non-hard restricted area grids that are connected to the initial grid and allow pipeline passage; Assign a reachable state tag to the connected grid cells that are found during the traversal, and remove the coordinates of the non-connected grid cells that do not carry the reachable state tag from the search space matrix; Collect the actual usable cross-sectional area data corresponding to all grids carrying the reachability status marker, find the minimum cross-sectional area and set the area value of the area as the bottleneck cross-sectional area of ​​the reachability domain; The bottleneck cross-sectional area of ​​the reachable domain is normalized and reverse-mapped to generate a hole congestion penalty factor. The hole congestion penalty factor is then multiplied by a preset spatial weight coefficient and added as a congestion penalty term to the evaluation value of the heuristic function.

3. The method according to claim 2, characterized in that, The second level, based on turning constraints, weights the extension direction and prohibits changing direction when the extension length in the same direction is less than a threshold positively mapped from the reachable domain bottleneck cross-sectional area, including: During the expansion of the search node, the expansion direction vector of the current path is monitored in real time. When the expansion directions are consistent for two consecutive times, the direction inheritance mechanism is triggered, and the turning penalty value is reduced by a preset step size coefficient. The turning penalty value is not lower than the preset minimum turning penalty value. Count the number of grids that extend continuously in the same straight direction in the current pipeline, and calculate the current extension length in the same direction; Obtain the bottleneck cross-sectional area of ​​the reachable domain, generate a dimensionless positive adjustment factor based on the ratio of the bottleneck cross-sectional area of ​​the reachable domain to the reference cross-sectional area, and map the positive adjustment factor to a threshold for the number of unidirectional extended grids that prohibits direction changes. Compare the current same-direction extension length with the threshold. If the current same-direction extension length is less than the threshold, then lock the vector angle of the current extension direction and block the extension permissions of all non-same-direction neighbor nodes in the search space.

4. The method according to claim 1 or 2, characterized in that, The third level constructs a heuristic function based on Manhattan distance and seam traversal cost, pushing nodes whose comprehensive cost exceeds the product of the minimum comprehensive cost of the current open list and the node cache filtering ratio into the cache. The filtering ratio increases with the cache occupancy rate, including: Calculate the sum of the absolute differences between the center coordinates of the current search node and the center coordinates of the target endpoint in the three-dimensional coordinate system to generate a basic Manhattan distance evaluation value; Detect the properties between the current search node and its adjacent nodes. If the connection between the current search node and its adjacent nodes crosses the joint surface of the prefabricated component, or if the two nodes are located in the component areas on both sides of the marked joint, then extract the preset impedance constant as the joint crossing cost. The dimensionless basic Manhattan distance evaluation value, the seam crossing cost, and the congestion penalty term are linearly weighted and summed to generate the heuristic value of the heuristic function. Calculate the current memory usage of the cache, and increase the node cache filtering ratio based on the memory usage using a positive correlation function; When the overall cost of a node is greater than the product of the minimum overall cost in the current open list and the node cache filtering ratio, the expansion of the node is paused and the node is pushed into the cache for later use. When the search needs to supplement candidate branches or perform backtracking for no solution, nodes with low cost are extracted from the cache to continue participating in path planning.

5. The method according to claim 1, characterized in that, The method employs an A* search in the grid space, defining soft exclusion zones by setting the grid neighborhood occupied by high-priority pipelines as the sum of half the pipeline diameter, the insulation layer thickness, and a preset safety gap. The thickness of the soft exclusion zone is adjusted according to the media conflict weight, including: Extract the set of spatial occupancy coordinates of high-priority pipelines with completed path planning, and obtain the outer diameter of the high-priority pipelines and the corresponding insulation layer thickness parameters of the medium. Centered on the set of space occupancy coordinates, a grid area extending outward at a distance equal to half the outer diameter, the thickness of the insulation layer, and the sum of the preset safety gap is set as the initial soft restricted area; Read the pre-assigned media conflict weights of each grid within the initial soft zone, and use the media conflict weights to linearly scale and adjust the outward extension distance to complete the adjustment of the soft zone thickness. The adjusted soft zone thickness is not less than the lower limit thickness corresponding to the outer contour of the entity and the minimum safety clearance. When the A-star search enters the soft restricted area, the expansion cost of the horizontal direction perpendicular to the high-priority pipeline at the same elevation is set to infinity. This allows vertical crossing of the high-priority pipeline at different elevations while meeting the minimum clearance requirement, and allows cost calculation for nodes whose expansion direction is parallel to the high-priority pipeline.

6. The method according to claim 1, characterized in that, A comprehensive sorting key is generated based on the pipe diameter, pressure rating, and the equivalent bottleneck number after preset upper limit truncation and normalization of the pipeline to be routed. The pipelines to be routed are then sorted in descending order according to this comprehensive sorting key. The equivalent bottleneck number is determined based on the spatial bottleneck situation encountered when connecting the start and end points of the pipeline, including: Traverse the set of pipelines to be routed and extract the pipe diameter value and the dimensionless pressure rating parameter corresponding to the transport medium for each pipeline. Calculate the three-dimensional straight line connecting the center of the starting point and the center of the ending point of a single pipeline, and count the equivalent number of bottlenecks generated when the three-dimensional straight line passes through a passable restricted area, a reserved hole in a prefabricated component, a casing area, or a narrow passage in a well. Multiply the pipe diameter value by the dimensionless pressure rating parameter to obtain the basic pipeline weight; Multiply the weight of the basic pipeline by the number of equivalent bottlenecks to generate a comprehensive sorting key for a single pipeline. Compare the comprehensive sort keys of all pipelines to be routed, sort them in descending order of numerical value, and generate a priority execution queue for global multi-pipeline automatic routing.

7. The method according to claim 1, characterized in that, When there is no solution for the subsequent pipeline, the suboptimal nodes of the preceding pipeline are popped out in ascending order according to the comprehensive sorting key and re-routed, including: During the search for A-star in subsequent pipelines, if the open list is empty and the destination has not been reached, the current pipeline is determined to be in an unsolvable state, and the coordinates of the conflicting grid that caused the path blockage are recorded. Based on the conflict grid coordinates, query the set of routed pipelines occupying the coordinates, and select the lowest priority preorder pipeline as the concession pipeline according to the ascending order of the comprehensive sorting key of the priority execution queue. Extract the suboptimal node with low overall cost recorded at the front end of the conflict area of ​​the concession pipeline from the cache, and delete the local path of the concession pipeline from the suboptimal node to the original endpoint and the corresponding soft restricted area occupancy record. Starting from the suboptimal node, the conflict grid and its neighborhood that caused the path blockage are set as high-cost avoidance zones, and the local A-star search path planning is re-executed on the concession pipeline.

8. The method according to claim 1, characterized in that, When the same pipeline fails to resolve the issue three times consecutively, the conflict weight of the medium in the conflict zone is reduced and the thickness of the soft exclusion zone is readjusted, including: Initialize a backtrack counter for each pipeline, and increment the backtrack counter by one whenever a pipeline triggers a local rerouting and a feasible path cannot be generated; When the backtracking counter value of a certain pipeline is detected to have accumulated three times, the spatial boundary of the target conflict area that is obstructing the passage of the pipeline is extracted. Reduce the grid medium conflict weight of the soft exclusion zone or medium conflict penalty item in the target conflict area by a preset gradient level, reduce the soft rejection strength of the current area for wiring, and keep the hard exclusion zone, structural entity occupancy area and pipeline entity collision constraints unchanged. Based on the updated media conflict weights, the thickness of the soft restricted area is readjusted, and the adjusted thickness is limited to above the preset minimum safe thickness, driving the system to enter a new round of search wiring cycle.

9. An automatic wiring system for electromechanical pipelines in prefabricated buildings, characterized in that, Includes the following modules: The generation module is used to obtain the building information model to construct the grid space, extract the coordinates of restricted areas and pipeline ports, and assign different grid media conflict weights according to pipeline type; A comprehensive sorting key is generated based on the pipe diameter, pressure rating, and the equivalent number of bottlenecks after truncation and normalization of the pipeline to be routed. The pipelines to be routed are then sorted in descending order according to the comprehensive sorting key. The equivalent number of bottlenecks is determined based on the situation where the pipeline's starting and ending points cross spatial bottlenecks. The execution module is used to perform multi-level pruning based on the sorting. The first level removes isolated grids based on connectivity marking reachable domains, and injects the congestion penalty term into the heuristic function as the reciprocal of the reachable domain bottleneck cross-sectional area. The second level weights the expansion direction based on turning constraints, and prohibits changing direction when the extension length in the same direction is less than the threshold positively mapped by the reachable domain bottleneck cross-sectional area. The third level constructs a heuristic function based on Manhattan distance and seam crossing cost, and pushes nodes whose comprehensive cost exceeds the product of the minimum comprehensive cost of the current open list and the node cache filtering ratio into the cache. The filtering ratio increases with the cache occupancy rate. The output module is used to perform an A* search in the grid space, setting up soft exclusion zones for the grid neighborhood occupied by high-priority pipelines based on half the pipe diameter, the insulation layer thickness, and the preset safety gap. The thickness of the soft exclusion zone is adjusted according to the media conflict weight. When there is no solution for subsequent pipelines, the second-best node of the preceding pipeline is popped out in ascending order according to the comprehensive sorting key and re-routed. When the same pipeline has no solution three times in a row, the media conflict weight of the conflict area is reduced and the thickness of the soft exclusion zone is readjusted, and the output path is written back to the building information model.

10. The system according to claim 9, characterized in that, The first level eliminates isolated rasters based on connectivity-labeled reachable regions, injecting a heuristic function with the reciprocal of the bottleneck cross-sectional area of ​​the reachable region as a congestion penalty term, including: Obtain the initial grid of the pipeline starting point coordinate mapping, and use a breadth-first search algorithm to traverse all non-hard restricted area grids that are connected to the initial grid and allow pipeline passage; Assign a reachable state tag to the connected grid cells that are found during the traversal, and remove the coordinates of the non-connected grid cells that do not carry the reachable state tag from the search space matrix; Collect the actual usable cross-sectional area data corresponding to all grids carrying the reachability status marker, find the minimum cross-sectional area and set the area value of the area as the bottleneck cross-sectional area of ​​the reachability domain; The bottleneck cross-sectional area of ​​the reachable domain is normalized and reverse-mapped to generate a hole congestion penalty factor. The hole congestion penalty factor is then multiplied by a preset spatial weight coefficient and added as a congestion penalty term to the evaluation value of the heuristic function.