A Design Method for Ship Pipeline Layout Based on the PG-MACO Algorithm

By introducing the pheromone Gaussian diffusion mechanism and energy zone into the ant colony algorithm, the calculation of ant state transfer is optimized, and the problems of cumbersome calculations and insufficient automation in the existing technology are solved, and more efficient ship pipeline layout design is achieved, which meets the actual needs of the project.

CN115481516BActive Publication Date: 2025-06-17DALIAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211218580.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-06
Publication Date
2025-06-17
Estimated Expiration
2042-10-06

AI Technical Summary

Technical Problem

The existing ant colony algorithm has cumbersome calculation process, large amount of calculation, insufficient degree of automation, and fewer considerations for engineering practice in the automatic layout design of ship pipelines.

Method used

The ship pipeline layout design method based on the pheromone Gaussian diffusion multi-ant colony collaborative algorithm (PG-MACO) is adopted. Through grid layout space, introduction of energy areas, and improvement of ant state transfer calculation method and pheromone diffusion mechanism, the pipeline path is optimized.

Benefits of technology

It reduces unnecessary elbows, improves the operating efficiency and applicability of the algorithm, and can better handle the layout of mixed pipelines in complex environments, and meets the actual needs of the project.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115481516B_ABST
    Figure CN115481516B_ABST
Patent Text Reader

Abstract

A ship pipeline layout design method based on the PG-MACO algorithm, which belongs to the field of automatic ship pipeline layout optimization. By adopting an improved ant state transition calculation method, this method significantly reduces unnecessary elbows in the traditional ant colony algorithm. At the same time, an energy area is introduced and considered in the heuristic function to achieve the goal of guiding the pipeline to approach certain specific areas. It is closer to the engineering reality, avoiding excessive bending when the ant individual makes a state transition, and trying to arrange the pipeline along the bulkhead or the surface of obstacles during pipeline laying. At the same time, the PG-MACO introduces a co-evolution mechanism, enabling this algorithm to handle mixed pipelines, including single pipelines, multi-pipelines, and branch pipelines, improving the applicability of the algorithm and the ability to handle complex layout situations. By using the fact that pheromone diffuses outward and the pheromone closer to the pipeline is stronger, it guides the pipeline to more easily receive the pheromone guidance of other ants during spatial search, thereby accelerating the path-finding efficiency of the ants and accelerating the convergence of the algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of automatic layout optimization of ship pipelines, and relates to a method for designing ship pipeline layout based on the Pheromone Gaussian Diffusion Multi Ant Colony Algorithm (PG-MACO). Background Technique

[0002] With the continuous development of computer technology, computer-aided design technology has been increasingly widely applied to ship pipeline design problems, and the design efficiency and quality have been greatly improved. However, the previous design methods still mainly rely on manual experience and manual design, and the automatic layout design of pipelines has not been realized yet.

[0003] In recent years, scholars at home and abroad have carried out research on the automatic layout problem of pipelines. The existing main pipeline layout algorithms can be divided into deterministic algorithms and heuristic algorithms. The advantage of deterministic algorithms lies in their fast solving speed. Common ones include the A* algorithm, Dijkstra algorithm, etc. Heuristic algorithms have stronger randomness and global search capabilities. Common ones include the Particle Swarm Optimization (PSO), Genetic Algorithm (GA), Ant Colony Algorithm (ACO), etc. Among them, the ant colony algorithm has been widely applied to pipeline problems due to its excellent robustness, global search ability, and suitability for spatial path planning problems.

[0004] The ant colony algorithm is a bionic algorithm proposed by simulating the process of ants constantly optimizing the path between food and the cave during foraging. The interaction between ants mainly comes from pheromones. Pheromones are released at the places where ants pass by. The pheromone concentration at a certain position is mainly affected by the number of ants passing by this place and the length of the current path of the ants. When subsequent ants pass by again, they will make a choice according to the pheromone concentration level, and finally the ant population converges on a certain path.

[0005] Jiang et al. [1] Improved the traditional ant colony algorithm, adopted the form of vector pheromones, and combined with a co-evolution framework to study multi-pipelines and branch pipelines. Wang et al. [2] Proposed an ant colony algorithm based on a human-machine cooperation mechanism, which organically combines the artificial solution and the algorithm solution, and comprehensively utilizes manual experience and computer computing power. Chen Yang [3-4] Improved the ant colony algorithm, including the expression and update method of pheromones, the selection rule of path points, etc., and improved the performance of the ant colony algorithm. Xiong Yong et al. [4] Combined the Rapidly-exploring Random Tree (RRT) algorithm with the ant colony algorithm, proposed a variable step-size search strategy and optimized the path using the ant colony algorithm, and improved the efficiency and robustness of the algorithm.

