A method and system for determining a workpiece drilling sequence based on a genetic algorithm
By optimizing the drilling action sequence using a genetic algorithm, the problem of low drilling efficiency in panel furniture production was solved, achieving a more efficient and safer drilling process.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2026-03-20
AI Technical Summary
In the existing technology, the drilling efficiency of drilling equipment in the production of panel furniture is low, mainly because different drilling action sequences result in different movement schemes of the gantry, machine head and gripper, which affects the overall drilling time and efficiency.
A genetic algorithm is used to determine the drilling sequence of the workpiece. By generating an initial population, calculating the fitness value, and performing selection, crossover, and mutation operations, the drilling action order is optimized. The fitness function is improved to inversely correlate with the total drilling action time, and the movement scheme of the gantry, machine head, and gripper is optimized.
It improves the efficiency of workpiece drilling by obtaining the drilling action sequencing scheme with the shortest time, reducing the number of movements of the gantry, machine head and grippers, and improving the overall efficiency and safety of the drilling equipment.
Smart Images

Figure CN119151085B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of machining drilling. More particularly, the present application relates to a method and system for determining the drilling sequence of workpieces based on a genetic algorithm. BACKGROUND
[0002] With the continuous improvement of people's living standards, the requirements for living environment and furniture are also increasing. Many developers build new residential buildings with finished houses, and almost all of them use custom-made panel furniture with uniform standards. Therefore, the custom-made panel furniture industry has developed rapidly.
[0003] In the production process of panel furniture, various specifications of wooden panels need to be spliced to assemble a whole. However, a part of the wooden workpieces need to be drilled during the assembly process. The purpose of drilling is generally to install other parts on the wooden workpiece or to assemble the furniture more quickly and efficiently.
[0004] The current drilling equipment for furniture workpieces generally includes a gantry, a machine head, and a clamping hand, which can generally move independently. Different drilling action sequences require different movement schemes of the gantry, the machine head, or the clamping hand, resulting in different distances or different numbers of movements, which in turn affects the drilling time and efficiency. Therefore, different drilling action sequences will result in different drilling efficiencies.
[0005] The patent application with publication number "CN112462688A" and the title "Method, system, device, processor and storage medium for realizing tool path planning single drill package for numerical control six-face drilling cutting machine" discloses:
[0006] A method for realizing tool path planning single drill package for numerical control six-face drilling cutting machine, the method comprises the following steps: (1) performing plate element partition preprocessing; (2) outputting a plurality of alternative clamping positions according to the partition result; (3) obtaining the optimal solution and the worst solution of each index according to the evaluation function, calculating the closeness of each clamping strategy to the optimal solution and the worst solution, and evaluating the pros and cons of the overall clamping strategy; (4) according to the clamping scheme and the clamping evaluation, the clamping scheme with the highest score is selected as the final selected clamping scheme.
[0007] The above-mentioned machining drilling method only considers the influence of the clamping position on the drilling tool path planning, and cannot effectively improve the drilling efficiency. SUMMARY
[0008] To solve the problem of low machining drilling efficiency in the prior art, the present application provides solutions in the following aspects.
[0009] In a first aspect, the present application provides a method for determining the drilling sequence of a workpiece based on a genetic algorithm, comprising:
[0010] all drilling actions required by the workpiece, generating an initial population according to a generation rule, the initial population including at least two drilling action sequencing schemes, each drilling action sequencing scheme containing all drilling actions; calculating the fitness value of each drilling action sequencing scheme in the initial population; wherein the fitness value is inversely related to the total drilling action duration; in response to not meeting a termination rule, iteratively performing selection, crossover and mutation operations on the drilling action sequencing schemes in the initial population, and calculating the fitness value, until the termination rule is met, and taking the drilling action sequencing scheme corresponding to the maximum fitness value as the optimal drilling action sequencing scheme.
[0011] Beneficial effects: By applying a genetic algorithm to the drilling action sequencing of a workpiece and improving the fitness function in the genetic algorithm, the shortest time-consuming scheme can be obtained from multiple drilling action sequencing schemes, thereby improving the efficiency of workpiece drilling.
[0012] Preferably, the fitness value is inversely related to the total drilling action duration, including: the fitness function for calculating the fitness value is an inverse proportional function of the total drilling action duration.
[0013] Preferably, the total drilling action duration includes the gantry action duration and the head action duration.
[0014] Preferably, the total drilling action duration includes the gantry action duration, the head action duration and the clamp changing action duration.
[0015] Beneficial effects: The gantry action duration, the head action duration and the clamp changing action duration can obtain a relatively accurate total drilling action duration of the entire drilling equipment when drilling a workpiece, thereby obtaining an accurate fitness value.
[0016] Preferably, the calculation method of the clamp changing action duration includes: obtaining the clamp safety area corresponding to each drilling action; using the clamp safety area corresponding to each drilling action to continuously intersect the clamp safety areas of adjacent drilling actions in the current drilling action sequencing scheme to obtain the number of clamp changing actions, thereby obtaining the clamp changing action duration.
[0017] Beneficial effects: By using the clamp safety area corresponding to each drilling action to continuously intersect the clamp safety areas of adjacent drilling actions in the current drilling action sequencing scheme, the minimum number of clamp changing actions under the current scheme can be obtained, thereby obtaining the most efficient drilling scheme under the current drilling action sequencing scheme.
[0018] Preferably, the method further comprises: obtaining a gripper safety area corresponding to each drilling action; using the gripper safety area corresponding to each drilling action, sequentially intersecting the gripper safety areas of adjacent drilling actions in the optimal drilling action scheduling scheme to obtain an optimal gripper safety area; and drilling the workpiece according to the optimal drilling action scheduling scheme and the optimal gripper safety area.
[0019] Beneficial effects: The optimal drilling action scheduling scheme and the optimal gripper safety area are combined to drill the workpiece faster and more safely.
[0020] Preferably, the termination rule comprises at least one of the following rules: termination rule one, the maximum fitness value in the initial population is greater than a first threshold value; termination rule two, in the continuous N iterations, the difference between the maximum fitness value in the initial population of each iteration and the maximum fitness value in all iterations is less than a second threshold value, and the N is a preset first number; and termination rule three, the number of iterations reaches M, where M is a preset second number.
[0021] Preferably, the generation rule comprises at least one of the following rules:
[0022] Generation rule one, fixing a first action of all drilling actions required by the workpiece, and then randomly generating the drilling action scheduling scheme; generation rule two, fixing a first action of all drilling actions required by the workpiece, and then generating the drilling action scheduling scheme using a greedy algorithm; generation rule three, randomly scheduling all drilling actions required by the workpiece; and generation rule four, randomly selecting a first action of all drilling actions required by the workpiece, and then generating the drilling action scheduling scheme using a greedy algorithm.
[0023] Preferably, in response to not meeting the termination rule, iteratively performing selection, crossover and mutation operations on the drilling action scheduling schemes in the initial population, comprising:
[0024] Based on the fitness values of the drilling action scheduling schemes in the initial population, selecting the drilling action scheduling schemes according to a roulette algorithm to obtain a first population;
[0025] Randomly obtaining a crossover point, sequentially crossing the drilling action scheduling schemes in the first population to obtain a second population; and presetting a random mutation probability, randomly mutating the drilling action scheduling schemes in the second population to obtain a third population as the initial population.
[0026] Beneficial effects: By performing selection, crossover and mutation operations on the drilling action scheduling schemes in the initial population, new drilling action scheduling schemes can be generated, the range of the entire drilling action scheduling scheme is expanded, and drilling action scheduling schemes with higher efficiency can be screened in a larger range.
[0027] In a second aspect, the present application also provides a system for determining a workpiece drilling sequence based on a genetic algorithm, comprising a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method for determining a workpiece drilling sequence based on a genetic algorithm.
[0028] The present application has the beneficial effect that the present application applies the genetic algorithm to the workpiece drilling action sequencing, and improves the fitness function in the genetic algorithm, so that the shortest time-consuming scheme can be obtained from a plurality of drilling action sequencing schemes, thereby improving the efficiency of workpiece drilling. BRIEF DESCRIPTION OF DRAWINGS
[0029] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings in which a number of embodiments of the application are shown by way of example, and like reference numerals are used to refer to like elements throughout. In the drawings:
[0030] Figure 1 is a method flowchart for determining a workpiece drilling sequence based on a genetic algorithm provided by an embodiment of the present application;
[0031] Figure 2 is a schematic diagram of a workpiece drilling production line provided by an embodiment of the present application;
[0032] Figure 3 is a schematic diagram of a continuous intersection of safety areas of adjacent drilling actions in a workpiece drilling action sequencing scheme provided by an embodiment of the present application;
[0033] Figure 4 is an algorithm flowchart for determining a workpiece drilling sequence based on a genetic algorithm provided by an embodiment of the present application;
[0034] Figure 5 is a system block diagram for determining a workpiece drilling sequence based on a genetic algorithm provided by an embodiment of the present application. DETAILED DESCRIPTION
[0035] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0036] The specific embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0037] Figure 1 is a method flowchart for determining a workpiece drilling sequence based on a genetic algorithm according to an embodiment of the present application, comprising the following steps:
[0038] S101, all drilling actions required by a workpiece are obtained, and an initial population is generated according to a generation rule, wherein the initial population includes at least two drilling action sequencing schemes, and each drilling action sequencing scheme contains all drilling actions;
[0039] S102, a fitness value of each drilling action sequencing scheme in the initial population is calculated; wherein the fitness value is inversely related to a total drilling action duration;
[0040] In the genetic algorithm, the fitness function is an index for describing the advantages and disadvantages of each drilling action sequencing scheme in the initial population. In the present application, the fitness function is an inverse proportional function of the total drilling action duration, so the greater the fitness value is, the higher the efficiency of the corresponding drilling action sequencing scheme is.
[0041] In some embodiments, the fitness function for calculating the fitness value is an inverse proportional function of the total drilling action duration.
[0042] In some embodiments, the total drilling action duration includes a gantry movement duration and a head movement duration.
[0043] As Figure 2 shown is a schematic diagram of a workpiece drilling production line provided by an embodiment of the present application, which includes a gantry 1, a head 2, a head 3 and a gripper 4. The gantry position can be moved, so the total drilling action duration includes a gantry action duration. The head 2 and the head 3 are connected with the gantry 1, and the head has a plurality of drill rods in the same or different directions, each of which can be installed with a drill bit of different diameters. During workpiece drilling, different positions or different direction holes need to be drilled by adjusting the head, so the total drilling action duration includes a head action duration. The position of the gripper 4 can also be moved. In order to prevent the gripper from blocking the head drilling during the head drilling process, the position of the gripper needs to be adjusted in time, so the total drilling action duration includes a gripper changing action duration. In other embodiments, the number of gantries, heads and grippers can have various combinations, for example, two gantries, one head in each gantry, and two grippers in each head, which will not be described here.
[0044] In some embodiments in which the drilling actions include gantry actions and head actions between adjacent actions, the method for calculating the total drilling action duration is as follows: for example, the workpiece drilling actions are only three, the preset gantry movement speed v x is X-axis, the head movement speed v y, the moving direction of the machine head is the Y axis, the drilling action can indicate the position of the next drilling action, such as the first drilling action position is (x0, y0), the second drilling action position is (x1, y1), and the third drilling action position is (x2, y2), the first drilling action time is , the second drilling action time is , and the total drilling action time is t = t1 + t2. In actual production, when the workpiece drilling action is more than two, the total drilling action time corresponding to the current drilling action sequencing scheme can also be calculated according to the above method, which is not repeated here.
[0045] In the above embodiments, the total drilling action time generated when the gantry and the machine head move is mainly considered.
[0046] In some other embodiments, when drilling the workpiece, in order to avoid the intersection of the clamping hand position and the drilling action causing the drilling to be unable to be performed, the clamping hand needs to be changed in position, and therefore the corresponding clamping hand changing action time is also generated. Therefore, the total drilling action time includes the gantry action time, the machine head action time, and the clamping hand changing action time.
[0047] Specifically, the calculation method of the clamping hand changing action time includes: obtaining the clamping hand safety area corresponding to each drilling action; using the clamping hand safety area corresponding to each drilling action to continuously intersect the clamping hand safety areas of adjacent drilling actions in the current drilling action sequencing scheme to obtain the number of clamping hand changes, thereby obtaining the clamping hand changing action time.
[0048] As an example, as Figure 3The diagram illustrates the continuous intersection of the gripper safety zones for adjacent drilling actions in a workpiece drilling action sequencing scheme provided by an embodiment of the present invention. The workpiece drilling actions include five actions: drilling action A1, drilling action A2, drilling action A3, drilling action A4, and drilling action A5. The drilling action sequence is drilling action A1-drilling action A2-drilling action A3-drilling action A4-drilling action A5. In the diagram, circles represent the positions of the workpiece drilling actions, and shaded areas represent gripper safety zones (the gripper safety zone indicates that when the machine head performs the drilling action within this zone, the drill bit will not drill into the gripper). By finding the intersection of the gripper safety areas of drilling actions A1 and A2, we can obtain intersection area B1 (intersection area B1 means that if the gripper is within intersection area B1, the drill bit will never drill into the gripper during drilling actions A1 and A2). By finding the intersection of intersection area B1 and the gripper safety area of drilling action A3, we can obtain intersection area B2 (intersection area B2 means that if the gripper is within intersection area B2, the drill bit will never drill into the gripper during drilling actions A1, A2, and A3; that is, the gripper can be arranged within intersection area B2, so the gripper position does not need to be changed during drilling actions A1, A2, and A3). By finding the intersection of intersection area B2 and the gripper safety area of drilling action A4, we can obtain intersection area B3. Figure 3 As can be seen, the intersection area B3 is a blank area (a blank area means that no gripping area can be found so that the machine head can complete drilling actions A1, A2 and A3 without changing the gripping position and continue to complete drilling action A4. In other words, the number of times the intersection area is a blank area can be used to determine the number of times the gripping position needs to be changed, and thus determine the time to change the gripping position). Therefore, the gripping position needs to be changed at this time. At this time, the gripping safety area of drilling action A4 can be used as the intersection area B4, and the intersection area with the gripping safety area of drilling action A5 can be obtained to get the intersection area B5.
[0049] from Figure 3 As can be seen, placing the gripper in the intersection area B2 allows drilling actions A1, A2, and A3 to be performed without changing the gripper position. Placing the gripper in the intersection area B5 allows drilling actions A4 and A5 to be performed without changing the gripper position. The gripper only needs to be changed once during the entire workpiece drilling process, that is, after drilling action A3 is completed, the gripper is moved to the intersection area B5.
[0050] In some embodiments, the time required for each time of changing the gripper can be preset, that is, the time of changing the gripper is fixed and same each time, and the time length of the changing gripper movement can be obtained according to the number of times of changing the gripper. In other embodiments, the moving speed of the gripper can also be preset, and the time length of the changing gripper movement can be obtained according to the moving distance of the changing gripper, and the moving distance of the changing gripper can be the distance from the center point or the leftmost point of the intersection area corresponding to the previous drilling action of the changing gripper to the center point or the leftmost point of the intersection area corresponding to the next drilling action of the changing gripper. For example, in Figure 3 the moving speed of the gripper can be preset as v, it is assumed that the drilling action A5 is completed and the gripper needs to be changed, the moving distance of the changing gripper is the distance d from the center point or the leftmost point of the intersection area B2 to the center point or the leftmost point of the intersection area B5, and the time length t of the changing gripper action is d / v. At this time, the total time length of the drilling action is the sum of the time length of the drill head action, the time length of the machine head action and the time length of the changing gripper action.
[0051] S103, in response to not satisfying the termination rule, iteratively performing selection, crossover and mutation operations on the drilling action sorting scheme in the initial population, and calculating the fitness value, until the termination rule is satisfied, and the drilling action sorting scheme corresponding to the maximum fitness value is taken as the optimal drilling action sorting scheme.
[0052] As Figure 4 shown in the algorithm flowchart for determining the drilling sequence of the workpiece based on the genetic algorithm provided by the embodiments of the present application.
[0053] In some embodiments, the generating rule comprises at least one of the following: generating rule one, fixing a first action of all drilling actions required by the workpiece, and then randomly generating the drilling action sequencing scheme; generating rule two, fixing a first action of all drilling actions required by the workpiece, and then generating the drilling action sequencing scheme by using a greedy algorithm; generating rule three, randomly sequencing all drilling actions required by the workpiece; and generating rule four, randomly selecting a first action of all drilling actions required by the workpiece, and then generating the drilling action sequencing scheme by using a greedy algorithm. For example, in one embodiment, if the positions of the gantry and the head are fixed and unchanged, the action closest to the fixed position of the head can be selected as the first action, and each subsequent action is randomly selected until all actions are selected, thus forming a drilling action sequencing scheme. The above operation is repeated several times to obtain an initial population. In another embodiment, if the position of the gantry is fixed and unchanged, a series of actions closest to the fixed position of the gantry can be selected as the first action, and the subsequent action can be selected according to the greedy algorithm to select the action with the shortest time consumption when moving. The above operation is repeated several times to obtain an initial population. In other embodiments, if the positions of the gantry and the head are not limited, all actions can be randomly sequenced, or the first action can be randomly selected, and the subsequent action can be selected by using a greedy algorithm. The above operation is repeated several times to obtain an initial population. It should be noted that the greedy algorithm is a known technology and will not be described here.
[0054] In some embodiments, the termination rule comprises at least one of the following: termination rule one, the maximum fitness value in the initial population is greater than a first threshold value; termination rule two, in the last N iterations, the difference between the maximum fitness value in the initial population of each iteration and the maximum fitness value in all iterations is less than a second threshold value, and N is a preset first number; and termination rule three, the number of iterations reaches M, where M is a preset second number. The first threshold value can be adjusted flexibly by an on-site engineering and technical personnel according to the type of the workpiece, the speed of the gantry movement, and other factors. The second threshold value is generally set as a percentage, such as 2%. N and M are positive integers, N can be generally set as 10 or 20, and M can be generally set as 100, 200, or 500.
[0055] In some embodiments, in response to not meeting the termination rule, the drilling action sequencing schemes in the initial population are iteratively selected, crossed, and mutated, comprising: based on the fitness values of the drilling action sequencing schemes in the initial population, selecting the drilling action sequencing schemes according to a roulette algorithm to obtain a first population; randomly obtaining a crossover point, and sequentially crossing the drilling action sequencing schemes in the first population to obtain a second population; and presetting a random mutation probability, and randomly mutating the drilling action sequencing schemes in the second population to obtain a third population as the initial population.
[0056] For example, in the initial population, there are five drilling action sequencing schemes ABCDE, and their fitness values are A (0.2), B (0.1), C (0.06), D (0.04), and E (0.1), respectively. The proportion of the fitness value of each scheme in the total fitness value is calculated, and the total fitness value is 0.2+0.1+0.06+0.04+0.1=0.5. Therefore, the proportion of each scheme in the total fitness value is A (0.4), B (0.2), C (0.12), D (0.08), and E (0.2). After normalization, in the interval (0, 1), A occupies the interval (0, 0.4), B occupies the interval (0.4, 0.6), C occupies the interval (0.6, 0.72), D occupies the interval (0.72, 0.8), and E occupies the interval (0.8, 1). According to the roulette algorithm, a number in the interval (0, 1) is randomly generated, such as 0.18, which falls within the interval occupied by A. Therefore, the A scheme is selected, and repeating the operation X times can obtain a population containing X schemes as the first population.
[0057] After obtaining the first population, the schemes in the first population need to be crossed to obtain a second population. The crossing process is as follows: two schemes are randomly selected from the schemes in the first population as parents, and a crossing point is randomly obtained. The parents are sequentially crossed to obtain offspring, i.e., the second population. After obtaining the second population, a predetermined random mutation probability is used to randomly mutate the drilling action sequencing schemes in the second population to obtain a third population as the initial population. For example, the second population includes ten drilling action sequencing schemes, and the predetermined random mutation probability is 0.1. Therefore, one of the ten drilling action sequencing schemes is selected for mutation. For example, the workpiece requires all drilling actions 123456, and the selected sequencing scheme to be mutated is 346251. Two actions in the sequencing scheme to be mutated 346251 are randomly selected and exchanged to obtain a new sequencing scheme.
[0058] It should be noted that the sequential crossing operation is a known technology and will not be described here.
[0059] In the above embodiments, the duration of the switching of the gripper is included in the fitness function. In some embodiments, the switching of the gripper can also not be included in the calculation of the fitness function, but the duration of the gantry movement and the duration of the head movement are used to calculate the fitness function to obtain an optimal drilling action sequence, and then the optimal gripper safety region corresponding to the optimal drilling action sequence is obtained. In this embodiment, the method for determining the workpiece drilling sequence based on the genetic algorithm further includes: obtaining the gripper safety region corresponding to each drilling action; using the gripper safety region corresponding to each drilling action, continuously intersecting the gripper safety regions of adjacent drilling actions in the optimal drilling action sequence to obtain an optimal gripper safety region; and drilling the workpiece according to the optimal drilling action sequence and the optimal gripper safety region. The method for obtaining the optimal gripper safety region by continuously intersecting the gripper safety regions of adjacent drilling actions in the optimal drilling action sequence is the same as the method shown in Figure 3 , and thus will not be described here.
[0060] The above method for determining the workpiece drilling sequence based on the genetic algorithm provided in the embodiments of the present application obtains all drilling actions required by the workpiece, generates an initial population according to a generation rule, the initial population includes at least two drilling action sequences, and each drilling action sequence includes all drilling actions; calculates the fitness value of each drilling action sequence in the initial population; the fitness value is inversely related to the total duration of the drilling actions; in response to the termination rule not being met, iteratively performs selection, crossover and mutation operations on the drilling action sequences in the initial population, and calculates the fitness value until the termination rule is met, and the drilling action sequence corresponding to the maximum fitness value is taken as the optimal drilling action sequence. The present application applies the genetic algorithm to the workpiece drilling action sequence, and improves the fitness function in the genetic algorithm, so that the drilling action sequence with the shortest duration can be obtained from multiple drilling action sequences, thereby improving the efficiency of the workpiece drilling.
[0061] The present application also provides a system for determining the workpiece drilling sequence based on the genetic algorithm. As shown in Figure 5 , the system includes a processor and a memory, and the memory stores computer program instructions, which, when executed by the processor, implement the method for determining the workpiece drilling sequence based on the genetic algorithm.
[0062] The system also includes a communication bus, a communication interface and other components familiar to those skilled in the art, the settings and functions of which are known in the art, and thus will not be described here.
[0063] In this invention, the aforementioned memory can be any tangible medium containing or storing a program that can be used or combined with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium can be any suitable magnetic 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 desired information and can be accessed by an application, module, or both. Any such computer storage medium can be part of a device or accessible to or connected to a device. Any application or module described in this invention can be implemented using computer-readable / executable instructions that can be stored or otherwise maintained by such a computer-readable medium.
[0064] In the description of this specification, "multiple" or "several" means at least two, such as two, three or more, unless otherwise explicitly specified.
[0065] While this specification has shown and described numerous embodiments of the invention, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will occur to those skilled in the art without departing from the spirit and essence of the invention. It should be understood that various alternatives to the embodiments of the invention described herein may be employed in the practice of this invention.
Claims
1. A method for determining the drilling sequence of a workpiece based on a genetic algorithm, characterized in that, include: Obtain all drilling actions required for the workpiece, and generate an initial population according to the generation rules. The initial population includes at least two drilling action sorting schemes, and each drilling action sorting scheme contains all drilling actions. Calculate the fitness value of each drilling action ranking scheme in the initial population; wherein the fitness value is inversely correlated with the total drilling action duration; In response to the failure to meet the termination rule, the drilling action ranking schemes in the initial population are iteratively selected, crossovered, and mutated, and fitness values are calculated until the termination rule is met. The drilling action ranking scheme corresponding to the maximum fitness value is taken as the optimal drilling action ranking scheme. Obtain the hand-gripping safety zone corresponding to each drilling action; Using the gripping safety area corresponding to each drilling action, the intersection of the gripping safety areas of adjacent drilling actions in the optimal drilling action sorting scheme is continuously calculated to obtain the optimal gripping safety area. Drill holes in the workpiece according to the optimal drilling action sequencing scheme and the optimal gripping safety area; The total drilling time includes the gantry movement time and the drilling head movement time.
2. The method for determining the drilling sequence of a workpiece based on a genetic algorithm according to claim 1, characterized in that, The fitness value is inversely correlated with the total drilling time, including: the fitness function for calculating the fitness value is an inverse proportional function of the total drilling time.
3. The method for determining the drilling sequence of a workpiece based on a genetic algorithm according to claim 1, characterized in that, The total drilling time also includes the time for changing the gripper.
4. The method for determining the drilling sequence of a workpiece based on a genetic algorithm according to claim 3, characterized in that, The method for calculating the duration of the clamp-changing action includes: Obtain the hand-gripping safety zone corresponding to each drilling action; By utilizing the gripper safety area corresponding to each drilling action, the intersection of the gripper safety areas of adjacent drilling actions in the current drilling action sorting scheme is continuously calculated to obtain the number of gripper changes, thereby obtaining the gripper change action duration.
5. The method for determining the drilling sequence of a workpiece based on a genetic algorithm according to claim 1, characterized in that, The termination rule shall be any one of the following termination rules: Termination Rule 1: The maximum fitness value in the initial population is greater than the first threshold. Termination Rule 2: In N consecutive iterations, the difference between the maximum fitness value in the initial population of each iteration and the maximum fitness value in all iterations is less than a second threshold, where N is a preset first number; Termination rule three: The number of iterations reaches M, where M is a preset second number.
6. The method for determining the drilling sequence of a workpiece based on a genetic algorithm according to claim 1, characterized in that, The generation rule adopts any one of the following generation rules: Rule 1: Fix the first action among all drilling actions required for the workpiece, and then randomly generate the drilling action sorting scheme; Rule 2: Fix the first action among all drilling actions required for the workpiece, and then use a greedy algorithm to generate the drilling action sorting scheme; Rule 3: Randomly sort all the drilling actions required for the workpiece; Rule 4: Randomly select the first drilling action among all drilling actions required for the workpiece, and then use a greedy algorithm to generate the drilling action sorting scheme.
7. The method for determining the drilling sequence of a workpiece based on a genetic algorithm according to claim 1, characterized in that, In response to the failure to meet the termination rule, the iterative selection, crossover, and mutation operations are performed on the drilling action ranking scheme in the initial population, including: Based on the fitness values of the drilling action ranking schemes in the initial population, the drilling action ranking schemes are selected according to the roulette wheel algorithm to obtain the first population; Randomly obtain intersection points and sequentially cross the drilling action sorting schemes in the first group to obtain the second group; With a preset random mutation probability, the drilling action sorting scheme in the second population is randomly mutated to obtain a third population as the initial population.
8. A system for determining the drilling sequence of a workpiece based on a genetic algorithm, characterized in that, include: A memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method for determining the drilling sequence of a workpiece based on a genetic algorithm as described in any one of claims 1-7.
Citation Information
Patent Citations
Method, system and device for achieving tool path planning single drill packet for numerical control six-face drilling cutting machine, processor and storage medium of processor
CN112462688A