Wood cutting strategy based on k-means clustering

Through the wood cutting strategy based on k-means clustering and combined with dynamic programming algorithms, the problem of difficulty in outputting the cutting strategy in the existing technology at the same time is solved, and efficient raw material utilization and low-cost production are achieved.

CN119721343APending Publication Date: 2025-03-28FUJIAN SHUNJING MACHINERY IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411785906.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-06
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art is difficult to output cutting strategies in the direction of length and width in furniture wood cutting, resulting in low raw material utilization and high production costs.

Method used

A wood cutting strategy based on k-means clustering is adopted, and the cutting strategy output in width and length directions is achieved through steps such as screening accessories, clustering processing, and dynamic programming algorithms.

Benefits of technology

It greatly shortens the time of cutting strategy output, improves raw material utilization, reduces production costs, and meets the requirements of real-time production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119721343A_ABST
    Figure CN119721343A_ABST
Patent Text Reader

Abstract

The invention provides a wood cutting strategy based on k-means clustering. The wood cutting strategy comprises the following steps of: selecting a wood cutting strategy; the method comprises the steps that S1, according to the raw material size of wood, accessories with the length and the width smaller than or equal to the corresponding size of raw materials are screened out from an accessory list; the cutter is used for cutting in two dimensions of width and length; s2, the screened accessories are clustered according to the width, the accessory with the highest price is selected from clusters after clustering for cutting planning in the width direction, and a cutting strategy in the width direction is calculated; s3, a cutting problem in the width direction is equivalent to a complete backpack problem, and a dynamic programming algorithm is adopted for solving; s4, after the width cutting strategy is output, the raw material information is updated, and a cutting strategy in the length direction is output; according to the method, the cutting strategy output time can be greatly shortened. And the raw material utilization rate can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of data mining and planning, in particular to a wood cutting strategy based on k-means clustering. Background Art

[0002] In the furniture wood industry, different accessories have different sizes and prices. Making full use of raw materials to produce different accessories can effectively improve economic benefits. Therefore, it is necessary to output the cutting strategy of raw materials according to the specifications and prices of accessories.

[0003] The utilization rate of wood raw materials in my country has always been low, and the traditional wood cutting strategy is derived from manual decision-making. However, the output of manual cutting strategies not only causes waste of raw materials, but also greatly increases the production cost of furniture. Automating the cutting plan combined with the relevant information of raw materials and accessories can reduce the production cost of furniture and improve product competitiveness.

[0004] Due to actual production requirements, there are a large number of accessories of different specifications and prices. If the cutting strategy of all accessories is output, that is, the wood is cut based on the enumeration algorithm, although the maximum utilization value of the wood raw materials is greatly increased, the large number of accessories causes the algorithm to run for a long time and cannot meet the requirements of online real-time production.

[0005] Related patent 1:

[0006] The Chinese patent application number is: CN202011187283.7, and the name is: A wood cutting planning method based on accessory priority. This method determines the priority of accessories, specifies the corresponding cutting strategy, and then searches for areas on the wood raw material that meet the quality requirements of the accessories according to the priority of the wood accessories, assigns each part of the wood raw material to the corresponding accessories, and finally outputs a cutting list. This method can only output cutting strategies in the length direction, and cannot output cutting strategies in both the length and width directions at the same time.

[0007] Related patent 2:

[0008] The Chinese patent application number is: CN201110139183.1, and the name is: Intelligent screening steel bar optimization cutting method. This method screens a large number of steel bar cutting combinations to be processed by dynamically setting the screening conditions, and then compares and adjusts the screened preliminary steel bar cutting combination schemes to optimize the combination, and determines the final steel bar cutting combination scheme. This method first arranges the steel bars to be processed in descending order according to their length, selects a target combination from the preliminary steel bar cutting combination scheme, traverses all the steel bar cutting combinations in the preliminary steel bar cutting combination scheme, obtains larger gaps through steel bar replacement, and thus selects the optimal combination scheme. This method selects the optimal cutting combination by traversal, which takes a long time and has low efficiency, and cannot meet the real-time production requirements of wood cutting. Summary of the invention

