Workpiece drilling action optimization method and system based on improved greedy algorithm

By improving the greedy algorithm and 0-1 matrix simplification rules, optimizing the drilling action of the workpiece, the problem that traditional greedy algorithms are difficult to find the optimal processing path, and efficient and complete drilling processing is achieved.

CN119511938BActive Publication Date: 2025-05-23NANXING MACHINERY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411644622.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-05-23
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

In the optimization of workpiece drilling action, it is difficult to find the minimum machining action covering all hole positions, resulting in unoptimized machining paths.

Method used

By improving the greedy algorithm and simplifying the rules of the 0-1 matrix, a hole and drill matching table and a head action data table are generated, a 0-1 matrix corresponding to the hole position and head action is constructed, and the optimal action set is found through greedy algorithm and matrix operations.

Benefits of technology

Achieving rapid acquisition of the minimum action set covering all hole positions improves drilling efficiency and ensures machining integrity and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119511938B_ABST
    Figure CN119511938B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing technology, and in particular to a method and system for optimizing workpiece drilling actions based on an improved greedy algorithm. The method of the present invention comprises: obtaining hole position data and drill bit data, generating a hole and drill matching table, wherein each row in the hole and drill matching table reflects all the drill bits that can drill out the hole position when processing any hole position; based on the current head position and the hole and drill matching table, generating a data table of head actions, wherein each row in the data table of head actions reflects all the drill bits that can be used simultaneously by the current head and the corresponding hole positions that can be processed by the drill bits; based on the data table of head actions, constructing a 0-1 matrix corresponding to the hole position and the head action, simplifying the 0-1 matrix according to the simplification rule, and using the simplified 0-1 matrix to perform drilling processing on the workpiece. The present invention can effectively improve the efficiency of drilling by performing subsequent drilling processing through the optimal solution of the action set obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and more specifically, to a method and system for optimizing workpiece drilling motion based on an improved greedy algorithm. Background Art

[0002] With the improvement of people's living standards, the demand for furniture is increasing, especially the demand for panel furniture is increasing. In the production of panel furniture, it is necessary to drill holes in the panels after edge banding, wherein each drilling machine is provided with a drilling package to realize the drilling of the panels.

[0003] Specifically, if the coordinates of the hole positions, hole diameters, and hole depths on the plate meet the parameters of the drill bit on the drill kit, the drill bit on the drill kit can be extended at the same time to perform drilling on the plate. In the prior art, the optimal drilling process path is generally obtained through a greedy algorithm. For example, a Chinese patent application document with publication number CN112836854B discloses a method for optimizing a multi-hole processing path for a workpiece based on a greedy algorithm. However, although the greedy algorithm can find a seemingly optimal processing path, in fact, the processing path is not necessarily the optimal path. For example, suppose a plate needs to drill 6 holes A, B, C, D, E, and F. There are 10 actions covering these 6 holes, namely DA1[D, E, F], DA2[D, E, F], and DA3[D, E, F]. [D,A], DA3[E,B], DA4[F,C)], DA5[A], DA6[B], DA7[C)], DA8[D)], DA9[E] and DA10[F]. Since the greedy algorithm always gives priority to the action that covers the largest number of holes, the optimal action set obtained by the greedy algorithm is DA1, DA2, DA3 and DA4. These four actions do cover all the holes, but it is obvious that DA2, DA3 and DA4 have already covered all the holes, and the drilling action is even less. Therefore, the path found by the traditional greedy algorithm cannot always find the minimum processing action that covers all the holes. Summary of the invention

[0004] In order to solve the technical problem that the above-mentioned traditional greedy algorithm cannot always find the minimum processing actions covering all hole positions, the present invention provides solutions in the following aspects.

[0005] In a first aspect, the present invention provides a method for optimizing a workpiece drilling action based on an improved greedy algorithm, comprising:

[0006] Obtain hole position data and drill bit data, generate a hole and drill matching table, wherein each row in the hole and drill matching table reflects all drill bits that can drill any hole position when processing the hole position; generate a data table of head movements based on the current head position and the hole and drill matching table, wherein each row in the data table of head movements reflects all drill bits that can be used simultaneously by the current head and the corresponding hole positions that can be processed by the drill bits; based on the data table of head movements, construct a 0-1 matrix corresponding to the hole position and the head movement, simplify the 0-1 matrix according to the simplification rule, and use the simplified 0-1 matrix to perform drilling processing on the workpiece; wherein the simplification rule includes:

[0007] Determine a column that meets the preset conditions according to a greedy algorithm, retain the column and delete the row where the element in the column is 1; wherein the preset conditions include: containing the most 1s, and in the row where the element is 1, there is only one row where the element is 1;

[0008] ;

[0009] In the formula, represents the hth column in a 0-1 matrix, represents the jth column in a 0-1 matrix, represents the i-th row in the 0-1 matrix, Indicates the mth row in the 0-1 matrix, the lock Indicates deleting the hth column in the 0-1 matrix and retaining the jth column in the 0-1 matrix; the lock It means deleting the mth row in the 0-1 matrix and keeping the ith row in the 0-1 matrix.

[0010] Beneficial effect: By combining the greedy algorithm with matrix operations, the optimal solution of the action set can be quickly obtained. When determining the optimal drilling path, it is selected from the optimal solution of the action set. Since the optimal solution of the action set is the minimum action covering all hole positions, it can improve the efficiency of subsequent drilling.

[0011] Furthermore, a 0-1 matrix is ​​constructed in which the hole positions and the machine head movements correspond to each other, including: constructing the 0-1 matrix in which rows represent hole positions and columns represent machine head movements; wherein, if the current machine head movement covers the current hole position, the corresponding position in the 0-1 matrix is ​​represented by 1; if the current machine head movement does not cover the current hole position, the corresponding position in the 0-1 matrix is ​​represented by 0.

[0012] Beneficial effect: By constructing a 0-1 matrix, the 0-1 matrix can be quickly simplified through binary bitwise AND, bitwise OR and bitwise XOR, so that the optimal solution of the action set can be obtained quickly.

[0013] Furthermore, obtaining hole position data also includes: generating a hole position table according to the hole position data, wherein the hole position table contains multiple hole position numbers, each hole position number stores the corresponding hole position coordinates, and the working surface of the workpiece where the hole is located, the hole position type, the hole diameter and the hole depth.

[0014] Furthermore, obtaining drill data also includes: generating a drill table according to the drill data, wherein the drill table contains multiple drill numbers, and each drill number stores the corresponding relative coordinates on the drill package, drilling type and drill working surface.

[0015] Further, it includes: in response to more than one drill bit being installed on a drill package, determining whether the drill bits on the current drill package can drill at the same time.

[0016] Furthermore, it is determined whether the drill bits on the current drill package can drill simultaneously, including: if the number of drill bits on the current drill package is less than or equal to the maximum number of drill bits on the current drill package allowed to drill simultaneously, the drill bits on the current drill package can drill simultaneously; if the number of drill bits on the current drill package is greater than the maximum number of drill bits on the current drill package allowed to drill simultaneously, the current machine head action is split.

[0017] Beneficial effect: By judging whether the drill bits can drill at the same time, the processing quality is guaranteed and the safety of production is improved.

[0018] Furthermore, simplifying the 0-1 matrix according to the simplification rule also includes: judging whether all hole positions are covered in the simplified 0-1 matrix; if the hole positions are not covered in the simplified 0-1 matrix, simplifying the 0-1 matrix again using the simplification rule until all hole positions are covered in the simplified 0-1 matrix.

[0019] Beneficial effect: By judging whether the simplified 0-1 matrix covers all hole positions, the integrity of the processing is ensured and the quality of the processing is improved.

[0020] In a second aspect, the present invention also provides a workpiece drilling motion optimization system based on an improved greedy algorithm, comprising a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement the workpiece drilling motion optimization method based on the improved greedy algorithm as described in the first aspect.

