Collaborative arrangement method and device for multi-terminal branch pipelines and computer equipment
Through the improved A* algorithm and NSGA-II algorithm, the coordinated arrangement of multi-end branch pipelines is solved, and the problem of collaborative planning of multi-end branch pipelines in the existing technology is achieved efficient optimization and precise modeling of multi-pipe collaborative layout.
Patent Information
- Application Number
- CN202510462679.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-14
- Publication Date
- 2025-07-25
AI Technical Summary
The existing building pipeline layout algorithm is difficult to effectively coordinate the planning of multi-end branch pipelines, and cannot distinguish solutions with the same fitness but different layout characteristics. In the coordinated arrangement of multi-pipes, the strategy of splitting into multiple single-pipe optimization is usually adopted, making it difficult to optimize the path as a whole.
The improved A* algorithm is used for pipeline modeling, combined with the NSGA-II algorithm for global optimization, and the descendants are generated through intra-group crossing and inter-group crossing, and Pareto cutting-edge solution sets are generated using non-dominant sorting and crowding distances to optimize multi-pipe overlap and turn count. Combined with the multi-cost evaluation function of dynamic weights, the raster size is dynamically adjusted for modeling.
The coordinated arrangement of multi-end branch pipelines is realized, the multi-pipe optimization capability and collaborative optimization efficiency are improved, the pipeline modeling accuracy and adaptability are improved, and a diverse Pareto optimal solution set is generated.
Smart Images

