Two-dimensional rectangular piece layout method based on improved simulated annealing algorithm

By improving the simulated annealing algorithm and greedy algorithm, combined with the probabilistic search model, optimizing the layout of two-dimensional rectangular parts, the balance problem of plate consumption, number of layout plans and running time in the existing technology is solved, and the material utilization rate and efficiency are improved. Suitable for mass production.

CN118536392APending Publication Date: 2024-08-23ANHUI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410668261.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-08-23

AI Technical Summary

Technical Problem

The existing two-dimensional rectangular part layout algorithm is difficult to balance the plate consumption, the number of layout plans and the running time, resulting in low material utilization and a large number of layout plans, which cannot meet the needs of modern mass production.

Method used

An improved simulated annealing algorithm is used, combined with a greedy algorithm and a probabilistic search model, to dynamically adjust the temperature and cooling strategy, design four cutting plans, and use the Metropolis criterion and greedy algorithm to find the optimal layout plan, optimizing the plate utilization rate and the number of layout plans. .

Benefits of technology

It significantly improves material utilization, reduces the number of layout plans, improves layout efficiency, is suitable for large-scale production needs, and reduces plate consumption and labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118536392A
    Figure CN118536392A
Patent Text Reader

Abstract

The invention discloses a two-dimensional rectangular piece layout method based on an improved simulated annealing algorithm. The two-dimensional rectangular piece layout method comprises the following steps: 1, constructing a layout model for cutting a two-dimensional blank on a plate; 2, selecting a blank number on the basis of a Metropolis criterion; 3, cutting and selecting a blank on the current plate; 4, generating a blank layout scheme on the whole plate; and 5, obtaining a whole set of complete layout scheme. The number of plates can be reduced, the utilization rate of the plates is increased, stock layout schemes are greatly reduced, and the material cost and the labor cost of products are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of cutting and arranging of processed parts, and in particular to a two-dimensional rectangular parts arranging method based on an improved simulated annealing algorithm. Background Art

[0002] The two-dimensional rectangular parts nesting technology is of great significance in industrial manufacturing and is widely used in many industries such as metal sheet cutting, furniture manufacturing, and glass production. Simply put, the goal of nesting is to cut raw materials into the required rectangular parts as efficiently as possible to maximize material utilization, thereby reducing the company's material costs and improving economic benefits. In the large-scale automated production of modern manufacturing, the quality of the nesting results directly affects the utilization of raw materials. Every one percentage point increase in utilization and reduction of one nesting plan will significantly reduce the company's material and labor costs.

[0003] Early nesting mainly relied on manual experience. Workers visually inspected and manually adjusted the positions of rectangular parts in the CAD environment to ensure that they did not overlap and did not exceed the boundaries of the sheet. This method is inefficient and cannot meet the needs of modern large-scale production. The quality of the nesting results depends on the experience of workers, which easily leads to material waste. With the development of computer technology, computer-aided nesting technology has been widely used, greatly improving the efficiency of nesting and material utilization, thereby saving labor and material costs. The two-dimensional rectangular parts nesting algorithm currently on the market mainly uses a search algorithm based on the lowest horizontal line. This method has high computational efficiency, simple implementation and good material utilization, and is suitable for production environments with high real-time requirements. However, its shortcomings such as a large number of blank gaps that cannot be utilized, focusing only on a single goal (such as material utilization) and difficulty in optimizing multiple goals at the same time (such as the number of nesting schemes, running time) and lack of a global perspective limit its effectiveness in this application scenario. Summary of the invention

[0004] The present invention aims to address the deficiencies of the above-mentioned prior art and proposes a two-dimensional rectangular parts layout method based on an improved simulated annealing algorithm, aiming to solve the problem in the prior art that it is difficult to balance the number of consumed plates, the number of layout schemes and the running time, thereby significantly improving material utilization, reducing the number of layout schemes, and ensuring that the layout schemes are feasible and efficient in actual production.

[0005] In order to achieve the above-mentioned purpose, the present invention adopts the following technical scheme:

[0006] The two-dimensional rectangular parts arrangement method based on the improved simulated annealing algorithm of the present invention is characterized in that it is carried out according to the following steps:

[0007] Step 1: construct a two-dimensional rectangular parts layout model;

[0008] Step 1.1, obtain order data, including: the width W and length L of the two-dimensional rectangular mother plate R0 to be cut, the blank set O to be produced = {O1, O2, ..., O i ,…O M}, where O i represents the i-th hair embryo, the i-th hair embryo O i Width and length The i-th hair embryo O i Order quantity C i ; The i-th hair embryo O i The number of productions a on R0 i , i=1,2,…,M; M represents the number of types of blanks;

[0009] Step 1.2: Assume that the set of sample arrangement schemes is denoted as S = {S1, S2, …, S j ,…,S N},S j Represents the jth arrangement plan, let x ij is the jth sample arrangement S j The i-th hair embryo O i The order quantity, y ij is the jth sample arrangement S j The i-th hair embryo O i The remaining order quantity, d j is the jth sample arrangement S j The number of times of use; i = 1, 2, ..., M; j = 1, 2, ..., N; N represents the total number of sample arrangement schemes;

[0010] Step 1.3: Use formula (1) to construct the objective function F of the two-dimensional rectangular parts layout model:

[0011]

