A method and system for optimizing the movement path of a workpiece drill bit in a clamping production line

By optimizing the order of drilling and the intersection of the safe area of ​​the clamping hand, using ant colony algorithm and genetic algorithm, the problem of low drilling efficiency is solved, and more efficient drilling path planning is achieved.

CN119567364BActive Publication Date: 2025-08-22NANXING MACHINERY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411644616.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2025-08-22
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

Existing drilling path optimization methods lead to low drilling efficiency, especially due to the long downtime caused by frequent hand-changing positions, which affects the overall production efficiency.

Method used

By obtaining the minimum set of actions and sorting them, combining ant colony algorithm and genetic algorithm to optimize the drilling action sequence, reducing the number of drilling actions and adjusting the intersection of the secure area of ​​the clamping hand, optimizing the movement path of the workpiece drill bit.

Benefits of technology

On the basis of ensuring coverage of all holes to be processed, the drilling action is reduced and the frequency of changing the clamp position is reduced, thereby improving drilling efficiency and reducing the length of the drill bit moving path.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119567364B_ABST
    Figure CN119567364B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing technology. Specifically, it relates to a method and system for optimizing the movement path of a workpiece drill bit in a clamping production line. The method includes: sorting the drilling actions in the minimum action set to obtain a better sorting result of the drilling actions; finding the intersection of the hand-clamping safety areas of the first n drilling actions, with the initial value of n being 2; in response to the intersection being not an empty set, setting n=n+1 and returning to the previous step; in response to the intersection being an empty set, moving the nth drilling action in the better sorting result to the last position in the sorting result and returning to the previous step; in response to the intersection being an empty set obtained for a preset number of times under the condition that the first intersection is not an empty set, or the value of n is equal to the total number of drilling actions in the sorting result, then stop finding the intersection and use the final drilling action sorting result as the best sorting result. The method of the present invention can greatly improve the efficiency of workpiece drilling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention generally relates to the field of data processing technology. More specifically, the present invention relates to a method and system for optimizing the movement path of a workpiece drill bit in a clamping production line. Background Art

[0002] As people's living standards continue to improve, their expectations for living environments and furniture are also rising. Many developers are delivering newly built residential properties with fully furnished units, almost all of which utilize custom furniture made to uniform standards. As a result, the custom panel furniture industry is booming. A piece of panel furniture is often assembled from multiple processed panels. Therefore, during the manufacturing process, it is often necessary to drill holes in each panel to facilitate splicing or installing other components.

[0003] At present, the method of drilling holes in plates is to use drilling equipment, such as Figure 1 As shown, the existing drilling equipment includes a support frame 3 for placing the plate horizontally, a clamp 4 for fixing the plate when drilling the plate, a plurality of gantries 1 arranged above the support frame, a plurality of machine heads 2 are arranged on the gantry, and a drill bag is provided on each machine head. A drill bag consists of multiple groups of drill bits, and different groups of drill bits are used for drilling different surfaces of the plate; the clamp is used to fix the plate during drilling, and the drill bit is aligned with the corresponding hole position by moving the gantry and the drill bag, thereby completing the drilling action; with the surge in orders from panel furniture manufacturers and the continuous growth of production scale, higher and higher requirements are placed on the accuracy and efficiency of plate drilling. In order to improve drilling efficiency, the commonly adopted practice is to optimize the drilling path. The existing optimization method is to first obtain all possible drilling actions based on the hole position information and drill bit configuration information, and use a greedy algorithm to screen and sort the drilling actions, that is, give priority to selecting drilling actions with more corresponding hole positions. However, this method will result in the total number of drilled holes not being reduced to a minimum. In addition, during the drilling process, if the hole position corresponding to a certain drilling action is close to the clamp, in order to avoid the drill bit and the clamp from contacting and damaging the clamp, the clamp position needs to be changed. Since changing the clamp position takes time and drilling operations cannot be performed during the clamp position change, frequent changes of the clamp position will lead to low drilling efficiency. Summary of the Invention

[0004] In order to solve the technical problem of low drilling efficiency when drilling using the existing drilling path optimization method, the present invention provides solutions in the following aspects.

[0005] In a first aspect, the present invention provides a method for optimizing a workpiece drill bit movement path in a clamping production line, comprising:

[0006] Obtaining a minimum action set and sorting the drilling actions in the minimum action set to obtain a preferred sorting result for the drilling actions; executing all drilling actions in the minimum action set according to the preferred sorting result minimizes the total length of the movement path of the drilling head of the drilling equipment; the minimum action set is a set of drilling actions that has the least number of drilling actions and covers all the hole positions to be processed;

[0007] The sequence of the drilling actions in the preferred sorting result is adjusted using a preset method, wherein the preset method includes: finding the intersection of the hand-clamping safety zones of the first n drilling actions, where the initial value of n is 2;

[0008] In response to the obtained intersection not being an empty set, set n=n+1 and return to the previous step; in response to the obtained intersection being an empty set, move the nth drilling action in the better sorting result to the last position in the sorting result and return to the previous step; in response to the intersections obtained for a preset number of consecutive times being empty sets under the condition that the first obtained intersection is not an empty set, or the value of n is equal to the total number of drilling actions in the sorting result, stop obtaining the intersection, and use the final drilling action sorting result as the best sorting result, and use the workpiece drill bit movement path corresponding to the best sorting result as the workpiece drill bit best movement path.

[0009] In one embodiment, it also includes: in response to the intersection of the hand-clamping safety areas of the first two drilling actions in the sorting results being an empty set for a consecutive preset number of times, the order of the first drilling action is locked as the first place, and the order of the drilling actions after the first drilling action is adjusted using the preset method, and the workpiece drill bit movement path corresponding to the final sorting result is used as the workpiece drill bit optimal movement path.

[0010] In one embodiment, sorting the drilling actions in the minimum action set includes:

[0011] The drilling actions in the minimum action set are sorted using an ant colony algorithm so that the total length of the movement path of the drilling equipment head after each drilling action in the minimum action set is executed is minimized, thereby obtaining a first sorting result; the drilling actions in the minimum action set are sorted using a genetic algorithm so that the total length of the movement path of the drilling equipment head after each drilling action in the minimum action set is minimized, thereby obtaining a second sorting result;

[0012] Compare the total length of the moving path of the drilling equipment head corresponding to the first sorting result with the total length of the moving path of the drilling equipment head corresponding to the second sorting result, and select the sorting result with the smaller total length of the moving path as the better sorting result; the total length of the moving path of the head is equal to the sum of the total length of the gantry moving path and the total length of the moving path of the drill package on the gantry.

[0013] In one embodiment, the use of an ant colony algorithm to sort the drilling actions in the minimum action set includes: selecting a starting point, having N ants traverse all nodes respectively, and calculating the best performance of the ant colony; the pheromone matrix of the ant colony algorithm is of order N, and the nodes along which the ants pass when searching for food are the position coordinates of the machine head of each drilling action; N is the total number of actions in the minimum action set; the position coordinates of the machine head of the drilling action refer to the position coordinates of the machine head when performing the drilling action; and the best performance of the ant colony refers to the performance corresponding to the ant that constructed the smallest path length.

[0014] In response to the best score of the ant colony not meeting the standard, the above steps are repeated and the pheromone matrix is ​​updated; in response to the best score of the ant colony meeting the standard, the first ranking result is obtained according to the ant crawling path corresponding to the best score.

[0015] In one embodiment, the sorting of the drilling actions in the minimum action set by using a genetic algorithm includes:

[0016] Based on the minimum action set, an initial population is generated according to a preset generation rule, wherein the initial population includes at least two individuals, one drilling action sorting scheme is one individual, and each drilling action sorting scheme includes all drilling actions; and the fitness value of each individual in the population is calculated;

[0017] Iteratively perform selection, crossover, and mutation operations on individuals in the initial population until a termination condition is met; after the iteration is terminated, the individual with the highest fitness is output, and the drilling action sorting scheme corresponding to the individual with the highest fitness is used as the second sorting result.

[0018] In one embodiment, obtaining the minimum action set includes:

[0019] Generate a hole position and compatible drill bit correspondence table based on the hole position information to be processed and the drill bit information on the drill pack, wherein the hole position and compatible drill bit correspondence table is used to represent all drill bits adapted to each hole position to be processed;

[0020] The hole positions and the hole positions with the same drill bag coordinates in the corresponding table of the adapted drill bit are merged into the same drilling action, thereby obtaining an action set table;

[0021] The action set table is simplified using the minimum set cover problem to obtain a minimum action set. In one embodiment, the action set table is simplified using the minimum set cover problem, including:

[0022] If only the Yth column in the Mth row of the table is 1 and all other columns are 0, then the Yth column is a member of the optimal solution, and the column and the row corresponding to the 1 in the column are locked; if all the values ​​in a column are 1, then the column is also a member of the optimal solution; the table is a simplified action-hole position correspondence table obtained based on the action set table, and the actions in the simplified action-hole position correspondence table cover all the hole positions to be processed and have the least number of actions;

[0023] If a column contains the largest number of 1s, take that column as one of the optimal solutions and lock that column and the row corresponding to the 1 in that column;

[0024] Repeat the above steps until the set of all optimal solutions covers all hole positions, and the set of optimal solutions is recorded as the minimum action set.

[0025] In one embodiment, the method for obtaining the simplified action-hole position correspondence table includes:

[0026] Check the action set table for duplicates, and if the action set table contains several actions with exactly the same hole positions, perform a deduplication operation;

[0027] The hole positions to be processed are taken as columns, and the punching actions in the action set table are taken as rows, so as to obtain an initial action-hole position correspondence table. For a certain column in the table, if the hole position corresponding to a certain row in the column is the hole position included in the punching action corresponding to the column, then the value of the row is set to 1, otherwise the value of the row is set to 0;

[0028] If all 1s in column M appear in column N, delete column M; if all 1s in row X appear in row Y, delete row Y.

[0029] In one embodiment, generating a table of correspondence between hole positions and suitable drill bits includes:

[0030] Read the attribute information of each hole to be processed from the external processing file and generate a hole table. The attribute information of the hole to be processed includes the working surface where the hole is located, the hole type, the hole diameter, the hole depth, and whether a specific tool is specified;

[0031] Read the attribute information of each drill bit from the device table to generate a drill bit table. The attribute information of the drill bit includes the drill bit type, the relative position coordinates of the drill bit on the drill pack, the drill bit type, the drill bit working surface, the maximum drilling depth and the travel coordinate limit of the drill bit;

[0032] For each hole to be processed, a drill bit that matches the working surface, hole type, hole diameter and hole depth of the hole is obtained according to the hole table and the drill bit table, thereby generating a corresponding table of hole positions and suitable drill bits.

[0033] In a second aspect, the present invention provides a workpiece drill bit movement path optimization system for a clamping-type production line, comprising a memory and a processor, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the workpiece drill bit movement path optimization method for a clamping-type production line of the present invention is implemented.

[0034] The technical effect of the present invention is: when the workpiece drill bit movement path optimization method in this embodiment is used to optimize the workpiece drill bit movement path, by obtaining the minimum action set, the drilling action is reduced on the basis of ensuring that all the hole positions to be processed are covered, thereby improving the drilling efficiency; after obtaining the minimum action set, it is sorted so as to minimize the total length of the machine head movement path of the drilling equipment; since the workpiece position needs to be kept fixed by the clamp during the entire drilling process, in order to avoid the drill bit colliding with the clamp and causing damage to the clamp, when the hole position to be processed in a certain drilling action is near the clamp, the position of the clamp needs to be adjusted, but since changing the clamp position takes a certain amount of time, the gantry needs to be paused during the change of the clamp position and the movement of the drill bag. If the clamping position is frequently changed, the drilling efficiency will be too low. Therefore, after obtaining the sorting result, a preset method is used to adjust the sorting result, so that the order of drilling actions with a common clamping safety area is as close as possible, thereby greatly reducing the frequency of clamping position changes and ensuring drilling efficiency; in order to avoid excessive adjustment of the sorting result, the adjustment of the order of drilling actions is stopped when the intersections obtained for a preset number of consecutive times are all empty sets; when optimizing the workpiece drill bit movement path, the method of the present invention not only takes into account the need to make the total length of the workpiece drill bit movement path as small as possible, but also takes into account the need to make the frequency of clamping position changes as low as possible, thereby greatly improving the efficiency of drilling the workpiece.