[0006] The above method makes appropriate improvements to the ant colony algorithm, optimizes the algorithm performance, and strengthens the applicability of the algorithm. However, there are still problems such as cumbersome calculation process, large amount of calculation, insufficient automation, and less consideration of engineering practice.

[0007] References

[0008] [1] Jiang WY, Lin Y, Chen M, Yu YY. A co-evolutionary improved multi-ant colony optimization for ship multiple and branch pipe route design[J]. Ocean Engineering, 2015, 102: 63-70

[0009] [2] Wang YL, Yu YY, Guan G. A human-computer cooperation improved ant colony optimization for ship pipe route design[J]: Ocean Engineering, 2018, 150: 12-20

[0010] [3] Chen Yang. Research on ship pipeline layout based on improved ant colony algorithm and secondary development of SolidWorks[D]. Jiangsu: Jiangsu University of Science and Technology, 2019.

[0011] [4] Xiong Yong, Zhang Jia, Yu Jiajun, et al. Intelligent layout optimization algorithm for ship three-dimensional pipelines[J]. Journal of Computer Applications, 2020, 40(7): 2164-2170. Summary of the Invention

[0012] In order to better realize the automatic layout of pipelines by the ant colony algorithm in three-dimensional space, two key problems need to be solved. One is to be closer to engineering practice. For example, the existence of elbows should be reduced to avoid excessive bending when the ant individuals transfer states, and when laying pipelines, it should be considered as much as possible to lay along the bulkhead or the surface of obstacles, and grouped pipelines should be arranged in parallel as much as possible. The other is to improve the operation efficiency and applicability of the algorithm and enhance the algorithm's ability to process mixed pipelines in complex environments. In view of the above problems, the technical solution proposed by the present invention is: a method for ship pipeline layout design based on the PG-MACO algorithm, including the following steps:

[0013] (1) Grid the layout space, and according to the obstacle space information, simplify the envelope of the obstacles into a cuboid form recognizable by the algorithm, and record the diagonal coordinates of each obstacle;

[0014] (2) The algorithm automatically translates and scales the layout space according to the calculation accuracy, converts the real model of the layout space into a simplified model for algorithm calculation, and assigns specific values to the grids where obstacles are located, so that they can be recognized as inaccessible by the algorithm;

[0015] (3) Input the coordinate values of the starting point and the ending point of the pipeline to be laid, and the pipe diameter list. Before solving the path each time, initialize or update the map;

[0016] (4) Generate energy areas according to the equipment information to guide the pipeline to be laid close to or away from the equipment;

[0017] (5) According to the current grid map and the information such as the starting point and the ending point of the pipeline to be laid, use PG-MACO to optimize the path of the hybrid pipeline, and calculate a pipeline layout plan with a length as short as possible, as few elbows as possible, and as compliant with the engineering requirements as possible.

[0018] In step (3), before solving the path each time, when initializing or updating the map, three aspects need to be considered: First, assign the grids where the obstacle envelope is located as inaccessible. Second, assign the starting points and ending points of other pipelines except the starting point and the ending point of the currently laid pipeline as inaccessible and perform appropriate expansion. The expansion range considers the multiple relationship between the sum of the current pipe diameter and the safety distance reserved for the pipeline and the size of the grid unit. Finally, if there are other pipelines already laid before the current pipeline is laid, it is necessary to consider whether to update the laid result as an obstacle according to the pipeline type.

[0019] In step (4), generating energy areas according to the equipment information means assigning different energy values to each node in the map according to the map and the equipment information. When searching for pipelines, by considering the energy values, it is realized to guide the pipeline to be close to or away from certain spatial areas. In existing research, energy areas are mainly divided into four types: prohibited, dominant, transitional, and conventional areas. Different areas are assigned different energy values. However, its disadvantage is that it needs to be set manually, which is not conducive to algorithm automation, and the types of energy areas in the space are less, and the algorithm calculation is relatively rough. Therefore, the present invention proposes a spatial energy area generation strategy based on the decreasing quadratic function, and the calculation method is as follows:

[0020]

[0021]

[0022] Among them, D threshold is the spatial distance threshold for updating pheromones, which is determined by the Manhattan distance from the current node to the nearest node on the obstacle surface. d is the distance of outward expansion of the position of the obstacle cuboid, and c is a constant. E peak is the peak value of the energy area, Ebase is the lower limit of the energy value, and E is the node energy value.