[0012] Step 1.4: Use formula (2) to construct the constraint conditions of the two-dimensional rectangular parts layout model:

[0013]

[0014] In formula (2), floor means rounding down;

[0015] Step 2: Select the blank number based on the Metropolis criterion:

[0016] Step 2.1: Set the kth sheet produced by the mother sheet R0 during the cutting process as R k ;make is the kth plate R k The width of is the kth plate Rk length, initialize k = 1,

[0017] Step 2.2: When C i ≠0, if and Established, or and When , it means that the i-th blank O i Can be in the kth plate R k Cut it out and make the cutting mark Otherwise, it means the i-th blank O i Cannot be in the kth plate R k Cut out the

[0018] Step 2.3, set the maximum number of cycles to G, the current number of cycles to g, initialize g = 1; define and initialize the minimum fitness value to Func min =1; Func min The corresponding blank number is recorded as mI, and mI=1 is initialized;

[0019] Step 2.4: Calculate the kth plate R k The numbered set of blanks that can be cut in the gth cycle is represents the number of the e-th blank that can be cut in the g-th cycle, e=1,2,…,Q; Q represents the total number of blanks that can be cut;

[0020] Step 2.5: From Index g Randomly select a blank number r from the gth cycle g ;

[0021] Step 2.6: Calculate R in the g-th cycle using formula (3): k The fitness function

[0022]

[0023] In formula (4), Indicates the rth g Blank The area, T k Represents R k area;

[0024] Step 2.7, judgment Is it less than Func min , if less than, then Assigning to Func min , r gAssign the value to mI; otherwise, execute step 2.8;

[0025] Step 2.8: Accept the suboptimal solution with a certain probability according to the Metropolis criterion;

[0026] Step 2.9, after assigning g+1 to g, determine whether g>G is true. If so, it means that the optimal blank number mI is obtained, and execute step 3. Otherwise, return to step 2.4 and execute sequentially;

[0027] Step 3: Cut the mIth blank O from R1 mI :

[0028] Step 3.1: If Will and The values ​​of are swapped, otherwise, remain unchanged; if Will and The values ​​of are swapped, otherwise, remain unchanged;

[0029] Step 3.2: Taking the lower left vertex of R1 as the origin, the coordinates of the upper right vertex are Let the mIth embryo O mI The lower left corner vertex of coincides with the origin, and the two right-angled sides connected to the origin are the x-axis and the y-axis, thereby establishing a rectangular coordinate system;

[0030] Step 3.3, in the rectangular coordinate system, construct four cutting plans for the blank on the plate, which are recorded as Plan 1, Plan 2, Plan 3, and Plan 4;

[0031] Step 3.4: Use formula (4) to construct the current cutting plan for the kth plate R k The impact of subsequent cutting J(O,R k ,C):

[0032]

[0033] Step 3.5, solving the sub-plates generated by the four cutting schemes respectively;

[0034] Step 3.5.1, set Plan 1 The upper part is recorded as the first sub-plate The right half of the second sub-plate and will The width of The length is recorded as The width of The length is recorded as

[0035] Step 3.5.2, set Plan 2 The upper part is recorded as the first sub-plate The right half of the second sub-plate and will The width of The length is recorded as The width of The length is recorded as

[0036] Step 3.5.3, set Plan 3 The upper part is recorded as the first sub-plate The right half of the second sub-plate and will The width of The length is recorded as The width of The length is recorded as

[0037] Step 3.5.4, set Plan 4 The upper part is recorded as the first sub-plate The right half of the second sub-plate and will The width of The length is recorded as The width of The length is recorded as

[0038] Step 3.6: or If it is established, execute step 3.6.1-step 3.6.2, otherwise, go to step 3.7;

[0039] Step 3.6.1, set a mutation probability ξ, and select a random decimal rd between 0 and 1;

[0040] Step 3.6.2: If rd≤ξ, use equation (4) to calculate as well as like Then cut R1 according to Plan3 to generate a new first sub-plate New second sub-plate And execute step 3.8, otherwise, cut R1 according to Plan4 to generate a new first sub-sheet New second sub-plate And execute step 3.8;

[0041] If rd>ξ, execute step 3.7;

[0042] Step 3.7: Use formula (4) to calculate as well as like Then cut R1 according to Plan1 to generate a new first sub-plate New second sub-plate Otherwise, cut R1 according to Plan2 to generate a new first sub-plate New second sub-plate

[0043] Step 3.8: R a Assign to R k+1 , R b Assign to R k+2 ;

[0044] Step 4: Generate the blank layout plan on the mother board R0:

[0045] Step 4.1: Set the initial temperature T s , termination temperature T e , current temperature T, temperature decay rate α;

[0046] Step 4.2: Initialize the cut area UA=0 on R0, the total area TA=W×L of R0, the usage rate UR=0, k=1, R k =R0,a i =0; define the total number of plates produced during the cutting process on R0 as P, and initialize P=1;

[0047] Step 4.3: Use the cooling process to k On the mIth embryo O mI Make a cut;

[0048] Step 4.4: Calculate utilization Thus {a i =0|i=1,2,…,M} and UA as a sample arrangement S tmp ;

[0049] Step 5: According to S tmp , calculate the jth arrangement scheme set S j , thus obtaining the set of sample arrangement schemes S = {S1, S2, …, S j ,…,S N}, where N represents the total number of sample arrangement schemes.