[0021] The beneficial effects of the present invention are as follows: the present invention optimizes the drilling action of the plate through an improved greedy algorithm, and can quickly obtain the optimal solution of the drilling action set, that is, the minimum action covering all hole positions, thereby avoiding the problem that the traditional greedy algorithm cannot always find the minimum processing action covering all hole positions, improving the overall drilling processing efficiency, and being suitable for processing large-scale drilling action set simplification optimization problems. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0023] Figure 1 is a flow chart schematically illustrating a method for optimizing a workpiece drilling action according to an embodiment of the present invention;

[0024] Figure 2 Schematically shows the structure of a workpiece drilling motion optimization system according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0026] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0027] Figure 1 FIG. 4 is a flow chart schematically illustrating a method for optimizing a workpiece drilling action according to an embodiment of the present invention.

[0028] In the panel furniture processing production line, cabinets, bookcases and other furniture have 6 working surfaces. When processing different working surfaces, different drill bits in the drilling equipment are needed to drill holes in these 6 working surfaces. Furthermore, when drilling holes in the workpiece, the drilling equipment generally flexibly arranges single or double gantries for simultaneous processing according to the size of the workpiece and the number of holes, and whether to use 1 drill bag or 2 drill bags for simultaneous processing.

[0029] It is understandable that there can be multiple heads on a gantry, one head can be equipped with different types of drill packages, and one drill package is integrated with drill bits with different specifications.

[0030] Depend on Figure 1 It can be seen that the workpiece drilling action optimization method based on the improved greedy algorithm of the present invention includes the following steps.

[0031] S101, acquiring hole position data and drill bit data to generate a hole position table and a drill bit table.

[0032] In one embodiment, the hole data includes: the position coordinates of all holes, the working surface of the workpiece where the holes are located, the hole type, the hole diameter and the hole depth, etc. The hole types are divided into blind holes and through holes. Blind holes mean that the workpiece is not drilled through when drilling, and through holes mean that the workpiece is drilled through when drilling.

[0033] Furthermore, a hole position table is generated by the above hole position data. In the hole position table, hole position numbers are stored, such as hole position 1 and hole position 2. Each hole position number stores its corresponding hole position data. For example, hole position 1 stores the position coordinates of hole position 1, the working surface of the workpiece, the hole position type, the hole diameter and the hole depth, etc. Specifically, the hole position table is as follows.

[0034]

[0035] In one embodiment, the drill bit data includes: drill package number, relative coordinates of the drill bit on the drill package, drilling type, drill bit working surface, maximum drilling depth and travel coordinate limit of the drill bit, etc.

[0036] Further, a drill table is generated according to the drill data. In the drill table, drill numbers are stored, such as drill 1 and drill 2. Each drill number stores its corresponding drill data. For example, drill 1 stores the gantry number of drill 1, the drill package code, the offset coordinates XY relative to the reference drill of the drill package, the radius, the maximum drilling depth, the drill type and other information. Specifically, the drill table is as follows.

[0037]

[0038] S102, establishing a data table of machine head movements based on the hole position table and the drill table.

[0039] Specifically, for any hole position, a hole-drill matching table is obtained based on all drill bits that match the hole position. For example, assuming that there is hole position 1 on the workpiece, all drill bits that can drill hole position 1 are counted. If it is counted that the drill bits that can drill hole position 1 are drill bit 11, drill bit 12, and drill bit 13, then all drill bits that match hole position 1 are drill bit 11, drill bit 12, and drill bit 13. Traverse all hole positions, obtain all drill bits that match each hole position, and generate a hole-drill matching table, wherein each row in the hole-drill matching table reflects all drill bits that can drill any hole position when processing the hole position. Specifically, the hole-drill matching table is as follows.

[0040]

