A Two-Step Approach to Scheduling a Class of Two-Stage Flow Shops in Automotive Glass Manufacturing

: Driven from real-life applications, this work aims to cope with the scheduling problem of automotive glass manufacturing systems, that is characterized as a two-stage ﬂow-shop with small batches, inevitable setup time for different product changeover at the ﬁrst stage, and un-interruption requirement at the second stage. To the best knowledge of the authors, there is no report on this topic from other research groups. Our previous study presents a method to assign all batches to each machine at the ﬁrst stage only without sequencing the assigned batches, resulting in an incomplete schedule. To cope with this problem, if a mathematical programming method is directly applied to minimize the makespan of the production process, binary variables should be introduced to describe the processing sequence of all the products, not only the batches, resulting in huge number of binary variables for the model. Thus, it is necessary and challenging to search for a method to solve the problem efﬁciently. Due to the mandatory requirement that the second stage should keep working continuously without interruption, solution feasibility is essential. Therefore, the key to solve the addressed problem is how to guarantee the solution feasibility. To do so, we present a method to determine the minimal size of each batch such that the second stage can continuously work without interruption if the sizes of all batches are same. Then, the conditions under which a feasible schedule exists are derived. Based on the conditions, we are able to develop a two-step solution method. At the ﬁrst step, an integer linear program (ILP) is formulated for handling the batch allocation problem at the ﬁrst stage. By the ILP, we need then to distinguish the batches only, greatly reducing the number of variables and constraints. Then, the batches assigned to each machine at the ﬁrst stage are optimally sequenced at the second step by an algorithm with polynomial complexity. In this way, by the proposed method, the computational complexity is greatly reduced in comparison with the problem formulation without the established feasibility conditions. To validate the proposed approach, we carry out extensive experiments on a real case from an automotive glass manufacturer. We run ILP on CPLEX for testing. For large-size problems, we set 3600 s as the longest time for getting a solution and a gap of 1% for the lower bound of solutions. The results show that CPLEX can solve 96.83% cases. Moreover, we can obtain good solutions with the maximum gap of 4.9416% for the unsolved cases.


Introduction
Due to globalization, products are diversified and should be produced in a customized way with small batches and low cost.To do so, a manufacturing system should be flexible.One important flexibility type of a production system is characterized by the capability For the proposed two-step method, at the first step, we need to distinguish the batches only, greatly reducing the number of variables and constraints in the ILP.In this way, by the proposed method, we greatly reduce the computational complexity in comparison with the problem formulation without the established feasibility conditions.
The rest of the paper is constructed as follows.Section 2 briefly reviews the related work.Section 3 analyzes properties of the system.Then, a two-step solution method is proposed in Section 4. Experimental results are given to test the performance of the proposed method in Section 5. Finally, the last section concludes this work.

Literature Review
Many studies have been conducted on flow-shop scheduling problems.For flowshop scheduling problems, there are various variants, considering different constraints, scheduling scenarios, and optimization objectives [3].The main constraints include setup time [4], limited buffers [5], uncertain processing time [6], due dates [7], etc.Many researchers attempt to solve such scheduling problems by using mathematical models [4,8], meta-heuristics algorithms [5,9], artificial intelligence [4], and methods based on scheduling policy [10,11].Interested readers can refer to the surveys in [3,12,13] for more details about the scheduling analysis of flow-shop systems.Since the addressed scheduling problem comes from a real AGMS that is treated as a TSFS, this work mainly reviews the works related to the scheduling problems of TSFS.
Some studies have been carried out for TSFS system scheduling problems.With one machine at Stage 1, by considering the machine breakdown, [14] propose efficient approaches to minimize the makespan.With one machine at Stage 2, based on a branch and bound technique, [15] developed an algorithm to find an optimal schedule.With arbitrary arrival time of jobs, [16] present an ant colony algorithm to schedule a TSFS system.A multi-objective hybrid ant colony algorithm is constructed by [17] to trade off the makespan and total energy costs for a two-stage blocking permutation flow-shop.For a no-waiting TSFS, [18] design a linear-time combinatorial algorithm.
By considering independent setup time, [19] construct several heuristic algorithms for scheduling a TSFS.With the fuzzy makespan and total agreement index as objective, [20] adopt a diversified teaching-learning-based algorithm for a TSFS with sequence-dependent setup time.By applying reinforcement learning, [21] propose a novel approach for the TSFS system scheduling problem.In addition, efficient algorithms are presented for two-stage assembly flow-shops [22][23][24][25].In such a system, normally, the first stage is used to fabricate multiple types of components, while the second stage assembles the components to form the final product.For a TSFS system, if each stage has one machine only, the system becomes a twomachine flow shop (TMFS) and great efforts have been made for scheduling such systems.With sequence-independent setup time, the branch and bound techniques are employed to optimize the makespan in [26].In [27,28], methods are proposed to minimize makespan by considering the release dates, while in [29], several metaheuristics are examined by considering both release dates and blocking constraint.To minimize the total tardiness, lower bounds and dominance conditions are established in [30].In addition, there are studies [31,32] that focus on TMFSs with deteriorating jobs.Note that there are extensive studies on scheduling TMFSs.Due to the fact that the addressed AGMS in this work is much more complex, we do not make an extensive review on this issue, in order to save space.
To the best knowledge of the authors, there is no report on the scheduling problem of TSFFSs with small batches, sequence-independent setup time at the first stage and nointerruption requirement at the second stage from other research groups.For the addressed problem in this work, our previous study presents a method to assign all batches to each machine at Stage 1 for being processed [33].However, it gives no way to sequence the assigned batches, resulting in an incomplete schedule.Moreover, it does not present how to find the minimal size of each batch such that Stage 2 can continuously work without interruption if the sizes of all batches are same.Notice that the key to present the existence conditions of a feasible schedule is to determine the minimal sizes of all batches.This motivates us to perform this work such that the addressed problem can be completely solved.

