Cutting bed path optimization method based on global clustering window division

By using a global clustering window partitioning and optimizing the cutting sequence, the problems of cross-zone jumping and small piece offset in CNC cutting bed path planning were solved, achieving efficient and accurate cutting piece processing.

CN121936684APending Publication Date: 2026-04-28ZHEJIANG UNIV OF TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG UNIV OF TECH
Filing Date
2026-01-08
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing CNC cutting machine path planning does not consider a unidirectional feeding mechanism, which may cause the path to jump across areas or reverse back cut, resulting in empty strokes and conflict with the feeding direction. In addition, traditional methods ignore the differences in the area of ​​the cut pieces, causing small pieces to shift and affecting the processing accuracy.

Method used

A global clustering window partitioning method is adopted. The initial path is generated by filtering small pieces and the nearest neighbor greedy algorithm. The path segments are divided by jump detection. The cutting order is optimized by combining the K-means algorithm and the variable neighborhood search algorithm to meet the unidirectional feeding constraint, reduce empty strokes and improve cutting accuracy.

Benefits of technology

It improves the efficiency and accuracy of piece processing, reduces the risk of small piece deviation, ensures continuous path and conforms to the feeding direction, reduces idle stroke, and improves operating efficiency and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121936684A_ABST
    Figure CN121936684A_ABST
Patent Text Reader

Abstract

The invention discloses a cutting bed path optimization method based on global clustering window division, and belongs to the technical field of cutting bed path optimization, and the method comprises the steps: calculating the barycentric coordinate and area of each cutting piece according to the coordinate point set of each cutting piece in a to-be-cut order, and the average value of the areas of all cutting pieces; small pieces are screened out, and an initial global path is generated by adopting a nearest neighbor greedy algorithm; calculating a distance sequence according to the initial global path; performing jump detection on the distance sequence to obtain all path jump points, and dividing the initial global path into a plurality of path sub-segments; based on all the path sub-segments, dividing all the cutting pieces by adopting a global clustering window; establishing a target function of each clustering clipping block, and solving by adopting a variable neighborhood search algorithm to obtain an optimal cutting sequence of the corresponding clustering clipping blocks; and splicing the optimal cutting sequence of all the clustering cutting blocks to construct an optimal global path as a cutting bed path optimization result. The method is beneficial for improving the processing efficiency and the processing precision of the cut-parts.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of cutting bed path optimization technology, specifically relating to a cutting bed path optimization method based on global clustering window partitioning. Background Technology

[0002] In traditional CNC cutting machine path planning, to simplify the complex cutting path problem, the center of the cut piece is usually considered as the city, and the entire cutting path is simplified into a Traveling Salesman Problem (TSP) model. This type of problem is a typical NP-hard problem, and finding its global optimum is computationally extremely complex, especially when the number of cut pieces is large, the computation time increases exponentially. Academia and industry generally use heuristic or metaheuristic algorithms, such as genetic algorithms and ant colony algorithms, to approximate the cutting path. Although the above algorithms have achieved certain results in theoretical research and some industrial applications, the following key problems still remain unsolved in actual cutting production:

[0003] 1) The existing TSP model does not take into account the unidirectional (only along the X-axis) feeding mechanism commonly used in CNC cutting machines. The generated path may jump across areas or reverse back cut, resulting in a large amount of empty stroke and conflict with the feeding direction, causing feeding waiting, backing, or even fabric stretching risks.

[0004] 2) Traditional cutting bed path planning treats all cut pieces equally: it only aims for the shortest total path and ignores the physical characteristics of the cut pieces, such as their area. In mixed-layout situations, small pieces may be cut after large pieces; due to their small area and light weight, they are easily affected by fabric tension, airflow, and feeding disturbances, which can cause miscuts and affect processing accuracy. Summary of the Invention

[0005] The purpose of this invention is to address the above-mentioned problems by proposing a cutting bed path optimization method based on global clustering window partitioning, which helps to improve the processing efficiency and accuracy of cutting pieces.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] The present invention proposes a cutting bed path optimization method based on global clustering window partitioning, comprising the following steps:

[0008] S1. Based on the coordinate point set of each piece in the order to be cut, calculate the centroid coordinates and area of ​​each piece, as well as the average area of ​​all pieces.

[0009] S2. Based on the area of ​​each piece and the average area of ​​all pieces, small pieces are selected and included in the small piece set. An initial global path is generated using the nearest neighbor greedy algorithm based on the centroid coordinates of all pieces.

[0010] S3. Calculate the Euclidean distance between the centroid coordinates of two adjacent pieces based on the initial global path to form a distance sequence;

[0011] S4. Perform jump detection on the distance sequence to obtain all path jump points, and divide the initial global path into several path segments based on all path jump points;

[0012] S5. Based on all path segments, a global clustering window is used to divide all clippings, as follows:

[0013] S51. Calculate the average value of the centroid coordinates of all pieces in each path segment, and use it as the initial centroid of the corresponding path segment.

[0014] S52. Initialize the initial cluster centers of the K-means algorithm as the initial centroids of all path segments, and divide the centroid coordinates of all clipping pieces into K cluster clipping blocks using the K-means algorithm, where K is the total number of path segments.

[0015] S6. Establish the objective function for each cluster clipping block and solve it using a variable neighborhood search algorithm to obtain the optimal cutting order for the corresponding cluster clipping block;

