Workshop cutter scheduling rule generation method based on genetic algorithm
Through the workshop tool scheduling rule generation method based on genetic algorithm, the problem that the existing technology fails to comprehensively consider factors such as tool life and quantity, and achieves more efficient tool scheduling optimization, improving production efficiency and cost-effectiveness.
Patent Information
- Application Number
- CN202411457942.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-18
AI Technical Summary
The existing tool configuration optimization methods fail to comprehensively consider tool life, quantity, size and machine tool magazine capacity, resulting in poor scheduling optimization results.
Using the workshop tool scheduling rule generation method based on genetic algorithm, the three-layer real-number encoding is generated to evolve the genetic algorithm by constructing a weighted sum scheduling model, combining machine priority heuristic rules, initial tool matching and tool change heuristic rules. To optimize tool allocation.
The tool scheduling optimization degree is improved, and tool life, quantity, size and machine tool magazine capacity are comprehensively considered, thereby improving production efficiency and cost-effectiveness.
Smart Images

Figure CN119417122A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of data processing, and in particular to a method for generating workshop tool scheduling rules based on a genetic algorithm. Background Art
[0002] Customized equipment companies mainly design and produce customized equipment for specific industries or customer needs. Their products usually contain a large number of special parts, such as special medical equipment, special industrial machinery equipment, etc. The processing workpieces and processes of such products are diverse, and the processing process will involve a large number of various types of tools. There is a great demand for the scheduling and optimization of tool resources. Optimizing tool configuration can not only effectively improve machine utilization and production efficiency and reduce idling energy consumption during the production process, but also reduce the number of tools required for the processing process and improve tool utilization, thereby increasing cost-effectiveness.
[0003] However, the existing methods for optimizing tool configuration are relatively simple and do not take into account issues such as tool life and quantity, tool size, and machine tool magazine capacity, resulting in low scheduling optimization. Summary of the invention
[0004] In order to overcome the defects of the prior art, the present invention provides a method for generating workshop tool scheduling rules based on a genetic algorithm to solve the above-mentioned problems.
[0005] The technical solution adopted by the present invention to solve the technical problem is: a method for generating workshop tool scheduling rules based on genetic algorithm, comprising the following steps:
[0006] S1: Using the workpiece set J in the machine m , the process set of the workpiece set Workpiece m Process Processing time The number of operations w, the machine number m, the tool number k, the number of tool sub-tools h and the tool life life kd , construct a scheduling model about minimizing the maximum completion time and the weighted sum of minimizing the number of tool changes;
[0007] S2: Obtain the priority U of each machine according to the machine priority heuristic rule m ;
[0008] S3: Allocate tools to each machine according to the heuristic rule of tool number of initial tool matching and the heuristic rule of tool number of tool change;
[0009] S4: output tool allocation combination of each machine processing task set;
[0010] S5: Real number encoding is performed on the machine number, the tool number of the initial tool matching, and the tool number of the tool change to form three gene chains;
[0011] S6: forming an initial population using a machine priority heuristic rule, a tool number heuristic rule for initial tool matching, and a tool number heuristic rule for tool change;
[0012] S7: Evolving the initial population, wherein the evolution includes roulette wheel selection operation, crossover operation and mutation operation, to obtain the optimal population individuals for minimizing the weighted sum of the maximum completion time and the number of tool changes.
[0013] It is worth noting that, in executing step S2 to obtain the priority U of each machine m Before the step, the following steps are performed: Initialize the time step t on each machine m , get the set of workpieces J on each machine m , process set Get the machine number m at the current time step t m Workpiece j m Process Processing time Tool number set D and tool life life kd .
[0014] Preferably, step S2 includes the following sub-steps:
[0015] S21: Get the set of workpieces J on each machine m , process set Processing time Initialize the machine number m=1;
[0016] S22: Determine whether the machine number m is equal to the maximum number of machines v, if so, jump to step S26;
[0017] S23: Execution P m is the total working hours of the machine, where j m The number of the workpiece, n m For the last artifact, is the process number, For the last process;
[0018] S24: Determine the current process Is it the current workpiece j? m The last step If yes, jump to step S25; if no, update the process And jump to step S23;
[0019] S25: Determine the current workpiece j m Is it the last workpiece n? m If yes, jump to step S22; if no, update workpiece j m =j m +1 and update process And jump to step S23;
[0020] S26: Total working hours P of each machine m Value, assign machine priority U according to the machine priority heuristic rule m ; Among them, the machine priority heuristic rules include the PLPT rule that the machine with the longest total working hours is given a high priority, and the PSPT rule that the machine with the shortest total working hours is given a high priority;
[0021] S27: Output the machine priority U of each machine under different machine priority heuristic rules m value.
[0022] Optionally, in step S3, allocating tools to each machine according to the heuristic rule of the tool number of the initial tool matching includes the following sub-steps:
[0023] S31: Get the workpiece set J of the current priority machine m m and process set Determine whether the current machine is the machine with the lowest priority. If yes, go to step S4. If no, go to step S32.
[0024] S32: Execution like Update Then execute step S33; wherein life kd is the tool life, The machine with machine number m at the current time step t m Workpiece j m Process processing time;
[0025] S33: Get the current time step t through the heuristic rule of the tool number of the initial tool matching m Workpiece j on machine m m Process Tool d distribution combination;
[0026] S34: Determine the current process Is it the current workpiece j? m The last step If yes, jump to step S35, if no, update the process And jump to step S33;
[0027] S35: Determine the current workpiece j m Is it the last workpiece n? m If yes, jump to step S36, if no, update workpiece j m =j m +1 and update process And jump to step S33;
[0028] S36: Determine whether the machine with the current machine number m is the machine with the lowest priority. If so, jump to step S4. If not, update j. m = 1 and advance to the next priority machine.
[0029] Specifically, in step S3, allocating tools to each machine according to the heuristic rule of tool number of tool change includes the following sub-steps:
[0030] S37: Get the workpiece set J of the current priority machine m m and process set Determine whether the current machine is the machine with the lowest priority. If yes, go to step S4. If no, go to step S38.
[0031] S38: Execution like Update life kd =0, and t m =t m +life kd , then execute step S39; wherein life kd is the tool life, The machine with machine number m at the current time step t m Workpiece j m Process The processing time, The machine with machine number m at the current time step t m Workpiece j m Process The remaining processing time;
[0032] S39: Get the current time step t through the heuristic rule of the tool number of the tool change m Workpiece j on machine m m Process Remaining process time The tool matching d' is assigned and the process goes to step S310;
[0033] S310: Determine the current process Is it the current workpiece j? mThe last step If yes, jump to step S311, if no, update the process And jump to step S39;
[0034] S311: Determine the current workpiece j m Is it the last workpiece n? m If yes, jump to step S312, if no, update workpiece j m =j m +1 and update process And jump to step S39;
[0035] S312: Determine whether the machine with the current machine number m is the machine with the lowest priority. If so, jump to step S4. If not, update j. m = 1 and advance to the next priority machine.
[0036] It is worth noting that the step S33 includes the following sub-steps:
[0037] S331: Get the machine m at the current time step t m Workpiece j m Process Processing time Tool number set D and tool life life kd ;
[0038] S332: The rule KTLL giving priority to the lowest remaining tool life, the rule KTHL giving priority to the highest remaining tool life, and the rule KTLEPT giving priority to the tool life equal to the process duration are combined to obtain the KTLL tool scheduling rule, the KTHL tool scheduling rule, the KTHL&KTLEPT tool scheduling rule, and the KTLL&KTLEPT tool scheduling rule, and the tool d is assigned to the current time step t according to the KTLL tool scheduling rule, the KTHL tool scheduling rule, the KTHL&KTLEPT tool scheduling rule, and the KTLL&KTLEPT tool scheduling rule. m Workpiece j on machine m m Process And output the tool d allocation combination during initial tool allocation under different tool scheduling rules.
[0039] Preferably, the step S39 includes the following sub-steps:
[0040] S391: Get the machine m at the current time step t m Workpiece j m Process Remaining processing time Tool number set D and tool life life kd ;
[0041] S392: Move workpiece j on machine m m Process Divide into processed operations o jm,1 and unprocessed process jm,2 ;
[0042] S393: Combine the KTLL rule of minimum remaining tool life priority, the KTHL rule of maximum remaining tool life priority, and the KTLEPT rule of tool equal process duration priority to obtain the KTLL tool scheduling rule, the KTHL tool scheduling rule, the KTHL&KTLEPT tool scheduling rule, and the KTLL&KTLEPT tool scheduling rule, and assign the tool d' to the unprocessed process o according to the KTLL tool scheduling rule, the KTHL tool scheduling rule, the KTHL&KTLEPT tool scheduling rule, and the KTLL&KTLEPT tool scheduling rule jm,2 ; And output the tool d' allocation combination when changing tools under different tool scheduling rules.
[0043] Specifically, step S6 includes the following sub-steps:
[0044] S61: Initialize environment and information;
[0045] S62: Obtain the heuristic rule of machine priority, the heuristic rule of tool number of initial tool matching and the heuristic rule of tool number of tool change, and generate a uniform distribution probability according to the number of corresponding heuristic rules; perform roulette to select a population generation rule according to the probability distribution; obtain the real number encoding of the gene chain according to the selected population generation rule.
[0046] The beneficial effect of the present invention is that in the workshop tool scheduling rule generation method based on genetic algorithm, the tool life and quantity, tool size and machine tool magazine capacity are comprehensively considered, and the machine priority heuristic rule, the initial tool matching tool number heuristic rule and the tool change tool number heuristic rule are used to generate three-layer real number coding, and the initial population of the genetic algorithm is generated by combining heuristic information and random strategy, and a genetic algorithm based on heuristic information is constructed to solve the problem, which comprehensively considers the tool life and quantity, tool size and machine tool magazine capacity, thereby improving the scheduling optimization degree. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A flowchart of a method for generating workshop tool scheduling rules based on a genetic algorithm in one embodiment of the present invention;
[0048] Figure 2 A schematic diagram of tool scheduling in an intelligent workshop in one embodiment of the present invention;
[0049] Figure 3 Schematic diagram of tool allocation in one embodiment of the present invention
[0050] Figure 4 A schematic diagram of a tool change allocation situation in one embodiment of the present invention;
[0051] Figure 5 A genetic algorithm framework diagram in one embodiment of the present invention;
[0052] Figure 6 Schematic diagram of three gene chains in one embodiment of the present invention. DETAILED DESCRIPTION
[0053] The specific embodiments of the present invention are further described below in conjunction with the accompanying drawings. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0054] The following relationships exist during the modeling process:
[0055] 1) Set J of workpieces for each machine m There is a definite relationship between the workpieces;
[0056] 2) There is a definite relationship between the processes within each workpiece;
[0057] 3) One tool can only process one process;
[0058] 4) The same knife cannot appear on more than one machine at the same time;
[0059] 5) There is no difference between the machine tool magazines, all can accommodate the same type of knives, but each type of knife has only one slot available;
[0060] 6) The number of auxiliary tools of a certain type in all machine tool magazines cannot exceed h at any time;
[0061] 7) Unless the tool life becomes zero during the machining process, the tool can be adjusted only after the current process is completed;
[0062] 8) The process can only be started when the tool life of the current process in the machine is not zero;
[0063] 9) Assume that all the required tools are in the machine tool magazine at the beginning;
[0064] 10) Ignore the tool transportation time and tool change time between the tool holder and the machine tool magazine.
[0065] A method for generating workshop tool scheduling rules based on genetic algorithm comprises the following steps:
[0066] S1: This scheme can be understood as a tool parallel machine scheduling optimization problem considering multiple machines, tool life and quantity, uneven tool size, and limited machine tool magazine capacity, such as Figure 2 As shown, using the workpiece set J in the machine m , the process set of the workpiece set Workpiece m Process Processing time The number of operations w, the machine number m, the tool number k, the number of tool sub-tools h and the tool life life kd , construct a scheduling model for minimizing the maximum completion time and the weighted sum of the number of tool changes; the set of workpieces J in each machine number m has been determined in advance, and the set of processes O of each workpiece set is known. This batch of processing tasks contains a total of w processes, and each workpiece j m Each process Processing time May be the same or different, depending on the actual order. At the same time, the workshop contains m machines, k types of tools (where k≤w), one tool represents a type of tool size, each tool contains h sub-tools, and the life of each tool is life kd May be the same or different, depending on the actual tool library information; the optimization goal of the problem is to minimize the maximum completion time C max The weighted sum of the tool change times E is minimized to obtain the tool configuration corresponding to each process of each machine;
[0067] The parameters used in the scheduling model constructed in this solution are as follows:
[0068] m: machine number index;
[0069] j m : Workpiece number index;
[0070] The process number index of the workpiece;
[0071] k, k ‘ : Tool type number index, using k and k ‘ To represent two different types of processes, and so on;
[0072] d, d': tool number index of a single type of auxiliary tool. d and d' are used to represent two different types of auxiliary tools, and so on;
[0073] t, t ‘ , t": time step number index, using t, t ‘ and t" to represent three different time steps, and so on;
[0074] Tool life index at the current time step;
[0075] Processing time index;
[0076] The processing timer on each machine is a 0-1 variable;
[0077] α: is a weight factor between 0 and 1, used to adjust the trade-off between the two objectives;
[0078] C max : Maximum completion time;
[0079] E: tool change times;
[0080] Machine number set: M = {m|1,2,...,v}, v is the maximum number of machines;
[0081] Workpiece number collection for each machine: J m ={j m |1,2,...,n m},n m For the last artifact;
[0082] The process number set for each workpiece: is the last process, where w is the maximum number of process types;
[0083] Processing task process type (tool type) number set: K = {k|1,2,...,w}; w is the maximum number of process types;
[0084] Tool number set of a single type of auxiliary tool: D = {d|1,2,...,h}; h is the maximum number of auxiliary tools;
[0085] Time step number set: T = {t|1,2,...,L}; L is the maximum number of time steps;
[0086] The decision variables of the scheduling model constructed in this solution are as follows:
[0087]
[0088] The objective function of the scheduling model constructed in this solution is as follows:
[0089] min f=α*C max +(1-α)*E; represents the weighted sum of minimizing the maximum completion time and the number of tool changes, where α is a weight factor between 0 and 1, which is used to adjust the weight between the two objectives;
[0090] The constraints of the scheduling model constructed in this solution are as follows:
[0091]
[0092] Indicates the calculation method of the maximum completion time;
[0093] Indicates the calculation method of tool change times;
[0095]
[0096] It indicates that the workpieces of each machine processing task set have a sequence relationship of close precedence and close succession; It means that the processing steps of each workpiece have a sequence relationship of close precedence and close succession; these two constraints represent the constraints that the sequence information of the workpiece process is known;
[0097]
[0098] It means that one tool can only process one process;
[0099] This means that the same knife cannot appear on more than one machine at the same time;
[0100] It means that there is no more than one auxiliary tool of the same type on a machine;
[0101] It means that the number of tool types on a machine is no more than the tool slot capacity a;
[0102] It means that the number of auxiliary tools of all types on all machines at the same time is no more than the total number of auxiliary tools of the same type in the workshop;
[0103]
[0104] It is equivalent to a virtual timer, which means that the processing time of each machine workpiece set is counted until the last process of the machine is completed;
[0105] It means that the process can be started only when the tool life of the current process in the machine is not zero;
[0106] Indicates that tool change due to tool life end occurs at the end of tool life kdWhen it is 0 or after it is 0, that is, once the tool is moved out of the central tool magazine, it needs to wait until the life of the tool is over or the processing tasks of all machines are completed before it can be returned to the central tool magazine;
[0107]
[0108] Indicates the record of tool changes that occur other than the end of tool life (tool borrowing between machines);
[0109] Denotes the guaranteed time t ‘ Life of new blades replaced due to end of life Not 0;
[0110]
[0111] Indicates the update calculation method of tool life at each time step;
[0112]
[0113] It means that unless the tool life becomes zero during the machining process, the tool can be adjusted only after the current process is completed, that is, the process processing is not interrupted.
[0114] It represents the upper bound constraint of the time step, that is, the maximum completion time of all processing tasks in the workshop;
[0115]
[0116] represents the non-negativity constraints on the decision variables.
[0117] Regarding the characteristics of workpiece processes, the products of customized equipment enterprises contain a large number of special parts, and the processing tasks have the characteristics of a wide variety of workpieces and various processes. The problem characteristics of processing workpieces and processes are mainly reflected in the fact that each workpiece has a process with different working hours (it may also be the same, depending on the actual workpiece processing information), and each workpiece has a different number of processes (it may also be the same), and the processing time of each process may also be different. This feature of unequal number of processes between workpieces and unequal processing time between processes requires that when scheduling tools, it is necessary to consider the impact of working time on the scheduling process from two aspects: the processing time of the machine workpiece set and the processing time of a single process.
[0118] For tool characteristics, this solution sets constraints on the number of tool sizes, the number of tools, the tool life, and the machine tool magazine capacity. In addition, the life of each tool as the information input end is also limited and may be different. These characteristics may cause the following phenomena and problems in the production process:
[0119] 1. Due to the limited tool resources, the larger the workpiece and process scale, the greater the probability of tool resource conflicts when multiple machines request the same tool at the same time. At this time, the problem of tool allocation decision will arise; 2. Due to the limited tool life, the tool change decision caused by the end of tool life is also one of the issues that need to be considered;
[0120] Based on the above phenomena, we can analyze the following three key points for solving optimization problems:
[0121] 1. Reasonably handle the conflict of tool resources; 2. Reduce the probability of tool resource conflicts; 3. Make good decisions on tool changes caused by the end of tool life, which is the key to the optimization problem in this paper.
[0122] S2: Obtain the priority U of each machine according to the machine priority heuristic rule m ;
[0123] Among them, when obtaining the priority U of each machine m Before, the following steps are performed: Initialize the time step t on each machine m , get the set of workpieces J on each machine m , process set Get the machine with machine number m at the current time step t m Workpiece j m Process Processing time Tool number set D and tool life life kd ;
[0124] The step S2 comprises the following sub-steps:
[0125] S21: Get the set of workpieces J on each machine m , process set Processing time Initialize the machine number m=1;
[0126] S22: Determine whether the machine number m is equal to the maximum number of machines v, if so, jump to step S26;
[0127] S23: Execution P m is the total working hours of the machine, where j m The number of the workpiece, n m For the last artifact, is the process number, For the last process;
[0128] S24: Determine the current process Is it the current workpiece j? m The last step If yes, jump to step S25; if no, update the process And jump to step S23;
[0129] S25: Determine the current workpiece j m Is it the last workpiece n? m If yes, jump to step S22; if no, update workpiece j m =j m +1 and update process And jump to step S23;
[0130] S26: Total working hours P of each machine m Value, assign machine priority U according to the machine priority heuristic rule m ; Among them, the machine priority heuristic rules include the PLPT rule that the machine with the longest total working hours is given a high priority, and the PSPT rule that the machine with the shortest total working hours is given a high priority;
[0131] S27: Output the machine priority U of each machine under different machine priority heuristic rules m value;
[0132] S3: Allocate tools to each machine according to the heuristic rule of tool number of initial tool matching and the heuristic rule of tool number of tool change;
[0133] The heuristic rule of assigning tools to each machine according to the tool number of the initial tool assignment includes the following sub-steps:
[0134] S31: Get the workpiece set J of the current priority machine m m and process set Determine whether the current machine is the machine with the lowest priority. If yes, go to step S4. If no, go to step S32.
[0135] S32: Execution like Update Then execute step S33; wherein life kd is the tool life, The machine with machine number m at the current time step t m Workpiece j m Process Processing time;
[0136] S33: Get the current time step t through the heuristic rule of the tool number of the initial tool matching m Workpiece j on machine m m Process Tool d distribution combination;
[0137] S34: Determine the current process Is it the current workpiece j? m The last step If yes, jump to step S35, if no, update the process And jump to step S33;
[0138] S35: Determine the current workpiece j m Is it the last workpiece n? m If yes, jump to step S36, if no, update workpiece j m =j m +1 and update process And jump to step S33;
[0139] S36: Determine whether the machine with the current machine number m is the machine with the lowest priority. If so, jump to step S4. If not, update j. m = 1 and advance to the next priority machine.
[0140] The heuristic rule of assigning tools to each machine according to the tool number of the tool change includes the following sub-steps:
[0141] S37: Get the workpiece set J of the current priority machine m m and process set Determine whether the current machine is the machine with the lowest priority. If yes, go to step S4. If no, go to step S38.
[0142] S38: Execution like Update life kd =0, and t m =t m +life kd , then execute step S39; wherein life kd is the tool life, The machine with machine number m at the current time step t m Workpiece j m Process The processing time, The machine with machine number m at the current time step t m Workpiece j m Process The remaining processing time;
[0143] S39: Get the current time step t through the heuristic rule of the tool number of the tool change m Workpiece j on machine m mProcess Remaining process time The tool matching d' is assigned and the process goes to step S310;
[0144] S310: Determine the current process Is it the current workpiece j? m The last step If yes, jump to step S311, if no, update the process And jump to step S39;
[0145] S311: Determine the current workpiece j m Is it the last workpiece n? m If yes, jump to step S312, if no, update workpiece j m =j m +1 and update process And jump to step S39;
[0146] S312: Determine whether the machine with the current machine number m is the machine with the lowest priority. If so, jump to step S4. If not, update j. m = 1 and advance to the next priority machine.
[0147] The step S33 includes the following sub-steps:
[0148] S331: Get the machine m at the current time step t m Workpiece j m Process Processing time Tool number set D and tool life life kd ;
[0149] S332: The rule KTLL giving priority to the lowest remaining tool life, the rule KTHL giving priority to the highest remaining tool life, and the rule KTLEPT giving priority to the tool life equal to the process duration are combined to obtain the KTLL tool scheduling rule, the KTHL tool scheduling rule, the KTHL&KTLEPT tool scheduling rule, and the KTLL&KTLEPT tool scheduling rule, and the tool d is assigned to the current time step t according to the KTLL tool scheduling rule, the KTHL tool scheduling rule, the KTHL&KTLEPT tool scheduling rule, and the KTLL&KTLEPT tool scheduling rule. m Workpiece j on machine m m Process And output the tool d allocation combination when the initial tool allocation is performed under different tool scheduling rules;
[0150] like Figure 3 As shown, the time step t of each machine m Tool life under And its process hours There is a close connection: from a local perspective, find a The tool used for processing can effectively reduce the number of tool changes E, but it may cause other processes that require this tool to wait too long, and the probability of subsequent processes falling into tool resource conflicts may also increase; Find a Using different tools for machining can make machining more flexible, but it may increase the number of tool changes E; from a global perspective, allocating suitable tools to all processes can effectively reduce the probability of tool resource conflicts, thereby reducing C max Value and tool change times E. and Based on the relationship between them, the following three scheduling rules are obtained:
[0151] 1. Keep tool lowest lifetime (KTLL) first;
[0152] 2. Keep tool highest lifetime (KTHL) first;
[0153] 3. Keep tool lifetime equal to processing time (KTLEPT), that is, the current time step t m Appear When the tool d is allocated to the process first
[0154] It is worth noting that the KTLEPT tool scheduling rule occurs only when the tool life Equal to process time KTLEPT tool scheduling rule can only be used when KTLEPT is used as an additional rule attached to KTLL or KTHL tool scheduling rule. The & symbol is used as a connector to connect it to KTLL or KTHL tool scheduling rule as a representation, such as KTHL&KTLEPT or KTLL&KTLEPT. The logic of using KTLEPT tool scheduling rule as an additional rule is: when it is determined to use KTHL&KTLEPT or KTLL&KTLEPT tool scheduling rule, it should first be determined whether the tool to be allocated by decision meets the life span. Equal to the process duration If the conditions are met, the tool will be directly used as the decision object for tool allocation. If the conditions are not met, the KTHL tool scheduling rule or KTLL tool scheduling rule will be enabled to perform tool decision allocation operations.
[0155] The step S39 includes the following sub-steps:
[0156] S391: Get the machine m at the current time step t m Workpiece j m Process Remaining processing time Tool number set D and tool life life kd ;
[0157] S392: Move workpiece j on machine m m Process Divide into processed operations o jm,1 and unprocessed process jm,2 ;
[0158] S393: Combine the KTLL rule of minimum remaining tool life priority, the KTHL rule of maximum remaining tool life priority, and the KTLEPT rule of tool equal process duration priority to obtain the KTLL tool scheduling rule, the KTHL tool scheduling rule, the KTHL&KTLEPT tool scheduling rule, and the KTLL&KTLEPT tool scheduling rule, and assign the tool d' to the unprocessed process o according to the KTLL tool scheduling rule, the KTHL tool scheduling rule, the KTHL&KTLEPT tool scheduling rule, and the KTLL&KTLEPT tool scheduling rule jm,2 ; And output the tool d' allocation combination when changing tools under different tool scheduling rules;
[0159] like Figure 4 As shown in the figure, after the initial tool life is over, the nature of the problem faced is also a decision allocation about the tool. Therefore, the relationship between tool life and process time is also used as a basis to form the following three rules: the lowest remaining tool life priority KTLL rule, the highest remaining tool life priority KTHL rule and the tool equal process time priority KTLEPT rule;
[0160] S4: Output the tool allocation combination for each machine processing task set.
[0161] In this way, according to the order of the machine priority rules (PLPT and PSPT), the tool scheduling rules corresponding to the tool d allocation combination during initial tool allocation (KTLL, KTHL, KTHL&KTLEPT and KTLL&KTLEPT) and the tool scheduling rules corresponding to the tool d' allocation combination during tool change (KTLL, KTHL, KTHL&KTLEPT and KTLL&KTLEPT), 32 algorithms can be formed, as follows:
[0162] PLPT-KTHL-KTHL (Algorithm 1), PLPT-KTHL-KTHL&KTLEPT (Algorithm 2), PLPT-KTHL-KTLL (Algorithm 3), PLPT-KTHL-KTLL&KTLEPT (Algorithm 4), PLPT-KTHL&KTLEPT-KTHL (Algorithm 5), PLPT-KTHL&KTLEPT-KTHL&KTLEPT (Algorithm 6), PLPT-KTHL&KTLEPT-KTLL (Algorithm 7), PLPT-KTHL&KTLEPT-KTLL&KTLEPT (Algorithm 8), PLPT- KTLL-KTHL (Algorithm 9), PLPT-KTLL-KTHL&KTLEPT (Algorithm 10), PLPT-KTHL-KTHL (Algorithm 11), PLPT-KTLL-KTLL&KTLEPT (Algorithm 12), PLPT-KTLL&KTLEPT-KTHL (Algorithm 13), PLPT-KTLL&KTLEPT-KTHL&KTLEPT (Algorithm 14), PLPT-KTLL&KTLEPT-KTLL (Algorithm 15), PLPT-KTLL&KTLEPT-KTLL&KTLEPT (Algorithm 16), PSPT -KTHL-KTHL (Algorithm 17), PSPT-KTHL-KTHL&KTLEPT (Algorithm 18), PSPT-KTHL-KTLL (Algorithm 19), PSPT-KTHL-KTLL&KTLEPT (Algorithm 20), PSPT-KTHL&KTLEPT-KTHL (Algorithm 21), PSPT-KTHL&KTLEPT-KTHL&KTLEPT (Algorithm 22), PSPT-KTHL&KTLEPT-KTLL (Algorithm 23), PSPT-KTHL&KTLEPT-KTLL&KTLEPT (Algorithm 24), PSPT PT-KTLL-KTHL (Algorithm 25), PSPT-KTLL-KTHL&KTLEPT (Algorithm 26), PSPT-KTHL-KTHL (Algorithm 27), PSPT-KTLL-KTLL&KTLEPT (Algorithm 28), PSPT-KTLL&KTLEPT-KTHL (Algorithm 29), PSPT-KTLL&KTLEPT-KTHL&KTLEPT (Algorithm 30), PSPT-KTLL&KTLEPT-KTLL (Algorithm 31), PSPT-KTLL&KTLEPT-KTLL&KTLEPT (Algorithm 32).
[0163] like Figure 5As shown in the figure, S5: Real number encoding is performed on the machine number, the tool number of the initial tool allocation, and the tool number of tool change respectively to form three gene chains; in this way, gene chain one, gene chain two, and gene chain three can be correspondingly formed. The length of gene chain one is the maximum number v of machines in the current production environment, the length of gene chain two is the number of workpieces n in the current production environment * the number of processes w of a single workpiece, and the length of gene chain three is the number of workpieces n in the current production environment * the number of processes w of a single workpiece * the number of auxiliary tool types h of a single type; each individual contains a three-layer gene chain as shown in Figure 6 the figure. Each layer of gene chain represents a solution in the solution space of that layer, and the search of the solution space is carried out through the selection, crossover, and mutation operations of the genetic algorithm;
[0164] S6: Use the machine priority heuristic rule, the heuristic rule of the tool number of the initial tool allocation, and the heuristic rule of the tool number of tool change to form an initial population; the initial population is the initial position where the intelligent algorithm starts to search in the solution space. It can be randomly generated. A randomly generated population usually can increase the diversity of the population and increase the exploratory ability of the algorithm in the solution space; it can also be generated through some heuristic information, such as using the professional knowledge or guiding experience in the problem neighborhood to generate the initial population. These heuristic information are designed according to the specific optimization problem and algorithm characteristics to help the algorithm generate a population with better gene quality and accelerate the search process. However, generating all individuals using heuristic information may reduce the diversity of the population and easily cause the algorithm solution result to fall into a local optimum; in practice, combining the heuristic information and the strategy of randomly generating the initial population can improve the convergence speed and exploration performance of the algorithm;
[0165] The step S6 includes the following sub-steps:
[0166] S61: Initialize the environment and information; when ep < r, jump to step S62; when ep ≥ r, jump to step S63; where ep is a random decimal between 0 and 1, representing the probability that an individual of a certain initial population is generated by the neighborhood knowledge rule or the random rule; r is a random decimal between 0 and 1;
[0167] S62: Obtain the machine priority heuristic rule, the heuristic rule of the tool number of the initial tool matching and the heuristic rule of the tool number of the tool change, and generate a uniform distribution probability according to the number of corresponding heuristic rules; for example, gene chain 2 belongs to the gene chain corresponding to the heuristic rule of the tool number of the initial tool matching. The heuristic rule currently has four available scheduling rules to guide the generation of the gene chain, namely KTLL tool scheduling rule, KTHL tool scheduling rule, KTHL&KTLEPT tool scheduling rule and KTLL&KTLEPT tool scheduling rule. At this time, the number of heuristic rules is 4, so the probability occupancy of each rule is 25%, and the total is 1, thereby forming a uniformly distributed probability distribution; by analogy, the machine priority heuristic rules are PLPT rule and PSPT rule, and the number of heuristic rules is 2 at this time, and the heuristic rules of the tool number of the tool change are KTLL tool scheduling rule, KTHL tool scheduling rule, KTHL&KTLEPT tool scheduling rule and KTLL&KTLEPT tool scheduling rule, and the number of heuristic rules is 4 at this time;
[0168] Roulette is performed according to the probability distribution to select a population generation rule. For example, the KTLL tool scheduling rule is selected and the KTLL tool scheduling rule is used as the population generation rule.
[0169] Obtain the real number code of the gene chain according to the selected population generation rule;
[0170] S63: Gene chain codes are randomly generated within the solution space; the strategy of randomly generating individuals is introduced to increase population diversity and improve the exploratory nature of the algorithm;
[0171] S7: Evolving the initial population, wherein the evolution includes roulette wheel selection operation, crossover operation and mutation operation, to obtain the optimal population individuals for minimizing the weighted sum of the maximum completion time and the number of tool changes.
[0172] The evolution of a population is inseparable from selection, crossover and mutation operations;
[0173] Roulette selection and tournament selection are two common selection operation modes of genetic algorithms; the basic idea of roulette is to select according to a certain probability based on the size of the individual fitness value. Individuals with high fitness have a higher probability of being selected. It can make individuals with high fitness have a higher probability of being selected, and can effectively retain excellent individuals. However, since the selection is based on random number generation, there may be a large randomness in the selection process; the basic idea of the tournament is to randomly select a certain number of individuals (called the tournament scale) to compete, and then select the individuals with the best fitness as the parent from the winning individuals in the competition. By adjusting the tournament scale, it can control the degree of competition between individuals, which is conducive to maintaining the diversity of the population, but it will cause selection bias to a certain extent. Individuals with higher fitness values are more likely to be selected, which may cause the algorithm to converge prematurely. Taking all factors into consideration, this scheme adopts the roulette method for selection operation, sacrificing a certain convergence speed in exchange for higher algorithm exploration;
[0174] The crossover operation is performed in the form of multi-point crossover, sequential crossover and uniform crossover. The basic idea of multi-point crossover is to randomly select multiple crossover points, exchange the gene segments between the two parent individuals at these points, and generate two offspring individuals. The basic idea of sequential crossover is to select a continuous gene segment as a reserved area, and then fill the offspring in order from the other parent to generate two offspring individuals. The basic idea of uniform crossover is to randomly select each gene, exchange the genes at the corresponding position with a certain probability, and generate two offspring individuals.
[0175] The mutation operation is performed in the form of multi-point mutation, uniform mutation and displacement mutation; the basic idea of multi-point mutation is to randomly select multiple gene sites, change the values of these sites, and introduce random mutations of multiple genes; the basic idea of uniform mutation is to mutate each gene site with a certain probability, usually replacing it with a random new value; the basic idea of displacement mutation is to randomly select a gene fragment, move it to another position, and then fill the vacant position.
[0176] This scheme uses the heuristic rules of machine priority, the heuristic rules of tool numbering for initial tool matching, and the heuristic rules of tool numbering for tool change to generate three layers of real number coding, and uses a combination of heuristic information and random strategies to generate the initial population of the genetic algorithm. Based on this, a genetic algorithm based on heuristic information is constructed to solve the problem, and the tool life and quantity, tool size, and machine tool magazine capacity are comprehensively considered, thereby improving the scheduling optimization degree. By adding PSO algorithm (particle swarm algorithm), VNS algorithm (variable neighborhood search algorithm) and its hybrid algorithm (GA-PSO, GA-VNS, PSO-VNS, GA-PSO-VNS hybrid algorithm) as comparison algorithms, experiments are designed to compare the performance of the algorithms. The experimental results show that the solution results of the genetic algorithm based on heuristic information are slightly better than those of the particle swarm algorithm, and the solution time is much better than that of the variable neighborhood search algorithm. At the same time, heuristic information is of great help to the optimization value. Almost all the population individuals with the optimal values are generated from the initial population individuals generated by the heuristic information.
[0177] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. For those skilled in the art, various changes, modifications, substitutions and variations of these embodiments are made without departing from the principles and spirit of the present invention, and still fall within the scope of protection of the present invention.
Claims
1. A method for generating workshop tool scheduling rules based on genetic algorithm, characterized in that: The following steps are involved: S1: Using the workpiece set J in the machine m , the process set of the workpiece set Workpiece m Process Processing time The number of operations w, the machine number m, the tool number k, the number of tool sub-tools h and the tool life life kd , construct a scheduling model about minimizing the maximum completion time and the weighted sum of minimizing the number of tool changes; S2: Obtain the priority U of each machine according to the machine priority heuristic rule m ; S3: Allocate tools to each machine according to the heuristic rule of tool number of initial tool matching and the heuristic rule of tool number of tool change; S4: output tool allocation combination of each machine processing task set; S5: Real number encoding is performed on the machine number, the tool number of the initial tool matching, and the tool number of the tool change to form three gene chains; S6: forming an initial population using a machine priority heuristic rule, a tool number heuristic rule for initial tool matching, and a tool number heuristic rule for tool change; S7: Evolving the initial population, wherein the evolution includes roulette wheel selection operation, crossover operation and mutation operation, to obtain the optimal population individuals for minimizing the weighted sum of the maximum completion time and the number of tool changes.
2. The method for generating workshop tool scheduling rules based on genetic algorithm according to claim 1, characterized in that: When executing step S2, the priority U of each machine is obtained. m Before the step, the following steps are performed: Initialize the time step t on each machine m , get the set of workpieces J on each machine m , process set Get the machine number m at the current time step t m Workpiece j m Process Processing time Tool number set D and tool life life kd .
3. The method for generating workshop tool scheduling rules based on genetic algorithm according to claim 2, characterized in that: The step S2 comprises the following sub-steps: S21: Get the set of workpieces J on each machine m , process set Processing time Initialize the machine number m=1; S22: Determine whether the machine number m is equal to the maximum number of machines v, if so, jump to step S26; S23: Execution P m is the total working hours of the machine, where j m The number of the workpiece, n m For the last artifact, is the process number, For the last process; S24: Determine the current process Is it the current workpiece j? m The last step If yes, jump to step S25; if no, update the process And jump to step S23; S25: Determine the current workpiece j m Is it the last workpiece n? m If yes, jump to step S22; if no, update workpiece j m =j m +1 and update process And jump to step S23; S26: Total working hours P of each machine m Value, assign machine priority U according to the machine priority heuristic rule m ; Among them, the machine priority heuristic rules include the PLPT rule that the machine with the longest total working hours is given a high priority, and the PSPT rule that the machine with the shortest total working hours is given a high priority; S27: Output the machine priority U of each machine under different machine priority heuristic rules m value.
4. The method for generating workshop tool scheduling rules based on genetic algorithm according to claim 3, characterized in that: In step S3, allocating tools to each machine according to the heuristic rule of the tool number of the initial tool matching includes the following sub-steps: S31: Get the workpiece set J of the current priority machine m m and process set Determine whether the current machine is the machine with the lowest priority. If yes, go to step S4. If no, go to step S32. S32: Execution like Update Then execute step S33; wherein life kd is the tool life, The machine with machine number m at the current time step t m Workpiece j m Process processing time; S33: Get the current time step t through the heuristic rule of the tool number of the initial tool matching m Workpiece j on machine m m Process Tool d distribution combination; S34: Determine the current process Is it the current workpiece j? m The last step If yes, jump to step S35, if no, update the process And jump to step S33; S35: Determine the current workpiece j m Is it the last workpiece n? m If yes, jump to step S36, if no, update workpiece j m =j m +1 and update process And jump to step S33; S36: Determine whether the machine with the current machine number m is the machine with the lowest priority. If so, jump to step S4. If not, update j. m = 1 and advance to the next priority machine.
5. The method for generating workshop tool scheduling rules based on genetic algorithm according to claim 4, characterized in that: In step S3, allocating tools to each machine according to the heuristic rule of tool number of tool change includes the following sub-steps: S37: Get the workpiece set J of the current priority machine m m and process set Determine whether the current machine is the machine with the lowest priority. If yes, go to step S4. If no, go to step S38. S38: Execution like Update life kd =0, and t m =t m +life kd , then execute step S39; wherein life kd is the tool life, The machine with machine number m at the current time step t m Workpiece j m Process The processing time, The machine with machine number m at the current time step t m Workpiece j m Process The remaining processing time; S39: Get the current time step t through the heuristic rule of the tool number of the tool change m Workpiece j on machine m m Process Remaining process time The tool matching d' is assigned and the process goes to step S310; S310: Determine the current process Is it the current workpiece j? m The last step If yes, jump to step S311, if no, update the process And jump to step S39; S311: Determine the current workpiece j m Is it the last workpiece n? m If yes, jump to step S312, if no, update workpiece j m =j m +1 and update process And jump to step S39; S312: Determine whether the machine with the current machine number m is the machine with the lowest priority. If so, jump to step S4. If not, update j. m = 1 and advance to the next priority machine.
6. The method for generating workshop tool scheduling rules based on genetic algorithm according to claim 5, characterized in that: The step S33 includes the following sub-steps: S331: Get the machine m at the current time step t m Workpiece j m Process Processing time Tool number set D and tool life life kd ; S332: The rule KTLL giving priority to the lowest remaining tool life, the rule KTHL giving priority to the highest remaining tool life, and the rule KTLEPT giving priority to the tool life equal to the process duration are combined to obtain the KTLL tool scheduling rule, the KTHL tool scheduling rule, the KTHL&KTLEPT tool scheduling rule, and the KTLL&KTLEPT tool scheduling rule, and the tool d is assigned to the current time step t according to the KTLL tool scheduling rule, the KTHL tool scheduling rule, the KTHL&KTLEPT tool scheduling rule, and the KTLL&KTLEPT tool scheduling rule. m Workpiece j on machine m m Process And output the tool d allocation combination during initial tool allocation under different tool scheduling rules.
7. The method for generating workshop tool scheduling rules based on genetic algorithm according to claim 6, characterized in that: The step S39 includes the following sub-steps: S391: Get the machine m at the current time step t m Workpiece j m Process Remaining processing time Tool number set D and tool life life kd ; S392: Move workpiece j on machine m m Process Divide into processed operations o jm,1 and unprocessed process jm,2 ; S393: Combine the KTLL rule of minimum remaining tool life priority, the KTHL rule of maximum remaining tool life priority, and the KTLEPT rule of tool equal process duration priority to obtain the KTLL tool scheduling rule, the KTHL tool scheduling rule, the KTHL&KTLEPT tool scheduling rule, and the KTLL&KTLEPT tool scheduling rule, and assign the tool d' to the unprocessed process o according to the KTLL tool scheduling rule, the KTHL tool scheduling rule, the KTHL&KTLEPT tool scheduling rule, and the KTLL&KTLEPT tool scheduling rule jm,2 ; And output the tool d' allocation combination when changing tools under different tool scheduling rules.
8. The method for generating workshop tool scheduling rules based on genetic algorithm according to claim 7, characterized in that: The step S6 comprises the following sub-steps: S61: Initialize environment and information; S62: Obtaining a machine priority heuristic rule, a tool number heuristic rule for an initial tool pair, and a tool number heuristic rule for a tool change, and generating a uniform distribution probability according to the number of corresponding heuristic rules; A roulette wheel is played according to the probability distribution to select a population generation rule; and a real number encoding of the gene chain is obtained according to the selected population generation rule.
Citation Information
Patent Citations
Cutter joint dynamic scheduling method for complex profile intelligent production unit tasks
CN114442578A
Hybrid flow shop multi-target scheduling method based on improved genetic algorithm and application
CN116243669A
Batch scheduling method and system of hybrid genetic algorithm and ant colony algorithm
CN116822894A