Heuristics for the Buffer Allocation Problem with Collision Probability Using Computer Simulation

The standardmanufacturing system for Flat Panel Displays (FPDs) consists of a number of pieces of equipment in series. Each piece of equipment usually has a number of buffers to prevent collision between glass substrates. However, in reality, very few of these buffers seem to be used. This means that redundant buffers exist. In order to reduce cost and space necessary for manufacturing, the number of buffers should be minimized with consideration of possible collisions. In this paper, we focus on an in-line system in which each piece of equipment can have any number of buffers. In this in-line system, we present a computer simulation method for the computation of the probability of a collision occurring. Based on this method, we try to find a buffer allocation that achieves the smallest total number of buffers under an arbitrarily specified collision probability. We also implement our proposed method and present some computational results.


Introduction
Reflecting the increasing demand for Flat Panel Displays (FPDs) such as LCDs and plasma display panels, more effective methods for their manufacture are required.Production rate is continually improving with technological advances such as the rapid enlargement of glass substrates and the miniaturization of patterns.Accordingly, production lines have to be modified to accommodate such advances, and new optimization problems to be solved continue to arise.One introduction in the production line of FPDs is an advanced system called Crystal Flow [1].It targets a higher level of line control in next-generation production processes as well as in existing lines.
The main flow of the FPD process is shown in Figure 1 [2].Each piece of processing equipment in Figure 1 has a specialized role, such as cleaning, coating, proximity exposing, developing, etching, and resist stripping, and those pieces of equipment are connected in-line.Each piece of equipment usually has a number of buffers.Most production lines adopt a simple strategy to feed glass substrate into the first piece of equipment at a constant interarrival time, this being called the tact time.This strategy is simple and enables us to estimate the number of products that can be manufactured in a given time.
Due to solution foaming, chemicals, heat treating, and so forth, the processing time at each piece of equipment is uncertain and may vary according to the conditions at that time.If a sheet of substrate is sent to a piece of equipment that is still processing a previously sent sheet of substrate, that newly sent sheet can wait at a buffer in front of the piece of equipment.However, if, at that time, all buffers in front of the piece of equipment are occupied by previously sent sheets, there will be no buffer for the newly sent sheet to wait in.This phenomenon is called a collision between substrates.Collisions should be avoided whenever possible because glass substrate is expensive and fragile.Moreover, stopping the active system in the middle of production due to a collision could result in a significant increase in cost.
In the field of scheduling theory, a collision-like phenomenon is called a blocking in the flow shop model and is studied as an important factor to determine line efficiency.If the processing time is deterministic, many study results on blocking exist (see extensive survey in [3]).If the processing time is stochastic, study results are somewhat limited in comparison with their deterministic counterparts.For example, see [4,5], where the purpose is to minimize the expected makespan.On the other hand, in queueing theory, depending on the rule for processing blockings (blocked calls cleared, blocked calls delayed, etc.), previous work mainly focused on performance measures in the steady state.In fact, we can find a lot of research on this in the field of queuing theory, for example, in [6][7][8].
In this paper, given the number of jobs to be processed in the prescribed tact time span, we focus on the measure recently presented in [9], which is the probability that there will be at least one collision, called the collision probability.In a comparatively new manufacturing system such as one manufacturing FPDs, the evaluation item (i.e., collision probability) is the new focus of observation.
The probability density function (pdf) of actual processing time is often represented by a bell-like curve such as in Figure 2(e).The pdf of normal distribution is also bellshaped, but it has a weakness in that the pdf takes positive values in the negative domain, which is not true in the pdf of actual processing time.Therefore, in this paper, we assume that the processing time follows an Erlang distribution.
The pdf of Erlang distribution is defined as follows: where two parameters  and  are a positive real number and a positive integer, respectively.Its expectation and variance are given by / and / 2 , respectively.Therefore, under Erlang distribution, we can set the expectation and the variance independently of each other by setting parameters  and  appropriately.In Figure 2, five different probability density functions are plotted, where expectations of all cases are the same (i.e., one), but their variances decrease through cases (a)-(e) in Figure 2. Some of these pdfs are bell-shaped, and the pdf of Erlang distribution takes a value of zero for  < 0. Thus, Erlang distribution is flexible enough to represent actual processing times.
For the in-line machines model without buffers, studies on collision probability have been conducted.The evaluation item (i.e., collision probability) in the in-line machines model was first presented in [9].It was shown in [9] that the collision probability can be approximately expressed by a multiple integration, assuming that the processing time of each piece of equipment follows general distribution.If the processing time follows Erlang distribution, a closed form formula of the approximate collision probability is derived without using any multiple integration [10].A computer simulation method for computing the collision probability was also presented in [9].This method can compute the probability for the processing time of general distribution.Note that those results obtained in [9,10] do not consider buffers; that is, the number of buffers is assumed to be zero.In contrast, the inline machine model in this paper considers buffers.
In a real FPD production line, in order to avoid collision between substrates, a number of buffers are placed in front of each piece of equipment.However, in reality, very few buffers seem to be used, and a large amount of money and space is wasted due to those that are not used.In designing an actual line, the number of buffers is often decided in advance from past experience.To the best of the authors' knowledge, no theoretical literature exists on the appropriate number of buffers to be used.Therefore, our research focuses on finding an optimal value for the number of buffers.
In this paper, we generalize the in-line machines model in [9,10] to accommodate buffers.We present a computer simulation method for computing the collision probability in the model, in which each piece of equipment has an arbitrary number of buffers.This method is efficient as it computes in linear time whether a collision occurs or not at each piece of equipment.Next, we parameterize the collision probability and try to find a buffer allocation that achieves the smallest total number of buffers under an arbitrarily specified collision probability.The optimization problem is henceforth referred to as the buffer allocation problem with collision probability.Next, we present heuristics for this problem, characterized in that it computes a locally optimal solution.Finally, we implement the heuristics and confirm its performance from computational experimentation.
The remainder of this paper is organized as follows.In Section 2, we describe a formal model for the production line of FPDs.Then we formulate our problem as an optimization