[0009] The present invention proposes a wood cutting strategy based on k-means clustering, which can significantly shorten the time of cutting strategy output and improve the utilization rate of raw materials.

[0010] The present invention adopts the following technical solutions.

[0011] A wood cutting strategy based on k-means clustering, the method comprising the following steps:

[0012] Step S1, according to the raw material size of the wood, filter out the accessories whose length and width are less than or equal to the corresponding size of the raw material in the accessories list; used for cutting in two dimensions of width and length;

[0013] Step S2: cluster the selected accessories according to width, select the accessories with the highest price from each cluster after clustering, perform cutting planning in the width direction, and calculate the cutting strategy in the width direction;

[0014] Step S3, equating the cutting problem in the width direction to a complete knapsack problem, and solving it using a dynamic programming algorithm;

[0015] Step S4: After outputting the width cutting strategy, update the raw material information and output the cutting strategy in the length direction.

[0016] The method reduces the time of outputting wood cutting strategies by grouping accessories of similar sizes into one category.

[0017] In step S2, the width of the accessories is used as a clustering feature, and the k-means clustering method is used to cluster the accessories into a specified number K of clusters.

[0018] Step S2 comprises the following steps:

[0019] Step A1, randomly select k accessories as the initial centroid;

[0020] Step A2: Calculate the distances from the widths of the non-centroid fittings to the widths of the k centroids, and assign each fitting to the centroid with the closest distance.

[0021] Step A3: For each cluster, calculate the mean of the widths of all the fittings in the cluster, and use this mean as the new centroid.

[0022] Repeat the fitting assignment in Step A2 and the centroid update step in Step A3 until the classification result of the fittings no longer changes.

[0023] The cutting strategy in the width direction in Step S2, that is, take out the fittings with the highest prices from the k fitting clusters respectively as the cutting objects in the width direction.

[0024] In Step S3, the formulation of the complete knapsack problem is as follows:

[0025] Given n types of fittings with different widths and prices, their widths are w1, w2,..., wn respectively, and the value of each fitting is v1, v2,..., vn. Each fitting can be repeatedly planned, and the planned quantity of each type of fitting is x1, x2,..., xn. Let the raw material width be W_M.

[0026]

[0027] In Step S3, for the complete knapsack problem, using the dynamic programming algorithm, the cutting strategy in the width direction of the raw material with a width of W_M is as follows:

[0028] Step B1: First, define the width list of the fittings w = [w1, w2,..., wn]; the value list of the fittings v = [v1, v2,..., vn];

[0029] Step B2: Compare the sizes of dp[j] and dp[j - w[i]] + v[i] when the i-th (1 ≤ i ≤ n) fitting has a width from j to j - w[i]. If dp[j] < dp[j - w[i]] + v[i], update the cutting plan with the maximum value at length j, and at the same time assign dp[j - w[i]] + v[i] to dp[j];

[0030] Step B3: From fitting 1 to n, repeat Step B2 until i = n, the planning ends, and output the planning strategy with the maximum value planned at the width W_M;

[0031] Step B4: Cut the raw material in the width direction; from the cutting result in the width direction obtained in Step B3, the raw material is divided into m long strip rectangles with widths of W1, W2,..., Wm respectively, and the remaining material width is W_S. Place the fittings with widths equal to their widths on each long strip rectangle, and no further planning is performed on the remaining material.

[0032] The cutting strategy in the length direction in step S4 is specifically as follows: assuming that the length of the parts produced in the same batch is L_P and the width of the raw material is L_M, after outputting the cutting strategy in the width direction, the information of the parts being cut is obtained, and the output of the cutting strategy in the length direction is entered, which is specifically as follows:

[0033]

[0034] The maximum number of accessories placed in the length direction is j, and the remaining length is L_S. The accessories are placed in order from left to right until the remaining material can no longer hold accessories and the cutting in the length direction is completed.