[0050] The two-dimensional rectangular parts arrangement method based on the improved simulated annealing algorithm described in the present invention is also characterized in that the step 2.4 comprises:

[0051] Step 2.4.1, initialize i=1, Q=0;

[0052] Step 2.4.2: When i Can be in R k Cut it out, assign Q+1 to Q, and assign i to when When i Cannot be in R k Cut out on top;

[0053] Step 2.4.3, after assigning i+1 to i, determine whether i>M is true. If so, it means that the Index is obtained. g , and execute step 2.5, otherwise, return to step 2.4.2 and execute sequentially.

[0054] The step 2.8 comprises:

[0055] Step 2.8.1. Set the probability function for the gth cycle

[0056] Step 2.8.2: Take a random decimal number rd between 0 and 1 in the gth cycle g , if rd g Less than but Assigning to Func min , r g Assign to mI; otherwise, Func min and mI remain unchanged.

[0057] The step 3.3 comprises:

[0058] Step 3.3.1, construct the first cutting plan Plan 1:

[0059] Let O mI The upper right corner coordinates are Straight Line Cut R1 into two parts, including: The left and right halves of Will The left half is cut into two parts, including: The upper and lower parts of The lower part is the rough blank O mI ;

[0060] Step 3.3.2, construct the second cutting plan Plan2:

[0061] Let O mI The upper right corner coordinates are Straight Line Cut R1 into two parts, including: The upper and lower parts of Will The lower part is cut into two parts, including: The left and right halves of The left half is the rough blank O mI ;

[0062] Step 3.3.3, construct the third cutting plan Plan3:

[0063] Let O mI The upper right corner coordinates are Straight Line Cut R1 into two parts, including: The left and right halves of Will The left half is cut into two parts, including: The upper and lower parts of The lower part is the rough blank O mI ;

[0064] Step 3.3.4, construct the fourth cutting plan Plan4:

[0065] Let O mI The upper right corner coordinates are Straight Line Cut R1 into two parts, including: The upper and lower parts of Will The lower part is cut into two parts, including: The left and right halves of The left half is the rough blank O mI .

[0066] The step 4.3 comprises:

[0067] Step 4.3.1, assign α×T to T; assign P+2 to P;

[0068] Step 4.3.2: According to steps 2 and 3, in R k On the mIth embryo O mI Cut and get the k+1th plate R k+1 and the k+2th plate R k+2 ;

[0069] Step 4.3.3: Assign to UA, thereby O mI The area is accumulated and added to UA;

[0070] Step 4.3.4, Update O mI Order quantity C mI C mI -1; Update O mI The number of productions a on R0 mI for a mI +1; when {C i =0|i=1,2,…,M}, go to step 4.4; otherwise, execute step 4.3.5;

[0071] Step 4.3.5: R k+1 Assign a value to R1 to update the plate generated during the cutting process on R0. At the same time, after assigning P-1 to P, use formula (4) to calculate J(O, R1, C). If J(O, R1, C) = 0, execute step 4.3.6; otherwise, execute step 4.3.7;

[0072] Step 4.3.6: If P = 0, it means that cutting cannot be performed on R0, and step 4.4 is executed; otherwise, k+1 is assigned to k, and then the process returns to step 4.3.5;

[0073] Step 4.3.7. Compare T>T e Is it true? If so, return to step 4.3.1; otherwise, go to step 4.4.

[0074] The step 5 comprises:

[0075] Step 5.1, obtain the blank order quantity set C = {C1, C2, ..., C i ,…,C M}, initialize j = 1;

[0076] Step 5.2: Set the calculation of the j-th arrangement plan set S j The set of blank order quantity at the time is in, Indicates the calculation of the i-th blank O when calculating the j-th arrangement plan set i The order quantity and initialize

[0077] Set the calculation of the j-th arrangement plan set S j Temporary arrangement plan set in, Indicates the calculation of the j-th arrangement plan set S j The u-th arrangement plan at the time, u=1,2,…,Z; Z is the j-th arrangement plan set S j The number of temporary sample arrangement plans;

[0078] Step 5.3, Initialization u=1;

[0079] Step 5.4: Get S according to step 4 tmp Assign to

[0080] Step 5.5: According to according to CT j Update, get the updated rough blank order quantity set and assign it to CT j ;

[0081] Step 5.6: If CT j If the blank order quantities in are all zero, jump to step 5.7, otherwise, return to step 5.4;

[0082] Step 5.7, from ST j The highest utilization rate of the selected sample arrangement is recorded as S j ;

[0083] Step 5.8: Calculate S using formula (2) j Production times

[0084] Step 5.9, after assigning j+1 to j, follow {C1-a1×d j ,C2-a2×d j ,…,C i -a i ×d j ,…,C M -a M ×d j} Update C, obtain the updated rough blank order quantity set and assign it to C;

[0085] Step 5.10: If the quantity of all blank orders in C is zero, output the layout plan set S = {S1, S2, ..., S j ,…,S N}, otherwise, return to step 5.2.

[0086] An electronic device of the present invention includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the two-dimensional rectangular component arrangement method, and the processor is configured to execute the program stored in the memory.

[0087] The present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program executes the steps of the two-dimensional rectangular component arrangement method when the computer program is executed by a processor.

[0088] Compared with the prior art, the present invention has the following beneficial effects:

[0089] 1. The two-dimensional rectangular parts layout method based on the improved simulated annealing algorithm provided by the present invention is based on the simulated annealing algorithm and the greedy algorithm. The important parameters in the simulated annealing are replaced by the type of blanks of the order, the order quantity, etc., and the cooling process is actively exited when the order quantity or the plate cannot be used, so that large orders have a larger search range, and small orders appropriately reduce the search range, thereby improving the search speed. When the layout plan with the highest utilization rate is found in step 5, the greedy algorithm is used to produce this layout plan until the order quantity no longer meets the conditions. Compared with other methods in the prior art, the layout plan can be greatly reduced, and the number of calls to simulated annealing is reduced, which further reduces the search time, making it more convenient for factories to process.

[0090] 2. The two-dimensional rectangular parts layout method based on the improved simulated annealing algorithm provided by the present invention proposes a random cutting model based on probability search. Different from the traditional linear cutting model, four cutting schemes for the blank on the plate are designed, and the mutual conversion relationship between the four cutting schemes is given. Moreover, the conversion between them is based on specific constraints and probability calculations, which can traverse almost all layout situations, thereby searching for the optimal layout scheme.

[0091] In summary, the present invention combines the greedy algorithm and the random cutting model based on probability search into the improved simulated annealing algorithm, and uses the constraints of the probability search model to guide the improved simulated annealing algorithm to search in a more accurate solution space, thereby making up for the shortcomings of the weak local search ability of the single heuristic algorithm, and finding the most suitable layout scheme from the many local solutions searched, thereby further reducing the use of the number of plates, improving the utilization rate of the plates, reducing the number of layout schemes, and better meeting the needs of the factory. BRIEF DESCRIPTION OF THE DRAWINGS

[0092] Figure 1 A flow chart of selecting a blank number based on the Metropolis criterion of the present invention;

[0093] Figure 2 Schematic diagrams of four situations of cutting a blank on a plate according to the present invention;

[0094] Figure 3 This is a flow chart of the simulated annealing cooling process of the present invention;

[0095] Figure 4 It is a schematic diagram of the arrangement scheme generated in the actual production process of the present invention. DETAILED DESCRIPTION

[0096] In this implementation example, a two-dimensional rectangular parts arrangement method based on an improved simulated annealing algorithm is to achieve multi-objective optimization by dynamically adjusting the temperature and cooling strategy through adaptive algorithm design, while strictly retaining the constraints in the actual production environment. Specifically, the method is carried out in the following steps:

[0097] Step 1: Construct a two-dimensional rectangular parts layout model:

[0098] Step 1.1, obtain order data, including: the width W and length L of the two-dimensional rectangular mother plate R0 to be cut, the blank set O to be produced = {O1, O2, ..., O i ,…O M}, where O i represents the i-th hair embryo, the i-th hair embryo O i Width and length The i-th hair embryo O i Order quantity C i ; The i-th hair embryo O i The number of productions a on R0 i , i=1,2,…,M; M represents the number of types of blanks;

[0099] Step 1.2: Assume that the set of sample arrangement schemes is denoted as S = {S1, S2, …, S j ,…,S N},S j Represents the jth arrangement plan, let x ij is the jth sample arrangement S j The i-th hair embryo O i The order quantity, y ij is the jth sample arrangement S j The i-th hair embryo O i The remaining order quantity, d j is the jth sample arrangement S j The number of times used; i = 1, 2, ..., M; j = 1, 2, ..., N; N represents the total number of sample arrangement schemes.

[0100] Step 1.3: Use formula (1) to construct the objective function F of the two-dimensional rectangular parts layout model:

[0101]

[0102] In formula (1), the objective function is set as the sum of the usage quantities corresponding to each layout scheme, which is in line with the goal of reducing sheet material consumption and improving utilization in the actual production process of the factory.

[0103] Step 1.4: Use formula (2) to construct the constraint conditions of the two-dimensional rectangular parts layout model:

[0104]

[0105] In formula (2), floor means rounding down.

[0106] Step 2: Select the blank number based on the Metropolis criterion:

[0107] Step 2.1: Set the kth sheet produced by the mother sheet R0 during the cutting process as R k ;make is the kth plate R k The width of is the kth plate R k length, initialize k = 1,

[0108] Step 2.2: When C i ≠0, if and Established, or and When , it means that the i-th blank O i Can be in the kth plate R k Cut it out and make the cutting mark Otherwise, it means the i-th blank O i Cannot be in the kth plate R k Cut out the

[0109] Step 2.3, set the maximum number of cycles to G, the current number of cycles to g, initialize g = 1; define and initialize the minimum fitness value to Func min =1; Func min The corresponding blank number is recorded as mI, and mI=1 is initialized;

[0110] Step 2.4: Calculate the kth plate R k The numbered set of blanks that can be cut in the gth cycle is It represents the number of the e-th blank that can be cut in the g-th cycle, e=1,2,…,Q; Q represents the total number of blanks that can be cut; each initialized plate including its generated sub-plates will have a corresponding index array according to the order during the production process to reduce invalid searches.

[0111] Step 2.4.1, initialize i=1, Q=0;

[0112] Step 2.4.2: When i Can be in R k Cut it out, assign Q+1 to Q, and assign i to when When i Cannot be in R k Cut out on top;

