Flexible job shop dynamic event scheduling method based on improved NSGAII

By improving the NSGAII algorithm and introducing opposing learning strategies and adaptive cross-variance and mutation probability strategies, the impact of dynamic events in flexible operation workshops on production scheduling is solved, timely recovery of production and efficient utilization of resources are achieved, and energy consumption costs are reduced.

CN114926033BActive Publication Date: 2025-03-04YANSHAN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210573170.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-24
Publication Date
2025-03-04
Estimated Expiration
2042-05-24

AI Technical Summary

Technical Problem

In flexible operation workshops, it is difficult for the existing technology to effectively solve the impact of dynamic events such as machine failure, emergency order insertion and faulty machine recovery and operation on production scheduling, resulting in reduced production efficiency and waste of resources.

Method used

A flexible work workshop dynamic event scheduling method based on improved NSGAII is adopted to establish a production scheduling management and control model that considers machine failure, emergency order insertion and faulty machine recovery operation. Through opposing learning strategies and adaptive cross-variance probability strategies, an optimal scheduling plan is generated to ensure timely recovery of production and efficient utilization of resources.

Benefits of technology

Effectively reduce the energy consumption cost of flexible manufacturing production, improve production efficiency, timely restore production, and reduce resource waste.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114926033B_ABST
    Figure CN114926033B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for dynamic event scheduling of a flexible job shop based on improved NSGAII, which belongs to the technical field of production scheduling, and includes: establishing a model, taking the maximum completion time of a job, the total machine load and the energy consumption cost as the objective function of the model; determining scheduling constraints: process constraints, machine constraints, time constraints, and power sum upper limit constraints; obtaining optimal scheduling based on improved NSGAII; executing optimal scheduling and monitoring execution status; if no dynamic event occurs, turning to S9, otherwise turning to S6; determining the time and type of occurrence of the dynamic event, and updating the machine status; generating a rescheduling population according to a rescheduling strategy; taking the rescheduling population generated by S7 as the initial population, and turning to S3; the job is executed and the scheduling ends. The present invention can quickly and effectively obtain a better scheduling scheme, reduce the maximum completion time of the job, improve production efficiency and effectively reduce the energy consumption cost of flexible manufacturing production.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a flexible job shop dynamic event scheduling method based on improved NSGAII, belonging to the technical field of production scheduling. Background Art

[0002] The flexible job shop scheduling problem (FJSP) is a typical problem in shop scheduling. Compared with the classic assembly line shop, the biggest feature of the flexible job shop is that each process can be processed on different machines, thereby reducing the competition for machine resources among processes. However, with the increase of machines with the same functions in the shop, it is very difficult to get the optimal solution in a short time for slightly larger-scale scheduling problems. In the actual production process, workshop production is dynamic and is affected by some unforeseen interruptions or demands. If production is not resumed in a timely and effective manner, it will greatly affect production efficiency and delay delivery time. Therefore, it is also crucial to select appropriate rescheduling strategies and algorithms to solve production scheduling. Summary of the invention

[0003] The purpose of the present invention is to provide a dynamic event scheduling method for a flexible job shop based on improved NSGAII, which plays an important role in timely and effective production recovery and minimizing resource waste and improving production efficiency, and can also effectively reduce the energy consumption cost of flexible manufacturing production.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is:

[0005] A flexible job shop dynamic event scheduling method based on improved NSGAII includes the following steps:

[0006] S1. Establish a flexible job shop production scheduling and control model that takes into account dynamic events such as machine failure, emergency order insertion, and recovery of failed machines. The maximum completion time, total machine load, and energy consumption cost of the job are used as the objective function of the flexible job shop production scheduling and control model.

[0007] S2. Determine the scheduling constraints, including process constraints, machine constraints, time constraints, and total power upper limit constraints;

[0008] S3, obtain the optimal scheduling based on the improved NSGAII;

[0009] S4. Execute optimal scheduling and monitor the execution status;

[0010] S5. If no dynamic event occurs, go to step S9; otherwise, go to step S6;

[0011] S6. Determine the time and type of the dynamic event and update the machine status;

[0012] S7, generating a rescheduling population according to the proposed rescheduling strategy;

[0013] S8, taking the rescheduling population generated in S7 as the initial population, and going to step S3;

[0014] S9. The job is executed and the scheduling ends.

[0015] A further improvement of the technical solution of the present invention is that the specific steps of step S3 are:

[0016] S3.1. Initialize the population. When the initial population is a non-rescheduled population, a two-segment encoding method is used to represent the chromosome information. The first segment is the process code OS, which is used to determine the processing order of the workpiece; the second segment is the machine code string MS, which is used to indicate the machine assigned to the process. A population with a population size of N is randomly generated. When the initial population is a rescheduled population, this step is omitted.

