Workpiece drill bit moving path optimization method and system for clamping type production line
By optimizing the order of drilling actions and adjusting the intersection of the clamping safety areas, the problem of low drilling efficiency in the prior art is solved, and a more efficient drilling process and a lower clamping position replacement frequency is achieved.
Patent Information
- Application Number
- CN202411644616.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2044-11-18
AI Technical Summary
Existing drilling path optimization methods lead to low drilling efficiency, especially when the clamping position is frequently changed, resulting in excessive total length of the head movement path of the drilling equipment.
By obtaining the minimum set of actions and sorting them, the order of drilling actions is optimized to reduce the total length of the head movement path of the drilling equipment. At the same time, the preset method is used to adjust the drilling action sequence, so that the drilling action with a common safe area of clamping is close to each other, reducing the frequency of clamping position replacement.
On the basis of ensuring coverage of all holes to be processed, the drilling action is reduced, thereby improving drilling efficiency and reducing the frequency of changing the clamping position, and avoiding the overall length of the head movement path of the drilling equipment being too large.
Smart Images

Figure CN119567364A_ABST
Abstract
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 moving path of a workpiece drill bit in a clamping production line. Background Art
[0002] As people's living standards continue to improve, the requirements for living environment and furniture are also increasing. Many developers' newly built residential buildings are delivered as finely decorated houses, and almost all of them use customized furniture of unified standards. Therefore, the customized panel furniture industry has flourished. A panel furniture is often assembled from multiple processed panels. Therefore, when manufacturing panel furniture, it is usually necessary to drill holes on each panel to facilitate the splicing of panels or the installation of 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 horizontally placing the plate, 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 arranged on each machine head. A drill bag consists of a plurality of groups of drill bits, and different groups of drill bits are used for drilling holes on different surfaces of the plate; the plate is fixed with the clamp 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 the drilling efficiency, the commonly adopted approach 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 the 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 drillings 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 from contacting the clamp 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 period of changing the clamp position, frequent changes of the clamp position will result in 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 moving path of a clamping production line, comprising:
[0006] 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 the drilling actions in the minimum action set according to the better sorting result, the total length of the moving path of the head of the drilling equipment can be minimized; the minimum action set refers to a set of drilling actions with the least number of drilling actions and covering all the holes to be processed;
[0007] The drilling action sequence in the preferred sorting result is adjusted by a preset method, wherein the preset method includes: finding the intersection of the hand-clamping safety areas 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 finding 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 obtained for a consecutive preset number of times being an empty set, 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 by using an ant colony algorithm so that the total length of the moving 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 by using a genetic algorithm so that the total length of the moving path of the drilling equipment head after each drilling action in the minimum action set is executed 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 the ant colony algorithm to sort the drilling actions in the minimum action set includes: selecting a starting point, allowing N ants to traverse all nodes respectively, and counting the best score of the ant colony; the pheromone matrix of the ant colony algorithm is of N order, and the nodes that the ants pass through 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 score of the ant colony refers to the score corresponding to the ant with 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 comprises:
[0016] According to 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 matching 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 matching drill bit correspondence table is used to characterize all drill bits that are compatible with each hole position to be processed;
[0020] The hole positions and the hole positions with the same drill bag coordinates in the matching drill bit correspondence table are combined into the same drilling action, thereby obtaining an action set table;
[0021] The action set table is simplified by using the minimum set cover problem, thereby obtaining a minimum action set. In one embodiment, the action set table is simplified by using the minimum set cover problem, comprising:
[0022] If only the Yth column of the Mth row of the table is 1, and the other columns are all 0, then the Yth column is a member of the optimal solution, and the column and the row corresponding to the 1 of the column are locked; if all the columns 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 according to the action set table, and the actions in the simplified action-hole position correspondence table cover all the holes 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] The above steps are repeated 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 simplified action-hole position correspondence table acquisition method 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 of the table, if the hole position corresponding to a certain row of 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;
[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 matching 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 equipment table to generate a drill bit table, wherein the attribute information of the drill bit includes the drill bit type, the relative position coordinates of the drill bit on the drill bag, 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 matching drill bits.
[0033] In a second aspect, the present invention provides a system for optimizing the movement path of a workpiece drill bit of 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 method for optimizing the movement path of a workpiece drill bit of a clamping-type production line of the present invention is implemented.
[0034] The technical effect of the present invention is as follows: 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 holes to be processed are covered, thereby improving the drilling efficiency; after obtaining the minimum action set, the action sets are 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 a 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 to be processed in a certain drilling action is near the clamp, the position of the clamp needs to be adjusted, but since it takes a certain amount of time to change the clamp position, the gantry needs to be paused during the change of the clamp position and the movement of the drill kit. If the clamping position is frequently changed, the drilling efficiency will be too low. Therefore, after obtaining the sorting result, the 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 changing the clamping position and ensuring the 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 movement path of the workpiece drill bit, 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 changing the clamping position, 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 a 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 large length of the drill bit moving path, the first drilling action will no longer be used to calculate the intersection with the subsequent drilling actions when an empty set appears for a preset number of consecutive times, and its order will be fixed in the first place, and only the sequence of the subsequent drilling actions will be adjusted. Therefore, the method in this embodiment can further avoid the excessive length of the drill bit moving path under the premise of reducing the frequency of changing the hand clamping position.
[0036] Furthermore, by sending out 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 suitable drill bit is first obtained, and the drilling actions are merged according to the correspondence between the hole position and the suitable 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] 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:
[0039] Figure 1 is a schematic diagram schematically showing a drilling device in the prior art;
[0040] Figure 2 is a flow chart schematically showing a method for optimizing a workpiece drill moving path of a clamping type production line according to an embodiment of the present invention;
[0041] Figure 3 is a schematic diagram schematically showing a preferred ranking result of drilling actions according to an embodiment of the present invention;
[0042] Figure 4 It is a schematic diagram schematically showing the structure of a workpiece drill moving path optimization system of a clamping type production line according to an embodiment of the present invention. DETAILED DESCRIPTION
[0043] 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.
[0044] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0045] Example of method for optimizing the moving path of workpiece drill bit in clamping production line:
[0046] like Figure 2 As shown, the method for optimizing the moving path of a workpiece drill bit of a clamping production line of the present invention comprises:
[0047] S101. Obtaining a better sorting result of the drilling actions, specifically: obtaining a minimum action set, sorting the drilling actions in the minimum action set, and obtaining a better sorting result of the drilling actions; after executing all the drilling actions in the minimum action set according to the better sorting result, the total length of the moving path of the drilling equipment head can be minimized; 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, finding the intersection of the hand-clamping safety areas of the drilling actions, specifically: using a preset method to adjust the order of the drilling actions in the preferred sorting result, the preset method includes: finding the intersection of the hand-clamping safety areas of the first n drilling actions, and 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, obtaining the optimal movement path of the workpiece drill, 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 movement path corresponding to the best sorting result as the best movement path of the workpiece drill.
[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 larger the total number, the larger 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 let the value of n be equal 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 let the value of n be equal to 4, which is equal to the total number of drilling actions in the sorting result, and then exit the iteration process. The best sorting result is finally obtained as drilling action A1-drilling action A3-drilling action A4-drilling action A2. In the process of executing the drilling action, it is only necessary to set the hand clamp 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, without changing the hand clamping position, thereby improving the efficiency of workpiece drilling.
[0054] Since an empty set appears in the result of each intersection, the sorting result needs to be adjusted once, and each adjustment will affect the total length of the moving 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 moving 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 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 results, it means that the intersection of the hand-gripping safety areas corresponding to all the drilling actions in the sorting results has been found, and the intersection is not an empty set. At this time, the hand-gripping can be set in the area corresponding to the obtained intersection. During the entire process of sequentially executing each drilling action in the better sorting result, the drill bit will not touch the hand-gripping. Therefore, there is no need to adjust the order of each drilling action in the better sorting result, and the step of finding the intersection can be stopped.
[0056] 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 holes 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 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 to be processed in a certain drilling action is near the clamp, the position of the clamp needs to be adjusted, but since it takes a certain amount of time to change the position of the clamp, the movement of the gantry and the drill bag needs to be suspended during the change of the position of the clamp. 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 changing the gripper position and ensuring the 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 movement path of the workpiece drill bit, 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 changing the gripper position, 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 obtained for a consecutive preset number of times being an empty set, 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 a 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 a hand-clamping safety area. 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 large length of the drill bit moving path, the first drilling action will no longer be used to calculate the intersection with the subsequent drilling actions when an empty set appears for a preset number of consecutive times, and its order will be fixed in the first place, and only the sequence of the subsequent drilling actions will be adjusted. Therefore, the method in this embodiment can further avoid the 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, using an ant colony algorithm to sort the drilling actions in the minimum action set so that the total length of the moving path of the drilling equipment head after each drilling action in the minimum action set is executed is minimized, and a first sorting result is obtained; using a genetic algorithm to sort the drilling actions in the minimum action set so that the total length of the moving path of the drilling equipment head after each drilling action in the minimum action set is executed is minimized, and a second sorting result is obtained;
[0061] In nature, when ants are looking for food, they release pheromones, which are volatile chemicals, on the paths they pass. Other ants behind them will choose paths based on the concentration of pheromones left by the leading ants on the road. The increase in pheromone concentration will attract more ants to choose this path, forming a positive feedback loop, and eventually all ants will choose the same shortest path. The ant colony algorithm is a bionic algorithm that simulates the foraging behavior of the above ants. It guides other ants to choose paths by simulating the pheromones left by ants in the process of looking for food. The more advanced ants choose the path, the more random it is. The farther the path, the longer it takes. The pheromone evaporates over time. The later ants tend to choose paths with higher pheromone concentrations. This behavior causes the pheromone to gradually accumulate on the shortest path over time, and the algorithm finally obtains the optimal path. The characteristics of the ant colony algorithm include parallelism, self-organization, robustness, positive feedback, etc. These characteristics make the ant colony algorithm perform well in solving combinatorial optimization problems.
[0062] When applying the principle of ant colony algorithm to solve the problem of optimal drilling path of machines, the coordinate position of the machine head of each drilling action needs to be regarded as the waypoint (or city) when the ants are looking for food. According to the different design characteristics of different machines, it is stipulated whether the starting point and end point of ant foraging are fixed or must comply with certain rules, such as whether it is necessary to return to the starting point to form a closed trajectory after processing. Each ant must traverse all cities before the foraging process is considered to be over. During this process, each ant will release pheromones in the cities it passes through. While other ants tend to choose paths based on the concentration of pheromones, they also have a certain degree of random selectivity. Pheromones evaporate according to the set rules. The increase in the accumulated pheromone concentration in the city will attract more ants to choose the city, forming a positive feedback loop, and finally the algorithm obtains an optimal path composed of the city sequence with the highest pheromone concentration. This path is the processing sequence of the optimal drilling action.
[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 are based on the biological evolution process of natural selection and genetic mechanisms in Darwin's theory of biological evolution, thereby establishing a computational model and simulating the process of natural evolution to continuously produce better offspring, thereby achieving the purpose of searching for the optimal solution to the problem. The algorithm uses mathematical methods and computer simulation operations to convert the problem-solving process into a process similar to the gene crossover and mutation of chromosomes in biological evolution. When solving more complex combinatorial optimization problems, it can usually obtain better optimization results faster than some conventional optimization algorithms. Genetic algorithms have been widely used in combinatorial optimization, machine learning, signal processing, adaptive control, artificial life and other fields.
[0065] When using genetic algorithms to optimize drilling processing paths, each drilling action in the minimum action set needs to be numbered when generating the initial population. Any ordering of all processing actions is a chromosome in the solution set, and a chromosome corresponds to an individual in the population. For example, there are a total of 6 processing actions, numbered 1 to 6, then 325416 is considered a chromosome, and 623145 is also a chromosome.
[0066] The main conditions that the fitness function should meet in its design 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 stroke and drill package stroke 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 actions are completed, the total length of the gantry movement is x meters, and the total length of the drill kit moving back and forth along the gantry is y meters, then the total length of the machine head's moving path is equal to x+y meters.
[0070] After obtaining the minimum action set, the ant colony algorithm and the 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 moving path, thereby further improving the drilling efficiency and reducing the energy consumption of the drilling equipment.
[0071] It can be seen from the above embodiments that the iteration termination condition may be: the best performance of the ant colony meets the 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, make N ants traverse all nodes respectively, and count the best score of the ant colony; the pheromone matrix of the ant colony algorithm is of N order, and the nodes that the ants pass through 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 score of the ant colony refers to the score corresponding to the ant with the smallest path length;
[0073] When performing the drilling action, the position of the machine head remains unchanged, and only the drill bit needs to be extended to drill. The machine head position coordinates of the drilling action refer to the position where the machine head of the drilling device should be when performing the corresponding drilling action.
[0074] S302: 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.
[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 out 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) Taking a random number Q1, in response to the random number Q1 being less than a preset value Q0, taking a random number Q2, and selecting the next node using a roulette algorithm based on the random number Q2; in response to the random number Q1 being greater than or equal to the preset value Q0, selecting 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 being selected is calculated as follows:
[0081]
[0082] In the formula, ρ 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 volatilize at a speed ratio set by the system at regular intervals.
[0085] Local pheromone enhancement: 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, and 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 comprises:
[0090] S401, generating an initial population according to the minimum action set and 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; calculating 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 is the ability of an individual to adapt to the environment. The better the individual, the more offspring he or she will have. The poorer the individual, the more likely he or she will be eliminated in the process of evolution. The fitness function of the genetic algorithm is also called the evaluation function. It is an indicator used to evaluate the quality of each individual in the group. It is evaluated based on the objective function of the problem being solved. The fitness value is calculated based on the fitness function. The design of the fitness function mainly 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 pros and cons 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 machine head corresponding to the individual, l a represents the total length of the gantry moving path corresponding to the individual, E1 represents the unit energy consumption of the gantry moving, l b It represents the total length of the drilling package moving path, and E2 represents the unit energy consumption of the drilling package moving.
[0102] S402, iteratively performing 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 excellent individuals in a population for combination, pairing and mating to produce better offspring is called selection. The purpose of selection is to directly pass on the optimized individuals (or solutions) to the next generation or to generate new individuals through pairing and crossover and then pass on to the next generation. The selection operation is based on the fitness evaluation of individuals in the population. Commonly used selection operators are as follows: fitness ratio method, random traversal sampling method, and local selection method. The selection process can be relatively flexible. The best chromosomes can be paired with each other in a way that is well-matched. At the same time, inbreeding should be avoided, which will lead to the convergence of offspring and the inability to be better. Sometimes, in order to prevent the current optimal chromosome from being destroyed, it can be directly arranged to enter the next generation of evolution.
[0104] The core role in the biological evolution process in nature is the recombination (i.e., mutation) of biological genetic genes. Similarly, the core role in 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, with the aim of how to perform chromosome gene crossover for the same or similar problems, so that the algorithm can converge to the local optimal result faster and better. At present, the better crossover methods are all based on the statistical summary of the experimental data of classical 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 values at certain loci of the individual strings in the population. Depending on the different individual coding 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 then the subsequent actions are randomly selected in sequence until all the actions are selected;
[0108] Generate rule 2: select the first action among all the punching actions required to fix the workpiece, and then use the greedy algorithm to select the subsequent actions in sequence until all the actions are selected;
[0109] Generation rule three: randomly order 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] The initial population can be quickly generated according to the generation rules in this embodiment.
[0112] In one embodiment, obtaining the minimum action set includes:
[0113] S501, generating a hole position and matching drill bit correspondence table according to the hole position information to be processed and the drill bit information on the drill kit, wherein the hole position and matching drill bit correspondence table is used to characterize all drill bits that are matched to each hole position to be processed;
[0114] S502, merging the hole positions with the same drill package coordinates in the matching 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, so as to obtain a minimum action set.
[0116] When obtaining the minimum action set, the correspondence between the hole position and the suitable drill bit is first obtained, and the drilling actions are merged according to the correspondence between the hole position and the suitable 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 of the Mth row of the table is 1, and the other columns are all 0, then the Yth column is a member of the optimal solution, and the column and the row corresponding to the 1 of the column are locked; if all the columns in a certain column are 1, then the column is a member of the optimal solution; the table is a simplified action-hole position correspondence table obtained according to the action set table, and the actions in the simplified action-hole position correspondence table cover all the holes 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 simplified action-hole position correspondence table acquisition method 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, taking the hole positions to be processed as columns and the punching actions in the action set table as rows, thereby obtaining an initial action-hole position correspondence table, and for a certain column of the table, if the hole positions corresponding to a certain row of the column are the hole positions 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;
[0124] For example, assuming there are three punching actions, among which the hole positions to be processed corresponding to punching action 1 are hole 1 and hole 2, the hole positions to be processed corresponding to punching action 2 are hole 1, hole 2 and hole 3, and the hole position to be processed corresponding to punching action 3 is hole 4, then the initial action-hole position correspondence table is as shown in the following table:
[0125] Table 1
[0126] Punching action 1 Punch Action 2 Punch 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 the Mth column appear in the Nth column, delete the Mth column; if all 1s in the Xth row appear in the Yth row, delete the Yth row.
[0128] In one embodiment, generating a table of correspondence between hole positions and matching drill bits includes:
[0129] S801, reading the attribute information of each hole to be processed from the 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, reading the attribute information of each drill bit from the equipment table to generate a drill bit table, wherein the attribute information of the drill bit includes the drill bit type, the relative position coordinates of the drill bit on the drill bag, 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 workpiece drill bit moving path optimization system for 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, whose settings and functions are known in the art and will not be described in detail here.
[0135] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any suitable 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 may be used to store the required information and may 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.
[0136] 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.
[0137] 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 method for optimizing the moving 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 device head can be minimized; the minimum action set refers to a set of drilling actions with the least number of drilling actions and covering all the holes to be processed; The drilling action sequence in the preferred sorting result is adjusted by a preset method, wherein the preset method includes: finding the intersection of the hand-clamping safety areas 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 finding 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 moving path of a workpiece drill bit in a clamping production line according to claim 1, characterized in that: 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 consecutive preset 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.
3. The method for optimizing the moving path of a workpiece drill bit in a clamping production line according to claim 1, characterized in that: Sorting the drilling actions in the minimum action set includes: The drilling actions in the minimum action set are sorted by using an ant colony algorithm so that the total length of the moving 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 by using a genetic algorithm so that the total length of the moving path of the drilling equipment head after each drilling action in the minimum action set is executed 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 moving path of a workpiece drill bit in a clamping production line according to claim 3, characterized in that: The method of using the ant colony algorithm to sort the drilling actions in the minimum action set includes: selecting a starting point, respectively making N ants traverse all nodes, and counting the best results of the ant colony; the pheromone matrix of the ant colony algorithm is of N order, and the nodes that the ants pass through when searching for food are the position coordinates of the machine heads 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 result of the ant colony refers to the result corresponding to the ant with 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 moving path of a workpiece drill bit in a clamping production line according to claim 3, characterized in that: The using of a genetic algorithm to sort the drilling actions in the minimum action set comprises: According to 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 moving path of a workpiece drill bit in a clamping production line according to any one of claims 1 to 5, characterized in that: The obtaining of the minimum action set includes: Generate a hole position and matching 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 matching drill bit correspondence table is used to characterize all drill bits that are compatible with each hole position to be processed; The hole positions and the hole positions with the same drill bag coordinates in the matching drill bit correspondence table are combined 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 moving path of a workpiece drill bit in a clamping production line according to claim 6, characterized in that: The method of simplifying the action set table by using the minimum set cover problem includes: If only the Yth column of the Mth row of the table is 1, and the other columns are all 0, then the Yth column is a member of the optimal solution, and the column and the row corresponding to the 1 of the column are locked; if all the columns 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 according to the action set table, and the actions in the simplified action-hole position correspondence table cover all the holes 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; The above steps are repeated 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 moving path of a workpiece drill bit in a clamping production line according to claim 7, characterized in that: The simplified action-hole position correspondence table acquisition method comprises: 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 of the table, if the hole position corresponding to a certain row of 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; 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 moving path of a workpiece drill bit in a clamping production line according to claim 6, characterized in that: The generating of the table of correspondence between hole positions and matching drill bits comprises: 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 equipment table to generate a drill bit table, wherein the attribute information of the drill bit includes the drill bit type, the relative position coordinates of the drill bit on the drill bag, 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 matching 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
Method, system, device, processor and storage medium for realizing tool path planning double drill packets for numerical control six-surface drilling cutting machine
CN112462692A
Template parameter planning method and system for drilling machine
CN113253674A
Plate drilling method and device based on artificial intelligence
CN117483838A
Drilling jig, drilling unit and drilling method
JP2014237203A
Drilling method and drilling machine
JP6709869B1