[0113] Step 2.4.3, after assigning i+1 to i, determine whether i>M is true. If so, it means that the Index is obtained. g , and execute step 2.5, otherwise, return to step 2.4.2 and execute sequentially.

[0114] Step 2.5: From Index g Randomly select a blank number r from the gth cycle g ;

[0115] Step 2.5.1: Generate a random number rand from 0 to Q for the gth cycle g ;

[0116] Step 2.5.2: Rand g Map to a nearby integer and get an integer int in the gth loop g , so that the int g The number of blanks that can be cut Assign to r g .

[0117] Step 2.6: Calculate R in the g-th cycle using formula (3): k The fitness function

[0118]

[0119] In formula (4), Indicates the rth g Blank The area, T k Represents R k area;

[0120] Step 2.7, if Figure 1 As shown, judge Is it less than Func min , if less than, then Assigning to Func min , r g Assign it to mI; otherwise, execute step 2.8.

[0121] Step 2.8: Accept the suboptimal solution with a certain probability according to the Metropolis criterion:

[0122] Step 2.8.1. Set the probability function for the gth cycle This probability function ensures that the value becomes smaller as the algorithm progresses, making it more difficult to obtain a suboptimal solution and thus retaining the better solutions that have been searched.

[0123] Step 2.8.2: Take a random decimal number rd between 0 and 1 in the gth cycle g , if rd g Less than but Assigning to Func min , r g Assign to mI; otherwise, Func min and mI remain unchanged.

[0124] Step 2.9, after assigning g+1 to g, determine whether g>G is established. If so, it means that the optimal blank number mI is obtained, and execute step 3. Otherwise, return to step 2.4 and execute sequentially.

[0125] Step 3: Cut the mIth blank O from R1 mI :

[0126] Step 3.1: If Will and The values ​​of are swapped, otherwise, remain unchanged; if Will and The values ​​of are swapped, otherwise, remain unchanged.

[0127] Step 3.2: Figure 2 As shown, taking the lower left vertex of R1 as the origin, the coordinates of the upper right vertex are Let the mIth embryo O mI The lower left corner vertex coincides with the origin, and the two right-angled sides connected to the origin are the x-axis and the y-axis, thus establishing a rectangular coordinate system.

[0128] Step 3.3: In the rectangular coordinate system, construct four cutting plans for the blank on the plate, recorded as Plan 1, Plan 2, Plan 3, Plan 4:

[0129] Step 3.3.1, construct the first cutting plan Plan 1:

[0130] Let O mI The upper right corner coordinates are Straight Line Cut R1 into two parts, including: The left and right halves of Will The left half is cut into two parts, including: The upper and lower parts of The lower part is the rough blank O mI .

[0131] Step 3.3.2, construct the second cutting plan Plan2:

[0132] Let O mI The upper right corner coordinates are Straight Line Cut R1 into two parts, including: The upper and lower parts of Will The lower part is cut into two parts, including: The left and right halves of The left half is the rough blank O mI .

[0133] Step 3.3.3, construct the third cutting plan Plan3:

[0134] Let O mI The upper right corner coordinates are Straight Line Cut R1 into two parts, including: The left and right halves of Will The left half is cut into two parts, including: The upper and lower parts of The lower part is the rough blank O mI .

[0135] Step 3.3.4, construct the fourth cutting plan Plan4:

[0136] Let O mI The upper right corner coordinates are Straight Line Cut R1 into two parts, including: The upper and lower parts of Will The lower part is cut into two parts, including: The left and right halves of The left half is the rough blank O mI .

[0137] Step 3.4: Use formula (4) to construct the current cutting plan for the kth plate R k The impact of subsequent cutting J(O,Rk,C):

[0138]

[0139] Step 3.5, solve the sub-plates generated by the four cutting schemes:

[0140] Step 3.5.1, set Plan 1 The upper part is recorded as the first sub-plate The right half of the second sub-plate and will The width of The length is recorded as The width of The length is recorded as

[0141] Step 3.5.2, set Plan 2 The upper part is recorded as the first sub-plate The right half of the second sub-plate and will The width of The length is recorded as The width of The length is recorded as

[0142] Step 3.5.3, set Plan 3 The upper part is recorded as the first sub-plate The right half of the second sub-plate and will The width of The length is recorded as The width of The length is recorded as

[0143] Step 3.5.4, set Plan 4 The upper part is recorded as the first sub-plate The right half of the second sub-plate and will The width of The length is recorded as The width of The length is recorded as

[0144] Step 3.6: or If it is established, execute steps 3.6.1-3.6.2, otherwise, go to step 3.7; if Figure 2 As shown, if the blank satisfies situation three or situation four after being rotated, then it can definitely be converted into situation one or situation two for cutting, but the opposite is not necessarily true.

[0145] Step 3.6.1, set a mutation probability ξ, and select a random decimal rd between 0 and 1;

[0146] Step 3.6.2: If rd≤ξ, use equation (4) to calculate as well as like Then cut R1 according to Plan3 to generate a new first sub-plate New second sub-plate And execute step 3.8, otherwise, cut R1 according to Plan4 to generate a new first sub-sheet New second sub-plate And proceed to step 3.8.

[0147] If rd>ξ, proceed to step 3.7.

[0148] Step 3.7: Use formula (4) to calculate as well as like Then cut R1 according to Plan1 to generate a new first sub-plate New second sub-plate Otherwise, cut R1 according to Plan2 to generate a new first sub-plate New second sub-plate

