Proactive Scheduling for Job-Shop Based on Abnormal Event Monitoring of Workpieces and Remaining Useful Life Prediction of Tools in Wisdom Manufacturing Workshop

The job-shop scheduling is an important approach to manufacturing enterprises to improve response speed, reduce cost, and improve service. Proactive scheduling for job-shop based on abnormal event monitoring of workpieces and remaining useful life prediction of tools is proposed with radio frequency identification (RFID) and wireless accelerometer in this paper. Firstly, the perception environment of machining job is constructed, the mathematical model of job-shop scheduling is built, the framework of proactive scheduling is put forward, and the hybrid rescheduling strategy based on real-time events and predicted events is adopted. Then, the multi-objective, double-encoding, double-evolving, and double-decoding genetic algorithm (MD3GA) is used to reschedule. Finally, an actual prototype platform to machine job is built to verify the proposed scheduling method. It is shown that the proposed method solves the integration problem of dynamic scheduling and proactive scheduling of processing workpieces, reduces the waste of redundant time for the scheduling, and avoids the adverse impact on abnormal disturbances.


Introduction
As an important part of a manufacturing enterprise, the production workshop is the intersection of information flow and logistics in the production process. Production information includes processing data, production management, logistics information, production scheduling, human resources, and other heterogeneous information. The job-shop scheduling is an important method of manufacturing enterprises to improve response speed, reduce cost, and improve service. Nowadays, the manufacturing workshop is a complex system, and with the development of personalization and small batch production model, the traditional scheduling methods are no longer able to adapt to the new production model of personalized customization. The production plan is The rest of this paper is organized as follows: Section 2 reviews the literature of dynamic scheduling and proactive scheduling in machining, states the current problem of scheduling. Section 3 introduces the proactive scheduling scheme in detail. Section 4 builds an actual prototype platform for a machining job to verify the proposed scheduling method. Conclusions and suggestions for future work are given in Section 5.

Literature Review
The scheduling scheme is modified or rescheduled in the case of high dynamics and occurrence of abnormal events during the dynamic scheduling. The occurrence of abnormal events is predicted in advance based on real-time and historical data onto the production site during the proactive scheduling, so as to reallocate manufacturing system resources. The goal is to minimize the impact on disturbances on scheduling performance. At present, many scholars have conducted research on dynamic scheduling. For example, Zheng et al. proposed a dynamic scheduling method based on neuroendocrine regulation mechanism, which flexibly responds to uncertain disturbances in production workshop based on the principle of hormone regulation [2]. Based on genetic algorithm and tabu search algorithm, Zhang et al. solved the problem of arbitrary workpiece insertion and machine fault with the workshop [5]. Zakaria et al. solved the problem of new order insertion based on genetic algorithm; the rescheduling method matched the recombination and non-recombination strategies and adjusted new orders according to the idle time of the machine [6]. Vieira et al. proposed a new rescheduling system, which described rescheduling strategies and methods [7]. Umar et al. applied hybrid multi-objective genetic algorithm, aiming at optimizing the maximum completion time, traveling time of an automatic guided vehicle (AGV), and delay penalty, and the optimal scheme for scheduling and path selection was generated [8]. Dong et al. implemented integrated scheduling for processing machines and AGV with an improved genetic algorithm [9]. Using a heuristic algorithm and genetic algorithm, Rahman et al. solved the problem of order receiving in permutation flow-shop scheduling (PFS) [10]. Li et al. proposed a discrete optimization algorithm based on teaching learning (TL) to solve the problem of job-shop rescheduling, which embedded an improved iterative greedy local search algorithm to improve the searchability of teaching-learning algorithm [11]. Liu et al. proposed a multi-objective flexible dynamic scheduling algorithm based on adaptive genetic algorithm, which achieved the real-time scheduling function of machine fault, processing task changing, and periodic rescheduling based on a hybrid rescheduling strategy driven by events and cycles [12]. Li et al. designed a flexible job-shop scheduling method of uncertain environment, which can adapt to three kinds of The rest of this paper is organized as follows: Section 2 reviews the literature of dynamic scheduling and proactive scheduling in machining, states the current problem of scheduling. Section 3 introduces the proactive scheduling scheme in detail. Section 4 builds an actual prototype platform for a machining job to verify the proposed scheduling method. Conclusions and suggestions for future work are given in Section 5.

Literature Review
The scheduling scheme is modified or rescheduled in the case of high dynamics and occurrence of abnormal events during the dynamic scheduling. The occurrence of abnormal events is predicted in advance based on real-time and historical data onto the production site during the proactive scheduling, so as to reallocate manufacturing system resources. The goal is to minimize the impact on disturbances on scheduling performance. At present, many scholars have conducted research on dynamic scheduling. For example, Zheng et al. proposed a dynamic scheduling method based on neuroendocrine regulation mechanism, which flexibly responds to uncertain disturbances in production workshop based on the principle of hormone regulation [2]. Based on genetic algorithm and tabu search algorithm, Zhang et al. solved the problem of arbitrary workpiece insertion and machine fault with the workshop [5]. Zakaria et al. solved the problem of new order insertion based on genetic algorithm; the rescheduling method matched the recombination and non-recombination strategies and adjusted new orders according to the idle time of the machine [6]. Vieira et al. proposed a new rescheduling system, which described rescheduling strategies and methods [7]. Umar et al. applied hybrid multi-objective genetic algorithm, aiming at optimizing the maximum completion time, traveling time of an automatic guided vehicle (AGV), and delay penalty, and the optimal scheme for scheduling and path selection was generated [8]. Dong et al. implemented integrated scheduling for processing machines and AGV with an improved genetic algorithm [9]. Using a heuristic algorithm and genetic algorithm, Rahman et al. solved the problem of order receiving in permutation flow-shop scheduling (PFS) [10]. Li et al. proposed a discrete optimization algorithm based on teaching learning (TL) to solve the problem of job-shop rescheduling, which embedded an improved iterative greedy local search algorithm to improve the searchability of teaching-learning algorithm [11]. Liu et al. proposed a multi-objective flexible dynamic scheduling algorithm based on adaptive genetic algorithm, which achieved the real-time scheduling function of machine fault, processing task changing, and periodic rescheduling based on a hybrid rescheduling strategy driven by events and cycles [12]. Li  designed a flexible job-shop scheduling method of uncertain environment, which can adapt to three kinds of disturbances such as order transaction, operation delay, and machine fault [13]. Setiawan et al. developed a scheduling algorithm for a flexible manufacturing system, which takes into account the factors of tool fault and tool life [14]. Rokni et al. adopted the Pareto-optimality concept combined with fuzzy set theory to optimize the pipe spool fabrication shop scheduling [15]. Taghaddos et al. proposed the simulation-based auction protocol (SBAP) to realize the effective allocation of resources and satisfaction of various constraints [16]. In terms of proactive scheduling, Wang et al. proposed a knowledge-based proactive scheduling method, which applies the multi-objective evolutionary algorithm of elite non-dominant sorting to solve the problems of machine failure and degradation [17]. Rahmani provided a proactive-reactive approach to a two-machine flow shop system, considering uncertain processing time and unexpected machine failure [18]. Cui et al. dealt with the integration of production scheduling and maintenance planning through optimizing the bi-objective of quality robustness and solution robustness for flow shops [19].
Most research on production scheduling focuses on isolated scheduling schemes, and the scheduling optimization algorithms mostly adopt a heuristic algorithm or a hybrid intelligent algorithm. The occurrence of disturbances is assumed randomly, and scheduling schemes for different disturbances are obtained through abstract simplification, which are not verified in actual production workshop. However, in the actual environment of manufacturing, the disturbances often occur randomly, and it is not just a scheduling scheme to deal with abnormal events. Different scheduling schemes need to be adopted according to the real-time monitoring in the manufacturing workshop and the disturbances predicted through the monitored data. Based on the wisdom manufacturing mode, which is put forward, the abnormal events are monitored by RFID in the bottom layer of a physical production system and a wireless accelerometer is used to monitor tool vibration and predict tool life. This paper focuses on the proactive scheduling scheme for job-shop based on abnormal event monitoring of workpieces and remaining useful life prediction of tools, which contains dynamic scheduling to respond to abnormal conditions in real-time and proactive scheduling driven by predicted events, and the real job-shop experiment platform is built to validate the scheme.

Proactive Scheduling Scheme
In this section, the perception environment of a machining job is constructed, the mathematical model of job-shop scheduling is built, the framework of proactive scheduling is put forward, the scheduling strategy is discussed, and finally, the multi-objective, double-encoding, double-evolving, and double-decoding genetic algorithm (MD3GA) is introduced in detail.