System Description
Before presenting the proposed method, we first introduce the addressed AGMS as follows.
(1) There are parallel multiple machines with same processing functions at each stage; (2) Only one product can be processed by a machine at a time; (3) At Stage 1, a batch should be processed by a single machine without splitting; (4) Stage 2 is the bottleneck; (5) Stage 1 has the setup time; (6) Each batch contains identical products; (7) For any two batches, their product types are different, with the result that if one batch is just processed at Stage 1, setup time is required before another one is processed next; and (8) After its completion at Stage 1, a product is ready to be processed immediately by a machine at Stage 2.
Since each stage has multiple machines, g ≥ 1 and h ≥ 1 are used to denote the number of machines at Stages 1 and 2, respectively.Further, let N k = {1, 2, . . ., k}.Then, M 1i , i∈N g , and M 2j , j∈N h , represent the i-th and j-th machines at the two stages, respectively.Figure 1 describes an AGMS with small batches to be processed and multiple machines at each stage.The time for processing a product of any type by M 1i and M 2j is known and denoted as α and µ, respectively.Further, the setup time for a machine at Stage 1 is known and it is represented by δ.Without setup time at Stage 2, we treat the h machines there as just one machine, leading to that the processing time of a product at Stage 2 is β = µ h time units.
interruption requirement at the second stage from other research groups.For the addressed problem in this work, our previous study presents a method to assign all batches to each machine at Stage 1 for being processed [33].However, it gives no way to sequence the assigned batches, resulting in an incomplete schedule.Moreover, it does not present how to find the minimal size of each batch such that Stage 2 can continuously work without interruption if the sizes of all batches are same.Notice that the key to present the existence conditions of a feasible schedule is to determine the minimal sizes of all batches.This motivates us to perform this work such that the addressed problem can be completely solved.

System Description
Before presenting the proposed method, we first introduce the addressed AGMS as follows.
(1) There are parallel multiple machines with same processing functions at each stage; (2) Only one product can be processed by a machine at a time; (3) At Stage 1, a batch should be processed by a single machine without splitting; (4) Stage 2 is the bottleneck; (5) Stage 1 has the setup time; (6) Each batch contains identical products; (7) For any two batches, their product types are different, with the result that if one batch is just processed at Stage 1, setup time is required before another one is processed next; and (8) After its completion at Stage 1, a product is ready to be processed immediately by a machine at Stage 2.
Since each stage has multiple machines, g  1 and h  1 are used to denote the number of machines at Stages 1 and 2, respectively.Further, let ℕk = {1, 2, …, k}.Then, M1i, iℕg, and M2j, jℕh, represent the i-th and j-th machines at the two stages, respectively.Figure 1 describes an AGMS with small batches to be processed and multiple machines at each stage.The time for processing a product of any type by M1i and M2j is known and denoted as  and , respectively.Further, the setup time for a machine at Stage 1 is known and it is represented by .Without setup time at Stage 2, we treat the h machines there as just one machine, leading to that the processing time of a product at Stage 2 is  =  ℎ time units.We ensure that   <  should hold, otherwise some machines at the second stage have to be interrupted from time to time due to the setups for M1i, iℕg.In that case, the problem is similar to schedule a single machine.For such a scheduling problem, there are extensive We ensure that α g < β should hold, otherwise some machines at the second stage have to be interrupted from time to time due to the setups for M 1i , i∈N g .In that case, the problem is similar to schedule a single machine.For such a scheduling problem, there are extensive studies [34][35][36][37][38][39][40].Thus, to ensure the non-interruption requirement of machines at the second stage, it should satisfy α g < β when the system is designed.By the experience of the authors with some companies in China, this is true for AGMSs.With α g < β and the non-interruption constraint, it is a great challenge to maximize the productivity by finding a feasible schedule for processing multiple products, which is the aim of this work.