[0023] Furthermore, the path optimization of the hybrid pipeline using PG-MACO to calculate a pipeline layout plan with a length as short as possible, as few elbows as possible, and as compliant with engineering requirements as possible includes the following steps:

[0024] S1: Classify the pipeline according to the input information of the hybrid pipeline into single pipeline, multi-pipeline, and branch pipeline, and calculate using different mechanisms respectively;

[0025] S2: For the layout of a single pipeline, according to the map information and pipeline information, use the PG-MACO algorithm to optimize the path of a single pipeline; S3: The layout of multi-pipelines is transformed into the layout of multiple single pipelines in a fixed order or a random order. The layout process needs to consider co-evolution, including a competition mechanism and a coordination mechanism. The competition mechanism is that the pipeline laid first is regarded as an obstacle relative to the pipeline laid later. The coordination mechanism is that multi-pipelines usually arranged in groups hope that the parallel layout length between pipelines is as long as possible;

[0026] S4: The layout of the branch pipeline transforms the pipeline layout problem with one starting point and multiple ending points into the layout of multiple pipelines with the same starting point. The layout of the branch pipeline only needs to consider the coordination mechanism, that is, usually hope that the parallel layout length between pipelines is as long as possible and the overlapping layout is as much as possible;

[0027] Furthermore, the optimization of the path of a single pipeline using the PG-MACO algorithm according to the map information and pipeline information includes the following steps:

[0028] S1: Set the parameters of the PG-MACO algorithm: the number of iterations, the number of ants, the total amount of pheromone, the pheromone evaporation factor, the pheromone importance factor, the heuristic factor, the Gaussian distribution expectation, the Gaussian distribution variance base value, the Gaussian distribution variance threshold, etc.;

[0029] S2: An ant individual in the ant population of a certain generation starts to find a path;

[0030] S3: Explore the set of feasible nodes in six directions in the space according to the position of the ant and the map information, and judge whether the end point is included in the feasible region. If it is included, the path finding of this ant ends and proceeds to S7. If it is not included, proceed to the next step;

[0031] S4: Select the exploration direction according to the feasible region information and heuristic information of the current node. Determine the node to be transferred according to the feasible region set and the exploration direction, calculate the state transition probability using the improved heuristic function, and perform roulette wheel selection to move to the next node;

[0032] S5: Determine whether the maximum number of loops required for the pathfinding process is reached. If the maximum number is reached, discard the current individual to avoid algorithm stagnation. If the maximum number is not reached, return to S3;

[0033] S6: Update the pheromone among the population, and based on the improved fitness function, determine whether the path found by the current ant is better than the global optimal solution and the local optimal solution. If so, replace the optimal solution with the current path;

[0034] S7: Determine whether all ants in the population have completed pathfinding. If all have completed pathfinding, enter the next iteration. If there are ants that have not completed, return to S2;

[0035] S8: Determine whether the maximum number of iterations is reached. If the maximum number of iterations is reached, return the current global optimal result to complete the current pipeline layout.

[0036] Furthermore, the calculation method for selecting the exploration direction based on the feasible region information and heuristic information of the current node is as follows:

[0037]

[0038]

[0039]

[0040] Among them, is a piecewise function defined on the independent variable x, is a three-dimensional vector from the starting point to the ending point, is one of the unit vectors in six directions in the absolute coordinate system, m is the distance margin, DI is the influence value of the heuristic information, FI is the influence value of the feasible region information, and the sum of the pheromones of each feasible node in this direction represents the length of the feasible region and the pheromone concentration in a certain direction, is the normalized probability of selecting a certain direction.

[0041] Furthermore, the calculation method for calculating the state transition probability using the improved heuristic function is as follows:

[0042]

[0043] Among them, T j is the information concentration of the node, E j is the energy value of the node, M j is the Manhattan distance from the node to the ending point, α and β are the pheromone heuristic factor and the expected heuristic factor, and c is a constant. This method considers the Manhattan distance to the ending point, the pheromone concentration, and the displacement selection method of the energy value, and can more comprehensively synthesize the influence of various factors, making the path search process more in line with the actual requirements of pipeline layout engineering.

[0044] Further, the calculation method of pheromone between the updated populations is as follows:

[0045]

[0046]

[0047]

[0048]

[0049] ph now = (ph last × ph d ) × (1 - ρ)