[0017] S3.2, using the adversarial learning strategy to generate an opposite population;

[0018] S3.3, merge the initial population with the population after its adversarial learning, and the population size is 2N;

[0019] S3.4, randomly assign available machines to each process, and generate corresponding machine vectors, corresponding time vectors and energy consumption vectors;

[0020] S3.5, by decoding, calculate the maximum completion time and energy consumption cost of each individual;

[0021] S3.6, perform fast non-dominated sorting and crowding calculation on the merged population;

[0022] S3.7, using tournament and elite selection strategies to select the parent population, the population size is N;

[0023] S3.8, the number of population iterations increases by 1;

[0024] S3.9, calculate adaptive crossover,mutation probability;

[0025] S3.10, perform selection, crossover and mutation operations to obtain a progeny population with a population size of N;

[0026] S3.11. Use the adversarial learning strategy to conduct adversarial learning on the offspring population to produce an opposite population;

[0027] S3.12, merge the offspring population with its opposite population after oppositional learning, and the population size is 2N;

[0028] S3.13, by decoding, calculate the maximum completion time and energy consumption cost of each individual;

[0029] S3.14, perform fast non-dominated sorting and crowding calculation on the merged population;

[0030] S3.15. Use tournament and elite selection strategies to select a new offspring population with a population size of N;

[0031] S3.16, merge the parent population and the offspring population, and the population size is 2N;

[0032] S3.17, perform fast non-dominated sorting and crowding calculation on the merged population;

[0033] S3.18. Use tournament and elite selection strategies to select a new parent population with a population size of N;

[0034] S3.19, determine whether the number of population iterations reaches the set value. If it does, end the program. If it does not, go to step S3.8.

[0035] A further improvement of the technical solution of the present invention is that the specific steps of step S3.2 are:

[0036] First, the opposite node of each node of an individual is calculated according to the open-loop greedy reverse algorithm, that is, when the node n of the individual i When is an odd number, its opposite node index is When the individual node n i When is an even number, its opposite node index is

[0037] Then each individual in the population rearranges the process according to the opposite node of each node to generate opposing individuals, thereby generating a population after opposing learning.

[0038] A further improvement of the technical solution of the present invention is that the specific steps of step S3.5 are:

[0039] When performing the active scheduling step in the fully active scheduling decoding process based on the fully active scheduling decoding mechanism, for each process, find out whether there is a time gap with the minimum start time that can be inserted before this process in the optional machines of this process, and make the current maximum completion time after the insertion less than the maximum completion time before the insertion; if the process is inserted forward, the process after this process should reselect the machine according to the current workpiece completion time and machine completion time according to the principle of minimizing the current maximum completion time, and re-perform semi-active scheduling;

[0040] According to the decoded results, the machines selected for each process, and the corresponding processing time and energy consumption on the selected machines, the maximum completion time and energy consumption cost of the individual are calculated.

[0041] A further improvement of the technical solution of the present invention is that the specific steps of step S3.9 are:

[0042] First, select the maximum and minimum values ​​of the crossover probability and mutation probability; set Ra_Fitness i,j is the relative fitness value of the ith individual, Ra_Fitness max and Ra_Fitness min are the maximum relative fitness value and the minimum relative fitness value in the population respectively; then, the crossover probability of the i-th individual is calculated as:

[0043]

[0044] Among them, CP is the crossover probability, MP is the mutation probability, CP max and MP max are the maximum values ​​of crossover probability and mutation probability, CP min and MP min are the minimum values ​​of the crossover probability and mutation probability, respectively. ε is a very small real number to prevent the denominator from being zero. The mutation probability of the i-th individual is calculated as follows:

[0045]

[0046] Among them, set CP max =0.9, CP min =0.6, MP max =0.25, MP min = 0.06, suppose that after fast non-dominated sorting, the number of assigned levels is R, the population size is Size_pop, and the number of individuals in each level is f i (where i = 0, 1, ..., R-1); let the relative fitness value be Ra_Fitness 0,0 = Size_pop, then the relative fitness value Ra_Fitness of each individual in each level i,j (where j = 1, 2, ... (f i -1)) is calculated as follows:

[0047] Ra_Fitness i,j =Ra_Fitness i,(j-1) -Size_pop / R / f i +ε, (3)

[0048] Ra_Fitness (i-1),0 =Ra_Fitness i,(fi-1) -Size_pop / R / f (i-1) +ε, (4)

[0049] According to the order of i=0, 1, ..., R-1, the relative fitness value Ra_Fitness of each individual at each level is calculated in turn. i,j .

[0050] A further improvement of the technical solution of the present invention is that the specific steps of step S7 are:

[0051] When the dynamic event type is machine failure, the process is divided into four categories according to the status of each process when the machine failure occurs: completed process, process being processed but not processed on the faulty machine, process being processed by the faulty machine, and process not yet started; when the dynamic event type is emergency order insertion and faulty machine recovery, the process is divided into three categories according to the status of each process when the dynamic event occurs: completed process, process being processed, and process not yet started;

[0052] (1) When a machine fails, the completed processes will no longer be rescheduled; the processes that are being processed but not on the failed machine will continue to be processed on the current machine according to the current process arrangement and will no longer be rescheduled; the processes that are being processed on the failed machine and the processes that have not yet started will be rescheduled, the processes will be reordered, and the machines will be reselected. The start time of these processes is greater than or equal to the time when the machine failure occurred;

[0053] (2) When an emergency order is inserted, the completed processes will not be rescheduled; the processes being processed will continue to be processed on the current machine according to the current process arrangement and will not be rescheduled; the processes that have not yet started will be rescheduled, the processes will be reordered, and the machines will be reselected. The start time of these processes is greater than or equal to the end time of the emergency order insertion;

[0054] (3) When the faulty machine resumes operation, the completed processes will no longer be rescheduled; the processes being processed will continue to be processed on the current machine according to the current process arrangement and will no longer be rescheduled; the processes that have not yet started will be rescheduled, the processes will be reordered, and the machines will be reselected. The start time of these processes is greater than or equal to the time when the faulty machine resumes operation.

[0055] Due to the adoption of the above technical solution, the technical effects achieved by the present invention are as follows:

[0056] In order to improve the convergence and diversity of the NSGA-II algorithm, the present invention introduces an adversarial learning strategy and an adaptive crossover and mutation probability strategy, wherein the adversarial learning strategy improves the sufficiency of global search by generating opposite values, thereby improving the diversity of the population; and the improved adaptive crossover and mutation probability strategy improves the ability of the algorithm to jump out of the local optimum and the convergence speed of the algorithm by adaptively changing the crossover and mutation probabilities of individuals in the population as the number of population iterations increases. In addition, a new decoding method is proposed to obtain a better scheduling solution. By more reasonably arranging the processing machines and start time of each process, a better scheduling solution can be obtained quickly and effectively, reducing the maximum completion time of the operation, improving production efficiency and effectively reducing the energy consumption cost of flexible manufacturing production.

[0057] The present invention proposes a rescheduling strategy based on improved NSGAII for three types of dynamic events: machine failure, emergency insertion and resumption of operation of faulty machines. When a dynamic event occurs, the improved NSGAII is called to reschedule according to the type of dynamic event and the processing status of each workpiece when the dynamic event occurs, which plays an important role in timely and effective resumption of production, minimizing resource waste and improving production efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 is a flow chart of the present invention;

[0059] Figure 2 It is an improved NSGAII flow chart based on the new decoding mechanism;

[0060] Figure 3 It is a reverse schematic diagram of the process of the cited oppositional learning strategy;

[0061] Figures 4 to 7 It is a schematic diagram of semi-active scheduling, active scheduling, full-active scheduling and a new decoding mechanism in the decoding mechanism;

[0062] Figure 8 This is a schematic diagram of the distance between individuals of the same level. DETAILED DESCRIPTION

[0063] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0064] A flexible job shop dynamic event scheduling method based on improved NSGAII. The traditional mechanical job shop production process considers dynamic factors such as machine failure and new workpiece arrival. When considering machine failure, the maintenance time will be directly defined or the machine will no longer participate in scheduling after failure. However, in actual production, it is impossible to accurately predict the maintenance time of each machine and if the repaired machine is not re-added to the scheduling, it will cause certain resource waste and fail to obtain a better scheduling result. Therefore, when a machine failure occurs, the maintenance time of the faulty machine should not be directly given or the faulty machine should not be directly excluded from the optional machine set corresponding to each process in the rescheduling process. Instead, the recovery of the faulty machine should also be considered as a dynamic factor. When the faulty machine is restored to operation, the faulty machine should be re-added to the optional machine set corresponding to each process in a timely manner. Therefore, a flexible job shop production scheduling control model considering three types of dynamic events, namely machine failure, emergency insertion and faulty machine recovery, is constructed on the basis of the traditional mechanical job shop scheduling model; based on NSGA-II, the adversarial learning strategy and adaptive crossover and mutation probability strategy are introduced to address the convergence and diversity problems of the algorithm, and a new decoding method is proposed to obtain a better scheduling solution. For three types of dynamic events, namely machine failure, emergency order insertion and failed machine recovery, a rescheduling strategy based on improved NSGA-II is proposed. Figure 1 As shown, the following steps are included:

[0065] S1. Establish a flexible job shop production scheduling and control model that takes into account dynamic events such as machine failure, emergency order insertion, and recovery of failed machines. The maximum completion time of the job, total machine load, and energy consumption cost are used as the objective function of the flexible job shop production scheduling and control model.