Perceptual Environment Construction
Machining situations of workpieces and abnormal disturbances need to be perceived in time during the machining process of workpieces, and the impending disturbances are predicted. A perceived environment of machining job is built as shown in Figure 2. The entire production workshop is covered by the network (e.g., local area network (LAN), wireless fidelity (WiFi), blue tooth, etc.) in this environment; the production workshop consists of a dispatching center, raw material and product warehouse (N rpw ), AGV, numerical control (NC) machine tool (N ncmx ), etc. Directional ultra-high-frequency (UHF) readers equipped with LAN (WiFi) are installed on each workstation and anti-metal ceramic RFID tags are pasted on every workpiece. Raw materials or semi-finished products are distributed to the processing stations by AGV and the whole process from raw material to product is monitored. Each workstation is equipped with RFID sensing nodes, which sense identification (ID) number, time, location, and other data of arrived workpieces in real time; the abnormal disturbance events are mined in real time using complex event processing (CEP) technology [20], and formed the real-time state matrix S = (α ij ) (1 ≤ i ≤ m, 1 ≤ j ≤ 4).
where i is the serial number of the workpiece and j is the serial number of the workstation; if α ij is equal to 1, the processing situation of the workpiece is normal; if α ij is equal to 0, the processing situation of the workpiece is abnormal.
where i is the serial number of the workpiece and j is the serial number of the workstation; if αij is equal to 1, the processing situation of the workpiece is normal; if αij is equal to 0, the processing situation of the workpiece is abnormal. Wireless triaxial accelerometers are adopted to monitor vibration signal of tools for the machining process of workpieces and implement remaining useful life prediction. For example, the workpiece is machined by milling machine (model: Xendoll Tech C000017); the milling cutter adopts double-edged cutter of micro particles and tungsten carbide (model: Seco S550, diameter: 6 mm); a wireless triaxial accelerometer (model: M69) is used to measure the vibration of milling process; and the matching wireless base station (model: M90) is used to regulate the vibration signal and transmit to the dispatching center. The sampling frequency of the triaxial accelerometer is 1 kHz/channel, and a portable digital microscope (model: MSUSB401) is used to measure tool wear after milling. The vibration data collected are input into the neural fuzzy network (NFN) after de-noising, feature extraction, and feature selection [21], and aim to realize the prediction of tool remaining useful life. The remaining useful life of each machine tool forms a life status matrix W. Wireless triaxial accelerometers are adopted to monitor vibration signal of tools for the machining process of workpieces and implement remaining useful life prediction. For example, the workpiece is machined by milling machine (model: Xendoll Tech C000017); the milling cutter adopts double-edged cutter of micro particles and tungsten carbide (model: Seco S550, diameter: 6 mm); a wireless triaxial accelerometer (model: M69) is used to measure the vibration of milling process; and the matching wireless base station (model: M90) is used to regulate the vibration signal and transmit to the dispatching center. The sampling frequency of the triaxial accelerometer is 1 kHz/channel, and a portable digital microscope (model: MSUSB401) is used to measure tool wear after milling. The vibration data collected are input into the neural fuzzy network (NFN) after de-noising, feature extraction, and feature selection [21], and aim to realize the prediction of tool remaining useful life. The remaining useful life of each machine tool forms a life status matrix W. where w1 is the tool remaining useful life of the first machine tool (here expressed by the number of workpieces that the tool can also machine), and so on.

Proactive Scheduling Mathematical Model
The scheduling problem of wisdom manufacturing workshop is described as n workpieces {J 1 , J 2 , . . . , J n } that are machined in m machines {M 1 , M 2 , . . . , M m }; each workpiece is machined with h processes and each process can be machined by any one of multiple machine tools; the processing path of h process for n workpieces may be different. O ij represents the processing operation of the j th process for the i th workpiece, and T ij represents the processing time of the j th process for the i th workpiece. Then, the completion time of the i th workpiece is: When the initial scheduling scheme is affected by real-time and predicted disturbance events, the initial scheduling scheme is slightly modified to form the proactive scheduling (dynamic scheduling) scheme. The performance robustness measure of the scheduling scheme is: where C p max is the processing completion time of the workpiece in the proactive scheduling (dynamic scheduling) scheme and C b max is the processing completion time of the workpiece in the initial scheduling scheme.
The stability robustness measure of the initial scheduling scheme is: where C p ij is the processing completion time of the j th process of the i th workpiece in the proactive scheduling (dynamic scheduling) scheme and C b ij is the processing completion time of the j th process for the i th workpiece in the initial scheduling scheme.
When real-time and predicted events affect the initial scheduling scheme, the corresponding proactive scheduling (dynamic scheduling) scheme is formed, aiming to minimize the impact of disturbance events on the initial scheduling scheme. The robustness measure of the scheduling scheme is expressed as: The constraints on the scheduling problem are as follows: 1.
The processing path of each workpiece may be different; 2.
At each moment, each machine tool can only be used to machine one process, and the process is not allowed to be interrupted; each machine tool is equipped with input/output buffer; 3.
Only one machine tool can be selected for each process; 4.
The processing time of each process has been determined; 5.
A workpiece cannot be processed on different machine tools at the same time; 6.
The preparation time of the process is ignored, or contained in the processing time; 7.
In case of real-time disturbance or predicted event, the machining process without impact will continue to machine until the process is completed.

Proactive Scheduling Framework
The proactive scheduling framework of machining jobs is shown in Figure 3, which contains a dynamic scheduling scheme. The disturbance is inevitable during the manufacturing process; when the abnormal disturbance occurs in the manufacturing workshop, the disturbance type (such as buffer blocking, etc.) is judged at first, and then the affected workpieces, processes, and machines are determined and the scheduling parameters are updated to generate a new dynamic scheduling scheme; at this time, the scheduling scheme is executed. In order to avoid the waste of redundant time in the scheduling and reduce the loss (sometimes serious) of the manufacturing system caused by abnormal disturbance, before the abnormal disturbances occur, the possible disturbances (such as exhausted tool life, etc.) in the future are predicted according to the real-time data and historical data during the machining and necessary preventive maintenance measures (such as replacement of tools, etc.) are taken to avoid the occurrence of disturbance. Then, the affected workpieces and processes are determined and the scheduling parameters are updated to generate a new proactive scheduling scheme. The goal of proactive scheduling is to minimize the impact on the initial (previous) scheduling scheme caused by abnormal disturbances [22]. buffer blocking, etc.) is judged at first, and then the affected workpieces, processes, and machines are determined and the scheduling parameters are updated to generate a new dynamic scheduling scheme; at this time, the scheduling scheme is executed. In order to avoid the waste of redundant time in the scheduling and reduce the loss (sometimes serious) of the manufacturing system caused by abnormal disturbance, before the abnormal disturbances occur, the possible disturbances (such as exhausted tool life, etc.) in the future are predicted according to the real-time data and historical data during the machining and necessary preventive maintenance measures (such as replacement of tools, etc.) are taken to avoid the occurrence of disturbance. Then, the affected workpieces and processes are determined and the scheduling parameters are updated to generate a new proactive scheduling scheme. The goal of proactive scheduling is to minimize the impact on the initial (previous) scheduling scheme caused by abnormal disturbances [22].

