## 3 Solution Methodology
### Phase 2: Minimizing Total Tardiness  
Based on the makespan found in Phase 1, the second phase aims to minimize the total tardiness. An integer program modified from Phase 1 is developed. The main difference between Phase 1 and Phase 2 is that the minimal makespan generated by Phase 1 becomes the constraint in Phase 2. Therefore, the makespan, \(M\), in Equation (11) is given in the model of Phase 2. Moreover, the quantities of received orders, and the last day that the model has to be changed for the corresponding products are both taken into consideration. For the development of the Phase 2 model, the required notation is defined as follows:  
Figure 4: Example results of the integer program in Phase 1.  
Input variables:  
\(LS_{i}\)The last day that the model has to be exchanged to produce product I;  
\(A_{i}\)The quantity of product \(i\) in the received order.  
Decision variables:  
\(DS_{i}\)the day that the mold is exchanged (and starts production) for product \(i\);  
\(L_{i}\)\(=\left\{\begin{array}{ll}1,&\text{if product $i$ is produced after the last starting day}\\ 0,&\text{otherwise}\end{array}\right.\)  
\(T\)Total tardiness;  
Based on the integer program in Phase 1, the objective function is replaced with Equation (12) in Phase 2, aiming to minimize the total tardiness. Moreover, Equations (13) to (15) are involved. Equation (13) is used to calculate the day that the mold is exchanged for all products. Equation (14) is used to judge if a product is late. The total tardiness for any product cannot be negative, as stated by Equation (15).  
\[\text{Minimize }T=\sum_{i=1}^{l}L_{i}(DS_{i}-LS_{i})A_{i} \tag{12}\]  
\[\sum_{j=1}^{l}\sum_{k=1}^{K}X_{ijk}\times S_{jk}=DS_{i} \tag{13}\]  
\[(DS_{i}-LS_{i})/D\leq L_{i} \tag{14}\]  
\[L_{i}(DS_{i}-LS_{i})\geq 0 \tag{15}\]  
From the example in Figure 4, it can been found for Phase 1 that the minimum makespan is 5 days. Based on the minimum makespan, the result of Phase 2 is illustrated in Figure 5. The scheduling in Figures 4 and 5 are different. In the example shown in Figure 5, for Machine 1, Product 2 is assigned to Sequence 3, Product 3 is assigned to Sequence 4, and Product 5 is assigned to Sequence 5. No product is assigned to Sequences 1 and 2. Therefore, it is arranged that Machine 1 will exchange its mold on Day 1, and produce Product 2 until Day 2. Then, Machine 1 will exchange its mold on Day 3, and produce Product 3 on the same day. After, Machine 1 will exchange its mold on Day 4, and produce Product 5 until Day 5. As in Figure 4, at most one mold exchange can be accomplished per day.  
In Figure 5, Products 1 and 4 are manufactured late for their corresponding orders. The tardiness of these two products are both 1 day (2-1 and 5-1). Thus, the total tardiness is 250 (\(50\times 1+200\times 1\)). In Figure 4, Products 2 and 3 are manufactured late for their corresponding orders. The tardiness of these two products are both 2 days (4-2 and 5-3). The total tardiness is 500 (100 \(\times\) 2 + 150 \(\times\) 2). Therefore, the proposed integer program in Phase 2 can further reduce the total tardiness with the same minimal makespan.  
Since a typical identical PMS problem is an NP-hard problem, more constraints are taken into consideration in the proposed problem. LINGO is a comprehensive tool de  
Figure 5: Example results of the integer program in Phase 2.  
signed to make building and solving mathematical optimization models easier and more efficient [19]. Therefore, this research adopted LINGO 17 to optimize both the integer programming problems in Phase 1 and Phase 2.