[0066] In a flexible job shop, suppose that at the initial moment there is a set of n workpieces to be processed J = {J 1 ,J 2 ,...,J n} and a set of m independent machines M = {M 1 ,M 2 ,...,M m Each job J i There is a continuous sequence of operations The operations are processed sequentially according to the priority constraints. In addition, the flexible job shop scheduling problem FJSP has the characteristic of flexible processing routing, that is, the parallel operation machines of the classic job shop scheduling problem JSP are replaced by some highly flexible operation machines, which have different performances for different operations. Therefore, all possible machines that can process an operation constitute the candidate machine set for the operation. Therefore, the problem can be divided into two sub-problems: (1) the allocation sub-problem, that is, from the operation O i,j The candidate machine set Ai,j Select the appropriate machine M k process it; (2) the sequence subproblem, which is the need to determine the processing order of operations on the machine, because each machine can process one or more operations (i.e., machine flexibility).

[0067] In T t Dynamic events occur at time (t=0,1,2), when t=0, it means at T 0 When t = 1, it means that at T 1 An emergency order occurs at time TW, and TW represents the completion time of the emergency order; when t=2, it means that at T 2 The machine will resume operation when a fault occurs. 1 ,MS 2 ,...,MS k ...,MS m} indicates the status of the machine. If MS k =0 means machine M k Normal operation, if MS k =1 indicates machine M k A failure occurred.

[0068] The maximum completion time, total machine load and energy cost of the job are taken as the objective function of the flexible job shop production scheduling control model, and are described as follows using mathematical functions. Table 1 defines and describes the main variable symbols involved in the flexible job shop production scheduling control model and the constraints and evaluation indicators listed below:

[0069] Table 1 Variable description

[0070]

[0071]

[0072] Based on the above assumptions and variables, the following mathematical model can be constructed:

[0073]

[0074]

[0075]

[0076] Among them, f 1 represents the minimum completion time of the entire order, f 2 represents the minimization of the total machine load for the entire order, f 3 Represents minimizing the energy cost of the entire order.

[0077] S2. Determine the scheduling constraints, including process constraints, machine constraints, time constraints, and total power upper limit constraints;

[0078] The factory production scheduling problem is a constrained optimization problem with the following constraints:

[0079] (1) At the same time, only one machine can be selected for each process:

[0080]

[0081] Given a 0-1 variable to determine which machine each process is working on: when x i,j,k = 0, indicating that the workpiece process is not working on machine k. i,j,k =1, it indicates that the process of the workpiece is working on machine k. At a point in time, each process of each workpiece can only select one machine for processing until this process is completed. When this process is completed, it will not be processed for the second time.

[0082] (2) During the processing, the end time of a process is equal to the start time of the process plus the processing time of the process on the selected machine.

[0083] ST i,j,k +PT i,j,k =ET i,j,k , (5)

[0084] (3) The production process of each workpiece is strictly carried out in a certain sequence, and the subsequent process cannot be produced in advance when the previous process is not completed.

[0085] ST i,j ≥ET i,(j-1) , (6)

[0086] (4) Each process has at least one machine that can handle it.

[0087]

[0088] S3. Optimal scheduling is obtained based on the improved NSGAII. The flowchart of the improved NSGAII based on the new decoding mechanism is as follows: Figure 2 As shown;

[0089] S3.1. Initialize the population and use a two-segment encoding method to represent the chromosome information. The first segment is the process code OS, which is used to determine the processing order of the workpiece; the second segment is the machine code string MS, which is used to indicate the machine assigned to the process. Randomly generate a population with a population size of N (if the initial population is a rescheduling population, this step is omitted);

[0090] Initially, a population with a fixed value is randomly generated. In this population, each individual is a chromosome. Each chromosome contains two parts of information: one is a randomly generated process selection sequence, which must ensure that each process is in the sequence; the other is a randomly generated machine selection sequence, which must ensure that each process corresponds to a machine.

[0091] S3.2, using the adversarial learning strategy to generate an opposite population;

[0092] In general, NSGAII starts with an initial population and tries to bring them closer to the Pareto optimal solution during the iteration process. If there is no prior knowledge about the Pareto optimal solution, we usually start with a random population and the computation time is related to the distance of these initial guesses from the optimal solution. We can improve the initial selection by simultaneously checking its opposite solution. By doing so, a more suitable solution (guess or opposite guess) can be selected as the initial solution. In fact, according to probability theory, 50% of the time, a guess is farther from the solution than its opposite guess. The same method can be used not only for the initial population, but also for the current population during the evolution process.