[0016] S7. Construct the optimal global path by splicing the optimal cutting order of all clustered cutting blocks as the cutting bed path optimization result.

[0017] Preferably, smaller pieces are selected based on the area of ​​each piece and the average area of ​​all pieces, as follows:

[0018] Will satisfy The cut pieces are marked as small pieces, among which, For the first The area of ​​each piece of fabric. This is a preset area threshold coefficient. This is the average area of ​​all the cut pieces. , This represents the total number of all cut pieces.

[0019] Preferably, an initial global path is generated using a nearest neighbor greedy algorithm based on the centroid coordinates of all cut pieces, as follows:

[0020] S21. Determine the centroid coordinates of all cut pieces. Is the fabric piece with the smallest axis coordinate value unique? If so, select it. The piece with the smallest axis coordinate value is taken as the starting point, i.e., as the piece sorted as 1; otherwise, the piece sorted by axis coordinate value is selected. Minimum axis coordinate value The piece with the smallest axis coordinate value is used as the starting point. The length direction of the master plate is the feeding direction. The width direction of the master page;

[0021] S22. Select the piece with the smallest Euclidean distance from the centroid coordinates of the most recently sorted piece from the remaining pieces as the next piece to be sorted.

[0022] S23. Return to step S22 until all cut pieces are traversed, and the sorting of all cut pieces forms the initial global path.

[0023] Preferably, jump detection is performed on the distance sequence to obtain all path jump points, and the initial global path is divided into several path segments based on all path jump points, as follows:

[0024] S41, will satisfy The sorting is The coordinates of the center of gravity of the cut piece are marked as the sub-jump point, where, Distance sequence The element and , To calculate the Euclidean distance, Distance sequence The 90th percentile, For sorting The coordinates of the center of gravity of the cut piece. For sorting The coordinates of the center of gravity of the cut piece. , The total number of all cut pieces;

[0025] S42. Determine whether each sub-jump point has a sorted adjacent sub-jump point. If so, retain the largest sorted sub-jump point among the adjacent sub-jump points as the path jump point. Otherwise, directly use the sub-jump point as the path jump point.

[0026] S43. Starting from the first path transition point in the sorting, take the current path transition point and the pieces before the current path transition point that have not been divided into path segments as a path segment, until all path transition points are traversed, and take the remaining pieces as a path segment to complete the initial global path division.

[0027] Preferably, the objective function for each clustering pruning block is established, then the... The objective function of each clustered clipping block The formula is as follows:

[0028]

[0029] in,

[0030]

[0031]

[0032] In the formula, To obtain the minimum value, To calculate the Euclidean distance, For the first The first clustering clipping block The coordinates of the center of gravity of each piece of fabric. For the first The first clustering clipping block The center-of-gravity coordinates of each piece of fabric. =1~K, This represents the total number of clipping pieces in the current clustered clipping block. For the first The first clustering clipping block A cut piece, for The area excitation function, for area, It is an exponential function with base e. for The cutting weight, for The order of the current cluster clipping block For smaller pieces, first cut the sensitive coefficient, which must be greater than 0. It is a collection of small pieces.

[0033] Preferably, a variable neighborhood search algorithm is used to solve the problem and obtain the optimal cutting order of the corresponding clustered clipping blocks, as follows:

[0034] S61. Randomly initialize the current cutting order of the corresponding clustering clipping blocks to form the initial solution. ;

[0035] S62, in The neighborhood is searched using a variable neighborhood search algorithm to obtain candidate solutions for the current solution. ;

[0036] S63. Determine whether the objective function value of the corresponding clustering pruning block under the candidate solution is better than the objective function value of the corresponding clustering pruning block under the current solution. If so, update the current solution to a candidate solution and set it to... =1, return to step S62 until the convergence condition is met; otherwise, keep the current solution unchanged and set it to 1. = +1, return to step S62, until the convergence condition is reached. The convergence condition is the preset maximum number of iterations or the preset convergence threshold of the objective function of the corresponding clustering pruning block.

[0037] S64. Obtain the current solution as the optimal cutting order for the corresponding clustering pruning blocks.

[0038] Preferably, the neighborhood structure of the variable neighborhood search algorithm includes the following categories:

[0039] Neighborhood: Swap the positions of any two pieces in the current cutting order of the corresponding cluster clipping block;

[0040] Neighborhood: Remove any piece from its original position in the current cutting order of the corresponding cluster cut block and insert it into another position in the current cutting order of the corresponding cluster cut block;

[0041] Neighborhood: Randomly select several consecutive pieces in the current cutting order of the corresponding cluster cutting block and perform the 2-opt inversion operation, that is, randomly select two pieces in the current cutting order of the corresponding cluster cutting block and invert the cutting order of other pieces between the two selected pieces;

[0042] Neighborhood: For any small piece, determine whether inserting the current small piece before the nearest non-small piece in the cutting order satisfies the condition. If so, then insert the data to update the current cutting order of the corresponding cluster clipping block; otherwise, do not insert the data to preserve the current cutting order of the corresponding cluster clipping block. The centroid coordinates of the current small piece after insertion. axis coordinate values, The centroid coordinates of the nearest non-small piece that appears first in the cutting order before insertion. Axis coordinate values.

[0043] Preferably, the optimal global path is constructed by piecing together the optimal cutting order of all clustered cutting blocks as the cutting bed path optimization result, as follows:

[0044] S71. Take the cluster cutting block where the first piece of the initial global path is located as the starting cluster cutting block, and use a greedy algorithm to determine the cutting order between all cluster cutting blocks based on the Euclidean distance between the average centroid coordinates of all pieces in each cluster cutting block.

[0045] S72. Starting from the initial cluster cutting block, take the centroid coordinates of the last piece in the optimal cutting order of the current cluster cutting block as the exit point of the corresponding cluster cutting block. In the optimal cutting order of the next cluster cutting block, select the one with the smallest Euclidean distance to the exit point of the current cluster cutting block from the centroid coordinates of the first piece or the last piece as the entry point. If the entry point is the centroid coordinates of the last piece, reverse the process to update the optimal cutting order of the next cluster cutting block, until all cluster cutting blocks are traversed according to the inter-block cutting order to obtain the exit point and entry point of each cluster cutting block.

[0046] S73. Connect the exit point and entry point of the cluster clipping blocks sequentially according to the inter-block cutting order of all cluster clipping blocks, and maintain the optimal cutting order of each cluster clipping block to construct the optimal global path.

[0047] Preferably, the cutting bed path optimization method based on global clustering window partitioning further includes the following steps:

[0048] S8. Determine the feeding progress of each cluster cutting block based on the optimal global path, as follows:

[0049] S81. Calculate the minimum value of each clustering clipping block under the optimal global path. axis coordinate values ​​and maximum axis coordinate values, The length direction of the master plate is the feeding direction;

[0050] S82. When all clustered clipping blocks before the current X interval have been cut, and there are no uncut pieces within the current X interval, proceed along... The process continues along the axis until the next clustering clipping block is located in the X interval, which is then designated as the current X interval. The X interval represents the minimum value of the corresponding clustering clipping block. axis coordinate values ​​and maximum The region between axis coordinate values;

[0051] S83. Repeat step S82 until all cluster clipping blocks are cut.

[0052] Preferably, the distance sequence is smoothed and filtered before jump detection.

[0053] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0054] This application generates an initial global path by selecting small pieces and using a nearest neighbor greedy algorithm. It then uses jump detection on the initial global path to divide the path into sub-segments as initial cluster centers for the K-means algorithm. Using the K-means algorithm to divide the clustered cutting blocks better matches the material layout and avoids cross-region cutting. Furthermore, by establishing an objective function for each clustered cutting block and solving it using a variable neighborhood search algorithm, the cutting order within the block is obtained. Blocks are then joined using a greedy algorithm, resulting in a continuous cutting path and reduced idle travel. The small-piece priority strategy reduces the problem of small pieces easily shifting during cutting of flexible materials (such as fabric and leather), helping to improve cutting accuracy. In addition, the path planning process satisfies unidirectional feeding constraints throughout, eliminating back-cutting and significantly improving operational efficiency and stability. Attached Figure Description

[0055] Figure 1 This is a flowchart of the cutting bed path optimization method based on global clustering window partitioning of the present invention;

[0056] Figure 2 This is a schematic diagram of the jump detection results in an embodiment of the present invention;

[0057] Figure 3 This is a schematic diagram illustrating the running results of an embodiment of the present invention. Detailed Implementation

[0058] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0059] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application.

[0060] like Figures 1-3 As shown, a cutting bed path optimization method based on global clustering window partitioning includes the following steps:

[0061] S1. Based on the coordinate point set of each piece in the order to be cut, calculate the centroid coordinates and area of ​​each piece, as well as the average area of ​​all pieces.

[0062] Specifically, the cutting bed obtains the cut piece data from the loaded order to be cut, thus generating a set of coordinate points for each cut piece. These coordinate points are the outline points of the cut piece. The feeding direction of the master pattern is used as the reference point. The axis, perpendicular to the feeding direction is In a two-dimensional rectangular coordinate system established by axes, the cut pieces are randomly arranged and laid on the master pattern. The centroid coordinates and area of ​​each cut piece are calculated. For the first The center-of-gravity coordinates of each piece of fabric. For the first The area of ​​each piece of fabric. , Given the total number of cut pieces, they can be added to a set of coordinate points for the cut pieces, and the average area of ​​all cut pieces can be calculated. .

[0063] S2. Based on the area of ​​each piece and the average area of ​​all pieces, small pieces are selected and added to the small piece set. An initial global path is generated using the nearest neighbor greedy algorithm based on the centroid coordinates of all pieces.

[0064] In one embodiment, smaller pieces are selected based on the area of ​​each piece and the average area of ​​all pieces, as follows:

[0065] Will satisfy The cut pieces are marked as small pieces, among which, For the first The area of ​​each piece of fabric. This is a preset area threshold coefficient. This is the average area of ​​all the cut pieces. , This represents the total number of all cut pieces.

[0066] Among them, will satisfy The cut pieces are marked as small pieces, 0 < <1 is used to distinguish between small pieces and regular pieces, and to group small pieces into a small piece set. In this process, smaller segments can be identified and used as input for subsequent segment-priority segmentation strategies.

[0067] In one embodiment, an initial global path is generated using a nearest neighbor greedy algorithm based on the centroid coordinates of all cut pieces, as follows:

[0068] S21. Determine the centroid coordinates of all cut pieces. Is the fabric piece with the smallest axis coordinate value unique? If so, select it. The piece with the smallest axis coordinate value is taken as the starting point, i.e., as the piece sorted as 1; otherwise, the piece sorted by axis coordinate value is selected. Minimum axis coordinate value The piece with the smallest axis coordinate value is used as the starting point. The length direction of the master plate is the feeding direction. The width direction of the master page;

[0069] S22. Select the piece with the smallest Euclidean distance from the centroid coordinates of the most recently sorted piece from the remaining pieces as the next piece to be sorted.

[0070] S23. Return to step S22 until all cut pieces are traversed, and the sorting of all cut pieces forms the initial global path.

[0071] This includes the set of centroid coordinates of all the cut pieces. , For the first The centroid coordinates of each piece are used to generate an initial global path covering all pieces using a nearest neighbor greedy algorithm. Since each piece of fabric will not simultaneously possess a center of gravity coordinate... axis coordinate values ​​and When axis coordinate values ​​are equal, priority is given to selecting... The piece with the smallest axis coordinate value is designated as piece number 1 in the sorting. If multiple pieces have the smallest axis coordinate values, select... The piece with the smallest axis coordinate value is assigned as the first piece in the initial global path, determining the starting point of the initial global path. (Initial Global Path) ,in, For sorting Cut pieces.

[0072] S3. Calculate the Euclidean distance between the centroid coordinates of two adjacent pieces based on the initial global path to form a distance sequence.

[0073] S4. Perform jump detection on the distance sequence to obtain all path jump points, and divide the initial global path into several path segments based on all path jump points.

[0074] In one embodiment, the distance sequence is smoothed and filtered before jump detection.

[0075] In one embodiment, jump detection is performed on the distance sequence to obtain all path jump points, and the initial global path is divided into several path segments based on all path jump points, as follows:

[0076] S41, will satisfy The sorting is The coordinates of the center of gravity of the cut piece are marked as the sub-jump point, where, Distance sequence The element and , To calculate the Euclidean distance, Distance sequence The 90th percentile, For sorting The coordinates of the center of gravity of the cut piece. For sorting The coordinates of the center of gravity of the cut piece. , The total number of all cut pieces;

[0077] S42. Determine whether each sub-jump point has a sorted adjacent sub-jump point. If so, retain the largest sorted sub-jump point among the adjacent sub-jump points as the path jump point. Otherwise, directly use the sub-jump point as the path jump point.

[0078] S43. Starting from the first path transition point in the sorting, take the current path transition point and the pieces before the current path transition point that have not been divided into path segments as a path segment, until all path transition points are traversed, and take the remaining pieces as a path segment to complete the initial global path division.

[0079] After obtaining the initial global path, the distance sequence between the centroid coordinates of two adjacent fabric pieces is calculated. , , Each item in the table is calculated as follows: . For sorting The coordinates of the center of gravity of the cut piece. For sorting The coordinates of the center of gravity of the cut piece. To calculate the Euclidean distance, This represents the total number of all cut pieces.

[0080] First, the distance sequence All of them Smoothing filtering is applied to reduce the impact of individual outliers. Then, the distance sequence after smoothing filtering is calculated. 90th percentile (The distance sequence after smoothing and filtering) The data in the image is sorted from smallest to largest, and the value at the 90th position will satisfy... The position is recorded as the sub-jump point, and adjacent sub-jump points are merged to obtain the final path jump point.

[0081] These path transition points reflect locations where distances suddenly increase in the initial global path and can be considered as natural boundaries between different regions. The path sequence is segmented based on these transition points, dividing the initial global path into several continuous path segments. Each path segment contains a set of spatially adjacent clippings. Each path transition point and its preceding undivided clippings constitute a path segment. The total number of path segments is used as the number of clusters K for subsequent K-means clustering.

[0082] S5. Based on all path segments, a global clustering window is used to divide all clippings, as follows:

[0083] S51. Calculate the average value of the centroid coordinates of all pieces in each path segment, and use it as the initial centroid of the corresponding path segment.

[0084] S52. Initialize the initial cluster centers of the K-means algorithm as the initial centroids of all path segments. Divide the centroid coordinates of all clipping pieces into K cluster clipping blocks using the K-means algorithm, where K is the total number of path segments.

[0085] S6. Establish the objective function for each cluster clipping block and solve it using a variable neighborhood search algorithm to obtain the optimal cutting order for the corresponding cluster clipping block.

[0086] In one embodiment, an objective function is established for each clustering clipping block, then the... The objective function of each clustered clipping block The formula is as follows:

[0087]

[0088] in,

[0089]

[0090]

[0091] In the formula, To obtain the minimum value, To calculate the Euclidean distance, For the first The first clustering clipping block The center-of-gravity coordinates of each piece of fabric. For the first The first clustering clipping block The center-of-gravity coordinates of each piece of fabric. =1~K, This represents the total number of clipping pieces in the current clustered clipping block. For the first The first clustering clipping block A cut piece, for The area excitation function, for area, It is an exponential function with base e. for The cutting weight, for The order of the current cluster clipping block For smaller pieces, first cut the sensitive coefficient, which must be greater than 0. It is a collection of small pieces.

[0092] In one embodiment, a variable neighborhood search algorithm is used to solve for the optimal cutting order of the corresponding clustered clipping blocks, as follows:

[0093] S61. Randomly initialize the current cutting order of the corresponding clustering clipping blocks to form the initial solution. ;