[0035] When processing accessories of the same length in the same batch, the method first clusters the accessories according to their widths, and classifies accessories of similar sizes into one cluster. When outputting the cutting strategy in the width direction, only the accessories with the highest price in each cluster are designed for cutting, so as to reduce the cutting design of low-value accessories and shorten the time for outputting the cutting strategy.

[0036] The method ensures the utilization value of the raw materials and meets the actual cutting requirements by adopting a dynamic programming algorithm when planning the cutting strategy in the width direction of the wood raw materials.

[0037] When the strategy of the present invention is used in actual production conditions, when processing a batch of accessories of the same length, the accessories can be clustered according to their width, and accessories of similar sizes can be classified into one cluster. When outputting the cutting strategy in the width direction, only the accessories with the highest price in each cluster need to be cut and designed, and the cutting design of low-value accessories can be reduced, which will greatly shorten the time of cutting strategy output. And when outputting the cutting strategy in the width direction, the problem is equivalent to a complete knapsack problem and solved by a dynamic programming algorithm, which can improve the utilization rate of raw materials.

[0038] The beneficial effects of the present invention also lie in:

[0039] (1) The present invention proposes a cutting method in two dimensions, width and length, which is divided into cutting in the width direction and cutting in the length direction, thereby improving the utilization rate of wood raw materials.

[0040] (2) The present invention improves the efficiency of wood cutting. During cutting, the parts are clustered first, thus saving the calculation time for unnecessary cutting parts.

[0041] (3) The present invention adopts a dynamic programming algorithm when cutting in the width direction, which can effectively ensure the utilization value of the raw materials while meeting the actual cutting requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0043] Attached Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION

[0044] As shown in the figure, a wood cutting strategy based on k-means clustering, the method comprises the following steps;

[0045] Step S1, according to the raw material size of the wood, filter out the accessories whose length and width are less than or equal to the corresponding size of the raw material in the accessories list; used for cutting in two dimensions of width and length;

[0046] Step S2: cluster the selected accessories according to width, select the accessories with the highest price from each cluster after clustering, perform cutting planning in the width direction, and calculate the cutting strategy in the width direction;

[0047] Step S3, equating the cutting problem in the width direction to a complete knapsack problem, and solving it using a dynamic programming algorithm;

[0048] Step S4: After outputting the width cutting strategy, update the raw material information and output the cutting strategy in the length direction.

[0049] The method reduces the time of outputting wood cutting strategies by grouping accessories of similar sizes into one category.

[0050] In step S2, the width of the accessories is used as a clustering feature, and the k-means clustering method is used to cluster the accessories into a specified number K of clusters.

[0051] Step S2 comprises the following steps:

[0052] Step A1, randomly select k accessories as the initial centroid;

[0053] Step A2, calculate the distance between the width of the non-center-of-mass accessories and the widths of k center-of-mass, and assign each accessory to the nearest center-of-mass;

[0054] Step A3: For each cluster, calculate the mean of the widths of all accessories in the cluster and use the mean as the new centroid;

[0055] The accessory allocation in step A2 and the centroid update in step A3 are repeatedly performed until the classification result of the accessory no longer changes.

[0056] The cutting strategy in the width direction in step S2 is to take out the accessories with the highest price from the k accessory clusters as the cutting objects in the width direction.

[0057] In step S3, the complete knapsack problem is expressed as:

[0058] There are known n kinds of accessories with different widths and prices. Their widths are w1, w2,..., wn respectively, and the value of each accessory is v1, v2,..., vn. Each accessory can be repeatedly planned, and the planned quantity of each type of accessory is x1, x2,..., xn. Let the width of the raw material be W_M.

[0059]

[0060] In step S3, for the complete knapsack problem, using the dynamic programming algorithm, the cutting strategy in the output width direction of the raw material with width W_M includes the following steps:

[0061] Step B1: First, define the width list of accessories w = [w1, w2,..., wn]; the value list of accessories v = [v1, v2,..., vn];

[0062] Step B2: Compare the sizes of dp[j] and dp[j - w[i]] + v[i] when the i-th (1 ≤ i ≤ n) accessory is considered with widths from j to j - w[i]. If dp[j] < dp[j - w[i]] + v[i], update the cutting plan with the maximum value at length j, and at the same time assign dp[j - w[i]] + v[i] to dp[j];