[0041] It should be noted that what is stored in the hole and drill matching table are object pointers. For example, hole 1 represents a data pointer pointing to hole position 1 in the hole position table, drill 11 represents a data pointer pointing to the first matching drill bit for hole 1 in the drill bit table, drill 12 represents a data pointer pointing to the second matching drill bit for hole 1 in the drill bit table, and so on. Hole N represents a data pointer pointing to hole position N in the hole position table, and drill NM represents a data pointer pointing to the Mth matching drill bit for hole N in the drill bit table.

[0042] From the hole and drill matching table, we can see that hole 1 can be matched with three different drill bits, drill 11, drill 12, and drill 13 for processing, hole 2 can be matched with two different drill bits, drill 21 and drill 22 for processing, and hole 3 can be matched with four different drill bits, drill 31, drill 32, drill 33, and drill 34 for processing.

[0043] Furthermore, based on the current machine head position and the hole and drill matching table, all the hole positions and corresponding drill bits that can be processed by the current machine head position are obtained. For example, when drilling 11 to process hole 1, the coordinates of the reference drill (the reference drill is usually the drill with the smallest number on the drill pack) on the drill pack where drill 11 is located are used to represent the machine head position. If the current machine head can use drill 21 in the current drill pack to process hole 2 and drill 33 to process hole 3 at the same time, then a machine head action is used to represent a processing action of the current drill pack, and the machine head action is [machine head 1 (X coordinate / Y coordinate / Z coordinate / gantry number), (drill 11 / hole 1), (drill 21 / hole 2), (drill 33 / hole 3)].

[0044] According to all the machine head movements, a data table of the machine head movements is generated. The specific data table of the machine head movements is shown below.

[0045]

[0046] It should be noted that the first row of the data table of machine head actions indicates that machine head 1 can use 3 drill bits to process 3 corresponding holes at the same time, the second row indicates that machine head 2 can use 1 drill bit to process 1 corresponding hole, and the third row indicates that machine head 3 can use 2 drill bits to process 2 corresponding holes.

[0047] It is understandable that what is stored in the data table of the machine head action are all object pointers.

[0048] Furthermore, although a drill package may be equipped with more than a dozen or even dozens of drill bits, and the extension and retraction of these drill bits are all pneumatically controlled, due to the limitation of the rated power of the air compressor, the processing process will have a rigid limit on the maximum number of holes that can be drilled simultaneously on the drill package. At this time, if the number of holes that need to be processed simultaneously at a machine head coordinate position exceeds the maximum number of holes that can be drilled simultaneously by the current drill package, then the current machine head action needs to be split into several parts to ensure that the number of holes that can be drilled simultaneously for each individual action is ≤ the maximum number of holes that can be drilled simultaneously by the current drill package.

[0049] In this embodiment, the maximum number of simultaneous drill-downs allowed is set to 13. In other optional embodiments, those skilled in the art may set the maximum number of simultaneous drill-downs allowed according to actual needs, for example, setting the maximum number of simultaneous drill-downs allowed to 10 or 15.

[0050] In an optional embodiment, when a gantry is equipped with multiple drill packages, it is necessary to group and merge the head data with the same gantry coordinates and in accordance with the drill package safety spacing to establish a matching action table for the head movements. For example: in a single gantry dual-head machine, if the x-coordinates of the head 1 action and the head 3 action in the data table of the head action are the same, and the difference between the y-coordinate of the head 1 and the y-coordinate of the head 3 is ≥ the drill package safety spacing, then the head 1 and head 3 actions match. However, if the head 1 and head 3 actions match at the same time, the head 1 also matches the head 5 action. Since the drilling equipment is a dual-head type, the head 3 and the head 5 cannot coexist, and only one of the two can be selected. In the process of selecting the head, if it is not certain which head combination is good, a matching action table can be established for each head action. Specifically, the matching action table of the head action based on the single gantry dual-head is as follows.

[0051]