[0035] Furthermore, if the intersections of the hand-clamping safety areas of the first two drilling actions in the sorting results are all empty sets for the preset number of consecutive times, it means that the first drilling action and other drilling actions within its neighborhood range are very likely to have no hand-clamping safety area or only individual drilling actions within its neighborhood range have hand-clamping safety areas. Since the drilling action will be adjusted once after each empty set is obtained, in order to avoid excessive adjustment of the drilling action sequence in the better sorting result, resulting in an excessively long length of the drill bit moving path, the first drilling action will no longer be used to obtain the intersection with the subsequent drilling actions when an empty set appears for the preset number of consecutive times. The order of the first drilling action and the subsequent drilling actions will be fixed in the first place, and the sequence will only be adjusted for the subsequent drilling actions. Therefore, the method in this embodiment can further avoid an excessive length of the drill bit moving path while reducing the frequency of changing the hand-clamping position.

[0036] Furthermore, by sending N ants to search for paths at the same time, the efficiency of obtaining the first sorting result can be greatly improved, thereby improving the efficiency of generating the workpiece drilling path.

[0037] Furthermore, when obtaining the minimum action set, the correspondence between the hole position and the adapted drill bit is first obtained, and the drilling actions are merged according to the correspondence between the hole position and the adapted drill bit, thereby greatly reducing the number of drilling actions. Finally, the drilling actions are screened using the minimum set cover problem, and redundant drilling actions are removed, thereby further reducing the number of drilling actions in order to improve the drilling efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0039] Figure 1 is a schematic diagram schematically showing a drilling device in the prior art;

[0040] Figure 2 is a flowchart schematically illustrating a method for optimizing a workpiece drill bit moving path in a clamping-type production line according to an embodiment of the present invention;

[0041] Figure 3 Schematic diagram showing the optimal ranking result of drilling actions according to an embodiment of the present invention;

[0042] Figure 4 Schematically illustrates the structure of a workpiece drill bit moving path optimization system for a clamping-type production line according to an embodiment of the present invention. DETAILED DESCRIPTION

[0043] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work shall fall within the scope of protection of the present invention.

[0044] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0045] Example of a method for optimizing the movement path of a workpiece drill bit in a clamping production line:

[0046] like Figure 2 As shown, the method for optimizing the movement path of a workpiece drill bit in a clamping production line of the present invention includes:

[0047] S101. Obtaining a better sorting result of the drilling actions, specifically: obtaining a minimum action set and sorting the drilling actions in the minimum action set to obtain a better sorting result of the drilling actions; executing all the drilling actions in the minimum action set according to the better sorting result can minimize the total length of the moving path of the head of the drilling equipment; the minimum action set refers to a set of drilling actions with the least number of drilling actions and covering all the hole positions to be processed.

[0048] The minimum action set can be obtained based on the hole position information to be processed and the drill bit information of the drilling equipment.

[0049] S102. Calculate the intersection of the hand-clamping safety areas of the drilling action, specifically: use a preset method to adjust the order of the drilling actions in the preferred sorting result, the preset method includes: calculating the intersection of the hand-clamping safety areas of the first n drilling actions, where the initial value of n is 2.

[0050] For example: assuming that n is equal to 2, then the intersection of the hand-clamping safety areas of the first two drilling actions in the first two better sorting results is calculated. Assuming that the hand-clamping safety areas of the first two drilling actions are area A and area B, and area A is composed of area D and area C, and area B is composed of area C and area E, then the result of the intersection of area A and area B is area C.

[0051] S103. Obtain the optimal movement path of the workpiece drill bit, specifically: in response to the obtained intersection being not an empty set, set n=n+1, and return to the previous step; in response to the obtained intersection being an empty set, move the nth drilling action in the better sorting result to the last position in the sorting result, and return to the previous step; in response to the intersections obtained for a preset number of consecutive times being empty sets under the condition that the first obtained intersection is not an empty set, or the value of n is equal to the total number of drilling actions in the sorting result, stop obtaining the intersection, and use the final drilling action sorting result as the best sorting result, and use the workpiece drill bit movement path corresponding to the best sorting result as the best movement path of the workpiece drill bit.

[0052] The preset number of times can be 2 times, 3 times, 4 times or other appropriate times, which can be determined based on the total number of holes to be processed. The greater the total number, the greater the corresponding preset number. Preferably, the preset number in this embodiment is 3 times.

[0053] like Figure 3As shown, assuming that the optimal sorting result of the drilling actions is drilling action A1-drilling action A2-drilling action A3-drilling action A4, the hand-clamping safety area corresponding to each drilling action is the shaded part in the figure, and the hole position corresponding to each drilling action is shown as the circle in the figure; first, the intersection of the hand-clamping safety area of ​​drilling action A1 and the hand-clamping safety area of ​​drilling action A2 is calculated, and the result is an empty set, then drilling action A2 is adjusted to the fourth place, drilling action A3 becomes the second place, and drilling action A4 becomes the third place. Next, we need to find the intersection of the hand-clamping safety area of ​​drilling action A1 and the hand-clamping safety area of ​​drilling action A3. It can be found that the result of the intersection is not an empty set, so the value of n is set to 3. Then, we find that the result of the intersection of the hand-clamping safety area of ​​drilling action A1, the hand-clamping safety area of ​​drilling action A3, and the hand-clamping safety area of ​​drilling action A4 is still not an empty set, so the value of n is set to 4, which is equal to the total number of drilling actions in the sorting result. Then, we exit the iterative process, and the final optimal sorting result is drilling action A1 - drilling action A3 - drilling action A4 - drilling action A2. During the execution of the drilling action, it is only necessary to set the hand-clamping safety area in the area obtained by finding the intersection of the hand-clamping safety area of ​​drilling action A1, the hand-clamping safety area of ​​drilling action A3, and the hand-clamping safety area of ​​drilling action A4. There is no need to change the hand-clamping position, thereby improving the efficiency of workpiece drilling.