[0050] where is the Gaussian distribution probability density formula defined on the independent variable, is the expectation, θ is the variance, which affects the attenuation rate of the normal distribution in this method, θ base is the base value of the standard deviation of the normal distribution, θ threshold is the minimum standard deviation threshold; fitness is the fitness value of the current pipeline, fitness min and fitness max are respectively the fitness values of the optimal individual and the worst individual in the current population in this iteration; is the diffusion distance of the path of the currently updated pheromone, φ(d) is the pheromone distance attenuation factor, which is a function affected by the change with distance; Q is the total amount of pheromone, L is the path length, is the distance variable, is the Manhattan distance from a point in the two-dimensional plane orthogonal to the pipeline traveling direction to the pipeline node, ph d is the pheromone increment of the node at a distance d from the pipeline, ph last is the pheromone concentration value of a certain node in the previous generation, ph now is the value of the pheromone concentration of this node after update in this iteration, and ρ is the pheromone evaporation factor.

[0051] Further, the improved fitness function is divided into two types: single pipeline layout and multi-pipeline layout, as follows:

[0052] fitness single = ln[c1 × (a1 × L + a2 × B + a3 × installation) + c2]

[0053]

[0054] where fitness single is the fitness in the case of a single pipeline, fitness multi is the fitness in the case of multiple pipelines, L is the length of the pipeline, B is the number of elbows of the pipeline, L overlapis the length of the overlap, B overlap is the number of overlapping elbows, L parallel is the length of the parallel arrangement between the current pipeline and the already arranged pipeline, D parallel is the distance between the two pipelines arranged in parallel, a1, a2, a3 are the corresponding weights. By setting the weights, the optimization of the pipeline is more biased. The weights are usually set to make the influence of each factor on the objective function similar. c1 is the scaling factor, which controls the drastic degree of change of the fitness function. c2 is the moving factor, which controls the change range of the fitness function image.

[0055] The beneficial effects of the present invention are: a pheromone Gaussian diffusion multi-ant colony collaborative algorithm (PG-MACO), the research object is the mixed piping layout of ships. (1) By adopting an improved ant state transfer calculation method, the unnecessary elbows that appear in the traditional ant colony algorithm are greatly reduced. At the same time, the energy zone is introduced and considered in the heuristic function, achieving the goal of guiding the pipeline to approach certain specific areas. It is closer to engineering practice, avoiding excessive bends in the state transfer of individual ants, and considering the layout along the bulkhead or obstacle surface when laying pipes, and the grouped pipes should be arranged in parallel as much as possible.

[0056] (2) PG-MACO introduces a co-evolution mechanism, which enables the algorithm to handle mixed pipelines, including single pipelines, multiple pipelines, and branch pipelines, improving the algorithm's applicability and ability to handle complex layouts. It uses the fact that pheromones diffuse outward and become stronger the closer they are to the pipeline, so that the pipeline can more easily receive pheromone guidance from other ants during spatial search, thereby speeding up the ants' pathfinding efficiency and accelerating the convergence of the algorithm.

[0057] (3) The traditional ant colony algorithm only leaves pheromones on the paths that ants have walked. Since the pipeline layout problem belongs to the category of three-dimensional space path planning problems, in order to improve the computational efficiency, the pheromone influence range of the ants is expanded. The present invention introduces a pheromone expansion mechanism based on the Gaussian distribution attenuation function to update the pheromone around the arranged pipelines. As the distance increases, the amount of pheromone gradually decreases until it decays to the minimum threshold, thereby guiding the subsequent pipeline search to move closer to the location with high pheromone. At the same time, the probability selection function is combined to improve the search efficiency and avoid falling into the local optimal solution. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] In order to further verify the effect of the present invention in practical applications and to more clearly express the calculation process of the algorithm, the accompanying drawings used are briefly introduced below. The accompanying drawings show some application cases of the present invention. It should be stated that the present invention is not limited to these cases. For other technical personnel in this field, other accompanying drawings can be obtained according to the present invention without paying creative work, but they all belong to the scope of protection of the present invention.

[0059] Figure 1 In (a), it is the actual model of Case 1 of nuclear-grade pipeline layout; (b) is the simplified model after enveloping of Case 1 of nuclear-grade pipeline layout.

[0060] Figure 2 In (a), it is the actual model of Case 2 of nuclear-grade pipeline layout; (b) is the simplified model after enveloping of Case 2 of nuclear-grade pipeline layout.

[0061] Figure 3 It is the overall algorithm flow chart in this application.

[0062] Figure 4 It is the algorithm flow chart for solving a single pipeline.

[0063] Figure 5 It is the algorithm flow chart for solving multiple pipelines.