[0052] It can be understood that what is stored in the action matching table is a pointer object pointing to the data table of the machine head action. Among them, machine 1 represents a data pointer pointing to machine head 1 in the data table of the machine head action, machine 11 represents a data pointer pointing to the first matching machine head action of machine 1 (i.e., machine head 1) in the data table of the machine head action (equivalent to the first matching machine head action of machine head 1 in the above example is machine head 3), machine 12 represents a data pointer pointing to the second matching machine head action of machine 1 in the data table of the machine head action (equivalent to the second matching machine head action of machine head 1 in the above example is machine head 5), and so on, then machine N represents a data pointer pointing to the data table of the machine head action of machine head N, and machine NM represents a data pointer pointing to the Mth matching machine head action of machine N in the data table of the machine head action.

[0053] From the matching action table of the above machine head actions, it can be seen that the machine head 1 action has 2 matching machine head actions, the machine head 2 action has 4 matching machine head actions, and the machine head 3 action has 3 matching machine head actions.

[0054] When simplifying the action set with the smallest number in the subsequent steps, the actions in the matching action table of the head action are processed as follows: [machine 1, machine 11] is regarded as a double-head action, [machine 1, machine 12] is regarded as a double-head action, and so on.

[0055] S103, constructing a 0-1 matrix corresponding to the hole positions and the machine head movements based on the data table of the machine head movements.

[0056] In one embodiment, for a single drill package, a 0-1 matrix corresponding to hole positions and drill head movements may be constructed based on the data table of the drill head movements.

[0057] Specifically, in the 0-1 matrix where the hole positions and machine head actions correspond to each other, the rows represent the hole positions and the columns represent the machine head actions. Furthermore, if the current machine head action covers the current hole position, the corresponding position in the 0-1 matrix is ​​represented by 1; if the current machine head action does not cover the current hole position, the corresponding position in the 0-1 matrix is ​​represented by 0; for example, the element in the 1st row and 1st column is 1, indicating that action 1 (i.e., machine head action 1) covers hole position 1, i.e., the holes that can be drilled by action 1 include hole position 1; the element in the 1st row and 2nd column is 0, indicating that action 2 does not cover hole position 1, i.e., the holes that can be drilled by action 1 do not include hole position 2 (action 1 cannot drill hole position 2). Specifically, the 0-1 matrix is ​​as follows:

[0058]

[0059] In one embodiment, after obtaining the 0-1 matrix, two two-dimensional arrays Rows and Cols are used to store the contents of the 0-1 matrix, wherein the row array Rows indicates which actions cover each hole position, and the column array Cols indicates which hole positions are covered by each action.

[0060] In one embodiment, the one-dimensional capacity length of the Rows array = the total number of hole positions, and the two-dimensional capacity length = the total number of actions / 64, and the result is rounded up, that is, for a hole position, every 64 actions are stored and represented by a 64-bit integer. If the current hole position does not appear in the 64 actions, it is represented by 0. If the current hole position appears in all 64 actions, it is represented by the hexadecimal number 0xffffffffffffffff. For example, when there are 1000 action combinations, 16 64-bit integers are needed to represent the appearance of a hole position in all actions, and the two-dimensional capacity length of the Rows array is 16.

[0061] In one embodiment, the one-dimensional capacity length of the Cols array = the total number of actions, and the two-dimensional capacity length = the total number of holes / 64, and the result is rounded up, that is, for one action, we use a 64-bit integer to store and represent each 64 holes. If none of the 64 holes appear in the current action, they are represented by 0. If all 64 holes appear in the current action, they are represented by the hexadecimal number 0xffffffffffffffff. For example, when there are 1000 holes to be processed, 16 64-bit integers are needed to represent the appearance of all holes in one action, and the two-dimensional capacity length of the Cols array is 16. Therefore, for each hole, we need an array containing 16 uint64_t elements to store the appearance of the hole in 1000 actions.

[0062] In another embodiment, in the case of multiple drill packages, a 0-1 matrix corresponding to hole positions and drill head actions can be constructed based on a matching action table of drill head actions.

[0063] S104, simplifying the 0-1 matrix, and using the simplified 0-1 matrix to perform drilling processing on the workpiece.

[0064] Specifically, the 0-1 matrix can be simplified by a set simplification rule.

