## 3 Formulation of the Knitting Workshop Production Scheduling Problem  
In this section, we classify the knitting shop production scheduling problem as an HFSP, which can be described as follows: there are \(n\) production orders \(\{I_{1},I_{2},\cdots,I_{n}\}\), which are processed by \(m\) machines \(\{M_{1},M_{2},\cdots,M_{m}\}\) and require \(z\) processes \(\{P_{1},P_{2},\cdots,P_{z},\)\(z\geq 2\}\) in sequence, there are several parallel processing machines for at least one process, and the production orders are not necessarily processed at the same time at each processing station. There is a buffer zone between two adjacent processes. The processing order of the workpieces and assignment of processes to parallel machines need to be determined so that the model meets the actual production requirements. To better describe the problem, the following assumptions are considered [8]:  
1. Each machine can only process at most one production order at a given time;
2. Each production order can only be processed by one machine at a given time for a given process;
3. Production orders cannot be interrupted when they begin to be processed, which means that production orders are considered non-preemptive;
4. The processing time for each process of each production order is deterministic;
5. No priority constraints exist between operations of different production orders;
6. When scheduling starts (i.e., the initial state), all equipment is available until processing is complete, regardless of equipment failure. In the knitting shop production scheduling problem, the processing time, which is the total time required to complete all production operations, is used as a measure of the merit of the scheduling algorithm. In the hybrid flow shop scheduling problem, as the objective function of the model, the algorithm is guided to search for the optimal solution by heuristic rules. Mathematically, we define the knitting shop production scheduling problem as consisting of the following components:  
* \(J=\{J_{1},J_{2},\cdots,J_{n}\}\) is the production order set. * \(P=\{P_{1},P_{2},\cdots,P_{z}\}\) is the order process set. * \(M=\{M_{1},M_{2},\cdots,M_{m}\}\) is the processing machines set. * \(O=\{O_{1},O_{2},\cdots,O_{n}\}\) is the processing sequence set, which defines the processing sequence for processing the production order set \(J\) in the processing machines set \(M\), where \(O_{i}\) indicates the machines assigned in each process of order \(J_{i}\). * \(ST_{i}(O)\) is the start time when the \(i^{th}\) production order \(J\) is processed according to the processing sequence defined in \(O\). * \(ET_{i}(O)\) is the end time when the \(i^{th}\) production order \(J\) is processed according to the processing sequence defined in \(O\). * \(E_{ij}\) is the \(j^{th}\) parallel equipment for the \(i^{th}\) process, where \(E_{ij}\in M\). * \(Pl_{j}\) is the number of available processing machines for production order process \(j\), where \(Pl_{j}\geq 1\). * \(X_{i,k}\) is a binary decision variable that equals one if production order \(J_{i}\) is assigned to machine equipment \(M_{k}\); otherwise, it is zero. For the purpose of explaining several components of the model, as an example, there are five processing machines \(M=\{M1,M2,M3,M4,M5\}\) and four orders \(J=\{J1,\ J2,\ J3,\ J4\}\) in the knitting shop. Each order needs to be completed by two processes \(P=\{P1,\ P2\}\). Process 1 can be processed by machines \(M1,M2,M3\), and process 2 can be processed by machines \(M4,M5\), so \(Pl_{1}=3\) and \(Pl_{2}=2\). \(E_{11}\) is the first processing machine for process 1, i.e., \(M1\). If the two processes of production order \(J_{1}\) are produced by \(M1\) and \(M4\), respectively, then \(O_{1}=[M1,M4]\). In this paper, the shop production scheduling model is illustrated in Figure 1. The optimization objective of the model is to minimize the maximum completion time \(MKS\), which is the end time when the last production order \(J\) is processed and completed, as shown in Equation (1).