Proactive Scheduling Strategy
Rolling window is an important method to solve the problem of scheduling [23]. For dynamic scheduling, the uncertain scheduling problem is decomposed into a series of dynamic but certain problems, and the dynamic scheduling process is decomposed into a series of continuous and static scheduling intervals; then, each scheduling interval is optimized by the scheduling algorithm and the system is optimal at each scheduling interval. The main idea of rolling window is that a workpiece window is adopted to realize a rolling scheduling, some workpieces are selected to add to the workpiece window in the initial scheduling, and the optimization algorithm is adopted to optimize and generate the initial scheduling scheme. When the disturbances occur in the machining process, the initial scheduling scheme is no longer adapted to the environment; then, the dynamic scheduling scheme restarts, the completed workpieces are removed from the workpiece window in the dynamic scheduling, the workpieces waiting for machining are added to the workpiece window, the workpieces in current window are optimized again, and the process is repeated until all workpieces are finished to machine.
Rolling scheduling strategy contains a rescheduling mechanism and a workpiece window. The rescheduling mechanism contains period-driven rescheduling, event-driven rescheduling, and period-event-driven rescheduling. Rescheduling is executed at the interval of the production cycle in period-driven rescheduling, and this mechanism can better maintain the stability of workshop production. Event-driven rescheduling means that when a real-time disturbance event occurs to the system, the rescheduling starts immediately; this mechanism can well respond to real-time events. Period-event-driven rescheduling integrates the advantages of the above two mechanisms, which can not only respond to the disturbance events in the manufacturing workshop well, but also maintain stable production. However, none of the three methods have the ability to predict future disturbance events.
Proactive scheduling adopts event-driven rescheduling based on predicted disturbances, the disturbance events (such as tool life exhausted event, etc.) are predicted according to real-time data and historical data collected in the manufacturing workshop before the disturbance events occur; some measures (such as replacing the tool) are implemented in advance. In this paper, aiming at real-time disturbance events detected by RFID and tool remaining useful life events detected and predicted by a wireless accelerometer, rescheduling based on real-time events and predicted events is adopted to realize the fusion of dynamic scheduling and proactive scheduling in the machining workshop.
A workpiece window needs to be defined in the rolling scheduling strategy; at the time of rescheduling, only the workpieces in the workpiece window at that time are scheduled. The diagram of the workpiece window for rolling scheduling is shown in Figure 4. The workpieces in the window are divided into a completed workpiece set, processing workpiece set, unprocessed workpiece set, and waiting workpiece set. The unprocessed workpiece set refers to the workpieces that have been scheduled and not been machined; the waiting workpiece set refers to the workpieces that have not been scheduled and are waiting to be scheduled. At the time of rescheduling in the rolling scheduling strategy, it is only necessary to remove the completed workpiece set from the current workpiece window, and then add the waiting workpiece set. Finally, the workpieces in the workpiece window are scheduled by the corresponding optimization algorithm.

Proactive Scheduling Algorithm
Genetic algorithm is rooted in the mechanisms of evolution and natural genetics [24]. Individuals best suited to competition for scanty resources survive, it is essential for the survival of individuals to adapt to a changing environment. The various features that uniquely characterize an individual determine its survival capacity; the features, in turn, are determined by the individual's genetic content. It presumes that the potential solution of a problem is an individual and can be represented by a set of features. Each feature is controlled by a basic unit called a gene. The sets of genes controlling features form the chromosomes. Competition among individuals for scant resources such as food and space and for mates results in the fittest individuals dominating over weaker ones [25]. The fittest individuals survive and reproduce, a natural phenomenon called "the survival of the fittest." New combinations of genes are generated from patents through crossover, and mutation causes sporadic and random alteration of the bits of strings. Throughout a genetic evolution, the fittest chromosome has the tendency to yield good-quality offspring, which means a better solution to the problem. The genetic algorithm has a stronger ability to solve nonlinear optimization problem, where each chromosome is used to represent an optimal solution to a problem; a chromosome can easily express a potential solution to a simple problem, but it is difficult to accurately express complex problem solutions (such as the machining process of a workpiece and machine encoding) at the same time, in order to solve the integrated scheduling problem of the machines and AGV and deal with the impact of the real-time and predicted disturbance events for the initial scheduling scheme. In this paper, an improved multi-objective, double-encoding, double-evolving, and double-decoding genetic algorithm (MD3GA) is adopted. The flowchart is shown in Figure 5. The double-encoding method divides each chromosome code into two layers (process code and machine code), which uses one chromosome to express the solution to a complex problem accurately. The chromosome is evolved by double-evolving method, and in the first evolution, the minimum completion time is the target to form the initial scheduling scheme, and the minimum completion time and robustness measure (weight sum) is the target in the second evolution to form the proactive scheduling scheme considering disturbance events. The decoding adopts a double-decoding method. In the first decoding, the processing order, processing machine, start processing time, and end time of the workpiece without considering the AGV distribution time are obtained. The second decoding takes into account the AGV distribution time to obtain the specific processing time (including distribution time) of each process.

Proactive Scheduling Algorithm
Genetic algorithm is rooted in the mechanisms of evolution and natural genetics [24]. Individuals best suited to competition for scanty resources survive, it is essential for the survival of individuals to adapt to a changing environment. The various features that uniquely characterize an individual determine its survival capacity; the features, in turn, are determined by the individual's genetic content. It presumes that the potential solution of a problem is an individual and can be represented by a set of features. Each feature is controlled by a basic unit called a gene. The sets of genes controlling features form the chromosomes. Competition among individuals for scant resources such as food and space and for mates results in the fittest individuals dominating over weaker ones [25]. The fittest individuals survive and reproduce, a natural phenomenon called "the survival of the fittest." New combinations of genes are generated from patents through crossover, and mutation causes sporadic and random alteration of the bits of strings. Throughout a genetic evolution, the fittest chromosome has the tendency to yield good-quality offspring, which means a better solution to the problem. The genetic algorithm has a stronger ability to solve nonlinear optimization problem, where each chromosome is used to represent an optimal solution to a problem; a chromosome can easily express a potential solution to a simple problem, but it is difficult to accurately express complex problem solutions (such as the machining process of a workpiece and machine encoding) at the same time, in order to solve the integrated scheduling problem of the machines and AGV and deal with the impact of the real-time and predicted disturbance events for the initial scheduling scheme. In this paper, an improved multi-objective, double-encoding, double-evolving, and double-decoding genetic algorithm (MD3GA) is adopted. The flowchart is shown in Figure 5. The double-encoding method divides each chromosome code into two layers (process code and machine code), which uses one chromosome to express the solution to a complex problem accurately. The chromosome is evolved by double-evolving method, and in the first evolution, the minimum completion time is the target to form the initial scheduling scheme, and the minimum completion time and robustness measure (weight sum) is the target in the second evolution to form the proactive scheduling scheme considering disturbance events. The decoding adopts a double-decoding method. In the first decoding, the processing order, processing machine, start processing time, and end time of the workpiece without considering the AGV distribution time are obtained. The second decoding takes into account the AGV distribution time to obtain the specific processing time (including distribution time) of each process.

Double-Encoding
It is fundamental to the genetic algorithm that the optimization problem's variables are represented by the encoding mechanism, and the encoding mechanism depends on the nature of the problem variables. Many optimization problems have real-valued continuous variables. As a way of chromosome encoding, integer encoding is used to represent the machining process of the workpiece and machine assignment information on each process at the same time. A chromosome is encoded by double-encoding method; the first layer is the process code of the machining workpiece, namely the process code, and the second layer is the machine code based on the available machine selection for each process, known as machine code. The total number of machining workpieces are n, the process amount of each workpiece is h, and the encoding length of each chromosome is 2*n*h, where the first n*h bits of the chromosome represents the processing sequence of all workpieces on the machines and the last n*h bits represents the processing machine number selected by each process of the workpiece. The processing sequence of six workpieces on

Double-Encoding
It is fundamental to the genetic algorithm that the optimization problem's variables are represented by the encoding mechanism, and the encoding mechanism depends on the nature of the problem variables. Many optimization problems have real-valued continuous variables. As a way of chromosome encoding, integer encoding is used to represent the machining process of the workpiece and machine assignment information on each process at the same time. A chromosome is encoded by double-encoding method; the first layer is the process code of the machining workpiece, namely the process code, and the second layer is the machine code based on the available machine selection for each process, known as machine code. The total number of machining workpieces are n, the process amount of each workpiece is h, and the encoding length of each chromosome is 2 * n * h, where the first n * h bits of the chromosome represents the processing sequence of all workpieces on the machines and the last n * h bits represents the processing machine number selected by each process of the workpiece. The processing sequence of six workpieces on four machines is expressed by the chromosome in Figure 6; every workpiece is machined from three processes and each process is performed on a machine selected from a different number of machines. Eighteen processes of six workpieces are in the first part of the chromosome and the machine serial number of every process is in the second half part; for example, the first process of the sixth workpiece is machined in the first (M 2 ) optional machine and the second process is machined on the first (M 1 ) optional machine. four machines is expressed by the chromosome in Figure 6; every workpiece is machined from three processes and each process is performed on a machine selected from a different number of machines. Eighteen processes of six workpieces are in the first part of the chromosome and the machine serial number of every process is in the second half part; for example, the first process of the sixth workpiece is machined in the first (M2) optional machine and the second process is machined on the first (M1) optional machine.

Fitness Function Calculation
The objective function provides the mechanism for evaluating each chromosome, and the fitness function is used to represent the fitness of an individual chromosome. In this paper, double-evolving method is adopted to correspond to different fitness functions of each level. The fitness function of the first-level evolutionary chromosome is the completion time of the workpiece, and its target is to minimize the maximum completion time, namely: where Ci is the completion time of the i th workpiece (i = 1, 2, …, n). In order to calculate the individual fitness function, the chromosome needs to be completely reduced into machining sequence and machine serial number of each process for the workpiece. When calculating the completion time of the j th process for the i th workpiece, by comparing the start time of this process and the end time of the (j − 1) th process, the greater of two time values is used for the start time of this process, and then combined with the processing time of this process to obtain the completion time of the j th process for the i th workpiece. The fitness function of the second-level evolutionary chromosome is the completion time of the workpiece and the robustness (weight sum) of scheduling scheme, and the objective function is: where w is the weight factor of the completion time of the workpiece and the robustness measure of scheduling scheme.