[0054] Since the sorting result needs to be adjusted each time an empty set appears in the result of intersection calculation, and each adjustment will affect the total length of the movement path of the workpiece drill bit, in order to avoid adjusting the sorting result too much, which will result in the total length of the movement path of the workpiece drill bit being too long after executing the drilling action in the minimum action set, if the intersections obtained for a preset number of consecutive times are all empty sets, the intersection calculation step is stopped, and the sorting result obtained at the current moment is used as the best sorting result.

[0055] When the value of n is equal to the total number of drilling actions in the sorting result, it means that the intersection of the gripper safety areas corresponding to all drilling actions in the sorting result has been calculated, and the intersection is not an empty set. At this time, the gripper can be set in the area corresponding to the obtained intersection. During the entire process of executing each drilling action in the better sorting result in sequence, the drill bit will not touch the gripper. Therefore, there is no need to adjust the order of each drilling action in the better sorting result, and the step of calculating the intersection can be stopped.

[0056] When the workpiece drill bit movement path optimization method of this embodiment is used to optimize the workpiece drill bit movement path, by obtaining the minimum action set, the drilling action is reduced on the basis of ensuring that all the hole positions to be processed are covered, thereby improving the drilling efficiency; after obtaining the minimum action set, it is sorted so that the total length of the machine head movement path of the drilling equipment is minimized; since the workpiece position needs to be kept stationary by the clamp during the entire drilling process, in order to avoid the drill bit colliding with the clamp and causing damage to the clamp, when the hole position to be processed in a certain drilling action is near the clamp, the position of the clamp needs to be adjusted, but since changing the clamp position takes a certain amount of time, the movement of the gantry and the drill bag needs to be suspended during the change of the clamp position. If the gripper position is frequently changed, the drilling efficiency will be too low. Therefore, after obtaining the sorting result, a preset method is used to adjust the sorting result, so that the order of drilling actions with a common gripper safety area is as close as possible, thereby greatly reducing the frequency of gripper position change and ensuring drilling efficiency. In order to avoid excessive adjustment of the sorting result, the adjustment of the order of drilling actions is stopped when the intersections obtained for a preset number of consecutive times are all empty sets. When optimizing the workpiece drill bit movement path, the method of the present invention not only takes into account the need to minimize the total length of the workpiece drill bit movement path, but also takes into account the need to minimize the frequency of gripper position change, thereby greatly improving the efficiency of drilling the workpiece.

[0057] In one embodiment, it also includes: in response to the intersection of the hand-clamping safety areas of the first two drilling actions in the sorting results being an empty set for a consecutive preset number of times, the order of the first drilling action is locked as the first place, and the order of the drilling actions after the first drilling action is adjusted using the preset method, and the workpiece drill bit movement path corresponding to the final sorting result is used as the workpiece drill bit optimal movement path.

[0058] If the intersections of the hand-clamping safety areas of the first two drilling actions in the sorting results are all empty sets for the preset number of consecutive times, it means that the first drilling action and other drilling actions in its neighborhood range are very likely to have no hand-clamping safety area or only individual drilling actions in its neighborhood range have hand-clamping safety areas. Since the drilling action will be adjusted once after each empty set is obtained, in order to avoid excessive adjustment of the drilling action sequence in the better sorting result, resulting in an excessively long length of the drill bit moving path, the first drilling action will no longer be used to obtain the intersection with the subsequent drilling actions when an empty set appears for the preset number of consecutive times. The order of the first drilling action and the subsequent drilling actions will be fixed in the first place, and the sequence will only be adjusted for the subsequent drilling actions. Therefore, the method in this embodiment can further avoid an excessive length of the drill bit moving path while reducing the frequency of changing the hand-clamping position.

[0059] In one embodiment, sorting the drilling actions in the minimum action set includes:

[0060] S201, sorting the drilling actions in the minimum action set using an ant colony algorithm so that the total length of the movement path of the drilling equipment head after each drilling action in the minimum action set is completed is minimized, thereby obtaining a first sorting result; sorting the drilling actions in the minimum action set using a genetic algorithm so that the total length of the movement path of the drilling equipment head after each drilling action in the minimum action set is completed is minimized, thereby obtaining a second sorting result;

[0061] In nature, ants release pheromones, volatile chemicals, along their paths as they search for food. Following ants choose their own paths based on the concentration of pheromones left by preceding ants. Increasing pheromone concentrations attract more ants to that path, creating a positive feedback loop that ultimately leads all ants to choose the same shortest path. The ant colony algorithm (ACO) mimics this foraging behavior, guiding the path selection of other ants by simulating the pheromones left by ants during their foraging journey. Ants that advance more often choose more random paths, and longer paths take longer. As pheromones evaporate over time, ants that follow behind tend to choose paths with higher pheromone concentrations. This behavior leads to a gradual accumulation of pheromones along the shortest path, ultimately leading the algorithm to the optimal path. The ACO's characteristics include parallelism, self-organization, robustness, and positive feedback, which make it highly effective in solving combinatorial optimization problems.