[0093] The opposition method for discrete domain problems adopts open path opposition. An open path is a path that completes them when we reach the last vertex on the path. The goal of open path opposition is to maximize the total proximity in the path by scattering the adjacent nodes. Note that calculating the exact opposite is itself a combinatorial problem, so we use a greedy approximation method. For a given number of variables in a combinatorial problem, we can calculate its greedy opposite using Algorithm 1. The pseudo code of the algorithm solution process is shown in Table 2.

[0094] For example, we have 4 workpieces to be processed, each with two processes. First, we randomly generate a process sequence [2 32 1 4 3 1 4], where the first 2 represents the first process of the second workpiece, i.e., O 2,1 , and so on, the process sequence can also be expressed as [O 2,1 O 3,1 O 2,2 O 1,1 O 4,1 O 3,2 O 1,2 O 4,2 ], the number of nodes is 8, and the node numbers are [1 2 3 4 56 7 8]. According to Algorithm 1, the opposite node numbers are [1 8 2 7 3 6 4 5]. The process sequence is regenerated according to the opposite node numbers as [2 4 3 1 2 3 1 4], that is, the new process sequence is [O 2,1 O4,1 O 3,1 O 1,1 O 2,2 O 3,2 O 1,2 O 4,2 ] The reverse process diagram is as follows Figure 3 shown.

[0095] Table 2: Pseudocode of the solution process of the open-loop greedy reverse algorithm

[0096]

[0097] S3.3, merge the initial population with the population after its adversarial learning, and the population size is 2N;

[0098] S3.4. Randomly assign available machines to each process, and generate corresponding machine vectors, corresponding time vectors and energy consumption vectors.

[0099] S3.5. Calculate the maximum completion time and energy consumption cost of each individual through decoding.

[0100] Decoding is to arrange the start time of each process on the selected machine in turn according to the generated process sequence and machine sequence under the constraint of operation priority. Generally, the decoding mechanisms we use include semi-active scheduling decoding mechanism and active scheduling decoding mechanism. The semi-active scheduling decoding mechanism is to arrange the start time of each process on the selected machine in turn according to the order of processes given by the process sequence without changing the processing order of the processes on the machine. If no operation can be advanced, the start time of each process on the selected machine will be arranged in turn according to the order of processes given by the process sequence. The active scheduling decoding mechanism is to adjust the start time of the process that can be advanced by shifting the semi-active scheduled process to the left without delaying other operations or destroying the priority order, so as to shorten the maximum completion time. Although converting semi-active scheduling to active scheduling can shorten the maximum completion time, the active scheduling set is usually very large and contains many schedules with a large amount of delay time. The fully active scheduling decoding mechanism can be defined as a schedule in which there are no processes that can be allowed to be shifted left or right. Fully active scheduling can be achieved by right-shifting the actively scheduled process without delaying any other processes. For a given active schedule, the process sequence, the selected machine sequence, and the time sequence corresponding to the selected machine of the process are reversed, and the reversed sequence is decoded according to the active scheduling decoding method. The sequence is updated to obtain a new reversed sequence after left shifting, and then the new reversed sequence is reversed and semi-active scheduling is performed to obtain a fully active scheduling result.

[0101] The use of the fully active scheduling decoding mechanism can obtain a higher quality solution than the use of the semi-active and active scheduling decoding mechanisms. However, since the fully active scheduling decoding mechanism only considers the left and right shifts of the process on the selected machine, and does not consider whether the process can be inserted into the time slots of other machines in the optional machine set, to a certain extent, the fully active scheduling set still contains many schedules with delay times. Therefore, this paper proposes a new decoding mechanism based on the fully active scheduling decoding mechanism. When performing the active scheduling step in the fully active scheduling decoding process, for each process, find out whether there is a time slot that can be inserted in the optional machine of the process before this process and the time slot that can be inserted is the smallest, and the current maximum completion time after insertion is less than the maximum completion time before insertion. If a process is inserted forward, the process after this process should reselect the machine according to the current workpiece completion time and machine completion time according to the principle of minimizing the current maximum completion time, and re-schedule semi-actively.

[0102] In order to explain this new decoding mechanism in detail, Table 3 gives the scheduling problem of processing 4 workpieces on 5 machines. Among them, workpiece 1 contains 3 processes. The first process can be processed on machines 1, 2, 3, 4, and 5, and the corresponding processing time on each machine is 2, 5, 4, 1, and 2. Suppose the generated initial process sequence is [1 3 4 3 3 2 2 1 2 4 1 3], the initial machine sequence is [4 3 1 2 1 4 5 2 1 2 2 3], and the corresponding initial processing time sequence is [1 6 1 1 2 7 5 44 1 5 2]. The corresponding scheduling results can be obtained by using semi-active scheduling, active scheduling, fully active scheduling and the new decoding mechanism proposed in this paper, respectively. Figures 4 to 7 The machine Gantt chart shows the semi-active scheduling, active scheduling, fully active scheduling and the new decoding mechanism corresponding to the initial sequence, and their maximum completion times are 17, 17, 16 and 13 respectively. It can be seen that the new decoding mechanism can not only effectively shorten the maximum completion time by reasonably utilizing the delay time on the machine, but also effectively reduce the total load on the machine with the largest load and the total load of all machines.