Entrance Exit
In-line system problem.In Section 3, we consider how to derive start and finish times of each job at each piece of equipment, with each piece of equipment having an infinite number of buffers.
In Section 4, we present a computer simulation method to evaluate the exact collision probability.In Section 5, based on the simulation method, we present heuristics to minimize the total number of buffers.In Section 6, we give some computational results and confirm that the heuristics computes good solutions in realistic computation time.Finally, Section 7 concludes this paper.

Model and Problem Formulation
We describe a formal model for the production line of FPDs.
The following notations are used: (i)  1 ,  2 , . . .,   :  different pieces of equipment in series.Each piece of equipment performs a dedicated role.
(iii)  (iv)  tact (> 0): tact time, that is, the time difference between the start time instants of   and  +1 for all 1 ≤  ≤  − 1 at the entrance to the line.
(v)   (∈ Z + ): the number of buffers in front of   , where Z + denotes the nonnegative integer set.
The in-line machines model is illustrated in Figure 3.With the same time interval,  tact , jobs are fed one by one into the line at the entrance.Each job is first processed on piece of equipment  1 .It is then automatically transported to the next piece of equipment  2 after it has been finished on  1 .It is assumed, for simplicity, that the transportation time between pieces of equipment is nil.As soon as  2 receives the job, it starts processing.In this manner, each job is processed on consecutive pieces of equipment in the order  1 ,  2 , . . .,   and then sent to the exit.Moreover, we assume that the processing time  ()  at   is a random variable that follows Erlang distribution with parameters   and   , and all When a job   arrives at a piece of   , the system dynamics is as follows.If   is idle, it starts processing for   .Otherwise, if an empty buffer exists in front of   , then   waits at the buffer.When waiting, the queue discipline follows First-In-First-Out (FIFO), where all jobs are processed in the same order as they arrive in the queue.Since the number of buffers in front of   is   , the length of the queue can be, at most,   .In Figure 3,  1 = 2,  2 = 3, and   = 1.When all buffers in front of   are occupied (i.e., the length of the queue in front of   is   ), if   arrives at   , then a collision occurs.The collision probability is the probability that there will be at least one collision.
The sequence of the number of buffers in front of each piece of equipment, that is, ( 1 ,  2 , . . .,   ), is called a buffer allocation.It is called feasible if the collision probability is less than or equal to a given value .Then our problem, that is, buffer allocation problem with collision probability (BAP-CP), is stated as follows.Given the number of jobs , the number of pieces of equipment , the tact time  tact , the parameters of the Erlang distribution for each piece of equipment, and  (0 ≤  ≤ 1) (specifying the collision probability), minimize the objective function  = ∑  =1   (i.e., total number of buffers) over the set of all feasible buffer allocations.An optimal buffer allocation is a feasible buffer allocation that achieves the smallest objective value.