[0062] When applying the principles of the ant colony algorithm to the problem of finding the optimal drilling path for a machine, the coordinate position of the machine head during each drilling action is considered a path (or city) for the ants in their foraging journey. Depending on the design characteristics of the machine, the starting and ending points of the ants' foraging journeys may be fixed or must adhere to certain rules, such as whether they must return to the starting point upon completion to form a closed trajectory. Each ant must traverse all cities for foraging to conclude. During this process, each ant releases pheromones in each city it passes through. While subsequent ants tend to choose paths based on pheromone concentration, they also exhibit a certain degree of random selection. Pheromones evaporate according to a set pattern. The increasing cumulative pheromone concentration in a city attracts more subsequent ants to choose that city, forming a positive feedback loop that ultimately leads the algorithm to an optimal path consisting of a sequence of cities with the highest pheromone concentrations. This path represents the optimal drilling process sequence.

[0063] After the ants sent out complete the path-finding work, if the algorithm termination conditions are not met, the next batch of ants must be sent out to repeat a new round of path-finding work. This process is called iteration; the iteration termination conditions can be: the number of iterations reaches the maximum number of iterations, the ant colony algorithm reaches the longest algorithm usage time, the best result of the ant colony meets the preset conditions, or the difference between the best results of multiple consecutive iterations is within the set range.

[0064] Genetic algorithms, based on Darwin's theory of evolution, employ natural selection and genetics to create computational models that simulate the natural evolutionary process of continuously producing superior offspring, thereby searching for optimal solutions. Using mathematical methods and computer simulation, these algorithms transform the problem-solving process into something similar to the genetic crossover and mutation of chromosomes in biological evolution. When solving complex combinatorial optimization problems, they are typically able to achieve better results more quickly than conventional optimization algorithms. Genetic algorithms have been widely used in fields such as combinatorial optimization, machine learning, signal processing, adaptive control, and artificial life.

[0065] When using a genetic algorithm to optimize drilling paths, each drilling action in the minimum action set must be numbered when generating the initial population. Any ordering of all the machining actions represents a chromosome in the solution set, and each chromosome corresponds to an individual in the population. For example, if there are six machining actions, numbered 1 through 6, then 325416 is considered a chromosome, and 623145 is also a chromosome.

[0066] The main conditions that the fitness function design must meet include: 1. single value, continuous, non-negative, and maximized; 2. reasonable and consistent; 3. small amount of calculation; 4. strong versatility.

[0067] When using genetic algorithms to optimize drilling processing paths, the quality of a path can be judged with different emphases, such as the shortest total distance or the lowest total energy consumption. The shortest total distance means the shortest processing time and the highest efficiency. In addition, because the energy consumption of gantry movement and drill package movement during machine processing is different, the movement path can be split into gantry travel and drill package travel according to the processing action sequence, and the total processing energy consumption can be calculated separately. The path with the lowest energy consumption is ranked best.

[0068] S202. Compare the total length of the moving path of the drilling equipment head corresponding to the first sorting result with the total length of the moving path of the drilling equipment head corresponding to the second sorting result, and select the sorting result with the smaller total length of the moving path as the better sorting result; the total length of the moving path of the head is equal to the sum of the total length of the gantry moving path and the total length of the moving path of the drill package on the gantry.

[0069] For example, after all drilling operations are completed, the total length of the gantry movement is x meters, and the total length of the drill bit moving back and forth along the gantry is y meters. The total length of the machine head's movement path is x + y meters.

[0070] After obtaining the minimum action set, the ant colony algorithm and genetic algorithm are used to sort the drilling actions respectively. Since the sorting results obtained by the ant colony algorithm and the genetic algorithm may be different, the sorting result with the smaller total length of the moving path is selected as the better sorting result, so that the head of the drilling equipment can move as short a path length as possible after drilling all holes according to the optimized workpiece drill bit movement path, thereby further improving the drilling efficiency and reducing the energy consumption of the drilling equipment.

[0071] As can be seen from the above embodiments, the iteration termination condition may be: the best performance of the ant colony meets a preset condition. In one embodiment, the use of the ant colony algorithm to sort the drilling actions in the minimum action set includes:

[0072] S301. Select a starting point, have N ants traverse all nodes, and calculate the best performance of the ant colony; the pheromone matrix of the ant colony algorithm is of order N, and the nodes along the path of the ants when searching for food are the position coordinates of the machine head of each drilling action; N is the total number of actions in the minimum action set; the position coordinates of the machine head of the drilling action refer to the position coordinates of the machine head when the drilling action is performed; the best performance of the ant colony is the performance corresponding to the ant that constructed the smallest path length;

[0073] During drilling, the drill head remains stationary, and only the drill bit needs to be extended to drill. The drill head position coordinates for drilling refer to the position where the drill head should be when performing the corresponding drilling action.

[0074] S302: In response to the best score of the ant colony not meeting the standard, repeating the above steps and updating the pheromone matrix; in response to the best score of the ant colony meeting the standard, obtaining the first ranking result according to the ant crawling path corresponding to the best score.

[0075] N ants are sent out at the same time to search for paths. The path-finding calculation process of each ant is completely independent. This algorithm is suitable for efficient parallel operation in a multi-core or multi-threaded environment.

[0076] By sending N ants to search for paths at the same time, the efficiency of obtaining the first sorting result can be greatly improved, thereby improving the efficiency of generating the workpiece drilling path.

[0077] For ant A, its path-finding process includes:

[0078] (1) Select a fixed or random starting point;

[0079] (2) Take a random number Q1. If the random number Q1 is less than a preset value Q0, take a random number Q2 and select the next node using the roulette algorithm based on the random number Q2. If the random number Q1 is greater than or equal to the preset value Q0, select the next node based on the distance from the current node to each of the remaining nodes and the pheromone amount of each of the remaining nodes.

[0080] Combining the distance from the current node to each of the remaining nodes and the pheromone amount of each of the remaining nodes to select the next node includes calculating the probability of each node being selected. For a certain node, the probability p1 of its selection is calculated as follows:

[0081]

[0082] Where ρ represents the pheromone concentration of the node, and l represents the distance between the node and the current node.