[0065] In one embodiment, the simplified rules set include:

[0066] Rule 1: Determine the column in the 0-1 matrix that meets the preset conditions according to the greedy algorithm, keep this column, and delete the row where the element in this column is 1. It can be understood that Rule 1 is to find the machine head action that covers the most holes, and among the holes covered by this machine head action, there is at least one hole that is only covered by this machine head action and not covered by other machine head actions.

[0067] In this embodiment, the preset condition is: the number of elements containing 1 is the largest, and among the rows where these 1s are located, there exists a row with only one element being 1. It can be understood that existence means there can be one row, two rows, or more rows.

[0068] Specifically, in one embodiment, determining a column in a 0-1 matrix that meets a preset condition according to a greedy algorithm includes:

[0069] S1. Traverse each column in the 0-1 matrix and count the number of elements that are 1 in each column.

[0070] S2. Determine the column with the largest number of 1 elements.

[0071] S3. For the column with the most 1s, traverse the rows where the elements with values ​​1 in the column are located again, and determine whether there is a row among these rows, in which only one element is 1 and the rest are 0; if there is such a row in the row where 1 is located in the column, determine the column as a column that meets the preset conditions; if there is no such row in the row where 1 is located in the column, find the next column with the most 1s and repeat S3.

[0072] Specifically, to make the present application clearer, the following Table 1 is taken as an example to determine the columns that meet the preset conditions.

[0073]

[0074] As shown in Table 1, the 1st column contains four 1s, the 2nd column contains three 1s, the 3rd column contains three 1s, and the 4th column contains two 1s, then the 1st column is determined to be the column containing the most 1s; further, the rows where 1s are located in the 1st column are the 1st row, the 2nd row, the 3rd row, and the 4th row, among which the 1st row contains two 1s, the 2nd row contains three 1s, the 3rd row contains two 1s, and the 4th row contains four 1s, then there is no row with only one 1, and as shown in the preset conditions, the 1st column cannot be determined to be the column that meets the preset conditions, then the next column containing the most 1s is found, namely the 2nd and 3rd columns. Here, the 2nd column is first judged, specifically, it is judged in the same way as the 1st column. As shown in the above table, the rows where 1s are located in the 2nd column are the 2nd row, the 4th row, and the 5th row, among which the 5th row contains only one 1, so among the rows where the element 1s are located in the 2nd column, there is a row with only one 1, and therefore, the 2nd column is determined to be the column that meets the preset conditions.

[0075] Furthermore, if the second column is a column that meets the preset conditions, the second column is retained, that is, the second column is taken as a member of the final solution of the action set, and the row where 1 is located in the second column is deleted. It should be noted that after obtaining the final solution of the action set, hole positions 2, 4 and 5 need to be added to action 2 so that the hole position set is complete.

[0076] It can be understood that the 5th line expresses that hole position 5 only appears in action 2, and other actions do not include hole position 5, that is, only action 2 can drill hole position 5, and other actions cannot drill hole position 5.

[0077] In other optional embodiments, all rows may be traversed first to determine rows with only one element that is 1, the columns where 1 is located in these rows are determined, and the number of 1s in these columns is counted, and the columns containing the most 1s are determined as the columns that meet the preset conditions. For example, as shown in Table 2 below, there are a total of 2 rows in Table 2 with only one element that is 1, namely the 3rd row and the 5th row, among which the column where 1 is located in the 3rd row (i.e., the 1st column) contains four 1s, and the column where 1 is located in the 5th row (i.e., the 2nd column) contains two 1s, then the 1st column is determined as the column that meets the preset conditions.

[0078]

[0079] Through the greedy algorithm, the columns that meet Rule 1 can be quickly found, which improves the efficiency of the operation and thus improves the efficiency of simplifying the 0-1 matrix.