Scheduling When the Number of Buffers Is Infinite
We consider a schedule under the assumption that the number of buffers in front of each piece of equipment is infinite.The schedule is a mapping    → ( : 1 ≤  ≤ ), where the variables   for 1 ≤  ≤ , 1 ≤  ≤ .Then, using processing times  ()  , we can compute a schedule as follows.  is started on   after the completion of two events, these being (i)   is finished on  −1 and (ii) unit times.Moreover, we can consider that each   is finished on  0 at the time instant ( − 1) tact since each job is fed into the line at the entrance with  tact interval.Therefore, the following recursive expressions hold: (2) From (2), the time complexity for computing the schedule is (), as filling each entry requires (1) time.The obtained schedule is used to compute the collision probability in the next section.
Time axis

Computing the Collision Probability
The number of buffers should be minimized in order to reduce the cost and space needed for manufacturing.However, the larger the decrease in the number of buffers is, the more the collision probability increases.A trade-off between them exists.When considering this trade-off, it is important to evaluate the collision probability under a given buffer allocation.Using the schedule obtained in the previous section, we present a simulation method to evaluate the exact collision probability.Definition 1.A waiting sequence in front of   is a subsequence of jobs (  ,  +1 , . . .,   ) for some 2 ≤  ≤  ≤  such that for all  = , +1, . . ., .A waiting sequence (  ,  +1 , . . .,   ) in front of   is called maximal if adding any job ( −1 or  +1 ) would destroy that property.A maximal waiting sequence (  ,  +1 , . . .,   ) in front of   , such that its length (i.e., −+1) is the largest over all maximal waiting sequences in front of   , is called maximum. The −1 in Definition 1 means that   is still processing  −1 when each   ( = , . . ., ) arrives at   from  −1 .Therefore, all jobs in the waiting sequence will wait at the buffers in front of   .However, a collision occurs if the length of the waiting sequence is larger than the number of buffers   .In other words, when the length of the maximum waiting sequence in front of   is lower than or equal to   , no collision will occur in front of   .
Using the example shown in Figure 4, we consider an efficient method to compute whether a collision at   occurs or not.In Figure 4, each  (−1)  and  ()  ( = 1, 2, . . ., ) is given.When   is processing   , a waiting sequence in front of   can be computed as follows.Starting from  = ,  is incremented by one for each successive .If the condition is true, the waiting sequence in front of   is ( +1 , . . .,   ).Therefore, if the length of the sequence (i.e.,  − ) is larger than   , then a collision occurs; otherwise,  is incremented by one.On the other hand, if the condition is false,   is finished on   before   arrives at   .Therefore, when   is processing the next job  +1 ( is incremented by one), we compute a waiting sequence in front of   .Note that, throughout this computation, the values of  and  are never decreased, and either  or  is incremented by one after the evaluation of the condition.Therefore, we can compute whether a collision at   occurs or not in at most 2 evaluations of the condition.In Figure 4, the waiting sequence ( 3 ,  4 ,  5 ,  6 ,  7 ) is maximum.Therefore, the value of   needs to be at least five to avoid a collision.
From the above discussion, Pseudocode 1 computes whether a collision at   occurs or not.The computation time is ().
Using COLLISION CHECK(  ), we can compute the collision probability in the in-line machines model as follows.

Algorithm 2 (SIMULATE).
Input.The input is the number of jobs , the number of pieces of equipment , the number of buffers   for all 1 ≤  ≤ , the tact time  tact , the parameters of the Erlang distribution for each piece of equipment, and a positive integer  (specifying the number of iterations, which is related to the accuracy for the collision probability).
Output.The output is the collision probability.
Step 3. Compute the schedule of each job using (2).
Step 5. Output the collision probability (the number of collisions evaluated in Step 4)/.For Steps 2, 3, and 4 in SIMULATE, the computation time is ().Since Steps 2, 3, and 4 are repeated  times, the computation time of SIMULATE is ().

Heuristics for BAP-CP
In this section, we present heuristics for BAP-CP.The heuristics is composed of three stages.Stage 1 computes a buffer allocation ( 1 ,  2 , . . .,   ) such that the collision probability is almost exactly zero from simulation.Therefore, the buffer allocation corresponds to an approximate upper bound on the optimal buffer allocation ( * 1 ,  * 2 , . . .,  *  ).In other words,  *  ≤   is assumed for each .
Step 3. Compute the schedule of each job using (2).
Step 4. Compute the length of the maximum waiting sequence in front of each piece of equipment.For each   , if the length of the maximum waiting sequence is greater than   , update the value of   to this length.Let loop := loop + 1.
If loop ≤   , return to Step 2.

