Multi-specification one-dimensional nesting method and system, electronic device, storage medium
Patent Information
- Application Number
- CN202611052299.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-15
- Publication Date
- 2026-09-29
AI Technical Summary
[0004]本发明提供一种多规格一维套料方法及系统、电子设备、存储介质,用以解决相关技术中存在的不能对大规模零件进行高效率切割的缺陷,本申请的方案可以对不同规模的零件使用不同的方案进行套料,计算以及生产效率更高
[0015]本发明提供的多规格一维套料方法中,可以首先根据工厂套料的实际输入输出,进行符合套料规范的数据预处理。对于零件规模较小的案例,完成分阶段的多目标优化的线性规划模型,实现计算效率、原材料利用率和切割效率的多目标优化。面向大规模零件套料案例,使用列生成算法从建模和算法设计方面进行加速求解,实现大规模切割问题的算法加速,同时得到利用率较高的切割方案。面向不同复杂度工单的算法组合方法,直接求解和列生成算法优化组合,实现工单整体切割方案的多目标优化。研究计算效率优化方案,通过并行计算,数据结构优化和算法调优等进行计算效率的优化,实现算法计算速度与结果的平衡。
Smart Images

Figure CN122840344A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of parts manufacturing technology, and in particular to a multi-specification one-dimensional nesting method and system, electronic equipment, and storage medium. Background Technology
[0002] Nesting algorithms are one of the key technologies in the China Tower MES system used to optimize the use of angle steel raw materials. Their main function is to automatically generate the optimal cutting plan based on order requirements, material specifications, and inventory status, maximizing the utilization of raw materials while meeting cutting needs. Even a 1% difference in utilization rate between the cutting plans generated by the nesting algorithm can lead to increased manufacturing costs. Improving raw material utilization can significantly reduce steel procurement and lower raw material costs for enterprises.
[0003] The multi-specification one-dimensional cutting problem is a classic problem in the field of optimization. It can be solved by various algorithms and methods, such as linear programming, greedy algorithms, and genetic algorithms. The specific choice depends on the problem size, constraints, and required accuracy. However, in the problem of large-scale cutting of angle steel for iron towers, these algorithms have not achieved the expected results. Summary of the Invention
[0004] This invention provides a multi-specification one-dimensional nesting method and system, electronic device, and storage medium to solve the defects in related technologies that cannot efficiently cut large-scale parts. The solution of this application can use different methods for nesting parts of different sizes, resulting in higher calculation and production efficiency.
[0005] This invention provides a method for multi-specification one-dimensional nesting, comprising: Pre-process the target parts that require nesting; The size of the target part is determined. When the size of the target part is less than a set threshold, a linear programming model is established to calculate the nesting method for the target part. When the size of the target part is greater than a set threshold, the nesting method for the target part is calculated using a column generation algorithm. The nesting method for the target part is optimized from multiple dimensions.
[0006] According to the multi-specification one-dimensional nesting method provided by the present invention, the step of establishing a linear programming model to calculate the nesting method for the target part includes: By setting optimization objectives and constraints, mixed-integer programming is used to directly solve the nesting method for the target part.
[0007] According to the multi-specification one-dimensional nesting method provided by the present invention, the column generation algorithm includes: By reducing the scale of the nesting method for the target part, a limiting main problem is obtained; The dual solution is obtained by applying the simplex method to solve the restricted principal problem. Construct a subproblem based on the dual solution; The generated column is obtained by solving the subproblem. The algorithm ends if the test number of the generated column is non-negative.
[0008] According to the multi-specification one-dimensional nesting method provided by the present invention, if the test number of the generated column is negative, the generated column is added to the constrained master problem, and the column generation and solution are performed again.
[0009] According to the multi-specification one-dimensional nesting method provided by the present invention, the optimization of the nesting method for the target part from multiple dimensions includes: The nesting method is distributed to multiple threads or multiple processes for concurrent execution; And / or, apply pre-sorting and hash indexes to improve query efficiency; And / or, use greedy algorithms and pruning strategies to optimize algorithm efficiency.
[0010] According to the multi-specification one-dimensional nesting method provided by the present invention, the optimization of the nesting method for the target part from multiple dimensions further includes: The optimized nesting method is verified. If the verified structure meets the preset standards, the nesting method is applied to produce the target part.
[0011] This invention also provides a multi-specification one-dimensional nesting calculation system, applied to the above-mentioned multi-specification one-dimensional nesting method, comprising: The preprocessing module is used to preprocess the target parts that need to be nested. The small-scale calculation module is used to determine the size of the target part. When the size of the target part is less than a set threshold, a linear programming model is established to calculate the nesting method of the target part. A large-scale calculation module is used to calculate the nesting method of the target part by applying a column generation algorithm when the size of the target part is greater than a set threshold. The optimization module is used to optimize the nesting method of the target part from multiple dimensions.
[0012] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement any of the multi-specification one-dimensional nesting methods described above.
[0013] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the multi-specification one-dimensional nesting methods described above.
[0014] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements any of the multi-specification one-dimensional nesting methods described above.
[0015] The multi-specification one-dimensional nesting method provided by this invention can first perform data preprocessing that conforms to nesting specifications based on the actual input and output of the factory nesting. For cases with small parts, a phased multi-objective optimization linear programming model is completed to achieve multi-objective optimization of computational efficiency, raw material utilization, and cutting efficiency. For large-scale parts nesting cases, a column generation algorithm is used to accelerate the solution from the aspects of modeling and algorithm design, thereby accelerating the algorithm for large-scale cutting problems and obtaining cutting schemes with high utilization. For algorithm combination methods for work orders of different complexities, direct solution and column generation algorithm optimization are combined to achieve multi-objective optimization of the overall cutting scheme of the work order. The computational efficiency optimization scheme is studied, and computational efficiency is optimized through parallel computing, data structure optimization, and algorithm tuning to achieve a balance between algorithm computation speed and results. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is a flowchart illustrating the multi-specification one-dimensional nesting method provided in an embodiment of the present invention; Figure 2 This is a flowchart illustrating the column generation algorithm provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of the multi-specification one-dimensional nesting calculation system provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the physical structure of the electronic device provided in an embodiment of the present invention. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0019] Figure 1This is a flowchart illustrating the multi-specification one-dimensional nesting method provided in an embodiment of the present invention.
[0020] like Figure 1 As shown, this embodiment provides a multi-specification one-dimensional nesting method, including: Step 101: Pre-process the target parts that need to be nested; The target part can be equipment parts such as angle iron.
[0021] In practical applications, data preprocessing refers to importing the information of the parts that need to be nested into the system. The part information needs to include segment, part number, material standard, name, material, specifications, purchase length, clamping width, cutting width, material end allowance, thickness, part number quantity, and weight information.
[0022] For example, clamping width refers to the length of the part that the equipment will clamp when the target part is pushed into the processing equipment during the processing. This length needs to be reserved during nesting after being set in advance. Cutting width refers to the amount of material consumed at the cutting point when the processing equipment cuts the target part. This consumption needs to be taken into account when nesting materials. Material end allowance refers to the fact that the target part may have uneven ends, and the uneven parts need to be partially cut off during processing. This cutting part needs to be considered when nesting. The number of part numbers refers to the maximum number of part numbers that can be arranged on a single raw material; The procurement length refers to the length of raw materials for each material standard, material, and specification in the procurement of target parts. These lengths need to be set separately, and only these lengths can be used for nesting during automatic nesting.
[0023] In practice, the cutting edge width is added to the part length. When both the clamping width and the cutting width are 0, the allowance at both ends of the raw material needs to be considered. In other cases, only one end of the material end needs to be considered, and the material segment allowance is directly subtracted from the raw material. Based on the actual input and output of the factory nesting, including raw material inventory, the cutting edge width of different equipment, and the production process, data preprocessing conforming to the nesting specifications is performed.
[0024] Step 102: Determine the size of the target part. When the size of the target part is less than a set threshold, establish a linear programming model to calculate the nesting method for the target part. In practical applications, various cutting patterns that meet the conditions can be generated using recursive or iterative algorithms based on the actual work order input, minimizing the number of patterns through utilization and other factors. The cutting patterns need to consider the following key cutting processes: 1. Equipment clamping width.
[0025] 2. Uneven joints in raw materials require allowance for cutting width.
[0026] 3. The width of the cutting edge when processing with different equipment.
[0027] 4. Workshop production process, such as the maximum allowable quantity on a single raw material, and the same part number should be placed on the same specification of raw material as much as possible.
[0028] For example, given several raw materials, each with a length of L, several different sizes of parts need to be cut. Each cutting method corresponds to a "cutting pattern," which refers to how these parts are arranged on a single raw material so that the total length does not exceed L. The goal is to select several cutting patterns and their frequency of use to satisfy the needs of all parts while minimizing the total amount of raw material used. The basic optimization objective is to minimize the total length of raw materials used, with constraints including: Constraint 1, which states that all parts obtained from cutting must meet the demand for each type of part; Constraint 2, which states that for each raw material being cut, the length of the parts produced must be less than the total length of the raw material; and Constraint 3, which states that the number of different types of parts on a single raw material cannot exceed the number required by the cutting process, and can be defined using the Big M method.
[0029] This step completes a phased, multi-objective linear programming model for optimization, achieving multi-objective optimization of computational efficiency, raw material utilization, and cutting efficiency. For schemes with fewer part types, mixed-integer programming is used for direct solution, setting optimization objectives and constraints to ensure that the cutting scheme achieves its theoretically optimal utilization rate.
[0030] Step 103: When the size of the target part is greater than a set threshold, the nesting method of the target part is calculated by applying a column generation algorithm. For cases involving large parts, direct calculations are time-consuming or fail to find the optimal solution. In this step, a column generation algorithm can be applied for nesting calculations. This algorithm is a form of the simplex method. When solving linear programming problems using the simplex method, the basic variables are only related to the number of constraints. Each iteration introduces only one new non-basic variable into the basis. Therefore, only a small portion of the variables are actually involved in the entire solution process. Simply put, the column generation algorithm finds non-basic variables that can enter the basis by solving a subproblem (pricing problem). These non-basic variables are not explicitly written in the model (they can be viewed as generating a variable; each variable is equivalent to a column, hence the name "column generation algorithm").
[0031] Step 104: Optimize the nesting method for the target part from multiple dimensions.
[0032] Figure 2 This is a flowchart illustrating the column generation algorithm provided in an embodiment of the present invention.
[0033] In an exemplary embodiment, such as Figure 2 As shown, the column generation algorithm may include the following steps: The first step is to reduce the size of the original Master Problem to obtain a Restricted Master Problem (RMP). The Restricted Master Problem RMP has the same number of constraints as the Master Problem MP, but the number of variables is much smaller. The number of constraints remains constant during the iteration of the column generation algorithm.
[0034] The second step is to use the simplex method on RMP to find the optimal solution, which yields the solution and a dual solution.
[0035] The third step is to construct a subproblem (SP) through the dual solution, solve the subproblem to obtain a new generating column, verify the test number of the generating column, and terminate the algorithm if it is non-negative; otherwise, add the generating column as a new variable to RMP.
[0036] The fourth step is to iterate repeatedly until the optimal solution is found.
[0037] In an exemplary embodiment, the optimization of the nesting method for the target part from multiple dimensions includes: The nesting method is distributed to multiple threads or multiple processes for concurrent execution; And / or, apply pre-sorting and hash indexes to improve query efficiency; And / or, use greedy algorithms and pruning strategies to optimize algorithm efficiency.
[0038] Specifically, after completing the direct solution modeling and column generation algorithm for integer programming, algorithm selection can be made based on the different complexities of the work orders, and appropriate thresholds can be set for algorithm selection. Multi-objective optimization is then implemented, considering computation time, utilization, and cutting efficiency. Optimization can be carried out in stages according to actual algorithm requirements. To ensure that the multi-specification one-dimensional cutting algorithm has good performance and stability in actual production scenarios, the algorithm needs to be optimized and tested from multiple dimensions. This stage mainly includes: parallel computing acceleration, data structure optimization, algorithm tuning and pruning strategy improvement, and nesting scheme verification based on actual factory operation data, thereby achieving the optimal balance between algorithm computation speed and material utilization.
[0039] 1. Parallel computing acceleration Since the subproblems in the column generation are independent of each other, and different nodes in the branch and bound tree can also be solved independently, modern multi-core CPUs or GPUs can be fully utilized for parallel processing. By distributing time-consuming operations such as cutting pattern generation and LP relaxation to multiple threads / processes for concurrent execution, the overall computation time is significantly reduced.
[0040] 2. Data Structure Optimization Efficient memory management and data organization are crucial to algorithm performance. Compact arrays or bitmaps can be used to represent cutting patterns, reducing memory usage; sparse matrices can be used to store the constraint coefficients of the main problem, reducing the complexity of solving the LP; caching mechanisms can be introduced to avoid repeatedly solving the same subproblems; and pre-sorting and hash indexes can be used for frequently accessed data structures to improve query efficiency.
[0041] 3. Algorithm tuning and pruning strategies To accelerate convergence and improve the quality of integer solutions, the following strategies are adopted: Column generation algorithms can only solve linear programming relaxation problems and cannot directly handle integer constraints; therefore, they can be combined with branch and bound algorithms. Heuristic initialization: A greedy algorithm is used to quickly generate a set of initial cutting patterns as the starting point for RMP.
[0042] The multi-specification one-dimensional nesting calculation system provided by the present invention is described below. The multi-specification one-dimensional nesting calculation system described below can be referred to in correspondence with the multi-specification one-dimensional nesting calculation method described above.
[0043] Figure 3 This is a schematic diagram of the structure of the multi-specification one-dimensional nesting calculation system provided in the embodiment of the present invention.
[0044] like Figure 3 As shown, the multi-specification one-dimensional nesting calculation system provided in this embodiment includes: Preprocessing module 301 is used to preprocess the target parts that need to be nested. Small-scale calculation module 302 is used to determine the size of the target part. When the size of the target part is less than a set threshold, a linear programming model is established to calculate the nesting method of the target part. The large-scale calculation module 303 is used to calculate the nesting method of the target part by applying a column generation algorithm when the size of the target part is greater than a set threshold. Optimization module 304 is used to optimize the nesting method of the target part from multiple dimensions.
[0045] Figure 4 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 4As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 can call logical instructions in the memory 430 to execute a multi-specification one-dimensional nesting method, which includes: Pre-process the target parts that require nesting; The size of the target part is determined. When the size of the target part is less than a set threshold, a linear programming model is established to calculate the nesting method for the target part. When the size of the target part is greater than a set threshold, the nesting method for the target part is calculated using a column generation algorithm. The nesting method for the target part is optimized from multiple dimensions.
[0046] Furthermore, the logical instructions in the aforementioned memory 430 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0047] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer is able to execute the multi-specification one-dimensional nesting method provided by the above methods, the method comprising: Pre-process the target parts that require nesting; The size of the target part is determined. When the size of the target part is less than a set threshold, a linear programming model is established to calculate the nesting method for the target part. When the size of the target part is greater than a set threshold, the nesting method for the target part is calculated using a column generation algorithm. The nesting method for the target part is optimized from multiple dimensions.
[0048] In another aspect, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to perform the multi-specification one-dimensional nesting method provided by the methods described above, the method comprising: Pre-process the target parts that require nesting; The size of the target part is determined. When the size of the target part is less than a set threshold, a linear programming model is established to calculate the nesting method for the target part. When the size of the target part is greater than a set threshold, the nesting method for the target part is calculated using a column generation algorithm. The nesting method for the target part is optimized from multiple dimensions.
[0049] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0050] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.
[0051] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for one-dimensional nesting of multiple specifications, characterized in that, include: Pre-process the target parts that require nesting; The size of the target part is determined. When the size of the target part is less than a set threshold, a linear programming model is established to calculate the nesting method for the target part. When the size of the target part is greater than a set threshold, the nesting method for the target part is calculated using a column generation algorithm. The nesting method for the target part is optimized from multiple dimensions.
2. The multi-specification one-dimensional nesting method according to claim 1, characterized in that, The establishment of a linear programming model to calculate the nesting method for the target part includes: By setting optimization objectives and constraints, mixed-integer programming is used to directly solve the nesting method for the target part.
3. The multi-specification one-dimensional nesting method according to claim 1, characterized in that, The column generation algorithm includes: By reducing the scale of the nesting method for the target part, a limiting main problem is obtained; The dual solution is obtained by applying the simplex method to solve the restricted principal problem. Construct a subproblem based on the dual solution; The generated list is obtained by solving the subproblem. The algorithm ends if the test number of the generated list is non-negative.
4. The multi-specification one-dimensional nesting method according to claim 3, characterized in that, If the test number of the generated column is negative, the generated column is added to the restricted main problem, and the column generation and solution are performed again.
5. The multi-specification one-dimensional nesting method according to claim 1, characterized in that, The optimization of the nesting method for the target part from multiple dimensions includes: The nesting method is distributed to multiple threads or multiple processes for concurrent execution; And / or, apply pre-sorting and hash indexes to improve query efficiency; And / or, use greedy algorithms and pruning strategies to optimize algorithm efficiency.
6. The multi-specification one-dimensional nesting method according to claim 1, characterized in that, The optimization of the nesting method for the target part from multiple dimensions further includes: The optimized nesting method is verified. If the verified structure meets the preset standards, the nesting method is applied to produce the target part.
7. A multi-specification one-dimensional nesting calculation system, applied to the multi-specification one-dimensional nesting method according to any one of claims 1-6, characterized in that, include: The preprocessing module is used to preprocess the target parts that need to be nested. The small-scale calculation module is used to determine the size of the target part. When the size of the target part is less than a set threshold, a linear programming model is established to calculate the nesting method of the target part. A large-scale calculation module is used to calculate the nesting method of the target part by applying a column generation algorithm when the size of the target part is greater than a set threshold. The optimization module is used to optimize the nesting method of the target part from multiple dimensions.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the multi-specification one-dimensional nesting method as described in any one of claims 1-6.
9. A non-transitory computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the multi-specification one-dimensional nesting method as described in any one of claims 1-6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the multi-specification one-dimensional nesting method as described in any one of claims 1-6.