Selection Operation
Selection simulates nature's survival-of-fittest mechanism, where the fitter solutions survive while the weaker ones perish. The fitter chromosome receives a higher number of offspring and has a higher chance of surviving in the subsequent generation. The selection operation adopts roulette wheel selection scheme, and the chromosomes with the stronger fitness are selected to participate in the subsequent genetic operation according to the probability. The calculation of individual probability Fi is determined by the fitness function, and the expression is:

Fitness Function Calculation
The objective function provides the mechanism for evaluating each chromosome, and the fitness function is used to represent the fitness of an individual chromosome. In this paper, double-evolving method is adopted to correspond to different fitness functions of each level. The fitness function of the first-level evolutionary chromosome is the completion time of the workpiece, and its target is to minimize the maximum completion time, namely: where C i is the completion time of the i th workpiece (i = 1, 2, . . . , n). In order to calculate the individual fitness function, the chromosome needs to be completely reduced into machining sequence and machine serial number of each process for the workpiece. When calculating the completion time of the j th process for the i th workpiece, by comparing the start time of this process and the end time of the (j − 1) th process, the greater of two time values is used for the start time of this process, and then combined with the processing time of this process to obtain the completion time of the j th process for the i th workpiece. The fitness function of the second-level evolutionary chromosome is the completion time of the workpiece and the robustness (weight sum) of scheduling scheme, and the objective function is: where w is the weight factor of the completion time of the workpiece and the robustness measure of scheduling scheme.

Selection Operation
Selection simulates nature's survival-of-fittest mechanism, where the fitter solutions survive while the weaker ones perish. The fitter chromosome receives a higher number of offspring and has a higher chance of surviving in the subsequent generation. The selection operation adopts roulette wheel selection scheme, and the chromosomes with the stronger fitness are selected to participate in the subsequent genetic operation according to the probability. The calculation of individual probability F i is determined by the fitness function, and the expression is: where i = 1, 2, correspond to fitness functions of level 1 and level 2, respectively. The population size is set as popsize, and the probability of this individual being selected is:

Crossover Operation
After the selection is completed, crossover is a crucial operation in genetic algorithm. A new chromosome is generated by crossover operation for population, which promotes the population to evolve; the integer crossover method is used in crossover operation and the specific method is as follows: The two chromosomes randomly selected from the population are taken out the first n * h bits of each chromosome, then the crossover positions randomly selected from two chromosomes are carried on the crossover; two chromosomes swap genes before and after the intersection in the first layer, the chromosome after crossing is locally adjusted, and the adjustment principle is as follows: The count of workpieces and the count of processes represented by the chromosome correspond to the constraint conditions of the scheduling problem. The chromosomal crossover operation is shown in Figure 7; the process genes of two parent chromosomes are crossed in the fourth position, the processes of some workpieces are superfluous (the first offspring: The fourth workpiece, the second offspring: The first and second workpiece), and the processes of some workpieces are missing (the first offspring: The first and second workpiece, the second offspring: The fourth workpiece); at this point, the superfluous operations of the processes are adjusted to the missing operation and the machines from the (n * h + 1) th bit to the (2 * n * h) th bit are adjusted according to the serial number of machines before the crossover (the number of machine processed the third process for the first workpiece is 1, and the number of machine processed the third process for the second workpiece is 3). where i = 1, 2, correspond to fitness functions of level 1 and level 2, respectively. The population size is set as popsize, and the probability of this individual being selected is:

Crossover Operation
After the selection is completed, crossover is a crucial operation in genetic algorithm. A new chromosome is generated by crossover operation for population, which promotes the population to evolve; the integer crossover method is used in crossover operation and the specific method is as follows: The two chromosomes randomly selected from the population are taken out the first n*h bits of each chromosome, then the crossover positions randomly selected from two chromosomes are carried on the crossover; two chromosomes swap genes before and after the intersection in the first layer, the chromosome after crossing is locally adjusted, and the adjustment principle is as follows: The count of workpieces and the count of processes represented by the chromosome correspond to the constraint conditions of the scheduling problem. The chromosomal crossover operation is shown in Figure 7; the process genes of two parent chromosomes are crossed in the fourth position, the processes of some workpieces are superfluous (the first offspring: The fourth workpiece, the second offspring: The first and second workpiece), and the processes of some workpieces are missing (the first offspring: The first and second workpiece, the second offspring: The fourth workpiece); at this point, the superfluous operations of the processes are adjusted to the missing operation and the machines from the (n*h + 1) th bit to the (2*n*h) th bit are adjusted according to the serial number of machines before the crossover (the number of machine processed the third process for the first workpiece is 1, and the number of machine processed the third process for the second workpiece is 3).

Mutation Operation
Mutation is performed after crossover and a new chromosome can be generated through population mutation, which also promotes the whole population to evolve; the specific operation method is as follows: A mutation chromosome is selected randomly from the population, and then the mutation positions (p1 and p2) are selected; finally, the process and the corresponding machine serial number of p1 and p2 are interchanged in the mutation chromosome. The mutation operation is shown in Figure 8; the third and fifth positions of process code are interchanged in individual

Mutation Operation
Mutation is performed after crossover and a new chromosome can be generated through population mutation, which also promotes the whole population to evolve; the specific operation method is as follows: A mutation chromosome is selected randomly from the population, and then the mutation positions (p 1 and p 2 ) are selected; finally, the process and the corresponding machine serial number of p 1 and p 2 are interchanged in the mutation chromosome. The mutation operation is shown in Figure 8; the third and fifth positions of process code are interchanged in individual mutation, and the corresponding machine code are interchanged to get a new mutation chromosome.

Double-Evolving
Double-evolving means that the evolution process of chromosomes is divided into two stages. In the first stage, the disturbance events are not considered, and the initial scheduling scheme is formed into the goal of the minimum completion time of the workpieces. In the second stage, the disturbance events are considered, the chromosome individuals formed by the evolution of the first stage are used as the initial population, and the proactive scheduling scheme is formed with the goal that the disturbance events cause the least influence (the completion time of the workpiece and the robustness measure are the least) on the initial scheduling scheme. Double-evolving aims to improve the anti-interference ability of the scheduling scheme.
Double-evolving is demonstrated by a later example in this paper. For example, six workpieces need be machined and there are three processes for each workpiece; the optional machines for each process and the processing time for every process corresponding to machines are shown in the later example. For different weight factor w, the different performance of the scheduling algorithm is analyzed and the result is shown in Table 1; the evolution curve of MD3GA under different weight factors is shown in Figure 9.

Double-Evolving
Double-evolving means that the evolution process of chromosomes is divided into two stages. In the first stage, the disturbance events are not considered, and the initial scheduling scheme is formed into the goal of the minimum completion time of the workpieces. In the second stage, the disturbance events are considered, the chromosome individuals formed by the evolution of the first stage are used as the initial population, and the proactive scheduling scheme is formed with the goal that the disturbance events cause the least influence (the completion time of the workpiece and the robustness measure are the least) on the initial scheduling scheme. Double-evolving aims to improve the anti-interference ability of the scheduling scheme.
Double-evolving is demonstrated by a later example in this paper. For example, six workpieces need be machined and there are three processes for each workpiece; the optional machines for each process and the processing time for every process corresponding to machines are shown in the later example. For different weight factor w, the different performance of the scheduling algorithm is analyzed and the result is shown in Table 1; the evolution curve of MD3GA under different weight factors is shown in Figure 9.  From Table 1 and Figure 9, when the weight factor w is given different values, the evolution target function value of the first stage (f1) remains unchanged in the initial scheduling scheme. When w = 0, the completion time of workpieces is not considered in the second-stage evolution, only the robustness measure of the scheduling scheme is considered, and at this moment, the target function value (f2 = 13.03) is minimum. When w = 1, the robustness measure of scheduling scheme is not considered in the second-stage evolution, only the completion time of the workpieces is considered, and at this moment, the target function value (f2 = 81) is maximum and the target function value (f2) increases linearly with the increase of w. Multi-object characteristics and execution performance of MD3GA are considered synthetically; w = 0.7 is selected in the following example.