< 𝑓𝑡 (𝑗)
is true, the length of the waiting sequence is  − .Therefore, the maximum value of  −  throughout the while loop corresponds the length of the maximum waiting sequence in front of   .Thus, the length can be computed in linear time.At Step 4 in Stage 1, the   is a positive integer constant for the computation of the buffer allocation ( 1 ,  2 , . . .,   ).The value of   is related to the accuracy for the buffer allocation ( 1 ,  2 , . . .,   ).
Stage 2 computes a feasible buffer allocation ( 1 ,  2 , . ..,   ) for BAP-CP.From Stage 1, the upper bound   on the number of buffers   for each  is obtained.Therefore, we search for the value of   for each  between 0 and   , inclusive.For this, two variables left  and right  for each  are used, these being lower and upper bounds on   , respectively.
Step 3.With the current buffer allocation ( 1 ,  2 , . . .,   ), compute the collision probability   by using SIMULATE.Throughout SIMULATE, record the index  of   at which the most collisions occur.
In Stage 2, starting from   = 0 for each , the value of each   is increased until the current buffer allocation is feasible.When increasing the value of each   , we take a greedy approach.This means that the value of   is increased for   , the machine at which the most collisions occur.For the computation, the return value of COLLISION CHECK(  ) corresponds to the index of the piece of equipment at which a collision occurs.Note that the value of each   does not decrease throughout Stage 2. This may result in an excessive number of buffers for each   .To remedy this, we apply Stage 3.
Stage 3 computes an appropriate value of each   using the binary search method.
The binary search for the value of   corresponds to Steps 2-6.The binary search is based on the property that the collision probability decreases monotonically with the value of   .After performing Stage 3, the obtained buffer allocation ( 1 ,  2 , . . .,   ) is clearly feasible, and subtracting any value from any   would destroy the feasibility.Therefore, the obtained buffer allocation is locally optimal.
We analyze the time complexity of the heuristics.In Stage 1, the computation time is () for Steps 2, 3, and 4. Since Steps 2, 3, and 4 in Stage 1 are repeated   times, the computation time of Stage 1 is (  ).Next, the computation related to Step 3 in Stage 2 obviously dominates the total computation time for Stage 2. The total number of iterations of Step 3 is Step 3 costs (), the total computation time of Stage 2 is ( 2  max 1≤≤ log   ).Finally, the analysis for Stage 3 is the same as that of Stage 2. Therefore, the computation time of the heuristics is (   +  2  max 1≤≤ log   ).

