## 3 Event-Driven Rescheduling Strategy  
The predictive-reactive strategy is adopted to realize the dynamic scheduling process in a HFS. According to this strategy, a predictive plan is first developed based on the expected value of processing times. However, there will be a difference between the actual situation and the predictive plan in terms of operation processing times. The event-driven rescheduling mechanism evaluates the disturbance caused by these events and judges the necessity of a reactive scheduling. As shown in Figure 3, taking the objective of minimizing makespan into consideration, the judgment is based on whether delivery time deviation of jobs exceeds a specific tolerance. Delivery time deviation of jobs is calculated as follows:  
\[\delta_{nm}=|rC_{nmI}-C_{nmI}|/C_{nmI}, \tag{2}\]  
where \(C_{nmI}\) and \(rC_{nmI}\) represent expected and actual delivery time of the \(n\)th batch of job type \(m\), respectively. If the deviation satisfies \(\delta_{nmI}>\delta_{\max}\), a rescheduling is required, otherwise, the predictive plan is kept. A large \(\delta_{\max}\) causes the reactive scheduling insensitive to dynamic events, whereas a small \(\delta_{\max}\) leads to frequent rescheduling. Thereupon, delivery deviation tolerance \(\delta_{\max}\) is an important parameter in the rescheduling strategy.  
Moreover, the reactive scheduling is performed within an operation-based rolling window because the processing times are related to operations. As illustrated in Figure 4, the window keeps removing the completed operations and adding the waiting processing ones based on real-time shop information. \(S(l)\) represents the set of \(p\) operations within the \(l\)th window. \(CS(l)\) represents the set of completed operations. \(ES(l)\) is the set of waiting processing operations. The rolling window forms the rescheduling problem based on \(S(l)\) once the reactive scheduling is regarded as necessary. The rescheduling algorithm solves this problem without interrupting the ongoing operations and then generates a new predictive plan based on \(CS(l)\) and \(ES(l)\), as shown in Figure 3. For each window, a larger \(p\) makes the rescheduling  
\begin{table}
\begin{tabular}{l l} \hline \hline
**Notations** & **Definitions** \\ \hline Variables & \\ \(y_{rm}\) & Binary variable: 1, if the \(r\)th job entering the first production stage belongs to job type \(m\); 0, otherwise \\ \(x_{rii}\) & Binary variable: 1, if the \(r\)th job entering the first production stage is processed on the \(k\)th machine \\  & at stage \(i\); 0, otherwise \\ \(a_{rii}\) & The time instant the \(k\)th machine of production stage \(i\) to be available for the \(r\)th job \\ \(b_{rii}\) & The job type processed by the \(k\)th machine of production stage \(i\) before \(a_{rii}\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: _Cont._  
Figure 3: Event-driven rescheduling strategy.  
problem more complex, but enables better global optimization. On the contrary, a smaller \(p\) decreases the computational effort by compromising solution quality. Consequently, the number of operations within each window is also a key parameter in the rescheduling strategy.