[0083] (3) Matrix pheromone volatilization and local pheromone enhancement;

[0084] Pheromone volatilization: Pheromones evaporate at a rate set by the system at regular intervals.

[0085] Local pheromone reinforcement: During the path-finding process, ants leave pheromones at the destination node at every step. The amount of pheromones accumulates according to the set value. The formula is as follows:

[0086] a i,j =a′ i,j +(1-Rho)×Tau0 (2)

[0087] Where Rho is the local pheromone volatility factor, (1-Rho) is the residual amount, Tau0 is the pheromone increment, a i,j is the pheromone concentration from node i to node j, a′ i,j is the pheromone concentration from node i to node j before the current accumulation.

[0088] (4) In response to ant A completing its traversal of all nodes, it calculates the current path length and ends the path-finding process.

[0089] In one embodiment, the sorting of the drilling actions in the minimum action set by using a genetic algorithm includes:

[0090] S401: Based on the minimum action set, generate an initial population according to a preset generation rule, wherein the initial population includes at least two individuals, each drilling action sorting scheme is an individual, and each drilling action sorting scheme includes all drilling actions; calculate the fitness value of each individual in the population;

[0091] The core of Darwin's theory of evolution is the survival of the fittest. Fitness represents an individual's ability to adapt to its environment. More successful individuals typically have more offspring, while less successful individuals are gradually eliminated during the evolutionary process. The fitness function of a genetic algorithm, also called an evaluation function, is an indicator used to assess the quality of each individual in a population. It is evaluated based on the objective function of the problem being solved. The fitness value is calculated based on the fitness function, and the design of the fitness function primarily meets the following conditions:

[0092] 1Single-valued, continuous, non-negative, maximized.

[0093] 2. Reasonable and consistent.

[0094] 3. Small amount of calculation.

[0095] 4. Strong versatility.

[0096] When using genetic algorithms to optimize drilling processing paths, the quality of a path can be judged with different emphases, such as the shortest total distance (i.e., an efficiency-first evaluation method) or the lowest total energy consumption (i.e., an energy consumption-first evaluation method); the shortest total distance means the shortest processing time and the highest efficiency; in addition, because the energy consumption of gantry movement and drill package movement are different during machine processing, the movement path can be split into gantry travel and drill package travel according to the processing action sequence, and the total processing energy consumption can be calculated separately. The path with the lowest energy consumption is ranked best.

[0097] If the efficiency-first evaluation method is selected, the fitness function expression is:

[0098]

[0099] If the energy consumption priority evaluation method is selected, the fitness function expression is:

[0100]

[0101] In formula (3) to formula (4), f x represents the fitness of an individual, l1 represents the total length of the moving path of the head corresponding to the individual, l a represents the total length of the gantry movement path corresponding to the individual, E1 represents the unit energy consumption of the gantry movement, l b It represents the total length of the drilling package movement path, and E2 represents the unit energy consumption of the drilling package movement.

[0102] S402. Iteratively perform selection, crossover, and mutation operations on individuals in the initial population until a termination condition is met; after the iteration is terminated, the individual with the highest fitness is output, and the drilling action sorting scheme corresponding to the individual with the highest fitness is used as the second sorting result.

[0103] Selection: The process of selecting superior individuals from a population for pairing and mating to produce superior offspring is called selection. The goal of selection is to pass optimized individuals (or solutions) directly to the next generation or to generate new individuals through pairing and crossover, which are then passed on to the next generation. Selection is based on the fitness assessment of individuals in a population. Common selection operators include the fitness proportion method, random traversal sampling, and local selection. The selection process can be flexible, using a well-matched approach to increase the opportunities for the best chromosomes to pair with each other. At the same time, inbreeding should be avoided, which can lead to convergence of offspring and a failure to achieve optimal results. Sometimes, to prevent the current optimal chromosome from being destroyed, it can be directly assigned to the next generation of evolution.

[0104] The core function of biological evolution in nature is the recombination (i.e., mutation) of biological genes. Similarly, the core function of genetic algorithms is the crossover operator of genetic operations. The so-called crossover refers to the operation of replacing and recombining the partial structures of two parent individuals to generate new individuals. Through crossover, the search ability of genetic algorithms has been greatly improved. In the long time since the emergence of genetic algorithms, domestic and foreign scientific researchers have been continuously studying crossover operators. The purpose is to solve the same or similar problems and find out how to perform chromosome gene crossover so that the algorithm can converge to the local optimal result faster and better. The better crossover methods are all based on the statistical summary of experimental data of classic problems. In this embodiment, the ordered crossover method is selected when solving the drilling path optimization problem.

[0105] The basic content of the mutation operator is to change the gene value at certain loci of the individual strings in the population. Depending on the different individual encoding representation methods, the mutation operator includes: real-valued mutation and binary mutation.

[0106] In one embodiment, the generation rule may be any one of the following:

[0107] Generation rule 1: the first action among all the punching actions required to fix the workpiece is selected, and subsequent actions are randomly selected in sequence until all actions are selected;

[0108] Generate rule 2: select the first action among all punching actions required to fix the workpiece, and then use the greedy algorithm to select subsequent actions in sequence until all actions are selected;

[0109] Generation rule three: randomly sort all punching actions required for the workpiece;

[0110] Generation rule 4: randomly select the first action among all the punching actions required for the workpiece, and then use the greedy algorithm to select subsequent actions in sequence until all actions are selected.

[0111] According to the generation rules in this embodiment, the initial population can be quickly generated.

[0112] In one embodiment, obtaining the minimum action set includes:

[0113] S501: Generate a hole position and compatible drill bit correspondence table based on the hole position information to be processed and the drill bit information on the drill kit, wherein the hole position and compatible drill bit correspondence table is used to represent all drill bits adapted to each hole position to be processed;

[0114] S502, merging the hole positions and the hole positions with the same drill package coordinates in the adapted drill bit correspondence table into the same drilling action, thereby obtaining an action set table;