[0080] Rule 2: If the machine head action U contains all the hole positions in the machine head action J, then the machine head action U is retained and the machine head action J is deleted. Specifically, the expression in the 0-1 matrix is: if all the 1s in the Xth column appear in the Yth column, then the Xth column is deleted and the Yth column is retained. For example, as shown in Table 3 below, if all the 1s in the second column (i.e., action 2) in Table 3 appear in the first column (i.e., action 1), then the second column is deleted (i.e., the machine head action J is eliminated from the optimal solution of the action set), and the first column is retained (column 1 is regarded as a member of the optimal solution of the action set).

[0081]

[0082] In one embodiment, rule 2 can also be expressed by a formula: The formula means: The result of bitwise AND of column h and column j, and then XOR of column h is 0, which means that all 1s in column h appear in column j, and the locked It means deleting the hth column in the 0-1 matrix and keeping the jth column in the 0-1 matrix.

[0083] Rule 3: In all actions, if hole position X is included and hole position Y is included, hole position Y is deleted from all actions, that is, the row where hole position Y is located is deleted. It can be understood that after obtaining the optimal solution of the action set, hole position Y is added to all actions where hole position X appears, so that the hole position set is complete. It should be noted that all actions that cover hole position Y do not necessarily cover hole position X.

[0084] Specifically, the expression of rule 3 in the 0-1 matrix is: if all the 1s in row X appear in row Y, then row Y is deleted and row X is retained. For example, as shown in the following Table 4, if all the 1s in row 3 in Table 4 appear in row 1, then row 1 is deleted and row 3 is retained. Furthermore, when obtaining the action set, hole position 1 must be added to all actions that appear in hole position 3.

[0085]

[0086] In one embodiment, rule 3 can also be expressed by a formula: The formula means: The result of bitwise AND of row i and row m, and XOR of row i is 0, which means that all 1s in row i appear in row m, and the lock It means to delete the mth row in the 0-1 matrix and keep the ith row in the 0-1 matrix. It should be noted that locking

[0087] It should be noted that when simplifying the 0-1 matrix, the 0-1 matrix is ​​simplified multiple times using rules 1, 2 and 3 in sequence until the optimal solution of the action set is obtained. Furthermore, the locked rows and columns should be ignored during the execution of the above three rules, and after each cycle obtains an optimal action solution, the hole positions in the optimal action solution will not appear in the subsequent action solution, and the cycle is repeated according to the above steps to obtain the simplified 0-1 matrix. After obtaining the simplified 0-1 matrix, it is also necessary to determine whether the current simplified 0-1 matrix covers all the hole positions. If not, the 0-1 matrix is ​​simplified again using the above three rules. If the current simplified 0-1 matrix covers all the hole positions, the workpiece is punched using the current simplified 0-1 matrix.

[0088] In summary, the final solutions obtained by simplifying through the above simplification rules are all optimal solutions for the action set. In the entire matrix simplification calculation process, Rule 1 can quickly find the action that covers the most holes and only this machine head action can drill a certain hole, and the simplification efficiency is high. Rules 2 and 3 can simplify the 0-1 matrix at a faster speed through the three operations of bitwise AND, bitwise OR, and bitwise XOR of binary data, so as to obtain the minimum number of action combinations, and then find the optimal drilling action, which improves the overall processing efficiency and is suitable for processing large-scale drilling action set simplification optimization problems.

[0089] The present invention also provides a workpiece drilling action optimization system based on an improved greedy algorithm, such as Figure 2 As shown, the system of the present invention includes a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, a workpiece drilling action optimization method based on an improved greedy algorithm according to the first aspect of the present invention is implemented.

[0090] The system also includes other components well known to those skilled in the art, such as a communication interface, whose configuration and functions are known in the art and thus will not be described in detail here.

[0091] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in the present invention may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.

[0092] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.

[0093] Although this specification has shown and described a number of embodiments of the present invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will conceive of many modifications, changes and alternatives without departing from the ideas and spirit of the present invention. It should be understood that in the practice of the present invention, various alternatives to the embodiments of the present invention described herein may be employed.

Claims

