A dynamic flexible job-shop scheduling method based on multi-rule combination
By using a dynamic flexible workshop scheduling method with multiple rule combinations, and optimizing the scheduling rule weights using genetic programming and hybrid differential evolution algorithm, the problem of insufficient generalization of genetic programming algorithm in dynamic flexible workshop scheduling is solved, thereby improving the adaptability of scheduling rules and production efficiency.
Patent Information
- Application Number
- CN202410342665.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-25
- Publication Date
- 2026-01-23
- Estimated Expiration
- 2044-03-25
AI Technical Summary
Existing genetic programming algorithms generate scheduling rules with insufficient generalization in dynamic flexible workshop scheduling, and the solution space is limited, resulting in inconsistent best-fit rules for different random sampling paradigms under the same scenario, which affects the scheduling effect.
A dynamic flexible workshop scheduling method with multiple rule combinations is adopted. Multiple sets of initial rules are constructed through genetic programming algorithm, and the rule weights are optimized by combining sequence rule function and routing rule function and using hybrid differential evolution algorithm to realize priority value calculation and scheduling of machines and workpieces.
It improves the generalization and scheduling effect of scheduling rules, breaks the limitations of scheduling rules in traditional genetic programming, and achieves better resource utilization and production efficiency.
Smart Images

Figure CN118331185B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of dynamic flexible workshop scheduling, and in particular to a dynamic flexible workshop scheduling method based on multi-rule combination. Background Technology
[0002] The dynamic flexible shop floor scheduling problem refers to the solution to production scheduling problems in manufacturing. The goal of dynamic flexible shop floor scheduling is to dynamically schedule a series of production tasks in the production shop to achieve optimal production efficiency and resource utilization. The "dynamic" in dynamic flexible shop floor scheduling means that the scheduling problem is based on real-time situations, that is, the tasks and resources in the production shop are constantly changing over time (e.g., new workpieces are constantly arriving), requiring adjustments based on real-time information. The "flexible" aspect means that the resources in the production shop (such as machines and workers) can be flexibly allocated (e.g., the same process can be constantly changed) to adapt to different production task requirements.
[0003] For the dynamic flexible workshop scheduling problem, the genetic programming algorithm can be used to automatically generate dynamic production scheduling rules. Its basic idea is to represent the scheduling rules as genes (i.e., candidate solutions) and perform genetic operations (such as crossover, mutation, etc.) on these genes to generate good real-time scheduling rules.
[0004] However, the generalization ability of scheduling rules generated by genetic programming needs improvement. For the same scenario and the same settings, different random sampling paradigms often produce different optimal scheduling rules. Furthermore, in existing methods of using genetic programming to solve dynamic flexible shop floor scheduling problems, candidate rules are priority value calculation formulas directly composed of state variables and operators. This limits the solution space that genetic programming can search. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by providing a dynamic and flexible workshop scheduling method based on a combination of multiple rules.
[0006] The objective of this invention is achieved through the following technical solution: a dynamic flexible workshop scheduling method based on multi-rule combination, comprising the following steps:
[0007] S1. Obtain the status variables of each machine and workpiece in the workshop;
[0008] S2. Establish a dynamic flexible workshop scheduling model: The model inputs a sequence rule function, a routing rule function, and case information, and outputs the average dwell time of the workpiece in the workshop; The scheduling process is as follows: Input the state variables of each machine and workpiece, calculate the priority values of the machine and workpiece through the sequence rule function and the routing rule function, select the machine and workpiece, update the state variables of the machine and workpiece, until the scheduling is completed, and return the average dwell time of the workpiece in the workshop.
[0009] S3. Use the genetic programming algorithm to construct multiple sets of initial rules;
[0010] S4. By applying the obtained initial rules to the dynamic flexible workshop scheduling model, a dynamic flexible scheduling model with multi-rule combination scheduling is established. The model inputs multiple rule functions, the weights corresponding to each rule function, and case information. The model outputs the average dwell time of the workpiece in the workshop. The scheduling process is as follows: when selecting machines and workpieces, the state variables of each machine and workpiece are input into the multiple rule functions to obtain multiple priority values. The priority values are weighted and summed based on the weights of each rule to obtain the final priority value, which is then used for scheduling.
[0011] S5. Calculate the optimal weights of each rule in the dynamic flexible scheduling of multi-rule combined scheduling based on the hybrid differential evolution algorithm, and input them into the dynamic flexible scheduling model of multi-rule combined scheduling.
[0012] S6. Workshop scheduling is performed based on the priority values of each machine and workpiece obtained from the dynamic flexible scheduling model of multi-rule combination scheduling.
[0013] Furthermore, the state variables of each machine and workpiece are specifically variables describing the processing status of the workpiece and the working status of the machine, including: the total number of operations that the machine needs to process, the total workload in the machine's waiting queue, the time it takes for the machine to reach an idle state, the process processing time, the median of the next process processing time, the remaining workload of the workpiece, the remaining number of processes for the workpiece, the time after the workpiece arrives at the workshop, and the transportation time.
[0014] Furthermore, in the dynamic flexible workshop scheduling model, the sequence rule function is as follows: when a workpiece is selecting a machine, all state variables of the workpiece and all state variables of a machine are input, and the priority value of the machine is output.
[0015] The routing rule function is as follows: when a machine selects a workpiece, the input is all the state variables of the machine and a candidate workpiece, and the output is the priority value of the candidate workpiece.
[0016] Furthermore, the specific scheduling method based on the priority values of machines and workpieces is as follows:
[0017] Machine selection: When a new workpiece arrives, the priority value of each machine is calculated by inputting the current status of the new workpiece and the relevant status values of each machine into the routing rule function. The machine with the highest priority value is selected as the machine to process the first process of the workpiece. If the selected machine is idle, the machine processes the workpiece directly; otherwise, the new workpiece is inserted into the waiting queue of that machine.
[0018] Workpiece selection: When the current event is that a certain process of a workpiece is completed, if the process is not the last process of the workpiece, the machine to process the next process of the workpiece needs to be determined and the machine selection process is repeated; if the original machine is selected again, it is placed directly in the waiting queue of the original machine.
[0019] After assigning the workpieces that have completed the process, the machine that just finished processing the workpiece is scheduled. If the waiting sequence of the machine is empty, it is left idle; if the waiting sequence of the machine is not empty, a sequence selection is performed in the queue: the machine information and the information of the candidate workpieces are input into the sequence rule function to obtain the priority value, and the workpiece with the highest priority value is taken as the next workpiece to be processed by the machine.
[0020] Furthermore, the specific steps of constructing multiple sets of initial rules using the genetic programming algorithm are as follows:
[0021] S3.1 Initialize the population: Randomly generate several initial programs as the population of rule groups. Each rule group individual consists of the calculation functions corresponding to two rules: routing rule and sequence rule.
[0022] S3.2 Represent each rule function using a syntax tree, with non-leaf nodes as operators and leaf nodes as state variables; convert the syntax tree into an infix expression to obtain the formula corresponding to the rule function;
[0023] S3.3 Input the rule function transformed from the initial rule group into the dynamic flexible programming model to obtain the fitness value;
[0024] S3.4 Select parents from the population based on fitness; generate new individuals based on the parents, and perform crossover and mutation operations simultaneously.
[0025] S3.5 Re-evaluate the fitness of newly generated individuals and select elite individuals based on fitness; after iterating to the preset maximum number of iterations, stop evolution and select the last remaining elite individuals.
[0026] Furthermore, the dynamic flexible scheduling model of multi-rule combination scheduling specifically includes: taking the shortest dwell time of workpieces in the workshop as the objective, taking the state variables of each machine and workpiece, rule functions and the weight of each rule as input, firstly calculating the priority value of different machines or workpieces under each rule according to the dynamic flexible workshop scheduling model, normalizing the priority values of different machines or workpieces output by the same rule, and weighting and combining the priority values output by multiple sets of normalized priority values to output the final scheduling priority value.
[0027] Furthermore, the optimal weights of each rule in the dynamic flexible scheduling of multi-rule combined scheduling, calculated using the hybrid differential evolution algorithm, are specifically as follows:
[0028] S4.1 Initialize the population. Each individual in the population is a vector representing the rule weights. The vector dimension is the number of optimal scheduling rules stored. Initial weights are generated by sampling random variables uniformly distributed from 0 to 1, and each initial weight is converted into a proportional weight.
[0029] S4.2 Calculate the fitness value of each individual in the population, select the individual with the best fitness value, and update the weights using a mutation strategy; where the fitness value is the inverse of the average dwell time of the workpiece in the workshop.
[0030] S4.3 Calculate the fitness value of the new population and use a greedy approach to retain the best performing individual at the corresponding coordinate; continue iterating until the maximum number of iterations is reached.
[0031] Furthermore, the mutation strategy includes randomly using the first strategy and the second strategy to generate mutated individuals, and setting a crossover rate threshold. Each time a new individual is generated, a random number is generated. If the number is less than the crossover rate threshold, the new individual replaces the mutated individual.
[0032] Furthermore, the first strategy and the second strategy are specifically as follows:
[0033] First strategy: The intermediate individual generated by the i-th mutation is x. i Three individuals were randomly selected from the population. Then we have:
[0034]
[0035] Second strategy: The intermediate individual generated by the i-th mutation is x. i Two individuals are randomly selected from the population. Then we have:
[0036]
[0037] Where F is the scaling factor.
[0038] According to another aspect of this specification, a dynamic flexible workshop scheduling device based on multiple rule combinations is also provided. The device includes a memory and one or more processors. The memory stores executable code, and when the processor executes the executable code, it implements a dynamic flexible workshop scheduling method based on multiple rule combinations.
[0039] The beneficial effects of this invention are:
[0040] In the scenario of industrial workshop scheduling, a combination optimization based on multiple scheduling rules was realized, which breaks the limitation of traditional scheduling rules based on genetic programming that only have state variables and no weight coefficients. Compared with single scheduling rules, combined scheduling rules have stronger generalization and better scheduling effect. Attached Figure Description
[0041] Figure 1 A flowchart of a dynamic flexible workshop scheduling method based on multi-rule combination provided in this embodiment of the invention;
[0042] Figure 2 Example syntax tree diagrams of the routing rule function and sequence rule function provided in this embodiment of the invention;
[0043] Figure 3 A schematic diagram of dynamic flexible workshop scheduling based on routing rules and sequence rules provided in this embodiment of the invention;
[0044] Figure 4 A schematic diagram of dynamic flexible workshop scheduling based on multi-rule combination provided in this embodiment of the invention;
[0045] Figure 5 A schematic diagram of genetic programming crossover and mutation operations provided in this embodiment of the invention;
[0046] Figure 6 Iterative diagram of the differential evolution algorithm provided in this embodiment of the invention;
[0047] Figure 7 Comparative test of the algorithm performance provided in the embodiments of the present invention;
[0048] Figure 8 This is a schematic diagram of a dynamic flexible workshop scheduling device based on multiple rule combinations, provided as an embodiment of the present invention. Detailed Implementation
[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0050] A dynamic flexible workshop scheduling method based on multi-rule combination includes the following steps:
[0051] Step 1: Obtain the state variables of each machine and workpiece in the workshop and establish a dynamic flexible workshop scheduling model;
[0052] The model input consists of a sequence rule function and a routing rule function; the model output is the negative of the dwell time of each workpiece in the workshop after scheduling according to the two rule functions.
[0053] (1.1) Case information on dynamic flexible workshops is as follows:
[0054] In the dynamic workshop of this embodiment, there are 10 machines and 100 workpieces arrive randomly in sequence (number of machines n). m =10, number of workpieces n j =100). Number of operations per workpiece The process is randomly generated by a uniform integer distribution in the interval [2, 10]. It is assumed that each process has a workload, which is randomly generated by a uniform distribution in the interval [100, 1000). The processes for each workpiece must be processed in sequence.
[0055] Each machine has a working efficiency, which is randomly generated by a uniform distribution in the interval [10, 15). The processing time of each process is equal to its workload divided by the working efficiency of the machine. Each machine can only process one workpiece at a time, and the processing cannot be interrupted.
[0056] The transfer of workpieces between different machines requires corresponding transportation time, and there is also a certain distance transportation time between the start and end points of machine operation. The transportation time is generated by a uniform distribution within the interval [7, 100).
[0057] The arrival times of each workpiece follow a Poisson random process, with the parameter λ = μ*p. M / p, where μ is the average processing time of all processes on all machines, and p M p represents the average number of processes per machine for all workpieces, and p is the workshop busyness (set to 0.85 in this embodiment).
[0058] (1.2) The dynamic flexible workshop scheduling process based on rule functions is as follows:
[0059] like Figure 3 and Figure 4 As shown, based on the timeline, and using state variables, routing rule functions, and sequence rule functions, the currently occurring events are processed:
[0060] The model takes sequence rule functions, routing rule functions, and case information as input, and outputs the average dwell time of the workpiece in the workshop. The scheduling process is as follows: the state variables of each machine and workpiece are input, the priority values of the machine and workpiece are calculated through sequence rule functions and routing rule functions, and the machine and workpiece are selected. The state variables of the machine and workpiece are updated until the scheduling is completed and the average dwell time of the workpiece in the workshop is returned.
[0061] State variables: Variables that describe the processing status of the workpiece and the working status of the machine;
[0062] Routing rule function: When a workpiece is selecting a machine, the input is all the state variables of the workpiece and all the state variables of a machine, and the output is the priority value of the machine;
[0063] Sequence rule function: When a machine selects a workpiece, the input is all the state variables of the machine and a candidate workpiece, and the output is the priority value of the candidate workpiece.
[0064] (For specific state variables and the two rule functions, please refer to step 2 (2,1)(2.2))
[0065] Event 1: When a new workpiece arrives, the routing rule function is used to calculate the priority value of each machine by inputting the status variables of the new workpiece and the relevant status variables of each machine. The machine with the highest priority value is selected as the machine to process the first step of the workpiece. If the selected machine is idle, it processes the workpiece directly; otherwise, the new workpiece is inserted into the machine's waiting queue.
[0066] Event 2: The current event is when a certain process of a workpiece is completed. If this process is not the last process of the workpiece, then it is necessary to determine the machine to process the next process of the workpiece. The machine selection process of Event 1 can be repeated (if the original machine is selected again, it should be placed directly in the waiting queue of the original machine).
[0067] After assigning the workpieces that have completed the process, the machine that just finished processing the workpiece is scheduled. If the waiting sequence of the machine is empty, it is left idle. If the waiting sequence of the machine is not empty, a sequence selection is performed in the queue: the machine information and the information of the candidate workpieces are input into the sequence rule function to obtain the priority value, and the workpiece with the highest priority value is taken as the next workpiece to be processed by the machine.
[0068] In each event, the transportation time of the workpiece between different machines also needs to be considered: if a workpiece is selected by a certain machine, even though the workpiece may still be in transit, this embodiment considers the workpiece to have entered the machine's waiting queue; furthermore, if a workpiece in a waiting sequence is selected by a machine as the next workpiece to be processed, but the workpiece is still in transit, the machine will wait for the workpiece to arrive before processing it.
[0069] Process each event sequentially until all artifacts are completed.
[0070] During the processing, this embodiment records the arrival time S of each workpiece. i and completion time T i .
[0071] (1.3) Average completion time of the workpiece and the completion time f of each workpiece i =(T i -S i ), and its negative value is used as the model output.
[0072] Step 2: Use the genetic programming algorithm to construct the ten optimal initial rules;
[0073] (2.1) Population Initialization: 800 sets of syntax trees are randomly generated as the population of rule groups. Each rule group consists of a syntax tree corresponding to two rules: routing rules and sequence rules. In this application, non-leaf nodes of the syntax tree are operators, and leaf nodes are state variables. The syntax tree form is as follows: Figure 2 As shown
[0074] The operators that make up the syntax tree are: {+,-,÷,×,min,max}, where the division operation is a protected division operation, which returns 1 when it encounters a division by 0.
[0075] The state variables that make up the syntax tree are:
[0076] State variables describe NIM Total number of operations the machine needs to process WIQ Total workload in the machine waiting queue MWT Time for the machine to reach idle state PT Processing time NPT Median processing time of the next process WKR Remaining workload of the workpiece NOR Number of remaining processes for the workpiece TIS Time after the workpiece arrives at the workshop TRANT Transportation time
[0077] (2.2) Converting the syntax tree into an expression yields the formula corresponding to the rule function, for example, Figure 2 Example of a syntax tree for a pair of rule functions:
[0078] Figure 2 The routing rule function in the code can be obtained by transforming the corresponding syntax tree (the input is the state variables of the machine and workpiece corresponding to the priority value calculation):
[0079] Rout f (NIM,WIQ,MWT,…,TRANT)=PT÷(WKR-NPT)×MWT+NIQ÷WIQ
[0080] Figure 2 The sequence rule function in the code can be obtained by transforming the corresponding syntax tree (the input is the state variables of the machine and workpiece corresponding to the priority value calculation):
[0081] Seq f ((NIM,WIQ,MWT,…,TRANT)=(MWT+NIQ)×((PT-WKR÷NPT)÷WIQ)
[0082] (2,3) Obtaining Fitness: The initially generated rule set population is sequentially converted into rule functions and input into the dynamic flexible programming model to obtain fitness values.
[0083] (2.4) Selection: Based on fitness values, individuals are selected from the current population as parents to generate the next generation of the rule-based population. Selection operation: A tournament selection process (7 to 1) is used in the first 5 generations, and Lexicase selection based on subsample fitness is used in the latter 45 generations.
[0084] (2.5) such as Figure 5 As shown, crossover and mutation:
[0085] Crossover: Two individuals are selected from the parent generation, and new individuals are generated by exchanging their subtrees. The crossover operation simulates genetic recombination in nature, producing offspring by combining the characteristics of different individuals.
[0086] Mutation: Random mutation operations are performed on newly generated individuals to increase the diversity of the population. Mutation operations introduce new features or behaviors by modifying the subtrees or nodes of an individual.
[0087] (2.6) Assess fitness: For newly generated individuals, reassess their fitness.
[0088] (2.7) Replacement: Based on the fitness value, select elite individuals as survivors, as part of the next generation of the population, and as the last solution to be retained in the last generation.
[0089] Termination condition: If the maximum number of iterations is reached, stop the evolution process; otherwise, return to step (2.3).
[0090] The algorithm's parameter settings are shown in the table below:
[0091]
[0092]
[0093] Through step 2, this embodiment can obtain ten sets of adaptation rules.
[0094] Step 3: Establish a dynamic flexible scheduling model based on multi-rule combination scheduling; the model inputs multiple sets of rule functions, the weights corresponding to each set of rule functions, and case information, and the model outputs the average dwell time of the workpiece in the workshop; the scheduling process is as follows: when selecting machines and workpieces, the state variables of each machine and workpiece are input into multiple sets of rule functions to obtain multiple sets of priority values, and the priority values are weighted and summed based on the weights of each set of rules to obtain the final priority value and use it for scheduling;
[0095] In the dynamic flexible scheduling model established in step 1, when making the same selection, the state variables corresponding to the candidate machines or workpieces are input into the 10 different rules constructed in step 2. The priority values of different machines or workpieces output by the same rule are normalized, and the priority values output by multiple normalized sets are weighted and combined to output the final scheduling priority value.
[0096] For example: in the process of selecting a machine for a workpiece, there are n m A number of machines are available, from n r One routing rule function and n w The corresponding weight values are combined and scheduled (n w =n r ).
[0097] Let X be all the state variables of the workpiece. J A certain machine state variable is For the same routing rule The process of function normalization is as follows: First, obtain the routing rule functions for each machine. Output priority:
[0098]
[0099] set up Normalize the priority values of the outputs of the same rule:
[0100]
[0101] The weighted combination of the normalized priority values of each rule function is used as the final priority value for each machine:
[0102]
[0103] Then, the machine with the highest final priority value is selected as the machine to process the current workpiece; the process of the machine selecting the workpiece is the same.
[0104] Step 4: Use the hybrid differential evolution algorithm to optimize the priority weights of multiple sets of rule outputs until a suitable priority weight is found.
[0105] (4.1) Initialize the population. Each individual in the population is a vector w representing the rule weights, and the dimension of the vector is the number of optimal scheduling rules stored, n. r Initial weights are generated by sampling random variables that are uniformly distributed from 0 to 1; after generation, each weight is divided by the sum of weights to convert them into proportional weights.
[0106] (4.2) The generated weights and the scheduling rules saved in step two are applied to the dynamic flexible model of multi-rule combined scheduling established in step three to calculate the appropriate value. In this step, this embodiment randomly selects 100 test cases to apply the scheduling rules, and uses the average of the objective function values of all cases as the appropriate value for evolution.
[0107] (4.3) Select the individual with the best fitness value w best The system uses a combination of two different mutation strategies to update the weights of each group:
[0108] Strategy 1: Let x be the intermediate individual generated by the i-th mutation. i Three individuals were randomly selected from the population. Then we have:
[0109]
[0110] Strategy 2: Let x be the intermediate individual generated by the i-th mutation. i Two individuals are randomly selected from the population. Then we have:
[0111]
[0112] Where F is the scaling factor, and in this embodiment, F = 0.5.
[0113] When generating intermediate individuals through mutation, this embodiment generates a random number between 0 and 1. If the random number is greater than 0.5, this embodiment uses strategy 1 to generate intermediate individuals. If the random number is less than 0.5, this embodiment uses strategy 2 to generate intermediate individuals.
[0114] After generating the mutated intermediate individuals, compared with the original individuals, for each dimension, a random number between 0 and 1 is generated. If the random number is less than the crossover rate threshold (cr = 0.7), then a replacement is performed.
[0115] w ij =x ij if rand(0,1) <cr
[0116] After the final new individual is generated, this embodiment uses method 4.1 to convert the weight it represents into a weight ratio.
[0117]
[0118] The conversion of weight ratios helps to accelerate the convergence speed.
[0119] (4.4) Calculate the fitness value of the new population, and use a greedy approach to decide whether to retain the individuals that perform better under the corresponding index:
[0120] Assuming the old population New population generated We compared the fitness values of individuals in the old and new populations according to their corresponding indices and retained the individuals with better performance:
[0121]
[0122] (4.5) Repeat (4.3) and (4.4) until the maximum number of iterations is reached (max_gen = 50).
[0123] The rules in step 2 are weighted according to the weights obtained in step 4 to obtain the final scheduling rules.
[0124] like Figure 6 The graph shows the iterations of the differential evolution algorithm. The vertical axis represents the difference between the average fitness value of this method and that of the ten elite individuals from the genetic programming algorithm. Weight1 represents the iteration without weight scaling, and weight2 represents the iteration with weight scaling. The graph shows that using weight scaling accelerates convergence and search speed; while not using weight scaling results in slower convergence but better exploration trend. Both methods demonstrate a gradual improvement in scheduling performance on the training set.
[0125] like Figure 7 The results show a comparison of the algorithm's performance across 50 test cases. The comparison mainly consists of two parts: box plots and a table comparing the average performance of the test set.
[0126] In the box plot, elite_mean represents the average performance of the elite individuals retained by the genetic programming algorithm across all test cases; weight1_mean represents the average performance of the weighted rule combinations corresponding to the retained rule weights without weight scaling on all test cases; and weight2 represents the performance of the weighted rule combinations corresponding to the retained rule weights with weight scaling on all test cases.
[0127] Observing the box plot, overall, this embodiment shows that the two weighted combination optimization methods are equally effective, and the algorithm that retains the original rules has a better scheduling effect.
[0128] Elite_mean Elite_best W11 W12 W13 W14 W2 Mean_fit 454.349 450.506 448.541 448.874 449.062 449.681 449.105
[0129] By comparing the average performance across all cases in the test set, the weighted rule combinations obtained through the two iterations (four weights in the first iteration and one weight in the second) outperformed the average and even optimal performance of the algorithm with the original retained rules. (Note that this embodiment primarily compares average performance, as the ranking of almost all rules across different cases is not consistent.)
[0130] Corresponding to the aforementioned embodiment of a dynamic flexible workshop scheduling method based on multiple rule combinations, the present invention also provides an embodiment of a dynamic flexible workshop scheduling device based on multiple rule combinations.
[0131] See Figure 8 The present invention provides a dynamic flexible workshop scheduling device based on multiple rule combinations, comprising a memory and one or more processors. The memory stores executable code, and when the processor executes the executable code, it is used to implement a dynamic flexible workshop scheduling method based on multiple rule combinations in the above embodiments.
[0132] An embodiment of the dynamic flexible workshop scheduling device based on multi-rule combination of the present invention can be applied to any device with data processing capabilities, such as a computer. The device embodiment can be implemented in software, hardware, or a combination of both. Taking software implementation as an example, as a logical device, it is formed by the processor of any data processing device loading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 8 The diagram shown is a hardware structure diagram of any data processing-capable device in which a dynamic flexible workshop scheduling device based on multi-rule combination of the present invention is located. (Except for...) Figure 8 In addition to the processor, memory, network interface, and non-volatile memory shown, any data processing device in the embodiment may also include other hardware depending on the actual function of the data processing device, which will not be described in detail here.
[0133] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0134] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0135] This invention also provides a computer-readable storage medium storing a program thereon, which, when executed by a processor, implements a dynamic flexible workshop scheduling method based on multi-rule combination as described in the above embodiments.
[0136] The computer-readable storage medium can be an internal storage unit of any data processing device as described in any of the foregoing embodiments, such as a hard disk or memory. The computer-readable storage medium can also be an external storage device of any data processing device, such as a plug-in hard disk, smart media card (SMC), SD card, flash card, etc., equipped on the device. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of any data processing device. The computer-readable storage medium is used to store the computer program and other programs and data required by the data processing device, and can also be used to temporarily store data that has been output or will be output.
[0137] The above embodiments are used to explain and illustrate the present invention, but not to limit the present invention. Any modifications and changes made to the present invention within the spirit and scope of the claims shall fall within the protection scope of the present invention.
Claims
1. A dynamic flexible job shop scheduling method based on multi-rule combination, characterized in that, The method comprises the following steps: S1, obtaining state variables of each machine and workpiece in the workshop; S2, establishing a dynamic flexible workshop scheduling model: the model inputs sequence rule functions and routing rule functions and case information, and outputs average residence time of the workpiece in the workshop; The scheduling process is: inputting the state variables of each machine and workpiece, calculating priority values of the machines and workpieces through the sequence rule functions and routing rule functions to select machines and workpieces, updating the state variables of the machines and workpieces, until the scheduling is completed, and returning the average residence time of the workpiece in the workshop; S3, using a genetic programming algorithm to construct multiple sets of initial rules; S4, applying the obtained multiple sets of initial rules to the dynamic flexible workshop scheduling model to establish a dynamic flexible scheduling model of multi-rule combination scheduling; the model inputs multiple sets of rule functions, weights corresponding to each set of rule functions and case information, and outputs average residence time of the workpiece in the workshop; The scheduling process is: when selecting machines and workpieces, inputting the state variables of each machine and workpiece in multiple sets of rule functions to obtain multiple sets of priority values, performing weighted summation on the priority values based on the weights of each set of rules to obtain final priority values and scheduling based on the final priority values; S5, calculating the optimal weights of each rule in the dynamic flexible scheduling of multi-rule combination scheduling according to a hybrid differential evolution algorithm, and inputting the optimal weights into the dynamic flexible scheduling model of multi-rule combination scheduling; S6, scheduling the workshop according to the priority values of each machine and workpiece obtained from the dynamic flexible scheduling model of multi-rule combination scheduling.
2. The dynamic flexible job shop scheduling method based on multi-rule combination according to claim 1, characterized in that, The state variables of each machine and workpiece are specifically variables describing processing conditions of the workpiece and working conditions of the machine, and include: total operation number to be processed by the machine, total workload in the waiting queue of the machine, time for the machine to reach an idle state, process processing time, median of next process processing time, remaining workload of the workpiece, remaining process number of the workpiece, time for the workpiece to arrive at the workshop and transportation time.
3. The dynamic flexible job shop scheduling method based on multi-rule combination according to claim 1, characterized in that, In the dynamic flexible workshop scheduling model, the sequence rule function is: inputting all state variables of a workpiece and all state variables of a machine when the workpiece selects the machine, and outputting a priority value of the machine; The routing rule function is: inputting all state variables of a machine and a candidate workpiece when the machine selects the workpiece, and outputting a priority value of the candidate workpiece.
4. The dynamic flexible job shop scheduling method based on multi-rule combination according to claim 3, characterized in that, The specific scheduling method according to the priority values of the machine and the workpiece is: Machine selection: when a new workpiece arrives, the priority values of each machine are calculated by inputting the state variables of the new workpiece and the related state variables of each machine in the routing rule function, and the machine with the highest priority value is selected as the machine for processing the first process of the workpiece; if the selected machine is idle, the machine directly processes the workpiece, otherwise the new workpiece is inserted into the waiting queue of the machine; Workpiece selection: when a process of a workpiece is processed, if the process is not the last process of the workpiece, the machine for processing the next process of the workpiece needs to be determined, and the machine selection process is repeated; if the original machine is selected again, the workpiece is placed in the waiting queue of the original machine. After the workpiece of the finished process is distributed, the machine just processed the workpiece is arranged, if the waiting sequence of the machine is empty, the machine is idle; If the waiting sequence of the machine is not empty, sequence selection is performed in the queue: the information of the machine and the information of the alternative workpiece are input into the sequence rule function to obtain a priority value, and a workpiece with the largest priority value is taken as the next workpiece to be processed by the machine.
5. The dynamic flexible job shop scheduling method based on multi-rule combination according to claim 1, characterized in that, The using the genetic programming algorithm to construct multiple groups of initial rules specifically comprises: S3.1, initializing a population: a plurality of groups of initial programs are randomly generated as a population of rule groups, and each rule group individual is composed of two rule corresponding calculation functions of routing rules and sequence rules; S3.2, each rule function is expressed by using a syntax tree, a non-leaf node is an operator, and a leaf node is a state variable; the syntax tree is converted into a infix expression to obtain a formula corresponding to the rule function; S3.3, the initial rule group is converted into a rule function and input into the dynamic flexible programming model to obtain a fitness value; S3.4, parent individuals are selected in the population according to the fitness, and new individuals are generated according to the parent individuals, and a crossover and mutation operation is performed; S3.5, the fitness of the newly generated individual is re-evaluated, and elite individuals are selected according to the fitness; the evolution is stopped after a preset maximum iteration number is reached, and the last reserved elite individual is selected.
6. The dynamic flexible job shop scheduling method based on multi-rule combination according to claim 1, characterized in that, The dynamic flexible scheduling model of the multi-rule combination scheduling specifically comprises: taking the shortest residence time of the workpiece in the workshop as the target, taking the state quantity of each machine and workpiece, the rule function and the weight of each rule as the input, first calculating the priority value of different machines or workpieces under each rule according to the dynamic flexible workshop scheduling model, normalizing the priority values of different machines or workpieces output by the same rule, and weighting and combining the normalized priority values output by multiple groups to output the final scheduling priority value.
7. The dynamic flexible job shop scheduling method based on multi-rule combination according to claim 1, characterized in that, The best weight of each rule in the dynamic flexible scheduling of the multi-rule combination scheduling calculated according to the hybrid differential evolution algorithm specifically comprises: S4.1, initializing a population, each individual of the population is a vector representing the weight of a rule, and the vector dimension is the number of saved optimal scheduling rules; initial weights are generated by sampling random variables uniformly distributed from 0 to 1, and each initial weight is converted into a proportional weight; S4.2, the fitness value of the population individual is calculated, and the individual with the best fitness value is selected, and the weight is updated using a mutation strategy; wherein the fitness value is the inverse of the average residence time of the workpiece in the workshop; S4.3, the fitness value of the new population is calculated, and the individual with the best performance at the corresponding coordinate is reserved using the greedy principle; the iteration is continued until the maximum iteration number is reached.
8. The dynamic flexible job shop scheduling method based on multi-rule combination according to claim 7, characterized in that, The mutation strategy comprises randomly generating a mutation individual using a first strategy and a second strategy, and setting a crossover rate threshold; a random number is generated each time a new individual is generated, and if the random number is less than the crossover rate threshold, the new individual replaces the mutation individual.
9. The dynamic flexible job shop scheduling method based on multi-rule combination according to claim 8, characterized in that, The first strategy and the second strategy specifically comprise: First strategy: the middle individual generated by the ith mutation is x i , randomly select three individuals from the population Then we have: Second strategy: the ith mutation generates the intermediate individual x i , randomly select two individuals from the population Then we have: Wherein F is a scaling factor.
10. A dynamic flexible job shop scheduling apparatus based on multi-rule combination, the apparatus comprising a memory and one or more processors, the memory having stored therein executable code, the apparatus being characterized by, When the processor executes the executable code, a multi-rule combination based dynamic flexible workshop scheduling method is implemented.
Citation Information
Patent Citations
Hazard source identification method based on on-line sequence learning machine
CN107590538A
Proxy model sample selection method applied to genetic programming for solving dynamic flexible workshop scheduling
CN116644906A