Anti-collision laser cutting path optimization method and system based on potential field ant colony algorithm
Through the path optimization method based on the potential field ant colony algorithm, the collision problem caused by cavity in laser cutting is solved, the path of the cutting head through the cut area is reduced, and the processing efficiency and cutting speed are improved.
Patent Information
- Application Number
- CN202411199442.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-29
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-08-29
AI Technical Summary
The existing laser cutting technology causes the cutting head to collide due to the cavity during the cutting process, which affects the efficiency. In order to avoid collisions, the "frog jump" method needs to be frequently used to reduce the high-speed cutting speed and affect the overall processing efficiency.
The anti-collision path optimization method based on the potential field ant colony algorithm is adopted to solve the traveler problem through the ant colony algorithm, determine the initial cutting order, and optimize the path using the potential field ant colony algorithm, gravity guidance and repulsion eliminate obstacles, combining forward detection and backtracking Search to reduce paths through cut areas.
It effectively reduces the number of paths passing through the cut area, improves the laser cutting speed, ensures the cutting quality, improves the overall processing efficiency, and reduces the impact of cutting head collisions.
Smart Images

Figure CN119077148A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field related to path optimization, and more specifically, relates to a collision-proof laser cutting path optimization method and system based on a potential field ant colony algorithm. Background Art
[0002] Laser cutting technology has the advantages of fast cutting speed, high cutting accuracy, and good cutting quality. It uses non-contact processing, has little impact on the quality of the workpiece, and has strong processing adaptability. Therefore, it has been widely used in the field of sheet metal cutting. At the same time, the requirements for laser cutting efficiency are getting higher and higher. In order to improve cutting efficiency, it is necessary to reduce the number of times the laser cutting head uses the low-speed movement method of "frog jump" to avoid the cut area, and ensure continuous high-speed movement of the cutting head.
[0003] Most current laser cutting machines use capacitive height sensors in their Z-axis follow-up systems. In the actual cutting process, when a part is cut by laser, it will fall into the blanking chute below due to gravity, leaving a cavity. The presence of the cavity causes the capacitance to change, and the cutting head will move closer to the plate under the action of the Z-axis follow-up system and fall into the cavity. At this time, if the cutting head moves along the original path, it will collide with the plate outside the cavity, which may damage the laser cutting head, causing machine failure and affecting production efficiency, or even cause fragments to splash and injure workers. In order to avoid this situation, the factory currently uses the "frog jump" method to avoid the already cut area. The specific explanation is as follows:
[0004] Starting from the coordinate origin, the laser cutting head first maintains a safe distance from the plate surface and moves to the starting point of the first part to be cut through the first empty stroke. After arriving, the cutting head descends to the appropriate cutting height and starts cutting. After completing the contour cutting of the first part, if the next cutting path will pass through the cavity part of the currently cut part, the cutting head turns off the laser and lifts to a safe height, then moves to the safe cutting starting point of the next part and repeats the same cutting process. This process continues until all parts have been cut in sequence.
[0005] When passing through the already cut area, the laser cutting head will not be able to maintain a high-speed laser cutting, but must slow down and raise to a safe height before continuing to cut. Obviously, once too many cavity areas are passed, the overall cutting speed will be greatly affected. Therefore, in order to ensure cutting efficiency, a path optimization method is urgently needed that can reduce the laser cutting path passing through the already cut area, reduce the impact of the cutting head collision on the laser cutting efficiency, and improve the overall processing efficiency. Summary of the invention
[0006] In response to the above defects or improvement needs of the prior art, the present invention provides a collision-proof laser cutting path optimization method and system based on potential field ant colony algorithm, which aims to solve the problem of low processing efficiency due to too many laser cutting paths passing through the cut area.
[0007] To achieve the above object, according to one aspect of the present invention, a collision-free laser cutting path optimization method based on a potential field ant colony algorithm is provided, the method comprising the following steps:
[0008] Step 1, with the goal of minimizing the tool moving distance, an initial cutting sequence of the parts is formulated; the initial cutting sequence is obtained by solving the traveling salesman problem using an ant colony algorithm;
[0009] Step 2: According to the anti-collision constraint, the potential field ant colony algorithm is used to optimize the cutting sequence to obtain the optimal path; wherein the potential field ant colony algorithm adds an attraction factor and a repulsion factor according to the artificial potential field method to improve the potential field ant colony algorithm heuristic function.
[0010] Furthermore, the rules for determining the initial cutting sequence include: intersection priority criteria, avoiding missing any parts during cutting, and using an ant colony algorithm to solve the cutting sequence.
[0011] Furthermore, the intersection priority criterion is specifically as follows: when part V1 and part V2 have a point intersection or an edge intersection, the common point or common edge is used as the cutting point of part V1 and part V2;
[0012] When the edge of part V1 intersects with the vertex of part V2, the corresponding intersection point is taken as an alternative and added to the vertex set to be selected of part V1.
[0013] Furthermore, determining the initial cutting sequence specifically includes the following steps:
[0014] Step 1: The problem is mathematically modeled as a GTSP problem. The objective function is to minimize the total cutting distance. The constraints are: each part is visited at least once; the out-degree and in-degree of each vertex of the part are equal and 1; and the sub-circular path is eliminated;
[0015] Step 2: Initialize the ant colony algorithm parameters;
[0016] Step 3: Convert the positions of the part graphics and the layout diagram into two-dimensional coordinate information and store them in the ant colony algorithm path information matrix, and determine the intersection of the parts as the cutting point of the part according to the intersection priority criterion;
[0017] Step 4: Start iteration. m ants randomly select n parts according to the roulette algorithm, add them to the taboo table, and update the path distance matrix.
[0018] Step 5: Starting from the first ant, calculate the transfer probability to select the next path part, add it to the taboo table and update the path distance until all m ants have completed this operation;
[0019] Step 6: Save the shortest path distance and shortest path order in this iteration;
[0020] Step 7: If the shortest path distance of this iteration is less than the global shortest path distance, use this result to replace the global shortest path distance and shortest path order;
[0021] Step 8: Update the global pheromone and determine whether the maximum number of iterations has been reached. If not, return to Step 4; otherwise, go to Step 9;
[0022] Step9: Output the global shortest path distance and shortest path order.
[0023] Furthermore, in the optimization process, forward detection and backtracking search are used. The forward detection is to predict the subsequent path of the current target when planning the path; the backtracking search is that once a future path is predicted to pass through the cut cavity, it is necessary to return to the previous decision point for re-planning.
[0024] Furthermore, the heuristic function of the potential field ant colony algorithm takes into account the gravitational force A(d ij ) and repulsive force R(e ij ,θ), the corresponding formula is:
[0025] H(i,j)=α·A(d ij )-β·max θ∈{上,下,左,右} R(e ij ,θ)
[0026] Where α and β are weight coefficients, which are used to adjust the relative importance of attraction and repulsion in heuristic scoring; max θ∈{上,下,左,右} R(e ij ,θ) is the maximum repulsive force of the current position on the obstacle in four directions.
[0027] Furthermore, according to the forward detection and backtracking search, the forward scoring is added, and the heuristic function is expanded, and the corresponding formula is:
[0028] H′(i,j,k)=α·A(d ij )-β·max θ∈{上,下,左,右} R(e ij ,θ)-γ·L(j,k)
[0029] Among them, L(j,k) represents the forward-looking score from j to the future target k, γ is the influence weight coefficient of the forward-looking score in the total heuristic score, among which,
[0030] L(j,k)=σ j (minD(j,k)+ε)
[0031]
[0032] Where minD(j,k) is the shortest distance from j to k; ε is a non-zero number used to prevent the target points from being the same.
[0033] Furthermore, a potential field ant colony algorithm based on forward detection and backtracking search is used to optimize the part cutting sequence, which specifically includes the following steps:
[0034] Step 1: Initialize the potential field ant colony algorithm parameters;
[0035] Step 2: Convert the position of the part graphics and the layout diagram into two-dimensional coordinate information and store it in the potential field-ant colony algorithm path information matrix;
[0036] Step 3: Define the node data structure, set the root node to the current position i, create a node list, and the initial node list only contains the root node;
[0037] Step 4: Determine whether the node list is empty. If it is empty, execute Step 8; if it is not empty, calculate the repulsion around each node j in the node list and update the repulsion influence factor σ j , once σ j =0, then remove node j from the list;
[0038] Step 5: Under the current node, calculate the shortest distance, forward-looking score, and total heuristic function of each possible target position k. Once the forward-looking score L(j,k)>0, add k as a new potential node to the node list, and update the cumulative path length and coordinate position of k.
[0039] Step 6: Determine whether all nodes have been removed. If so, backtrack to the nearest feasible node; otherwise, go to Step 7;
[0040] Step 7: Determine whether a satisfactory path is found. If so, determine the path, end the loop and output the final determined path. Otherwise, jump to Step 4.
[0041] The present invention also provides an anti-collision laser cutting path optimization system based on a potential field ant colony algorithm, the system comprising a memory and a processor, the memory storing a computer program, and the processor executing the anti-collision laser cutting path optimization method based on a potential field ant colony algorithm as described above when executing the computer program.
[0042] The present invention also provides a computer-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the anti-collision laser cutting path optimization method based on the potential field ant colony algorithm as described above.
[0043] In general, compared with the prior art, the above technical solution conceived by the present invention, the anti-collision laser cutting path optimization method and system based on potential field ant colony algorithm provided by the present invention mainly have the following beneficial effects:
[0044] 1. After determining the initial cutting order of the parts, the present invention optimizes the cutting path according to the potential field ant colony algorithm, achieves the anti-collision optimization effect by guiding the path search by gravity and removing obstacles by repulsion, reduces the number of paths passing through the cut area, improves the laser cutting speed, completes the entire planning of the part cutting path while ensuring the cutting quality, and improves the processing efficiency.
[0045] 2. The present invention takes into account the overall cutting path planning efficiency. The use of forward detection and backtracking search can effectively prune unnecessary paths, accelerate the search, promote algorithm convergence, and help improve the overall processing efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 The embodiment of the present invention updates the vertex schematic diagram based on the "intersection priority" criterion;
[0047] Figure 2 It is a flow chart of the anti-collision laser cutting path optimization method based on the potential field ant colony algorithm provided by the present invention;
[0048] Figure 3 is an example diagram of the initial cutting path of an embodiment of the present invention;
[0049] Figure 4 3 is an example diagram of an anti-collision cutting path optimized by the proposed method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0051] The present invention provides a collision-proof laser cutting path optimization method based on a potential field ant colony algorithm, and the method mainly comprises the following steps:
[0052] Step 1: With the shortest tool moving distance as the goal, an initial cutting sequence of parts is formulated; the initial cutting sequence is obtained by solving the traveling salesman problem using an ant colony algorithm.
[0053] The rules for determining the initial cutting order include: "intersection priority" principle, avoiding missing any parts during cutting, and using ant colony algorithm to solve the cutting order.
[0054] The “intersection priority” principle is as follows:
[0055] When part V1 and part V2 intersect at a point or at an edge, the common point or common edge is used as the cutting point of part V1 and part V2;
[0056] When the edge of part V1 intersects with the vertex of part V2, the intersection point is taken as a candidate and added to the vertex set to be selected of part V1.
[0057] The determination of the initial cutting sequence specifically includes the following steps:
[0058] Step 1: The problem is mathematically modeled as a GTSP problem. The objective function is to minimize the total cutting distance. The constraints are: each part is visited at least once; the out-degree and in-degree of each vertex of the part are equal and 1; and the sub-circular path is eliminated;
[0059] Step 2: Initialize the parameters of the ant colony algorithm, such as the number of ants m, the number of target parts n, the maximum number of iterations, the pheromone volatility factor, the pheromone importance factor, etc.
[0060] Step 3: Convert the positions of the part graphics and the layout diagram into two-dimensional coordinate information and store them in the ant colony algorithm path information matrix, and determine the intersection of the parts as the cutting point of the part according to the intersection priority criterion;
[0061] Step 4: Start iteration. m ants randomly select n parts according to the roulette algorithm, add them to the taboo table, and update the path distance matrix.
[0062] Step 5: Starting from the first ant, the next path part is selected according to the transfer probability calculated by the formula, added to the taboo table and updated the path distance until all m ants have completed this operation;
[0063] Step 6: Save the shortest path distance and shortest path order in this iteration;
[0064] Step 7: If the shortest path distance of this iteration is less than the global shortest path distance, use this result to replace the global shortest path distance and shortest path order;
[0065] Step 8: Update the global pheromone and determine whether the maximum number of iterations has been reached. If not, return to Step 4; otherwise, go to Step 9;
[0066] Step9: Output the global shortest path distance and shortest path order.
[0067] Step 2: According to the anti-collision constraint, the potential field ant colony algorithm is used to optimize the cutting order to reduce the number of times the cutting path passes through the cut area; the potential field ant colony algorithm adds an attraction factor and a repulsion factor based on the artificial potential field method to improve the potential field ant colony algorithm heuristic function.
[0068] During the optimization process, forward detection and backtracking search are used. The forward detection is to predict the subsequent path of the current target when planning the path; the backtracking search is that once a future path is predicted to pass through the cut cavity, it is necessary to return to the previous decision point for replanning.
[0069] The heuristic function of the potential field ant colony algorithm takes into account the gravitational force A(d ij ) and repulsive force R(e ij ,θ), the corresponding formula is:
[0070] H(i,j)=α·A(d ij )-β·max θ∈{上,下,左,右} R(e ij ,θ)
[0071] Where α and β are weight coefficients, which are used to adjust the relative importance of attraction and repulsion in heuristic scoring; max θ∈{上,下,左,右} R(e ij ,θ) is the maximum repulsive force of the current position on the obstacle in four directions.
[0072] According to the forward detection and backtracking search, the forward score is added, and the heuristic function is expanded. The corresponding formula is:
[0073] H′(i,j,k)=α·A(d ij )-β·maxθ∈{上,下,左,右} R(e ij ,θ)-γ·L(j,k)
[0074] Among them, L(j,k) represents the forward-looking score from j to the future target k, γ is the influence weight coefficient of the forward-looking score in the total heuristic score, among which,
[0075] L(j,k)=σ j (minD(j,k)+ε)
[0076]
[0077] The potential field ant colony algorithm based on forward detection and backtracking search is used to optimize the part cutting sequence, which specifically includes the following steps:
[0078] Step 1: Initialize the potential field ant colony algorithm parameters, such as gravitational weight coefficient, repulsive weight coefficient, repulsive influence factor, number of ants m, number of target parts n, maximum number of iterations, pheromone volatilization factor, pheromone importance factor, etc.;
[0079] Step 2: Convert the position of the part graphics and the layout diagram into two-dimensional coordinate information and store it in the potential field-ant colony algorithm path information matrix;
[0080] Step 3: Define the node data structure, set the root node to the current position i, create a node list, and the initial node list only contains the root node;
[0081] Step 4: Determine whether the node list is empty. If it is empty, execute Step 8; if it is not empty, calculate the repulsion around each node j in the node list and update the repulsion influence factor σ j , once σ j =0, then remove node j from the list;
[0082] Step 5: Under the current node, calculate the shortest distance, forward-looking score, and total heuristic function of each possible target position k. Once the forward-looking score L(j,k)>0, add k as a new potential node to the node list, and update the cumulative path length and coordinate position of k.
[0083] Step 6: Determine whether all nodes have been removed. If so, backtrack to the nearest feasible node; otherwise, go to Step 7;
[0084] Step 7: Determine whether a satisfactory path is found. If so, determine the path, end the loop and output the final determined path. Otherwise, jump to Step 4.
[0085] The present invention also provides an anti-collision laser cutting path optimization system based on a potential field ant colony algorithm, the system comprising a memory and a processor, the memory storing a computer program, and the processor executing the anti-collision laser cutting path optimization method based on a potential field ant colony algorithm as described above when executing the computer program.
[0086] The present invention also provides a computer-readable storage medium, which stores machine-executable instructions. When the machine-executable instructions are called and executed by a processor, the machine-executable instructions prompt the processor to implement the anti-collision laser cutting path optimization method based on the potential field ant colony algorithm as described above.
[0087] The present invention is further described in detail below with reference to specific embodiments.
[0088] An anti-collision laser cutting path optimization method based on potential field-ant colony algorithm provided by an embodiment of the present invention comprises the following steps:
[0089] (1) With the shortest tool movement distance as the goal, the initial cutting sequence of parts on the steel plate is formulated according to the basic cutting rules;
[0090] (2) Based on mathematical modeling knowledge, the cutting path optimization problem is modeled as a GTSP problem, and the objective function and constraints are obtained;
[0091] (3) According to the model of step (2), an ant colony algorithm is used to solve and obtain an initial cutting sequence;
[0092] (4) The potential field-ant colony algorithm is used to perform anti-collision optimization on the initial cutting sequence planned in step (3), and finally a complete anti-collision laser cutting path optimization path is obtained.
[0093] Preferably, in step (1), the basic cutting rule is specifically described as:
[0094] First: the “intersection priority” principle;
[0095] Second: avoid missing any parts when cutting;
[0096] Third: Use ant colony algorithm to solve the cutting order.
[0097] The specific expression of the “intersection priority” principle is as follows:
[0098] When part V1 and part V2 intersect at a point or at an edge, the common point or common edge is used as the cutting point of part V1 and part V2;
[0099] When the edge of part V1 intersects with the vertex of part V2, the intersection point is taken as a candidate and added to the vertex set to be selected of part V1;
[0100] For the second case, the formal description is as follows: For any given two vertex sets P u and P w , and P w Each vertex P in wk , if there exists a pair of vertices P ui and P uj (P ui ,P uj ∈P u ), so that lie in and , then perform the update operation:
[0101] like Figure 1 As shown, according to the original model, the part contour V1 has only vertices from P1 to P77, but because V2 and V1 have an intersection (that is, the vertex of the other part is on the edge of the part), considering the intersection priority constraint, the vertices of V2 can also be added to the vertex set of V1. At this time, the number of vertices of V1 changes from 7 to 8, and the intersection P8 is added.
[0102] Preferably, in step (2), by abstracting the cutting path optimization problem, a mathematical model of the traveling salesman problem is established, and the objective function and constraint conditions are obtained as follows:
[0103] Let x ij is a decision variable. If edge (i, j) is selected as part of the cutting path, then x ij =1; otherwise x ij =0.
[0104] Objective function: Minimize the total cost (i.e., total path distance):
[0105] Constraint 1: Visit each group at least once:
[0106] Constraint 2: For each vertex i in the graph, its out-degree and in-degree should be equal and 1:
[0107]
[0108] Constraint 3: Ensure that there is no sub-circular path between vertex i and vertex j:
[0109] And i,j>1
[0110] Preferably, in step (3), according to the model of step (2), an ant colony algorithm is used to solve and obtain the initial cutting sequence. The specific model of the ant colony algorithm is as follows:
[0111] Suppose there is a set of n parts C = {c1, c2, ..., c n}, m ants, use d ij (i,j=1,2,…,n) represents the distance between part i and part j, τ ij (t) represents the residual pheromone intensity on the path connecting part i and part j at time t.
[0112] Ant k (k = 1, 2, ..., m) determines the part it will choose next when foraging based on the pheromone concentration along the path. The parts that ant k has walked through before are represented by the taboo table u k (k=1,2,…,n) records, and the set is adjusted at any time during the optimization process. During the foraging process, ant k calculates the transfer probability according to the formula, and then selects the next target part according to the calculated probability. It represents the state transition probability of the ant moving from part i to part j at time t, and its expression is:
[0113]
[0114] Where, d k = {Cu k} is the set of parts that the ant can choose in the next step, α is the pheromone importance factor, β is the heuristic function importance factor, η ij (t) is the heuristic function, which represents the heuristic information from part i to part j. Here, the inverse of the path length is usually taken:
[0115]
[0116] Excessive accumulation of pheromones on the path may cause the algorithm to converge early, resulting in early termination of the search. To avoid this, the ants need to update the residual pheromones during the search process. As long as the ant passes through the path from part i to part j, the pheromones on the path will be updated according to the following formula to ensure that the pheromones will not be over-accumulated. This is a local update.
[0117] τ ij (t+1)=(1-ρ)τ ij (t)+Δτ ij (t)
[0118]
[0119] In the formula, It is the pheromone volatilization factor, preventing excessive accumulation of pheromones. ij (t) represents the increment of pheromone left from part i to part j in this cycle, Δτ ij (0)=0, It represents the pheromone concentration of ant k on path (i, j) at time t. After all ants complete a round of traversal, a global update will be performed on the pheromone distribution in the entire system to guide the ants to search the solution space more efficiently. Defined as:
[0120]
[0121] Where Q is a constant, which indicates the total amount of pheromone released by the ant after completing this path search. k Represents the total distance traveled by ant k in this cycle.
[0122] Preferably, determining the initial cutting sequence specifically includes the following steps:
[0123] Step 1: The problem is mathematically modeled as a GTSP problem. The objective function is to minimize the total cutting distance. The constraints are: each part is visited at least once; the out-degree and in-degree of each vertex of the part are equal and 1; and the sub-circular path is eliminated;
[0124] Step 2: Initialize the parameters of the ant colony algorithm, such as the number of ants m, the number of target parts n, the maximum number of iterations, the pheromone volatility factor, the pheromone importance factor, etc.
[0125] Step 3: Convert the positions of the part graphics and the layout diagram into two-dimensional coordinate information and store them in the ant colony algorithm path information matrix, and determine the part intersection as the cutting point of the part according to the intersection priority criterion.
[0126] Step 4: Start iteration. m ants randomly select n parts according to the roulette algorithm, add them to the taboo table, and update the path distance matrix.
[0127] Step 5: Starting from the first ant, the next path part is selected according to the transfer probability calculated by the formula, added to the taboo table and updated the path distance until all m ants have completed this operation.
[0128] Step 6: Save the shortest path distance and shortest path order in this iteration.
[0129] Step 7: If the shortest path distance of this iteration is less than the global shortest path distance, use this result to replace the global shortest path distance and shortest path order.
[0130] Step 8: Update the global pheromone according to the formula and determine whether the maximum number of iterations has been reached. If not, return to Step 4. Otherwise, end the iteration and output the global shortest path distance and shortest path order.
[0131] Preferably, in step (4), the potential field-ant colony algorithm used improves the ant colony algorithm heuristic function, and its heuristic function takes into account the gravitational force A (d ij ) and repulsive force R(e ij ,θ), the corresponding formula is:
[0132] H(i,j)=α·A(d ij )-β·max θ∈{上,下,左,右} R(e ij ,θ)
[0133] Based on the forward-looking detection and backtracking ideas, the forward-looking score is added and the heuristic function is expanded:
[0134] H′(i,j,k)=α·A(d ij )-β·max θ∈{上,下,左,右} R(e ij ,θ)-γ·L(j,k)
[0135] Among them, L(j,k) represents the forward-looking score from j to future target k, and γ is the influence weight coefficient of the forward-looking score in the total heuristic score:
[0136] L(j,k)=σ j (minD(j,k)+ε)
[0137]
[0138] Preferably, the potential field-ant colony algorithm of forward detection and backtracking search is used to optimize the part cutting sequence, which specifically includes the following steps:
[0139] Step 1: Initialize the potential field-ant colony algorithm parameters, such as the gravity weight coefficient, repulsion weight coefficient, repulsion influence factor, number of ants m, number of target parts n, maximum number of iterations, pheromone volatilization factor, pheromone importance factor, etc.;
[0140] Step 2: Convert the position of the part graphics and the layout diagram into two-dimensional coordinate information and store it in the potential field-ant colony algorithm path information matrix;
[0141] Step 3: Define the node data structure, set the root node to the current position i, create a node list, and the initial node list only contains the root node;
[0142] Step 4: Determine whether the node list is empty. If it is empty, execute Step 8; if it is not empty, calculate the repulsion around each node j in the node list and update the repulsion influence factor σ j , once σ j =0, remove node j from the list;
[0143] Step 5: Under the current node, calculate the shortest distance, forward-looking score, and total heuristic function of each possible target position k. Once the forward-looking score L(j,k)>0, add k as a new potential node to the node list, and update the cumulative path length and coordinate position of k.
[0144] Step 6: Determine whether all nodes have been removed. If so, backtrack to the nearest feasible node;
[0145] Step 7: Determine whether a satisfactory path is found. If so, determine the path, end the loop and output the final determined path. Otherwise, jump to Step 4.
[0146] In order to make the present invention clearer, the method of the present invention is described with a specific embodiment:
[0147] like Figure 3 As shown in the figure, the initial cutting path of the layout diagram instance obtained through step (3) is displayed, where the red line is the idle travel trajectory of the laser cutting head, and the distance of the initial path returning to the origin is 88.2119. Since the cutting method is whole-piece cutting, the idle travel section from part 3 to part 4 will pass through the cavity area of the already cut part 2, and such a path has a "frog leap" behavior; and after optimization analysis by this method, it is found that although the cutting path of part 3→4 will pass through the cavity of 2 and cause a collision, the path of 3→4 needs to be replanned, but due to the continuity of the cutting, the path of part 2→3 must also be replanned, so it is necessary to use forward detection and backtracking search. The final path optimization effect is shown in the figure below. Figure 4 As shown in the figure, part 3 and part 4 have a common point. Based on the intersection priority criterion in step (1), the intersection point is used as the common cutting point of the two parts. After the laser cutting head moves from the cutting point of part 2 to the common cutting point of part 3 and part 4, it moves to the cutting point of part 5 for cutting. It can be seen intuitively in the figure that the yellow moving path does not pass through the cut area. The return distance to the origin after anti-collision optimization is 88.5283. Although the path distance is 0.36% longer than the initial path, the path after anti-collision optimization does not pass through the cut part area, which can better ensure production efficiency.
[0148] It will be easily understood by those skilled in the art that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A collision-free laser cutting path optimization method based on potential field ant colony algorithm, characterized in that: The method comprises the following steps: Step 1, with the goal of minimizing the tool moving distance, an initial cutting sequence of the parts is formulated; the initial cutting sequence is obtained by solving the traveling salesman problem using an ant colony algorithm; Step 2: According to the anti-collision constraint, the potential field ant colony algorithm is used to optimize the cutting sequence to obtain the optimal path; wherein the potential field ant colony algorithm adds an attraction factor and a repulsion factor according to the artificial potential field method to improve the potential field ant colony algorithm heuristic function.
2. The anti-collision laser cutting path optimization method based on potential field ant colony algorithm according to claim 1, characterized in that: The rules for determining the initial cutting order include: intersection priority criterion, avoiding missing any parts during cutting, and using ant colony algorithm to solve the cutting order.
3. The anti-collision laser cutting path optimization method based on potential field ant colony algorithm according to claim 2, characterized in that: The intersection priority criterion is as follows: when part V1 and part V2 have point intersection or edge intersection, the common point or common edge is used as the cutting point of part V1 and part V2; When the edge of part V1 intersects with the vertex of part V2, the corresponding intersection point is taken as an alternative and added to the vertex set to be selected of part V1.
4. The anti-collision laser cutting path optimization method based on potential field ant colony algorithm according to claim 1, characterized in that: The determination of the initial cutting sequence specifically includes the following steps: Step 1: The problem is mathematically modeled as a GTSP problem. The objective function is to minimize the total cutting distance. The constraints are: each part is visited at least once; the out-degree and in-degree of each vertex of the part are equal and 1; and the sub-circular path is eliminated; Step 2: Initialize the ant colony algorithm parameters; Step 3: Convert the positions of the part graphics and the layout diagram into two-dimensional coordinate information and store them in the ant colony algorithm path information matrix, and determine the intersection of the parts as the cutting point of the part according to the intersection priority criterion; Step 4: Start iteration. m ants randomly select n parts according to the roulette algorithm, add them to the taboo table, and update the path distance matrix. Step 5: Starting from the first ant, calculate the transfer probability to select the next path part, add it to the taboo table and update the path distance until all m ants have completed this operation; Step 6: Save the shortest path distance and shortest path order in this iteration; Step 7: If the shortest path distance of this iteration is less than the global shortest path distance, use this result to replace the global shortest path distance and shortest path order; Step 8: Update the global pheromone and determine whether the maximum number of iterations has been reached. If not, return to Step 4; otherwise, go to Step 9; Step9: Output the global shortest path distance and shortest path order.
5. The anti-collision laser cutting path optimization method based on potential field ant colony algorithm according to any one of claims 1 to 4, characterized in that: During the optimization process, forward detection and backtracking search are used. The forward detection is to predict the subsequent path of the current target when planning the path; the backtracking search is that once a future path is predicted to pass through the cut cavity, it is necessary to return to the previous decision point for replanning.
6. The anti-collision laser cutting path optimization method based on potential field ant colony algorithm according to claim 5, characterized in that: The heuristic function of the potential field ant colony algorithm takes into account the gravitational force A(d ij ) and repulsive force R(e ij ,θ), the corresponding formula is: H(i,j)=α·A(d ij )-β·max θ∈{上,下,左,右} R(e ij ,i) Where α and β are weight coefficients, which are used to adjust the relative importance of attraction and repulsion in heuristic scoring; max θ∈{上,下,左,右} R(e ij ,θ) is the maximum repulsive force of the current position on the obstacle in four directions.
7. The anti-collision laser cutting path optimization method based on potential field ant colony algorithm according to claim 6, characterized in that: According to the forward detection and backtracking search, the forward score is added, and the heuristic function is expanded. The corresponding formula is: H′(i,j,k)=α·A(d ij )-β·max θ∈{上,下,左,右} R(e ij ,θ)-γ·L(j,k) Among them, L(j,k) represents the forward-looking score from j to the future target k, γ is the influence weight coefficient of the forward-looking score in the total heuristic score, among which, L(j,k)=σ j ·(minD(j,k)+ε) Where minD(j,k) is the shortest distance from j to k; ε is a non-zero number used to prevent the target points from being the same.
8. The anti-collision laser cutting path optimization method based on potential field ant colony algorithm according to claim 7, characterized in that: The potential field ant colony algorithm based on forward detection and backtracking search is used to optimize the part cutting sequence, which specifically includes the following steps: Step 1: Initialize the potential field ant colony algorithm parameters; Step 2: Convert the position of the part graphics and the layout diagram into two-dimensional coordinate information and store it in the potential field-ant colony algorithm path information matrix; Step 3: Define the node data structure, set the root node to the current position i, create a node list, and the initial node list only contains the root node; Step 4: Determine whether the node list is empty. If it is empty, execute Step 8; If it is not empty, calculate the repulsion around each node j in the node list and update the repulsion influence factor σ j , once σ j =0, remove node j from the list; Step 5: Under the current node, calculate the shortest distance, forward-looking score, and total heuristic function of each possible target position k. Once the forward-looking score L(j,k)>0, add k as a new potential node to the node list, and update the cumulative path length and coordinate position of k. Step 6: Determine whether all nodes have been removed. If so, backtrack to the nearest feasible node; otherwise, go to Step 7; Step 7: Determine whether a satisfactory path is found. If so, determine the path, end the loop and output the final determined path. Otherwise, jump to Step 4. 9.An anti-collision laser cutting path optimization system based on potential field ant colony algorithm, characterized by: The system includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the anti-collision laser cutting path optimization method based on the potential field ant colony algorithm according to any one of claims 1 to 8 is executed.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions. When the machine-executable instructions are called and executed by the processor, the machine-executable instructions prompt the processor to implement the anti-collision laser cutting path optimization method based on the potential field ant colony algorithm as described in any one of claims 1-8.
Citation Information
Patent Citations
Laser processing method
CN101077549A
Mobile robot traveling salesman optimization method based on improved ant colony algorithm
CN105717926A
Multi-UAV route planning and dynamic obstacle avoiding method based on combination of Voronoi ant colony algorithm with artificial potential field method
CN109521794A
Route planning method based on potential field ant colony algorithm
CN110220525A
Welding method based on reinforcement learning and ant colony algorithms
CN110315258A
Cited By
Laser cutting machine track searching path planning optimization method and system
CN120065917A
Two-dimensional layout and cutting path combination method and system based on digital twinning
CN120974736A
Laser cleaning path planning method and system and electronic equipment
CN121437463A
Part cutting path planning method considering crushed aggregate line selection and priority constraint
CN121870537A
A part cutting path planning method considering scrap line selection and priority constraints
CN121870537B
