Method and system for determining workpiece drilling sequence based on genetic algorithm

Through the drilling sequence optimization method based on genetic algorithm, the problem of low drilling efficiency in the existing technology is solved. By optimizing the drilling action sorting and the intersection of the clamping safety area, the efficiency and accuracy of workpiece drilling are improved, and the The shortest time-consuming drilling solution.

CN119151085AActive Publication Date: 2024-12-17NANXING MACHINERY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411639430.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2024-12-17
Estimated Expiration
2044-11-18

AI Technical Summary

Technical Problem

In the prior art, the drilling efficiency is low and the drilling efficiency cannot be effectively improved. This is mainly because the influence of drilling action sorting on the drilling equipment movement scheme is not effectively considered, resulting in different movement distances and times of the gantry, machine head and clamping hand. , affects overall efficiency.

Method used

The method of determining the drilling order of workpieces based on genetic algorithm is adopted. By generating the initial population, calculating the fitness value, and performing selection, crossing and mutating operations until the termination rule is met, the optimal drilling action sorting scheme is obtained, combining the gantry and the machine head. The duration of the drilling operation is optimized.

Benefits of technology

Through genetic algorithms, the drilling efficiency of workpieces is improved, and the shortest time-consuming solution is obtained, and the drilling efficiency is improved. It can more accurately calculate the total drilling operation duration and the number of hand-pinching movements, which improves the Accuracy and efficiency of drilling.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119151085A_ABST
    Figure CN119151085A_ABST
Patent Text Reader

Abstract

The invention relates to the field of drilling machining, in particular to a method and system for determining the workpiece drilling sequence based on a genetic algorithm. The method comprises the steps that all drilling actions needed by a workpiece are obtained, an initial population is generated according to a generation rule, the initial population comprises at least two drilling action sorting schemes, and each drilling action sorting scheme comprises all drilling actions; calculating the fitness value of each drilling action sorting scheme in the initial population; wherein the fitness value is inversely correlated with the total duration of the drilling action; and in response to the situation that the termination rule is not met, iteratively performing selection, intersection and mutation operations on the drilling action sorting schemes in the initial population, calculating fitness values until the termination rule is met, and taking the drilling action sorting scheme corresponding to the maximum fitness value as an optimal drilling action sorting scheme. The problems that in the prior art, drilling efficiency is low, and consumed time is long are effectively solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of drilling and more particularly to a method and system for determining a workpiece drilling sequence based on a genetic algorithm. 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 fully furnished houses, and almost all of them use customized panel furniture with unified standards. Therefore, the customized panel furniture industry has flourished.

[0003] In the production process of panel furniture, it is often necessary to splice wooden panels of different specifications to assemble them into a whole. However, during the assembly process, some wooden workpieces need to be drilled. The purpose of drilling is generally to install other parts on the wooden workpiece, or to assemble the furniture faster and better.

[0004] The current equipment for drilling furniture workpieces generally includes three parts: a gantry, a machine head, and a gripper, which can generally move independently. Different drilling action sequences require different movement schemes for the gantry, the machine head, or the gripper, which results in them moving different distances or making different movement times, thus affecting the entire drilling time and efficiency. Therefore, different arrangements of the drilling action sequence will result in different drilling efficiencies.

[0005] The patent application document with publication number "CN112462688A" and titled "Method, system, device, processor and storage medium for implementing tool path planning for a single drill package for a CNC six-sided drilling machine" discloses: A method for implementing tool path planning for a single drill package for a CNC six-sided drilling machine, the method comprising the following steps: (1) performing plate element partitioning preprocessing; (2) outputting multiple alternative clamping positions according to the partitioning result; (3) obtaining the optimal solution and the worst solution of each indicator according to an evaluation function, calculating the degree of closeness to the optimal solution and the worst solution under each clamping strategy, and evaluating the pros and cons of the overall clamping strategy; (4) according to the clamping scheme and the clamping evaluation, taking the clamping scheme with the highest score as the final selected clamping scheme.

