Introduction

Mixed- model assembly lines are common in automobile industry since they allow to produce a great variety of products in the same line. The efficiency of the line strictly depends on production sequence, i.e., scheduled sequence, which is determined to keep line’s work station loads and material consumption as smooth as possible. If station overloading or material shortage occurs, the cycle time increases, and hence the line throughput decreases (Jadhav et al. 2015; Rabbani et al. 2016, Rane and Sunnapwar 2017). Therefore, to meet daily demands, it is very important to keep this scheduled sequence constant during the manufacturing stages. However, even the production starts with respect to the scheduled sequence, this sequence is altered during manufacturing processes due to intentional and unintentional reasons. Intentional sequence alteration is needed to minimize costs related with downstream departments (Ding and Sun 2004; Sun et al. 2015; Lahmar et al. 2003; Boysen et al. 2012). For instance, paint shop admires to paint same color of vehicles in large batches to reduce paint purges. Unintentional sequence alteration occurs due to unpredictable sequence disturbances such as defective vehicles, material shortages, machine breakdowns and need instant solutions (Boysen and Zenker 2013; Inman 2003; Meissner 2010).

Recovering the altered sequence is called as car resequencing problem in the literature and firstly introduced by Parrello et al. (1986). To recover the altered sequence due to both intentional and unintentional reasons, a pre-assembly buffer, i.e., painted body stock (Mehrjoo and Bashiri 2013), is located between paint and FA departments. This buffer restores the sequence by (i) changing the positions of vehicles in the altered sequence, resequencing function and (ii) inserting spare vehicles instead of defective vehicles or late vehicles which fell behind more than buffer capacity, so it is not possible to change the position of a vehicle by just resequencing, storage function.

There are two types of buffers commonly used in the industry: ASRS and mix-bank. Even two buffers restore the altered sequence by their resequencing and storage functions, the difference comes from their working principle. Every storage unit in ASRS has a unique access, so a vehicle in the postpaint sequence, i.e., the exit order of vehicles leaving paint shop, can be inserted into any storage unit; similarly any vehicle in the ASRS buffer can be released into FA entrance sequence without any precedence rules. However, mix-bank buffer has parallel lanes; each acts as a queue and works with first-in-first-out (FIFO) principle.

Studies in the literature except Ding and Sun (2004) and Gunay and Kula (2017) consider resequencing function of the buffer rather than its storage function. These studies can also be classified into two fold: (i) buffer capacity determination problem, and (ii) FA entrance sequence determination problem. Inman (2003) determines buffer capacity of an ASRS type buffer to restore the altered sequence for a specified service level defined by car manufacturers. Meissner (2010) also studies buffer capacity determination problem for restoring the altered sequence for mix-bank type buffer and also compares the resequencing performances of both ASRS and mix-bank buffer by measuring the similarity between FA entrance sequence and scheduled sequence. Gusikhin et al. (2008) find optimal FA entrance sequence that minimizes the violation from FA station capacities for ASRS type buffer. Boysen et al. (2010, 2011) consider same problem for other common buffer type, pull-off table. They also perform a numerical study to determine buffer capacity. Extending these researches on pull-off table, Boysen and Zenker (2013) propose exact and metaheuristic methods to decide FA entrance sequence under minimization of FA constraint violation for mix-bank buffer. Mehrjoo and Bashiri (2013) propose a decision support system to predict the production capability of an automobile company for a given production plan based on the historical shop floor data. They consider the stochastic nature of the production environment in terms of defect occurrences, machine breakdowns, etc. and suggest a logistic regression-based prediction tool to do a pre-check on production planning before the detailed plan on FA sequence and the number of spare vehicles to be located in the pre-assembly buffer.

FA entrance sequence determination problem is dynamic and should be considered in a rolling horizon fashion. To find the optimal FA entrance order, the problem must be solved considering all the vehicles in the line. However, it is not possible to know the sequence of vehicles that leave paint shop in advance since randomly occurred paint defects mixes the sequence unintentionally. Additionally, it is not possible to stop the flowing line to determine optimal FA sequence that perfectly overlaps with scheduled sequence. The order of the vehicle in the FA entrance sequence must be decided instantly and there is no time to wait for the optimal FA entrance sequence. Boysen et al. (2012) call this type of resequencing as reactive resequencing. Therefore, the action of whether to store the coming vehicle in the buffer or allocate it to the FA entrance sequence must be decided instantly.