[0115] S503: Simplify the action set table using the minimum set cover problem, thereby obtaining a minimum action set.

[0116] When obtaining the minimum action set, the correspondence between the hole position and the adapted drill bit is first obtained, and the drilling actions are merged according to the correspondence between the hole position and the adapted drill bit, thereby greatly reducing the number of drilling actions. Finally, the minimum set cover problem is used to screen the drilling actions and remove redundant drilling actions, thereby further reducing the number of drilling actions and improving the drilling efficiency.

[0117] In one embodiment, simplifying the action set table using the minimum set cover problem includes:

[0118] S601. If only the Yth column in the Mth row of the table is 1 and all other columns are 0, then the Yth column is a member of the optimal solution, and the column and the row corresponding to the 1 in the column are locked; if all the values ​​in a column are 1, then the column is a member of the optimal solution; the table is a simplified action-hole position correspondence table obtained based on the action set table, and the actions in the simplified action-hole position correspondence table cover all the hole positions to be processed and have the least number of actions;

[0119] S602: If a column contains the largest number of 1s, take the column as one of the optimal solutions and lock the column and the row corresponding to the 1 in the column;

[0120] S603 , repeat the above steps until the set consisting of all optimal solutions covers all hole positions, and the set consisting of the optimal solutions is recorded as the minimum action set.

[0121] In one embodiment, the method for obtaining the simplified action-hole position correspondence table includes:

[0122] S701, checking the action set table for duplicates, and if the action set table contains several actions with exactly the same hole positions, performing a deduplication operation;

[0123] S702: Using the hole positions to be processed as columns and the punching actions in the action set table as rows, an initial action-hole position correspondence table is obtained. For a certain column in the table, if the hole position corresponding to a certain row in the column is the hole position included in the punching action corresponding to the column, the value of the row is set to 1; otherwise, the value of the row is set to 0.

[0124] For example, assuming there are three punching actions, where the hole positions to be processed for punching action 1 are hole 1 and hole 2, the hole positions to be processed for punching action 2 are hole 1, hole 2, and hole 3, and the hole position to be processed for punching action 3 is hole 4. The initial action-hole position correspondence table is shown in the following table:

[0125] Table 1

[0126] Punching action 1 Punching Action 2 Punching Action 3 Hole 1 1 1 0 Hole 2 1 1 0 Hole 3 0 1 0 Hole 4 0 0 1

[0127] S703. If all 1s in column M appear in column N, delete column M; if all 1s in row X appear in row Y, delete row Y.

[0128] In one embodiment, generating a table of correspondence between hole positions and suitable drill bits includes:

[0129] S801, reading attribute information of each hole to be processed from an external processing file and generating a hole table, wherein the attribute information of the hole to be processed includes the working surface where the hole is located, the hole type, the hole diameter, the hole depth, and whether a specific tool is specified;

[0130] S802. Read the attribute information of each drill bit from the device table to generate a drill bit table. The attribute information of the drill bit includes the drill bit type, the relative position coordinates of the drill bit on the drill pack, the drill bit type, the drill bit working surface, the maximum drilling depth, and the travel coordinate limit of the drill bit.

[0131] S803. For each hole to be processed, obtain a drill bit that matches the working surface, hole type, hole diameter, and hole depth of the hole according to the hole table and the drill bit table, thereby generating a corresponding table of hole positions and matching drill bits.

[0132] Example of a workpiece drill bit movement path optimization system for a clamping production line:

[0133] The present invention also provides a workpiece drill bit moving path optimization system for a clamping production line. Figure 4 As shown, the workpiece drill bit movement path optimization system of the clamping type production line includes a processor and a memory, and the memory stores computer program instructions. When the computer program instructions are executed by the processor, the workpiece drill bit movement path optimization method of the clamping type production line according to the first aspect of the present invention is implemented.

[0134] The workpiece drill bit movement path optimization system of the clamping production line also includes other components familiar to those skilled in the art, such as a communication bus and a communication interface. Their settings and functions are known in the art and will not be described in detail here.

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

[0136] In the description of this specification, "multiple" and "several" mean at least two, such as two, three or more, etc., unless otherwise clearly defined.

[0137] While several embodiments of the present invention have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Numerous modifications, variations, and alternatives will occur to those skilled in the art without departing from the concept and spirit of the present invention. It should be understood that various alternatives to the embodiments of the present invention described herein may be employed in practicing the present invention.

Claims

1. A method for optimizing the movement path of a workpiece drill bit in a clamping production line, characterized in that: include: Obtain a minimum action set and sort the drilling actions in the minimum action set to obtain a better sorting result of the drilling actions; After executing all drilling actions in the minimum action set according to the preferred sorting result, the total length of the movement path of the drilling equipment head can be minimized; the minimum action set is a set of drilling actions with the least number of drilling actions and covering all the hole positions to be processed; The sequence of the drilling actions in the preferred sorting result is adjusted using a preset method, wherein the preset method includes: finding the intersection of the hand-clamping safety zones of the first n drilling actions, where the initial value of n is 2; In response to the obtained intersection not being an empty set, set n=n+1 and return to the previous step; in response to the obtained intersection being an empty set, move the nth drilling action in the better sorting result to the last position in the sorting result and return to the previous step; in response to the intersections obtained for a preset number of consecutive times being empty sets under the condition that the first obtained intersection is not an empty set, or the value of n is equal to the total number of drilling actions in the sorting result, stop obtaining the intersection, and use the final drilling action sorting result as the best sorting result, and use the workpiece drill bit movement path corresponding to the best sorting result as the workpiece drill bit best movement path.

2. The method for optimizing the movement path of a workpiece drill bit in a clamping production line according to claim 1, wherein: Also includes: In response to the fact that the intersections of the hand-clamping safety areas of the first two drilling actions in the sorting results are all empty sets for a consecutive preset number of times, the order of the first drilling action is locked as the first place, and the order of the drilling actions after the first drilling action is adjusted using the preset method, and the workpiece drill bit movement path corresponding to the final sorting result is used as the optimal workpiece drill bit movement path.