[0006] The above-mentioned drilling method only considers the influence of the clamping position on the drilling tool path planning, and cannot effectively improve the drilling efficiency. Summary of the invention

[0007] In order to solve the problem of low drilling efficiency in the prior art, the present invention provides solutions in the following aspects.

[0008] In a first aspect, the present invention provides a method for determining a drilling sequence of a workpiece based on a genetic algorithm, comprising: Acquire all drilling actions required for a workpiece, generate an initial population according to a generation rule, wherein the initial population includes at least two drilling action sorting schemes, and each drilling action sorting scheme includes all drilling actions; calculate the fitness value of each drilling action sorting scheme in the initial population; wherein the fitness value is inversely correlated with the total duration of the drilling actions; in response to failure to meet a termination rule, iteratively perform selection, crossover and mutation operations on the drilling action sorting schemes in the initial population, and calculate the fitness value until the termination rule is met, and use the drilling action sorting scheme corresponding to the maximum fitness value as the optimal drilling action sorting scheme.

[0009] Beneficial effects: By applying the genetic algorithm to the workpiece drilling action sequencing and improving the fitness function in the genetic algorithm, the shortest time-consuming scheme can be obtained from a variety of drilling action sequencing schemes, thereby improving the efficiency of workpiece drilling.

[0010] Preferably, the fitness value is inversely correlated with the total duration of the drilling action, including: calculating the fitness function of the fitness value as an inverse proportional function of the total duration of the drilling action.

[0011] Preferably, the total duration of the drilling action includes the duration of the gantry action and the duration of the head action.

[0012] Preferably, the total duration of the drilling action includes the duration of the gantry action, the duration of the machine head action and the duration of the clamping hand change action.

[0013] Beneficial effect: The total drilling action time of the entire drilling equipment when drilling a workpiece can be obtained more accurately through the gantry action time, the head action time and the clamping hand change action time, so as to obtain an accurate fitness value.

[0014] Preferably, the method for calculating the duration of the hand-changing action includes: obtaining the hand-changing safety area corresponding to each drilling action; using the hand-changing safety area corresponding to each drilling action, continuously calculating the intersection of the hand-changing safety areas of adjacent drilling actions in the current drilling action sorting scheme, and obtaining the number of hand-changing times, thereby obtaining the duration of the hand-changing action.

[0015] Beneficial effect: By utilizing the hand-clamping safety area corresponding to each drilling action and continuously calculating the intersection of the hand-clamping safety areas of adjacent drilling actions in the current drilling action sorting scheme, the minimum number of hand-clamping action changes under the current scheme can be obtained, thereby obtaining the most efficient drilling scheme under the current drilling action sorting scheme.

[0016] Preferably, the method also includes: obtaining a hand-clamping safety area corresponding to each drilling action; using the hand-clamping safety area corresponding to each drilling action, continuously calculating the intersection of hand-clamping safety areas of adjacent drilling actions in the optimal drilling action sorting scheme to obtain an optimal hand-clamping safety area; drilling the workpiece according to the optimal drilling action sorting scheme and the optimal hand-clamping safety area.

[0017] Beneficial effect: By combining the advantages of the optimal drilling action sequencing scheme and the optimal clamping safety area, the workpiece can be drilled faster and safer.

[0018] Preferably, the termination rules include at least one of the following rules: Termination rule 1: the maximum fitness value in the initial population is greater than a 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, and N is a preset first number; Termination rule 3: the number of iterations reaches M, where M is a preset second number.

[0019] Preferably, the generation rule includes at least one of the following rules: Generate rule 1: fix the first action of all drilling actions required for the workpiece, and then randomly generate a sequencing plan for the drilling actions; generate rule 2: fix the first action of all drilling actions required for the workpiece, and then use a greedy algorithm to generate a sequencing plan for the drilling actions; generate rule 3: randomly sort all drilling actions required for the workpiece; generate rule 4: randomly select the first action of all drilling actions required for the workpiece, and then use a greedy algorithm to generate a sequencing plan for the drilling actions.