Recovery effectiveness of the altered sequence is measured by Scheduled Sequence Achievement Ratio (SSAR). SSAR shows the ratio of correctly ordered vehicles in the FA entrance sequence with respect to scheduled sequence. To succeed high SSAR, storage function is important as resequencing function since it is not always possible to increase SSAR by just changing the positions of vehicles in the postpaint sequence. Therefore, spare vehicles located in the buffer can be inserted instead of defective or late vehicles. Determination of the number of spare vehicles in the buffer from each model and color is called as buffer content determination problem. Ding and Sun (2004) propose a queuing model to determine the number of spare vehicles stored in the buffer under random defect occurrences. However, their model is away from satisfying a specific match ratio between FA entrance and scheduled sequence. Their model determines spare vehicles to sustain a daily production level.

Gunay and Kula (2017) also consider buffer content problem to maximize SSAR under random paint defect occurrences. Their model assumes that the resequencing decision in the FA sequence is performed optimally. However in practice, before FA, resequencing and storage functions of the buffer are performed by workers since there is no time to solve the optimal FA entrance sequence of vehicles. Therefore, workers need to make instant decisions in the line. In this study, we propose a rule-based heuristic model to determine spare vehicle model–color combinations in the ASRS buffer when workers recover the scrambled sequence according to pre-defined rules. The contribution of our study to the literature is in twofold: (i) consideration of the instant decision making of the assembly line, (ii) consideration of unintentional sequence alteration caused by randomly occurred paint defects to determine number of spare vehicles in the buffer that maximizes SSAR. Once the buffer content is determined based on heuristic rules, workers proceed the resequencing rules to decide FA entrance sequence. Therefore, from the point of instant decision-making needs of the mixed-model line, our model determines the number of spare vehicle content for the case where the resequencing is made with respect to the pre-defined rules by workers. Since we consider randomly occurred paint defects, the problem is modelled by stochastic programming.

In section “Two-stage stochastic rule-based model”, we propose a two-stage stochastic rule-based model to determine number of spare vehicles from each model and color under heuristic rules defined for workers that maximizes SSAR. Section “Sample average approximation (SAA) algorithm” discusses our solution methodology, Sample Average Approximation (SAA) algorithm. Section “Numerical study” performs a numerical study to compare the solutions of rule-based model with optimal solutions. Section “Conclusion” concludes the paper and articulates the importance and the contribution of the problem also discusses the future extension of the study.

Two-stage stochastic rule-based model

Our objective is to determine the number of spare vehicles kept in the buffer from each model and color to restore the scrambled postpaint sequence respect to the predefined rules for workers. Figure 1 illustrates how our proposed model provides a solution to recover the scrambled postpaint sequence. Assume a block of postpaint sequence includes four vehicles S = 4 and ai shows the order of the vehicles from left to right to properly represent the flow in the postpaint sequence, \(a_{S} = (4,1,3,2)\). The abbreviations “M” and “C” represent the model type and the color of the vehicles. For instance, M1C5 shows that the vehicle is Model 1 type and its color number is 5. Defective vehicles in the sequence are represented as \(\xi \left( \omega \right) = (1,0,0,0)\), where “1” indicates that the fourth vehicle in the block is defective. The pre-assembly buffer restores the scrambled postpaint sequence before FA by its resequencing and storage functions. Resequencing function is performed with the empty locations in the buffer. Therefore, there should be enough space in the buffer for resequencing vehicles before FA. In Fig. 1; all the vehicles except the defective ones (1, 3, 2) are temporarily stored in the buffer and then released according to the scheduled sequence. Since the fourth vehicle is defective, it is taken from the line to touch-up area for repainting. A same model and color spare vehicle is released instead of defective vehicle (4th). The first stage of our stochastic model determines the number of spare vehicles from each model and color, i.e., buffer content, needs to be stored in the buffer. Determining the buffer content is critical to recover the postpaint sequence. If the desired model–color vehicle is not stored in the buffer, it will not be possible to restore the postpaint sequence. The second stage of the model decides the releasing order of the vehicles to FA \(y_{ijkh}\), based on the rules defined for workers that maximizes SSAR. In Fig. 1 respect to the solution of the second stage model, the FA sequence is determined as \(a^{\prime }_{S} = (S[4],3,2,1)\), where S[4] shows that a spare vehicle is released instead of 4th vehicle.

