A method and system for optimizing the layout of a stack of sheets
Patent Information
- Application Number
- CN202310923002.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-24
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2043-07-24
AI Technical Summary
[0004]当前虽然针对矩形排样问题的研究很多,但是尚未存在针对堆叠排样问题的研究,同时在堆叠排样的应用领域,即诸多的变压器生产企业,尚未出现针对绝缘纸板堆叠排样的技术,这些企业亟需能应用于绝缘纸板堆叠排样的技术
[0029] 1. Before executing the nesting task, divide the parts in the nesting task into subtasks based on the quantity of each type of part. Parts with the same quantity are grouped into the same subtask, and the subtask with the larger quantity of parts is executed first. This method of dividing subtasks makes full use of the leftover material generated after cutting the larger quantity of parts in the previous task. It also ensures that the number of parts in the sequence of parts participating in the genetic algorithm for sequential optimization is the same. Therefore, when placing parts, the relationship between the number of parts in the subtask and the number of sheet metals participating in the nesting needs to be considered.
Smart Images

Figure CN116956730B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of rectangular layout optimization, and more specifically, relates to a method and system for optimizing the stacking and layout of sheet metal. Background Technology
[0002] Research on the rectangular nesting problem has matured considerably. From using purely mathematical linear programming to solve the rectangular nesting problem in the 1960s to using various intelligent algorithms to solve rectangular nesting problems in production today, novel and improved intelligent algorithms such as simulated annealing, ant colony optimization, and genetic optimization have emerged in large numbers, shining brightly in the field of combinatorial optimization.
[0003] The problem of stacking and laying out insulating cardboard falls under the category of rectangular layout problems in a specific industry, but it differs from traditional rectangular layouts. Insulating cardboard needs to be stacked before being cut on a saw, thus giving rise to the stacking and laying out problem. Because a saw is used for cutting, there is a one-cut process constraint. This cutting method requires each cut to extend from one end of the board to the other without changing direction, and this operation is repeated until the entire layout drawing is completed. Since the cardboard is stacked for cutting, the layout drawing on the same stack is identical. Therefore, in actual layout, the parts need to be divided into separate stacks to minimize the number of different layout drawings and maximize the utilization of raw materials.
[0004] While there is much research on rectangular layout problems, there is no research on stacked layout problems. Furthermore, in the application field of stacked layout, namely many transformer manufacturers, there is no technology for stacked layout of insulating paperboard. These companies urgently need technology that can be applied to stacked layout of insulating paperboard. Summary of the Invention
[0005] In view of the above-mentioned defects or improvement needs of the existing technology, the present invention provides a method and system for optimizing the stacking and layout of sheet materials, the purpose of which is to minimize the number of layout patterns while ensuring the utilization rate of raw materials.
[0006] To achieve the above objectives, according to one aspect of the present invention, a method for optimizing the stacking and layout of sheet metal is provided, the method comprising the following steps:
[0007] Step 1: Divide the parts in the nesting task into tasks according to the quantity of each type of part. Group parts with the same quantity into the same subtask. The subtask with the most parts in the resulting task sequence will be executed first.
[0008] Step 2: Optimize the part sequence and sheet metal sequence using a genetic algorithm. The genetic algorithm employs a two-layer integer encoding, with one layer representing the sheet metal sequence and the other representing the part sequence.
[0009] Step 3: Use a binary tree format to represent the layout diagram to meet the process constraint of one-cutting, and use a positioning algorithm based on binary tree post-order traversal to construct the layout diagram to realize the conversion from sequence results to binary tree format for a single sheet of board.
[0010] Step 4: Based on a single sheet, an algorithm for constructing stacked sheet layouts under multiple sheet specifications and a layout diagram expansion strategy are used to adjust the layout results of the subtasks and update the sheet information and part information.
[0011] Step 5: Execute subsequent subtasks until all subtasks have completed their layout to obtain the final stacked layout result; otherwise, proceed to Step 2.
[0012] Furthermore, the part sequence has a positive and negative sign. The negative sign indicates that the part will be rotated 90° before placement. When crossing, both the part sequence and the board sequence will cross, using a double-point crossing method. The board sequence only has flip mutation, while the part mutation method has two types: flip mutation and rotation mutation. The length of the flip mutation gene is generated randomly, while the rotation mutation is to invert the code of the current position.
[0013] Furthermore, the positioning algorithm represents the layout using a binary tree and defines the concept of a combination flag. The combination flag indicates that two rectangular parts at the corresponding positions will be combined to participate in the layout. At the same time, it is defined that only the combination flag can have a subtree in the binary tree.
[0014] Furthermore, during the process of placing parts on a sheet metal, the combination flag and the part sequence form a new construction sequence. This construction sequence is used as the post-order traversal result of a binary tree to deduce the binary tree-style nesting layout. The position of the combination flag in the construction sequence is randomly generated.
[0015] Furthermore, given the set of sheet material sequences (Sheets) and the set of part sequences (Items) in the current task, with index k = 0, the algorithm for constructing stacked layouts of multi-specification sheet materials includes the following steps:
[0016] Step 1: Take Sheets[k] and Items[0]. If Items[0] can be put into Sheets[k], go to Step 2; otherwise, k = k + 1, go to Step 1.
[0017] Step 2: For the part sequence Items, generate the construction sequence structList, initialize i=0, initialize the array curNode to be empty, initialize the binary tree root to be empty, and go to step 3;
[0018] Step 3: If structList[i] = c, meaning the current position is a combination, proceed to step 5; otherwise, proceed to step 4.
[0019] Step 4: Add the current part to the array curNode, take the first element of curNode and assign it to root, i = i + 1, set root.num = min(Sheets[k].num,Items[structList[i]].num), which is the minimum value between the number of sheet k and the number of parts corresponding to structList[i], and go to step 3;
[0020] Step 5: Take out the two rectangular elements at the end of curNode, try arranging them horizontally and vertically respectively, and choose the arrangement method that forms the smallest enclosing rectangle after the arrangement. Combine the two rectangles into a new rectangle and go to step 6.
[0021] Step 6: Determine the size relationship between the rectangle generated in Step 5 and the current board material. If the combined rectangle can be placed inside the board material Sheets[k], construct a new node by using these two rectangles as the left and right subtrees, and add the node to the array curNode. Update root to the first element of the current curNode, i = i + 1; go to Step 3; if the combined rectangle cannot be placed inside the board material, go to Step 7.
[0022] Step 7: Take the current binary tree root and construct a layout diagram. The number of layout diagrams is root.num. If the number of layout diagrams is less than the number of parts, the extra parts will be added to the subsequent subtasks for placement. Add the excess material generated in the width and length directions of the sheet material Sheets[k] to the end of Sheets[k] and update k = k + 1. Repeat steps 1 to 6 until all parts in the current subtask have been placed.
[0023] Furthermore, when the area occupied by the part in the layout diagram is smaller than the remaining material of the sheet, the layout diagram is expanded horizontally or vertically.
[0024] Furthermore, the width and height of the layout diagram are obtained and compared with the width and height of the current board. If the width or height of the layout diagram is less than half the width or height of the board, the layout diagram needs to be expanded. The expansion direction is horizontal expansion and vertical expansion. When both the width and height directions can be expanded, an expansion direction is randomly selected. The number of expansions is determined by the quantitative relationship between the side length of the board and the side length of the part in the expansion direction, as well as the quantitative relationship between the number of parts and the number of board.
[0025] Furthermore, in step five, it is determined whether the algorithm termination condition has been met. If so, the result after the current subtask is recorded, and the remaining parts in the subtask are incorporated into the subsequent subtasks. If there is no subtask in the subsequent subtasks with the same number of remaining parts, a new subtask is created, and the subtask sequence is reordered. At the same time, the leftover material generated after the previous subtask is added to the sheet material sequence when the next subtask is laid out. Otherwise, the selection, crossover, and mutation operations of the genetic algorithm are executed to generate new individuals.
[0026] The present invention also provides a board stacking and layout optimization system, the system including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the board stacking and layout optimization method as described above.
[0027] The present invention also provides a computer-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the board stacking and layout optimization method as described above.
[0028] In summary, compared with the prior art, the plate stacking and layout optimization method and system provided by the present invention have the following advantages:
[0029] 1. Before executing the nesting task, divide the parts in the nesting task into subtasks based on the quantity of each type of part. Parts with the same quantity are grouped into the same subtask, and the subtask with the larger quantity of parts is executed first. This method of dividing subtasks makes full use of the leftover material generated after cutting the larger quantity of parts in the previous task. It also ensures that the number of parts in the sequence of parts participating in the genetic algorithm for sequential optimization is the same. Therefore, when placing parts, the relationship between the number of parts in the subtask and the number of sheet metals participating in the nesting needs to be considered.
[0030] 2. Considering that the genetic algorithm cannot be applied to the stacking process, a two-layer integer encoding method is designed, and flip mutation and rotation mutation operators are set. In order to accelerate the convergence of the algorithm, an elite individual strategy is adopted, that is, the elite individuals of the previous generation directly enter the next generation.
[0031] 3. Using a binary tree format to store the layout ensures that the generated layout meets the one-size-fits-all constraint. The combination flag simplifies the positioning algorithm required for one-size-fits-all layout by combining pairs of rectangles into new rectangles for use in the layout. Furthermore, the randomly generated combination flag ensures the diversity of rectangle combinations, thus enabling diverse layout options.
[0032] 4. The algorithm for constructing the stacking and layout of multi-specification sheet materials improves the positioning algorithm to realize the stacking process of parts, and designs a layout diagram expansion strategy. When the parts in the layout diagram only occupy a small part of the sheet material, and the rest is a large part of the surplus material, the layout diagram is expanded horizontally or vertically to increase the area occupied by the parts in the sheet material, while reducing the number of sheets of raw material consumed.
[0033] 5. For the parts sequence, if the number of parts in the previous subtask is greater than the number of sheet metal used, then check if the number of subsequent subtasks matches the number of remaining parts in the previous task. If so, these remaining parts are merged into the subtask; otherwise, a new subtask is created to arrange these remaining parts and added to the subtask sequence. At the same time, the subtask sequence is re-sorted according to the number of parts. In this way, the leftover materials generated after the previous subtasks are arranged are used in the arrangement process of subsequent subtasks, which improves the reuse rate of leftover materials and reduces the amount of raw material sheet metal used. Attached Figure Description
[0034] Figure 1 This is a flowchart illustrating an optimized method for stacking and arranging sheet metal provided by the present invention.
[0035] Figure 2 This is a diagram illustrating the division of nesting tasks;
[0036] Figure 3 It is a flowchart of the construction algorithm for stacking and arranging multi-specification plates;
[0037] Figure 4 (a) to (g) are the results of the stacking and layout of the plates, respectively. Detailed Implementation
[0038] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.
[0039] This invention provides a method and system for optimizing sheet metal stacking and layout. It breaks down the sheet metal stacking and layout optimization problem into part positioning optimization and part-to-sheet material sequencing optimization. A stacking and layout construction algorithm for multi-specification sheet metal is designed to complete part positioning, and a genetic algorithm is designed to optimize the sequencing of parts and sheets. Considering the special characteristics of the stacking and layout problem, the layout task is first divided during the layout process, grouping parts with the same number of parts into the same subtask and prioritizing subtasks with more parts. Within each subtask, the genetic algorithm and the stacking and layout construction algorithm for multi-specification sheet metal are used to transform the part sequence and sheet metal sequence structure into a layout. The subtask sequence is then updated until all subtasks are completed. This approach maximizes material utilization while minimizing the variety of generated layout diagrams.
[0040] Please see Figure 1 , Figure 2 , Figure 3 and Figure 4 The optimization method mainly includes the following steps:
[0041] Step 1: Divide the parts in the nesting task into tasks according to the quantity of each type of part. Group parts with the same quantity into the same subtask, and execute the subtask with the most parts in the resulting task sequence first.
[0042] Before executing the nesting task, the parts in the nesting task are divided into tasks according to the quantity of each type of part. Parts with the same quantity are grouped into the same subtask, and the subtask with more parts is executed first. This method of dividing subtasks can make full use of the leftover material generated after cutting the larger number of parts in the previous task. At the same time, it can also ensure that the number of parts in the part sequence participating in the genetic algorithm for sequential optimization is the same. Therefore, when placing parts, the relationship between the number of parts in the subtask and the number of sheet metals participating in the nesting needs to be considered.
[0043] In this embodiment, such as Figure 2 As shown, assuming there are several types of parts involved in the layout, after dividing and sorting the tasks, a subtask sequence is obtained, which contains three subtasks.
[0044] Step 2: Optimize the part sequence and the sheet metal sequence using a genetic algorithm. The genetic algorithm uses a two-layer integer encoding, with one layer being the sheet metal sequence and the other layer being the part sequence.
[0045] Specifically, the current subtask is initialized, and both the sheet metal and the parts are encoded using integers. The part codes have positive and negative signs, and the part sequences and sheet metal sequences are randomly generated according to the set population size.
[0046] This implementation takes into account the characteristics of multi-specification sheet metal layout, and therefore designs a double-layer integer encoding method as the encoding method for the genetic algorithm. One layer is the sheet metal sequence, and the other layer is the part sequence. The part sequence is marked with a positive or negative sign, with a negative sign indicating that the part will be rotated 90° before placement. During crossover, both the part sequence and the sheet metal sequence will cross over, using a double-point crossover method. In terms of mutation methods, the sheet metal sequence only has flip mutation, while the part mutation methods have two types: flip mutation and rotation mutation. The length of the flip mutation gene is generated randomly, while the rotation mutation simply inverts the code at the current position.
[0047] The optimization of part sequences and sheet metal sequences using genetic algorithms includes the following sub-steps:
[0048] Step 1: Initialize the population and generate the plate sequence and part sequence.
[0049] Step 2: Execute the multi-specification board stacking and layout construction algorithm for each individual to transform the sequence results into a layout.
[0050] Step 3: Record the current best individual.
[0051] Step 4: Determine if the algorithm termination condition is met. If yes, the algorithm ends; otherwise, proceed to step 5.
[0052] Step 5: Perform selection, crossover, and mutation operations to generate new individuals, then go to step 2.
[0053] Considering that the genetic algorithm is not applicable to the stacking process, a two-layer integer encoding method was designed, and flip mutation and rotation mutation operators were set. In order to accelerate the convergence of the algorithm, an elite individual strategy was adopted, that is, the elite individuals of the previous generation directly enter the next generation.
[0054] Step 3: The layout diagram is represented using a binary tree format to meet the process constraint of one-cutting, and a positioning algorithm based on binary tree post-order traversal is used to realize the conversion from sequence results to binary tree format for a single sheet of board.
[0055] To ensure the layout meets the constraint of a single cut while achieving a more compact layout, a positioning algorithm based on the post-order traversal of a binary tree was designed. This algorithm represents the layout using a binary tree and defines the concept of a combination flag. The combination flag indicates that two rectangular parts at that position will be combined before participating in the layout. Furthermore, it defines that only the combination flag can have a subtree in the binary tree. During the placement of parts on a sheet metal, the combination flag and the part sequence form a new construction sequence. This construction sequence is used as the post-order traversal result of the binary tree to deduce the binary tree-based layout. The position of the combination flag in the construction sequence is randomly generated, thus ensuring the diversity of the layout.
[0056] The combination flag indicates that the two rectangles preceding this position will be combined into a new rectangle. The combination flag and the part sequence together constitute the corresponding construction sequence. This construction sequence is used as the result of the post-order traversal of the binary tree layout, thus allowing the reverse derivation of the binary tree-formatted layout diagram. Specific steps include:
[0057] Step 1: Based on the arrangement sequence of the parts, randomly generate the corresponding construction sequence structList, initialize i=0, initialize the array curNode to empty, and the binary tree root to empty.
[0058] Step 2: If structList[i] = c, that is, the current position is a combination position, go to step 4; otherwise, go to step 3.
[0059] Step 3: Add the current part to curNode, take the first element of curNode and assign it to root, i = i + 1, then go to step 2.
[0060] Step 4: Take out the two rectangle elements at the end of curNode, try vertical and horizontal arrangement respectively, and choose the arrangement method with the smallest area after arrangement to combine the two rectangles into a new rectangle. The width of the new rectangle generated by vertical arrangement is equal to the sum of the widths of the two rectangles, and the height is equal to the maximum value of the heights of the two rectangles. The calculation method for horizontal arrangement is the opposite of vertical arrangement. Proceed to step 5.
[0061] Step 5: Determine the size relationship between the rectangle generated in Step 4 and the current board material. If the combined rectangle can be placed inside the board material, construct a new node by using the two rectangles in Step 4 as the left and right subtrees, and add this node to the array curNode. Update root to the first element of the current curNode, i = i + 1, and go to Step 2. If the combined rectangle cannot be placed inside the board material, go to Step 6.
[0062] Step 6: Take the current binary tree root to construct the layout diagram. Repeat steps 2-5 for any of the other two spaces of the board until all parts are placed. The final root is the final layout.
[0063] Based on the characteristics of the one-size-fits-all constraint, any layout diagram with this constraint can be divided into the placement of rectangles. Therefore, using a binary tree format to store the layout ensures that the generated layout diagram satisfies the one-size-fits-all constraint. The combination flag simplifies the positioning algorithm required for one-size-fits-all layout by combining pairs of rectangles into new rectangles for inclusion in the layout. Furthermore, the randomly generated combination flag ensures the diversity of rectangle combinations, thus enabling the generation of diverse layouts.
[0064] Step 4: Based on a single sheet, an algorithm for constructing sheet stacking and layout under multiple specifications and a layout diagram expansion strategy are used to adjust the layout results of the subtasks and update the sheet and part information.
[0065] The positioning algorithm is improved to adapt to the problem of stacking and arranging multiple sheet metal specifications. Given a set of sheet metal sequences (Sheets) and a set of part sequences (Items) in the current task, with index k=0, the algorithm steps for constructing the stacking and arranging of multiple sheet metal specifications include:
[0066] Step 1: Take Sheets[k] and Items[0]. If Items[0] can be put into Sheets[k], go to Step 2; otherwise, k = k + 1, go to Step 1.
[0067] Step 2: For the part sequence Items, generate the construction sequence structList, initialize i=0, initialize the array curNode to be empty, initialize the binary tree root to be empty, and go to step 3;
[0068] Step 3: If structList[i] = c, meaning the current position is a combination, proceed to step 5; otherwise, proceed to step 4.
[0069] Step 4: Add the current part to the array curNode, take the first element of curNode and assign it to root, i = i + 1, set root.num = min(Sheets[k].num,Items[structList[i]].num), which is the minimum value between the number of sheet k and the number of parts corresponding to structList[i], and go to step 3;
[0070] Step 5: Take out the two rectangular elements at the end of curNode, try arranging them horizontally and vertically respectively, and choose the arrangement method that forms the smallest enclosing rectangle after the arrangement. Combine the two rectangles into a new rectangle and go to step 6.
[0071] Step 6: Determine the size relationship between the rectangle generated in Step 5 and the current board material. If the combined rectangle can be placed inside the board material Sheets[k], construct a new node by using these two rectangles as the left and right subtrees, and add the node to the array curNode. Update root to the first element of the current curNode, i = i + 1; go to Step 3; if the combined rectangle cannot be placed inside the board material, go to Step 7.
[0072] Step 7: Construct a layout diagram from the current binary tree root. The number of layout diagrams is root.num. If the number of layout diagrams is less than the number of parts, the extra parts will be added to subsequent subtasks for placement. Add the excess material generated in the width and length directions of Sheets[k] to the end of Sheets[k], and update k = k + 1; repeat steps 1 to 6 until all parts in the current subtask have been placed.
[0073] In this embodiment, the algorithm for constructing the stacking and layout of multi-specification sheet materials improves the positioning algorithm to realize the part stacking process, and a layout diagram expansion strategy is designed. When the part in the layout diagram occupies only a small part of the sheet material, and the rest is a large part of the surplus material, the layout diagram is expanded horizontally or vertically to increase the area occupied by the part in the sheet material, while reducing the number of sheets of raw material consumed.
[0074] First, obtain the width and height of the layout diagram and compare it with the width and height of the current board material. If the width or height of the layout diagram is less than half the width or height of the board material, the layout diagram needs to be expanded. The expansion direction is horizontal expansion and vertical expansion. When both the width and height directions can be expanded, an expansion direction is randomly selected. The number of expansions is determined by the quantitative relationship between the side length of the board material and the side length of the parts in the expansion direction, as well as the quantitative relationship between the number of parts and the number of board materials. In this way, the number of parts in a small number of piles is reduced while the amount of raw material board material used is reduced.
[0075] Step 5: Execute subsequent subtasks until all subtasks have completed their layout to obtain the final stacked layout result; otherwise, proceed to Step 2.
[0076] The algorithm determines whether the termination condition has been met. If so, it records the result of the current subtask's layout and incorporates the remaining parts from the subtask into subsequent subtasks. If no subsequent subtask has the same number of remaining parts, a new subtask is created, and the subtask sequence is reordered. Simultaneously, the leftover material from the previous subtask's layout is added to the sheet metal sequence for the next subtask's layout, ensuring that the leftover material from the previous subtask can be used for subsequent subtasks, thus reducing the amount of raw material sheet metal used. Otherwise, the genetic algorithm performs selection, crossover, and mutation operations to generate new individuals. The selection operator uses an elite retention strategy, meaning a certain percentage of elite individuals from the previous generation directly enter the next generation. The crossover operator uses two-point crossover, while avoiding duplicate gene segments after crossover. The mutation operators include flip mutation and rotation mutation; sheet metal can only undergo flip mutation, while parts can undergo both flip mutation and rotation mutation.
[0077] Adjust the sheet metal and part information for subsequent subtasks based on the layout of the previous subtask. If the leftover material generated in the previous subtask is judged as scrap according to the scrap standard, it should be discarded directly; otherwise, the leftover material generated in the previous subtask should be added to the current sheet metal sequence for use in the subsequent layout process.
[0078] For the parts sequence, if the number of parts in the previous subtask is greater than the number of sheet metal used, then it is checked whether the number of subsequent subtasks matches the number of remaining parts in the previous task. If so, these remaining parts are merged into the subtask; otherwise, a new subtask is created to arrange these remaining parts and added to the subtask sequence. At the same time, the subtask sequence is re-sorted according to the number of parts. In this way, the leftover materials generated after the previous subtasks are arranged are used in the arrangement process of subsequent subtasks, which improves the reuse rate of leftover materials and reduces the amount of raw material sheet metal used.
[0079] Once all subtasks are completed, the run ends, completing the board stacking and layout process. Figure 4 The stacking and layout results are shown. There are three types of sheet metal, represented by 0, 1, and 2. 0*15 indicates that 15 sheets of sheet metal numbered 0 were used. The types of parts are represented by numbers 1 to 14.
[0080] After optimizing the stacking and layout of the boards, output the layout result diagram, and at the same time, compile statistics on the boards used and the surplus materials generated to facilitate the subsequent cutting and blanking process for operators.
[0081] The present invention also provides a board stacking and layout optimization system, the system including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the board stacking and layout optimization method as described above.
[0082] The present invention also provides a computer-readable storage medium storing machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the board stacking and layout optimization method as described above.
[0083] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for optimizing the stacking and layout of sheet metal, characterized in that, The method includes the following steps: Step 1: Divide the parts in the nesting task into tasks according to the quantity of each type of part. Group parts with the same quantity into the same subtask. The subtask with the most parts in the resulting task sequence will be executed first. Step 2: Optimize the part sequence and sheet metal sequence using a genetic algorithm. The genetic algorithm employs a two-layer integer encoding, with one layer representing the sheet metal sequence and the other representing the part sequence. Step 3: Use a binary tree format to represent the layout diagram to meet the process constraint of one-cutting, and use a positioning algorithm based on binary tree post-order traversal to construct the layout diagram to realize the conversion from sequence results to binary tree format for a single sheet of board. Step 4: Based on a single sheet, an algorithm for constructing stacked sheet layouts under multiple sheet specifications and a layout diagram expansion strategy are used to adjust the layout results of the subtasks and update the sheet information and part information. Step 5: Execute subsequent subtasks until all subtasks have completed their layout to obtain the final stacked layout result; otherwise, proceed to Step 2.
2. The method for optimizing the stacking and layout of sheet metal as described in claim 1, characterized in that: The part sequence has a plus or minus sign. The minus sign indicates that the part will be rotated 90° before placement. When crossing, both the part sequence and the board sequence will cross, using a double-point crossing method. The board sequence only has flip mutation, while the part mutation has two methods: flip mutation and rotation mutation. The length of the flip mutation gene is generated randomly, while the rotation mutation is to invert the code of the current position.
3. The method for optimizing the stacking and layout of sheet metal as described in claim 1, characterized in that: The positioning algorithm represents the layout using a binary tree and defines the concept of a combination flag. The combination flag indicates that two rectangular parts at the corresponding positions will be combined to participate in the layout. It also defines that only the combination flag can have a subtree in the binary tree.
4. The method for optimizing the stacking and layout of sheet metal as described in claim 3, characterized in that: In the process of placing parts on a plate, the combination of the flag bits and the part sequence forms a new construction sequence. This construction sequence is used as the post-order traversal result of a binary tree, thereby deducing the binary tree-style nesting layout. The position of the combined flag in the constructed sequence is randomly generated.
5. The method for optimizing the stacking and layout of sheet metal as described in claim 1, characterized in that: Given a set of sheet sequence sequences (Sheets) and a set of part sequence sequences (Items) in the current task, index k =0, the algorithm for constructing multi-specification board stacking and layout includes the following steps: step1: Get the sheet Sheets[ k ] and parts Items[0], if Items[0] can be placed into Sheets[ k In the middle, proceed to step 2, otherwise k = k +1, proceed to step 1; Step 2: Generate a structList from the item sequence Items and initialize it. i =0, initialize the array curNode to empty, the binary tree root to empty, go to step 3; Step 3: If structList[ i If ]=c, it means the current position is a combination position, go to step 5; otherwise, go to step 4. Step 4: Add the current part to the array curNode, and assign the first element of curNode to root. i = i +1, change root.num = min(Sheets[ k ].num, Items[structList[ i ].num), i.e., the board material. k The number and structList[ i [The minimum number of parts is required; proceed to step 3.] Step 5: Take out the two rectangular elements at the end of curNode, try arranging them horizontally and vertically respectively, and choose the arrangement method that forms the smallest enclosing rectangle after the arrangement. Combine the two rectangles into a new rectangle and go to step 6. Step 6: Determine the size relationship between the rectangle generated in Step 5 and the current sheet material. If the combined rectangle can fit into the sheet material... k Within the [] array, construct new nodes using these two rectangles as left and right subtrees, and add these nodes to the `curNode` array. Update the `root` to the first element of the current `curNode`. i = i +1; Proceed to step 3; If the combined rectangle cannot be placed within the board, proceed to step 7; Step 7: Construct a layout diagram from the current binary tree root. The number of layout diagrams is root.num. If the number of layout diagrams is less than the number of parts, the extra parts will be added to subsequent subtasks for placement; Place the sheet materials [Sheets[]]. k Excess material generated in the width and length directions is added to the Sheets. k After ], and update k = k +1; Repeat steps 1 through 6 until all parts in the current subtask have been placed.
6. The method for optimizing the stacking and layout of sheet metal as described in claim 5, characterized in that: When the area occupied by the part in the layout diagram is smaller than the remaining material of the sheet, the layout diagram is expanded horizontally or vertically.
7. The method for optimizing the stacking and layout of sheet metal as described in claim 6, characterized in that: Obtain the width and height of the layout diagram and compare it with the width and height of the current board. If the width or height of the layout diagram is less than half the width or height of the board, the layout diagram needs to be expanded. The expansion direction is horizontal expansion and vertical expansion. When both the width and height directions can be expanded, an expansion direction is randomly selected. The number of expansions is determined by the quantitative relationship between the side length of the board and the side length of the part in the expansion direction, as well as the quantitative relationship between the number of parts and the number of board.
8. The method for optimizing the stacking and layout of sheet metal as described in claim 1, characterized in that: In step five, it is determined whether the algorithm termination condition has been met. If so, the result after the current subtask is recorded, and the remaining parts in the subtask are merged into the subsequent subtask. If there is no subtask in the subsequent subtask with the same number of remaining parts, a new subtask is created, and the subtask sequence is reordered. At the same time, the leftover material generated after the previous subtask is added to the plate sequence when the next subtask is laid out. Otherwise, the selection, crossover, and mutation operations of the genetic algorithm are performed to generate new individuals.
9. A system for optimizing the stacking and layout of sheet metal, characterized in that: The system includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the board stacking and layout optimization method according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores machine-executable instructions, which, when invoked and executed by a processor, cause the processor to implement the board stacking and layout optimization method according to any one of claims 1-8.
Citation Information
Patent Citations
Piece arrangement method and device based on genetic algorithm
CN113642264A
Rectangular intelligent layout method and system based on bias genetic algorithm
CN114169572A