[0020] Preferably, in response to not satisfying the termination rule, iteratively performing selection, crossover and mutation operations on the drilling action sequencing schemes in the initial population includes: Based on the fitness values ​​of the drilling action sorting schemes in the initial population, the drilling action sorting schemes are selected according to a roulette algorithm to obtain a first population; The intersection points are randomly obtained, and the drilling action sequencing schemes in the first population are sequentially crossed to obtain the second population; the random mutation probability is preset, and the drilling action sequencing schemes in the second population are randomly mutated to obtain the third population as the initial population.

[0021] Beneficial effect: By performing selection, crossover and mutation operations on the drilling action sorting schemes in the initial population, a new drilling action sorting scheme can be generated by itself, expanding the scope of the entire drilling action sorting scheme, so that a more efficient drilling action sorting scheme can be screened out in a larger range.

[0022] In a second aspect, the present invention also provides a system for determining a workpiece drilling sequence based on a genetic algorithm, comprising: a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the computer program to implement the above-mentioned method for determining a workpiece drilling sequence based on a genetic algorithm.

[0023] The beneficial effect of the present invention is that the present invention applies a genetic algorithm to the sequencing of workpiece drilling actions and improves the fitness function in the genetic algorithm, so that the shortest time-consuming scheme can be obtained from a variety of drilling action sequencing schemes, thereby improving the efficiency of workpiece drilling. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] 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: Figure 1 is a flow chart of a method for determining a workpiece drilling sequence based on a genetic algorithm provided by an embodiment of the present invention; Figure 2 is a schematic diagram of a workpiece drilling production line provided by an embodiment of the present invention; Figure 3 It is a schematic diagram of continuously finding the intersection of the clamping safety areas of adjacent drilling actions in a workpiece drilling action sequencing scheme provided in an embodiment of the present invention; Figure 4 It is a flow chart of an algorithm for determining a workpiece drilling sequence based on a genetic algorithm provided by an embodiment of the present invention; Figure 5 The present invention provides a system block diagram for determining a workpiece drilling sequence based on a genetic algorithm. DETAILED DESCRIPTION

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

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

[0027] Figure 1 The present invention is a flowchart of a method for determining a workpiece drilling sequence based on a genetic algorithm according to an embodiment of the present invention, comprising the following steps: S101, acquiring all drilling actions required for a workpiece, and generating an initial population according to a generation rule, wherein the initial population includes at least two drilling action sorting schemes, and each drilling action sorting scheme includes all drilling actions; S102, calculating the fitness value of each drilling action sorting scheme in the initial population; wherein the fitness value is inversely correlated with the total duration of the drilling action; In the genetic algorithm, the fitness function is an indicator that describes the quality of each drilling action sorting scheme in the initial population. In the scheme of the present invention, the fitness function is an inverse proportional function of the total duration of the drilling action. Therefore, the larger the fitness value, the higher the efficiency of the corresponding drilling action sorting scheme.

[0028] In some embodiments, the fitness function for calculating the fitness value is an inverse proportional function of the total duration of the drilling action.

[0029] In some embodiments, the total duration of the drilling action includes the duration of gantry movement and the duration of head movement.

[0030] like Figure 2 The figure shows a schematic diagram of a workpiece drilling production line provided by an embodiment of the present invention, including a gantry 1, a machine head 2, a machine head 3 and a gripper 4. The position of the gantry can be moved, so the total duration of the drilling action includes the duration of the gantry action; the machine head 2 and the machine head 3 are connected to the gantry 1, and there are several drill rods of the same or different directions inside the machine head, and each drill rod can be installed with drill bits of different diameters. When drilling a workpiece, holes in different positions or directions need to be drilled by adjusting the machine head, so the total duration of the drilling action includes the duration of the machine head action; the position of the gripper 4 can also be moved. During the drilling process of the machine head, in order to prevent the gripper from blocking the drilling of the machine head, the position of the gripper needs to be adjusted in time, so the total duration of the drilling action includes the duration of changing the gripper action. In some other embodiments, the number of the gantry, machine head and gripper can be in multiple combinations, such as two gantries, each gantry has a machine head and two grippers inside, which will not be repeated here.