[0064] Figure 6 It is the algorithm flow chart for solving branch pipelines.

[0065] Figure 7 (a) is the algorithm layout effect diagram of Case 1; (b) is the actual layout effect diagram of Case 1.

[0066] Figure 8 (a) is the algorithm layout effect diagram of Case 2; (b) is the actual layout effect diagram of Case 2. Detailed implementation manner

[0067] In order to introduce the purpose, technical solution and advantages of the present invention in more detail, the following will be verified and described in combination with the actual case of nuclear-grade primary loop pipeline layout. A ship pipeline layout design method based on the Pheromone Gaussian Diffusion Multi Ant Colony Algorithm (PG-MACO) includes the following steps:

[0068] (1) Simplify the actual model space, and simplify the obstacles in the form of regular cuboids with AABB bounding boxes. Figure 1 (a), Figure 2 (a) is the schematic diagram of the actual model. Figure 1 (b), Figure 2 (b) is the schematic diagram of the model after envelope simplification. Then, obtain the diagonal vertex coordinates of the bounding box, perform operations such as translation and scaling on the vertex coordinates of the obstacles according to the layout space range, and then generate a grid map, which is expressed in the form of a three-dimensional array in python, where 0 represents inaccessible and 1 represents accessible.

[0069] (2) According to the input pipeline node information, store the starting and ending points of single pipelines, multi-pipelines, and branch pipelines into the corresponding positions of the python dictionary respectively, and in the map, make the grids at the pipeline nodes inaccessible according to the pipe diameter size;

[0070] (3) Initialize the energy value array corresponding to the grid map according to the energy area calculation formula. To meet the actual requirements and reduce the calculation amount, set the areas of obstacles from near to far with decreasing energy values in turn until the area generation ends after reaching the threshold. It is expressed using a three-dimensional array in python, and set the initial value and threshold to 1;

[0071] (4) Considering the complexity and characteristics of the layout conditions, arrange them in the order of branch pipelines, multi-pipelines, and single pipelines. The pipelines that are arranged first will be regarded as obstacles in the map during the subsequent pipeline layout. Among them, branch pipelines and multi-pipelines need to follow the co-evolution mechanism for solution;

[0072] The layout of the single pipeline uses the PG-MACO algorithm to optimize the single pipeline path according to the map information and pipeline information; see the algorithm flowchart in Figure 4 ;

[0073] The layout of the multi-pipeline is transformed into the layout of multiple single pipelines in a fixed order or a random order. The layout process includes the co-evolution of the competition mechanism and the coordination mechanism: the competition mechanism is that the pipelines arranged first are regarded as obstacles relative to the pipelines arranged later, and the coordination mechanism is that the multi-pipelines usually arranged in groups hope that the length of the parallel arrangement between pipelines can be as long as possible. Therefore, a method for calculating the parallel degree between pipelines is proposed, that is, if two pipe segments meet the parallelism, three conditions need to be met. First, in the same dimension, second, the two pipe segments have overlapping parts in this dimension, and third, in the plane formed by the other two dimensions, the distance between the center points of the pipe segments should meet certain requirements. See the algorithm flowchart in Figure 5 ;

[0074] The layout of the branch pipeline transforms the layout of a pipeline with one starting point and multiple ending points into the layout of multiple pipelines with the same starting point. The starting point is selected as the node with the smallest sum of Manhattan distances to other nodes. The order during the solution is a random order, thereby increasing the randomness of the calculation. The layout of the branch pipeline adopts the coordination mechanism and does not require interference with each other during the layout process, and hopes that the length of the parallel and overlapping arrangement between pipelines can be as long as possible. See the algorithm flowchart in Figure 6 ;

[0075] When calculating a single pipeline or a single pipeline transformed from a multi-pipeline or a branch pipeline, the goal is to find a pipeline with the shortest possible length, the fewest possible elbows, and the highest possible energy value. Its evaluation function is as follows:

[0076] fitness single = ln[c1×(a1×L + a2×B + a3×installation) + c2]

[0077] L is the length of the pipeline, B is the number of elbows of the pipeline, installation is the reward value obtained by the pipeline that meets the construction constraints, a1, a2, and a3 are the corresponding weights. The fitness function is constructed in the form of a logarithmic function. The purpose is to make the change of the fitness value more obvious in the initial stage of the algorithm implementation, and at the same time promote the amplification of the change degree of the fitness value in the later stage of the algorithm, so as to be more sensitive to the appearance and capture of the optimal solution.