Computational Experiment
The heuristics is implemented on a PC (CPU: Intel Core i7 4 GHz, RAM: 32 GByte, OS: Windows 8.1 Professional).Throughout all simulations, we use Mersenne Twister [11] as the pseudorandom generator, and the number of iterations is set to  =   = 10, 000.First, we survey the relationship between  (specifying the collision probability) and the total number of buffers .For this, the number of jobs is set to  = 100, the number of pieces of equipment is set to  = 8, and the parameters of the Erlang distributions are set so that the expectation and variance of the processing time on each piece of equipment become equal to 1 and 0.01, respectively (i.e.,  = 100,  = 100 in (1)).The results obtained by the heuristics are shown in Figure 5. Figure 5 shows a tendency that the value of  decreases with an increasing value of , clearly exhibiting the trade-off between  and .Note that, although the value of  decreases sharply over small values of , the value of  decreases by very small amounts when the value of  exceeds a certain threshold.Moreover, each buffer allocation shows a tendency that the values of   for pieces of equipment found earlier in the production line, such as  1 and  2 , are a little larger than those for other pieces of equipment.
Figure 5 shows the results when  tact = 1.00, 1.02, 1.04, and 1.06.We can confirm that the relationship between  and  is almost the same for each tact time, and the value of  decreases with an increasing value of  tact when the value of  is fixed.The CPU time necessary for computing each marker in Figure 5 is at most 90 seconds.
Next, we survey the relationship between the tact time  tact and the total number of buffers  when  = 0.In a real FPD production line, collisions should be avoided whenever possible.For this, the parameter  corresponding to the collision probability is set to zero.The value of  is set to 100 and 1,000.The other parameters are the same as the settings in the first computational experiment (i.e.,  = 8,  = 100, and  = 100).The results obtained by the heuristics are shown in Figure 6. Figure 6(a) shows a tendency that the value of  decreases with an increasing value of  tact .
We discuss a "good" value for tact time using Figure 6.Note that the value of  decreases by very small amounts when the value of  tact exceeds a certain threshold  upper tact .In Figure 6(a), the value of  upper tact is about 1.2 and does not seem to depend on the value of .The value of  should be minimized in order to reduce cost and space necessary for manufacturing.Moreover, the value of  tact should be minimized in order to minimize the makespan.Therefore, any value of  tact which is lower than or equal to the threshold  upper tact can be considered an effective value from the standpoint of the minimization of the value of  tact under small values of .
The average makespan corresponding to each marker in Figure 6(a) is shown in Figure 6(b).Note that the makespan is  ()   , which is computed from (2).The average makespan increases with an increasing value of  tact when the value of  tact is larger than a certain threshold  lower tact .It can be considered that the threshold  lower tact is equal to the largest value of the average processing times for all pieces of equipment.In Figure 6(b), the threshold  lower tact is 1.0 and does not seem to depend on the value of .On the other hand, the average makespan remains almost constant when the value of  tact is lower than  lower tact .The reason is that the length of the waiting sequence in front of   increases, where the expectation of the processing time at   is assumed to be the maximum.If there is more than one such   , then the index  is assumed to be the smallest index  among these   .As a result, the time instant  ()   at   for each   is almost the same when  tact <  lower tact .(In the case of Figure 6(b), the value of  is one.)Therefore, any value of  tact which is larger than or equal to the threshold  lower tact can be considered an effective value, since the makespan does not improve when  tact <  lower tact .From the discussion related to Figure 6, any value of  tact between  lower tact and  upper tact can be considered one of the most effective values from the viewpoint of cost, space, and makespan necessary for manufacturing.
Finally, we survey the relationship between  tact and  in the cases of three types as in Table 1.The reason is that the expectation of the processing time is not always the same value for each piece of equipment in a real production line.The other parameters are as follows:  = 100,  = 8, and  = 0.The results obtained by the heuristics are shown in Figure 7. From Figure 7, we could understand that there is not so much of a difference among the three types.However, Type 1's  value is the smallest when the value of  tact is small.Therefore, when the value of  tact is small, Type 1 is the most effective, then Type 2, and finally Type 3.
For each type, the average makespan is almost the same when  tact is fixed.Throughout the three types, the average makespan is almost constant when  tact ≤ 4 and increases with an increasing value of  tact when  tact ≥ 4. The reason is that, for each type, the largest value of the average processing times for all pieces of equipment is the same (i.e., four).

Conclusions
In this paper, we considered the in-line machines model with buffers.This is a generalized model of the known model in [9,10].We formulated the buffer allocation problem with collision probability.The problem has applications in the design of manufacturing systems.We also presented the heuristics to solve the problem.The heuristics computes a locally optimal buffer allocation in realistic computation time.Moreover, we implemented the heuristics and showed its performance through computational experimentation.We also discussed the effective values for tact time from a practical point of view.The discussion might be useful when designing production systems.This paper presented the discussion in an in-line system.Discussion in a parallel or network system could be considered as one possible area of future work.
: processing time of job   at   .
are defined as follows: (i)  ()  : time instant when job   is started on   , (ii)  ()  : time instant when job   is finished on   .Suppose that processing time  ()  is equal to  ()

Figure 4 :
Figure 4: An example of the schedule at  −1 and   when  = 8.The broken lines correspond to evaluations of the condition  (−1)  <  ()  .
Stage 1 is similar to SIMULATE.At Step 4 in Stage 1, the length of the maximum waiting sequence in front of   can be computed in a way similar to COLLISION CHECK(  ).Specifically, Steps 4 and 5 in COLLISION CHECK(  ) are rewritten as follows.When the condition  (−1)

Figure 5 :
Figure5: The relationship between  and  when  tact = 1.00, 1.02, 1.04, and 1.06.Each marker corresponds to the result obtained by the heuristics.

Figure 6 :Figure 7 :
Figure 6: (a) The relationship between  tact and  when  = 0. (b) The relationship between  tact and the average makespan when  = 0.Each marker corresponds to the result obtained by the heuristics.
≤ ) obtained from (2) the number of jobs , and the number of buffers   .

Table 1 :
The expectation of the processing time on each piece of equipment.For all types, the variance of the processing time on each piece of equipment is 0.01.