3. The method for optimizing the movement path of a workpiece drill bit in a clamping production line according to claim 1, wherein: Sorting the drilling actions in the minimum action set includes: The drilling actions in the minimum action set are sorted using an ant colony algorithm so that the total length of the movement path of the drilling equipment head after each drilling action in the minimum action set is executed is minimized, thereby obtaining a first sorting result; the drilling actions in the minimum action set are sorted using a genetic algorithm so that the total length of the movement path of the drilling equipment head after each drilling action in the minimum action set is minimized, thereby obtaining a second sorting result; Compare the total length of the moving path of the drilling equipment head corresponding to the first sorting result with the total length of the moving path of the drilling equipment head corresponding to the second sorting result, and select the sorting result with the smaller total length of the moving path as the better sorting result; the total length of the moving path of the head is equal to the sum of the total length of the gantry moving path and the total length of the moving path of the drill package on the gantry.

4. The method for optimizing the movement path of a workpiece drill bit in a clamping production line according to claim 3, wherein: The method of using the ant colony algorithm to sort the drilling actions in the minimum action set includes: selecting a starting point, causing N ants to traverse all nodes respectively, and calculating the best performance of the ant colony; the pheromone matrix of the ant colony algorithm is of order N, and the nodes along the path of the ants when searching for food are the position coordinates of the machine head of each drilling action; N is the total number of actions in the minimum action set; the position coordinates of the machine head of the drilling action refer to the position coordinates of the machine head when the drilling action is performed; the best performance of the ant colony is the performance corresponding to the ant that constructed the smallest path length; In response to the best score of the ant colony not meeting the standard, the above steps are repeated and the pheromone matrix is ​​updated; in response to the best score of the ant colony meeting the standard, the first ranking result is obtained according to the ant crawling path corresponding to the best score.

5. The method for optimizing the movement path of a workpiece drill bit in a clamping production line according to claim 3, wherein: The using a genetic algorithm to sort the drilling actions in the minimum action set comprises: Based on the minimum action set, an initial population is generated according to a preset generation rule, wherein the initial population includes at least two individuals, one drilling action sorting scheme is one individual, and each drilling action sorting scheme includes all drilling actions; and the fitness value of each individual in the population is calculated; Iteratively perform selection, crossover, and mutation operations on individuals in the initial population until a termination condition is met; after the iteration is terminated, the individual with the highest fitness is output, and the drilling action sorting scheme corresponding to the individual with the highest fitness is used as the second sorting result.

6. The method for optimizing the movement path of a workpiece drill bit in a clamping production line according to any one of claims 1 to 5, wherein: The obtaining of the minimum action set includes: Generate a hole position and compatible drill bit correspondence table based on the hole position information to be processed and the drill bit information on the drill pack, wherein the hole position and compatible drill bit correspondence table is used to represent all drill bits adapted to each hole position to be processed; The hole positions and the hole positions with the same drill bag coordinates in the corresponding table of the adapted drill bit are merged into the same drilling action, thereby obtaining an action set table; The action set table is simplified using the minimum set cover problem to obtain the minimum action set.

7. The method for optimizing the movement path of a workpiece drill bit in a clamping production line according to claim 6, wherein: The method of simplifying the action set table by using the minimum set cover problem includes: If only the Yth column in the Mth row of the table is 1 and all other columns are 0, then the Yth column is a member of the optimal solution, and the column and the row corresponding to the 1 in the column are locked; if all the values ​​in a column are 1, then the column is also a member of the optimal solution; the table is a simplified action-hole position correspondence table obtained based on the action set table, and the actions in the simplified action-hole position correspondence table cover all the hole positions to be processed and have the least number of actions; If a column contains the largest number of 1s, take that column as one of the optimal solutions and lock that column and the row corresponding to the 1 in that column; Repeat the above steps until the set of all optimal solutions covers all hole positions, and the set of optimal solutions is recorded as the minimum action set.

8. The method for optimizing the movement path of a workpiece drill bit in a clamping production line according to claim 7, wherein: The method for obtaining the simplified action-hole position correspondence table includes: Check the action set table for duplicates, and if the action set table contains several actions with exactly the same hole positions, perform a deduplication operation; The hole positions to be processed are taken as columns, and the punching actions in the action set table are taken as rows, so as to obtain an initial action-hole position correspondence table. For a certain column in the table, if the hole position corresponding to a certain row in the column is the hole position included in the punching action corresponding to the column, then the value of the row is set to 1, otherwise the value of the row is set to 0; If all 1s in column M appear in column N, delete column M; if all 1s in row X appear in row Y, delete row Y.

9. The method for optimizing the movement path of a workpiece drill bit in a clamping production line according to claim 6, wherein: The generating of the table of correspondence between hole positions and suitable drill bits includes: Read the attribute information of each hole to be processed from the external processing file and generate a hole table. The attribute information of the hole to be processed includes the working surface where the hole is located, the hole type, the hole diameter, the hole depth, and whether a specific tool is specified; Read the attribute information of each drill bit from the device table to generate a drill bit table. The attribute information of the drill bit includes the drill bit type, the relative position coordinates of the drill bit on the drill pack, the drill bit type, the drill bit working surface, the maximum drilling depth and the travel coordinate limit of the drill bit; For each hole to be processed, a drill bit that matches the working surface, hole type, hole diameter and hole depth of the hole is obtained according to the hole table and the drill bit table, thereby generating a corresponding table of hole positions and suitable drill bits.

10. A system for optimizing the movement path of a workpiece drill bit in a clamping production line, comprising a memory and a processor, wherein the memory stores computer program instructions, characterized in that: When the computer program instructions are executed by the processor, the method for optimizing the movement path of a workpiece drill bit in a clamping production line according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Template parameter planning method and system for drilling machine

    CN113253674A

  • Drilling method and drilling machine

    JP6709869B1