Fig. 1
figure 1

Recovering the postpaint sequence by two-stage stochastic model

Our first stage variable, which shows the number of vehicles, should be kept in the pre-assembly buffer from each model j and color k \(x_{jk}\) is decided before random event \(\left( \xi \right)\), paint defects, occurred. Following, according to the realization of paint defects, FA entrance sequences of vehicles are decided based on the rules defined for workers that maximizes SSAR. The rules defined for workers are below:

  • Rule 1 Defective vehicles must be taken off the line.

  • Rule 2 The sequence alteration is performed for each block of “NLV” vehicles. Let b shows the block number, any vehicle in the previous or next blocks must not be assigned to block b.

  • Rule 3 For every block of NLV vehicles, assign vehicles to FA sequence as close as scheduled sequence.

  • Rule 4 Remaining vehicles for each block should be randomly assigned. However, capacity constraint of FA for each model j must not be violated. If this is not possible, leave empty spaces between difficult models to avoid overloading in FA stations.

Model parameters

$$S = {\text{Sequence size}}$$
$$M = {\text{Total type of vehicles}}$$
$$C = {\text{Total number of colors}}$$
$$d_{ijk} \left( \xi \right) = \left\{ \begin{array}{ll} 0, & \quad if\; i^{th}{\text{}} \;{\text{model}}\; j \;{\text{and color}}\; k\; {\text{car is defective}} \\ 1, &\quad {\text{otherwise}} \\ \end{array} \right.$$
$$H_{j} :S_{j} = {\text{no more than }}H_{j} {\text{vehicle is allowed out of }}S_{j} {\text{vehicles}}$$
$$\it \it \it \it \it sc_{jkh} = \left\{\begin{array}{ll} 1, & {\text{if model}}\;j \;{\text{and color}}\;k \;{\text{car is assigned to position}\;h\;\text{in the scheduled sequence}} \\ 0,& {\text{otherwise}} \\ \end{array} \right.$$
$$NLV = {\text{Number of vehicles in a block that is resequenced}}$$
$$BC = {\text{Buffer capacity}}\;\varepsilon = {\text{Very small number}}\;BM = {\text{Very big number}}$$

Decision variables

$$x_{jk}= \text{number of model} \ j \text{ color}\ k\text{ vehicles in the buffer}$$
$$y_{ijkh} \left( \xi \right) = \left\{ \begin{array}{ll} 1, &{\text{if}}\;i^{th} {\text{model}}\; j \; {\text{color}}\; k\; {\text{car in the postpaint sequence is assigned to}}\; h^{th} {\text{position in FA sequence}} \\ 0, &{\text{otherwise}} \\ \end{array} \right.$$
$$z_{jkh} \left( \xi \right) = \left\{ {\begin{array}{ll} 1, &{\text{if}}\; {\text{model}}\; j \; {\text{and color}}\; k\; {\text{car in the buffer is assigned to}}\; h^{th} \;{\text{position in FA entrance sequence}} \\ 0, & {\text{otherwise}}\\ \end{array} } \right.$$

Decision expressionsκ

$$f_{jkh} \left( \xi \right) = \left\{ \begin{array}{ll} 1, & {\text{if model }}j\; {\text{color }}k \;{\text{car is assigned to }}h^{th}{\text{position in the FA entrance sequence}} \\ 0, & {\text{otherwise}} \\ \end{array} \right.$$
$$\gamma_{jkh} \left( \xi \right) = \left\{ \begin{array}{ll} 1, & {\text{if violation occurs}} \;b/w \;{\text{FA and scheduled sequence in the}}\; h^{th}\; {\text{position for model}}\; j \;{\text{and color}}\; k \\ 0, & {\text{otherwise}} \\ \end{array} \right.$$

Subscripts

$$i:{\text{The position number of the vehicles in the postpaint sequence}} \;i = 1, \ldots ,S$$
$$h:{\text{The position number of the vehicles in the FA entrance sequence}} \;h = 1, \ldots ,S$$
$$j:{\text{The number of different models }} j = 1, \ldots ,M$$
$$k:{\text{The number of different colors }} k = 1, \ldots ,C$$

In the following model, we write all the rules as a linear constraint. Our first stage problem is presented by Eqs. (1) and (2). The objective function in Eq. (1) maximizes scheduled sequence achievement ratio, SSAR. According to constraint in Eq. (2), the number of spare vehicles must not exceed the buffer capacity.

$$\mathop {\hbox{max} }\limits_{x} f\left( x \right) = E\left[ {Q\left( {x,\xi } \right)} \right]$$
(1)
$$\mathop \sum \limits_{j = 1}^{M} \mathop \sum \limits_{k = 1}^{C} x_{jk} \le BC$$
(2)

Objective function \(Q(x,\xi )\) in Eq. (1) is the objective function of the second stage problem presented by Eqs. (317) below. The objective function \(Q(x,\xi )\) maximizes the SSAR and written as in Eq. (3).

$$\hbox{max} Q(x,\xi ) = \left( {1 - \frac{{\mathop \sum \nolimits_{j = 1}^{M} \mathop \sum \nolimits_{k = 1}^{C} \mathop \sum \nolimits_{h = 1}^{S} \gamma_{jkh(\xi )} }}{S}} \right) \times 100$$
(3)
$$d_{ijk} \left( \xi \right) = \mathop \sum \limits_{h = 1}^{S} y_{ijkh} \left( \xi \right) \quad \forall i = 1, \ldots ,S;j = 1, \ldots ,M;k = 1, \ldots ,C$$
(4)
$$\mathop \sum \limits_{j = 1}^{M} \mathop \sum \limits_{k = 1}^{C} y_{ijkh} \left( \xi \right) = 0 \quad \forall i = 1, \ldots ,S;h < \left\lfloor{\frac{i}{NLV} - \varepsilon}\right\rfloor \times NLV + 1$$
(5)
$$\mathop \sum \limits_{j = 1}^{M} \mathop \sum \limits_{k = 1}^{C} y_{ijkh} \left( \xi \right) = 0 \quad \forall i = 1, \ldots ,S;h > \left\lceil {\frac{i}{NLV}}\right\rceil \times NLV$$
(6)
$$\begin{aligned} y_{ijkh} \left( \xi \right) + z_{jkh} \left( \xi \right) > BM\left[ {d_{ijk} \left( \xi \right) + sc_{jkh} - 2} \right] \quad \forall i = 1, \ldots ,S;j = 1, \ldots ,M;k = 1, \ldots ,C; \hfill \\ \left\lfloor{\frac{i}{NLV} - \varepsilon}\right\rfloor \times NLV + 1 \le h \le \left\lceil {\frac{i}{NLV}}\right\rceil \times NLV \hfill \\ \end{aligned}$$
(7)
$$\begin{aligned} y_{ijkh} \left( \xi \right) + z_{jkh} \left( \xi \right) \le \varepsilon \left[ {d_{ijk} \left( \xi \right) + sc_{jkh} } \right] + 1 \quad \forall i = 1, \ldots ,S;j = 1, \ldots ,M;k = 1, \ldots ,C; \hfill \\ \left\lfloor{\frac{i}{NLV} - \varepsilon}\right\rfloor \times NLV + 1 \le h \le \left\lceil {\frac{i}{NLV}}\right\rceil \times NLV \hfill \\ \end{aligned}$$
(8)
$$f_{jkh} \left( \xi \right) = \mathop \sum \limits_{i = 1}^{S} y_{ijkh} \left( \xi \right) + z_{jkh} \left( \xi \right) \quad \forall j = 1, \ldots ,M;k = 1, \ldots ,C;h = 1, \ldots ,S$$
(9)
$$\gamma_{jkh} \left( \xi \right) \ge sc_{jkh} - f_{jkh} \left( \xi \right) \quad \forall j = 1, \ldots ,M;k = 1, \ldots ,C;h = 1, \ldots ,S$$
(10)
$$\mathop \sum \limits_{k = 1}^{C} \mathop \sum \limits_{h^\prime\ = h}^{{{ \hbox{min} }\{ h + S_{j} - 1,S\} }} f_{jkh^{\prime}} \left( \xi \right) - \left(1 - \mathop \sum \limits_{k = 1}^{C} f_{jkh} (\xi )\right)BM \le H_{j} \quad \forall j = 1, \ldots ,M;h = 1, \ldots ,S$$
(11)
$$\mathop \sum \limits_{j = 1}^{M} \mathop \sum \limits_{k = 1}^{C} f_{jkh} \left( \xi \right) \le 1 \quad \forall h = 1, \ldots ,S$$
(12)
$$\mathop \sum \limits_{i = 1}^{S - 1} \mathop \sum \limits_{j = 1}^{M} \mathop \sum \limits_{k = 1}^{C} \mathop \sum \limits_{h = i + 1}^{S} y_{ijkh} (\xi ) \ge 1$$
(13)
$$\mathop \sum \limits_{j = 1}^{M} \mathop \sum \limits_{k = 1}^{C} y_{ijkh} \left( \xi \right)\left( {i - h} \right) + \mathop \sum \limits_{j = 1}^{M} \mathop \sum \limits_{k = 1}^{C} x_{jk} \le BC\quad \forall i > h;i = 2, \ldots ,S;h = 1, \ldots ,S - 1$$
(14)
$$x_{jk} \ge \mathop \sum \limits_{h = 1}^{S} z_{jkh} \left( \xi \right)\quad \forall j = 1, \ldots ,M;k = 1, \ldots ,C$$
(15)
$$y_{ijkh} \left( \xi \right),z_{jkh} \left( \xi \right),\gamma_{jkh} \left( \xi \right)\epsilon \left\{ {0,1} \right\} \quad \forall i = 1, \ldots ,S;j = 1, \ldots ,M;k = 1, \ldots ,C;h = 1, \ldots ,S$$
(16)
$$x_{jk} \in \left\{ {Z^{+} } \right\}\,\quad \forall j = 1, \ldots ,\;M;\;1,\;k=1, \ldots ,\;C$$
(17)

According to Rule 1, defective vehicles are re-sent to paint and not released to FA. This rule is written in Eq. (4). Since resequencing decision is made for each block includes “NLV” vehicles, vehicles in block “b” cannot jump forward to a previous block “b1” in the FA entrance sequence as constraint (5) shows. Similarly, vehicles in block “b” cannot jump backward to following block “b + 1” as in constraint (6). Rule 2 is satisfied by both constraints (5) and (6). Size of a block “NLV”is kept small enough to allow workers making sequence adjustments. It is bounded with five vehicles in our numerical study.

Equations (7) and (8) are written to satisfy Rule 3. According to rule 3; every coming “NLV” vehicles from paint shop are resequenced with respect to the scheduled sequence. Equation (9) shows the FA entrance sequence of vehicles. FA entrance sequence both includes vehicles arriving from postpaint sequence, \(y_{ijkh} \left( \xi \right)\) and spare vehicles stored in the buffer, \(z_{jkh} \left( \xi \right)\). Equation (10) compares the FA entrance and scheduled sequence. This equation is written for Rule 3. Equation (11) prevents assembly constraint violation for each vehicle model type. Equation (12) allows leaving spaces between vehicles in the FA entrance sequence. Rule 4 which is satisfied by Eqs. (11) and (12) assigns vehicles to the FA sequence to prevent model constraint violations and leaves empty spaces between difficult models to avoid overloading in FA.

Equations (1317) are needed to solve the rule-based heuristic model and do not involve the rules defined to workers. Equation (13) guarantees that at least one vehicle must jump ahead in the FA entrance sequence (see Inman 2003). Equation (14) is written to satisfy capacity constraint. Buffer capacity should be large enough to temporarily store vehicles in the postpaint sequence for changing the positions and store spare vehicles. Not all the spare vehicles in the buffer may be released to the FA entrance sequence as seen in Eq. (15). Lastly, Eqs. (1617) present the variable types used in the model.

Sample average approximation (SAA) algorithm

Calculation of the expected scheduled sequence achievement ratio \(E[Q\left( {x,\xi } \right)]\) is difficult when number of scenarios is large (Santoso et al. 2005). In our problem, the number of scenario depends on sequence size, number of model and color types. SAA is a simulation based algorithm used to predict the expectation of the true problem by sampling (Kleywegt et al. 2001). The idea is predicting the objective function and solution of the true problem by taking a sample size of N and solve the problem in Eq. (18) known as SAA problem. In Eq. (18), x and cT shows the optimal spare vehicles in the buffer of SAA problem, i.e., first stage variable, and the cost occurred due to first stage variable x, respectively. However, no cost occurs according to first stage variable x. Therefore, the SAA problem in Eq. (18) is rewritten as in Eq. (19). The optimal solution and the first stage variable of the true problem are presented by \(z^{*}\) and \(x^{*}\) respectively. The optimal solution and the first stage variable of the SAA problem are presented by \(z_{N}\) and \(\widehat{x}\). As the size of N increases, the difference between the optimal solution \(z^{*}\) and SAA problem \(z_{N}\) converges to very small number \(\varepsilon\).

$$\widehat{z}_{N} = \mathop {\hbox{max} }\limits_{x \epsilon X} \left( {c^{T} x + {\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 N}}\right.\kern-0pt} \!\lower0.7ex\hbox{$N$}}\mathop \sum \limits_{n = 1}^{N} Q(x,\xi^{n} )} \right)$$
(18)
$$\widehat{z}_{N} = {\mathop {\hbox{max} }\limits_{x \epsilon X}} \left( {{\raise0.7ex\hbox{$1$} \!\mathord{\left/ {\vphantom {1 N}}\right.\kern-0pt} \!\lower0.7ex\hbox{$N$}}\mathop \sum \limits_{n = 1}^{N} Q(x,\xi^{n} )} \right)$$
(19)

The steps of the SAA are as below:

  • Step (1) Generate R independent samples each of size N. For each r = 1,…, R, solve the SAA problem (Eq. 19) and calculate objective value \(\widehat{z}_{N}^{r}\) and optimal solution \(\widehat{x}_{N}^{r}\) for each rth sample. Optimal solution \(\widehat{x}_{N}^{r}\) is a vector which shows the optimal number of spare vehicles in each model–color, \(\widehat{x}_{N}^{r} = \left[ {\widehat{x}_{11} , \ldots ,\widehat{x}_{jk} , \ldots ,\widehat{x}_{MC} } \right].\)

  • Step (2) Calculate the expected objective value \(\overline{z}\) of R problems in step 1, \(\overline{z} = \frac{1}{R}\mathop \sum \nolimits_{r = 1}^{R} \widehat{z}_{N}^{r}\), and find the maximum of solutions \(\widehat{x}^{*} = \mathop {\text{argmax}}\nolimits_{{\widehat{x}_{N}^{r} }} \left\{ {\widehat{z}_{\text{N}}^{\text{r}} } \right\}\). The first stage variable that achieves maximum solution, \(\widehat{x}^{*}\), is the estimator of the optimal spare vehicle model–color combination in the buffer that maximizes SSAR.

  • Step (3) Fix the first stage variable that achieves maximum solution, \(\widehat{x}^{*}\) as a first stage decision variable and increase the sample size from N to N`. Then solve the second stage problem \(\widehat{z}_{N^{\prime} } (\widehat{x}^{*} )\), which is the determination of FA sequence of vehicles under \(\widehat{x}^{*}\) spare vehicles are allocated into the pre-assembly buffer \(\widehat{z}_{{N^{\prime } }} \left( {\widehat{x}^{*} } \right) = \frac{1}{{N^{\prime } }}\mathop \sum \limits_{n = 1}^{{N^{\prime } }} Q(\widehat{x}^{*} ,\xi^{n} )\).

  • Step (4) Estimate the optimality gap \(\widehat{z}_{{N^{\prime } }} \left( {\widehat{x}^{*} } \right) - \overline{z}\) and the variance of the gap \(\widehat{\sigma }_{{\widehat{z}_{N^{\prime }}(\widehat{x}^{*} )}-\overline{z}}^{2} = \widehat{\sigma }_{{\overline{z} }}^{2} +\widehat{\sigma }_{\widehat{z}_{N^{\prime }}(\widehat{x}^{*} )}^{2}\) where variance of \(\widehat{z}_{{N^{\prime } }} \left( {\widehat{x}^{*} } \right)\) equals to \(\widehat{\sigma }_{{\widehat{x}_{N`} \left( {\widehat{x}^{*} } \right)}}^{2} = \frac{1}{{N^{\prime } (N^{\prime } - 1)}}\mathop \sum \limits_{n = 1}^{{N^{\prime } }} [Q\left( {\widehat{x}^{*} ,\xi^{n} } \right) - \widehat{z}_{{N^{\prime } }} \left( {\widehat{x}^{*} } \right)]\) and variance of \(\overline{z}\) equals to \(\widehat{\sigma }_{{\overline{z} }}^{2} = \frac{1}{R(R - 1)}\mathop \sum \limits_{r = 1}^{R} (\widehat{z}_{N}^{r} - \overline{z} )^{2}\).