Figure CN120372869A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of building pipeline layout, and in particular to a collaborative layout method, device and computer equipment for multi-end branch pipelines. Background Art
[0002] Existing building pipeline layout algorithms mainly target single-end pipelines. However, in actual projects, the number and complexity of multi-end branch pipelines are far higher than those of single-end pipelines.
[0003] Most existing building pipeline layout algorithms adopt the strategy of combining multiple optimization objectives with weights and transforming multi-objective optimization into single-objective optimization, and are unable to distinguish solutions with the same fitness but different layout characteristics.
[0004] In the problem of multi-pipeline collaborative layout, existing building pipeline layout algorithms usually adopt the strategy of splitting it into multiple single-pipeline optimizations and running them in sequence according to a certain priority to obtain path solutions, and it is difficult to coordinate and optimize the pipeline paths as a whole. Summary of the Invention
[0005] The technical problem to be solved by the present invention is: to provide a collaborative layout method, device and computer equipment for multi-end branch pipelines, aiming to solve the problem of multi-end branch pipeline collaborative planning.
[0006] To solve the above technical problem, the technical solution adopted by the present invention is: a collaborative layout method for multi-end branch pipelines, including the steps of:
[0007] S10: Initialize a three-dimensional grid space, set the starting point coordinates, multiple end point coordinates and obstacle marks, and define the population size, crossover probability, mutation probability and maximum iteration number;
[0008] S20: Perform pipeline modeling based on an improved A* algorithm to generate an initial population, wherein the improved A* algorithm uses a cross-sectional modeling unit with dynamically adjusted grid sizes to model the main pipeline and branch pipelines respectively according to pipeline size differences;
[0009] S30: Perform global optimization on the population through the NSGA-II algorithm, and execute gene crossover operations and gene mutation operations, wherein gene crossover includes in-group crossover and inter-group crossover strategies;
[0010] S40: Calculate the objective function values of individuals in the population, and the objective function includes multi-pipeline overlap degree and the number of pipeline turns;
[0011] S50: Classify the population individuals using non-dominated sorting and crowding distance to generate a Pareto front solution set;
[0012] S60: Update the population according to the Pareto front solution set, and perform the operations of population duplicate removal and path repair;
[0013] S70: Repeat steps S30 to S60 until the maximum number of iterations is reached, and output the Pareto optimal solution set of the pipeline path.
[0014] Furthermore, in step S20, the evaluation function of the improved A* algorithm is defined as:
[0015] f(n) = g(n) + w * h(n)
[0016] f(n) = α × L cost (n) + β × B cost (n) + γ × E cost (n) + w * h(n), w ≥ 1
[0017] Among them, g(n) represents the actual cost function from the starting point of the pipeline path to point n, L cost (n) is the path length cost, B cost (n) is the path turning number cost, E cost (n) is the grid energy cost passed by the path, and α, β, and γ are the weight coefficients of the path length, turning, and energy costs respectively, is the dynamic weight, and h(n) is the Manhattan distance heuristic function.
[0018] Furthermore, in step S20, when performing pipeline modeling, it includes changes in the pipeline turning state and changes in the pipeline branch state;
[0019] The cross-sectional direction update formula for the change in the pipeline turning state is:
[0020]
[0021] The cross-sectional direction and size update formula for the change in the pipeline branch state is:
[0022]
[0023] Among them, (x1, y1, z1) are the key point coordinates before turning, (x2, y2, z2) are the key point coordinates after turning, w is the pipeline width, and h is the pipeline height.
[0024] Furthermore, in step S20, the cross-sectional modeling unit for dynamically adjusting the grid size includes:
[0025] The main pipeline is modeled with a cross-section composed of multiple grids, and the branch pipeline is modeled with a single grid, and the cross-sectional size of the branch pipeline is smaller than that of the main pipeline.
[0026] Further, in step S30, the gene crossover operation includes:
[0027] Intra-group crossover is to select two independent single-end pipelines within a single individual, generate sub-paths connecting the crossover points through an improved A* algorithm, and splice them;
[0028] Inter-group crossover is to select corresponding branch pipelines in two individuals and generate new offspring chromosomes through sub-path splicing.
[0029] Further, in step S30, the gene mutation operation includes:
[0030] Randomly select two mutation points on the single-pipeline path, and regenerate the sub-path between the mutation points through an improved A* algorithm to replace the original path.
[0031] Further, in step S60, the population duplicate removal operation includes:
[0032] Calculate the repetition ratio of individuals in the population. If it exceeds the threshold, delete the duplicate individuals, and optimize the redundant paths through a path repair strategy.
[0033] The present invention also provides a collaborative layout device for multi-end branch pipelines, including:
[0034] An initialization module for initializing a three-dimensional grid space, setting the starting point coordinates, multiple end point coordinates and obstacle marks, and defining the population size, crossover probability, mutation probability and maximum iteration times;
[0035] A path planning module for pipeline modeling based on an improved A* algorithm to generate an initial population, wherein the improved A* algorithm uses a cross-sectional modeling unit with dynamically adjustable grid sizes to model the main pipeline and branch pipelines respectively according to the pipeline size differences;
[0036] A crossover and mutation module for globally optimizing the population through the NSGA-II algorithm, performing gene crossover operations and gene mutation operations, where gene crossover includes intra-group crossover and inter-group crossover strategies;
[0037] A target function calculation module for calculating the target function values of individuals in the population, where the target function includes multi-pipeline overlap and the number of pipeline turns;
[0038] An optimization calculation module for classifying population individuals using non-dominated sorting and crowding distance to generate a Pareto front solution set;
[0039] A population update module for updating the population according to the Pareto front solution set, performing population duplicate removal operations and path repair operations;
[0040] An iterative output module, which is used to repeat the execution steps from the crossover and mutation module to the optimization calculation module until the maximum number of iterations is reached, and output the Pareto optimal solution set of the pipeline path.
[0041] The present invention also provides a computer device, which includes a memory and a processor. A computer program is stored on the memory, and when the processor executes the computer program, the collaborative layout method of the multi-end branch pipeline as described above is implemented.
[0042] The present invention also provides a storage medium, which stores a computer program. When the computer program is executed by a processor, the collaborative layout method of the multi-end branch pipeline as described above can be implemented.
[0043] The beneficial effects of the present invention are as follows: By combining the improved A* algorithm and the NSGA-II algorithm, the global optimization of the multi-end branch pipeline and the multi-pipeline collaborative layout is realized, significantly improving the multi-pipeline optimization ability; The multi-pipeline collaborative optimization has high efficiency, and the pipeline modeling accuracy and fitness are significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The specific structure of the present invention is described in detail below with reference to the drawings.
[0045] Figure 1 It is a flowchart of the collaborative layout method of the multi-end branch pipeline according to an embodiment of the present invention;
[0046] Figure 2 It is a block diagram of the collaborative layout device of the multi-end branch pipeline according to an embodiment of the present invention;
[0047] Figure 3 It is a state representation diagram of the improved A* algorithm according to an embodiment of the present invention;
[0048] Figure 4 It is a schematic diagram of the modeling method of the branch pipeline according to an embodiment of the present invention;
[0049] Figure 5 It is a schematic diagram of the change of the pipeline turning state according to an embodiment of the present invention;
[0050] Figure 6 It is a schematic diagram of the change of the pipeline branch state according to an embodiment of the present invention;
[0051] Figure 7 It is a schematic diagram of the in-group crossover according to an embodiment of the present invention;
[0052] Figure 8 It is a schematic diagram of the between-group crossover according to an embodiment of the present invention;
[0053] Figure 9 It is a schematic diagram of gene mutation according to an embodiment of the present invention;
[0054] Figure 10 Revit drawing of the building model according to an embodiment of the present invention;
[0055] Figure 11 Raster drawing of the building model according to an embodiment of the present invention;
[0056] Figure 12 Schematic diagram of the first Pareto solution obtained by the A*-NSGA-II algorithm according to an embodiment of the present invention;
[0057] Figure 13 Schematic diagram of the second Pareto solution obtained by the A*-NSGA-II algorithm according to an embodiment of the present invention;
[0058] Figure 14 Schematic diagram of the third Pareto solution obtained by the A*-NSGA-II algorithm according to an embodiment of the present invention;
[0059] Figure 15 Schematic block diagram of the computer device according to an embodiment of the present invention. Detailed implementation manners
[0060] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0061] It should be understood that when used in this specification and the appended claims, the terms "comprises" and "comprising" indicate the presence of the described features, wholes, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or their combinations.
[0062] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in this specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include the plural forms.
[0063] It should be further understood that the term " / and / " used in this specification of the present invention and the appended claims refers to any combination and all possible combinations of one or more of the related listed items, and includes these combinations.
[0064] An embodiment of the present invention is: a collaborative layout method for a multi-end branch pipeline, including the steps:
[0065] S10: Initialize the three-dimensional grid space, set the starting point coordinates, multiple end point coordinates, and obstacle marks, and define the population size, crossover probability, mutation probability, and maximum number of iterations.
[0066] In this embodiment, the grid space Sp[L][W][H] is initialized, and the grid coordinates p of the starting point are set. s , the grid coordinates of the end point and obstacle marks. Set parameters such as the population size pop_size, gene crossover probability cross_prob, gene mutation probability mutate_prob, and maximum number of iterations max_iter.
[0067] S20: Based on the improved A* algorithm, perform pipeline modeling to generate an initial population. The improved A* algorithm uses a cross-sectional modeling unit with dynamically adjusted grid sizes to model the main pipeline and branch pipelines separately according to pipeline size differences.
[0068] In a specific embodiment, in step S20, the evaluation function of the improved A* algorithm is defined as:
[0069] f(n) = g(n) + w * h(n)
[0070] f(n) = α × L cost (n) + β × B cost (n) + γ × E cost (n) + w * h(n), w ≥ 1
[0071] Among them, g(n) represents the actual cost function from the starting point of the pipeline path to point n, and L cost (n) is the path length cost, B cost (n) is the path turning number cost, E cost (n) is the path passing grid energy cost, and α, β, and γ are the weight coefficients of the path length, turning, and energy costs respectively. is the dynamic weight, and h(n) is the Manhattan distance heuristic function.
[0072] In this embodiment, w represents the weight coefficient, and its function is to appropriately amplify the value of the heuristic function, thereby guiding the algorithm to preferentially expand nodes with smaller estimated costs. This design can effectively reduce the time and space complexity of the search and improve the overall efficiency of the algorithm. Using the Manhattan distance as the heuristic function, this distance metric can well reflect the path cost in actual construction.
[0073] In a specific embodiment, in step S20, the cross-sectional modeling unit with dynamically adjusted grid sizes includes:
[0074] The main pipeline is modeled with a cross-section composed of multiple grids, and the branch pipeline is modeled with a single grid, and the cross-sectional size of the branch pipeline is smaller than that of the main pipeline.
[0075] In this embodiment, the improved A* algorithm uses a cross-section composed of multiple grids as the basic search unit, and abstractly models the geometric features of the pipeline through this method, so that each search state can more flexibly express the shape and spatial requirements of the pipeline. Specifically, it completely describes a basic search state by defining the coordinates of key points, the width, height, and extension direction of the pipeline. The search state is defined as a quadruple (x, y, z, d), where (x, y, z) represents the three-dimensional coordinates of the joint point, and d represents the extension direction of the pipeline, such as Figure 3 shown.
[0076] In a pipeline system, the main pipeline usually has a relatively large size, while the branch pipeline is relatively small. The improved A* algorithm proposes an effective solution based on the flexible modeling characteristics of the pipeline cross-section. This method dynamically adjusts the modeling unit according to the actual size of the pipeline, rather than being limited to a single fixed grid size. The main pipeline is modeled with a cross-section composed of multiple grids; while the smaller branch pipeline is modeled with a single grid, as Figure 4 shown in. This method takes into account the actual differences in pipeline sizes, and therefore can improve the modeling accuracy.
[0077] In a specific embodiment, in step S20, when performing pipeline modeling, it includes changes in the pipeline turning state and changes in the pipeline branch state;
[0078] The cross-section direction update formula for the change in the pipeline turning state is:
[0079]
[0080] The cross-section direction and size update formula for the change in the pipeline branch state is:
[0081]
[0082] where, (x1, y1, z1) are the coordinates of the key point before turning, (x2, y2, z2) are the coordinates of the key point after turning, w is the pipeline width, and h is the pipeline height.
[0083] In this embodiment, as Figure 5 shown, when the exploration direction of the improved A* algorithm changes, the pipeline will perform a turning operation. Taking the state changing from the positive x-axis direction to the positive y-axis direction as an example. During the turning process, the direction of the cross-section changes, and the key point coordinates need to be recalculated. As Figure 6As shown, when a pipeline branches, in addition to changes in direction, size adjustments may also be involved. Take the example where the main pipeline travels in the positive x-axis direction and the branch pipeline extends in the positive y-axis direction. During the branch generation process, both the direction and size of the pipeline cross-section may change. Therefore, the key point coordinates need to be recalculated according to the specific branch direction and pipeline size to accurately represent the state of the branch pipeline.
[0084] S30: Globally optimize the population through the NSGA-II algorithm, and perform gene crossover operations and gene mutation operations, where gene crossover includes intra-group crossover and inter-group crossover strategies.
[0085] In a specific embodiment, in step S30, the gene crossover operation includes:
[0086] Intra-group crossover is to select two independent single-end pipelines within a single individual, generate a sub-path connecting the crossover points through an improved A* algorithm, and splice them.
[0087] Inter-group crossover is to select corresponding branch pipelines from two individuals and generate a new offspring chromosome through sub-path splicing.
[0088] In this embodiment, gene crossover defines two more adaptable crossover methods, respectively defined as intra-group crossover and inter-group crossover, to adapt to the crossover strategy of multi-end branch pipelines. Among them, intra-group crossover tends to improve the coincidence degree of each independent single-end pipeline in the multi-end branch pipeline. For the single-pipeline layout problem, gene crossover only uses the inter-group crossover method.
[0089] The process of intra-group crossover is as follows: Randomly select an individual I in the population, which consists of n independent single-end pipelines. Select two independent single-end pipelines P i1 , P i2 as parents, and randomly select a crossover point a from the parent P i1 . Between the crossover point a and the end point E2 of the parent P i2 , use the improved A* algorithm to generate a sub-path S connecting these two points, splice the sub-path S with the parent P i1 to generate a new offspring chromosome C. Then replace the independent pipeline P i2 in the individual with the generated offspring chromosome C and retain it as a new individual. The schematic diagram of intra-group crossover is as Figure 7 shown.
[0090] The process of inter-group crossover is as follows: Randomly select two individuals I and J in the population, and select an independent single-end pipeline P i1 and P i2As the parent. The parent must select the corresponding branch pipelines, that is, the branch pipelines with the same starting and ending points, to ensure the connectivity of the path after crossover. In the parent P i1 and, randomly select two crossover points a and b respectively, and use the improved A* algorithm to generate a sub-path S connecting the crossover points a and b. Then, splice the sub-path S with the original paths P i1 and P j1 respectively to generate new offspring chromosomes C i1 and C j1 . The schematic diagram of crossover between groups is as shown in Figure 8 .
[0091] In a specific embodiment, in step S30, the gene mutation operation includes:
[0092] Randomly select two mutation points on the single pipeline path, and regenerate the sub-path between the mutation points through the improved A* algorithm to replace the original path.
[0093] The mutation operation only acts on the independent single-end pipelines within a parent pipeline group to maintain the stability of the overall structure of the pipeline group and moderately introduce diversity. As shown in Figure 9 , the specific process of gene mutation is as follows: First, select a single pipeline P in the pipeline group as the parent, and randomly select two mutation points a and b on P. Then, use the improved A* algorithm to reconnect these two mutation points to generate a new sub-path and obtain a new offspring chromosome C.
[0094] S40: Calculate the objective function values of the individuals in the population. The objective function includes the multi-pipeline coincidence degree and the number of pipeline turns.
[0095] S50: Classify the population individuals using non-dominated sorting and crowding distance to generate the Pareto front solution set.
[0096] S60: Update the population according to the Pareto front solution set, and perform the population duplicate removal operation and the path repair operation.
[0097] In a specific embodiment, in step S60, the population duplicate removal operation includes:
[0098] Calculate the repetition ratio of the individuals in the population. If it exceeds the threshold, delete the duplicate individuals and optimize the redundant paths through the path repair strategy.
[0099] In this embodiment, during the iterative process of population evolution, individuals are usually selected from the population as parents, and based on this, offspring individuals are generated through gene crossover and mutation operations. However, this operation may result in the generated offspring individuals being repeated with the existing individuals in the population, reducing the diversity of the population and the diversity of solutions, and also leading to premature convergence of the algorithm. To address this issue, a duplicate ratio detection mechanism is introduced at the end of each iteration. This mechanism calculates the duplicate ratio of individuals in the population and compares it with the set maximum duplicate ratio threshold φ. If it is detected that the duplicate ratio in the population exceeds the set threshold, a de-duplication operation is performed to delete the individuals with duplicate layouts, thereby reducing the proportion of redundant solutions.
[0100] S70: Repeat steps S30 to S60 until the maximum number of iterations is reached, and output the Pareto optimal solution set of the pipeline path.
[0101] In summary, the present invention proposes an intelligent path finding algorithm for building pipelines based on evolutionary computation, which combines an improved A* algorithm and an NSGA-II multi-objective optimization framework to achieve the global optimization of multi-end branch pipelines and multi-pipeline collaborative layout. As Figures 10 - 11 shown is the building model diagram of the experiment; as Figures 12 - 14 shown are the Pareto solutions obtained by using the improved A* algorithm and NSGA-II multi-objective optimization of the present invention. The technical effects of this solution are specifically reflected in the following aspects:
[0102] 1. Significantly improved multi-objective optimization ability:
[0103] By generating the Pareto optimal solution set through the NSGA-II algorithm, a variety of layout schemes are provided, overcoming the limitation that the traditional weighted method can only obtain a single solution, and meeting the requirements of complex engineering for flexibility and trade-off.
[0104] 2. High efficiency in multi-pipeline collaborative optimization:
[0105] Optimizing multiple groups of pipelines as a whole, compared with the traditional method of arranging single groups of pipelines sequentially, can generate a more compact and coordinated scheme. Although the complex modeling and collaborative optimization strategy increase the computational cost, this algorithm is outstanding in improving the space utilization efficiency and the quality of the optimized layout.
[0106] 3. Improved modeling accuracy and fitness:
[0107] The improved A* algorithm is used to redefine the path state representation. Through the grid cross-section state representation and dynamic ratio conversion, it supports the refined modeling of pipelines of different sizes (such as differential modeling of main pipelines and branch pipelines). Avoiding the path detours caused by traditional single-grid modeling improves the feasibility of complex scenarios.
[0108] AsFigure 2 As shown in the figure, an embodiment of the present invention further provides a collaborative layout device for a multi-end branch pipeline, including:
[0109] An initialization module 10, configured to initialize a three-dimensional grid space, set the starting point coordinates, multiple end point coordinates, and obstacle marks, and define the population size, crossover probability, mutation probability, and maximum number of iterations;
[0110] A path planning module 20, configured to perform pipeline modeling based on an improved A* algorithm to generate an initial population, where the improved A* algorithm uses a cross-sectional modeling unit with dynamically adjusted grid sizes to perform modeling on the main pipeline and branch pipelines respectively according to pipeline size differences;
[0111] A crossover and mutation module 30, configured to perform global optimization on the population through the NSGA-II algorithm, and execute gene crossover operations and gene mutation operations, where gene crossover includes in-group crossover and inter-group crossover strategies;
[0112] An objective function calculation module 40, configured to calculate the objective function values of individuals in the population, where the objective function includes the multi-pipeline coincidence degree and the number of pipeline turns;
[0113] An optimization calculation module 50, configured to classify population individuals using non-dominated sorting and crowding distance to generate a Pareto front solution set;
[0114] A population update module 60, configured to update the population according to the Pareto front solution set, and execute population duplicate removal operations and path repair operations;
[0115] An iterative output module 70, configured to repeat the execution steps of the crossover and mutation module to the optimization calculation module until the maximum number of iterations is reached, and output the Pareto optimal solution set of the pipeline path.
[0116] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned collaborative layout device for a multi-end branch pipeline can refer to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity of description, it will not be elaborated here.
[0117] The above-mentioned collaborative layout device for a multi-end branch pipeline can be implemented in the form of a computer program, and this computer program can run on a computer device as shown in Figure 15 the figure.
[0118] Please refer to Figure 15 , Figure 15It is a schematic block diagram of a computer device provided by an embodiment of the present application. The computer device 500 can be a terminal or a server. Among them, the terminal can be an electronic device with communication functions such as a smart phone, a tablet computer, a notebook computer, a desktop computer, a personal digital assistant, and a wearable device. The server can be an independent server or a server cluster composed of multiple servers.
[0119] Refer to Figure 15 , the computer device 500 includes a processor 502, a memory, and a network interface 505 connected through a system bus 501. Among them, the memory can include a non-volatile storage medium 503 and an internal memory 504.
[0120] The non-volatile storage medium 503 can store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions. When the program instructions are executed, the processor 502 can be made to execute a collaborative layout method for a multi-endpoint branch pipeline.
[0121] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500.
[0122] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can be made to execute a collaborative layout method for a multi-endpoint branch pipeline.
[0123] The network interface 505 is used for network communication with other devices. Those skilled in the art can understand that Figure 15 the structure shown in
[0124] is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device 500 to which the solution of the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0125] It should be understood that in the embodiments of the present application, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0126] Those of ordinary skill in the art can understand that all or part of the processes in the methods of implementing the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, and the storage medium is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above method.
[0127] Therefore, the present invention also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, where the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the collaborative arrangement method of the multi-endpoint branch pipeline as described above.
[0128] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, an optical disc or other computer-readable storage media that can store program codes.
[0129] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed in this article can be implemented by electronic hardware, computer software, or a combination of the two. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0130] In several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0131] The steps in the method embodiments of the present invention can be adjusted, combined, and deleted according to actual needs. The units in the device embodiments of the present invention can be combined, divided, and deleted according to actual needs. In addition, the functional units in each embodiment of the present invention can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0132] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention.
[0133] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should all be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A collaborative layout method for a multi-end branch pipeline, characterized in that, Including the steps: S10: Initialize the three-dimensional grid space, set the starting point coordinates, multiple end point coordinates and obstacle marks, and define the population size, crossover probability, mutation probability and maximum number of iterations; S20: Perform pipeline modeling based on the improved A* algorithm to generate an initial population, where the improved A* algorithm uses a cross-sectional modeling unit with dynamically adjusted grid sizes, and separately models the main pipeline and branch pipelines according to the pipeline size differences; S30: Globally optimize the population through the NSGA-II algorithm, and perform gene crossover operations and gene mutation operations, where gene crossover includes intra-group crossover and inter-group crossover strategies; S40: Calculate the objective function values of the individuals in the population, and the objective function includes the multi-pipeline coincidence degree and the number of pipeline turns; S50: Classify the population individuals using non-dominated sorting and crowding distance to generate a Pareto front solution set; S60: Update the population according to the Pareto front solution set, and perform population duplicate removal operations and path repair operations; S70: Repeat steps S30 to S60 until the maximum number of iterations is reached, and output the Pareto optimal solution set of the pipeline path.
2. The collaborative layout method of the multi-end branch pipeline according to claim 1, wherein: In step S20, the evaluation function of the improved A* algorithm is defined as: f(n) = g(n) + w * h(n) f(n) = α × L cost (n) + β × B cost (n) + γ × E cost (n) + w * h(n), w ≥ 1 Among them, g(n) represents the actual cost function from the starting point of the pipeline path to point n, L cost (n) is the path length cost, B cost (n) is the path turning number cost, E cost (n) is the grid energy cost of the path, and α, β, and γ are the weight coefficients of the path length, turning, and energy costs respectively, is the dynamic weight, and h(n) is the Manhattan distance heuristic function.
3. The collaborative layout method of the multi-end branch pipeline according to claim 1, wherein: In step S20, when performing pipeline modeling, it includes pipeline turning state changes and pipeline branch state changes; The cross-sectional direction update formula for the pipeline turning state change is: The cross-sectional direction and size update formula for the pipeline branch state change is: where, (x1, y1, z1) are the key point coordinates before turning, (x2, y2, z2) are the key point coordinates after turning, w is the pipeline width, and h is the pipeline height.
4. The collaborative layout method of the multi-end branch pipeline according to claim 1, wherein: In step S20, the cross-sectional modeling unit with dynamically adjusted grid sizes includes: The main pipeline is modeled using a cross-section composed of multiple grids, and the branch pipeline is modeled using a single grid, and the cross-sectional size of the branch pipeline is smaller than that of the main pipeline.
5. The collaborative arrangement method of the multi-end branch pipeline according to claim 1, characterized in that: In step S30, the gene crossover operation includes: Intra-group crossover is to select two independent single-end pipelines within a single individual, generate sub-paths connecting the crossover points through the improved A* algorithm and splice them; Inter-group crossover is to select corresponding branch pipelines in two individuals and generate new offspring chromosomes through sub-path splicing.
6. The collaborative layout method of the multi-end branch pipeline according to claim 1, characterized in that: In step S30, the gene mutation operation includes: Randomly select two mutation points on the single-pipeline path, and regenerate the sub-path between the mutation points through the improved A* algorithm to replace the original path.
7. The collaborative layout method of the multi-end branch pipeline according to claim 1, characterized in that: In step S60, the population duplicate removal operation includes: Calculate the duplicate ratio of the individuals in the population, and if it exceeds the threshold, delete the duplicate individuals and optimize the redundant paths through the path repair strategy.
8. A collaborative arrangement device for a multi-end branch pipeline, characterized in that, Including: An initialization module for initializing the three-dimensional grid space, setting the starting point coordinates, multiple end point coordinates and obstacle marks, and defining the population size, crossover probability, mutation probability and maximum number of iterations; A path planning module for pipeline modeling based on an improved A* algorithm to generate an initial population, where the improved A* algorithm uses a cross-sectional modeling unit with dynamically adjusted grid sizes to model the main pipeline and branch pipelines separately according to pipeline size differences; A crossover and mutation module for globally optimizing the population through the NSGA-II algorithm, performing gene crossover operations and gene mutation operations, where gene crossover includes in-group crossover and inter-group crossover strategies; An objective function calculation module for calculating the objective function values of individuals in the population, where the objective function includes multi-pipeline overlap and the number of pipeline turns; An optimization calculation module for classifying population individuals using non-dominated sorting and crowding distance to generate a Pareto front solution set; A population update module for updating the population according to the Pareto front solution set, performing population duplicate removal operations and path repair operations; An iterative output module for repeating the execution steps of the crossover and mutation module to the optimization calculation module until the maximum number of iterations is reached, and outputting the Pareto optimal solution set of the pipeline path.
9. A computer device, characterized in that: The computer device includes a memory and a processor, and a computer program is stored on the memory. When the processor executes the computer program, it implements the collaborative layout method for multi-end branch pipelines as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, it can implement the collaborative layout method for multi-end branch pipelines as described in any one of claims 1 to 7.
Citation Information
Cited By
Multi-professional pipeline arrangement method and device for basement and medium
CN121413162A