Properties of the System
Due to there being many glass products for automotives, in an AGMS, the number of machines at the first stage is much less than the number of product types to be produced.Moreover, the total number of products to be produced for a scheduling horizon is much greater than the number of products in a batch.To maximize the throughput of an AGMS, the key is that one should properly allocate the batches to the machines at the first stage and sequence them for each M 1i , i∈N g .Suppose that η(i) batches are allocated to M 1i , i∈N g .Let BH ij , i∈N g and j∈N η(i) , denote the j-th one in the η(i) batches with its batch size being b ij .Without loss of generality, it is assumed that, at time zero, the system starts to process batch BH i1 , i∈N g .We use T ij to denote the completion time of batch BH ij , i∈N g and j∈N η(i) .Then, we have Note that T iη (i) gives the time when M 1i , i∈N g , completes its allocated batches.Let ϑ it be the average production rate of M 1i , i∈N g , in [0, t], i.e., the average number of products completed by M 1i per unit time in [0, t]; and T min = min(T iη (i) | i∈N g ).The following lemma can be obtained.
then, at any time point in (0, T min ], the production rate of Stage 1 is greater than or equal to that of Stage 2. That is to say that there are always products for Stage 2 to process and no machine needs to stop in (0, T min ], i.e., the lemma holds. With Lemma 1, we obtain the uninterrupted operation condition of Stage 2. In practice, due to significant setup time at Stage 1, if some machines at Stage 1 are switching from processing one batch to another, it may result in Stage 1 being unable to feed enough products to the machines at Stage 2 (the bottleneck), leading to some machines at Stage 2 being unable to keep continuously working.To solve this problem, similar to the basic idea of the drum-buffer-rope [41,42], buffers (the inventory) can be used to protect the bottleneck such that the uninterrupted operation condition of Stage 2 shown in Lemma 1 is satisfied.Therefore, it is important to schedule the batches to be processed at Stage 1.Moreover, it is necessary to determine the minimal size of each batch such that Stage 2 can continuously work without interruption if the sizes of all batches are the same.Thus, for more general cases, it is possible to find a method to schedule the batches to be processed at Stage 1 so as to protect the bottleneck by the inventory.
Suppose that all the machines at Stage 1 process batches with the same size in a paced way.In other words, the size of all batches to be processed are same and all the machines at Stage 1 start to process a batch at the same time.In this way, all the machines switch from producing a type of product to another type at the same time as well.Then, we can determine the minimal size of each batch denoted by Θ such that Stage 2 can operate continuously with no interruption.Lemma 2. Suppose that all the g machines at Stage 1 perform the product processing and switching operations in a paced way and the size of the batches to be processed are same.Then, if the size of each batch is no less than Θ = δ g×β−α Stage 2 can operate uninterruptedly.
Proof.When the g machines at the first stage start to process a batch at the same time, then the inventory between Stages 1 and 2 should increase over time due to α g < β.Assume that after t 0 time units elapse, a batch at each machine at Stage 1 is just completed.At this time, every one of the g machines switches from processing one batch to another exactly at the same time.Then, the inventory between the two stages decreases over time since Stage 2 continuously consumes the inventory.After δ time units elapse, the inventory reaches zero.In this way, there are always products for Stage 2 to produce such that it cannot be interrupted since the g machines at Stage 1 start to process a batch at the same time, leading to the inventory between Stages 1 and 2 increasing over time.This means that in this situation, the size of the batches is minimal.The inventory between Stages 1 and 2 changes periodically over time, as shown in Figure 2. Thus, we have that during time t 0 , each machine at Stage 1 can produce Θ = t 0 α products, i.e., a batch.In total, Stage 1 produces g × t 0 α products.During time t 0 + δ, Stage 2 just consumes t 0 +δ β products.Note that g × t 0 α = t 0 +δ β and t 0 = αΘ, leading to Θ = δ g×β−α Therefore, the lemma holds.
Lemma 2. Suppose that all the g machines at Stage 1 perform the product processing and switching operations in a paced way and the size of the batches to be processed are same.Then, if the size of each batch is no less than  =  ×− , Stage 2 can operate uninterruptedly.
Proof.When the g machines at the first stage start to process a batch at the same time, then the inventory between Stages 1 and 2 should increase over time due to   < .Assume that after t0 time units elapse, a batch at each machine at Stage 1 is just completed.At this time, every one of the g machines switches from processing one batch to another exactly at the same time.Then, the inventory between the two stages decreases over time since Stage 2 continuously consumes the inventory.After  time units elapse, the inventory reaches zero.In this way, there are always products for Stage 2 to produce such that it cannot be interrupted since the g machines at Stage 1 start to process a batch at the same time, leading to the inventory between Stages 1 and 2 increasing over time.This means that in this situation, the size of the batches is minimal.The inventory between Stages 1 and 2 changes periodically over time, as shown in Figure 2. Thus, we have that during time t0, each ma-