[0149] Step 3.8: R a Assign to R k+1 , R b Assign to R k+2 .

[0150] Step 4: Generate the blank layout plan on the mother board R0:

[0151] Step 4.1: Set the initial temperature T s , termination temperature T e , current temperature T, temperature decay rate α;

[0152] Step 4.2: Initialize the cut area UA=0 on R0, the total area TA=W×L of R0, the usage rate UR=0, k=1, R k =R0,a i =0; define the total number of plates produced during the cutting process on R0 as P, and initialize P=1.

[0153] Step 4.3: Figure 3 As shown, the cooling process is used to k Make a cut;

[0154] Step 4.3.1, assign α×T to T; assign P+2 to P;

[0155] Step 4.3.2: According to steps 2 and 3, in R k On the mIth embryo O mI Cut and get the k+1th plate R k+1 and the k+2th plate R k+2 .

[0156] Step 4.3.3: Assign to UA, thereby O mI The area is accumulated and added to UA;

[0157] Step 4.3.4, Update O mI Order quantity C mI C mI -1; Update O mI The number of productions a on R0 mI for a mI +1; when {C i =0|i=1,2,…,M}, go to step 4.4; otherwise, execute step 4.3.5.

[0158] Step 4.3.5: R k+1 Assign to R k Update the plate generated during the cutting process on R0, k = 1, 2, ..., P-1; assign P-1 to P, calculate J(O, R1, C) using formula (4), if J(O, R1, C) = 0, execute step 4.3.6; otherwise, execute step 4.3.7;

[0159] Step 4.3.6: If P = 0, it means that cutting cannot be performed on R0, and step 4.4 is executed; otherwise, k+1 is assigned to k, and then the process returns to step 4.3.5;

[0160] Step 4.3.7. Compare T>T e Is it true? If so, return to step 4.3.1; otherwise, go to step 4.4.

[0161] Step 4.4: Calculate utilization Thus {a i =0|i=1,2,…,M} and UA as a sample arrangement S tmp .

[0162] Step 5, calculate the arrangement plan set S;

[0163] Step 5.1, obtain the blank order quantity set C = {C1, C2, ..., C i ,…,C M}, initialize j = 1;

[0164] Step 5.2: Set the calculation of the j-th arrangement plan set S j The set of blank order quantity at the time is in, Indicates the calculation of the i-th blank O when calculating the j-th arrangement plan set i The order quantity and initialize

[0165] Set the calculation of the j-th arrangement plan set S j Temporary arrangement plan set in, Indicates the calculation of the j-th arrangement plan set S j The u-th arrangement plan at the time, u=1,2,…,Z; Z is the j-th arrangement plan set S j The number of temporary sample arrangement plans.

[0166] Step 5.3, Initialization

[0167] Step 5.4: Get S according to step 4 tmp Assign to

[0168] Step 5.5: According to according to CT j Update, get the updated rough blank order quantity set and assign it to CT j .

[0169] Step 5.6: If CT j If the blank order quantities in are all zero, jump to step 5.7, otherwise, return to step 5.4;

[0170] Step 5.7, from ST j The highest utilization rate of the selected sample arrangement is recorded as S j ;

[0171] Step 5.8: Calculate S using formula (2) j Production times

[0172] Step 5.9, after assigning j+1 to j, follow {C1-a1×d j ,C2-a2×d j ,…,C i -a i ×d j ,…,C M -a M ×d j} Update C, obtain the updated rough blank order quantity set and assign it to C;

[0173] Step 5.10: If the quantity of all blank orders in C is zero, output the layout plan set S = {S1, S2, ..., S j ,…,S N},like Figure 4 As shown, the present invention is used in an actual production process

[0174] 【Width 496 Length 312 Order 27,

[0175] Width 799 Length 312 Order 56,

[0176] Width 828 Length 312 Order 260 Sheets,

[0177] Width 978 Length 312 Order 72,

[0178] Width 771 Length 1816 Order 260 sheets,

[0179] Width 921 Length 1816 Order 72,

[0180] Width 499 Length 1932 Order 27,

[0181] The blank order of [width 799 length 1932 order 56 sheets] is cut on the mother plate of width 2000 length 2440, and the schematic diagram of 9 layout plans produced is produced. Otherwise, return to step 5.2.

[0182] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above method, and the processor is configured to execute the program stored in the memory.

[0183] In this embodiment, a computer-readable storage medium stores a computer program on the computer-readable storage medium, and the computer program executes the steps of the above method when executed by a processor.

Claims

