Intelligent nesting method, equipment and storage medium based on array combination optimization
Through the intelligent nesting method of array combination optimization, the position and angle of the sub-cut pieces are optimized, which solves the problem of insufficient optimization of special-shaped plate layout in the existing technology, and realizes the improvement of material utilization rate and the improvement of automatic nesting efficiency.
Patent Information
- Application Number
- CN202510578390.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-05-07
AI Technical Summary
When processing special-shaped plates, the layout plans automatically generated by the existing intelligent nesting system are often not optimized enough and require further manual adjustments, making it difficult to maximize material utilization.
An intelligent nesting method based on array combination optimization is adopted. By parsing the target graphic file, classifying the cutting piece information, and constructing the initial layout plan, the fitness function is used to optimize the position and angle of the sub-pieces, allowing slight overlap to improve material utilization, and combining cross processing and mutation operations to generate the optimal layout plan.
The material utilization rate is improved. By optimizing the spacing and angles of the sub-pieces, the optimal layout plan is generated, the overlapping area is reduced, and the efficiency of automatic nesting and material utilization are improved.
Smart Images

Figure CN120106315B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an intelligent nesting method, device and storage medium based on array combination optimization. Background Art
[0002] Intelligent nesting technology is an advanced method that combines computer-aided design and artificial intelligence to optimize the cutting and placement of materials during the manufacturing process. This technology has a wide range of applications, including but not limited to cutting, welding, processing flexible materials (such as fabric and leather), and CNC woodworking equipment.
[0003] Although intelligent nesting technology has made some important breakthroughs in the fields of artificial intelligence, big data, etc., in some cases, the existing intelligent nesting system may not achieve the desired effect.
[0004] For example, for the layout of special-shaped plates, although intelligent nesting technology can provide a preliminary solution, it often requires further manual optimization; this is because the automatically generated layout solution may not always be optimal, especially when dealing with complex shapes.
[0005] Therefore, for the cutting problem in the manufacturing industry, how to maximize material utilization through optimization algorithms is an urgent problem that needs to be solved. Summary of the Invention
[0006] The technical problem to be solved by the present invention is to provide an intelligent nesting method, equipment and storage medium based on array combination optimization, which can improve material utilization.
[0007] In order to solve the above technical problems, the present invention provides an intelligent nesting method based on array combination optimization, including: S1, parsing the target graphic file to extract the cutting piece information in the target graphic file; S2, classifying the cutting piece information to classify the flexible material contour and the sub-cut pieces in the flexible material; S3, constructing an initial layout scheme based on the flexible material contour and the sub-cut pieces; S4, selecting a benchmark layout scheme from the initial layout scheme according to a preset fitness function; S5, cross-processing the benchmark layout scheme; S6, mutating part of the benchmark layout scheme after cross-processing; S7, correcting the benchmark layout scheme that has been cross-processed and not mutated and the benchmark layout scheme after mutation processing; S8, repeating iterative steps S4 to S7 until the fitness of the benchmark layout scheme meets the convergence condition; S9, taking the benchmark layout scheme with the highest fitness as the target layout scheme.
[0008] As an improvement of the above solution, the fitness function is: f (x)=U-aS, where U is the utilization rate of the flexible material, S is the overlapping area between the sub-pieces, and a is a weight factor for controlling the penalty of the overlapping area.
[0009] As an improvement of the above solution, the goal of the fitness function is to maximize the utilization rate of the flexible material and minimize the overlapping area between the sub-panels.
[0010] As an improvement to the above-mentioned scheme, the step of constructing an initial layout scheme based on the flexible material contour and the sub-piece includes: randomly generating a gene sequence for representing the initial layout scheme based on preset constraints, the flexible material contour and the sub-piece; the genes in the gene sequence are used to represent the position information and angle information of the sub-piece in the flexible material.
[0011] As an improvement to the above scheme, the step of cross-processing the benchmark typesetting scheme includes: grouping the benchmark typesetting schemes, each group including two benchmark typesetting schemes; exchanging some genes of the two benchmark typesetting schemes in the group to generate two new benchmark typesetting schemes.
[0012] As an improvement to the above-mentioned scheme, the step of mutating part of the baseline typesetting scheme after cross-processing includes: extracting a preset proportion of the baseline typesetting scheme from the baseline typesetting scheme after cross-processing as the typesetting scheme to be mutated; randomly adjusting the position information of the sub-pieces in the typesetting scheme to be mutated; and randomly adjusting the angle information of the sub-pieces in the typesetting scheme to be mutated.
[0013] As an improvement to the above-mentioned scheme, the step of correcting the baseline typesetting scheme that has been cross-processed and not mutated and the baseline typesetting scheme after the mutated process includes: performing a boundary check on the baseline typesetting scheme that has been cross-processed and not mutated and the baseline typesetting scheme after the mutated process to adjust the position information of the sub-pieces that exceed the boundary of the flexible material; performing an overlap check on the baseline typesetting scheme that has been cross-processed and not mutated and the baseline typesetting scheme after the mutated process to adjust the position information and / or angle information of the sub-pieces whose overlapping area exceeds a preset allowable value.
[0014] As an improvement of the above solution, the intelligent nesting method based on array combination optimization further includes: converting the target layout scheme into line information and displaying the line information.
[0015] Correspondingly, the present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the above-mentioned intelligent nesting method based on array combination optimization when executing the computer program.
[0016] Correspondingly, the present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-mentioned intelligent nesting method based on array combination optimization.
[0017] The implementation of the present invention has the following beneficial effects:
[0018] The present invention is based on an intelligent nesting method based on array combination optimization. It regards the layout of sub-pieces as a combinatorial optimization problem. By optimizing the spacing, angles, and overlapping areas between sub-pieces, it explores the optimal layout scheme and improves material utilization.
[0019] Furthermore, the present invention introduces overlapping area into the fitness function, that is, a slight overlap is allowed between the sub-pieces, thereby achieving material-saving operation;
[0020] More preferably, the present invention helps generate new typesetting schemes through crossover operations and mutation operations; wherein, the crossover operation generates a new individual by exchanging some genes in the gene sequences of two parent individuals (i.e., the baseline typesetting scheme), and the mutation operation avoids falling into a local optimal solution by randomly adjusting some positions or angles of genes in the gene sequence. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1 This is a flow chart of the first embodiment of the intelligent nesting method based on array combination optimization of the present invention;
[0022] Figure 2 Schematic diagram of the neutron sheet of the present invention;
[0023] Figure 3 is a schematic diagram of the target typesetting scheme in the present invention;
[0024] Figure 4 This is a flow chart of the second embodiment of the intelligent nesting method based on array combination optimization of the present invention. DETAILED DESCRIPTION
[0025] To make the objectives, technical solutions, and advantages of the present invention more apparent, the present invention will be further described in detail below with reference to the accompanying drawings. It is hereby stated that any directional terms such as "up," "down," "left," "right," "front," "back," "inside," and "outside" that appear or will appear herein are based solely on the accompanying drawings and are not intended to limit the present invention.
[0026] See also Figure 1 , Figure 1 The flowchart of the first embodiment of the intelligent nesting method based on array combination optimization of the present invention is shown, which includes:
[0027] S101, parsing the target graphic file to extract the piece information in the target graphic file;
[0028] The software can be used to parse target graphic files of various formats to extract the cutting piece information in the target graphic files.
[0029] S102, classifying the piece information to classify the flexible material contour and the sub-pieces in the flexible material;
[0030] Classify the piece information in the target graphic file, classify the flexible material outline and the sub-pieces in the flexible material, and facilitate comparison and sorting operations.
[0031] like Figure 2 As shown, the sub-pieces of the present invention include a target shape region M1 and a sewing region M2 surrounding the target shape region M1. The sewing region M2 is used for sewing and can be obscured / hidden by the target shape region M1 after sewing. Examples include luggage sub-pieces and shoe upper sub-pieces. Therefore, the sewing regions M2 of different sub-pieces can slightly overlap, and even with this slight overlap, there is still sufficient space for sewing while ensuring the integrity of the target shape region M1.
[0032] S103, constructing an initial layout plan based on the flexible material contour and the sub-pieces;
[0033] Specifically, a gene sequence for representing an initial layout scheme can be randomly generated according to preset constraints, the contour of the flexible material and the sub-pieces; wherein the genes in the gene sequence are used to represent the position information and angle information of the sub-pieces in the flexible material.
[0034] For example, a number (e.g., 50-100) of initial layout plans are randomly generated. Each initial layout plan can be represented as a gene sequence. Each gene in the gene sequence represents the position and angle information of a sub-piece. The specific gene can be represented by a triple:
[0035] [x,y,θ]
[0036] in,
[0037] (x, y) represents the position information of the sub-piece;
[0038] θ represents the angle information of the sub-piece (i.e., the rotation angle).
[0039] The corresponding constraints are: the randomly generated initial layout scheme should meet the basic flexible material contour restrictions, that is, the sub-pieces cannot exceed the flexible material boundaries.
[0040] It should be noted that the initial population of existing genetic algorithms is typically generated completely randomly, lacking domain knowledge guidance. Unlike existing techniques, this invention generates an initial genetic sequence based on the flexible material contour and sub-piece shape, combined with preset constraints (such as boundary limits), ensuring that the sub-piece does not exceed the material range. Furthermore, this invention uses a triple (x, y, θ) to represent the position and rotation angle of the sub-piece, directly linking it to the physical characteristics of the typesetting problem and improving the feasibility of the initial solution.
[0041] S104, selecting a reference typesetting scheme from the initial typesetting schemes according to a preset fitness function;
[0042] It should be noted that the existing fitness functions are mostly single-objective (such as maximizing utilization only) and do not explicitly weigh the overlap penalty. Unlike the existing technology, the fitness function of the present invention adopts a multi-objective balance strategy, dynamically combining material utilization and overlap area, controlling overlap tolerance through weight factors, and allowing slight overlap to maximize material savings.
[0043] Specifically, the present invention introduces overlapping area into the fitness function, that is, a slight overlap is allowed between sub-pieces, thereby achieving material-saving operation; the goal of the fitness function is to maximize the utilization rate of flexible materials and minimize the overlapping area between sub-pieces under the premise that the allowed overlap is as close to the set tolerance as possible.
[0044] Accordingly, the fitness function of the present invention is:
[0045] f (x)=U-aS
[0046] in,
[0047] U is the utilization rate of flexible materials;
[0048] S is the overlapping area between the sub-pieces;
[0049] a is the weight factor that controls the overlap area penalty.
[0050] It should be noted that the flexible material utilization rate is the ratio of the coverage area of all sub-pieces in the current initial layout plan to the total area of the flexible material, and this ratio needs to be maximized;
[0051] At the same time, the overlapping area can be penalized according to the allowed overlapping area of each sub-piece. The more overlap, the lower the fitness.
[0052] In addition, under normal circumstances, the value of the weight factor can be flexibly adjusted according to the characteristics of the material and process to enhance the versatility of the algorithm; for example, when applied to leather, the value of the weight factor needs to be less than 0.03.
[0053] After calculating the fitness of the initial layout plans using the fitness function, N initial layout plans with the highest fitness are selected as the baseline layout plans. N is preferably 10, but this is not a limit and can be set based on actual conditions. Strategies such as roulette wheel selection or tournament selection can be used during the selection process.
[0054] S105, cross-processing the baseline typesetting scheme;
[0055] Specifically, the steps of cross-processing the baseline typesetting scheme include:
[0056] (1) The benchmark typesetting schemes are grouped, with each group including two benchmark typesetting schemes;
[0057] (2) Exchange some genes of the two benchmark typesetting schemes within the group to generate two new benchmark typesetting schemes.
[0058] Among them, the commonly used crossover methods include:
[0059] (1) Single-point crossover: Cut at a random position in the gene sequence, exchange the front and back parts, and generate two new individuals;
[0060] (2) Two-point crossover: Select two positions in the gene sequence for cutting and exchange.
[0061] It should be noted that the existing crossover and mutation lack targeted optimization of the geometric characteristics of the layout; unlike the existing technology, the present invention adopts a layout-guided crossover strategy, using single-point / double-point crossover to exchange gene sequences, retaining the effective local structure in the parent layout (such as densely arranged areas) and improving the quality of the offspring.
[0062] S106, performing mutation processing on the part of the benchmark typesetting schemes after the cross processing;
[0063] Specifically, the steps of performing mutation processing on the part of the baseline typesetting schemes after the cross processing include:
[0064] (1) Extracting a preset ratio of the baseline typesetting scheme from the cross-processed baseline typesetting scheme as the typesetting scheme to be mutated;
[0065] The preset ratio generally adopts a smaller probability, preferably 5%, but is not limited to this. It can be adjusted according to actual conditions as long as excessive randomization is avoided.
[0066] (2) Randomly adjust the position information (x, y) of the sub-piece in the layout scheme to be mutated;
[0067] (3) Randomly adjust the angle information θ of the sub-piece in the layout scheme to be mutated.
[0068] It should be noted that by adjusting the position (x, y) and angle (θ), the diversity of solutions can be increased to meet the rotation requirements of complex shapes.
[0069] Combining the crossover operation in step S105 and the mutation operation in step S106 helps generate a new typesetting scheme; wherein, the crossover operation generates a new individual by exchanging some genes in the gene sequences of two parent individuals (i.e., the baseline typesetting scheme), while the mutation operation randomly adjusts some positions or angles of genes in the gene sequence to avoid falling into a local optimal solution.
[0070] S107, performing correction processing on the cross-processed and unmutated baseline typesetting scheme and the mutated baseline typesetting scheme;
[0071] It should be noted that, in actual situations, the baseline typesetting scheme after processing through steps S101 to S106 is rarely densely packed (i.e., the utilization rate is 100%); generally, its utilization rate is about 70% to 80%, i.e., the remaining gaps can be fine-tuned.
[0072] Therefore, in order to ensure that the generated layout scheme is valid, it is necessary to check the boundary conditions and overlaps. Specifically, the steps of correcting the cross-processed and unmutated baseline layout scheme and the mutated baseline layout scheme include:
[0073] (1) Perform boundary checks on the cross-processed and unmutated baseline layout scheme and the mutated baseline layout scheme to adjust the position information of the sub-pieces that exceed the boundary of the flexible material;
[0074] That is, if the sub-piece exceeds the boundary of the flexible material, readjust its position.
[0075] Therefore, boundary checking can be used to force the adjustment of the position of sub-pieces that exceed the material boundary to ensure the feasibility of the solution.
[0076] (2) Performing an overlap check on the cross-processed and unmutated baseline layout scheme and the mutated baseline layout scheme to adjust the position information and / or angle information of the sub-pieces whose overlapping area exceeds the preset allowable value.
[0077] That is, if the overlap between sub-pieces exceeds the allowed value, try to reduce the overlap by fine-tuning the position or angle.
[0078] Therefore, by fine-tuning the positions and angles of the sub-pieces, unnecessary overlaps can be reduced and invalid solutions can be reduced.
[0079] S108, repeating steps S104 to S107 until the fitness of the benchmark typesetting scheme meets the convergence condition;
[0080] Generally, steps S104 to S107 may be repeated for a certain number of times (eg, 500 times), and the optimal typesetting scheme (ie, the individual with the highest fitness) is retained each time.
[0081] In addition, you can also set convergence conditions, such as stopping iteration when the fitness does not improve significantly between several generations.
[0082] Existing iterative algorithms usually rely only on fitness or number of iterations as termination conditions; unlike the existing technology, the iterative algorithm adopted by the present invention adopts dynamic convergence judgment, that is, combining fitness stability and number of iterations (such as 500 times) to avoid premature convergence, and also adopts an elite retention mechanism, that is, retaining the individual with the highest fitness in each iteration to ensure that the optimization direction does not deviate.
[0083] S109, taking the benchmark typesetting scheme with the highest fitness as the target typesetting scheme.
[0084] like Figure 3 As shown in Figure 2, after all iterations are completed, the layout plan with the highest fitness is output as the final target layout plan.
[0085] See also Figure 4 , Figure 4 The flowchart of the second embodiment of the intelligent nesting method based on array combination optimization of the present invention is shown, which includes:
[0086] S201, parsing the target graphic file to extract the piece information in the target graphic file;
[0087] S202, classifying the piece information to classify the flexible material contour and the sub-pieces in the flexible material;
[0088] S203, constructing an initial layout plan based on the flexible material contour and the sub-pieces;
[0089] S204, selecting a reference typesetting scheme from the initial typesetting schemes according to a preset fitness function;
[0090] S205, cross-processing the baseline typesetting scheme;
[0091] S206, performing mutation processing on the part of the benchmark typesetting schemes after the cross processing;
[0092] S207, performing correction processing on the cross-processed and unmutated baseline typesetting scheme and the mutated baseline typesetting scheme;
[0093] S208, repeating iterative steps S204 to S207 until the fitness of the benchmark typesetting scheme meets the convergence condition;
[0094] S209: Using the benchmark typesetting scheme with the highest fitness as the target typesetting scheme.
[0095] S210: Convert the target typesetting scheme into line information and display the line information.
[0096] and Figure 1 Unlike the first embodiment shown, this embodiment also outputs all sub-piece lines in the target layout scheme after processing in steps S201 to S209 as visual line information, and displays it on the software interface, allowing the operator to check the final layout effect and start cutting after confirming that it is correct.
[0097] In summary, the present invention is an intelligent nesting method based on array combination optimization, which regards the layout of sub-pieces as a combinatorial optimization problem. By optimizing the spacing, angles and overlapping areas between sub-pieces, the optimal layout scheme is explored to achieve improved material utilization.
[0098] Correspondingly, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the above-mentioned intelligent nesting method based on array combination optimization when executing the computer program.
[0099] At the same time, the present invention also discloses a computer-readable storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the above-mentioned intelligent nesting method based on array combination optimization are implemented.
[0100] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. An intelligent nesting method based on array combination optimization, characterized in that: include: S1, parsing a target graphic file to extract piece information from the target graphic file; S2, classifying the piece information to classify the flexible material contour and the sub-pieces in the flexible material; S3, constructing an initial layout plan based on the flexible material contour and the sub-pieces, specifically comprising: randomly generating a gene sequence representing the initial layout plan based on preset constraints, the flexible material contour, and the sub-pieces, wherein the genes in the gene sequence are used to represent position information and angle information of the sub-pieces in the flexible material; S4, selecting a reference layout scheme from the initial layout schemes according to a preset fitness function, wherein the fitness function is: f (x) = U - aS, where U is the utilization rate of the flexible material, S is the overlapping area between the sub-pieces, and a is a weight factor for controlling the penalty of the overlapping area; S5, performing cross processing on the reference typesetting scheme; S6, performing mutation processing on the part of the reference typesetting schemes after the cross processing, specifically comprising the following steps: extracting a preset proportion of reference typesetting schemes from the reference typesetting schemes after the cross processing as the typesetting schemes to be mutated; randomly adjusting the position information of the sub-pieces in the typesetting schemes to be mutated; and randomly adjusting the angle information of the sub-pieces in the typesetting schemes to be mutated. S7, correcting the interleaved and unmutated baseline layout scheme and the mutated baseline layout scheme, specifically including: performing a boundary check on the interleaved and unmutated baseline layout scheme and the mutated baseline layout scheme to adjust the position information of sub-pieces that exceed the boundary of the flexible material; performing an overlap check on the interleaved and unmutated baseline layout scheme and the mutated baseline layout scheme to adjust the position information and / or angle information of sub-pieces whose overlap area exceeds a preset allowable value; S8, repeating iterative steps S4 to S7 until the fitness of the benchmark typesetting scheme meets the convergence condition; S9, taking the benchmark typesetting scheme with the highest fitness as the target typesetting scheme.
2. The intelligent nesting method based on array combination optimization according to claim 1, characterized in that: The goal of the fitness function is to maximize the flexible material utilization and minimize the overlapping area between the sub-panels.
3. The intelligent nesting method based on array combination optimization according to claim 1, characterized in that: The step of cross-processing the benchmark typesetting scheme includes: The benchmark typesetting schemes are grouped, each group including two benchmark typesetting schemes; Part of the genes of two benchmark typesetting schemes in the group are exchanged to generate two new benchmark typesetting schemes.
4. The intelligent nesting method based on array combination optimization according to claim 1, characterized in that: Also includes: The target typesetting scheme is converted into line information, and the line information is displayed.
5. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the intelligent nesting method based on array combination optimization according to any one of claims 1 to 4 are implemented.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the intelligent nesting method based on array combination optimization according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Intelligent typesetting method, intelligent typesetting system and intelligent cutting system for lace material
CN111898169A