[0078] When solving the pipeline under the collaborative framework, the evaluation system of the pipeline is to select the pipeline with the best collaborative effect between the paths of the optimal ants in each generation and the pipelines that have been arranged before. Therefore, the algorithm evaluation function under the collaborative framework is:

[0079]

[0080] L is the length of the pipeline, B is the number of elbows of the pipeline, L overlap is the overlapping length, B overlap is the number of overlapping elbows, L parallel is the length of the parallel arrangement between the current pipeline and the pipelines that have been arranged, D parallel is the distance between two pipelines under the parallel arrangement, a1, a2, and a3 are the corresponding weights.

[0081] The specific implementation steps of the PG - MACO algorithm are as follows:

[0082] S1: Set the parameters of the algorithm, the population size is 10, the number of iterations is 20, the total amount of pheromone is 500, the pheromone evaporation factor is 0.4, the importance factor of pheromone is 2, the heuristic factor is 2, the expectation of the Gaussian distribution is 0, the base value of the variance of the Gaussian distribution is 3, and the threshold of the variance of the Gaussian distribution is 1;

[0083] S2: An ant individual in the ant population of a certain generation starts to find a path.

[0084] S3: Explore the set of feasible domain nodes of the current node, and determine whether the end point is included in the feasible domain. If it is included, the path - finding of this ant ends; if not, proceed to the next step.

[0085] S4: Calculate the exploration direction and determine the node to be transferred, calculate the state transition probability, and perform roulette wheel selection to move to the next node:

[0086]

[0087] DI is the influence value of heuristic information, and FI is the influence value of feasible region information, which refers to the length of the feasible region in a certain direction and the pheromone concentration information, that is, the sum of the pheromones of each feasible node in this direction. is the normalized probability of selecting a certain direction. T j is the information concentration of the node. E j is the energy value of the node. M j is the Manhattan distance from the node to the end point, and α and β are the pheromone heuristic factor and the expected heuristic factor.

[0088] S5: To avoid algorithm stagnation, it is necessary to determine whether the number of times of exploring the next node exceeds the limit. If the maximum number of times is reached, the current individual is discarded. If the maximum number of times is not reached, return to S3 to continue exploring the next node.

[0089] S6: Screen and record the current global optimal solution and the local optimal solution of the ant individual according to the fitness function of the single pipeline, and then update the pheromone among the populations according to the path of the current pipeline to guide the subsequent path finding process:

[0090]

[0091]

[0092]

[0093]

[0094] ph now =(ph last +ph d )×(1 - ρ)

[0095] Among them, f(x) is the Gaussian distribution probability density formula defined on the independent variable x, μ is the expectation, θ is the variance, which affects the normal distribution decay rate in this method, and θ base is the standard deviation base value of the normal distribution, and θ threshold is the minimum standard deviation threshold; fitness is the fitness value of the current pipeline, fitness min and fitness max are respectively the fitness values of the worst individual and the best individual in the current population in this iteration; d is the diffusion distance of the path for updating the pheromone currently, φ(d) is the pheromone distance decay factor, which is a function affected by the distance change; Q is the total amount of pheromone, L is the path length, ph d is the pheromone increment of the node at a distance d from the pipeline, and ph last is the pheromone concentration value of a certain node in the previous generation, and ph nowis the value of the pheromone concentration of this node after update in this iteration, and ρ is the pheromone evaporation factor. The advantage of the improvement is that the ant colony algorithm mainly communicates through pheromones among ants. In the traditional ant colony algorithm, pheromones are only left on the paths walked by ants. Since the pipeline layout problem belongs to the category of three-dimensional space path planning problems, in order to improve the calculation efficiency, considering expanding the influence range of the pheromones of ants, the present invention introduces a pheromone expansion mechanism based on a Gaussian distribution attenuation function to update pheromones around the already laid pipelines. As the distance increases, the amount of pheromones gradually weakens until it decays to the lowest threshold, thereby guiding the subsequent pipeline search to approach the position with high pheromones. At the same time, combined with the probability selection function, the search efficiency is improved and the local optimal solution is avoided;

[0096] S7: Judge whether all ants in the population have completed path finding. If all have completed path finding, enter the next iteration. If there are ants that have not completed, return to S2;

[0097] S8: Judge whether the maximum number of iterations has been reached. If the maximum number of iterations has been reached, return the current global optimal result to complete the current pipeline layout;

[0098] S9: If the currently processed is a multi-pipeline or branch pipeline, select the ant individual with the best cooperation from the current population, then define it as an obstacle and update it in the map, and then calculate the next pipeline. When the calculation of this group of pipelines is completed, continue to calculate the next group of pipelines.