Proof. With
< , as illustrated in Figure 3, before the completion of the first batch, the production rate of M1i is As illustrated in Figure 3, it follows from (1) that, at time 2, and iℕg, the average production rate of M1i can be calculated as Notice that Θ > 0 since α g < β results in α < gβ.With Lemmas 1 and 2, to develop a method such that Stage 2 can operate uninterruptedly, we have the following result for one of the cases.
, is the j-th batch in the processing sequence for M 1i , for Proof.With α g < β, as illustrated in Figure 3, before the completion of the first batch, the production rate of As illustrated in Figure 3, it follows from (1) that, at any time t2  (Tiu + , Ti(u+1)], iℕ g, (i)  2, and 1  u  (i)  1, the average production rate of M1i can be calculated as .Hence, at time t2, Tiu +  < t2  Ti(u+1), iℕg, (i)  2, and 1  u  (i)  1, the production rate of M1i is greater than As illustrated in Figure 3, it follows from (1) that, at any time t3  (Tiu, Tiu + ), iℕg, (i)  2, and 1  u  (i)  1, the average production rate of M1i can be calculated as  In this case, to ensure that the machines at Stage 2 can operate uninterruptedly, it requires that the number of products in any batch should be greater or equal to .By the conditions given in Theorem 1, it implies that before any changeover for product switching, there is enough inventory in the buffer between the two stages such that Stage 2 cannot be starved during the setup time .Furthermore, by Theorem 1, it can be concluded that, if the conditions given in Theorem 1 are satisfied, different batch sequences do not affect the production rate of Stage 2, since it is always in operation no matter how the As illustrated in Figure 3, it follows from (1) that, at time and i∈N g , the average production rate of M 1i can be calculated as Notice that a > 0, b > 0, and c > 0 are constants, so, we can obtain a monotonically increasing function f 1 (x) = ax bx+c .Then, with constants α, u, and δ, another monotonically increasing function f 2 (x) = x αx+uδ can be obtained.Replace T iu +δ ≥ 1 gβ , implying that, at time T iu + δ, i∈N g , η(i) ≥ 2, and 1 ≤ u ≤ η(i) − 1, the production rate of M 1i is no less than 1  gβ .As illustrated in Figure 3, it follows from (1) that, at any time t 2 ∈ (T iu + δ, T i(u+1) ], i∈N g , η(i) ≥ 2, and 1 ≤ u ≤ η(i) − 1, the average production rate of M 1i can be calculated as , i∈N g , η(i) ≥ 2, and 1 ≤ u ≤ η(i) − 1, the production rate of M 1i is greater than 1  gβ .As illustrated in Figure 3, it follows from (1) that, at any time t 3 ∈ (T iu , T iu + δ), i∈N g , η(i) ≥ 2, and 1 ≤ u ≤ η(i) − 1, the average production rate of M 1i can be calculated as Due to 0 < t 3 − T iu < δ, we have Hence, at time t 3 , T iu < t 3 < T iu + δ, i∈N g , η(i) ≥ 2, and 1 ≤ u ≤ η(i) − 1, the production rate of M 1i is greater than 1  gβ .Therefore, by summarizing the production rates of the g machines, we conclude that, at any time during (0, T min ], ∑ g i=1 ϑ it ≥ 1 β , or the total production rate of Stage 1 is greater than or equal to 1  β for any t ∈ (0, T min ].
In this case, to ensure that the machines at Stage 2 can operate uninterruptedly, it requires that the number of products in any batch should be greater or equal to Θ.By the conditions given in Theorem 1, it implies that before any changeover for product switching, there is enough inventory in the buffer between the two stages such that Stage 2 cannot be starved during the setup time δ.Furthermore, by Theorem 1, it can be concluded that, if the conditions given in Theorem 1 are satisfied, different batch sequences do not affect the production rate of Stage 2, since it is always in operation no matter how the batches are sequenced.However, there may be batches with size less than Θ.It raises a question if Stage 2 can operate uninterruptedly if batches with size less than Θ exist.The following theorem presents an answer to it.
In this case, there exist schedules such that when some machines at Stage 1 execute setup activities, there are enough products that have been processed at Stage 1 in the buffer between the stages such that Stage 2 cannot be starved.Then, we examine the case that the batch size of every batch is less than Θ.In this case, we have the following result.
is the j-th batch in the processing sequence for M 1i , then interruptions of Stage 2 cannot be avoided in time interval (0, Proof.It follows from (1) that, at time T iu + δ, i∈N g , η(i) ≥ 2, and 1 ≤ u ≤ η(i) − 1, the production rate of M 1i can be calculated as gβ holds, resulting in that, at time T iu + δ, i∈N g , η(i) ≥ 2, and 1 ≤ u ≤ η(i) − 1, the production rate of M 1i is less than 1  gβ , leading to ∑ g i=1 ϑ it < 1 β , t = T iu + δ.This means that Stage 2 should be starved for some time in (0, T min ], or the theorem holds.
In this case, during the time when some machine is performing setups, there are not enough products in the buffer between the two stages for Stage 2 to process such that Stage 2 has to stop.Up until now, we have examined the existence of a feasible schedule and established the corresponding conditions.It should be pointed out that, to satisfy the condition given in Theorem 2, one needs to properly schedule the batches to be equal to 1  gβ .For the latter, if by Theorem 2, the satisfaction of Constraint (9) implies that the production rate of M 1i is no less than 1 gβ all the time.Therefore, Constraint (9) ensure that the obtained solution is feasible even batches in BT2 are produced by M 1i , i∈N g .

Batch Sequencing for Machines at Stage 1
With the above developed ILP, batches are allocated to each machine at Stage 1 without determining their sequence for feasibility.Thus, based on the solution obtained by solving the ILP, we need to sequence the batches allocated to each machine such that the conditions given in Theorem 2 are met to ensure the feasibility of a solution.Assume that, by solving the ILP, the set of batches allocated to M 1i , i∈N g , is Λ i .We have Then, Algorithm 1 is used to sequence the batches for M 1i , i∈N g, such that the conditions given in Theorem 2 are ensured.

Algorithm 1:
Batch sequencing for M 1i , i∈N g , based on the solution of ILP.

1:
Λ i = ∅ /*initialize the sequenced batches*/; 2: Choose a batch in Λ i and set it to be BH i1 such that ξ i + b i1 ≥ Θ; 3: Choose a batch in Λ i and set it to be BH is such that Λ i ←Λ i \{BH is }; 10: s = s +1; 11: End; In Algorithm 1, Statement 2 ensures that when the first batch BH i1 is determined, we have ξ i + b i1 ≥ Θ, i.e., the conditions given in Theorem 2 are met.Then, by Statements 6-11 in Algorithm 1, it ensures that, with every batch being added, the conditions given in Theorem 2 are met.After performing Statement 11, it results in Λ i = ∅ or |Λ i | = 1.If Λ i = ∅, we can conclude that z ij = 1.In this case, all the batches have been sequenced.If |Λ i | = 1, we simply put the remaining batch in Λ i at the last position.In this way, we obtain a feasible schedule.
Let us analyze the worst-case running time of the algorithm.There are two situations as follows.
Situation 1.If no batch in BT2 is allocated to M 1i (i.e., z ij = 0), initially, there are η(i) batches in Λ i .At this time, the running time of Statements 2 and 7 can be treated as a constant since ξ i + ∑ s j=1 b ij ≥ s × Θ should be held no matter which batches in Λ i is selected based on Theorem 1.Thus, the running time of performing Statements 6-11 is O(η(i)), leading to the worst-case running time of the algorithm is O(η(i)).Situation 2. If z ij = 1 holds, initially, there are η(i) − 1 batches in Λ i .Thus, the worst-case running time of Statement 2) is O(η(i) − 1) = O(η(i)).By performing Statement 6-11, it needs to make a selection for η(i) − 2 times.From the first time to the last time, the worst-case running time of the selections by performing Statement 7) is O(η(i) − 2), O(η(i) − 3), . . ., O(1), respectively.Thus, the worst-case running time of performing Statements 6-11 is O( From the above analysis, the computational complexity of this algorithm is O((η(i)) 2 ) for the worst-case.Note that, to obtain a feasible solution, Statement 2 requires to choose a batch such that ξ i + b i1 ≥ Θ holds, while Statement 7 needs to choose a batch such that It raises a question whether we can find such batches in performing these two statements.The following result answers this question.Theorem 4. Given a solution Λ i from the ILP, Algorithm 1 can find a feasible schedule.
Proof.Given Λ i obtained by solving the ILP, it follows from Constraint (9) that no matter how the batches in Λ i are sequenced, we have Hence, executing Statement 2 can find a batch in Λ i as BH i1 to make inequality ξ i + b i1 ≥ Θ hold.Then, after Statements 3-5 are executed, we repeatedly execute Statements 6-10.Assume that when we execute Statement 7 with This implies that the size of every batch in the current Λ i is less than Θ due to that ξ Moreover, no matter how we sequence the remaining batches in the current Λ i , we × Θ, i∈N g .Thus, there is no problem for executing Statement 7) in Algorithm 1 and the theorem holds.
It follows from Theorem 2 and the above discussion that, by the ILP and Algorithm 1 together, we can obtain a schedule such that the production rate of M 1i is no less than 1  gβ at any time and the total production rate of Stage 1 is no less than 1  β at any time in (0, T min ].Hence, according to Lemma 1, Stage 2 can operate uninterruptedly in (0, T min ]. Note that the ILP together with Algorithm 1 forms a two-step solution method.Figure 4 demonstrates how the two-step solution method is applied to solve a real problem.Specifically, given the batches to be produced, they are partitioned into two parts (i.e., BT1 and BT2) at first.Then, the developed ILP is used to assign the batches to the machines at Stage 1.At last, Algorithm 1 is responsible for sequencing the batches for each machine at Stage 1.In this way, an optimal and feasible schedule is obtained such that Stage 2 can operate uninterruptedly.Remark 1.In this work, for the addressed AGMS, we first analyze the properties of the system and establish the existence condition of feasible solutions by presenting Theorems 1-3.Then, based on the conditions, we develop a two-step solution approach that is implemented by the ILP and Algorithm 1 together.Notice that the problem may be solved in an integrated way by using mathematical programming without establishing the solution existence conditions.However, by doing so, many more binary variables are introduced into the model, resulting in greater difficulty in finding a solution.Thus, by the proposed two-step approach, we greatly reduce the computational burden such that we can find a solution even for large-size application problems, which is demonstrated by the experimental results given in the next section.