[0094] S62, in The neighborhood is searched using a variable neighborhood search algorithm to obtain candidate solutions for the current solution. ;

[0095] S63. Determine whether the objective function value of the corresponding clustering pruning block under the candidate solution is better than the objective function value of the corresponding clustering pruning block under the current solution. If so, update the current solution to a candidate solution and set it to... =1, return to step S62 until the convergence condition is met; otherwise, keep the current solution unchanged and set it to 1. = +1, return to step S62, until the convergence condition is reached. The convergence condition is the preset maximum number of iterations or the preset convergence threshold of the objective function of the corresponding clustering pruning block.

[0096] S64. Obtain the current solution as the optimal cutting order for the corresponding clustering pruning blocks.

[0097] In one embodiment, the neighborhood structure of the variable neighborhood search algorithm includes the following categories:

[0098] Neighborhood: Swap the positions of any two pieces in the current cutting order of the corresponding cluster clipping block;

[0099] Neighborhood: Remove any piece from its original position in the current cutting order of the corresponding cluster cut block and insert it into another position in the current cutting order of the corresponding cluster cut block;

[0100] Neighborhood: Randomly select several consecutive pieces in the current cutting order of the corresponding cluster cutting block and perform the 2-opt inversion operation, that is, randomly select two pieces in the current cutting order of the corresponding cluster cutting block and invert the cutting order of other pieces between the two selected pieces;

[0101] Neighborhood: For any small piece, determine whether inserting the current small piece before the nearest non-small piece in the cutting order satisfies the condition. If so, then insert the data to update the current cutting order of the corresponding cluster clipping block; otherwise, do not insert the data to preserve the current cutting order of the corresponding cluster clipping block. The centroid coordinates of the current small piece after insertion. axis coordinate values, The centroid coordinates of the nearest non-small piece that appears first in the cutting order before insertion. Axis coordinate values.

[0102] In this embodiment, the intra-block path optimization of the clustered clipping block adopts the Variable Neighborhood Search (VNS) algorithm, and its neighborhood structure includes the following four types: 1) Neighborhoods are used to implement simple order swaps; 2) The neighborhood is used to remove any piece from its original position and insert it into another position in the current cutting order of the corresponding cluster cutting block; 3) The neighborhood is used to select any continuous piece in the current cutting order of the corresponding cluster cutting block, and to perform a 2-opt inversion operation on the continuous piece. Specifically, it selects any two pieces in the current cutting order and reverses the cutting order of the pieces between these two pieces (excluding these two pieces); 4) The neighborhood is used to compare any piece marked as a small piece with its nearest preceding non-small piece before insertion: If the insertion only moves forward along the path and satisfies... If the current segment is not smaller, insert it forward before the nearest non-smaller segment; otherwise, do not insert it and preserve the current cutting order. This helps to ensure that the cutting order is not disrupted. Towards monotonicity constraints.

[0103] The clustering results are represented as several spatially compact regions on the two-dimensional layout master. Each clustered cutting block is... The cutting blocks exhibit a certain degree of continuity along the axial direction and correspond to a local TSP subproblem, providing a foundation for subsequent unidirectional feeding constraints and intra-block path optimization. Within each clustered cutting block, a TSP subproblem is established with the centroid of each piece as a node, and the Variable Neighborhood Search (VNS) algorithm is used to solve it, obtaining the optimal cutting order for the corresponding clustered cutting block.

[0104] S7. Construct the optimal global path by splicing the optimal cutting order of all clustered cutting blocks as the cutting bed path optimization result.

[0105] In one embodiment, the optimal global path is constructed by piecing together the optimal cutting order of all clustered cutting blocks as the cutting bed path optimization result, as follows:

[0106] S71. Take the cluster cutting block where the first piece of the initial global path is located as the starting cluster cutting block, and use a greedy algorithm to determine the cutting order between all cluster cutting blocks based on the Euclidean distance between the average centroid coordinates of all pieces in each cluster cutting block.

[0107] S72. Starting from the initial cluster cutting block, take the centroid coordinates of the last piece in the optimal cutting order of the current cluster cutting block as the exit point of the corresponding cluster cutting block. In the optimal cutting order of the next cluster cutting block, select the one with the smallest Euclidean distance to the exit point of the current cluster cutting block from the centroid coordinates of the first piece or the last piece as the entry point. If the entry point is the centroid coordinates of the last piece, reverse the process to update the optimal cutting order of the next cluster cutting block, until all cluster cutting blocks are traversed according to the inter-block cutting order to obtain the exit point and entry point of each cluster cutting block.

[0108] S73. Connect the exit point and entry point of the cluster clipping blocks sequentially according to the inter-block cutting order of all cluster clipping blocks, and maintain the optimal cutting order of each cluster clipping block to construct the optimal global path.

[0109] After obtaining the optimal intra-block path for each cluster clipping block, a greedy algorithm is executed between the cluster clipping blocks to obtain the inter-block cutting order of all cluster clipping blocks, using the initial global path. The original order in which the first piece appears depends on the initial global path. The first cut piece in the cluster is used as the starting cut block. After determining the cutting order between blocks using a greedy algorithm, for two adjacent cluster cut blocks, the centroid coordinates of the last cut piece in the path of the previous cluster cut block are used as the starting point. In the next cluster cut block, the cut piece with the closest Euclidean distance to the optimal cutting order's starting and ending points is selected as the entry point. If the ending point is selected, the path of that cluster cut block is reversed. The optimal cutting order within each cluster cut block remains unchanged (the updated cutting order is maintained after reverse processing), and the cluster cut blocks are connected sequentially according to the inter-block cutting order of all cluster cut blocks to obtain a coherent overall cutting path with minimal idle travel in the global scope. This inter-block splicing strategy ensures path coherence while minimizing the idle travel distance across blocks and maintaining the consistency of the overall path with the feeding direction.