[0099] In Figure 7 (a) shows an example of branch pipeline layout, Figure 7 (b) shows an example of hybrid pipeline layout, including single pipelines, multi-pipelines and branch pipelines. As shown in the figure, when arranging branch pipelines with multiple interfaces, the cooperation is better, the overlapping layout length is longer. When arranging multi-pipelines in groups, parallelism can be considered. When arranging hybrid pipelines, the interference problem under co-evolution can be considered. The overall result meets the target requirements.

[0100] It should be noted that the above embodiments are only used to verify and illustrate the technical solutions of the present invention, and do not limit it. When dealing with situations where some or all of the technical features are different, appropriate modifications or substitutions can be made according to the detailed description of the present invention in the foregoing embodiments, provided that the technical solutions should not deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for designing the layout of ship pipelines based on the PG-MACO algorithm, characterized in that: including the following steps, (1) rasterize the layout space, simplify the envelope of the obstacles according to the obstacle space information, and record the diagonal coordinates of each obstacle; (2) the algorithm automatically translates and scales the layout space according to the calculation accuracy, transforms the real model of the layout space into a simplified model for algorithm calculation, and assigns specific values to the grids where the obstacles are located, so that they can be recognized as inaccessible by the algorithm; (3) input the coordinate values and pipe diameter lists of the starting point and the ending point of the pipeline to be laid, and initialize or update the map each time before solving the path; (4) generate the energy area according to the equipment information, which means that according to the map and equipment information, different energy values are assigned to each node in the map, and the energy value is considered when searching for the pipeline to guide the pipeline to approach or move away from certain spatial areas. Based on the spatial energy area generation strategy of quadratic function decrease, the calculation method is as follows: Among them, D threshold is the spatial distance threshold for updating pheromones, E peak is the peak value of the energy region, and E base is the lower limit of the energy value; E is the node energy value, d is the distance of outward expansion from the position of the obstacle cuboid, and c is a constant; (5) perform the optimal path pipeline layout of the hybrid pipeline according to the current grid map and the starting and ending point information of the pipeline to be laid: (i) classify the pipeline according to the input information of the hybrid pipeline, which is divided into three types: single pipeline, multi-pipeline, and branch pipeline. Arrange them in the order of branch pipeline, multi-pipeline, and single pipeline. The pipelines that are arranged first will be used as obstacles in the subsequent pipeline layout and will be calculated using different mechanisms respectively; (ii) the layout of the single pipeline uses the single pipeline path optimization according to the map information and pipeline information; (iii) the layout of the multi-pipeline is transformed into the layout of multiple single pipelines in a fixed order or a random order. The layout process includes the co-evolution of the competition mechanism and the coordination mechanism: the competition mechanism means that the pipelines laid first are regarded as obstacles relative to the pipelines laid later, and the coordination mechanism means that the multi-pipelines usually arranged in groups hope that the length of the parallel arrangement between pipelines is the longest; (iv) the layout of the branch pipeline transforms the layout of the pipeline with one starting point and multiple ending points into the layout of multiple pipelines with the same starting point. The layout of the branch pipeline uses the coordination mechanism, that is, it usually hopes that the length of the parallel overlapping arrangement between pipelines is the longest; The layout of the single pipeline includes the following steps: S1: Set the parameters of the PG-MACO algorithm: the number of iterations, the number of ants, the total amount of pheromone, the pheromone evaporation factor, the pheromone importance factor, the heuristic factor, the expectation of the Gaussian distribution, the base value of the Gaussian distribution variance, and the threshold of the Gaussian distribution variance; S2: An ant individual in the ant population of a certain generation starts to find a path; S3: Explore the set of feasible nodes in six directions in the space according to the position of the ant and the map information, and judge whether the feasible region contains the end point. If it contains, the path finding of the ant ends and S7 is performed. If it does not contain, S4 is performed; S4: Select the exploration direction according to the feasible region information and heuristic information of the current node; Among them, is a piecewise function defined on the independent variable x, is a three-dimensional vector from the starting point to the ending point, is one of the unit vectors in six directions in the absolute coordinate system, m is the distance margin, DI is the influence value of the heuristic information, FI is the influence value of the feasible region information, and the sum of the pheromones of each feasible node in this direction represents the length of the feasible region and the pheromone concentration in a certain direction, is the normalized probability of selecting a certain direction; Determine the node to be transferred according to the feasible region set and the exploration direction, calculate the state transition probability using the improved heuristic function, and perform roulette wheel selection to move to the next node; The method for calculating the state transition probability by the improved heuristic function is: Among them, T j is the information concentration of the node, E j is the energy value of the node, M j is the Manhattan distance from the node to the end point, α and β are the pheromone heuristic factor and the expected heuristic factor, and c is a constant; S5: Determine whether the maximum number of loops required for the pathfinding process is reached. If the maximum number is reached, discard the current individual to avoid algorithm stagnation. If the maximum number is not reached, return to S3; S6: Update the pheromone among the population, and based on the improved fitness function, determine whether the path found by the current ant is better than the global optimal solution and the local optimal solution. If so, replace the optimal solution with the current path; The calculation method for updating the pheromone among the population is as follows: ph now = (ph last + ph d ) × (1 - ρ) Among them, f(x) is the Gaussian distribution probability density formula defined on the independent variable x, μ is the expectation, θ is the variance, which affects the attenuation rate of the normal distribution in this method, and θ base is the standard deviation base value of the normal distribution, and θ threshold is the minimum standard deviation threshold; fitness is the fitness value of the current pipeline, and fitness min and fitness max are the fitness values of the worst individual and the best individual in the current population in this iteration, respectively; d is the diffusion distance of the path for updating the pheromone currently, φ(d) is the pheromone distance attenuation factor, which is a function varying with distance; Q is the total amount of pheromone, L is the path length, and ph d is the pheromone increment of the node at a distance d from the pipeline, and ph last is the pheromone concentration value of a certain node in the previous generation, and ph now is the value after updating the pheromone concentration of this node in this iteration, and ρ is the pheromone evaporation factor; The fitness function for single-pipeline layout is: fitness single = ln[c1×(a1×L + a2×B + a3×installation) + c2] L is the length of the pipeline, B is the number of elbows, installation is the reward value obtained by the pipeline that meets the construction constraints, a1, a2, a3 are the corresponding weights, c1 is a scaling factor that controls the severity of the change in the fitness function, and c2 is a shift factor that controls the change interval of the fitness function graph; S7: Determine whether all ants in the population have completed pathfinding. If all have completed pathfinding, enter the next iteration. If there are ants that have not completed, return to S2; S8: Determine whether the maximum number of iterations is reached. If the maximum number of iterations is reached, return the current global optimal result to complete the current pipeline layout.