Experimental Results
This section uses a real-life AGMS from a company in China as a case problem for validation.As previously described, this AGMS contains five processing steps with the first step and Steps 2-5 forming Stages 1 and 2, respectively; and Stage 2 is the bottleneck and cannot be interrupted.In the experiments, without loss of generality, we just treat Step 2 as the second stage.
For this AGMS, three and five machines are configured for Steps 1 and 2 (g = 3 and h = 5), respectively.It takes 30 s (α = 30 s) for machine M 1i , i ∈ N 3 , to complete a product at Step 1, while it takes 55 s (µ = 55 s) for machine M 2i , i ∈ N 5 , to complete a product at Step 2. It takes 1800 s (δ = 1800 s) to complete setup for M 1i , i ∈ N 3 , while it does not need setup for Step 2. Hence, we obtain α g = 10 s < β = 11 s and Θ = δ g×β−α = 600.Usually, during a scheduling horizon, we have no more than 100 batches for producing and the batch size falls in the interval [50,1150].For this case problem, we also have the following property.
Let Ω denote the batch size for an arbitrary batch.Then, we have Ω mod 5 = 0 or Ω mod 10 = 0.With batch size in [50, 1150], batches whose size is less than 600 exist for producing.Then, according to the above parameters, numerical experiments are performed and results are presented to validate the proposed approach.
In the experiments, we use CPLEX to solve the ILP presented in this paper on a laptop with twelve Intel(R) Core(TM) i7-10750H CPU @ 2.60 GHz.The time taken for finding a solution depends on how many batches to be scheduled.When we need to schedule a small number of batches, we can obtain an optimal solution by an exact solution way.However, if there are a large number of batches to schedule, an exact solution method is not efficient and often impossible to find an optimal solution in a given limited time.Let ζ be the number of batches for the AGMS to produce.Given a ζ in [11,30], we use CPLEX to solve 30 cases and we randomly generate the batch size in [50, 1150] for each case.In total, we generate 600 cases to test the developed ILP.
By experiments, for the cases with ζ ∈ [11,24], optimal solutions can be obtained by the developed ILP for all the cases within 3600 s, while for the cases with ζ ∈ [25,30], within 3600 s, only parts of these cases can be solved such that optimal solutions are obtained.Experimental results for problems with ζ ∈ [11,24] and ζ ∈ [25,30] are summarized in Tables 1 and 2, respectively.Note that Num solved and Num unsolved represent the number of cases that the ILP can and cannot solve within 3600 s, respectively.For the unsolved cases with ζ ∈ [25,30] as shown in Table 2, CPLEX can obtain a solution with a gap between the obtained solution and the lower bound of an optimal one.Such results are summarized in Table 3. From Table 3, we can observe that the gaps are less than 1.5%, implying that CPLEX can obtain very good solutions if optimal solutions cannot be obtained within 3600 s.For much larger size cases (i.e., ζ > 30), to save time in the experiments, we set a condition to terminate the running of CPLEX as follows by observing the gap between the current solution and a lower bound of an optimal solution.The running of CPLEX terminates if such a gap is less than 1% or this gap cannot be achieved within 3600 s.In this way, we test the proposed approach as follows.Given a ζ > 30, 30 experiments (i.e., 30 cases) are carried out for the ILP.In the experiments, we limit the batches to be produced being no more than 110 that it is less than 100 in practice.Thus, a total of 2400 cases are generated to test the proposed method.
In the experiments, when a case cannot be solved within 3600 s even for achieving a gap of 1%, a gap between the current solution and the lower bound of an optimal one can be obtained when CPLEX terminates according to the termination condition.Thus, given a ζ, 30 gaps for 30 randomly generated cases can be obtained so as to obtain a boxplot for each ζ ∈ [31,110].In this way, in total, we have 80 boxplots for different situations with different ζ ∈ [31,110] and they are shown in Figure 5. From the boxplots, we can intuitively know the central location and dispersion range of the gaps for each situation, and if the gaps obtained by the ILP for different situations are stable, i.e., check if the ILP can obtain good solutions for different situations stably.To understand the reason behind the data analysis results, we also try to analyze the ILP.For real application problems from an AGMS in China, the size of the ILP is directly affected by the number of batches to be produced since the number of machines at Step 1 is determined.Then, by adjusting the number of batches in BT1 and BT2, the changes of the number of variables and constraints of the ILP are shown in Figures 6 and 7, respectively.From Figures 6 and 7, we can observe that the number of variables and constraints are linear with the number of batches for producing.This means that for real application problems, as the number of batches increases, the number of variables or constraints increases linearly rather than exponentially.This leads to the fact that even if the size of the problems increases, the ILP is still applicable for obtaining good solutions.It follows from the boxplots that for 91.25% of (or 73) situations (boxplots), the median number is no more than 0.5%.For the rest of the seven situations, the median number is just a little larger than 0.5%.This means that for each situation, the median number of gaps is relatively small.Further, from Figure 5, we can intuitively know that most of the gaps for each situation are no more than 1%.Meanwhile, by observing the shapes of boxplots, the gaps obtained by the ILP are quite small and stable for different situations.Further, we observe that it can solve 96.83% of the cases by the ILP for a gap of 1% within 3600 s, while only 3.17% of the cases (i.e., 76 cases) cannot be solved.For these unsolved cases, we have that the average gap of these cases is 2.1827% and the maximum gap is 4.9416%.Therefore, based on the data analysis for the much larger size problems, good solutions for different situations can be obtained by CPLEX within a reasonable time, i.e., the established approach is efficient and effective in terms of practical applications.
To understand the reason behind the data analysis results, we also try to analyze the ILP.For real application problems from an AGMS in China, the size of the ILP is directly affected by the number of batches to be produced since the number of machines at Step 1 is determined.Then, by adjusting the number of batches in BT1 and BT2, the changes of the number of variables and constraints of the ILP are shown in Figures 6 and 7, respectively.From Figures 6 and 7, we can observe that the number of variables and constraints are linear with the number of batches for producing.This means that for real application problems, as the number of batches increases, the number of variables or constraints increases linearly rather than exponentially.This leads to the fact that even if the size of the problems increases, the ILP is still applicable for obtaining good solutions.
is determined.Then, by adjusting the number of batches in BT1 and BT2, the changes of the number of variables and constraints of the ILP are shown in Figures 6 and 7, respectively.From Figures 6 and 7, we can observe that the number of variables and constraints are linear with the number of batches for producing.This means that for real application problems, as the number of batches increases, the number of variables or constraints increases linearly rather than exponentially.This leads to the fact that even if the size of the problems increases, the ILP is still applicable for obtaining good solutions.As we have emphasized in the Introduction, if the problem is formulated by a mathematical programming model without the established feasibility conditions, we need to identify all the products for sequencing instead of just identifying the batches, leading to a huge number of binary variables being necessary to form the model.However, by the proposed two-step solution method, to formulate the ILP, we need to identify and allocate the batches only so that there are much fewer binary variables and constraints.Hence, the computational complexity for solving the problem is greatly reduced.Moreover, by Algorithm 1, we can efficiently sequence the batches for producing by a machine.This is why the proposed method can find good solutions within a reasonable time.
In practice, often a mid-term schedule is generated for an AGMS and this is hierarchically carried out in a two-step way, as follows: (1) At the first step, according to the customer orders, a relatively rough schedule is developed for a relatively long-time horizon that typically lasts for a month.This scheduling horizon is divided into several uniform slots with each slot lasting for 5-7 days.Then, with the capacity of the AGMS considered, this schedule determines the batches to be produced in each time slot by using simple heuristic algorithms, such that the batches can be produced by the due date.(2) At the second step, detailed schedules are generated to realize the rough schedule for each time slot.Such detailed schedules are also called short-term schedules.For each detailed schedule, it needs to schedule all the activities in an AGMS just as performed in this paper such that the process constraints are satisfied and the productivity of the system is maximized to optimize the profit.As we have emphasized in the Introduction, if the problem is formulated by a mathematical programming model without the established feasibility conditions, we need to identify all the products for sequencing instead of just identifying the batches, leading to a huge number of binary variables being necessary to form the model.However, by the proposed two-step solution method, to formulate the ILP, we need to identify and allocate the batches only so that there are much fewer binary variables and constraints.Hence, the computational complexity for solving the problem is greatly reduced.Moreover, by Algorithm 1, we can efficiently sequence the batches for producing by a machine.This is why the proposed method can find good solutions within a reasonable time.
In practice, often a mid-term schedule is generated for an AGMS and this is hierarchically carried out in a two-step way, as follows: (1) At the first step, according to the customer orders, a relatively rough schedule is developed for a relatively long-time horizon that typically lasts for a month.This scheduling horizon is divided into several uniform slots with each slot lasting for 5-7 days.Then, with the capacity of the AGMS considered, this schedule determines the batches to be produced in each time slot by using simple heuristic algorithms, such that the batches can be produced by the due date.
(2) At the second step, detailed schedules are generated to realize the rough schedule for each time slot.Such detailed schedules are also called short-term schedules.For each detailed schedule, it needs to schedule all the activities in an AGMS just as performed in this paper such that the process constraints are satisfied and the productivity of the system is maximized to optimize the profit.
In this way, a mid-term schedule is formed by the rough schedule and the detailed schedules together.Such a mid-term schedule is repeatedly updated to govern the operation of an AGMS and this is the routine work for an AGMS.It can be seen from the development of the scheduling method presented in this paper, it is not an easy job to generate a detailed schedule for an AGMS.However, in practice, currently this job is done manually by the production engineers.This is a great burden for such an engineer.Moreover, it is very hard to manually generate a detailed schedule to satisfy process constraints and optimize productivity.The proposed approach in this paper provides an effective way to solve this problem.