[0031] In some embodiments where the drilling action includes a gantry action and a machine head action between adjacent actions, the method for calculating the total duration of the drilling action is as follows: For example, there are only three workpiece drilling actions, and the preset gantry movement speed v x , the gantry moves in the X-axis direction, and the head moves at a speed of v y , the direction of movement of the machine head is the Y axis, and the drilling action can indicate the position of the next drilling action. For example, if 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), then the duration of the first drilling action is , the second drilling action duration is , the total duration of the drilling action is t=t1+t2. In actual production, when there are more than two drilling actions for a workpiece, the total duration of the drilling action corresponding to the current drilling action sequencing scheme can also be calculated according to the above method, which will not be elaborated here.

[0032] In the above embodiments, the total duration of the drilling action generated when the gantry and the machine head move is mainly considered.

[0033] In other embodiments, in order to avoid the intersection of the gripper position and the drilling action when drilling a workpiece, the gripper needs to change position, so the corresponding gripper change action duration will also be generated. Therefore, the total drilling action duration includes the gantry action duration, the head action duration and the gripper change action duration.

[0034] Specifically, the method for calculating the duration of the hand-changing action includes: obtaining the hand-changing safety area corresponding to each drilling action; using the hand-changing safety area corresponding to each drilling action, continuously calculating the intersection of the hand-changing safety areas of adjacent drilling actions in the current drilling action sorting scheme, and obtaining the number of hand-changing times, thereby obtaining the duration of the hand-changing action.

[0035] As an example, Figure 3 As shown, it is a schematic diagram of the continuous intersection of the hand clamping safety areas of adjacent drilling actions in a workpiece drilling action sequencing scheme provided by an embodiment of the present invention. The workpiece drilling actions include 5: drilling action A1, drilling action A2, drilling action A3, drilling action A4, drilling action A5, and the drilling action sequence is drilling action A1-drilling action A2-drilling action A3-drilling action A4-drilling action A5. In the figure, the circle represents the workpiece drilling action position, and the shadow represents the hand clamping safety area (the hand clamping safety area means that when the hand clamp is in this area, the drill bit will not drill into the hand clamp when the machine head performs the drilling action). According to the intersection of the gripper safety areas of drilling action A1 and drilling action A2, the intersection area B1 can be obtained (the intersection area B1 means that the gripper is in the intersection area B1, and the drill bit will never drill into the gripper when the machine head performs drilling action A1 and drilling action A2). According to the intersection of the intersection area B1 and the gripper safety area of ​​drilling action A3, the intersection area B2 can be obtained (the intersection area B2 means that the gripper is in the intersection area B2, and the drill bit will never drill into the gripper when the machine head performs drilling action A1, drilling action A2 and drilling action A3, that is, the gripper can be arranged in the intersection area B2, so that the gripper position does not need to be changed when the machine head performs drilling action A1, drilling action A2 and drilling action A3). According to the intersection of the intersection area B2 and the gripper safety area of ​​drilling action A4, the intersection area B3 can be obtained. Figure 3It can be seen that the intersection area B3 is a blank area (the blank area means that a hand clamping area cannot be found, which allows the machine head to complete drilling actions A1, A2 and A3, and still continue to complete drilling action A4 without changing the hand clamping position. In other words, the number of times the intersection area is a blank area can be used to determine the number of times the hand clamping position is changed, and then the time to change the hand clamp is determined). Therefore, the hand clamping position needs to be changed at this time. At this time, the hand clamping safety area of ​​drilling action A4 can be used as the intersection area B4, and the intersection with the hand clamping safety area of ​​drilling action A5 is obtained to obtain the intersection area B5.