2. The method for designing the layout of ship pipelines based on the PG-MACO algorithm according to claim 1, characterized in that: For the layout of multiple pipelines, select the ant individual with the best cooperation from the current population, then define it as an obstacle and update it in the map, and then calculate the next pipeline according to the multi-pipeline layout method; The multi-pipeline layout method only needs to use the fitness function for multi-pipeline layout in step S6, and the rest of the steps are the same as those of the single-pipeline layout method; Under the collaborative framework, the fitness function for multi-pipeline layout is: L is the length of the pipeline, B is the number of elbows in the pipeline, L overlap is the length of the overlapping part, B overlap is the number of overlapping elbows, L parallel is the length of the parallel arrangement between the current pipeline and the already arranged pipeline, D parallel is the distance between the two pipelines under parallel arrangement, a1, a2, a3 are the corresponding weights, c1 is the scaling factor, controlling the severity of the change in the fitness function, and c2 is the moving factor, controlling the change interval of the fitness function image.

3. A design method for ship pipeline layout based on the PG-MACO algorithm according to claim 1, characterized in that: The layout of branch pipelines is to convert the layout of a pipeline with one starting point and multiple ending points into the layout of multiple pipelines with the same starting point, hoping that the pipelines can be arranged in parallel and overlapped for as long a length as possible; the starting point is selected as the node with the smallest sum of Manhattan distances to other nodes, and the order during solution is random.

4. A design method for ship pipeline layout based on the PG-MACO algorithm according to claim 1, characterized in that: The content initialized or updated in step (3) includes: assigning the grid where the obstacle envelope is located as inaccessible; assigning the starting points and ending points of other pipelines except the starting point and ending point of the currently laid pipeline as inaccessible and performing dilation, and the dilation range is determined by the multiple relationship between the sum of the current pipe diameter and the safety distance reserved for the pipeline and the length of the grid unit size; if there are other pipeline layouts completed before the current pipeline layout, it is necessary to determine whether to update the laid result as an obstacle according to the pipeline type.

Citation Information

Patent Citations

  • Robot path planning method based on improved ant colony algorithm

    CN105929843A

  • Marine engine room pipeline arrangement method based on improved ant colony algorithm

    CN114415679A