[0103] Table 3 Scheduling problem of processing 4 workpieces on 5 machines

[0104]

[0105]

[0106] S3.6, perform fast non-dominated sorting and crowding calculation on the merged population;

[0107] The initial population is merged with the population after its adversarial learning to obtain a population R of size 2N tAt this time, you need to keep R t The best N members in the next generation are first sorted using a fast non-dominated sorting algorithm. t Divided into F 1 、F 2 、F 3 Then merge all individuals in each non-dominated layer from top to bottom until a population S with a size just exceeding or equal to N is generated. t , assuming S t =F 1 ∪F 2 ∪...∪F v , where F v is the last acceptable critical layer. At this time, if S t If the scale is exactly N, proceed to the next step, otherwise discard F v Some individuals in the t The size is N. Then calculate the crowding degree of each individual, in F v In the process, the individuals with small crowding degree are discarded. Figure 8 This is a schematic diagram of the distance between individuals of the same level. The crowding calculation formula is:

[0108]

[0109] S3.7. The parent population is selected using tournament and elite selection strategies, and the population size is N.

[0110] S3.8. The number of population iterations increases by 1.

[0111] S3.9, calculate adaptive crossover,mutation probability;

[0112] The fixed crossover and mutation probabilities are modified to adaptive crossover and mutation probabilities according to the fitness value. In the early stage of algorithm iteration, in order to seek the diversity of population individuals, the population individuals should have a higher crossover and mutation probability and improve the ability of the algorithm to jump out of the local optimum; in the later stage of algorithm iteration, the population individuals should have a relatively low crossover and mutation probability to improve the convergence speed of the algorithm. Therefore, through the dynamic control of crossover and mutation operators, it is possible to retain excellent individuals with high fitness and improve the convergence accuracy and speed of the algorithm.

[0113] Specifically, first select the maximum value (CP) of the crossover probability (CP) and the mutation probability (MP) max and MP max ) and minimum value (CP min and MP min ); let Ra_Fitness i,j is the relative fitness value of the ith individual, Ra_Fitness maxand Ra_Fitness min are the maximum relative fitness value and the minimum relative fitness value in the population respectively; then, the crossover probability of the i-th individual is calculated as:

[0114]

[0115] Among them, ε is a very small real number to prevent the denominator from being zero; the mutation probability calculation method of the i-th individual is:

[0116]

[0117] Among them, set CP max =0.9, CP min =0.6, MP max =0.25, MP min = 0.06, suppose that after fast non-dominated sorting, the number of assigned levels is R, the population size is Size_pop, and the number of individuals in each level is f i (where i = 0, 1, ..., R-1); let the relative fitness value be Ra_Fitness 0,0 = Size_pop, then the relative fitness value Ra_Fitness of each individual in each level i,j (where j = 1, 2, ... (f i -1)) is calculated as follows:

[0118] Ra_Fitness i,j =Ra_Fitness i,(j-1) -Size_pop / R / f i +ε, (11)

[0119]

[0120] According to the order of i=0, 1, ..., R-1, the relative fitness value Ra_Fitness of each individual at each level is calculated in turn. i,j .

[0121] S3.10, perform selection, crossover and mutation operations to obtain a progeny population with a population size of N;

[0122] S3.11. Use the adversarial learning strategy to conduct adversarial learning on the offspring population to produce an opposite population;

[0123] S3.12, merge the offspring population with its opposite population after oppositional learning, and the population size is 2N;

[0124] S3.13. By decoding, calculate the maximum completion time and energy consumption cost of each individual.

[0125] S3.14, perform fast non-dominated sorting and crowding calculation on the merged population;

[0126] S3.15. Use tournament and elite selection strategies to select a new offspring population with a population size of N.

[0127] S3.16, merge the parent population and the offspring population, and the population size is 2N;

[0128] S3.17, perform fast non-dominated sorting and crowding calculation on the merged population;

[0129] S3.18. Use tournament and elite selection strategies to select a new parent population with a population size of N.

[0130] S3.19, determine whether the number of population iterations reaches the set value. If it does, end the program. If it does not, go to step S3.8.

[0131] S4. Execute optimal scheduling and monitor the execution status;

[0132] S5. If no dynamic event occurs, go to step S9, otherwise, go to step S6;

[0133] S6. Determine the time and type of the dynamic event and update the machine status;