[0036] from Figure 3 It can be seen that by placing the gripper in the intersection area B2, drilling actions A1, A2 and A3 can be performed without changing the gripper position; by placing the gripper in the intersection area B5, drilling actions A4 and A5 can be performed without changing the gripper position. During the entire workpiece drilling process, the gripper only needs to be changed once, that is, the gripper is moved to the intersection area B5 after the drilling action A3 is completed.

[0037] In some embodiments, the time required for changing the clamping hand once can be preset, that is, the time required for each changing of the clamping hand is fixed and the same, and the moving time of the clamping hand can be obtained according to the number of times the clamping hand is changed. In other embodiments, the moving speed of the clamping hand can also be preset, and the moving time of the clamping hand can be obtained according to the moving distance of the clamping hand. The moving distance of the clamping hand can be the distance from the center point or the leftmost side of the intersection area corresponding to the drilling action before the clamping hand is changed to the center point or the leftmost side of the intersection area corresponding to the drilling action before the next clamping hand is changed. For example, Figure 3 In the example, the gripper movement speed can be preset as v. Assuming that the gripper needs to be changed after the drilling action A5 is completed, the gripper movement distance is the distance d from the center point or the leftmost side of the intersection area B2 to the center point or the leftmost side of the intersection area B5, and the gripper change action duration t=d / v. At this time, the total drilling action duration is the sum of the faucet action duration, the machine head action duration, and the gripper change action duration.

[0038] S103. In response to failure to meet the termination rule, iteratively perform selection, crossover and mutation operations on the drilling action sorting schemes in the initial population, and calculate the fitness value until the termination rule is met, and use the drilling action sorting scheme corresponding to the maximum fitness value as the optimal drilling action sorting scheme.

[0039] like Figure 4 The figure shows an algorithm flow chart for determining a workpiece drilling sequence based on a genetic algorithm provided by an embodiment of the present invention.

[0040] In some embodiments, the generation rules include at least one of the following: Generation Rule 1, the first action among all drilling actions required to fix the workpiece, and then randomly generate the drilling action sorting scheme; Generation Rule 2, the first action among all drilling actions required to fix the workpiece, and then use the greedy algorithm to generate the drilling action sorting scheme; Generation Rule 3, randomly sort all drilling actions required for the workpiece; Generation Rule 4, randomly select the first action among all drilling actions required for the workpiece, and then use the greedy algorithm to generate the drilling action sorting scheme. For example, in one embodiment, if the position of the gantry and the head is fixed, 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 sorting scheme, and the initial population is obtained after repeating the above operation several times; in another embodiment, if the position of the gantry is fixed, a series of actions closest to the fixed position of the gantry can be selected as the first action, and the subsequent actions can be selected according to the greedy algorithm to select the action with the shortest moving time with the current action, and the initial population is obtained after repeating the above operation several times; in some other embodiments, if the position of the gantry and the head is not restricted, all actions can be randomly sorted, or the first action can be randomly selected, and then the subsequent actions can be selected using the greedy algorithm, and the initial population is obtained after repeating the above operation several times. It should be noted that the greedy algorithm is a well-known technology and will not be described in detail here.

[0041] In some embodiments, the termination rule includes at least one of the following: 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 the second threshold, and N is a preset first number; Termination rule 3, the number of iterations reaches M, where M is a preset second number. The first threshold can be flexibly adjusted by on-site engineering and technical personnel as needed based on factors such as the specification type of the workpiece and the gantry movement speed. The second threshold is generally set to a percentage, such as 2%. N and M are positive integers, N can generally be set to 10 times or 20 times, and M can generally be set to 100 times, 200 times or 500 times.