Double-Decoding
The initial sequence of the workpieces' distribution is determined by the optimal chromosome gene, which is not the machining sequence of workpieces; the start time of the machining workpiece in the front gene may be later than the start time of the workpieces in the back gene. In order to solve the integrated scheduling problem of machines and single AGV, based on the strategy of first-processing and first-distributing, the double-decoding method is adopted to improve the genetic algorithm; the flow chart is shown in Figure 10. The running time of the distributing workpiece by AGV is not considered in the first decoding, and the processing sequence and machine number of each workpiece are acquired, as well as the start time and end time of machining; then, the chromosome gene is arranged in ascending order based on the start time of each process to ensure that the workpiece machined first is distributed first by AGV, and the processing sequence is not changed. The processing sequence, processing time, and distribution time are considered synthetically according to the sorted chromosomes in the second decoding; including the distribution time, the start time and end time of machining are obtained to realize the integrated scheduling of the machines and singe AGV. From Table 1 and Figure 9, when the weight factor w is given different values, the evolution target function value of the first stage (f 1 ) remains unchanged in the initial scheduling scheme. When w = 0, the completion time of workpieces is not considered in the second-stage evolution, only the robustness measure of the scheduling scheme is considered, and at this moment, the target function value (f 2 = 13.03) is minimum. When w = 1, the robustness measure of scheduling scheme is not considered in the second-stage evolution, only the completion time of the workpieces is considered, and at this moment, the target function value (f 2 = 81) is maximum and the target function value (f 2 ) increases linearly with the increase of w. Multi-object characteristics and execution performance of MD3GA are considered synthetically; w = 0.7 is selected in the following example.

Double-Decoding
The initial sequence of the workpieces' distribution is determined by the optimal chromosome gene, which is not the machining sequence of workpieces; the start time of the machining workpiece in the front gene may be later than the start time of the workpieces in the back gene. In order to solve the integrated scheduling problem of machines and single AGV, based on the strategy of first-processing and first-distributing, the double-decoding method is adopted to improve the genetic algorithm; the flow chart is shown in Figure 10. The running time of the distributing workpiece by AGV is not considered in the first decoding, and the processing sequence and machine number of each workpiece are acquired, as well as the start time and end time of machining; then, the chromosome gene is arranged in ascending order based on the start time of each process to ensure that the workpiece machined first is distributed first by AGV, and the processing sequence is not changed. The processing sequence, processing time, and distribution time are considered synthetically according to the sorted chromosomes in the second decoding; including the distribution time, the start time and end time of machining are obtained to realize the integrated scheduling of the machines and singe AGV. All the raw materials are stored in the raw material warehouse in the second decoding, and single AGV can only take one raw material (semi-finished workpiece) to distribute every time. Before the first process of each workpiece is machined, the raw material is taken from the raw material warehouse and distributed over the corresponding machine. When the machining process is not the first process of the workpiece, the semi-finished workpiece is taken at the machine buffer of machining the previous process by AGV, and judging whether the previous process is completed, if the previous process is not completed yet, it waits to complete the process, then the semi-finished workpiece is distributed over the current machine; judging whether the previous process is completed at the current machine, if the previous process is not completed, it waits for the previous process of the current machine to be completed, and then starts the current process. Each process of All the raw materials are stored in the raw material warehouse in the second decoding, and single AGV can only take one raw material (semi-finished workpiece) to distribute every time. Before the first process of each workpiece is machined, the raw material is taken from the raw material warehouse and distributed over the corresponding machine. When the machining process is not the first process of the workpiece, the semi-finished workpiece is taken at the machine buffer of machining the previous process by AGV, and judging whether the previous process is completed, if the previous process is not completed yet, it waits to complete the process, then the semi-finished workpiece is distributed over the current machine; judging whether the previous process is completed at the current machine, if the previous process is not completed, it waits for the previous process of the current machine to be completed, and then starts the current process. Each process of all workpieces is executed in accordance with this procedure until all processes are completed, forming the specific start and end time of each process of every workpiece including AGV distribution time.
The double-decoding method is explained by the latter example in this paper. The chromosome obtained from the first decoding is sorted through ascending order according to the start processing time of the workpiece using MD3GA; the sorted chromosome is shown in Figure 11. The final time list of integrated scheduling for machines and single AGV by double-decoding is shown in Table 2, where O ij is the process for workpiece machining; start indicates the start machining time of the workpiece; end is the end time for workpiece machining; T W is a time sum, which contains the waiting time for the machine processing the previous process (the previous process is not yet completed) and the waiting time for the machine processing the current process (the previous process machined at the current machine is not yet completed); and T D is the time for distributing materials (semi-finished products) to the machines (including T W ). The contents listed in the table are as follows: The processes of machining workpiece obtained from the first decoding, the process sorted through ascending order according to the start processing time, the process obtained from the second decoding including the AGV distribution time, the start processing time and the end time, and the distribution time of raw materials (semi-finished products). For example, the process (O 13 ) is machined in machine (M 3 ); when the semi-finished product of the first workpiece is distributed from M 4 to M 3 , the previous process (O 23 ) machined in M 3 has not been completed. AGV needs to wait for 5 s in M 3 , and then O 13 begins to be machined in M 3 . all workpieces is executed in accordance with this procedure until all processes are completed, forming the specific start and end time of each process of every workpiece including AGV distribution time.
The double-decoding method is explained by the latter example in this paper. The chromosome obtained from the first decoding is sorted through ascending order according to the start processing time of the workpiece using MD3GA; the sorted chromosome is shown in Figure 11. The final time list of integrated scheduling for machines and single AGV by double-decoding is shown in Table 2, where Oij is the process for workpiece machining; start indicates the start machining time of the workpiece; end is the end time for workpiece machining; TW is a time sum, which contains the waiting time for the machine processing the previous process (the previous process is not yet completed) and the waiting time for the machine processing the current process (the previous process machined at the current machine is not yet completed); and TD is the time for distributing materials (semi-finished products) to the machines (including TW). The contents listed in the table are as follows: The processes of machining workpiece obtained from the first decoding, the process sorted through ascending order according to the start processing time, the process obtained from the second decoding including the AGV distribution time, the start processing time and the end time, and the distribution time of raw materials (semi-finished products). For example, the process (O13) is machined in machine (M3); when the semi-finished product of the first workpiece is distributed from M4 to M3, the previous process (O23) machined in M3 has not been completed. AGV needs to wait for 5 s in M3, and then O13 begins to be machined in M3. Figure 11. An ascending sort of a chromosome according to start processing time.

Experimental Results and Analysis
In this section, the proactive scheduling algorithm is verified by experiment, and three key points are illustrated: (1) A real machining prototype platform is constructed; (2) system validation parameters are set; and (3) proactive scheduling is executed and results are analyzed.

Machining Prototype Platform
A machining prototype platform is built, which is shown in Figure 12; this platform contains four machine tools (equipped with input/output buffer), which can perform three different machining processes; an AGV equipped with mechanical arm distributes raw materials from the raw material storehouse to the machine or distributes semi-finished workpiece from the previous machine to the current machine; and only one raw material (semi-finished product) can be carried

Experimental Results and Analysis
In this section, the proactive scheduling algorithm is verified by experiment, and three key points are illustrated: (1) A real machining prototype platform is constructed; (2) system validation parameters are set; and (3) proactive scheduling is executed and results are analyzed.

Machining Prototype Platform
A machining prototype platform is built, which is shown in Figure 12; this platform contains four machine tools (equipped with input/output buffer), which can perform three different machining processes; an AGV equipped with mechanical arm distributes raw materials from the raw material storehouse to the machine or distributes semi-finished workpiece from the previous machine to the current machine; and only one raw material (semi-finished product) can be carried every time. Four antennas of reader (ALR-9680) are installed on the machine workstation, which is used for monitoring the abnormal events of the workpiece (paste with anti-metal tag) in real time, and the disturbance information is transmitted to the dispatch center through local area network. A wireless triaxial accelerometer is used to monitor the vibration of tools for the machining process; taking milling machine as an example, a wireless triaxial accelerometer (model: M69) is used to monitor the vibration of milling cutter, the vibration signal is transmitted to wireless base station through Zigbee wireless protocol, and then sent to the control center, with the aim of predicting the remaining useful tool life according to the vibration data. According to the abnormal events of the workpiece and the remaining useful life of the tool, the different scheduling schemes are executed to achieve the proactive scheduling of machining.  Based on Eclipse integrated development environment and MATLAB software, and embedded with rifidi-sdk3.2, Esper5.2, and other plug-ins, the man-machine interface of proactive scheduling is developed, which is shown in Figure 13, and is used to display the relevant information of the workpiece, cutter, and process during the machining process in real time. The interface includes: The display area for real-time monitoring of abnormal events of workpiece based on RFID, the display area for monitoring tool wear based on a wireless accelerometer, and the display area for proactive scheduling based on real-time abnormal events and predicted remaining useful tool life. Based on Eclipse integrated development environment and MATLAB software, and embedded with rifidi-sdk3.2, Esper5.2, and other plug-ins, the man-machine interface of proactive scheduling is developed, which is shown in Figure 13, and is used to display the relevant information of the workpiece, cutter, and process during the machining process in real time. The interface includes: The display area for real-time monitoring of abnormal events of workpiece based on RFID, the display area for monitoring tool wear based on a wireless accelerometer, and the display area for proactive scheduling based on real-time abnormal events and predicted remaining useful tool life. Sensors 2019, 19, x 18 of 26 Figure 13. Human-machine interface of the prototype platform for proactive scheduling.