Conclusions
It is well known that auto models are greatly diversified, leading to a great number of glass products for autos such that automotive glass manufacturing becomes an important part of the automotive industry.An AGMS can be treated as a two-stage flow-shop.In an AGMS, there are strict process constraints: (1) setup with significant time is necessary for the machines at Stage 1; and (2) the machines at the second stage cannot be interrupted.Furthermore, an AGMS operates in customization mode such that there are frequent changeovers for producing different product types.These properties make the scheduling problem of AGMS very challenging.This work investigates this challenging problem by establishing feasible schedule existence conditions.With the conditions, a two-step approach is developed to solve the problem.At the first step, an ILP model is built to allocate the batches to machines at Stage 1.Then, a simple algorithm is given to sequence the batches for each machine.Thanks to the conditions, the size of the ILP is significantly reduced such that good solutions can be obtained in a reasonable time even for large application problems.Extensive experiments are also used to demonstrate the efficiency and effectiveness of the developed approach.For small-size problems, with the number of batches being no more than 24, by CPLEX, ILP can find optimal solutions within 3600 s.For problems with larger sizes, it fails to obtain optimal solutions for all cases within 3600 s.Nevertheless, we set 3600 s as the longest time for obtaining a solution and a gap of 1% for the lower bound of solutions.Then, results show that CPLEX can solve 96.83% cases.Moreover, we can obtain good solutions with the maximum gap 4.9416% for the unsolved cases.
Work in process has important effects on the cost for an AGMS.Hence, it is meaningful to minimize the temporary inventory between the stages.However, we do not take this factor into consideration.In the future, we aim to extend the proposed approach by considering this factor.The number of batches to be scheduled The size of the j-th batch in BT2 Variables in the developed ILP: Binary variable, 1 if the j-th batch in BT1 is processed at M 1i , zero otherwise y ij Binary variable, 1 if the j-th batch in BT2 is processed at M 1i , zero otherwise z ij Binary variable, 1 if the j-th batch with size Φ j is processed at M 1i at last, zero otherwise ξ i Integer variable representing the number of extra products to be processed at M 1i with their type being same as the one in BH i1 Γ Time needed to complete the processing of all batches at Stage 1