1. A two-dimensional rectangular parts packing method based on an improved simulated annealing algorithm, characterized in that: The steps are as follows: Step 1: construct a two-dimensional rectangular parts layout model; Step 1.1, obtain order data, including: the width W and length L of the two-dimensional rectangular mother plate R0 to be cut, the blank set O to be produced = {O1, O2, ..., O i ,…O M }, where O i represents the i-th hair embryo, the i-th hair embryo O i Width and length The i-th hair embryo O i Order quantity C i ; The i-th hair embryo O i The number of productions a on R0 i , i=1,2,…,M; M represents the number of types of blanks; Step 1.2: Assume that the set of sample arrangement schemes is denoted as S = {S1, S2, …, S j ,…,S N },S j Represents the jth arrangement plan, let x ij is the jth sample arrangement S j The i-th hair embryo O i The order quantity, y ij is the jth sample arrangement S j The i-th hair embryo O i The remaining order quantity, d j is the jth sample arrangement S j The number of times of use; i = 1, 2, ..., M; j = 1, 2, ..., N; N represents the total number of sample arrangement schemes; Step 1.3: Use formula (1) to construct the objective function F of the two-dimensional rectangular parts layout model: Step 1.4: Use formula (2) to construct the constraint conditions of the two-dimensional rectangular parts layout model: In formula (2), floor means rounding down; Step 2: Select the blank number based on the Metropolis criterion: Step 2.1: Set the kth sheet produced by the mother sheet R0 to be cut during the cutting process as R k ;make is the kth plate R k The width of is the kth plate R k length, initialize k = 1, Step 2.2: When C i ≠0, if and Established, or and When , it means that the i-th blank O i Can be in the kth plate R k Cut it out and make the cutting mark Otherwise, it means the i-th blank O i Cannot be in the kth plate R k Cut out the Step 2.3, set the maximum number of cycles to G, the current number of cycles to g, initialize g = 1; define and initialize the minimum fitness value to Func min =1; Func min The corresponding blank number is recorded as mI, and mI=1 is initialized; Step 2.4: Calculate the kth plate R k The numbered set of blanks that can be cut in the gth cycle is represents the number of the e-th blank that can be cut in the g-th cycle, e=1,2,…,Q; Q represents the total number of blanks that can be cut; Step 2.5: From Index g Randomly select a blank number r from the gth cycle g ; Step 2.6: Calculate R in the g-th cycle using formula (3): k The fitness function In formula (4), Indicates the rth g Blank The area, T k Represents R k area; Step 2.7, judgment Is it less than Func min , if less than, then Assigning to Func min , r g Assign the value to mI; otherwise, execute step 2.8; Step 2.8: Accept the suboptimal solution with a certain probability according to the Metropolis criterion; Step 2.9, after assigning g+1 to g, determine whether g>G is true. If so, it means that the optimal blank number mI is obtained, and execute step 3. Otherwise, return to step 2.4 and execute sequentially; Step 3: Cut the mIth blank O from R1 mI : Step 3.1: If Will and The values ​​of are swapped, otherwise, remain unchanged; if Will and The values ​​of are swapped, otherwise, remain unchanged; Step 3.2: Taking the lower left vertex of R1 as the origin, the coordinates of the upper right vertex are Let the mIth embryo O mI The lower left corner vertex of coincides with the origin, and the two right-angled sides connected to the origin are the x-axis and the y-axis, thereby establishing a rectangular coordinate system; Step 3.3, in the rectangular coordinate system, construct four cutting plans for the blank on the plate, which are recorded as Plan 1, Plan 2, Plan 3, and Plan 4; Step 3.4: Use formula (4) to construct the current cutting plan for the kth plate R k The impact of subsequent cutting J(O,Rk,C): Step 3.5, solving the sub-plates generated by the four cutting schemes respectively; Step 3.5.1, set Plan 1 The upper part is recorded as the first sub-plate The right half of the second sub-plate and will The width of The length is recorded as The width of The length is recorded as Step 3.5.2, set Plan 2 The upper part is recorded as the first sub-plate The right half of the second sub-plate and will The width of The length is recorded as The width of The length is recorded as Step 3.5.3, set Plan 3 The upper part is recorded as the first sub-plate The right half of the second sub-plate and will The width of The length is recorded as The width of The length is recorded as Step 3.5.4, set Plan 4 The upper part is recorded as the first sub-plate The right half of the second sub-plate and will The width of The length is recorded as The width of The length is recorded as Step 3.6: or If it is established, execute step 3.6.1-step 3.6.2, otherwise, go to step 3.7; Step 3.6.1, set a mutation probability ξ, and select a random decimal rd between 0 and 1; Step 3.6.2: If rd≤ξ, use equation (4) to calculate as well as like Then cut R1 according to Plan3 to generate a new first sub-plate. New second sub-plate And execute step 3.8, otherwise, cut R1 according to Plan4 to generate a new first sub-sheet New second sub-plate And execute step 3.8; If rd>ξ, execute step 3.7; Step 3.7: Use formula (4) to calculate as well as like Then cut R1 according to Plan1 to generate a new first sub-plate New second sub-plate Otherwise, cut R1 according to Plan2 to generate a new first sub-plate New second sub-plate Step 3.8: R a Assign to R k+1 , R b Assign to R k+2 ; Step 4: Generate the blank layout plan on the mother board R0: Step 4.1: Set the initial temperature T s , termination temperature T e , current temperature T, temperature decay rate α; Step 4.2: Initialize the cut area UA=0 on R0, the total area TA=W×L of R0, the usage rate UR=0, k=1, R k =R0,a i =0; define the total number of plates produced during the cutting process on R0 as P, and initialize P=1; Step 4.3: Use the cooling process to k On the mIth embryo O mI Make a cut; Step 4.4: Calculate utilization Thus {a i =0i=1,2,…,M} and UA as a sample arrangement S tmp ; Step 5: According to S tmp , calculate the jth arrangement scheme set S j , thus obtaining the set of sample arrangement schemes S = {S1, S2, …, S j ,…,S N }, where N represents the total number of sample arrangement schemes.