[0110] In one embodiment, the cutting bed path optimization method based on global clustering window partitioning further includes the following steps:

[0111] S8. Determine the feeding progress of each cluster cutting block based on the optimal global path, as follows:

[0112] S81. Calculate the minimum value of each clustering clipping block under the optimal global path. axis coordinate values ​​and maximum axis coordinate values, The length direction of the master plate is the feeding direction;

[0113] S82. When all clustered clipping blocks before the current X interval have been cut, and there are no uncut pieces within the current X interval, proceed along... The process continues along the axis until the next clustering clipping block is located in the X interval, which is then designated as the current X interval. The X interval represents the minimum value of the corresponding clustering clipping block. axis coordinate values ​​and maximum The region between axis coordinate values;

[0114] S83. Repeat step S82 until all cluster clipping blocks are cut.

[0115] Among them, the layout of the entire pattern is calculated based on the coordinate point set of the cut pieces. The length (feeding direction) is used to determine and advance the feeding range. That is, when executing the cutting path, it is based on the length of each clustered cutting block. The coordinate range along the axis determines the timing of the feeding advance. By determining the timing of the feeding advance, the tool movement and the feeding movement are coordinated, which avoids back-cutting and reverse feeding, and reduces the time loss caused by feeding waiting.

[0116] For ease of understanding, the execution process of this embodiment is as follows:

[0117] like Figures 2-3 As shown, a fabric cutting order is selected as example data. The pattern layout master corresponding to this order is in the feeding direction ( The shaft is 5500 mm long and 5500 mm wide. The axis is 1450 mm, containing a total of 286 pieces; the length of the master pattern is... Axial and width directions are A two-dimensional rectangular coordinate system is established, with the coordinates of the outline points of each fabric piece in mm. Based on the outline point set (coordinate point set) of each fabric piece, the centroid coordinates and area of ​​each fabric piece are calculated, and the average area of ​​all fabric pieces is calculated. Set a preset area threshold coefficient. =0.3, which will satisfy The cut pieces are marked as small pieces, forming a collection of small pieces. This is used as input for the subsequent "smaller slices first" strategy.

[0118] (1) Initial global path and distance sequence construction:

[0119] Create a set of the centroid coordinates of all the cut pieces. The nearest neighbor greedy algorithm is used to generate an initial global path that covers all cut pieces. And calculate the Euclidean distance between the centroid coordinates of two adjacent fabric pieces, then we have This distance sequence is used for subsequent jump detection and block initialization, that is, first obtain a global coarse sort, and then use the abrupt change positions of adjacent distances to characterize the "region boundary".

[0120] (2) Path transition point detection and K value determination:

[0121] For distance sequences Smoothing filtering is performed to reduce the influence of local noise (in this embodiment, moving mean filtering can be used, and the window length can be 3 to 5, which is an example and does not constitute a limitation), and then the 90th percentile of the distance sequence after smoothing filtering is calculated. and will satisfy The position is denoted as the subjugation point. Figure 2 Given , The distribution of threshold lines and sub-jump points in the distance sequence. Considering that adjacent sub-jump points may be caused by the same "cross-region jump", this embodiment merges sub-jump points with adjacent indices (or with an interval less than a preset index threshold) in the distance sequence, retaining the one with the later ranking as the final path jump point. The initial global path is then determined based on the path jump points. The path is segmented to obtain several continuous path segments; the number of path segments is used as the number of cluster categories K in this embodiment. In this embodiment, after segmentation at the path transition points, K=19 path segments are obtained (i.e., 19 cluster clipping blocks are formed).

[0122] (3) K-means algorithm for block partitioning and solving the TSP subproblem within each block:

[0123] Using the average centroid coordinates of the clipping pieces within each path segment as the initial cluster centers for the K-means algorithm, K-means clustering is performed on the centroid coordinates of all clipping pieces, resulting in K=19 spatially compact clustered clipping blocks. Each clustered clipping block corresponds to a local TSP subproblem, and... The axial direction naturally exhibits local continuity, facilitating compatibility with unidirectional feeding processes. Within each clustered cutting block, a Variable Neighborhood Search (VNS) algorithm is used to solve its TSP path, and a "small piece priority" term is introduced into the objective function to simultaneously consider the idle travel distance and early cutting of small pieces. The VNS neighborhood structure sequentially includes: arbitrary two-point swap, single-point insertion, 2-opt fragment inversion, and "small piece pre-insertion" neighborhood (corresponding to...). Neighborhood, Neighborhood, Neighborhood, The neighborhood); where the "small piece forward interpolation" neighborhood is used to move the small piece forward as far as possible before the nearest non-small piece, and can be supplemented with judgment conditions that do not break the unidirectionality of feeding or window constraints. In this embodiment, the VNS iteration termination condition can be set as follows: if there is no improvement after multiple consecutive rounds of neighborhood loops, or if the preset maximum number of iterations (200 times) is reached, or if the preset convergence threshold (improvement amount) of the objective function of the clustering clipping block is less than 0.1%, the optimal cutting order of the clustering clipping block is output.

