A wire winding cutting combined cutting method and system based on ant colony hybrid path optimization
By classifying the workpiece set by risk and optimizing the path finding, and by adopting a line-wrap cutting method that combines ant colony hybrid path optimization, the problems of low cutting quality and workpiece slippage in woodworking were solved, achieving more efficient cutting quality and efficiency.
Patent Information
- Application Number
- CN202511260078.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-04
- Publication Date
- 2026-05-12
- Estimated Expiration
- 2045-09-04
AI Technical Summary
Existing technologies result in low cutting quality and a tendency for workpieces to slip during woodworking, especially in complex layout tasks, which affects production efficiency and increases material production costs.
A wire-wound cutting method based on ant colony hybrid path optimization is adopted. By dividing the set of workpieces to be processed into a safe workpiece set and an unsafe workpiece set, and using different cutting methods to obtain the endpoint set, the processing path is optimized by using the Floyd algorithm and the ant colony algorithm to avoid workpiece slippage.
It improves cutting quality, avoids workpiece slippage, is suitable for industrial applications, and enhances cutting efficiency and quality.
Smart Images

Figure CN121119330B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data processing technology. More specifically, this invention relates to a line-by-line cutting method and system based on ant colony hybrid path optimization. Background Technology
[0002] Woodworking involves cutting large pieces of wood (such as plywood, MDF, and solid wood boards) into parts of specific sizes or shapes, and is widely used in furniture manufacturing, building decoration, and formwork processing.
[0003] In furniture manufacturing, the cutting process is a key step affecting production efficiency, finished product quality, and cost. There are two traditional cutting methods: one is the wrap-around cutting method, where each edge of the current workpiece is cut before moving on to the next. This method suffers from low path planning efficiency, frequent tool lifting and lowering movements, and tool idling (moving from one cutting point to the next). The other is the line cutting method, which cuts along a single direction; for example, after cutting the current edge, the next edge in the same direction is cut. While this method is more efficient than the wrap-around method because common edges of different workpieces are only cut once, it is prone to slippage during the cutting process in complex layout tasks, leading to workpiece damage and significantly impacting equipment production efficiency and increasing material production costs.
[0004] Existing technologies focus more on path optimization during cutting (such as using graph theory-based path optimization, genetic algorithm or ant colony algorithm-based path optimization, machine learning-based path optimization, etc.), but do not consider how to take into account the cutting quality of the workpiece under different cutting methods during subsequent cutting before path optimization.
[0005] Therefore, it is particularly important to avoid workpiece slippage in order to improve cutting quality. Summary of the Invention
[0006] The purpose of this invention is to propose a wire-wound cutting method and system based on ant colony hybrid path optimization, in order to solve the problem of low cutting quality in the material cutting process of the prior art; to this end, this invention provides solutions in the following two aspects.
[0007] In a first aspect, the present invention provides a line-by-line cutting method based on ant colony hybrid path optimization, comprising:
[0008] Obtain the set of workpieces to be processed;
[0009] The workpiece set is divided into a non-safe workpiece set and a safe workpiece set;
[0010] The non-safe workpiece set and the safe workpiece set are split and merged respectively to obtain a safe dataset and a non-safe dataset, both of which include edges of workpieces;
[0011] Edges in the insecure dataset that conform to the preset merging rules are merged into the secure dataset to obtain the processing path dataset;
[0012] An insecure flag is set for the edges in the insecure dataset that have not been merged, thus obtaining a production taboo table;
[0013] Based on the processing path dataset and the production taboo table, the ant colony hybrid algorithm is used for optimization to output the optimal processing path.
[0014] The above scheme divides the set of workpieces to be processed into two sets with different risk levels, and obtains the endpoint sets of the two sets through different cutting methods. Then, by using the Floyd algorithm and the ant colony algorithm, the optimal processing path can be accurately obtained, while also improving the cutting quality and avoiding the problem of workpieces running off the board.
[0015] Optionally, the merging rules include at least:
[0016] Rule 1: If at most one target edge on the same non-safe workpiece completely or partially overlaps with an edge in the safe dataset, and the segmentation value of the non-safe workpiece containing the target edge is greater than or equal to the second threshold, then the edges are merged.
[0017] Rule 2: If multiple target edges of the same non-safe workpiece completely overlap with or partially overlap with edges in the safe dataset, then the edges that completely overlap will be merged first.
[0018] Rule 3: If at least two target edges on the same non-safe workpiece completely or partially overlap with edges in the safe dataset, the longest target edge is merged into the safe dataset; if multiple overlapping target edges are equal, the Euclidean distance between the non-safe workpiece and the features of multiple safe workpieces with overlapping edges is calculated, and the common edge between the safe workpiece and the non-safe workpiece with the largest Euclidean distance is merged; the features include the area ratio, length-to-width ratio, and layout distribution ratio of each workpiece.
[0019] The above merging rules can merge the edges of unsafe workpieces in the unsafe dataset into the safe dataset, providing data support for the cutting efficiency and quality of subsequent workpieces.
[0020] Optionally, dividing the workpiece set into a non-safe workpiece set and a safe workpiece set includes: obtaining the segmentation value of a single workpiece; classifying workpieces with segmentation values greater than or equal to a threshold as safe workpieces, and vice versa as non-safe workpieces, to obtain a non-safe workpiece set and a safe workpiece set; the segmentation value is obtained by fusing area ratio, length-width ratio, and layout distribution ratio using different weights, and normalizing the fused value by standard deviation.
[0021] The area ratio is the ratio of the area of the workpiece to the total area of the layout area;
[0022] The layout distribution ratio is the normalized value of the reciprocal of the distance between the center point of each workpiece and the center point of the layout area.
[0023] By using the static characteristics of the workpieces, effective classification is achieved by categorizing the workpieces.
[0024] Optionally, dividing the workpiece set into a non-safe workpiece set and a safe workpiece set includes:
[0025] Obtain the dimensions, area, and material hardness of each workpiece in the workpiece set;
[0026] Input the dimensions, area, and material hardness of each workpiece into the network model to obtain the safety probability of each workpiece;
[0027] Workpieces with a safety probability greater than or equal to a threshold are classified as safe workpieces, and workpieces with a safety probability less than a threshold are classified as unsafe workpieces, thus obtaining a set of safe workpieces and a set of unsafe workpieces.
[0028] By identifying the safety probability of a workpiece based on its shape, size, and hardness, the risk classification of the workpiece can be accurately performed.
[0029] Optionally, it also includes: processing the non-safe workpiece set using a bypass cutting method to obtain a discretized non-safe data set; and processing the safe workpiece set using a wire cutting method to obtain a discretized safe data set.
[0030] Optionally, the production taboo list includes:
[0031] Construct a taboo list matrix T for each non-safe workpiece, and initialize it as an all-zero matrix;
[0032] Based on geometric constraints and processing rule constraints, the taboo relationships of each endpoint in the unsafe dataset are determined, and the taboo table is updated according to the following rules: ; where 1 is a non-security identifier, and These are the endpoints on the edges of the non-safe data set; the geometric constraint is that if the path from endpoint i to endpoint j intersects with the workpiece boundary, the path is restricted; the processing rule constraint is that if processing is not performed in the processing order, the path is restricted.
[0033] The matrix of prohibitions for all non-safe workpieces constitutes the production prohibition list.
[0034] Optionally, the ant colony hybrid algorithm is an ant colony algorithm based on the Floyd algorithm.
[0035] Optionally, the process of obtaining the optimal processing path includes:
[0036] Initialization parameters: maximum number of iterations, pheromone heuristic factor, expected heuristic factor, and pheromone evaporation factor;
[0037] Encode each endpoint in the processing path dataset and randomly generate m ant individuals as the initial population;
[0038] The Floyd algorithm is used to check whether the shortest path is reached between currently adjacent codes and / or to check whether there are paths that are not allowed in the production taboo table.
[0039] Calculate the pheromone linked list on the path number of each group of ants, and select the next coding point according to the random probability of the roulette wheel until all coding selections are completed, and calculate the objective function value of each path;
[0040] Update the pheromone list on the paths between points in the current iteration;
[0041] Iterate multiple times until the stopping condition is met, and then output the optimal processing path.
[0042] The objective function value is the sum of the tool movement length and the cutting path length; the tool movement length is the path length from one cutting point to the next cutting point.
[0043] By combining the Floyd algorithm with the ant colony algorithm, the optimal processing path can be obtained more efficiently.
[0044] Optionally, the process of using the Floyd algorithm to check whether the current adjacent codes have reached the shortest distance is as follows:
[0045] Get the distance Dis(i,j) between the current adjacent codes;
[0046] If Dis(i,h)+Dis(h,j)<Dis(i,j), then the updated shortest distance is: Dis(i,j)=Dis(i,h)+Dis(h,j); Dis(i,h) is the distance from endpoint i to endpoint h, Dis(h,j) is the distance from endpoint h to endpoint j, and Dis(i,j) is the distance from endpoint i to endpoint j.
[0047] In the second aspect, a wire-wrap-cutting combined cutting system based on ant colony hybrid path optimization includes:
[0048] processor;
[0049] The memory stores computer instructions for a wire-wrap-cutting method based on ant colony hybrid path optimization. When the computer instructions are executed by the processor, the system performs the aforementioned wire-wrap-cutting method based on ant colony hybrid path optimization.
[0050] The beneficial effects of this invention are as follows:
[0051] The solution of this invention first divides the workpiece set to be processed into a risk classification to obtain a safe workpiece set and an unsafe workpiece set, and then uses different cutting methods to obtain the endpoint sets of the corresponding two workpiece sets. This can obtain the optimal processing path for different workpieces under different cutting methods and endpoint combinations. Compared with using a single cutting method, it is more suitable for industrial scenarios and further solves the problem of low cutting quality caused by board slippage when cutting workpieces in the prior art. Attached Figure Description
[0052] Figure 1 This schematically illustrates a flowchart of a wire-wrap-cutting method based on ant colony hybrid path optimization in this embodiment.
[0053] Figure 2 A simplified schematic diagram illustrating any two workpieces having a common edge is shown.
[0054] Figure 3 A schematic diagram of any workpiece is shown;
[0055] Figure 4 The schematic diagram illustrates the structural block diagram of a wire-wound cutting system based on ant colony hybrid path optimization in this embodiment. Detailed Implementation
[0056] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention.
[0057] like Figure 1 As shown, the line-by-line cutting method based on ant colony hybrid path optimization in this embodiment includes the following steps:
[0058] Step S1: Obtain the set of workpieces to be processed.
[0059] In this embodiment, the set of workpieces to be processed includes multiple workpieces and their respective size information, center point coordinates, and material hardness.
[0060] For example, taking a board as an example, the layout on the board has been completed, that is, the board has been divided into several workpieces to be cut (i.e., workpieces to be processed). The shape of the workpieces to be processed is generally rectangular and / or oriented in a positive direction. The planar part of the board is also called the layout area.
[0061] The center point coordinates of each workpiece are the coordinate positions of that workpiece in the layout area.
[0062] Step S2: Divide the workpiece set into a safe workpiece set and a non-safe workpiece set.
[0063] When dividing the workpiece set, it is based on the possibility of movement or vibration during the cutting process. That is, the workpiece set can be divided into two categories based on the above possibilities: a safe workpiece set and an unsafe workpiece set (which is prone to safety issues such as movement or vibration during subsequent cutting).
[0064] Specifically, the workpiece set is divided into a non-safe workpiece set and a safe workpiece set, including:
[0065] Obtain the segmentation value of a single workpiece data; this segmentation value characterizes the probability of movement or vibration during the cutting of the workpiece.
[0066] Workpiece data with a segmentation value greater than or equal to a threshold are classified as safe workpiece datasets, and those with a segmentation value less than or equal to a threshold are classified as unsafe workpiece datasets. The segmentation value is obtained by fusing the area ratio, length-to-width ratio, and area ratio of a single workpiece in the XY direction.
[0067] In one embodiment, the segmentation value is obtained by merging the area ratio, length-width ratio, and layout distribution ratio using different weights, and then normalizing the merged value by standard deviation.
[0068] Among them, the area ratio is the ratio of the area of the workpiece to the total area of the layout area; the layout distribution ratio is the normalized value of the reciprocal of the distance between the center point of each workpiece and the center point of the layout area.
[0069] The mean and standard deviation used in the above standard deviation normalization are the mean and standard deviation of the fused values of all workpieces, respectively.
[0070] Specifically, the weights of the area ratio, length-to-width ratio, and layout distribution ratio are 0.5, 0.3, and 0.2, respectively.
[0071] It should be noted that the larger the area of the workpiece, the less likely it is to move during cutting (due to its greater weight, it is less likely to slip off the cutting board), thus making subsequent cutting safer. Similarly, the larger the aspect ratio of the workpiece (an aspect ratio greater than 1 indicates a greater difference between the workpiece's length and width, suggesting it may be a long, narrow strip), the less likely it is to vibrate or move during cutting, thus making subsequent cutting safer. Furthermore, the larger the proportion of the layout distribution, the closer the workpiece is to the center of the layout area, making it less likely for it to slip off the cutting board (workpieces at the edges are more prone to slipping).
[0072] Therefore, by comprehensively considering the area ratio, aspect ratio, and layout distribution ratio, the segmentation value is determined, thereby accurately distinguishing between safe and non-safe workpieces.
[0073] In another embodiment, the segmentation value can also be a safety probability.
[0074] The safety probability is:
[0075] Obtain the dimensions, area, and material hardness of each workpiece in the workpiece set;
[0076] Input the dimensions, area, and material hardness of each workpiece into the network model to obtain the safety probability of each workpiece;
[0077] Workpieces with a safety probability greater than or equal to a threshold are classified as safe workpieces, and workpieces with a safety probability less than a threshold are classified as unsafe workpieces, thus obtaining a set of safe workpieces and a set of unsafe workpieces.
[0078] The network model is the FCN model.
[0079] Specifically, the risk level of the historical artifact set is labeled, and the network model is trained using the labeled historical artifact set to obtain the trained network model.
[0080] The loss function is the mean squared error loss. Since the training process is based on existing technology, it will not be elaborated upon further here.
[0081] The threshold value set above is 0.6, but it can be determined according to the actual situation.
[0082] Furthermore, after obtaining the non-safe workpiece set and the safe workpiece set, the non-safe workpiece set is processed by a bypass cutting method, and the safe workpiece set is processed by a wire cutting method. This can improve cutting efficiency and avoid the situation where the non-safe workpiece is cut off prematurely during the cutting process, thus improving the cutting quality of the workpiece.
[0083] Contour cutting typically involves machining along the workpiece boundary. Assuming that the boundary of each non-safe workpiece can be approximated as a polyline, contour cutting is performed sequentially along the polyline. Linear cutting, on the other hand, is usually a straight path, i.e., a straight path connecting the start and end points of the workpiece.
[0084] Step S3: Split and merge the non-safe workpiece set and the safe workpiece set respectively to obtain the safe dataset and the non-safe dataset.
[0085] Specifically, splitting and merging the set of unsafe workpieces yields an unsafe dataset; splitting and merging the set of safe workpieces yields a safe dataset. Splitting refers to dividing multiple edges of each workpiece into multiple line segments. Merging involves combining line segments that completely or partially overlap between different workpieces in either the unsafe or safe workpiece set.
[0086] Both the secure dataset and the non-secure dataset include each edge of the corresponding workpiece.
[0087] For merging security artifact sets:
[0088] If two workpieces share a common edge (completely overlapping), then that common edge is merged (whether they overlap can be determined by the coordinates of the edge); if two workpieces share a partial common edge, such as each workpiece having two edges, ACB and CBD, i.e., two line segments, then... Figure 2 As shown, the overlapping part CB of these two sides, then the common side obtained by merging is AD (the length of the common side is the sum of the lengths of the two sides minus the length of the overlapping part).
[0089] In a secure dataset, the information of edge AD can be represented by the coordinates of its two endpoints, such as (A, D), where A is the coordinate of the first endpoint of the edge and D is the coordinate of the second endpoint of the edge.
[0090] For merging non-safety workpiece sets:
[0091] 1. If two workpieces have two sides that partially overlap, that is, if two workpieces have two sides that share a common edge, the two sides can be segmented. For example, if two workpieces have two sides ACB and CBD respectively, and the two sides have an overlapping part CB, then they can be merged into two sides AB and BD.
[0092] At this point, the information for edge AB in the insecure dataset can be represented as: (1_id, 2_id, A, B), where 1_id is the first workpiece number to which the edge belongs, 2_id is the first workpiece number to which the edge belongs, A is the coordinate of the first endpoint of the edge, and B is the coordinate of the second endpoint of the edge; the information for edge BD can be represented as: (2_id, 0, B, D), where 2_id is the second workpiece number to which the edge belongs, B is the coordinate of the first endpoint of the edge, and D is the coordinate of the second endpoint of the edge. Here, id represents the workpiece number.
[0093] It should be noted that when edge BD does not overlap with other edges, one of its indices is set to 0, such as (2_id,0,B,D).
[0094] The above merging is implemented within either the non-safety artifact set or the safeness artifact set to reduce data redundancy.
[0095] Step S4: Merge the target edges in the insecure dataset that meet the preset merging rules into the secure dataset to obtain the processing path dataset; set insecure flags for the edges in the insecure dataset that have not been merged to obtain the production taboo table.
[0096] The processing path dataset includes multiple edges, as well as the endpoints of each edge and their coordinates.
[0097] The preset merging rules satisfy at least one of the following rules:
[0098] Rule 1 includes:
[0099] If at most one target edge on the same non-safe workpiece completely or partially overlaps with an edge in the safe dataset, and the segmentation value of the non-safe workpiece containing the target edge is greater than or equal to the second threshold, then merging is performed.
[0100] The second threshold is less than the first threshold, and its value can be 0.2. Of course, it can also be confirmed based on the actual situation. The above overlap includes complete overlap and partial overlap.
[0101] Rule 2: If multiple target edges of the same non-safe workpiece completely overlap with or partially overlap with edges in the safe dataset, then the edges that completely overlap will be merged first.
[0102] Rule 3: If at least two target edges on the same non-safe workpiece completely or partially overlap with the edges in the safe dataset, then the longest target edge is merged into the safe dataset; if multiple overlapping target edges are all equal, then the Euclidean distance between the non-safe workpiece and the features of multiple safe workpieces with overlapping edges is calculated, and the common edges of the safe workpiece and the non-safe workpiece with the largest Euclidean distance are merged.
[0103] The merging process for completely overlapping edges actually involves removing the longest target edge from the unsafe dataset. This is because the common edge already exists in the safe dataset, and merging saves path space for subsequent tool cuts.
[0104] For merging when there is partial overlap, if the edge on the non-safe workpiece has the longest edge while the edge in the safe data set is shorter, then the longest edge is used to replace the short edge in the safe data set. This can save the number of times the tool needs to be raised during subsequent cutting, thus saving the tool movement path.
[0105] The above-mentioned Euclidean distance is calculated separately for the features of a non-safe workpiece and multiple safe workpieces with overlapping edges; the features include area ratio, length-to-width ratio, and layout distribution ratio.
[0106] The purpose of using Euclidean distance for merging is to merge the edges of non-safe workpieces with those of safe workpieces that differ significantly from each other, thereby maximizing the safety of the target edge during cutting.
[0107] The aforementioned merging rules combine some edges from the unsafe dataset into the safe dataset, which not only improves the machining efficiency of the cutting tool but also prevents the edges of unsafe workpieces with low safety from being split (for example, originally the first, second, and third edges of an unsafe workpiece were to be cut sequentially, but during merging, the third edge was merged into the first discretized dataset, resulting in the splitting of the edges of the unsafe workpiece with low safety). This avoids the problem of premature edge cutting and plate slippage during subsequent cutting, thereby improving the subsequent cutting quality. At the same time, it also provides data support for the optimization of subsequent cutting paths.
[0108] The production taboo table is used to record the processing restrictions of the remaining edges of all non-safe workpieces in the non-safe dataset, such as processing sequence constraints and geometric constraints of certain edges.
[0109] Specifically, the process of obtaining the production taboo list is as follows:
[0110] First, construct a taboo list matrix T for each unsafe workpiece, initialized as an all-zero matrix. The rows and columns of the matrix are each composed of the endpoints of the corresponding unsafe workpiece.
[0111] Secondly, based on geometric constraints and processing rule constraints, the taboo relationships of each endpoint in the unsafe dataset are determined, and the production taboo table is updated according to the following rules: ; where 1 is a non-security identifier, and These represent the endpoints of the edges in the non-safe dataset. The geometric constraint is that if the path from endpoint i to endpoint j intersects with the workpiece boundary, the path is restricted. The processing rule constraint is that if processing is not performed in the correct order, the path is restricted. Specifically, the processing order constraint restricts the path if processing is not performed in the correct order. For example, if a workpiece in the non-safe dataset has 3 remaining edges (the workpiece may have originally had 4 edges, one of which has been merged into the safe dataset), theoretically, these 4 edges need to be cut consecutively when using the bypass cutting method. In this case, the processing order of the remaining 3 edges can only be one of two possibilities (clockwise or counterclockwise). The taboo table then constrains the cutting order of this workpiece.
[0112] For example, such as Figure 3 As shown, a non-safe workpiece (serial number 001) has three edges, namely ab, bc and cd, with endpoints a, b, c and d respectively. In the production taboo table, the markers for endpoints a to d, b to d and a to c are all 1, and the others are 0. The path from endpoint a to b can be marked as 0 because after cutting edge ab, the next edge to be cut must be endpoint c; and after cutting bc, the next edge to be cut must include endpoint d or a.
[0113] Then, the prohibition list matrix of all non-safe workpieces constitutes the production prohibition list.
[0114] Step S5: Combine the Floyd algorithm and the ant colony algorithm to find the optimal path in the processing path dataset and obtain the optimal processing path.
[0115] The process of obtaining the optimal processing path is as follows:
[0116] Step S51, initialize parameters: number of ants m, maximum number of iterations, pheromone heuristic factor, expected heuristic factor, and pheromone evaporation factor.
[0117] Specifically, the Jinhua iteration counter g=0 is set, and the maximum number of iterations GN is set.
[0118] Step S52: Encode each endpoint in the processing path dataset and randomly generate m ant individuals as the initial population.
[0119] Step S53: Use the Floyd algorithm to check whether the shortest path has been reached between the current adjacent codes and / or check whether there are any paths that are not allowed in the production taboo table.
[0120] The process of calculating the shortest distance matrix using the Floyd algorithm is as follows:
[0121] Initialize the distance matrix;
[0122] Record the shortest distance information between known endpoints and update the distance matrix;
[0123] Determine and update the distance matrix. If the distance matrix Dis(i,h)+Dis(h,j)<Dis(i,j), then update the shortest distance matrix Dis(i,j)=Dis(i,h)+Dis(h,j); Dis(i,h) is the distance from endpoint i to endpoint h, Dis(h,j) is the distance from endpoint h to endpoint j, and Dis(i,j) is the distance from endpoint i to endpoint j.
[0124] Traverse all endpoints to obtain the shortest distance matrix.
[0125] Step S54: Calculate the pheromone linked list on the path number of each group of ants, and select the next traversal point using the roulette wheel method according to the transition probability, until all traversal points have been selected, and calculate the objective function value of each path.
[0126] The objective function value is the sum of the tool movement length and the cutting path length; where the tool movement length is the path length of the tool from one cutting point to the next cutting point, but there is no material to be cut between these two points.
[0127] The calculation of the transition probability is as follows:
[0128] Each ant starts from the starting point and chooses the next endpoint based on pheromones and distance, with a transition probability. The formula is: ;
[0129] in, β and β control the influence factors of pheromones and distance, respectively. For endpoints not in the production taboo list, , Let be the shortest distances from endpoint i to endpoint j and from endpoint i to endpoint k, respectively. , These are the paths in the pheromone matrix. ,path The concentration of pheromones.
[0130] Step S55: Update the pheromone linked list on the path between each point in the current iteration.
[0131] The pheromone concentration in the pheromone chain is updated as follows:
[0132] ;
[0133] ;
[0134] ;in, The time point before the start of the next iteration The pheromone concentration is updated between Dis(i,j) encodings. The time point after the current iteration ends. The pheromone concentration that needs to be updated between Dis(i,j) encodings This represents the pheromone increment on the edge (i,j) in the current iteration. Let m be the amount of pheromone left by the k-th ant on edge (i,j) in the current iteration, m be the number of ants, c be the pheromone evaporation (or volatilization) coefficient, and Q be a positive constant. Let be the path length of the k-th ant in the current iteration.
[0135] Step S56: Repeat steps S54-S55, iterating multiple times until the stopping condition is met, and output the optimal processing path.
[0136] The stopping condition is reaching the maximum number of iterations or reaching the convergence threshold of the objective function value. That is, when the difference between the optimal objective function value of the current iteration and the optimal objective function value of the previous iteration is less than the convergence threshold, the algorithm stops and outputs the optimal processing path.
[0137] The solution of this invention divides the workpiece set and processes the divided workpieces separately using bypass cutting and line cutting methods. It can obtain the endpoint set of the workpiece edge under the two different cutting methods, and split and merge the edges of different workpieces, providing more suitable data for subsequent path optimization and avoiding the problem of workpiece slippage during subsequent cutting.
[0138] This invention also provides a wire-wrap cutting system based on ant colony hybrid path optimization. For example... Figure 4 As shown, the cutting system includes a processor and a memory. The memory stores computer program instructions. When the computer program instructions are executed by the processor, a wire-wrap cutting method based on ant colony hybrid path optimization according to the present invention is implemented.
[0139] The cutting system also includes other components well known to those skilled in the art, such as communication buses and communication interfaces. Their settings and functions are known in the art and will not be described in detail here.
[0140] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic or magneto-optical storage medium, such as Resistive Random Access Memory (RRAM), Dynamic Random Access Memory (DRAM), Static Random Access Memory (SRAM), Enhanced Dynamic Random Access Memory (EDRAM), High-Bandwidth Memory (HBM), Hybrid Memory Cube (HMC), etc., or any other medium that can be used to store desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device. Any application or module described in this invention can be implemented by computer-readable / executable instructions stored or otherwise maintained on such a computer-readable medium.
[0141] In the description of this specification, "multiple" means at least two, such as two, three or more, etc., unless otherwise expressly and specifically defined.
[0142] While various embodiments of the invention have been shown and described in this specification, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention.
Claims
1. A line-by-line cutting method based on ant colony hybrid path optimization, characterized in that, include: Obtain the set of workpieces to be processed; The workpiece set is divided into a non-safe workpiece set and a safe workpiece set; The non-safe workpiece set and the safe workpiece set are split and merged respectively to obtain a safe dataset and a non-safe dataset, both of which include edges of workpieces; Edges in the insecure dataset that conform to the preset merging rules are merged into the secure dataset to obtain the processing path dataset; An insecure flag is set for the edges in the insecure dataset that have not been merged, thus obtaining a production taboo table; Based on the processing path dataset and the production taboo table, the ant colony hybrid algorithm is used for optimization to output the optimal processing path; The ant colony hybrid algorithm is an ant colony algorithm based on the Floyd algorithm; The process of obtaining the optimal processing path includes: Initialization parameters: maximum number of iterations, pheromone heuristic factor, expected heuristic factor, and pheromone evaporation factor; Encode each endpoint in the processing path dataset and randomly generate m ant individuals as the initial population; The Floyd algorithm is used to check whether the shortest path is reached between currently adjacent codes and / or to check whether there are paths that are not allowed in the production taboo table. Calculate the pheromone linked list on the path number of each group of ants, and select the next coding point according to the random probability of the roulette wheel until all coding selections are completed, and calculate the objective function value of each path; Update the pheromone list on the paths between points in the current iteration; Iterate multiple times until the stopping condition is met, and then output the optimal processing path. The objective function value is the sum of the tool movement length and the cutting path length; the tool movement length is the path length from one cutting point to the next cutting point.
2. The line-by-line cutting method based on ant colony hybrid path optimization according to claim 1, characterized in that, The merging rules include at least the following: Rule 1: If at most one target edge on the same non-safe workpiece completely or partially overlaps with an edge in the safe dataset, and the segmentation value of the non-safe workpiece containing the target edge is greater than or equal to the second threshold, then the edges are merged. Rule 2: If multiple target edges of the same non-safe workpiece completely overlap with or partially overlap with edges in the safe dataset, then the edges that completely overlap will be merged first. Rule 3: If at least two target edges on the same non-safe workpiece completely or partially overlap with edges in the safe dataset, the longest target edge is merged into the safe dataset; if multiple overlapping target edges are equal, the Euclidean distance between the non-safe workpiece and the features of multiple safe workpieces with overlapping edges is calculated, and the common edge between the safe workpiece and the non-safe workpiece with the largest Euclidean distance is merged; the features include the workpiece's area ratio, length-to-width ratio, and layout distribution ratio.
3. The line-by-line cutting method based on ant colony hybrid path optimization according to claim 2, characterized in that, The process of dividing the workpiece set into a non-safe workpiece set and a safe workpiece set includes: obtaining the segmentation value of a single workpiece; classifying workpieces with segmentation values greater than or equal to a threshold as safe workpieces, and vice versa as non-safe workpieces, to obtain a non-safe workpiece set and a safe workpiece set; the segmentation value is obtained by fusing area ratio, length-width ratio, and layout distribution ratio using different weights, and normalizing the fused value by standard deviation. The area ratio is the ratio of the area of the workpiece to the total area of the layout area; The layout distribution ratio is the normalized value of the reciprocal of the distance between the center point of each workpiece and the center point of the layout area.
4. The line-by-line cutting method based on ant colony hybrid path optimization according to claim 1, characterized in that, Also includes: The non-safe workpiece set is processed by a bypass cutting method to obtain a discretized non-safe workpiece dataset; the safe workpiece set is processed by a wire cutting method to obtain a discretized safe workpiece dataset.
5. The line-by-line cutting method based on ant colony hybrid path optimization according to claim 1, characterized in that, The production prohibition list includes: Construct a taboo list matrix T for each non-safe workpiece, and initialize it as an all-zero matrix; Based on geometric constraints and processing rule constraints, the taboo relationships of each endpoint in the unsafe dataset are determined, and the taboo table is updated according to the following rules: ; where 1 is a non-security identifier, and These are the endpoints on the edges of the non-safe data set; the geometric constraint is that if the path from endpoint i to endpoint j intersects with the workpiece boundary, the path is restricted; the processing rule constraint is that if processing is not performed in the processing order, the path is restricted. The matrix of prohibitions for all non-safe workpieces constitutes the production prohibition list.
6. The line-by-line cutting method based on ant colony hybrid path optimization according to claim 1, characterized in that, The process of using the Floyd algorithm to check whether the shortest distance has been reached between the current adjacent codes is as follows: Get the distance Dis(i,j) between the current adjacent codes; If Dis(i,h)+Dis(h,j)<Dis(i,j), then the updated shortest distance is: Dis(i,j)=Dis(i,h)+Dis(h,j); Dis(i,h) is the distance from endpoint i to endpoint h, Dis(h,j) is the distance from endpoint h to endpoint j, and Dis(i,j) is the distance from endpoint i to endpoint j.
7. A wire-wrap cutting system based on ant colony hybrid path optimization, characterized in that, include: processor; A memory storing computer instructions for wire-wrap-cutting combined with ant colony hybrid path optimization, wherein when the computer instructions are executed by the processor, the system performs a wire-wrap-cutting combined with ant colony hybrid path optimization method according to any one of claims 1-6.