Figure 2 .Theorem 1 . 1 𝛽
Figure 2. The changes of the inventory between Stages 1 and 2 over time.

Figure 2 .
Figure 2. The changes of the inventory between Stages 1 and 2 over time.

Machines 2023 , 20 Figure 4 .Remark 1 .Figure 4 .
Figure 4.The flowchart of the proposed two-step solution method.Remark 1.In this work, for the addressed AGMS, we first analyze the properties of the system and establish the existence condition of feasible solutions by presenting Theorems 1-3.Then, based on the conditions, we develop a two-step solution approach that is implemented by the ILP and Algorithm 1 together.Notice that the problem may be solved in an integrated way by using mathematical programming without establishing the solution existence conditions.However, by doing so, many more binary variables are introduced into the model, resulting in greater difficulty in Figure 4.The flowchart of the proposed two-step solution method.

Figure 6 .
Figure 6.The number of variables of the developed ILP for different cases.

Figure 6 .
Figure 6.The number of variables of the developed ILP for different cases.Figure 6.The number of variables of the developed ILP for different cases.

Figure 6 . 20 Figure 7 .
Figure 6.The number of variables of the developed ILP for different cases.Figure 6.The number of variables of the developed ILP for different cases.Machines 2023, 11, x FOR PEER REVIEW 16 of 20