System Validation Parameters
The system configuration of scheduling algorithm programming and verification is as follows: Core i5 processor, 2.5 GHz dominant frequency, 3 GB RAM, Windows 7 (32) operating system. Scheduling algorithm is programmed using MATLAB, according to the scale and complexity of the scheduling problem, the population size is set as 500, the largest number of iterations is 500 (the number of iterations is 200 in the first-level evolution, the number of iterations is 300 in the second-level evolution), the crossover rate is 0.7, and the mutation rate is 0.3.
There are six workpieces to be machined, each workpiece is machined by three processes, every process can be machined by anyone of optional machines, and the optional machines for machining each process and the processing time on each machine have been determined. The optional machines of each process of every workpiece are shown in Table 3 and the processing time of each process of the corresponding machine is shown in Table 4.

System Validation Parameters
The system configuration of scheduling algorithm programming and verification is as follows: Core i5 processor, 2.5 GHz dominant frequency, 3 GB RAM, Windows 7 (32) operating system. Scheduling algorithm is programmed using MATLAB, according to the scale and complexity of the scheduling problem, the population size is set as 500, the largest number of iterations is 500 (the number of iterations is 200 in the first-level evolution, the number of iterations is 300 in the second-level evolution), the crossover rate is 0.7, and the mutation rate is 0.3.
There are six workpieces to be machined, each workpiece is machined by three processes, every process can be machined by anyone of optional machines, and the optional machines for machining each process and the processing time on each machine have been determined. The optional machines of each process of every workpiece are shown in Table 3 and the processing time of each process of the corresponding machine is shown in Table 4.  AGV is controlled through the wireless transceiver module (433MHz) by the dispatching center. The communication protocol between the dispatching center and AGV is shown in Table 5. In this experiment, the speed of AGV is set as 2 (instruction 0001) and remains unchanged. The AGV runs in accordance with the established magnetic navigation track and has the function of magnetic detection and automatic correction. Single AGV distributes raw material (semi-finished products) to the corresponding machine during the job-shops scheduling in this paper, and only a raw material (semi-finished product) is carried every time. The layout of distributing workpiece by AGV is shown in Figure 14; O is the material/product warehouse, A, B, C, and D respectively denote machine tool N ncm1 , N ncm2 , N ncm3 , and N ncm4 , and the time matrix for running by AGV among the raw material/product warehouse and four workstations is shown in Table 6. According to different scheduling schemes (process code, machine code) formed by scheduling algorithms, the dispatching center drives AGV to complete the distribution of raw materials or semi-finished products, and AGV can automatically identify raw materials/product warehouse, workstation of each workpiece process, etc.  AGV is controlled through the wireless transceiver module (433MHz) by the dispatching center. The communication protocol between the dispatching center and AGV is shown in Table 5. In this experiment, the speed of AGV is set as 2 (instruction 0001) and remains unchanged. The AGV runs in accordance with the established magnetic navigation track and has the function of magnetic detection and automatic correction. Single AGV distributes raw material (semi-finished products) to the corresponding machine during the job-shops scheduling in this paper, and only a raw material (semi-finished product) is carried every time. The layout of distributing workpiece by AGV is shown in Figure 14; O is the material/product warehouse, A, B, C, and D respectively denote machine tool Nncm1, Nncm2, Nncm3, and Nncm4, and the time matrix for running by AGV among the raw material/product warehouse and four workstations is shown in Table 6. According to different scheduling schemes (process code, machine code) formed by scheduling algorithms, the dispatching center drives AGV to complete the distribution of raw materials or semi-finished products, and AGV can automatically identify raw materials/product warehouse, workstation of each workpiece process, etc. Table 5. Communication protocol between the dispatching center and the automatic guided vehicle (AGV). Start  8000  Turn left  0040  Stop  0020  Turn right  0080  Speed 1  0000  Rotate 90° clockwise  0100  Speed 2  0001  Rotate 90° anticlockwise  0200  Speed 3  0002  Rotate 180° clockwise  0500  Speed 4 0003 Rotate 180° anticlockwise 0600 Figure 14. The layout of dispatching workpieces by the AGV. Figure 14. The layout of dispatching workpieces by the AGV.  Firstly, the buffer blocking of a machine is monitored by RFID in real time. According to the prior analysis [26], when the processing time of each process is expanded on nine times of the initial time, the utilization rate of machine is the highest, under the conditions the dynamic scheduling experiments for buffer blocking is implemented. The initial process and machine parameters (18 processes for six workpieces are machined on four machines) are determined, the machining sequence for workpiece is optimized using MD3GA; only the completion time of workpiece machining is considered in the first evolution and forms the initial scheduling scheme; the change of the optimal solution and the population mean for the first evolution is shown in Figure 15 and the generated Gantt chart is shown in Figure 16.   Firstly, the buffer blocking of a machine is monitored by RFID in real time. According to the prior analysis [26], when the processing time of each process is expanded on nine times of the initial time, the utilization rate of machine is the highest, under the conditions the dynamic scheduling experiments for buffer blocking is implemented. The initial process and machine parameters (18 processes for six workpieces are machined on four machines) are determined, the machining sequence for workpiece is optimized using MD3GA; only the completion time of workpiece machining is considered in the first evolution and forms the initial scheduling scheme; the change of the optimal solution and the population mean for the first evolution is shown in Figure 15 and the generated Gantt chart is shown in Figure 16.  It can be obtained from Figures 15 and 16 that MD3GA is applied to carry out the first evolution, only the completion time of workpiece machining is taken as the optimization target, and the optimized minimum processing time (the first evolution target value) f1 = 729 s, forming the initial scheduling scheme without considering disturbance events.   Firstly, the buffer blocking of a machine is monitored by RFID in real time. According to the prior analysis [26], when the processing time of each process is expanded on nine times of the initial time, the utilization rate of machine is the highest, under the conditions the dynamic scheduling experiments for buffer blocking is implemented. The initial process and machine parameters (18 processes for six workpieces are machined on four machines) are determined, the machining sequence for workpiece is optimized using MD3GA; only the completion time of workpiece machining is considered in the first evolution and forms the initial scheduling scheme; the change of the optimal solution and the population mean for the first evolution is shown in Figure 15 and the generated Gantt chart is shown in Figure 16.  It can be obtained from Figures 15 and 16 that MD3GA is applied to carry out the first evolution, only the completion time of workpiece machining is taken as the optimization target, and the optimized minimum processing time (the first evolution target value) f1 = 729 s, forming the initial scheduling scheme without considering disturbance events. It can be obtained from Figures 15 and 16 that MD3GA is applied to carry out the first evolution, only the completion time of workpiece machining is taken as the optimization target, and the optimized minimum processing time (the first evolution target value) f 1 = 729 s, forming the initial scheduling scheme without considering disturbance events.