If optimality gap \(\widehat{z}_{{N^{\prime } }} \left( {\widehat{x}^{*} } \right) - \overline{z}\) is sufficiently small then stop, otherwise increase R, N and N` and repeat steps 1 through 4. In our study, we stop when the optimality gap is less than % 0.2.

Numerical study

In this part of the study, we perform two set of experiments. First part includes the evaluation of the run time of the SAA algorithm while the second part includes the comparison of the SSAR levels obtained from rule-based model and optimal resequencing model. The model is solved by GAMS 23.5.2 using CPLEX solver. All numerical examples are run on an Intel(R) Core(TM)2 Duo 2.67 GHz CPU PC with 2 GB of memory.

In numerical examples, we assume that there are three different model types say Model 1, Model 2, Model 3 and five different colors say Color 1,…,Color 5. The FA constraints for each model type are \(H_{1} :S_{1} = 1/3\), \(H_{2} :S_{2} = 1/3\) and \(H_{3} :S_{3} = 2/3\), respectively. To evaluate the run time of the SAA algorithm, we consider four different sequence sizes: 50, 100, 200 and 400 vehicles under different buffer capacities: 15, 30, 60 and 120 vehicles. For each sequence size, we run the algorithm for five different randomly generated sequences and then report the average the run times on Table 1. For instance, the average run time for five different sequences is 4.8 min for sequence size of 50 vehicles.

Table 1 Run time performance of the SAA algorithm

The company produces 600 vehicles in a day. In Table 1, we solve the problem size of 200 vehicles in 22.1 min and 300 vehicles in 85.5 min. Since the solution time increases exponentially as the sequence increases, the problem can be solved for each shift which includes 300 vehicles. The company shares the production requirements with suppliers 3–4 days before the production starts (Boysen et al. 2012), so company has enough time to solve and make necessary adjustments for spare vehicle production. Once the company determines the optimal number of spare vehicles from each model and color combination, workers will decide on the FA entrance sequence instantly according to the defined rules.

Second part of the numerical study includes a numerical study for calculating the SSAR under different levels of defect rate, buffer capacity and paint entrance ratio (PER). PER is the ratio of vehicles that are in the correct position according to scheduled sequence before paint shop. For high PER levels, the match between paint entrance and scheduled sequence is high and the match is low for low PER levels vice versa. In the numerical study, we consider a sequence of 50 vehicles that includes three different model types and five different colors. PER is considered in four different levels: 30, 50, 70, 90%; defect rate in three levels: 10, 20, 30%; lastly buffer capacity in two levels: 10 and 15 vehicles. Totally, we perform 4 × 3 × 2 = 24 experiments for rule-based resequencing model. The results of the numerical study and the comparison of the rule-based model with optimal resequencing model (Gunay and Kula 2017) are tabulated in Table 2 based on average SSAR levels and 95% confidence intervals (CI). The 95% CI of SSAR for both two models are given in the parenthesis. For instance at 30% PER level with 10% defect rate under 10 vehicles buffer capacity, the average SSAR and 95% confidence interval are 74.83 and 74.2–75.5%, respectively, for optimal resequencing model. For the same parameters, the average SSAR and 95% confidence interval are 64.2 and 63.4–65.2% for rule-based heuristic model. The mean SSAR difference between optimal resequencing and rule-based heuristic model is 10.63%.

Table 2 Comparison of mean SSAR for optimal resequencing model (Gunay and Kula 2017) and rule-based resequencing model

In Table 2 at low PER levels, since rule-based model rebuilds the FA entrance sequence according to the defined rules rather than optimization, mean SSAR difference is high relative to high PER levels. As PER level raises, i.e., the number of vehicles which is correctly ordered with respect to the scheduled sequence increases, there will be less change in the positions of vehicles; so the mean difference between optimal resequencing and rule-based model decreases. Generally, after 50% PER levels, there is no difference between rule-based model and optimal resequencing model. Therefore, if a certain level of similarity between scheduled sequence and paint entrance sequence is achieved, i.e., above 50% PER, rule-based heuristic model can be used instead of optimal resequencing model. As a second insight, the difference between optimal and heuristic solution is very sensitive to the PER rather than defect rate and buffer capacity. At 30% PER in all defect rates and buffer capacities optimal resequencing model outperforms. However in other PER levels, it is possible to achieve same SSAR levels with optimal resequencing model by increasing the buffer capacity or decreasing the defect rate. This insight leads manufacturers that if the coordination between paint and FA is poor, rule-based heuristic model will not be effective as optimal resequencing model.

Table 2 shows that as defect rate increases, the mean SSAR difference between two models increases. The reason can be explained as follows: when defect rate increases, new position assignment of vehicles would be limited and would not be flexible as lower defect rate case so the mean SSAR of both models get closer. Numerical study in Table 2 also shows that enlargement of the buffer capacity increases the mean SSAR difference between two models. Smaller size buffers restrict the position change of vehicles therefore the difference between optimal and rule-based heuristic resequencing model decreases or even same results are obtained from both models. However, larger size buffers allow to change many of the vehicles` positions, so optimal resequencing model outperforms.