[0042] In some embodiments, in response to not satisfying the termination rule, the drilling action sorting schemes in the initial population are iteratively selected, crossed and mutated, including: based on the fitness value of the drilling action sorting scheme in the initial population, the drilling action sorting scheme is selected according to the roulette algorithm to obtain a first population; randomly obtaining intersection points, sequentially crossovering the drilling action sorting schemes in the first population to obtain a second population; presetting a random mutation probability, randomly mutating the drilling action sorting schemes in the second population to obtain a third population as the initial population.

[0043] For example, in the initial population, there are 5 drilling action sorting schemes, ABCDE, and their fitness values ​​are A (0.2), B (0.1), C (0.06), D (0.04), and E (0.1). The proportion of the fitness value of each scheme in the total fitness value is calculated. The total fitness value is 0.2+0.1+0.06+0.04+0.1=0.5, then 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 in the interval occupied by A, so plan A is selected. Repeating the operation X times can obtain a population containing X plans as the first population.

[0044] After obtaining the first population, it is necessary to cross the schemes in the first population to obtain the second population. The crossover process is: randomly select two schemes from the schemes of the first population as the parent generation, and then randomly obtain the crossover point position, and perform a sequential crossover operation on the parent generation to obtain the offspring, that is, the second population. After obtaining the second population, the drilling action sorting scheme in the second population is randomly mutated according to the preset random mutation probability to obtain the third population as the initial population. For example, the second population includes ten drilling action sorting schemes, and the preset random mutation probability is 0.1. Then, one of the ten drilling action sorting schemes is selected for mutation. For example, all the drilling actions required for the workpiece include six actions 123456, and the selected sorting scheme to be mutated is 346251. Then, two actions are randomly selected from the sorting scheme to be mutated 346251 to exchange positions to obtain a new sorting scheme.

[0045] It should be noted that the sequential crossover operation is a well-known technology and will not be described in detail here.

[0046] In the above embodiments, the solution we adopted is to include the duration of the hand-changing action in the fitness function. In some embodiments, the hand-changing action may not be included in the calculation of the fitness function, but the fitness function is first calculated through the gantry action duration and the head action duration to obtain an optimal drilling action sorting scheme, and then the corresponding optimal hand-changing safety area is obtained according to the optimal drilling action sorting scheme. Under this embodiment, the method for determining the drilling order of the workpiece based on the genetic algorithm also includes: obtaining the hand-changing safety area corresponding to each drilling action; using the hand-changing safety area corresponding to each drilling action, continuously finding the intersection of the hand-changing safety areas of adjacent drilling actions in the optimal drilling action sorting scheme to obtain the optimal hand-changing safety area; drilling the workpiece according to the optimal drilling action sorting scheme and the optimal hand-changing safety area. Among them, using the hand-changing safety area corresponding to each drilling action, continuously finding the intersection of the hand-changing safety areas of adjacent drilling actions in the optimal drilling action sorting scheme to obtain the method of obtaining the optimal hand-changing safety area is the same as Figure 3 The method is the same as shown and will not be repeated here.

[0047] The above-mentioned method for determining the drilling sequence of a workpiece based on a genetic algorithm provided by an embodiment of the present invention obtains all drilling actions required for the workpiece, generates an initial population according to a generation rule, wherein the initial population includes at least two drilling action sorting schemes, and each drilling action sorting scheme includes all drilling actions; calculates the fitness value of each drilling action sorting scheme in the initial population; wherein the fitness value is inversely correlated with the total duration of the drilling action; in response to failure to meet the termination rule, iteratively selects, crosses and mutates the drilling action sorting schemes in the initial population, and calculates the fitness value until the termination rule is met, and the drilling action sorting scheme corresponding to the maximum fitness value is used as the optimal drilling action sorting scheme. The present invention applies a genetic algorithm to the sorting of drilling actions of a workpiece, and improves the fitness function in the genetic algorithm, so that the shortest time-consuming scheme can be obtained from a variety of drilling action sorting schemes, thereby improving the efficiency of workpiece drilling.