[0124] (4) Inter-block stitching and optimal global path generation:

[0125] After obtaining the optimal intra-block path for each clustered cutting block, a greedy inter-block connection strategy (greedy algorithm) is used to determine the access order of the clustered cutting blocks. A connection method with a smaller Euclidean distance is selected between adjacent clustered cutting blocks (e.g., selecting the closest point between the beginning and end of the path of the next clustered cutting block as the entry point, and performing reverse processing on the path of that clustered cutting block if necessary) to reduce cross-block idle travel. Finally, a global cutting order covering 286 pieces is obtained. The results of this embodiment are as follows... Figure 3 As shown (including the optimal global path, small pieces, empty travel between blocks, and block start point markers): different colors represent different clustering clipping blocks; red boxes are small piece markers; dashed lines represent empty travel between blocks; blue triangles represent block start points (the starting point of clustering clipping blocks), thus intuitively demonstrating that this method can still maintain the overall path continuity and reduce empty travel after block division.

[0126] (5) Determine the timing of material feeding:

[0127] When executing the cutting path, the cutting blocks are based on their respective clusters. The coordinate range in the axial direction determines the timing of the feeding advance, maintaining the coordination between the tool movement and the feeding movement. On the one hand, this avoids back-cutting and reverse feeding, and on the other hand, it reduces the time loss caused by feeding waiting.

[0128] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0129] The embodiments described above are merely specific and detailed examples of the embodiments described in this application, and should not be construed as limiting the scope of the application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these modifications and improvements all fall within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the appended claims.

Claims

1. A method for optimizing cutting bed paths based on global clustering window partitioning, characterized in that: Includes the following steps: S1. Based on the coordinate point set of each piece in the order to be cut, calculate the centroid coordinates and area of ​​each piece, as well as the average area of ​​all pieces. S2. Based on the area of ​​each piece and the average area of ​​all pieces, small pieces are selected and included in the small piece set. An initial global path is generated using the nearest neighbor greedy algorithm based on the centroid coordinates of all pieces. S3. Calculate the Euclidean distance between the centroid coordinates of two adjacent pieces based on the initial global path to form a distance sequence; S4. Perform jump detection on the distance sequence to obtain all path jump points, and divide the initial global path into several path segments based on all path jump points; S5. Based on all path segments, a global clustering window is used to divide all clippings, as follows: S51. Calculate the average value of the centroid coordinates of all pieces in each path segment, and use it as the initial centroid of the corresponding path segment. S52. Initialize the initial cluster centers of the K-means algorithm as the initial centroids of all path segments, and divide the centroid coordinates of all clipping pieces into K cluster clipping blocks using the K-means algorithm, where K is the total number of path segments. S6. Establish the objective function for each cluster clipping block and solve it using a variable neighborhood search algorithm to obtain the optimal cutting order for the corresponding cluster clipping block; S7. Construct the optimal global path by splicing the optimal cutting order of all clustered cutting blocks as the cutting bed path optimization result.

2. The cutting bed path optimization method based on global clustering window partitioning as described in claim 1, characterized in that: The process of selecting smaller pieces based on the area of ​​each piece and the average area of ​​all pieces is as follows: Will satisfy The cut pieces are marked as small pieces, among which, For the first The area of ​​each piece of fabric, This is a preset area threshold coefficient. This is the average area of ​​all the cut pieces. , This represents the total number of all cut pieces.

3. The cutting bed path optimization method based on global clustering window partitioning as described in claim 1, characterized in that: The initial global path is generated using a nearest neighbor greedy algorithm based on the centroid coordinates of all cut pieces, as detailed below: S21. Determine the centroid coordinates of all cut pieces. Is the fabric piece with the smallest axis coordinate value unique? If so, select it. The piece with the smallest axis coordinate value is taken as the starting point, i.e., as the piece sorted as 1; otherwise, the piece sorted by axis coordinate value is selected. Minimum axis coordinate value The piece with the smallest axis coordinate value is used as the starting point. The length direction of the master plate is the feeding direction. The width direction of the master page; S22. Select the piece with the smallest Euclidean distance from the centroid coordinates of the most recently sorted piece from the remaining pieces as the next piece to be sorted. S23. Return to step S22 until all cut pieces are traversed, and the sorting of all cut pieces forms the initial global path.

4. The cutting bed path optimization method based on global clustering window partitioning as described in claim 1, characterized in that: The method involves performing jump detection on the distance sequence to obtain all path jump points, and then dividing the initial global path into several path segments based on all path jump points, as detailed below: S41, will satisfy The sorting is The coordinates of the center of gravity of the cut piece are marked as the sub-jump point, where, Distance sequence The element and , To calculate the Euclidean distance, Distance sequence The 90th percentile, For sorting The coordinates of the center of gravity of the cut piece. For sorting The coordinates of the center of gravity of the cut piece. , The total number of all cut pieces; S42. Determine whether each sub-jump point has a sorted adjacent sub-jump point. If so, retain the largest sorted sub-jump point among the adjacent sub-jump points as the path jump point. Otherwise, directly use the sub-jump point as the path jump point. S43. Starting from the first path transition point in the sorting, take the current path transition point and the pieces before the current path transition point that have not been divided into path segments as a path segment, until all path transition points are traversed, and take the remaining pieces as a path segment to complete the initial global path division.