1. A workpiece drilling action optimization method based on an improved greedy algorithm, characterized in that: include: Acquire hole position data and drill bit data, and generate a hole and drill matching table, wherein each row in the hole and drill matching table reflects all drill bits that can drill any hole position when processing the hole position; Based on the current machine head position and the hole and drill matching table, a data table of machine head actions is generated, wherein each row in the data table of machine head actions reflects all drill bits that can be used simultaneously by the current machine head and the corresponding hole positions that can be processed by the drill bits; Based on the data table of the machine head action, a 0-1 matrix corresponding to the hole position and the machine head action is constructed, the 0-1 matrix is ​​simplified according to the simplification rule, and the workpiece is drilled using the simplified 0-1 matrix; wherein the simplification rule includes: Determine a column that meets the preset conditions according to a greedy algorithm, retain the column and delete the row where the element in the column is 1; wherein the preset conditions include: containing the most 1s, and in the row where the element is 1, there is only one row where the element is 1; ; In the formula, represents the hth column in a 0-1 matrix, represents the jth column in a 0-1 matrix, represents the i-th row in the 0-1 matrix, Indicates the mth row in the 0-1 matrix, the lock Indicates deleting the hth column in the 0-1 matrix and retaining the jth column in the 0-1 matrix; the lock It means deleting the mth row in the 0-1 matrix and keeping the ith row in the 0-1 matrix.

2. The workpiece drilling action optimization method based on the improved greedy algorithm according to claim 1 is characterized in that: Construct a 0-1 matrix corresponding to the hole position and the machine head movement, including: Construct the 0-1 matrix in which rows represent hole positions and columns represent machine head movements; wherein, if the current machine head movement covers the current hole position, the corresponding position in the 0-1 matrix is ​​represented by 1; if the current machine head movement does not cover the current hole position, the corresponding position in the 0-1 matrix is ​​represented by 0.

3. The workpiece drilling action optimization method based on the improved greedy algorithm according to claim 1 is characterized in that: Obtaining hole position data also includes: A hole position table is generated according to the hole position data, wherein the hole position table includes a plurality of hole position numbers, each hole position number stores the corresponding hole position coordinates, the working surface of the workpiece where the hole is located, the hole position type, the hole diameter and the hole depth.

4. The workpiece drilling action optimization method based on the improved greedy algorithm according to claim 1 is characterized in that: Get drill data, also includes: A drill table is generated according to the drill data, wherein the drill table includes a plurality of drill numbers, and each drill number stores the corresponding relative coordinates on the drill package, the drilling type and the drill working surface.

5. The workpiece drilling action optimization method based on the improved greedy algorithm according to claim 1 is characterized in that: include: In response to more than one drill bit being installed on a drill kit, it is determined whether the drill bits on the current drill kit can drill simultaneously.

6. The workpiece drilling action optimization method based on the improved greedy algorithm according to claim 5 is characterized in that: Determine whether the drill bits on the current drill package can drill at the same time, including: If the number of drill bits on the current drill package is less than or equal to the maximum number of drill bits allowed to be drilled at the same time, the drill bits on the current drill package can drill at the same time; If the number of drill bits under the current drill package is greater than the maximum number of drill bits allowed to be drilled simultaneously under the current drill package, the current machine head action is split.

7. The workpiece drilling action optimization method based on the improved greedy algorithm according to claim 1 is characterized in that: Simplifying the 0-1 matrix according to the simplification rule also includes: Determine whether all hole positions are covered in the simplified 0-1 matrix; If the simplified 0-1 matrix does not contain the hole positions, the 0-1 matrix is ​​simplified again using the simplification rule until the simplified 0-1 matrix contains all the hole positions.

8. A workpiece drilling action optimization system based on an improved greedy algorithm, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement the workpiece drilling action optimization method based on the improved greedy algorithm as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • A Greedy Algorithm-Based Optimization Method for Hole Processing Path of Sheet Metal

    CN112836854B

  • Workpiece drilling action optimization method and system based on matrix operation

    CN119577989A