[0134] During the execution of the initial optimal scheduling, the execution status should be monitored at all times. t ≠0 means that dynamic time occurs, and when t=0, it means that at T 0 When t = 1, it means that at T 1 An emergency order occurs at time TW, and TW represents the completion time of the emergency order; when t=2, it means that at T 2 The machine will resume operation when a fault occurs. 1 ,MS 2 ,...,MS m} indicates the status of the machine. If MS k =0 means machine M k Normal operation, if MS k =1 indicates machine M k A failure occurred.

[0135] S7, generating a rescheduling population according to the proposed rescheduling strategy;

[0136] The initial scheduling of the flexible job shop is a scheduling process that does not consider the interference of dynamic events. The workpiece and machine information of the entire workshop are known and will not change during the scheduling execution process. After a dynamic event occurs, the workshop must regenerate a scheduling plan and rearrange production in response to the dynamic event. The present invention considers three dynamic events: machine failure, emergency insertion, and resumption of operation of a faulty machine. When the dynamic event type is a machine failure, the process is divided into four categories according to the status of each process when the machine failure occurs: a completed process, a process being processed but not processed on the faulty machine, a process being processed by the faulty machine, and a process that has not yet started. When the dynamic event type is an emergency insertion and resumption of operation of a faulty machine, the process is divided into three categories according to the status of each process when the dynamic event occurs: a completed process, a process being processed, and a process that has not yet started. When a dynamic event occurs, each type of process is arranged according to the type of dynamic event, as shown in Table 4.

[0137] Table 4 Rescheduling strategies of the three types of processes when various dynamic events occur

[0138]

[0139] First, a rescheduling individual is generated according to the initial optimal schedule and the rescheduling strategy. Then, the processes that have been processed in the initial optimal schedule at the time when the dynamic event occurs are arranged according to the process arrangement in the initial optimal schedule and the corresponding machines, time and energy consumption to generate the same N individuals. The remaining processes that are being processed or have not been processed are arranged according to the rescheduling strategy, thereby generating a new rescheduling population.

[0140] S8. Use the rescheduling population generated in S7 as the initial population and go to step S3.

[0141] S9. The job is executed and the scheduling ends.

Claims

1. A flexible job shop dynamic event scheduling method based on improved NSGAII, characterized in that The following steps are involved: S1. Establish a flexible job shop production scheduling and control model that takes into account dynamic events such as machine failure, emergency order insertion, and recovery of failed machines. The maximum completion time, total machine load, and energy consumption cost of the job are used as the objective function of the flexible job shop production scheduling and control model. S2. Determine the scheduling constraints, including process constraints, machine constraints, time constraints, and total power upper limit constraints; S3, obtaining optimal scheduling based on improved NSGAII; the specific steps of step S3 are: S3.

1. Initialize the population. When the initial population is a non-rescheduled population, a two-segment encoding method is used to represent the chromosome information. The first segment is the process code OS, which is used to determine the processing order of the workpiece; the second segment is the machine code string MS, which is used to indicate the machine assigned to the process. A population with a population size of N is randomly generated. When the initial population is a rescheduled population, this step is omitted. S3.2, using the adversarial learning strategy to generate an opposite population; S3.3, merge the initial population with the population after its adversarial learning, and the population size is 2N; S3.4, randomly assign available machines to each process, and generate corresponding machine vectors, corresponding time vectors and energy consumption vectors; S3.5, by decoding, calculate the maximum completion time and energy consumption cost of each individual; S3.6, perform fast non-dominated sorting and crowding calculation on the merged population; S3.7, using tournament and elite selection strategies to select the parent population, the population size is N; S3.8, the number of population iterations increases by 1; S3.9, calculate adaptive crossover,mutation probability; S3.10, perform selection, crossover and mutation operations to obtain a progeny population with a population size of N; S3.

11. Use the adversarial learning strategy to conduct adversarial learning on the offspring population to produce an opposite population; S3.12, merge the offspring population with its opposite population after oppositional learning, and the population size is 2N; S3.13, by decoding, calculate the maximum completion time and energy consumption cost of each individual; S3.14, perform fast non-dominated sorting and crowding calculation on the merged population; S3.

15. Use tournament and elite selection strategies to select a new offspring population with a population size of N; S3.16, merge the parent population and the offspring population, and the population size is 2N; S3.17, perform fast non-dominated sorting and crowding calculation on the merged population; S3.

18. Use tournament and elite selection strategies to select a new parent population with a population size of N; S3.19, determine whether the number of population iterations reaches the set value, if it reaches the set value, end the program, if not, go to step S3.8; S4. Execute optimal scheduling and monitor the execution status; S5. If no dynamic event occurs, go to step S9; otherwise, go to step S6; S6. Determine the time and type of the dynamic event and update the machine status; S7, generating a rescheduling population according to the proposed rescheduling strategy; S8, taking the rescheduling population generated in S7 as the initial population, and going to step S3; S9. The job is executed and the scheduling ends.