5. The cutting bed path optimization method based on global clustering window partitioning as described in claim 1, characterized in that: The objective function for establishing each clustering clipping block is then... The objective function of each clustered clipping block The formula is as follows: in, In the formula, To obtain the minimum value, To calculate the Euclidean distance, For the first The first clustering clipping block The coordinates of the center of gravity of each piece of fabric. For the first The first clustering clipping block The coordinates of the center of gravity of each piece of fabric. =1~K, This represents the total number of clipping pieces in the current clustered clipping block. For the first The first clustering clipping block A piece of fabric, for The area excitation function, for area, It is an exponential function with base e. for The cutting weight, for The order of the current cluster clipping block For smaller pieces, first cut the sensitive coefficient, which must be greater than 0. It is a collection of small pieces.

6. The cutting bed path optimization method based on global clustering window partitioning as described in claim 1, characterized in that: The optimal cutting order of the corresponding clustered clipping blocks is obtained by using a variable neighborhood search algorithm, as detailed below: S61. Randomly initialize the current cutting order of the corresponding clustering clipping blocks to form the initial solution. ; S62, in The neighborhood is searched using a variable neighborhood search algorithm to obtain candidate solutions for the current solution. ; S63. Determine whether the objective function value of the corresponding clustering pruning block under the candidate solution is better than the objective function value of the corresponding clustering pruning block under the current solution. If so, update the current solution to a candidate solution and set it to... =1, return to step S62 until the convergence condition is met; otherwise, keep the current solution unchanged and set it to 1. = +1, return to step S62, until the convergence condition is reached. The convergence condition is the preset maximum number of iterations or the preset convergence threshold of the objective function of the corresponding clustering pruning block. S64. Obtain the current solution as the optimal cutting order for the corresponding clustering pruning blocks.

7. The cutting bed path optimization method based on global clustering window partitioning as described in claim 6, characterized in that: The neighborhood structure of the variable neighborhood search algorithm includes the following categories: Neighborhood: Swap the positions of any two pieces in the current cutting order of the corresponding cluster clipping block; Neighborhood: Remove any piece from its original position in the current cutting order of the corresponding cluster cut block and insert it into another position in the current cutting order of the corresponding cluster cut block; Neighborhood: Randomly select several consecutive pieces in the current cutting order of the corresponding cluster cutting block and perform the 2-opt inversion operation, that is, randomly select two pieces in the current cutting order of the corresponding cluster cutting block and invert the cutting order of other pieces between the two selected pieces; Neighborhood: For any small piece, determine whether inserting the current small piece before the nearest non-small piece in the cutting order satisfies the condition. If yes, then insert the data to update the current cutting order of the corresponding cluster clipping block; otherwise, do not insert the data to preserve the current cutting order of the corresponding cluster clipping block. The centroid coordinates of the current small piece after insertion. axis coordinate values, The centroid coordinates of the nearest non-small piece that appears first in the cutting order before insertion. Axis coordinate values.

8. The cutting bed path optimization method based on global clustering window partitioning as described in claim 1, characterized in that: The optimal cutting order of splicing all clustered clipping blocks is used to construct the optimal global path as the result of the cutting bed path optimization, as follows: S71. Take the cluster cutting block where the first piece of the initial global path is located as the starting cluster cutting block, and use a greedy algorithm to determine the cutting order between all cluster cutting blocks based on the Euclidean distance between the average centroid coordinates of all pieces in each cluster cutting block. S72. Starting from the initial cluster cutting block, take the centroid coordinates of the last piece in the optimal cutting order of the current cluster cutting block as the exit point of the corresponding cluster cutting block. In the optimal cutting order of the next cluster cutting block, select the one with the smallest Euclidean distance to the exit point of the current cluster cutting block from the centroid coordinates of the first piece or the last piece as the entry point. If the entry point is the centroid coordinates of the last piece, reverse the process to update the optimal cutting order of the next cluster cutting block, until all cluster cutting blocks are traversed according to the inter-block cutting order to obtain the exit point and entry point of each cluster cutting block. S73. Connect the exit point and entry point of the cluster clipping blocks in sequence according to the inter-block cutting order of all cluster clipping blocks, and maintain the optimal cutting order of each cluster clipping block to construct the optimal global path.

9. The cutting bed path optimization method based on global clustering window partitioning as described in claim 1, characterized in that: The cutting bed path optimization method based on global clustering window partitioning also includes the following steps: S8. Determine the feeding progress of each cluster cutting block based on the optimal global path, as follows: S81. Calculate the minimum value of each clustering clipping block under the optimal global path. axis coordinate values ​​and maximum axis coordinate values, The length direction of the master plate is the feeding direction; S82. When all clustered clipping blocks before the current X interval have been cut, and there are no uncut pieces within the current X interval, proceed along... The process continues along the axis until the next clustering trimming block is located in the X interval, which is then designated as the current X interval. The X interval represents the minimum value of the corresponding clustering trimming block. axis coordinate values ​​and maximum The region between axis coordinate values; S83. Repeat step S82 until all cluster clipping blocks are cut.

10. The cutting bed path optimization method based on global clustering window partitioning as described in claim 1, characterized in that: Before performing jump detection on the distance sequence, a smoothing filter is also applied to the distance sequence.