## 4 Genetic Regulatory Network-Based Rescheduling Method
### Regulation Equation and Expression Procedure of Gene \(\mathbf{\pi}_{ri}\)  
The major objective of assigning jobs to alternative machines is to avoid machine idle time because the makespan is decreased mainly by increasing the utilization of machines. For this reason, the rule of assigning each waiting processing job to the earliest available machine is widely adopted. In addition, each machine prefers to operate on the same job type in order to reduce changeover activities while setup times are taken into consideration. Therefore, assigning a job to parallel machines at each stage should comply with following rules:  
1. A machine cannot be selected if the waiting time of a job on this machine is longer than that on another machine.
2. A machine cannot be selected if it requires setup time for a job.  
It is almost impossible to satisfy these rules completely, and each unsatisfied case might increase the objective function value. In addition, the 5 th assumption should also be obeyed. The regulation equation of gene \(\mathbf{\pi}_{ri}\) is thereby developed as follows:  
\[w_{ri}=h_{1}\sum_{v=1}^{K_{i}}\left(a_{ri}-a_{rvi}\right)+h_{2}c_{b_{ri}m_{0} ki}+H(\sum_{v=1}^{K_{i}}x_{rvi}), \tag{5}\]  
where \(w_{ri}\) represents the inhibition coefficient to gene \(\mathbf{\pi}_{ri}\), \(a_{ri}\) and \(b_{rki}\) represent the end time and the job type of last operation on the \(k\)th parallel machine when the \(r\)th job enters the \(i\)th production stage, \(m_{0}\) represents the type of the \(r\)th job (i.e., \(m_{0}=\sum_{m=1}^{M}my_{rm}\)), \(h_{1}\) and \(h_{2}\) are regulatory parameters, and \(H(x)\) is a step function that satisfies \(H(x)=0\ (x\leq 0)\) and \(H(x)=+\infty\ (x>0)\). The first two terms of the right side of Equation (5) represent the inhibition strength to gene \(\mathbf{\pi}_{ri}\) owing to Rules 1 and 2, respectively. The last term describes the constraint originated from the 5 th assumption. The variable \(b_{rki}\) satisfies:  
\[b_{rki}=\left\{\begin{array}{ccc}b_{(r-1)ki}&\textbf{if}&x_{(r-1)ki}=0\\ \sum_{m=1}^{M}my_{(r-1)m}&\textbf{if}&x_{(r-1)ki}=1\end{array}\right., \tag{6}\]  
and the variable \(a_{rki}\) satisfies:  
\[a_{ri}=\left\{\begin{array}{ccc}a_{(r-1)ki}&\textbf{if}&x_{(r-1)ki}=0\\ a_{(r-1)ki}+c_{b_{(r-1)ii}m_{0}ki}+t_{m_{0}ki}&\textbf{if}&x_{(r-1)ki}=1\ \textbf{and}\ a_{ri}\geq\sum_{k=1}^{K_{i-1}}a_{rk(i-1)}x_{rk(i-1)}\\ \sum_{k=1}^{K_{i-1}}a_{rk(i-1)}x_{rk(i-1)}+c_{b_{(r-1)ii}m_{0}ki}+t_{m_{0}ki}& \textbf{if}&x_{(r-1)ki}=1\ \textbf{and}\ a_{ri}<\sum_{k=1}^{K_{i-1}}a_{rk(i-1)}x_{rk(i-1)} \end{array}\right., \tag{7}\]  
Assuming \(\mathbf{\varphi}_{li}\) jobs (from the \(\mathbf{\sigma}_{li}\)th position to the \((\mathbf{\sigma}_{li}+\mathbf{\varphi}_{li})\)th position in the job sequence) enter the \(i\)th production stage based on the \(p=\sum_{i=1}^{l}\mathbf{\varphi}_{li}\) operations selected for the \(l\)th window, the genes \(\left\{\mathbf{\pi}_{(\mathbf{\sigma}_{li}+\mathbf{\beta}_{i})ki}|\mathbf{\beta}_{i}=1,2, \cdots,\mathbf{\varphi}_{li};\ k=1,2,\ \ \cdots,K_{i};\ i=1,2,\ \cdots,1\right\}\) are initialized to the unexpressed state, whereas other gene states are in accordance with the predictive plan. In the expression procedure of gene \(\pi_{\textit{rki}}\), at each iteration \(n=\beta_{i}+\sum_{v=1}^{i-1}\varphi_{lv}\ (i=1,2,\cdots,I,\ \beta_{i}\in\{1,2,\cdots, \varphi_{li}\})\), the inhibition coefficient \(w_{\textit{rki}}\) is calculated for genes \(\left\{\pi_{(\sigma_{li}+\beta_{i})ki}|k=1,2,\cdots,K_{i}\right\}\) and the gene with minimum \(w_{\textit{rki}}\) is converted to the expressed state. When \(n>p\), the production plan within the \(l\)th window is rescheduled based on gene states \(\left\{x_{(\sigma_{li}+\beta_{i})ki}|\beta_{i}=1,2,\cdots,q_{li};\ k=1,2,\ \cdots,K_{i};\ i=1,2,\cdots,I\right\}\). The pseudo codes of this procedure are presented in Appendix B.