Workstation O (s) A (s) B (s) C (s) D (s)
Through the real-time monitoring of machining process by RFID, the system returns the state matrix S (Formula (11)) of abnormal disturbances for real-time monitoring, when the second process for the sixth workpiece is machined, the output buffer of machine tool (M 3 ) is blocked, and the sixth workpiece occupies the machine tool; before the buffer is dredged, other processes cannot be machined on this machine temporarily; the dredging time of buffer T re = 20 s and the rescheduling strategy based on real-time event is adopted to adjust the initial scheduling scheme locally. The disturbance event for buffer blocking is considered in the second evolution; in the process of chromosome evolution, for the time of dredging machine (M 3 ) buffer, the right shift strategy of machining process of M 3 is adopted; that is for each chromosome in the population, other processes shift right the time of T re after the completion of the second process for the sixth workpiece machined on M 3 . Minimizing the completion time of the workpiece and weight sum of robustness measure is the target to optimize, aiming to minimize the impact on the initial scheduling scheme for real-time event of buffer blocking. The change of optimal solution and population mean in the second evolution is shown in Figure 17 and the Gantt chart of dynamic scheduling scheme for buffer blocking is shown in Figure 18.
Through the real-time monitoring of machining process by RFID, the system returns the state matrix S (Formula (11)) of abnormal disturbances for real-time monitoring, when the second process for the sixth workpiece is machined, the output buffer of machine tool (M3) is blocked, and the sixth workpiece occupies the machine tool; before the buffer is dredged, other processes cannot be machined on this machine temporarily; the dredging time of buffer Tre = 20 s and the rescheduling strategy based on real-time event is adopted to adjust the initial scheduling scheme locally. The disturbance event for buffer blocking is considered in the second evolution; in the process of chromosome evolution, for the time of dredging machine (M3) buffer, the right shift strategy of machining process of M3 is adopted; that is for each chromosome in the population, other processes shift right the time of Tre after the completion of the second process for the sixth workpiece machined on M3. Minimizing the completion time of the workpiece and weight sum of robustness measure is the target to optimize, aiming to minimize the impact on the initial scheduling scheme for real-time event of buffer blocking. The change of optimal solution and population mean in the second evolution is shown in Figure 17 and the Gantt chart of dynamic scheduling scheme for buffer blocking is shown in Figure 18.
The state matrix of abnormal events monitored by RFID is as follows:  The optimal machining sequence has been generated through the first evolution of Figure 17 and the real-time disturbance event of buffer blocking is responded to. Minimizing the completion time of workpiece and weight sum of robustness measure is the target to adjust the initial scheduling scheme locally, obtaining the optimal target f2 = 519.12, with the aim of minimizing the impact of the initial scheduling scheme for disturbance event. By comparing Figures 16 and 18, in order to deal with buffer blocking event occurring in machining O62, only processes O13 and O53 Through the real-time monitoring of machining process by RFID, the system returns the state matrix S (Formula (11)) of abnormal disturbances for real-time monitoring, when the second process for the sixth workpiece is machined, the output buffer of machine tool (M3) is blocked, and the sixth workpiece occupies the machine tool; before the buffer is dredged, other processes cannot be machined on this machine temporarily; the dredging time of buffer Tre = 20 s and the rescheduling strategy based on real-time event is adopted to adjust the initial scheduling scheme locally. The disturbance event for buffer blocking is considered in the second evolution; in the process of chromosome evolution, for the time of dredging machine (M3) buffer, the right shift strategy of machining process of M3 is adopted; that is for each chromosome in the population, other processes shift right the time of Tre after the completion of the second process for the sixth workpiece machined on M3. Minimizing the completion time of the workpiece and weight sum of robustness measure is the target to optimize, aiming to minimize the impact on the initial scheduling scheme for real-time event of buffer blocking. The change of optimal solution and population mean in the second evolution is shown in Figure 17 and the Gantt chart of dynamic scheduling scheme for buffer blocking is shown in Figure 18.
The state matrix of abnormal events monitored by RFID is as follows:  The optimal machining sequence has been generated through the first evolution of Figure 17 and the real-time disturbance event of buffer blocking is responded to. Minimizing the completion time of workpiece and weight sum of robustness measure is the target to adjust the initial scheduling scheme locally, obtaining the optimal target f2 = 519.12, with the aim of minimizing the impact of the initial scheduling scheme for disturbance event. By comparing Figures 16 and 18, in order to deal with buffer blocking event occurring in machining O62, only processes O13 and O53 The state matrix of abnormal events monitored by RFID is as follows: The optimal machining sequence has been generated through the first evolution of Figure 17 and the real-time disturbance event of buffer blocking is responded to. Minimizing the completion time of workpiece and weight sum of robustness measure is the target to adjust the initial scheduling scheme locally, obtaining the optimal target f 2 = 519.12, with the aim of minimizing the impact of the initial scheduling scheme for disturbance event. By comparing Figures 16 and 18, in order to deal with buffer blocking event occurring in machining O 62 , only processes O 13 and O 53 after O 62 are shifted right the time of T re , and other processes remain unchanged, avoiding the impact on processes O 13 and O 53 for disturbance event of buffer blocking, and ensuring the minimum impact on the initial scheduling scheme.

Proactive Scheduling Based on Tool Wear Prediction
Secondly, the case of monitoring tool wear by a wireless accelerometer and predicting the remaining useful life is discussed. Initial conditions are the same as dynamic scheduling part; the machining sequence of the workpiece is optimized using MD3GA, only the completion time of workpiece machining is considered in the first evolution, as well as forming the initial scheduling scheme. The change of the optimal solution and the population mean for the first evolution is shown in Figure 19, the generated Gantt chart is shown in Figure 20, and the Gantt chart of integration scheduling including AGV distribution time is shown in Figure 21. after O62 are shifted right the time of Tre, and other processes remain unchanged, avoiding the impact on processes O13 and O53 for disturbance event of buffer blocking, and ensuring the minimum impact on the initial scheduling scheme.

Proactive Scheduling Based on Tool Wear Prediction
Secondly, the case of monitoring tool wear by a wireless accelerometer and predicting the remaining useful life is discussed. Initial conditions are the same as dynamic scheduling part; the machining sequence of the workpiece is optimized using MD3GA, only the completion time of workpiece machining is considered in the first evolution, as well as forming the initial scheduling scheme. The change of the optimal solution and the population mean for the first evolution is shown in Figure 19, the generated Gantt chart is shown in Figure 20, and the Gantt chart of integration scheduling including AGV distribution time is shown in Figure 21.     after O62 are shifted right the time of Tre, and other processes remain unchanged, avoiding the impact on processes O13 and O53 for disturbance event of buffer blocking, and ensuring the minimum impact on the initial scheduling scheme.

Proactive Scheduling Based on Tool Wear Prediction
Secondly, the case of monitoring tool wear by a wireless accelerometer and predicting the remaining useful life is discussed. Initial conditions are the same as dynamic scheduling part; the machining sequence of the workpiece is optimized using MD3GA, only the completion time of workpiece machining is considered in the first evolution, as well as forming the initial scheduling scheme. The change of the optimal solution and the population mean for the first evolution is shown in Figure 19, the generated Gantt chart is shown in Figure 20, and the Gantt chart of integration scheduling including AGV distribution time is shown in Figure 21.     after O62 are shifted right the time of Tre, and other processes remain unchanged, avoiding the impact on processes O13 and O53 for disturbance event of buffer blocking, and ensuring the minimum impact on the initial scheduling scheme.