[0048] The present invention also provides a system for determining the drilling sequence of a workpiece based on a genetic algorithm. Figure 5 As shown, the system includes a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, a method for determining a workpiece drilling sequence based on a genetic algorithm according to the present invention is implemented.

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

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

[0051] 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.

[0052] 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 determining the drilling sequence of a workpiece based on a genetic algorithm, characterized in that: include: Acquire all drilling actions required for the workpiece, and generate an initial population according to a generation rule, wherein the initial population includes at least two drilling action sorting schemes, and each drilling action sorting scheme includes all drilling actions; Calculating the fitness value of each drilling action sorting scheme in the initial population; wherein the fitness value is inversely correlated with the total duration of the drilling action; In response to not satisfying the termination rule, the drilling action sorting schemes in the initial population are iteratively selected, crossed and mutated, and the fitness value is calculated until the termination rule is satisfied, and the drilling action sorting scheme corresponding to the maximum fitness value is used as the optimal drilling action sorting scheme.

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 duration of the drilling action, including: a fitness function for calculating the fitness value is an inversely proportional function of the total duration of the drilling action.

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 action duration includes the gantry action duration and the head action duration.

4. 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 action duration includes the gantry action duration, the machine head action duration and the clamping hand change action duration.

5. The method for determining the drilling sequence of a workpiece based on a genetic algorithm according to claim 4, characterized in that: The method for calculating the duration of the clamping hand changing action includes: Get the hand-clamping safety area corresponding to each drilling action; Using the hand clamping safety area corresponding to each drilling action, the intersection of the hand clamping safety areas of adjacent drilling actions in the current drilling action sorting scheme is continuously calculated to obtain the number of hand clamping changes, thereby obtaining the hand clamping action duration.

6. The method for determining the drilling sequence of a workpiece based on a genetic algorithm according to claim 1, characterized in that: Also includes: Get the hand-clamping safety area corresponding to each drilling action; Using the hand clamping safety area corresponding to each drilling action, the intersection of the hand clamping safety areas of adjacent drilling actions in the optimal drilling action sorting scheme is continuously calculated to obtain the optimal hand clamping safety area; The workpiece is drilled according to the optimal drilling action sequencing scheme and the optimal gripping safety area.

7. 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 includes at least one of the following 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.

8. The method for determining the drilling sequence of a workpiece based on a genetic algorithm according to claim 1, characterized in that: The generation rules include at least one of the following rules: Generation rule 1: the first action among all drilling actions required to fix the workpiece, and then randomly generating a sequencing scheme for the drilling actions; Generation rule 2: the first action among all drilling actions required to fix the workpiece, and then using a greedy algorithm to generate a sequencing scheme for the drilling actions; Generation rule three: randomly order all drilling actions required for the workpiece; Generation rule 4: randomly select the first action among all drilling actions required for the workpiece, and then use a greedy algorithm to generate a sequencing scheme for the drilling actions.

9. 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 not satisfying the termination rule, iteratively performing selection, crossover and mutation operations on the drilling action sequencing schemes in the initial population, including: Based on the fitness values ​​of the drilling action sorting schemes in the initial population, the drilling action sorting schemes are selected according to a roulette algorithm to obtain a first population; Randomly obtain intersection points, and sequentially cross the drilling action sequencing schemes in the first population to obtain a second population; A random mutation probability is preset, and the drilling action sequencing scheme in the second population is randomly mutated to obtain a third population as the initial population.

10. 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 a workpiece drilling sequence based on a genetic algorithm as described in any one of claims 1 to 9.

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

  • Clamp avoiding method

    CN113219905A

  • Component classification method capable of reducing clamp movement

    CN116186597A

  • A method of establishing safe zones in a numerically controlled machine

    EP0104409A2

  • Positioning system with adjustable clamping force and milling equipment for rail transit honeycomb workpiece

    US20220379418A1