2. According to the method for dynamic event scheduling of a flexible job shop based on improved NSGAII according to claim 1, it is characterized by: The specific steps of step S3.2 are: First, the opposite node of each node of an individual is calculated according to the open-loop greedy reverse algorithm, that is, when the node n of the individual i When is an odd number, its opposite node index is When the individual node n i When is an even number, its opposite node index is Then each individual in the population rearranges the process according to the opposite node of each node to generate opposing individuals, thereby generating a population after opposing learning.

3. The method for dynamic event scheduling of a flexible job shop based on improved NSGAII according to claim 1, characterized in that: The specific steps of step S3.5 are: When performing the active scheduling step in the fully active scheduling decoding process based on the fully active scheduling decoding mechanism, for each process, find out whether there is a time gap with the minimum start time that can be inserted before this process in the optional machines of this process, and make the current maximum completion time after the insertion less than the maximum completion time before the insertion; if the process is inserted forward, the process after this process should reselect the machine according to the current workpiece completion time and machine completion time according to the principle of minimizing the current maximum completion time, and re-perform semi-active scheduling; According to the decoded results, the machines selected for each process, and the corresponding processing time and energy consumption on the selected machines, the maximum completion time and energy consumption cost of the individual are calculated.

4. The method for dynamic event scheduling of a flexible job shop based on improved NSGAII according to claim 1 is characterized in that: The specific steps of step S3.9 are: First, select the maximum and minimum values ​​of the crossover probability and mutation probability; set Ra_Fitness i,j is the relative fitness value of the ith individual, Ra_Fitness max and Ra_Fitness min are the maximum relative fitness value and the minimum relative fitness value in the population respectively; then, the crossover probability of the i-th individual is calculated as: Among them, CP is the crossover probability, MP is the mutation probability, CP max and MP max are the maximum values ​​of crossover probability and mutation probability, CP min and MP min are the minimum values ​​of the crossover probability and mutation probability, respectively. ε is a very small real number to prevent the denominator from being zero. The mutation probability of the i-th individual is calculated as follows: Among them, set CP max =0.9, CP min =0.6, MP max =0.25, MP min = 0.06, suppose that after fast non-dominated sorting, the number of assigned levels is R, the population size is Size_pop, and the number of individuals in each level is f i (where i = 0, 1, ..., R-1); let the relative fitness value be Ra_Fitness 0,0 = Size_pop, then the relative fitness value Ra_Fitness of each individual in each level i,j (where j = 1, 2, ... (f i -1)) is calculated as follows: Ra_Fitness i,j =Ra_Fitness i,(j-1) -Size_pop / R / f i +ε, (3) According to the order of i=0, 1, ..., R-1, the relative fitness value Ra_Fitness of each individual at each level is calculated in turn. i,j .

5. The method for dynamic event scheduling of a flexible job shop based on improved NSGAII according to claim 1, characterized in that: The specific steps of step S7 are: When the dynamic event type is machine failure, the process is divided into four categories according to the status of each process when the machine failure occurs: completed process, process being processed but not processed on the faulty machine, process being processed by the faulty machine, and process not yet started; when the dynamic event type is emergency order insertion and faulty machine recovery, the process is divided into three categories according to the status of each process when the dynamic event occurs: completed process, process being processed, and process not yet started; (1) When a machine fails, the completed processes will no longer be rescheduled; the processes that are being processed but not on the failed machine will continue to be processed on the current machine according to the current process arrangement and will no longer be rescheduled; the processes that are being processed on the failed machine and the processes that have not yet started will be rescheduled, the processes will be reordered, and the machines will be reselected. The start time of these processes is greater than or equal to the time when the machine failure occurred; (2) When an emergency order is inserted, the completed processes will not be rescheduled; the processes being processed will continue to be processed on the current machine according to the current process arrangement and will not be rescheduled; the processes that have not yet started will be rescheduled, the processes will be reordered, and the machines will be reselected. The start time of these processes is greater than or equal to the end time of the emergency order insertion; (3) When the faulty machine resumes operation, the completed processes will no longer be rescheduled; the processes being processed will continue to be processed on the current machine according to the current process arrangement and will no longer be rescheduled; the processes that have not yet started will be rescheduled, the processes will be reordered, and the machines will be reselected. The start time of these processes is greater than or equal to the time when the faulty machine resumes operation.

Citation Information

Patent Citations

  • Method for solving shop energy-saving scheduling problem based on improved NSGA-II algorithm

    CN110543151A

  • Flexible job shop scheduling method and device under complex constraint based on INSGA-II

    CN113592319A