Proactive Scheduling Based on Tool Wear Prediction
Secondly, the case of monitoring tool wear by a wireless accelerometer and predicting the remaining useful life is discussed. Initial conditions are the same as dynamic scheduling part; the machining sequence of the workpiece is optimized using MD3GA, only the completion time of workpiece machining is considered in the first evolution, as well as forming the initial scheduling scheme. The change of the optimal solution and the population mean for the first evolution is shown in Figure 19, the generated Gantt chart is shown in Figure 20, and the Gantt chart of integration scheduling including AGV distribution time is shown in Figure 21.    It can be obtained from Figures 19 and 20 that MD3GA is applied to carry out the first evolution; only the completion time of workpiece machining is taken as the optimization target and the optimized minimum processing time (the first evolution target value) f 1 = 747 s, forming the initial scheduling scheme without considering disturbance events.
The vibration is monitored by a wireless triaxial accelerometer during the process of machining, and predicting remaining useful life for tool, the remaining useful life matrix (the remaining useful life is expressed by the number of workpieces machined with this tool also) is obtained; when the initial scheduling scheme in not performed, the tool for M 3 is also predicted for the machine 2 processes; namely, W 3 = 2 is expressed in the remaining useful life matrix (Formula (12)); this tool needs to be replaced after machining 2 processes to machine the latter processes again. The time for replacing tool T c = 30 s, the rescheduling strategy based on predicted event is adopted to perform the full rescheduling scheme, and the predicted event of exhausting tool life is considered in the second evolution. In the process of chromosome evolution, for the time of replacing tool on M 3 , the shift right strategy of machining processes machined on M 3 is also adopted; namely, for each chromosome in the population, the start time and end time of other processes shift right the time of T c after two processes are machined on M 3 . Minimizing the completion time of workpiece and weight sum of robustness measure is the target to optimize, with the aim of minimizing the impact of the initial scheduling scheme for the predicted event of exhausting tool life. The change of optimal solution and population mean in the second evolution is shown in Figure 22, the Gantt chart of proactive scheduling scheme for tool wear prediction is shown in Figure 23, and the Gantt chart of integration scheduling including AGV distribution time is shown in Figure 24. the optimized minimum processing time (the first evolution target value) f1 = 747 s, forming the initial scheduling scheme without considering disturbance events. The vibration is monitored by a wireless triaxial accelerometer during the process of machining, and predicting remaining useful life for tool, the remaining useful life matrix (the remaining useful life is expressed by the number of workpieces machined with this tool also) is obtained; when the initial scheduling scheme in not performed, the tool for M3 is also predicted for the machine 2 processes; namely, W3 = 2 is expressed in the remaining useful life matrix (Formula (12)); this tool needs to be replaced after machining 2 processes to machine the latter processes again. The time for replacing tool Tc = 30 s, the rescheduling strategy based on predicted event is adopted to perform the full rescheduling scheme, and the predicted event of exhausting tool life is considered in the second evolution. In the process of chromosome evolution, for the time of replacing tool on M3, the shift right strategy of machining processes machined on M3 is also adopted; namely, for each chromosome in the population, the start time and end time of other processes shift right the time of Tc after two processes are machined on M3. Minimizing the completion time of workpiece and weight sum of robustness measure is the target to optimize, with the aim of minimizing the impact of the initial scheduling scheme for the predicted event of exhausting tool life. The change of optimal solution and population mean in the second evolution is shown in Figure 22, the Gantt chart of proactive scheduling scheme for tool wear prediction is shown in Figure 23, and the Gantt chart of integration scheduling including AGV distribution time is shown in Figure 24.
The wireless accelerometer is used to monitor the vibration of the tool and predict the remaining useful life. The matrix of remaining useful life for tool is as follows:   the optimized minimum processing time (the first evolution target value) f1 = 747 s, forming the initial scheduling scheme without considering disturbance events. The vibration is monitored by a wireless triaxial accelerometer during the process of machining, and predicting remaining useful life for tool, the remaining useful life matrix (the remaining useful life is expressed by the number of workpieces machined with this tool also) is obtained; when the initial scheduling scheme in not performed, the tool for M3 is also predicted for the machine 2 processes; namely, W3 = 2 is expressed in the remaining useful life matrix (Formula (12)); this tool needs to be replaced after machining 2 processes to machine the latter processes again. The time for replacing tool Tc = 30 s, the rescheduling strategy based on predicted event is adopted to perform the full rescheduling scheme, and the predicted event of exhausting tool life is considered in the second evolution. In the process of chromosome evolution, for the time of replacing tool on M3, the shift right strategy of machining processes machined on M3 is also adopted; namely, for each chromosome in the population, the start time and end time of other processes shift right the time of Tc after two processes are machined on M3. Minimizing the completion time of workpiece and weight sum of robustness measure is the target to optimize, with the aim of minimizing the impact of the initial scheduling scheme for the predicted event of exhausting tool life. The change of optimal solution and population mean in the second evolution is shown in Figure 22, the Gantt chart of proactive scheduling scheme for tool wear prediction is shown in Figure 23, and the Gantt chart of integration scheduling including AGV distribution time is shown in Figure 24.
The wireless accelerometer is used to monitor the vibration of the tool and predict the remaining useful life. The matrix of remaining useful life for tool is as follows:   Before performing the initial scheduling scheme, it was predicted that only two processes can be machined in M3, and the tool life will be exhausted and the tool would need to be replaced in order to deal with the predicted event; the machined workpieces performed the full rescheduling scheme, with the optimal target f2 = 532.36 in the second evolution. By comparing Figures 20 and 23, in order to deal with the predicted disturbance event of replacing tool after machining O12, the processes O13 and O53 after O12 machined in M3 are shifted right the time of Tc in the second evolution. Minimizing the completion time of workpiece and weight sum of robustness measure is the target; the machining sequence is sorted again, with the aim of minimizing the impact of the initial scheduling scheme for the disturbance event of replacing tool; process O13 is still machined in M3, which is after process O12 (the initial scheme is shifted right the time of Tc). O23 is machined in M3, O53 is machined on M1, O33 machined in M1 in the initial scheduling scheme is arranged to machine in M4, avoiding the impact on O13 and O53 for the disturbance event of replacing tool, and at the same time, to ensure the minimum impact on the initial scheduling scheme. The machining processes have been adjusted in Figure 24. The actual machining time of workpieces is 756 s, 9 s more than the initial scheduling scheme; the AGV running time is 231 s, the AGV waiting time is 421 s, and the AGV waiting time is greater than its running time due to the workpiece distribution by single AGV.

Conclusions and Future Work
Proactive scheduling based on the abnormal event monitoring of the workpiece and remaining useful life prediction of the tool is proposed and verified in this paper. Based on the real-time abnormal events of the workpiece and remaining useful life of the tool, the hybrid rescheduling strategy based on real-time event and predicted event is adopted; the completion time of workpieces and the robustness measure of scheduling scheme are considered synthetically; MD3GA is proposed, with the aim of minimizing the impact of the initial scheduling scheme for abnormal disturbances; the prototype platform for machining workpiece is constructed; a humanmachine interface is developed, to realize the integration scheduling of machines and single AGV; and the feasibility of proactive scheduling is verified.
When exploring the proactive scheduling method, a prototype platform system is constructed to verify the method in this paper, and a lot of constraints are added during the execution, such as AGV running along the magnetic orbit, etc. In future research on proactive scheduling, AGV path planning and collaborative optimization of the robotic arm will be considered at the same time. We only take into account the RFID and accelerometer data in the method validation, human factors are not involved, and the amount of data collected is limited; the experimental environment is not as complex as actual workshop site. In real situations, the following factors should have been considered: The environmental factors, the vast amounts of different types of data collection, the more complex machining processes, more equipment, as well as the uncertainty of the workers, etc.
Author Contributions: Conceptualization, C.Z. and X.Y.; methodology, C.Z. and X.Y.; software, W.T.; validation, C.Z. and X.Y.; formal analysis, W.T.; investigation, Y.Z.; resources, F.Z.; data curation, Y.Z. and F.Z.; Before performing the initial scheduling scheme, it was predicted that only two processes can be machined in M 3 , and the tool life will be exhausted and the tool would need to be replaced in order to deal with the predicted event; the machined workpieces performed the full rescheduling scheme, with the optimal target f 2 = 532.36 in the second evolution. By comparing Figures 20 and 23, in order to deal with the predicted disturbance event of replacing tool after machining O 12 , the processes O 13 and O 53 after O 12 machined in M 3 are shifted right the time of T c in the second evolution. Minimizing the completion time of workpiece and weight sum of robustness measure is the target; the machining sequence is sorted again, with the aim of minimizing the impact of the initial scheduling scheme for the disturbance event of replacing tool; process O 13 is still machined in M 3 , which is after process O 12 (the initial scheme is shifted right the time of T c ). O 23 is machined in M 3 , O 53 is machined on M 1 , O 33 machined in M 1 in the initial scheduling scheme is arranged to machine in M 4 , avoiding the impact on O 13 and O 53 for the disturbance event of replacing tool, and at the same time, to ensure the minimum impact on the initial scheduling scheme. The machining processes have been adjusted in Figure 24. The actual machining time of workpieces is 756 s, 9 s more than the initial scheduling scheme; the AGV running time is 231 s, the AGV waiting time is 421 s, and the AGV waiting time is greater than its running time due to the workpiece distribution by single AGV.

Conclusions and Future Work
Proactive scheduling based on the abnormal event monitoring of the workpiece and remaining useful life prediction of the tool is proposed and verified in this paper. Based on the real-time abnormal events of the workpiece and remaining useful life of the tool, the hybrid rescheduling strategy based on real-time event and predicted event is adopted; the completion time of workpieces and the robustness measure of scheduling scheme are considered synthetically; MD3GA is proposed, with the aim of minimizing the impact of the initial scheduling scheme for abnormal disturbances; the prototype platform for machining workpiece is constructed; a human-machine interface is developed, to realize the integration scheduling of machines and single AGV; and the feasibility of proactive scheduling is verified.
When exploring the proactive scheduling method, a prototype platform system is constructed to verify the method in this paper, and a lot of constraints are added during the execution, such as AGV running along the magnetic orbit, etc. In future research on proactive scheduling, AGV path planning and collaborative optimization of the robotic arm will be considered at the same time. We only take into account the RFID and accelerometer data in the method validation, human factors are not involved, and the amount of data collected is limited; the experimental environment is not as complex as actual workshop site. In real situations, the following factors should have been considered: The environmental