[0063] Step B3: From accessory 1 to n, repeat step B2 until i = n, the planning ends, and output the planning strategy with the maximum value planned at width W_M;

[0064] Step B4: Cut the raw material in the width direction; from the cutting result in the width direction obtained in step B3, the raw material is divided into m long strip rectangles with widths W1, W2,..., Wm respectively, and the width of the remaining material is W_S. Place accessories with widths equal to their widths on each long strip rectangle, and no further planning is done for the remaining material.

[0065] The cutting strategy in the length direction in step S4 is specifically as follows: Let the lengths of the accessories produced in the same batch be L_P, and the width of the raw material be L_M. After obtaining the cutting strategy in the output width direction, the information of the accessory being cut is obtained, and then enter the output of the cutting strategy in the length direction, which is specifically:

[0066]

[0067] The maximum number of accessories that can be placed in the length direction is j, and the length of the remaining material is L_S. The accessories are placed in order from left to right until the cutting in the length direction is completed when the remaining raw material can no longer hold any accessories.

[0068] When processing accessories of the same length in the same batch, the method first clusters the accessories according to their widths, and classifies accessories of similar sizes into one cluster. When outputting the cutting strategy in the width direction, only the accessories with the highest price in each cluster are designed for cutting, so as to reduce the cutting design of low-value accessories and shorten the time for outputting the cutting strategy.

[0069] The method ensures the utilization value of the raw materials and meets the actual cutting requirements by adopting a dynamic programming algorithm when planning the cutting strategy in the width direction of the wood raw materials.

[0070] Example:

[0071] The preferred embodiment is described in detail below with reference to the accompanying drawings.

[0072] (1) Preliminary screening of accessories: The width of the raw material is 500 mm and the length is 4500 mm. There are 147 accessories in the original accessories list. The accessories whose length and width are less than or equal to the length and width of the raw material are screened out. Table 1 shows the information of the accessories to be produced after screening.

[0073]

[0074]

[0075] (2) Accessory width clustering: The above 22 types of accessories are clustered according to their width using k-means. Table 2 shows the width clustering results.

[0076]

[0077]

[0078] (3) Cutting strategy in the width direction: extract the accessories with the highest price in each of the five clusters. Table 3 is a list of the extracted accessories.

[0079]

[0080] Using the dynamic programming algorithm, the raw material with a width of 500 mm is cut in the width direction. The result is that three pieces of accessory 7 are cut and one piece of accessory 13 is cut, and there is no residual material in the width direction.

[0081] (4) Cutting the raw material in the width direction; from (3), it can be seen that the raw material is cut into long rectangular strips with widths of 100, 100, 100, and 200, respectively, among which the long rectangular strip cutting accessory 7 with a width of 100 and the long rectangular strip cutting accessory 13 with a width of 200.

[0082] (5) Cutting strategy in the length direction: The length of the raw material is 4500 mm, so each long rectangle in (4) can be cut into three accessories from left to right, and 500 mm of residual material is left. After cutting, 9 accessories 7 and 3 accessories 13 are obtained, and the cutting in the width and length dimensions is completed.

Claims

1. A wood cutting strategy based on k-means clustering, characterized by: The method includes the following steps; Step S1: According to the raw material size of the wood, screen out the fittings in the fitting list whose length and width are both less than or equal to the corresponding sizes of the raw materials; For cutting in two dimensions of width and length; Step S2: Cluster the screened fittings according to their widths, select the fitting with the highest price from each cluster after clustering, perform cutting planning in the width direction, and calculate the cutting strategy in the width direction; Step S3: Equivalent the cutting problem in the width direction to a complete knapsack problem and solve it using the dynamic programming algorithm; Step S4: After outputting the cutting strategy in the width direction, update the raw material information and output the cutting strategy in the length direction.

