A part cutting path planning method considering scrap line selection and priority constraints
By considering the selection and priority constraints of scrap lines in the part cutting path planning method, an initial scrap line candidate set is generated and various path optimization operators are used to solve the global path obstacle problem caused by the separation of scrap line generation and cutting path planning in the prior art, thus achieving more efficient part cutting and processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG UNIV OF TECH
- Filing Date
- 2025-11-20
- Publication Date
- 2026-07-07
AI Technical Summary
In existing part cutting path planning methods, the generation of scrap lines and cutting path planning are separated into two independent steps. This causes the locally optimal scrap line scheme to become an obstacle to the globally optimal path, resulting in a large number of unnecessary idle movements and increasing processing time.
A part cutting path planning method that considers the selection and priority constraints of scrap lines is adopted. An initial scrap line candidate set is generated, an initial solution for the cutting path is generated by a greedy insertion algorithm, and a neighborhood solution set is generated by using a variety of path optimization operators. Finally, the tabu search algorithm is used to find the optimal solution.
This effectively avoids the local optimal material handling line scheme from hindering the global optimal path, reduces unnecessary idle movement, and shortens the total processing time.
Smart Images

Figure CN121870537B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of part cutting path planning technology, specifically a part cutting path planning method that considers the selection and priority constraints of scrap lines. Background Technology
[0002] During parts cutting, it often happens that some parts are completely surrounded by scrap areas, forming "embedded parts." After cutting, these parts are difficult to remove safely and efficiently from the scrap area; moreover, the scrap areas formed after cutting are often large and irregularly shaped, exceeding the capacity of standard scrap areas and making direct collection and transfer impossible. Therefore, pre-generating scrap lines to handle "embedded parts" and large scrap areas has become an effective means to improve the level of processing automation. Existing technologies typically separate "scrap line generation" and "cutting path planning" into two independent steps, ignoring the close coupling between them: the selection of the scrap line directly determines the structure of the optimal path, and path efficiency, in turn, depends on the scrap line scheme. This approach easily leads to locally optimal scrap line schemes becoming obstacles to the globally optimal path, generating a large amount of unnecessary idle movement due to their dispersed layout, thus increasing the total processing time. Summary of the Invention
[0003] To address the aforementioned shortcomings, this invention proposes a part cutting path planning method that considers the selection and priority constraints of the scrap line. The aim is to solve the problem that in existing part cutting path planning methods, "scrape line generation" and "cutting path planning" are usually separated into two independent steps. This can easily lead to the local optimal scrap line scheme hindering the global optimal path and generating a large amount of unnecessary idle movement.
[0004] To achieve this objective, the present invention adopts the following technical solution:
[0005] A method for planning part cutting paths that considers scrap line selection and priority constraints includes the following steps:
[0006] Step S1: Obtain a 2D CAD drawing containing the nesting layout of the parts;
[0007] Step S2: Convert the 2D CAD drawing containing the nesting layout of parts into an undirected graph, and perform recognition processing on the undirected graph to identify all embedded parts and scrap areas.
[0008] Step S3: Generate an initial set of candidate scrap lines according to the preset heuristic generation rules, and filter the initial set of candidate scrap lines to obtain a set of valid candidate scrap lines;
[0009] Step S4: Based on all embedded parts, scrap areas, and the candidate set of effective scrap lines, generate an initial solution for the cutting path using a greedy insertion algorithm. ;
[0010] Step S5: Construct the current solution for the cutting path Optimal solution for cutting path And a list of contraindications, and Assign values to respectively and Furthermore, the taboo list is initialized.
[0011] Step S6: Based on The path optimization operator is used to generate a neighborhood solution set. The path optimization operator includes a path optimization operator based on a single task, a path optimization operator based on a task segment, a path optimization operator based on a scrap line, and a path optimization operator based on the entry point.
[0012] Step S7: Evaluate the legality of each neighborhood solution in the neighborhood solution set. If the current neighborhood solution is legal, it is determined to be a legal neighborhood solution; if the current neighborhood solution is illegal, it is repaired to transform it into a legal neighborhood solution, so as to obtain a legal neighborhood solution set.
[0013] Step S8: Calculate the cost increment of each legal neighborhood solution in the legal neighborhood solution set, and select the legal neighborhood solution with the smallest cost increment as the optimal neighborhood solution. ;
[0014] Step S9: Determine by querying the initialized taboo table. Is the operation prohibited? If not, then... Updated to If so, then calculate. Actual total cost And execute step S10;
[0015] Step S10: Determine Is it less than the preset global optimal solution cost? If so, then Updated to If not, then select the legal neighborhood solution with the second smallest cost increment from the legal neighborhood solution set as the legal neighborhood solution. Repeat steps S9-S10 until the current... The actual total cost is less than Until then, and Update to current .
[0016] Preferably, in step S2, the undirected graph is processed to identify all embedded parts and scrap areas, specifically including the following sub-steps: Step S21: Use a depth-first search algorithm to identify all closed contours in the undirected graph; Step S22: Construct a tree-like data structure containing the nested hierarchical relationship of all closed contours; Step S23: Based on the tree-like data structure, identify all embedded parts and scrap areas in the undirected graph.
[0017] Preferably, before step S4, the following steps are also included: constructing a task dependency graph containing all closed contours and candidate scrap lines, wherein the task dependency graph is used to define priority constraints between cutting tasks, and the priority constraints between cutting tasks include "cutting all candidate scrap lines connected to the current closed contour" and "cutting the inner closed contour first and then cutting the outer closed contour"; and generating a list of preceding cutting tasks and a list of following cutting tasks for each cutting task based on the task dependency graph.
[0018] Preferably, step S4 specifically includes the following sub-steps:
[0019] In step S41: Traverse each embedded part, calculate the number P of selected fragments associated with the current embedded part in the selected fragments in the effective fragments candidate set, and determine whether P is greater than the preset candidate fragments number threshold. If yes, output the selected fragment; otherwise, select the shortest candidate fragment that does not intersect with any selected fragment and satisfies the position constraint from the effective fragments candidate set and output it.
[0020] Step S42: Determine whether the size of the waste area is greater than the preset size threshold. If not, proceed to step S43. If yes, adopt a heuristic strategy to select the candidate scrap lines output in step S41 to divide the waste area that exceeds the preset size threshold until the size of all the divided waste sub-regions is less than the preset size threshold.
[0021] Step S43: Based on all selected candidate scrap lines and all embedded parts, construct a cutting task list, and perform topological sorting on the cutting task list according to the task dependency graph to obtain an ordered cutting task list;
[0022] Step S44: Construct the initial cutting path, and select the cutting tasks to be inserted one by one from the ordered cutting task list in a specific order to insert them into the initial cutting path to generate the initial solution of the cutting path. ;
[0023] For each cutting task to be inserted, first determine its feasible insertion interval in the current initial cutting path based on its dependencies on preceding and succeeding cutting tasks; then traverse all position points within the feasible insertion interval, calculate the idle path length increment corresponding to each position point, and select the position point with the smallest idle path length increment to perform the insertion operation.
[0024] Preferably, in step S6, the path optimization operator based on a single task includes a swap operator and an insertion operator; the path optimization operator based on a task segment includes a task segment reversal operator, a random rearrangement operator within a task segment, and a task segment swap operator; the path optimization operator based on a scrap line includes a scrap line addition operator, a scrap line removal operator, and a scrap line replacement operator.
[0025] Generating neighborhood solutions using a commutation operator involves the following sub-steps:
[0026] First, in the current solution Randomly select the i-th cutting task from the cutting path in the code. Then calculate A movable window within the cutting path; then select the j-th cutting task within that movable window. Final judgment and Are they both within each other's movable windows? If so, then swap. and The position is determined to generate a neighborhood solution; otherwise, no operation is performed.
[0027] The process of generating neighborhood solutions using the insertion operator includes the following sub-steps:
[0028] First, in the current solution Randomly select the u-th cutting task from the cutting path in the code. Then calculate The movable window in the cutting path; finally, Insert the v-th cutting task into this movable window. The corresponding position is used to generate a neighborhood solution;
[0029] The task segment inversion operator is used to generate neighborhood solutions, which includes the following sub-steps:
[0030] First, in the current solution Randomly select the a-th cutting task from the cutting path in the code. up to the b-th cutting task Cutting task segments between ,in, and There are no direct or indirect priority dependencies between them; then the task segment is cut. All cutting tasks within the same segment are reordered in reverse order to obtain new cutting task segments. That is, the neighborhood solution;
[0031] The neighborhood solution is generated using a random rearrangement operator within the task segment, which includes the following sub-steps:
[0032] First, in the current solution Randomly select the c-th cutting task from the cutting path in the code. up to the dth cutting task Cutting task segments between ,in, and There are no direct or indirect priority dependencies between them; then the task segment is cut. All cutting tasks within the segment are randomly shuffled and reordered to obtain new cutting task segments. That is, the neighborhood solution;
[0033] The task segment exchange operator is used to generate neighborhood solutions, which includes the following sub-steps:
[0034] First, in the current solution Two cutting task segments are randomly selected from the cutting path in the code. and ; then judge and Do all of the following conditions be met:
[0035] No cutting task in the process can be Any pre- or post-cutting task in the cutting process; or No cutting task in the process can be Pre- or post-cutting tasks for any cutting task in the process;
[0036] set up For located and The "middle segment" formed by all the cutting tasks in between, There is no cutting task in it. The preceding cutting task for any cutting task in the process, and There is no cutting task in it. Any subsequent cutting task in the cutting process;
[0037] If so, then Corresponding position and Swap the corresponding positions; otherwise, do nothing.
[0038] Preferably, in step S6, the addition of a fragmentation line operator is used to generate a neighborhood solution, which specifically includes the following sub-steps:
[0039] First, select a new scraping line from the pool of valid candidate scraping lines that does not intersect with any of the previously selected scraping lines. Then use a greedy strategy to... Insert into the current solution The optimal position of the cutting path in the process is determined to generate a neighborhood solution.
[0040] The neighborhood solution is generated using the debris removal operator, which includes the following sub-steps:
[0041] First, randomly select one scraping line from the selected set of scraping lines. ; then check all related Related parts; finally From the current solution Remove from the cutting path and determine After removal, check if the constraints of "a single part must have at least two scrap lines" and "a single part must have at least two scrap lines that are not on the same edge" are met. If so, generate the removal. If the new solution is obtained later, it is the neighborhood solution; otherwise, no new solution is generated.
[0042] The neighborhood solution is generated using the replacement fragmentation line operator, which includes the following sub-steps:
[0043] First, randomly select one scraping line from the candidate set of valid scraping lines. And randomly select a scrap line from the selected scrap line set. Next, determine whether the following conditions are met simultaneously: It does not intersect with any currently selected shredding line; for all lines with Related parts, in After removal, the constraints of "a single part must have at least two scrap lines" and "a single part must have at least two scrap lines that are not on the same edge" are met; if so, then use... replace and the replacement From the current solution Remove from the cutting path in the process to generate a neighborhood solution; otherwise, no replacement operation is performed.
[0044] The process of generating neighborhood solutions using a path optimization operator based on the entry point includes the following sub-steps: starting from the current solution... Randomly select a closed contour and for Replace with a different Corresponding entry point new entry point To generate neighborhood solutions.
[0045] Preferably, in step S8, the cost increment for each legal neighborhood solution in the legal neighborhood solution set is calculated, specifically including the following sub-steps:
[0046] Calculate the cost increment of neighborhood solutions generated using the exchange operator. ,in, The specific calculation formula is as follows:
[0047] ;
[0048] ;
[0049] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the exchange operator; Indicates before and after the exchange. and The cost difference between the four cutting task segments connected to the corresponding adjacent cutting tasks; This represents the distance between the (i-1)th cutting task and the jth cutting task;
[0050] Calculate the cost increment of neighborhood solutions generated using the insertion operator. ,in, The specific calculation formula is as follows:
[0051] ;
[0052] ;
[0053] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the insertion operator; express break away Corresponding position and insertion The sum of the cost changes of the three cutting task segments caused by the corresponding positions;
[0054] Calculate the cost increment of neighborhood solutions generated using the task segment inversion operator. ,in, The specific calculation formula is as follows:
[0055] ;
[0056] ;
[0057] ;
[0058] ;
[0059] ;
[0060] ;
[0061] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the task segment inversion operator; This indicates the increment of the empty path within the cutting task segment and the empty path of the cutting task segment and its adjacent cutting tasks before and after the reversal. This indicates the length of the idle path within the task segment before reversing the order; This represents the sum of the idle path lengths of the cutting task segment before and after the reverse order reordering; This indicates the length of the idle path within the task segment after reversing the order; This represents the sum of the idle path lengths of the reordered cutting task segments and their preceding and following cutting tasks. This represents the m-th cutting task;
[0062] The cost increment for calculating neighborhood solutions generated using the intra-task random rearrangement operator is calculated. ,in, The specific calculation formula is as follows:
[0063] ;
[0064] ;
[0065] ;
[0066] ;
[0067] ;
[0068] ;
[0069] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the random rearrangement operator within the task segment; This indicates the increment of the empty path within the cutting task segment and the empty path of the cutting task segment and its adjacent cutting tasks before and after rearrangement. Indicates the length of the idle path within the task segment before reordering; This represents the sum of the idle path lengths of the cutting task segment before the reordering and its preceding and following cutting tasks. This indicates the length of the idle path within the task segment after the disordered reordering; This represents the sum of the idle path lengths of the reordered cutting task segment and its preceding and following cutting tasks.
[0070] Calculate the cost increment of neighborhood solutions generated using the task segment exchange operator. ,in, The specific calculation formula is as follows:
[0071] ;
[0072] ;
[0073] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the task segment exchange operator; This represents the cost difference between the two cut task segments and the four externally connected cut task segments before and after the swap.
[0074] Calculate the cost increment of neighborhood solutions generated using the added scrap line operator. ,in, The specific calculation formula is as follows:
[0075] ;
[0076] ;
[0077] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the added scrap line operator; This represents the weight corresponding to the increment in the number of perforations generated during the process of generating neighborhood solutions using the added scrap line operator; This indicates the cutting task corresponding to position n where the scrap line is added; This indicates the addition of a new scrap line that does not intersect with any existing scrap lines; This indicates the change in the idle path length after the addition of the scrap line;
[0078] Calculate the cost increment of neighborhood solutions generated using the scrap removal operator. ,in, The specific calculation formula is as follows:
[0079] ;
[0080] ;
[0081] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the scrap removal operator; This represents the weight corresponding to the increment in the number of perforations generated during the process of generating neighborhood solutions using the scrap removal operator; This represents the (o-1)th cutting task; This represents the (o+1)th cutting task; This indicates a selected scrap line that needs to be removed, and lie in and between; This indicates the change in the length of the idle path after the scrap line is removed.
[0082] Calculate the cost increment of neighborhood solutions generated using the replacement scrap line operator. ,in, The specific calculation formula is as follows:
[0083] ;
[0084] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the replacement scrap line operator;
[0085] The cost increment of the neighborhood solution generated by the path optimization operator based on the entry point is calculated. ,in, The specific calculation formula is as follows:
[0086] ;
[0087] ;
[0088] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated by the path optimization operator based on the entry point; Represents outline respectively Cutting Cutting task segments Difference; Indicates the first A cut ; Indicates the first A cut ; Indicates the new knife entry point; Represents the old entry point; This represents the contour containing the new entry point; This indicates a contour that includes the old entry point.
[0089] Preferably, in step S7, if the current neighborhood solution is illegal, it is repaired to transform it into a legal neighborhood solution. Specifically, this includes the following sub-steps: using a heuristic strategy to select the optimal scrap line from the set of valid candidate scrap lines, and dividing the scrap regions in the current illegal neighborhood solution that exceed a preset size threshold until the size of all the resulting scrap sub-regions is smaller than the preset size threshold.
[0090] Preferably, the method further includes the following step: determining whether the number of iterations falls within a preset number of iterations. Is it in the un- If the state is such that, then it indicates The search may stall, triggering a warm restart mechanism; otherwise, it indicates... The optimization is ongoing and will not trigger the hot restart mechanism. The specific operation of the hot restart mechanism is as follows: First, based on the current... Randomly select one of the following path optimization operators: a path optimization operator based on a single task, a path optimization operator based on a task segment, a path optimization operator based on a scrap line, and a path optimization operator based on the entry point, and generate a path optimization operator that is consistent with the current one. New solutions with different structures Then, clear the current taboo list and generate the... The path optimization operators used are added to the cleared tabu list; finally, the generated... Assigned to Then repeat step S6.
[0091] The technical solution provided by this invention may include the following beneficial effects:
[0092] This scheme first generates an initial set of candidate scrap lines based on preset heuristic generation rules, and then filters them to obtain a valid set of candidate scrap lines. Based on this, a greedy insertion algorithm is used to generate an initial solution for the cutting path, which is then used as the current solution. Subsequently, various path optimization operators are used to optimize the current solution, generating a neighborhood solution set. Finally, a tabu search algorithm is used to search for the optimal neighborhood solution from the neighborhood solution set, which is then used as the optimal cutting path solution, thus realizing the planning of the part cutting path. Compared to existing technologies that separate "scrap line generation" and "cutting path planning" into two independent steps, this scheme considers the selection of scrap lines simultaneously during the cutting path planning process. This effectively avoids locally optimal scrap line solutions from hindering the globally optimal path, thereby reducing unnecessary idle movement and shortening the total processing time. Attached Figure Description
[0093] Figure 1 This is a flowchart illustrating the steps of a part cutting path planning method that considers the selection and priority constraints of the scrap line. Detailed Implementation
[0094] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0095] A method for planning part cutting paths that considers scrap line selection and priority constraints includes the following steps:
[0096] Step S1: Obtain a 2D CAD drawing containing the nesting layout of the parts;
[0097] Step S2: Convert the 2D CAD drawing containing the nesting layout of parts into an undirected graph, and perform recognition processing on the undirected graph to identify all embedded parts and scrap areas.
[0098] Step S3: Generate an initial set of candidate scrap lines according to the preset heuristic generation rules, and filter the initial set of candidate scrap lines to obtain a set of valid candidate scrap lines;
[0099] Step S4: Based on all embedded parts, scrap areas, and the candidate set of effective scrap lines, generate an initial solution for the cutting path using a greedy insertion algorithm. ;
[0100] Step S5: Construct the current solution for the cutting path Optimal solution for cutting path And a list of contraindications, and Assign values to respectively and Furthermore, the taboo list is initialized.
[0101] Step S6: Based on The path optimization operator is used to generate a neighborhood solution set. The path optimization operator includes a path optimization operator based on a single task, a path optimization operator based on a task segment, a path optimization operator based on a scrap line, and a path optimization operator based on the entry point.
[0102] Step S7: Evaluate the legality of each neighborhood solution in the neighborhood solution set. If the current neighborhood solution is legal, it is determined to be a legal neighborhood solution; if the current neighborhood solution is illegal, it is repaired to transform it into a legal neighborhood solution, so as to obtain a legal neighborhood solution set.
[0103] Step S8: Calculate the cost increment of each legal neighborhood solution in the legal neighborhood solution set, and select the legal neighborhood solution with the smallest cost increment as the optimal neighborhood solution. ;
[0104] Step S9: Determine by querying the initialized taboo table. Is the operation prohibited? If not, then... Updated to If so, then calculate. Actual total cost And execute step S10;
[0105] Step S10: Determine Is it less than the preset global optimal solution cost? If so, then Updated to If not, then select the legal neighborhood solution with the second smallest cost increment from the legal neighborhood solution set as the legal neighborhood solution. Repeat steps S9-S10 until the current... The actual total cost is less than Until then, and Update to current .
[0106] This scheme proposes a part cutting path planning method that considers the selection and priority constraints of the scrap line, such as... Figure 1 The first step is to obtain a 2D CAD drawing containing the nesting layout of the parts. In this embodiment, obtaining this 2D CAD drawing provides a data foundation for the subsequent conversion of the undirected graph. The second step is to convert the 2D CAD drawing containing the nesting layout into an undirected graph and perform identification processing on the undirected graph to identify all embedded parts and scrap areas. In this embodiment, an undirected graph is a structure composed of vertices and edges, characterized by edges having no direction. Each edge connects two vertices, indicating a bidirectional relationship between them. By converting the 2D CAD drawing into an undirected graph, a standardized data foundation can be laid for the subsequent identification of embedded parts and scrap areas. Identifying embedded parts and scrap areas in the undirected graph is beneficial for subsequent scrap line generation and cutting path planning. The third step is to generate an initial set of candidate scrap lines based on preset heuristic generation rules, and then filter this initial set to obtain a set of valid candidate scrap lines. In this embodiment, generating and filtering the initial set of candidate scrap lines based on preset heuristic generation rules not only ensures the rationality and effectiveness of scrap line generation, but also provides a basis for selecting high-quality scrap lines for subsequent cutting path planning. Further explanation: the preset heuristic generation rules are existing heuristic rules, which will not be elaborated here. Filtering the initial set of candidate scrap lines specifically involves removing redundant scrap lines from the initial set. The fourth step is to generate an initial solution for the cutting path using a greedy insertion algorithm based on all embedded parts, scrap areas, and the set of valid candidate scrap lines. In this embodiment, a greedy insertion algorithm is used to generate an initial solution for the cutting path, which quickly yields an initial feasible cutting path scheme, providing a starting point for subsequent path optimization based on tabu search. The fifth step is to construct the current solution for the cutting path. Optimal solution for cutting path And a list of contraindications, and Assign values to respectively and Furthermore, the tabu list is initialized. In this embodiment, the current solution and the optimal solution of the cutting path are constructed and initialized. The current solution serves as the starting point for the iterative search of the tabu search algorithm, and the optimal solution serves as the initial benchmark for performance comparison. Constructing and initializing the tabu list facilitates recording tabu objects during the subsequent iteration of the tabu search algorithm, preventing the search process from getting stuck in a loop. The sixth step is based on... The process involves generating a neighborhood solution set using path optimization operators. These operators include those based on a single task, task segments, material break lines, and entry points. In this embodiment, generating the neighborhood solution set using multiple path optimization operators allows for optimization of the current cutting path solution from multiple dimensions, resulting in a more adaptable cutting path that can flexibly handle different processing requirements and constraints. The seventh step involves evaluating the legality of each neighborhood solution in the neighborhood solution set. If the current neighborhood solution is legal, it is determined to be a legal neighborhood solution; if it is illegal, it is repaired to transform it into a legal neighborhood solution, thus obtaining a legal neighborhood solution set. In this embodiment, by evaluating and repairing the legality of each neighborhood solution in the neighborhood solution set, it is ensured that all neighborhood solutions participating in subsequent cost calculations and optimization selections are legal and feasible. The eighth step involves calculating the cost increment of each legal neighborhood solution in the legal neighborhood solution set and selecting the legal neighborhood solution with the smallest cost increment as the optimal neighborhood solution. In this embodiment, by calculating the cost increment of the legal neighborhood solutions and selecting the legal neighborhood solution with the smallest cost increment as the optimal neighborhood solution, a quantitative basis is provided for the solution selection of the tabu search algorithm, which can accurately locate the legal neighborhood solution with the optimal cost. The ninth step is to determine the optimal solution by querying the initialized tabu table. Is the operation prohibited? If not, then... Updated to If so, then calculate. Actual total cost And execute step S10. In this embodiment, the taboo table is consulted to determine... Whether an operation is taboo can effectively prevent getting stuck in a local optimum loop during the optimization process. This is achieved through calculation... The actual total cost provides a basis for determining the initiation of the "amnesty criterion" in taboo scenarios. The tenth step is to determine... Is it less than the preset global optimal solution cost? If so, then Updated to If not, then select the legal neighborhood solution with the second smallest cost increment from the legal neighborhood solution set as the legal neighborhood solution. Repeat steps S9-S10 until the current... The actual total cost is less than Until then, and Update to current In this embodiment, by judging the relationship between the actual total cost and the cost of the global optimal solution, and by selecting the neighborhood solution with the second smallest cost increment and iterating repeatedly when the actual total cost is greater than the global optimal solution, it is ensured that a cutting path with a better cost globally can eventually be found. Further explanation: In updating... At the same time, the taboo list will also be updated simultaneously, specifically by adding the current taboo list to the list. The path optimization operators used in the generation are added to the tabu list to prevent the search process from looping in the short term and to ensure that the algorithm can continuously explore new solution spaces.
[0107] This scheme first generates an initial set of candidate scrap lines based on preset heuristic generation rules, and then filters them to obtain a valid set of candidate scrap lines. Based on this, a greedy insertion algorithm is used to generate an initial solution for the cutting path, which is then used as the current solution. Subsequently, various path optimization operators are used to optimize the current solution, generating a neighborhood solution set. Finally, a tabu search algorithm is used to search for the optimal neighborhood solution from the neighborhood solution set, which is then used as the optimal cutting path solution, thus realizing the planning of the part cutting path. Compared to existing technologies that separate "scrap line generation" and "cutting path planning" into two independent steps, this scheme considers the selection of scrap lines simultaneously during the cutting path planning process. This effectively avoids locally optimal scrap line solutions from hindering the globally optimal path, thereby reducing unnecessary idle movement and shortening the total processing time.
[0108] Preferably, in step S2, the undirected graph is processed to identify all embedded parts and scrap areas, specifically including the following sub-steps: Step S21: Use a depth-first search algorithm to identify all closed contours in the undirected graph; Step S22: Construct a tree-like data structure containing the nested hierarchical relationship of all closed contours; Step S23: Based on the tree-like data structure, identify all embedded parts and scrap areas in the undirected graph.
[0109] In this embodiment, in step S21, a depth-first search algorithm is used to identify all closed contours in the undirected graph, providing basic geometric units for subsequent nesting relationship analysis and region attribute determination. Further explanation: the depth-first search algorithm is a fundamental algorithm in graph theory. In step S22, by constructing a tree-like data structure containing the nesting hierarchy of all closed contours, the containment and included relationships between contours can be clearly presented. In step S23, by identifying all embedded parts and scrap regions in the undirected graph based on the tree-like data structure, misjudgments of region attributes due to contour overlap or intersection are avoided.
[0110] Preferably, before step S4, the method further includes the following steps: constructing a task dependency graph containing all closed contours and candidate scrap lines, wherein the task dependency graph is used to define priority constraints between cutting tasks, including "cutting all candidate scrap lines connected to the current closed contour" and "cutting the inner closed contour first and then the outer closed contour"; and generating a list of preceding and following cutting tasks for each cutting task based on the task dependency graph. In this embodiment, by constructing a task dependency graph to clarify the priority constraints between cutting tasks, the cutting order is ensured to meet the process requirements. By generating a list of preceding and following cutting tasks for each cutting task based on the task dependency graph, the execution efficiency is significantly improved in the subsequent generation and validity verification of neighborhood solutions.
[0111] Preferably, step S4 specifically includes the following sub-steps:
[0112] In step S41: Traverse each embedded part, calculate the number P of selected fragments associated with the current embedded part in the selected fragments in the effective fragments candidate set, and determine whether P is greater than the preset candidate fragments number threshold. If yes, output the selected fragment; otherwise, select the shortest candidate fragment that does not intersect with any selected fragment and satisfies the position constraint from the effective fragments candidate set and output it.
[0113] Step S42: Determine whether the size of the waste area is greater than the preset size threshold. If not, proceed to step S43. If yes, adopt a heuristic strategy to select the candidate scrap lines output in step S41 to divide the waste area that exceeds the preset size threshold until the size of all the divided waste sub-regions is less than the preset size threshold.
[0114] Step S43: Based on all selected candidate scrap lines and all embedded parts, construct a cutting task list, and perform topological sorting on the cutting task list according to the task dependency graph to obtain an ordered cutting task list;
[0115] Step S44: Construct the initial cutting path, and select the cutting tasks to be inserted one by one from the ordered cutting task list in a specific order to insert them into the initial cutting path to generate the initial solution of the cutting path. ;
[0116] For each cutting task to be inserted, first determine its feasible insertion interval in the current initial cutting path based on its dependencies on preceding and succeeding cutting tasks; then traverse all position points within the feasible insertion interval, calculate the idle path length increment corresponding to each position point, and select the position point with the smallest idle path length increment to perform the insertion operation.
[0117] In this embodiment, in step S41, the preset threshold for the number of candidate scrap lines is set to two. By judging the relationship between the number P of selected scrap lines associated with the current embedded part in the selected scrap line candidate set and the preset threshold for the number of candidate scrap lines, when P is less than the preset threshold, a scrap line is selected based on the screening criteria of "shortest, does not intersect with selected scrap lines, and satisfies positional constraints," ensuring that a sufficient number of scrap lines are configured for each embedded part to guarantee the feasibility of subsequent retrieval operations. In step S42, the preset size threshold is... The process begins by determining whether a waste area needs to be segmented based on a preset size threshold. Targeted segmentation is then performed based on the scrap line output in step S41 until all waste sub-areas meet the size requirement, avoiding difficulties in collection or transportation caused by excessively large waste areas. In step S43, a cutting task list is constructed to systematically integrate the scattered selected candidate scrap lines and embedded parts, facilitating management. Topological sorting of the cutting task list based on the task dependency graph ensures the process legality of the cutting sequence. In step S44, an initial solution for the cutting path is generated using the insertion logic of "first determining feasible insertion intervals based on the dependencies between the preceding and following cutting tasks, then calculating the idle path length increments corresponding to all positions within the feasible insertion intervals, and finally selecting the position with the smallest idle path length increment." This logic ensures the legality of the insertion position through constraints imposed by the dependencies between the preceding and following cutting tasks, and reduces invalid movements during the cutting process from the initial stage by minimizing the idle path length increment, providing a high-quality initial solution for subsequent cutting path optimization.
[0118] Preferably, in step S6, the path optimization operators based on a single task include a swap operator and an insertion operator; the path optimization operators based on a task segment include a task segment reversal operator, a random rearrangement operator within a task segment, and a task segment swap operator; the path optimization operators based on a scrap line include a scrap line addition operator, a scrap line removal operator, and a scrap line replacement operator.
[0119] Generating neighborhood solutions using a commutation operator involves the following sub-steps:
[0120] First, in the current solution Randomly select the i-th cutting task from the cutting path in the code. Then calculate A movable window within the cutting path; then select the j-th cutting task within that movable window. Final judgment and Are they both within each other's movable windows? If so, then swap. and The position is determined to generate a neighborhood solution; otherwise, no operation is performed.
[0121] The process of generating neighborhood solutions using the insertion operator includes the following sub-steps:
[0122] First, in the current solution Randomly select the u-th cutting task from the cutting path in the code. Then calculate The movable window in the cutting path; finally, Insert the v-th cutting task into this movable window. The corresponding position is used to generate a neighborhood solution;
[0123] The task segment inversion operator is used to generate neighborhood solutions, which includes the following sub-steps:
[0124] First, in the current solution Randomly select the a-th cutting task from the cutting path in the code. up to the b-th cutting task Cutting task segments between ,in, and There are no direct or indirect priority dependencies between them; then the task segment is cut. All cutting tasks within the same segment are reordered in reverse order to obtain new cutting task segments. That is, the neighborhood solution;
[0125] The neighborhood solution is generated using a random rearrangement operator within the task segment, which includes the following sub-steps:
[0126] First, in the current solution Randomly select the c-th cutting task from the cutting path in the code. up to the dth cutting task Cutting task segments between ,in, and There are no direct or indirect priority dependencies between them; then the task segment is cut. All cutting tasks within the segment are randomly shuffled and reordered to obtain new cutting task segments. That is, the neighborhood solution;
[0127] The task segment exchange operator is used to generate neighborhood solutions, which includes the following sub-steps:
[0128] First, in the current solution Two cutting task segments are randomly selected from the cutting path in the code. and ; then judge and Do all of the following conditions be met:
[0129] No cutting task in the process can be Any pre- or post-cutting task in the cutting process; or No cutting task in the process can be Pre- or post-cutting tasks for any cutting task in the process;
[0130] set up For located and The "middle segment" formed by all the cutting tasks in between, There is no cutting task in it. The preceding cutting task for any cutting task in the process, and There is no cutting task in it. Any subsequent cutting task in the cutting process;
[0131] If so, then Corresponding position and Swap the corresponding positions; otherwise, do nothing.
[0132] In this embodiment, in the path optimization operator based on a single task, by calculating the exchange or insertion of the movable window and the cutting task position, the execution order of a single task can be adjusted without violating priority constraints, enabling rapid exploration of locally optimal cutting paths. In the path optimization operator based on task segments, by reversing, shuffling, and exchanging the cutting task segments, diverse neighborhood solutions can be explored, effectively avoiding the algorithm from getting trapped in local optima and helping to find a better global cutting path.
[0133] Preferably, in step S6, the neighborhood solution is generated using the added scrap line operator, which specifically includes the following sub-steps:
[0134] First, select a new scraping line from the pool of valid candidate scraping lines that does not intersect with any of the previously selected scraping lines. Then use a greedy strategy to... Insert into the current solution The optimal position of the cutting path in the process is determined to generate a neighborhood solution.
[0135] The neighborhood solution is generated using the debris removal operator, which includes the following sub-steps:
[0136] First, randomly select one scraping line from the selected set of scraping lines. ; then check all related Related parts; finally From the current solution Remove from the cutting path and determine After removal, check if the constraints of "a single part must have at least two scrap lines" and "a single part must have at least two scrap lines that are not on the same edge" are met. If so, generate the removal. If the new solution is obtained later, it is the neighborhood solution; otherwise, no new solution is generated.
[0137] The neighborhood solution is generated using the replacement fragmentation line operator, which includes the following sub-steps:
[0138] First, randomly select one scraping line from the candidate set of valid scraping lines. And randomly select a scrap line from the selected scrap line set. Next, determine whether the following conditions are met simultaneously: It does not intersect with any currently selected shredding line; for all lines with Related parts, in After removal, the constraints of "a single part must have at least two scrap lines" and "a single part must have at least two scrap lines that are not on the same edge" are met; if so, then use... replace and the replacement From the current solution Remove from the cutting path in the process to generate a neighborhood solution; otherwise, no replacement operation is performed.
[0139] The neighborhood solution is generated using a path optimization operator based on the entry point, which includes the following sub-steps:
[0140] From the current solution Randomly select a closed contour and for Replace with a different Corresponding entry point new entry point To generate neighborhood solutions.
[0141] In this embodiment, the path optimization operator based on scrap lines dynamically adjusts the cutting path by adding, removing, and replacing scrap lines, thus flexibly adapting to complex cutting scenarios with varying scrap line layouts. By using a path optimization operator based on the entry point to generate neighborhood solutions, the starting position of the cut can be flexibly adjusted. The selection of different entry points can optimize the initial connection of contour cutting and avoid additional empty movement caused by unreasonable entry points.
[0142] Preferably, in step S8, the cost increment for each legal neighborhood solution in the legal neighborhood solution set is calculated, specifically including the following sub-steps:
[0143] Calculate the cost increment of neighborhood solutions generated using the exchange operator. ,in, The specific calculation formula is as follows:
[0144] ;
[0145] ;
[0146] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the exchange operator; Indicates before and after the exchange. and The cost difference between the four cutting task segments connected to the corresponding adjacent cutting tasks; This represents the distance between the (i-1)th cutting task and the jth cutting task;
[0147] Calculate the cost increment of neighborhood solutions generated using the insertion operator. ,in, The specific calculation formula is as follows:
[0148] ;
[0149] ;
[0150] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the insertion operator; express break away Corresponding position and insertion The sum of the cost changes of the three cutting task segments caused by the corresponding positions;
[0151] Calculate the cost increment of neighborhood solutions generated using the task segment inversion operator. ,in, The specific calculation formula is as follows:
[0152] ;
[0153] ;
[0154] ;
[0155] ;
[0156] ;
[0157] ;
[0158] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the task segment inversion operator; This indicates the increment of the empty path within the cutting task segment and the empty path of the cutting task segment and its adjacent cutting tasks before and after the reversal. This indicates the length of the idle path within the task segment before reversing the order; This represents the sum of the idle path lengths of the cutting task segment before and after the reverse order reordering; This indicates the length of the idle path within the task segment after reversing the order; This represents the sum of the idle path lengths of the reordered cutting task segments and their preceding and following cutting tasks. This represents the m-th cutting task;
[0159] The cost increment for calculating neighborhood solutions generated using the intra-task random rearrangement operator is calculated. ,in, The specific calculation formula is as follows:
[0160] ;
[0161] ;
[0162] ;
[0163] ;
[0164] ;
[0165] ;
[0166] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the random rearrangement operator within the task segment; This indicates the increment of the empty path within the cutting task segment and the empty path of the cutting task segment and its adjacent cutting tasks before and after rearrangement. Indicates the length of the idle path within the task segment before reordering; This represents the sum of the idle path lengths of the cutting task segment before the reordering and its preceding and following cutting tasks. This indicates the length of the idle path within the task segment after the disordered reordering; This represents the sum of the idle path lengths of the reordered cutting task segment and its preceding and following cutting tasks.
[0167] Calculate the cost increment of neighborhood solutions generated using the task segment exchange operator. ,in, The specific calculation formula is as follows:
[0168] ;
[0169] ;
[0170] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the task segment exchange operator; This represents the cost difference between the two cut task segments and the four externally connected cut task segments before and after the swap.
[0171] Calculate the cost increment of neighborhood solutions generated using the added scrap line operator. ,in, The specific calculation formula is as follows:
[0172] ;
[0173] ;
[0174] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the added scrap line operator; This represents the weight corresponding to the increment in the number of perforations generated during the process of generating neighborhood solutions using the added scrap line operator; This indicates the cutting task corresponding to position n where the scrap line is added; This indicates the addition of a new scrap line that does not intersect with any existing scrap lines; This indicates the change in the idle path length after the addition of the scrap line;
[0175] Calculate the cost increment of neighborhood solutions generated using the scrap removal operator. ,in, The specific calculation formula is as follows:
[0176] ;
[0177] ;
[0178] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the scrap removal operator; This represents the weight corresponding to the increment in the number of perforations generated during the process of generating neighborhood solutions using the scrap removal operator; This represents the (o-1)th cutting task; This represents the (o+1)th cutting task; This indicates a selected scrap line that needs to be removed, and lie in and between; This indicates the change in the length of the idle path after the scrap line is removed.
[0179] Calculate the cost increment of neighborhood solutions generated using the replacement scrap line operator. ,in, The specific calculation formula is as follows:
[0180] ;
[0181] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the replacement scrap line operator;
[0182] The cost increment of the neighborhood solution generated by the path optimization operator based on the entry point is calculated. ,in, The specific calculation formula is as follows:
[0183] ;
[0184] ;
[0185] in, This represents the weight corresponding to the cost increment of the neighborhood solution generated by the path optimization operator based on the entry point; Represents outline respectively Cutting Cutting task segments Difference; Indicates the first A cut ; Indicates the first A cut ; Indicates the new knife entry point; Represents the old entry point; This represents the contour containing the new entry point; This indicates a contour that includes the old entry point.
[0186] In this embodiment, by calculating the cost increment of the neighborhood solution generated by the exchange operator, insertion operator, task segment inversion operator, task segment random rearrangement operator, task segment exchange operator, scrap line addition operator, scrap line removal operator, scrap line replacement operator, and path optimization operator based on the entry point, a reliable judgment benchmark can be provided for obtaining the optimal neighborhood solution in the future.
[0187] Preferably, in step S7, if the current neighborhood solution is illegal, it is repaired to transform it into a legal neighborhood solution. This specifically includes the following sub-steps: using a heuristic strategy to select the optimal scrap line from the set of valid candidate scrap lines; segmenting the waste regions exceeding a preset size threshold in the current illegal neighborhood solution until the size of all segmented waste sub-regions is smaller than the preset size threshold. In this embodiment, during the illegal neighborhood solution repair process, the heuristic strategy can quickly screen out the optimal scrap line, avoiding efficiency losses caused by blind segmentation and shortening the time cost of illegal neighborhood solution repair. Simultaneously, by segmenting waste regions exceeding the preset size threshold until the size of all waste sub-regions meets the requirements, this refined segmentation can reduce the waste of large pieces of waste, thereby improving the overall utilization rate of the segmented material.
[0188] Preferably, the method further includes the following step: determining whether the number of iterations falls within a preset number of iterations. Is it in the un- If the state is such that, then it indicates The search may stall, triggering a warm restart mechanism; otherwise, it indicates... The optimization is ongoing and will not trigger the hot restart mechanism. The specific operation of the hot restart mechanism is as follows: First, based on the current... Randomly select one of the following path optimization operators: a path optimization operator based on a single task, a path optimization operator based on a task segment, a path optimization operator based on a scrap line, and a path optimization operator based on the entry point, and generate a path optimization operator that is consistent with the current one. New solutions with different structures Then, clear the current taboo list and generate the... The path optimization operators used are added to the cleared tabu list; finally, the generated... Assigned to Then repeat step S6.
[0189] In this embodiment, a hot restart mechanism is introduced to optimize the unused... of This prevents the tabu search algorithm from getting trapped in a local optimum due to premature convergence. Furthermore, the core advantage of the warm restart mechanism lies in preserving the current... Based on this, a strong perturbation is applied to it, thereby guiding the search process to a completely new starting point in the solution space that is far away from the current region.
[0190] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.
[0191] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A method for planning part cutting paths considering the selection and priority constraints of scrap lines, characterized in that: Includes the following steps: Step S1: Obtain a 2D CAD drawing containing the nesting layout of the parts; Step S2: Convert the 2D CAD drawing containing the nesting layout of parts into an undirected graph, and perform recognition processing on the undirected graph to identify all embedded parts and scrap areas. Step S3: Generate an initial set of candidate scrap lines according to the preset heuristic generation rules, and filter the initial set of candidate scrap lines to obtain a set of valid candidate scrap lines; Step S4: Based on all embedded parts, scrap areas, and the candidate set of effective scrap lines, generate an initial solution for the cutting path using a greedy insertion algorithm. ; Step S5: Construct the current solution for the cutting path Optimal solution for cutting path And a list of contraindications, and Assign values to respectively and Furthermore, the taboo list is initialized. Step S6: Based on The path optimization operator is used to generate a neighborhood solution set. The path optimization operator includes a path optimization operator based on a single task, a path optimization operator based on a task segment, a path optimization operator based on a scrap line, and a path optimization operator based on the entry point. Step S7: Evaluate the legality of each neighborhood solution in the neighborhood solution set. If the current neighborhood solution is legal, it is determined to be a legal neighborhood solution; if the current neighborhood solution is illegal, it is repaired to transform it into a legal neighborhood solution, so as to obtain a legal neighborhood solution set. Step S8: Calculate the cost increment of each legal neighborhood solution in the legal neighborhood solution set, and select the legal neighborhood solution with the smallest cost increment as the optimal neighborhood solution. ; Step S9: Determine by querying the initialized taboo table. Is the operation prohibited? If not, then... Updated to If so, then calculate. Actual total cost And execute step S10; Step S10: Determine Is it less than the preset global optimal solution cost? If so, then Updated to If not, then select the legal neighborhood solution with the second smallest cost increment from the legal neighborhood solution set as the legal neighborhood solution. Repeat steps S9-S10 until the current... The actual total cost is less than Until then, and Update to current .
2. The part cutting path planning method considering scrap line selection and priority constraints according to claim 1, characterized in that: In step S2, the undirected graph is processed to identify all embedded parts and scrap areas, specifically including the following sub-steps: Step S21: Use the depth-first search algorithm to identify all closed contours in the undirected graph; Step S22: Construct a tree-like data structure containing all nested hierarchical relationships of closed contours; Step S23: Based on the tree data structure, identify all embedded parts and scrap areas in the undirected graph.
3. The part cutting path planning method considering scrap line selection and priority constraints according to claim 2, characterized in that: Before step S4, the following steps are also included: Construct a task dependency graph containing all closed contours and candidate scrap lines. The task dependency graph is used to define the priority constraints between cutting tasks. The priority constraints between cutting tasks include "cut all candidate scrap lines connected to the current closed contour" and "cut the inner closed contour first and then cut the outer closed contour". Based on the task dependency graph, generate a list of preceding and subsequent cutting tasks for each cutting task.
4. The part cutting path planning method considering scrap line selection and priority constraints according to claim 3, characterized in that: Step S4 specifically includes the following sub-steps: In step S41: Traverse each embedded part, calculate the number P of selected fragments associated with the current embedded part in the selected fragments in the effective fragments candidate set, and determine whether P is greater than the preset candidate fragments number threshold. If yes, output the selected fragment; otherwise, select the shortest candidate fragment that does not intersect with any selected fragment and satisfies the position constraint from the effective fragments candidate set and output it. Step S42: Determine whether the size of the waste area is greater than the preset size threshold. If not, proceed to step S43. If yes, adopt a heuristic strategy to select the candidate scrap lines output in step S41 to divide the waste area that exceeds the preset size threshold until the size of all the divided waste sub-regions is less than the preset size threshold. Step S43: Based on all selected candidate scrap lines and all embedded parts, construct a cutting task list, and perform topological sorting on the cutting task list according to the task dependency graph to obtain an ordered cutting task list; Step S44: Construct the initial cutting path, and select the cutting tasks to be inserted one by one from the ordered cutting task list in a specific order to insert them into the initial cutting path to generate the initial solution of the cutting path. ; For each cutting task to be inserted, first determine its feasible insertion interval in the current initial cutting path based on its dependencies on preceding and succeeding cutting tasks; Then iterate through all the positions within the feasible insertion interval, calculate the empty path length increment for each position, and select the position with the smallest empty path length increment to perform the insertion operation.
5. A part cutting path planning method considering scrap line selection and priority constraints according to claim 4, characterized in that: In step S6, the path optimization operators based on a single task include a swap operator and an insertion operator; the path optimization operators based on a task segment include a task segment reversal operator, a random rearrangement operator within a task segment, and a task segment swap operator; the path optimization operators based on a scrap line include a scrap line addition operator, a scrap line removal operator, and a scrap line replacement operator. Generating neighborhood solutions using a commutation operator involves the following sub-steps: First, in the current solution Randomly select the i-th cutting task from the cutting path in the code. Then calculate A movable window within the cutting path; then select the j-th cutting task within that movable window. Final judgment and Check if each is within the other's movable window; if so, swap. and The position is determined to generate a neighborhood solution; otherwise, no operation is performed. The process of generating neighborhood solutions using the insertion operator includes the following sub-steps: First, in the current solution Randomly select the u-th cutting task from the cutting path in the code. Then calculate The movable window in the cutting path; finally, Insert the v-th cutting task into this movable window The corresponding position is used to generate a neighborhood solution; The task segment inversion operator is used to generate neighborhood solutions, which includes the following sub-steps: First, in the current solution Randomly select the a-th cutting task from the cutting path in the code. up to the b-th cutting task Cutting task segments between ,in, and There are no direct or indirect priority dependencies; then the task segment is divided. All cutting tasks within the same segment are reordered in reverse order to obtain new cutting task segments. That is, the neighborhood solution; The neighborhood solution is generated using a random rearrangement operator within the task segment, which includes the following sub-steps: First, in the current solution Randomly select the c-th cutting task from the cutting path in the code. up to the dth cutting task Cutting task segments between ,in, and There are no direct or indirect priority dependencies; then the task segment is divided. All cutting tasks within the task are randomly shuffled and reordered to obtain new cutting task segments. That is, the neighborhood solution; The task segment exchange operator is used to generate neighborhood solutions, which includes the following sub-steps: First, in the current solution Two cutting task segments are randomly selected from the cutting path in the code. and ; then judge and Do all of the following conditions be met: No cutting task in the process can be Any pre- or post-cutting task in the cutting process; or No cutting task in the process can be Pre- or post-cutting tasks for any cutting task in the process; set up For located and The "middle segment" formed by all the cutting tasks in between, There is no cutting task in it. The preceding cutting task for any cutting task in the process, and There is no cutting task in it. Any subsequent cutting task in the cutting process; If so, then Corresponding position and Swap the corresponding positions; otherwise, do nothing.
6. A part cutting path planning method considering scrap line selection and priority constraints according to claim 5, characterized in that: In step S6, the neighborhood solution is generated using the added scrap line operator, which specifically includes the following sub-steps: First, select a new scraping line from the pool of valid candidate scraping lines that does not intersect with any of the previously selected scraping lines. Then use a greedy strategy to... Insert into the current solution The optimal position of the cutting path in the process is determined to generate a neighborhood solution. The neighborhood solution is generated using the debris removal operator, which includes the following sub-steps: First, randomly select one scraping line from the selected set of scraping lines. ; then check all related Related parts; finally From the current solution Remove from the cutting path and determine After removal, check if the constraints of "a single part must have at least two scrap lines" and "a single part must have at least two scrap lines that are not on the same edge" are met. If so, generate the removal. If the new solution is obtained later, it is the neighborhood solution; otherwise, no new solution is generated. The neighborhood solution is generated using the replacement fragmentation line operator, which includes the following sub-steps: First, randomly select one scraping line from the candidate set of valid scraping lines. And randomly select a scrap line from the selected scrap line set. Next, determine whether the following conditions are met simultaneously: It does not intersect with any currently selected shredding line; for all lines with Related parts, in After removal, the constraints of "a single part must have at least two scrap lines" and "a single part must have at least two scrap lines that are not on the same edge" are satisfied; if so, then use... replace and the replacement From the current solution Remove from the cutting path in the process to generate a neighborhood solution; otherwise, no replacement operation is performed. The neighborhood solution is generated using a path optimization operator based on the entry point, which includes the following sub-steps: From the current solution Randomly select a closed contour and for Replace with a different Corresponding entry point new entry point To generate neighborhood solutions.
7. A part cutting path planning method considering scrap line selection and priority constraints according to claim 6, characterized in that: In step S8, the cost increment for each legal neighborhood solution in the legal neighborhood solution set is calculated, which specifically includes the following sub-steps: Calculate the cost increment of neighborhood solutions generated using the exchange operator. ,in, The specific calculation formula is as follows: ; ; in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the exchange operator; Indicates before and after the exchange. and The cost difference between the four cutting task segments connected to the corresponding adjacent cutting tasks; This represents the distance between the (i-1)th cutting task and the jth cutting task; Calculate the cost increment of the neighborhood solution generated using the insertion operator. ,in, The specific calculation formula is as follows: ; ; in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the insertion operator; express break away Corresponding position and insertion The sum of the cost changes of the three cutting task segments caused by the corresponding positions; Calculate the cost increment of neighborhood solutions generated using the task segment inversion operator. ,in, The specific calculation formula is as follows: ; ; ; ; ; ; in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the task segment inversion operator; This indicates the increment of the empty path within the cutting task segment and the empty path of the cutting task segment and its adjacent cutting tasks before and after the reversal. This indicates the length of the idle path within the segment of the cutting task before reversal; This represents the sum of the idle path lengths of the cutting task segment before and after the reverse order reordering; This indicates the length of the idle path within the task segment after reversing the order; This represents the sum of the idle path lengths of the reordered cutting task segments and their preceding and following cutting tasks. This represents the m-th cutting task; Calculate the cost increment of neighborhood solutions generated using the intra-task random rearrangement operator. ,in, The specific calculation formula is as follows: ; ; ; ; ; ; in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the random rearrangement operator within the task segment; This indicates the increment of the empty path within the cutting task segment and the empty path of the cutting task segment and its adjacent cutting tasks before and after rearrangement. Indicates the length of the idle path within the task segment before reordering; This represents the sum of the idle path lengths of the cutting task segment before the reordering and its preceding and following cutting tasks. This indicates the length of the idle path within the task segment after the disordered reordering; This represents the sum of the idle path lengths of the reordered cutting task segment and its preceding and following cutting tasks. Calculate the cost increment of neighborhood solutions generated using the task segment exchange operator. ,in, The specific calculation formula is as follows: ; ; in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the task segment exchange operator; This represents the cost difference between the two cut task segments and the four externally connected cut task segments before and after the swap. Calculate the cost increment of neighborhood solutions generated using the added scrap line operator. ,in, The specific calculation formula is as follows: ; ; in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the added scrap line operator; This represents the weight corresponding to the increment in the number of perforations generated during the process of generating neighborhood solutions using the added scrap line operator; This indicates the cutting task corresponding to position n where the scrap line is added; This indicates the addition of a new scrap line that does not intersect with any existing scrap lines; This indicates the change in the idle path length after the addition of the scrap line; Calculate the cost increment of neighborhood solutions generated using the scrap removal operator. ,in, The specific calculation formula is as follows: ; ; in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the scrap removal operator; This represents the weight corresponding to the increment in the number of perforations generated during the process of generating neighborhood solutions using the scrap removal operator; This represents the (o-1)th cutting task; This represents the (o+1)th cutting task; This indicates a selected scrap line that needs to be removed, and lie in and between; This indicates the change in the length of the idle path after the scrap line is removed. Calculate the cost increment of neighborhood solutions generated using the replacement scrap line operator. ,in, The specific calculation formula is as follows: ; in, This represents the weight corresponding to the cost increment of the neighborhood solution generated using the replacement scrap line operator; The cost increment of the neighborhood solution generated by the path optimization operator based on the entry point is calculated. ,in, The specific calculation formula is as follows: ; ; in, This represents the weight corresponding to the cost increment of the neighborhood solution generated by the path optimization operator based on the entry point; Represents outline respectively Cutting Cutting task segments Difference; Indicates the first A cut ; Indicates the first A cut ; Indicates the new knife entry point; Represents the old entry point; This represents the contour containing the new entry point; This indicates a contour that includes the old entry point.
8. A part cutting path planning method considering scrap line selection and priority constraints according to claim 4, characterized in that: In step S7, if the current neighborhood solution is invalid, it is repaired to transform it into a valid neighborhood solution. This includes the following sub-steps: A heuristic strategy is used to select the optimal scrap line from the set of valid candidate scrap lines. The scrap regions in the current illegal neighborhood solutions that exceed the preset size threshold are segmented until the size of all the resulting scrap sub-regions is smaller than the preset size threshold.
9. A part cutting path planning method considering scrap line selection and priority constraints according to claim 1, characterized in that: It also includes the following steps: Determine if it falls within the preset number of iterations. Is it in the un- If the state is such that, then it indicates The search may stall, triggering a warm restart mechanism; otherwise, it indicates... Still undergoing optimization, without triggering the hot restart mechanism; The specific operation of the hot restart mechanism is as follows: First, based on the current situation Randomly select one of the following path optimization operators: a path optimization operator based on a single task, a path optimization operator based on a task segment, a path optimization operator based on a scrap line, and a path optimization operator based on the entry point, and generate a path optimization operator that is consistent with the current one. New solutions with different structures ; Then, clear the current taboo list and generate the... The path optimization operators used are added to the cleared tabu list; finally, the generated... Assigned to Then repeat step S6.