2. The two-dimensional rectangular parts packing method based on the improved simulated annealing algorithm according to claim 1 is characterized in that: The step 2.4 comprises: Step 2.4.1, initialize i=1, Q=0; Step 2.4.2: When i Can be in R k Cut it out, assign Q+1 to Q, and assign i to when When i Cannot be in R k Cut out on top; Step 2.4.3, after assigning i+1 to i, determine whether i>M is true. If so, it means that the Index is obtained. g , and execute step 2.5, otherwise, return to step 2.4.2 and execute sequentially.

3. The two-dimensional rectangular parts packing method based on the improved simulated annealing algorithm according to claim 2 is characterized in that: The step 2.8 comprises: Step 2.8.

1. Set the probability function for the gth cycle Step 2.8.2: Take a random decimal number rd between 0 and 1 in the gth cycle g , if rd g Less than but Assigning to Func min , r g Assign to mI; otherwise, Func min and mI remain unchanged.

4. The two-dimensional rectangular parts packing method based on the improved simulated annealing algorithm according to claim 3 is characterized in that: The step 3.3 comprises: Step 3.3.1, construct the first cutting plan Plan 1: Let O mI The upper right corner coordinates are Straight Line Cut R1 into two parts, including: The left and right halves of Will The left half is cut into two parts, including: The upper and lower parts of The lower part is the rough blank O mI ; Step 3.3.2, construct the second cutting plan Plan2: Let O mI The upper right corner coordinates are Straight Line Cut R1 into two parts, including: The upper and lower parts of Will The lower part is cut into two parts, including: The left and right halves of The left half is the rough blank O mI ; Step 3.3.3, construct the third cutting plan Plan3: Let O mI The upper right corner coordinates are Straight Line Cut R1 into two parts, including: The left and right halves of Will The left half is cut into two parts, including: The upper and lower parts of The lower part is the rough blank O mI ; Step 3.3.4, construct the fourth cutting plan Plan4: Let O mI The upper right corner coordinates are Straight Line Cut R1 into two parts, including: The upper and lower parts of Will The lower part is cut into two parts, including: The left and right halves of The left half is the rough blank O mI .

5. The two-dimensional rectangular parts packing method based on the improved simulated annealing algorithm according to claim 4 is characterized in that: The step 4.3 comprises: Step 4.3.1, assign α×T to T; assign P+2 to P; Step 4.3.2: According to steps 2 and 3, in R k On the mIth embryo O mI Cut and get the k+1th plate R k+1 and the k+2th plate R k+2 ; Step 4.3.3: Assign to UA, thereby O mI The area is accumulated and added to UA; Step 4.3.4, Update O mI Order quantity C mI C mI -1; Update O mI The number of productions a on R0 mI for a mI +1; when {C i =0i=1,2,…,M}, go to step 4.4; otherwise, execute step 4.3.5; Step 4.3.5: R k+1 Assign a value to R1 to update the plate generated during the cutting process on R0. At the same time, after assigning P-1 to P, use formula (4) to calculate J(O, R1, C). If J(O, R1, C) = 0, execute step 4.3.6; otherwise, execute step 4.3.7; Step 4.3.6: If P = 0, it means that cutting cannot be performed on R0, and step 4.4 is executed; otherwise, k+1 is assigned to k, and then the process returns to step 4.3.5; Step 4.3.

7. Compare T>T e Is it true? If so, return to step 4.3.1; otherwise, go to step 4.

4.

6. The two-dimensional rectangular parts packing method based on the improved simulated annealing algorithm according to claim 5 is characterized in that: The step 5 comprises: Step 5.1, obtain the blank order quantity set C = {C1, C2, ..., C i ,…,C M }, initialize j = 1; Step 5.2: Set the calculation of the j-th arrangement plan set S j The set of blank order quantity at the time is Among them, CT i j Indicates the calculation of the i-th blank O when calculating the j-th arrangement plan set i The order quantity and initialize CT i j =C i ; Set the calculation of the j-th arrangement plan set S j Temporary arrangement plan set in, Indicates the calculation of the j-th arrangement plan set S j The u-th arrangement plan at the time, u=1,2,…,Z; Z is the j-th arrangement plan set S j The number of temporary sample arrangement plans; Step 5.3, Initialization u=1; Step 5.4: Get S according to step 4 tmp Assign to ST u j ; Step 5.5: According to according to CT j Update, get the updated rough blank order quantity set and assign it to CT j ; Step 5.6: If CT j If the blank order quantities in are all zero, jump to step 5.7, otherwise, return to step 5.4; Step 5.7, from ST j The highest utilization rate of the selected sample arrangement is recorded as S j ; Step 5.8: Calculate S using formula (2) j Production times Step 5.9, after assigning j+1 to j, follow {C1-a1×d j ,C2-a2×d j ,…,C i -a i ×d j ,…,C M -a M ×d j } Update C, obtain the updated rough blank order quantity set and assign it to C; Step 5.10: If the quantity of all blank orders in C is zero, output the layout plan set S = {S1, S2, ..., S j ,…,S N }, otherwise, return to step 5.

2.

7. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the two-dimensional rectangular component layout method described in any one of claims 1 to 6, and the processor is configured to execute the program stored in the memory.

8. 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 two-dimensional rectangular component packing method described in any one of claims 1 to 6 are executed.