2. A wood cutting strategy based on k-means clustering according to claim 1, characterized in that: The method reduces the time for outputting the wood cutting strategy by classifying the fittings with similar sizes into one category.

3. A wood cutting strategy based on k-means clustering according to claim 1, characterized in that: In Step S2, taking the fitting width as the clustering feature, use the k-means clustering method to cluster the fittings into K clusters with the specified number.

4. A wood cutting strategy based on k-means clustering according to claim 3, characterized in that: Step S2 includes the following steps; Step A1: Randomly select k fittings as the initial centroids; Step A2: Calculate the distances from the widths of non-centroid fittings to the widths of the k centroids, and assign each fitting to the centroid with the closest distance; Step A3: For each cluster, calculate the mean of the widths of all fittings in the cluster and use this mean as the new centroid; Repeat the fitting assignment in Step A2 and the centroid update step in Step A3 until the classification result of the fittings no longer changes.

5. A wood cutting strategy based on k-means clustering according to claim 4, characterized in that: The cutting strategy in the width direction in Step S2 is to respectively select the fitting with the highest price from the k fitting clusters as the cutting object in the width direction.

6. A wood cutting strategy based on k-means clustering according to claim 5, characterized in that: In Step S3, the description of the complete knapsack problem is: Given n types of fittings with different widths and prices, their widths are w1, w2,..., wn respectively, the value of each type of fitting is v1, v2,..., vn respectively, each fitting can be repeatedly planned, and the planned quantity of each type of fitting is x1, x2,..., xn. Let the raw material width be W_M.

7. A wood cutting strategy based on k-means clustering according to claim 6, characterized in that: Step S3 aims at the complete knapsack problem, uses the dynamic programming algorithm, and outputs the cutting strategy in the width direction for the raw material with a width of W_M. The method includes the following steps: Step B1: First, define the width list of the fittings w = [w1, w2,..., wn]; the value list of the fittings v = [v1, v2,..., vn]; Step B2: Compare the sizes of dp[j] and dp[j - w[i]] + v[i] when the i-th (1 ≤ i ≤ n) fitting is considered with widths from j to j - w[i]. If dp[j] < dp[j - w[i]] + v[i], update the cutting plan with the maximum value at length j, and at the same time assign dp[j - w[i]] + v[i] to dp[j]; Step B3: From fitting 1 to n, repeat Step B2 until i = n and the planning ends, and output the planning strategy with the maximum value planned at the width W_M; Step B4, cutting the raw material in the width direction; the cutting result in the width direction is obtained from step B3, the raw material is divided into m long rectangles with widths W1, W2, ..., Wm, and the width of the remaining material is W_S. Accessories with a width equal to the width of each long rectangle are placed on it, and the remaining material is not further planned.

8. The wood cutting strategy based on k-means clustering according to claim 7, characterized in that: The cutting strategy in the length direction in step S4 is specifically as follows: assuming that the length of the parts produced in the same batch is L_P and the width of the raw material is L_M, after outputting the cutting strategy in the width direction, the information of the parts being cut is obtained, and the output of the cutting strategy in the length direction is entered, which is specifically as follows: The maximum number of accessories placed in the length direction is j, and the remaining length is L_S. The accessories are placed in order from left to right until the remaining material can no longer hold accessories and the cutting in the length direction is completed.

9. The wood cutting strategy based on k-means clustering according to claim 1, characterized in that: When processing accessories of the same length in the same batch, the method first clusters the accessories according to their widths, and classifies accessories of similar sizes into one cluster. When outputting the cutting strategy in the width direction, only the accessories with the highest price in each cluster are designed for cutting, so as to reduce the cutting design of low-value accessories and shorten the time for outputting the cutting strategy.

10. The wood cutting strategy based on k-means clustering according to claim 1, characterized in that: The method ensures the utilization value of the raw materials and meets the actual cutting requirements by adopting a dynamic programming algorithm when planning the cutting strategy in the width direction of the wood raw materials.

Citation Information

Patent Citations

  • Intelligent steel bar screening and blanking optimization method

    CN102322151B

  • Timber cutting planning method based on accessory priority

    CN112232588B