Figure 7 .
Figure 7.The number of constraints of the developed ILP for different cases.

1 β = µ/h δ Setup time for a machine at Stage 1 Θ 1 µ
Abbreviations: AGMS Automotive glass manufacturing system BT1 Batch Type 1 BT2 Batch Type 2 ILP Integer linear program PVB Polyvinyl Butyral TMFS Two-machine flow shop TSFS Two-stage flow-shop TSFFS Two-stage flexible flow-shop Notation: BH ijThe j-th processed batch at M 1i b ij Batch size of the j-th batch (i.e., BH ij ) to be processed atM 1i f 1 (x) = a × x/(b × x + c), a > 0, b > 0, and c > 0 f 2 (x) = x/(α × x + u × δ) gThe number of machines at Stage 1 hThe number of machines at Stage 2 M 1iThe i-th machine at Stage 1 M 2jThe j-th machine at Stage 2 mThe number of batches in BT2 whose batch size is smaller thanΘ N k = {1, 2, . . ., k} Num solvedThe number of cases that ILP can solve within 3600 s Num unsolved The number of cases that ILP cannot solve within 3600 sO i (≥ Θ)The size of the i-th batch in BT1 T ij Time point when BH ij has just been completed atM 1i T min = min(T iη (i) | i∈Ng ) α Time units to complete a product by a machine at Stage 1 β = µ/h δ Setup time for a machine at Stage 1 Θ = δ/(gβ − α) η(i) The number of processed batches at M 1i Λ i Set of batches assigned to M 1i obtained by solving an ILP except the one belonging to BT2 with z ij = 1 µ Processing time of a machine at Stage 2 ϑ it Average productivity at M 1i during time interval [0, t] ζThe number of batches to be scheduled

Table 3 .
Gaps between current solutions and lower bounds of optimal solutions.