Table 3 reports the buffer content of the experiments in Table 2 in terms of model types, colors and quantity. In Table 3, the numbers in the parenthesis show the quantity stored in the pre-assembly buffer from each type of vehicle. In all experiments rule-based resequencing model stores more spare vehicles than optimal resequencing model. A trade-off between holding a large inventory and ceasing the production to decide optimal FA entrance order should be made.

Table 3 Comparison of spare vehicles located in the buffer for rule-based and optimal resequencing model (Gunay and Kula 2017)

Conclusion

In this paper, we develop a two-stage stochastic rule-based model to determine spare vehicles located in ASRS buffer for rebuilding the scrambled postpaint sequence before FA. The model considers unintentional sequence alteration due to paint defects and the need of instant decision-making of the assembly line. Therefore, the number of spare vehicles from each vehicle model–color combination is determined according to the rules performed by workers on the line to resequence the altered sequence. Even different rules are performed by other automobile firms, the spare vehicle content of the buffer can be determined based on these rules. Once the spare vehicles that should be located in the buffer are decided, workers make instant sequence adjustments to restore the sequence and no stoppages occur to wait for the optimal FA entrance order.

We solve the problem with SAA since the number of scenarios exponentially increases due to sequence size and number of model, color type. Then, we perform a numerical study to compare the performance of rule-based model with optimal resequencing model. According to numerical study, (i) as the coordination between paint and FA increases to determine scheduled sequence, i.e., high PER, rule-based model performs as good as optimal resequencing model. (ii) rule-based model is more sensitive to the PER rather than defect rate and buffer capacity, at low PER optimal resequencing outperforms even defect rate or buffer capacity increases. (iii) as defect rate increases, the mean SSAR difference between two models increase, (iv) the increase on buffer capacity increases the mean SSAR difference between two models. (v) rule-based model holds larger inventory and, however, responses quickly, so a trade-off between holding large inventory and ceasing the production to decide optimal FA entrance should be made.

A future extension of the study can be performed to determine spare vehicle content for mix-bank type buffer. Decreasing the solution time of the model is another direction of the study. By using  the metaheuristics, the solution time can be decreased; so the spare vehicle content determination can be performed for a daily production at once.