Scheduling jobshops with some identical or similar jobs

30
Scheduling Jobshops with Some Identical or Similar Jobs Tami Boudoukh and Michal Penn Faculty of Industrial Engineering and Management Technion, Haifa 32000, Israel. e-mail: [email protected] and Gideon Weiss Department of Statistics The University of Haifa, Mount Carmel 31905, Israel. e-mail: [email protected] June 1999, Revised September 2000. Abstract We consider the following job shop scheduling problem: N jobs move through I machines, along R routes, with given processing times, and one seeks a schedule to minimize the latest job completion time. This problem is NP-hard. We are interested in the case where the number of routes and the number of machines are fixed, while the number of jobs varies and is large. We distinguish two cases: If jobs on the same route are identical we provide an approximation algorithm which is within constant of the optimum, no matter how many jobs there are. If jobs on the same route have different processing times, the job-shop scheduling problem can be crudely approximated by a continuous deterministic fluid scheduling problem, with buffers of fluid representing the jobs waiting for each operation. The fluid makespan problem is easily solved Part of this work was done as part of the author’s M.Sc. thesis, done under the supervision of Michal Penn and Gideon Weiss, in the Faculty of Industrial Engineering and Management, Technion, Haifa, Israel. Research supported by the fund for promotion of research at the Technion, and by the fund for joint research Technion - Haifa University. Research supported by US-Israel BSF grant 9400196, German-Israel GIF grant I-564-246.05/97, and by the fund for joint research Technion - Haifa University. 1

Transcript of Scheduling jobshops with some identical or similar jobs

Scheduling Jobshops with Some Identical or Similar Jobs

Tami Boudoukh∗ and Michal Penn†

Faculty of Industrial Engineering and Management

Technion, Haifa 32000, Israel.

e-mail: [email protected]

and

Gideon Weiss‡

Department of Statistics

The University of Haifa, Mount Carmel 31905, Israel.

e-mail: [email protected]

June 1999, Revised September 2000.

Abstract

We consider the following job shop scheduling problem: N jobs move through Imachines, along R routes, with given processing times, and one seeks a schedule tominimize the latest job completion time. This problem is NP-hard. We are interestedin the case where the number of routes and the number of machines are fixed, while thenumber of jobs varies and is large. We distinguish two cases: If jobs on the same routeare identical we provide an approximation algorithm which is within constant of theoptimum, no matter how many jobs there are. If jobs on the same route have differentprocessing times, the job-shop scheduling problem can be crudely approximated by acontinuous deterministic fluid scheduling problem, with buffers of fluid representingthe jobs waiting for each operation. The fluid makespan problem is easily solved

∗Part of this work was done as part of the author’s M.Sc. thesis, done under the supervision of MichalPenn and Gideon Weiss, in the Faculty of Industrial Engineering and Management, Technion, Haifa, Israel.†Research supported by the fund for promotion of research at the Technion, and by the fund for joint

research Technion - Haifa University.‡Research supported by US-Israel BSF grant 9400196, German-Israel GIF grant I-564-246.05/97, and by

the fund for joint research Technion - Haifa University.

1

using constant flow rates out of each buffer for the entire schedule, and the optimalfluid makespan is a lower bound on the discrete optimal makespan. We describe twoheuristics which imitate the fluid solution. We present some preliminary numericalresults.

1 Introduction

The scheduling of computer and manufacturing systems has many applications and has been

the subject of extensive research since the early 1950s. We consider the job-shop scheduling

problem where N jobs move through I machines, along R routes, with given processing

times. Our aim is to find a schedule that minimizes the makespan, i.e. the time of the last

job completion. The job-shop scheduling problem is NP-hard [10]. It is in fact notoriously

hard. While anybody may be able (with considerable effort) to schedule 4 jobs on 3 machines,

going to as few as 10 jobs on 10 machines reaches the frontier of expertise in combinatorial

optimization [7].

We are interested in the case where R, the number of routes, and I, the number of

machines, are fixed, while the number of jobs on each route, Jr, r = 1, . . . , R, varies and is

large. In practice, in particular in factories, the routes may correspond to various production

processes, or to various types of products. In that case the jobs may correspond to parts

or lots and there will be many such jobs for each route. There is no clear indication in

the theory that a problem with many jobs and a small number of routes is easier to solve

optimally than a problem with the same number of jobs in which all the jobs follow different

routes. The point of this paper is however to demonstrate that it is relatively easy to obtain

good approximate solutions for such problems.

The reason for that is simple. Let T ∗ be the maximum over all machines, of the total

amount of work which each of the machines has to do to complete all the jobs. This is

obviously a lower bound on the makespan, we call it the machine lower bound. Define

similarly the maximum over all jobs, of the total processing time of each job summed over

its whole route. This is also a lower bound, we call it the job lower bound. For fixed routes, as

the number of jobs will increase the machine lower bound will dominate the job lower bound

by far. Under those circumstances one would hope that the optimal makespan would be

quite close to the machine lower bound. This suggests the use of heuristics which ignore the

details of the problem and aim to get close to the machine lower bound. Towards this aim

one can approximate the job shop scheduling problem crudely by a fluid scheduling problem,

as suggested by Weiss, [23]. Weiss [23] solved this fluid problem and showed that the optimal

fluid makespan equals T ∗. This fluid solution is the basis to heuristics described in the papers

2

of Bertsimas and Gamarnik [4], and Dai and Weiss [8], as well as to the heuristics which

we describe in this paper (see also Boudoukh, Penn and Weiss [5]). We discuss the fluid

scheduling problem in more detail in Section 4.1.

In the first part of this paper, Section 3, we consider the case where all the jobs on the

same route are identical, and the number of jobs on route r is Jr = prJ , where pr, r = 1, . . . , R

are integers, with GCD (greatest common divisor) equal to 1. We call J the multiplicity of the

jobshop, and the total number of jobs is N =∑Rr=1 Jr. In Section 3.1 we follow a derivation

similar to that of Bertsimas and Gamarnik [4] and Dai and Weiss [8], to construct a schedule

with J−K +1 efficient cycles, during which one of the machines, the bottleneck machine, is

always busy; here K is the maximum over all the routes of the number of operations in each

route. This cyclic schedule is preceded and followed by initial and terminal sections of the

schedule, whose length is bounded independently of J . In particular, this implies that the

difference between the makespan of our schedule and the optimal makespan is bounded by a

constant independent of J , and the relative error of the schedule tends to zero as J becomes

large. Put differently, the heuristic makespan is of order T ∗+O(1), where the machine lower

bound T ∗ → ∞ as N → ∞, while the O(1) term is a constant that does not grow with

N . In Section 3.2 we refine the efficient cycles of the schedule, and as a result we achieve a

reduction of up to 50% in the O(1) term.

In the second part of the paper we consider more general problems. One direction to

generalize the problem is to relax the assumption that jobs on each route are identical: If

jobs follow the same route but have different processing times we call them similar. Dai and

Weiss [8] discuss the case of a single route with similar jobs, and show that under probabilistic

assumptions a cyclic schedule with N−O(logN)K efficient cycles is O(logN) away from the

optimum with high probability, so this heuristic achieves a makespan of length T ∗+O(log T ∗)

with high probability. Another direction to generalize the problem is to assume that Jr are

general. Bertsimas and Gamarnik [4] discuss the case of identical jobs and general Jr and

obtain a schedule with O(√N) cycles of equal length, and makespan T ∗ + O(

√T ∗). The

heuristics suggested in these two papers cannot however be extended directly to job shops

with general Jr as well as similar but not identical jobs.

We suggest two algorithms for heuristic scheduling of job shops with similar jobs and

general Jr. These algorithms are based on the fluid solution of Weiss [23] which is described

in Section 4.1. The heuristics use the gap between the precalculated fluid solution and the

actual state of the job shop at any time, to choose the next job to process. The first of these

algorithms which we call the cyclic fluid algorithm (CFA) is a direct generalization of the

cyclic rules of Section 3, and of the heuristic of Dai and Weiss [8]. Indeed we show that it

reduces to the cyclic algorithm of Section 3.1 in the case of identical jobs and proportional

3

Jr = prJ , and it reduces to the algorithm of [8] in the case of similar jobs on a single

route. The other algorithm which we call the greedy fluid algorithm (GFA) can be shown to

dominate the cyclic fluid algorithm if there is only one route. Its main feature is that it can

run without an initial phase of safety stock creation, as it seems to construct its own safety

stocks. We describe the two algorithms in Section 4.2.

In Section 5 we implement our heuristics, using the famous 10× 10 job shop scheduling

problem as a basis for our examples. We chose this problem for our numerical studies for

two reasons: (i) The problem is large and complicated enough for it to be a serious test

for any algorithm. (ii) This problem has been used extensively in studies of job shop exact

methods and heuristics in many papers, so that its use allows comparison of our results to

other studies. We first illustrate the algorithm for the identical jobs case. We then move

to the similar jobs case, where we generate random instances of job shops with similar jobs,

from distributions of processing times with averages taken from the 10 × 10 problem. The

results indicate that the intuition behind our heuristics is sound, and there is a gradual

change as we move away from the identical jobs case. In all our studies the best performance

is obtained from the greedy fluid heuristic with 0 initial safety stocks.

Our aim in this paper is to use the special feature of many jobs on fixed routes to obtain

simple heuristics with good performance. How good are our heuristic in comparison to

approximation schemes for the general job shop problem? It was shown that there can be no

polynomial ε-approximation scheme for the job shop problem (see [24]). Taking a different

approach, based on geometrical ideas expressed by the Steinitz Lemma, Sevastyanov [20, 21]

(see also [3]) describes a polynomial time algorithm, which achieves additive suboptimality

bounded by a quantity proportional to the longest job-step.

In our context, Sevastyanov’s algorithm has complexity N2K2I2, and constructs a sched-

ule with makespan bounded by T ∗ + (K − 1)(IK2 + 2K − 1) × Xmax, where Xmax is the

maximum of the processing times of operations, over all the operations of all the jobs. In

particular, this gives a makespan of length T ∗ + O(1) for the identical jobs case, with pro-

portional as well as general Jr. However, the virtue of generality of Sevastyanov’s method in

comparison to our special algorithms has the drawback that it has much higher polynomial

complexity, and a much larger worst case performance O(1) term. For example, in the case

of the 1000-multiplied 10 × 10 problem, our schedule is constructed in ∼ 104 arithmetic

operations, while Sevastyanov’s requires ∼ 1011, and Sevastyanov’s worst case bound for the

makespan of a problem of this size is T ∗ + 898, 858 where T ∗ = 631, 000, while our heuristic

produced (see Section 5) a schedule with makespan ∼ T ∗ + 800.

For the similar jobs case Sevastyanov’s algorithm gives no absolute performance guar-

antees, but it is asymptotically optimal if Xmax/T∗ → 0 as the problem size increases. In

4

particular, under reasonable probabilistic assumptions, T ∗ = O(N), while Xmax = O(logN).

Hence the bound of Sevastyanov is comparable in asymptotic terms to the performance of

the heuristic of Dai and Weiss [8], but dominates the T ∗+√T ∗ performance of the heuristic

of Bertsimas and Gamarnik [4].

Some recent work of Sevastyanov and Woeginger [22] and of Jansen, Solis-Oba and Sriv-

idenko [15] is using a different approach to ours, but seems to promise results of comparable

quality.

We note that our cyclic heuristic as well as the heuristic of Dai and Weiss [8] have

some similarity to the drum buffer rope scheduling heuristic suggested by Goldratt [11, 12],

for the simpler flow shop scheduling problem. For some earlier work on high multiplicity

scheduling problems and on cyclic schedules the reader is directed to Hochbaum and Shamir

[14], Roundy [19], Matsuo [17], McCormick, Pinedo, Shenker and Wolf [18], and Hanen [13].

Part of this work appeared previously in [5, 6].

2 Preliminaries and Notations

Consider a job shop problem with machines i = 1, . . . , I, and routes r = 1, . . . , R. Route

r consists of operations (r, o), o = 1, . . . , Kr, which need to be processed in that order.

Operation (r, o) is processed by machine σ(r, o). Let Ci, i = 1, . . . , I be the set of operations

done by machine i, i.e. the partition (r, o) ∈ Ci ⇐⇒ i = σ(r, o).

We assume that there are Jr jobs to be processed on route r and let N =∑Rr=1 Jr be the

total number of jobs. We denote by (r, ·, j) the jth job on route r, and let (r, o, j) be the

oth operation of job (r, ·, j). Each job has its own processing times: We denote by Xr,o,j the

processing time of operation (r, o, j), i.e. the oth operation of the j’th job on route r. We

also let mr,o be the average processing time of operation (r, o), that is, mr,o = 1Jr

∑Jrj=1 Xr,o,j.

A schedule for this job-shop consists of assignment of machines to jobs, where each

machine can work on only one job at a time and each job can be processed by only one

machine at a time, so as to process all the operations of all the jobs, in the required order

of operations. We assume a non-preemptive model, so that each operation (r, o, j) needs

to receive its required processing duration Xr,o,j without interruption. A schedule produces

job departure times: Dr,·,j is the completion time of operation (r,Kr, j), the last operation

of job j on route r. The makespan of the schedule is the completion time of the last

job, T = maxr=1,...,R j=1,...,Jr Dr,·,j. Our aim is to find a schedule which will minimize the

makespan.

Consider the jobs on route r which have completed operation (r, o− 1) but have not yet

5

completed operation (r, o) at time t. We refer to the collection of these jobs (one of which

may in fact be in process) as the buffer of operation (r, o), and we denote their number

by Qr,o(t). If (r, o) ∈ Ci, we say that buffer (r, o) belongs to machine i. At time zero

Qr,1(0) = Jr, Qr,o(0) = 0, o = 2, . . . , Kr.

A well known simple lower bound on the makespan can be computed easily through the

machine workloads. The workload of machine i is:

Ti =∑

(r,o)∈Ci

Jr∑j=1

Xr,o,j =∑

(r,o)∈CiJrmr,o, i = 1, . . . , I.

Clearly, the makespan is at least the maximum workload on any machine. Let:

T ∗ = maxi=1,...,I

Ti, i∗ ∈ arg maxi=1,...,I

Ti.

We call T ∗ the machine lower bound. We call machine i∗ a bottleneck machine. It is a

machine with the highest workload.

We will consider:

Identical jobs - All the jobs of route r are identical, that is Xr,o,jDef= Xr,o = mr,o, j =

1, . . . , Jr.

Similar jobs - Jobs on route r are similar in the sense that they share the same route, but

they may have different processing times Xr,o,j, j = 1, . . . , Jr, with averages mr,o.

Proportional number of jobs - There are fixed integers p1, . . . , pR with greatest common

divisor 1, such that the number of jobs on the different routes are Jr = prJ, r = 1, . . . , R.

Here pr are fixed proportions, and Jr increase at the same rate as we let the multiplicity

J become large.

General number of jobs - The number of jobs on the different routes are Jr, and we let

N =∑Rr=1 Jr →∞.

3 The Case of Proportional Number of Identical Jobs

In this section we consider a job shop with a proportional number of identical jobs. There is

a total of N = J∑Rr=1 pr jobs, and the Jr = prJ jobs on route r have identical processing

times.

For simplicity and without loss of generality we assume that all the routes have the

same number of operations, Kr = K; this can be achieved by adding zero processing time

6

operations to routes with fewer operations. We assume that J > K, and in fact we assume

that J is a large number which we will allow to vary. For the sake of definiteness, we number

the jobs of route r consecutively from 1 to Jr. We process the jobs in buffer (r, o) according

to this order. As a result the order of service in each buffer (r, o), o > 1 is FIFO (first in first

out). This makes no difference to the machines, since all the jobs on route r are identical.

We define a cyclic schedule as follows. In each complete cycle, operation (r, o) is performed

on exactly pr jobs. Machine i performs its work for the cycle, which consists of the pr

repetitions of operations (r, o) ∈ Ci, for all r = 1, . . . , R in some fixed order which is repeated

in each cycle. Within this order, service at each buffer is FIFO. Apart from that there are

no restrictions on the fixed order of the operations.

A cycle time, C, is defined by

C = max1≤i≤I

∑(r,o)∈Ci

prXr,o.

Thus, the cycle time is the time needed for the bottleneck machine to process pr operations

from each of its buffers (r, o). Note that the machine lower bound is equal to T ∗ = JC.

Lemma 3.1 If at time t each buffer contains Qr,o(t) ≥ pr jobs, then a complete cycle can

be performed, between time t and time t + C.

Proof: Since a complete cycle requires operation (r, o) to be performed exactly pr times,

there are enough jobs available in the buffers so that each of the operations can be performed

without any delay. Hence the total time needed to perform all the operations on machine i

is∑

(r,o)∈Ci prXr,o, which is ≤ C. Note that throughout the cycle, operation (r, o) is carried

out on jobs which are in buffer (r, o) at the initial time t. ✷

A partial cycle is defined as follows: If at the initial time t buffer (r, o) has Qr,o(t) < pr,

skip operation (r, o) throughout the cycle. We have immediately:

Corollary 3.2 A partial cycle can be performed in a time which is ≤ C.

We initiate our cyclic schedule with the creation of safety stocks of at least pr jobs in

each buffer (r, o). We do so by performing partial cycles for a total duration of tf . This is

followed by complete cycles until some buffers are empty, at which point we again perform

partial cycles for a duration te until all buffers are empty and all jobs are complete. We turn

now to a precise description and analysis of the algorithm.

7

3.1 The Algorithm for Proportional Number of Identical Jobs

We use early start non-idling policy within each cycle (partial or complete), that is all the

machines start the cycle together and each machine performs all its work for the cycle without

interruptions. When this work is completed the machine idles until the end of the cycle. The

cycle ends when the last machine finishes its work.

Step 1: Perform K − 1 partial cycles.

Step 2: Perform J −K + 1 complete cycles.

Step 3: Perform K − 1 partial cycles.

Theorem 3.3 Let TH be the makespan of the schedule obtained by the Algorithm. Then,

TH ≤ JC + (K − 1)C.

Proof: Throughout the schedule, if buffer (r, o) contains pr jobs at the beginning of a cycle,

and if buffer (r, o + 1) contains 0 jobs or pr jobs at the beginning of a cycle (partial or

complete), then at the end of the cycle buffer (r, o + 1) contains pr jobs. This is because all

the pr jobs from buffer (r, o) will move to buffer (r, o + 1), while all the 0 or pr jobs which

start in buffer (r, o + 1) will move out of buffer (r, o + 1). Similarly, if buffer (r, o) is empty

at the beginning of a cycle, and if buffer (r, o+1) contains 0 jobs or pr jobs at the beginning

of a cycle (partial or complete), then at the end of the cycle buffer (r, o+ 1) contains 0 jobs.

For all routes r = 1, . . . , R the algorithm starts at time 0 with buffer (r, 1) containing

prJ jobs, and buffers (r, o), o = 2, . . . , K empty.

It is seen immediately that at the end of the mth cycle, m < K, for all routes r = 1, . . . , R,

buffers (r, 1) contain pr(J − m) jobs, buffers (r, o), o = 2, . . . ,m + 1, contain pr jobs, and

buffers (r, o), o > m + 1 are empty.

Let tf be the time at which the K − 1th cycle is complete. Then tf ≤ (k − 1)C, and

at time tf for all routes r = 1, . . . , R, buffers (r, 1) contain pr(J −K + 1) jobs and buffers

(r, o), o = 2, . . . , K, contain pr jobs.

Given the state at tf we can now perform J−K +1 complete cycles, each taking time C.

At the end of the mth cycle, K ≤ m ≤ J , for all routes r = 1, . . . , R, buffers (r, 1) contain

pr(J −m) jobs and buffers (r, o), o = 2, . . . , K, contain pr jobs.

At the end of J cycles, at time tf + (J − K + 1)C, for all routes r = 1, . . . , R, buffers

(r, 1) are empty and buffers (r, o), o = 2, . . . , K, contain pr jobs.

8

We now perform K − 1 additional partial cycles, for a total duration te ≤ (K − 1)C. At

the completion of the mth cycle, J < m ≤ J + K − 1, for all routes r = 1, . . . , R, buffers

(r, o), o = 1, . . . ,m − J + 1 are empty, and buffers (r, o), o = m − J + 2, . . . , K, contain pr

jobs.

At the completion of cycle J+K−1, at time TH = tf +(J−K+1)C+te ≤ T ∗+(K−1)C

the system is empty. ✷

Note that during cycle m we perform a single operation on each of a total of Nm different

jobs, where

Nm =

m∑Rr=1 pr, 1 ≤ m < K,

K∑Rr=1 pr, K ≤ m ≤ J,

(J + K −m)∑Rr=1 pr, J < m ≤ J + K − 1.

Of course∑J+K−1m=1 Nm = NK. In the first K − 1 cycles, no jobs are completed. Thereafter,

in the following J cycles, pr jobs from route r, for r = 1, . . . , R, are completed in each cycle.

Note also the following: Consider job (j, ·, r), the jth job in the numbering of the jobs on

route r, where 1 ≤ j ≤ Jr = prJ . If (m− 1)pr < j ≤ mpr, then job (j, ·, r) will be processed

in K consecutive cycles, starting at cycle m, and there will be an interval of approximately

C between each pair of consecutive operations. Hence the flow (cycle) time of each job is

approximately (K − 1)C.

3.2 Reducing the Safety Stock

In Section 3.1 we have shown that a safety stock of at least pr jobs in each buffer (r, o) is

sufficient for a cyclic schedule to exist. Moreover, in this cyclic schedule, in each cycle, each

machine can process all of its operations for that cycle without any interruption. In this

section we show how to reduce the safety stock. This has a two-fold advantage. Smaller

safety stocks require a shorter tf , hence the makespan is reduced (note that the bounds on

the two other steps of the algorithms do not change, although now there are more jobs to

be emptied in the third step of the algorithm). In addition, smaller safety stock mean that

there is less work in process (WIP) inventory in the system, and as a result the flow (cycle)

time of the jobs is shorter on the average (by Little’s law). The size of the reduction is

determined by the next lemma.

Lemma 3.4 Let p = (p1, . . . , pR) be as above and let qr = �pr/2� (where �·� denotes upward

9

rounding) for all r = 1, . . . , R. If at time t the system satisfies:

Qr,1(t) ≥ pr r = 1, . . . , R

Qr,o(t) = qr r = 1, . . . , R o = 2, . . . , K

then it is possible to perform one complete cycle of the cyclic schedule by time t + C.

Proof: Denote by q′r = pr − qr = �pr/2� (where �·� denotes downward rounding). Let

Yir =∑o:(r,o)∈Ci Xr,o be the time needed for machine i to process a set of jobs, one from

each of its buffers that belong to route r. Let Ai =∑Rr=1 q

′rYir, Bi =

∑Rr=1 qrYir, and

Yi =∑Rr=1 prYir = Ai + Bi; Yi is the total processing time of machine i in one cycle. Recall

that C = max1≤i≤I Yi. We demonstrate below a cyclic schedule with a cycle time of C. For

simplicity we assume that we start at t = 0. For each machine do:

Part 1 of the cycle. From time 0 to Ai: Process q′r jobs from each buffer (r, o) ∈ Ci.

Part 2 of the cycle. From time Ai to Bi: Process qr − q′r jobs (this is either zero or one,

depending whether pr is even or odd), from each buffer (r, o) ∈ Ci.

Part 3 of the cycle. From time C −Ai to C: Process q′r jobs from each buffer (r, o) ∈ Ci.

Clearly, if each machine performs each of the three parts of the cycle without interruptions,

then a cycle will be completed within C units of time. It is sufficient to show that each

machine can start performing each one of the operations on the scheduled time. In the first

two parts of the cycle, each machine processes qr jobs from each of its buffers of route r.

Since at time 0 there are qr jobs in each buffer, there will be no waiting for jobs during these

two parts. Machine i will finish the first two parts of its cycle at time Bi = Yi−Ai ≤ C−Ai,

and will therefore be available for the beginning of the third part of its cycle. In the third

part of the cycle each machine needs to process q′r jobs from each of its buffers of route r.

We claim that the earliest time that any machine will start performing part 3 of the

cycle will be after part 1 of the cycle has been completed by all the machines. To see this

we need to show that for any two machines i and j, we have Ai ≤ C − Aj. If Ai ≥ Aj then

C − Aj ≥ C − Ai ≥ Bi ≥ Ai, and if Aj ≥ Ai then C − Aj ≥ Bj ≥ Aj ≥ Ai, hence the

inequality holds.

Consider now buffer (r, 1) on any of the routes. At the end of parts 1,2 of the cycle it will

have lost qr jobs and would still contain at least q′r jobs (out of at least pr at t = 0), which

would be enough for part 3 of the cycle. Consider next buffer (r, o), o ≥ 2, and assume it

belongs to machine i. By the time Bi, at the end of parts 1,2 of the cycle it would have lost

all its original qr jobs. However, by time C −Ai ≥ Aj it will have gained at least q′r jobs out

10

of buffer (r, o−1), processed in part 1 of the cycle by machine j. There are therefore enough

jobs in buffer (r, o) at time C − Ai to perform part 3 of the cycle with no interruptions. ✷

According to the proof, we now fix an order for a complete cycle, in which we perform

the parts 1,2,3 of the cycle as described; we call this an A-B-A complete cycle. We define

A-B-A partial cycles in which we do parts 1,2 of the cycle on any buffer (r, o) which has ≥ qr

jobs in it initially, and we do part 1 of the cycle, processing all the initial jobs of any buffer

(r, o) which has ≤ q′r jobs in it initially, and we then let machine i wait until time C − Ai

and we do part 3 of the cycle on up to q′r of the jobs which are in each buffer of machine i

at time C − Ai.

We also define A-B complete cycles, in which we do only parts 1,2 of each cycle, on all

the buffers, altogether qr jobs out of each buffer on route r. We define partial A-B cycles, in

which we skip all operations on buffers which are initially empty, and perform parts 1,2 of

the cycle on buffers which have ≥ qr jobs in them initially.

Clearly the total time for a complete A-B-A cycle which starts with qr jobs in each buffer,

is bounded by C, and the same bound also holds for partial A-B-A cycles. Similarly, the

total time for a complete A-B cycle which starts with qr jobs in each buffer, is bounded

by C1 = max1≤i≤I Bi = max1≤i≤I∑

(r,o)∈Ci qrXr,o, and the same bound also holds for partial

A-B cycles.

Our modified algorithm now consists of:

Step 1: Perform K − 1 partial A-B cycles.

Step 2: Perform J −K + 1 complete A-B-A cycles.

Step 3: Perform K − 1 complete or partial A-B-A cycles.

Analogous to Theorem 3.3 we have:

Theorem 3.5 Let TH2 be the makespan of the schedule obtained by the modified algorithm.

Then, TH2 ≤ JC + (K − 1)C1.

Proof: During the K−1 partial cycles of Step 1 of this heuristic, qr jobs from the non-empty

buffers receive processing of one operation each. These will include buffers (r, 1), . . . , (r,m)

of route r, in cycle m, for m = 1, . . . , K − 1. Each of these cycles has length of ≤ C1. At

the end of K − 1 such cycles there are prJ − qr(K − 1) jobs from route r in buffer (r, 1), and

qr jobs in each buffer (r, o), o ≥ 2. No jobs leave the system in that period.

11

According to Lemma 3.4 we can now perform complete cycles, each of them of length C,

in which we process pr jobs from each buffer (r, o). In each of these complete cycles, pr jobs

will be completed from buffer (r,K), and the number of jobs in buffer (r, 1) will decrease by

pr. All buffers (r, o), o = 2, . . . , K will end the cycle with qr jobs. This will continue for a

total of J −K + 1 cycles. At the end of these complete cycles, there will be (K − 1)q′r jobs

left in buffer (r, 1).

Thereafter, we perform K − 1 complete or partial cycles, of length ≤ C. In each of these

partial cycles pr jobs will be completed from buffer (r,K). If we let Qr,o denote the state

at the beginning of one of these cycles, then, from buffer (r, 1) there will be min{Qr,1, pr}departures, from buffer (r, o), o ≥ 2 there will be min{Qr,o, qr}+ min{Qr,o−1, q

′r} departures.

The system will be empty after the last of these K − 1 cycles. ✷

In a single complete cycle of the heuristic, Kq′r jobs on route r are processed for two

successive operations, while K(qr − q′r) jobs are processed for one operation. This gives us a

flow (cycle) time of approximately K−12

2qr−q′rqr

C for most jobs.

3.3 Can the Safety Stock Be Reduced Further?

Consider a problem with p = (3, 1). Clearly, a safety stock of one job in each buffer of route

2 and three jobs in each buffer of route 1 is sufficient. Lemma 3.4 implies that a safety stock

of one job in each buffer of route 2 and two jobs in each buffer of route 1 is sufficient as well.

However, is a safety stock of one job in each buffer sufficient? The answer is no. Consider

the following example.

X1,1 = 1 X1,2 = 6 X1,3 = 1 X1,4 = 6 X1,5 = 1 X1,6 = 6

σ(1, 1) = 1 σ(1, 2) = 2 σ(1, 3) = 1 σ(1, 4) = 2 σ(1, 5) = 1 σ(1, 6) = 2

X2,1 = 45 X2,2 = 0 X2,3 = 0 X2,4 = 0 X2,5 = 0 X2,6 = 0

σ(2, 1) = 1 σ(2, 2) = 1 σ(2, 3) = 1 σ(2, 4) = 1 σ(2, 5) = 1 σ(2, 6) = 1

Here C = 54, and both machines are bottleneck machines, so that each cycle has to keep

both machines busy for the entire length of the cycle.

We show now that it is not possible to perform a cyclic schedule with safety stocks of

1. Assume to the contrary that at some time tf there is a safety stock of 1 at each buffer

(r, o), o > 1. We will show that it is impossible to schedule pr jobs from each route in every

buffer in the period (tf , tf + 54).

Case 1: Machine 2 has just finished an operation and is ready to start another one at

time tf . Then up to the time tf + 6 no new jobs enter the buffers of route 1 of machine

12

1,1 1,1 1,1 1,3 1,5

1,2

0

0

5

6

Machine 1

Machine 2

Figure 1: Partial Gantt chart of the example

1. Hence in the time immediately following tf we can process at most 5 jobs out of buffers

(1, 1), (1, 3), (1, 5), which include one job out of buffers (1, 3), (1, 5), and 3 jobs out of buffer

(1, 1), and so if we do not wish to idle machine 1, we will start operation (2, 1) no later than

tf + 5; see Figure 1. Consider then starting operation (2, 1) at tf + 5. Then machine 1 will

be busy till tf + 50, and no further jobs will be added to buffers of machine 2. On machine

2, from time tf we can only start 3 jobs out of buffer (1, 2), 2 out of buffer (1, 4) and 2 out of

buffer (1, 6), which will all be completed no later than tf + 42, so machine 2 will be starved

at tf +42. A similar argument holds also if we start operation (2, 1) at tf + i, i < 5: machine

2 will be starved even earlier then 42, and machine 1 will not be able to “feed” it earlier

then 45.

Case 2: Machine 2 is busy at time tf with a job which has started earlier and has not

been completed yet (in a cyclic schedule in this case, at tf + 54 another job from the same

buffer will be in midprocessing). Here it is possible to process up to 6 jobs out of buffers

(1, 1), (1, 3), (1, 5), before these buffers are empty and we need to start operation (2, 1).

However, before completion of those 6 jobs we also start a new operation, from one of the

buffers (1, 2), (1, 4), (1, 6) on machine 2. It is easy to see that machine 2 will again be starved

before the end of operation (2, 1) on machine 1.

4 Fluid Based Heuristics for Fixed Routes with Gen-

eral Number of Similar Jobs

The algorithms of Section 3 constructed cyclic schedules. Cyclic schedules are also used by

Dai and Weiss [8] for routes with proportional number of similar jobs, and by Bertsimas and

Gamarnik [4] for routes with general number of identical jobs. These cyclic schedules are

partly motivated by fluid approximations. It is our belief that of the two themes, of cyclic

schedules and of fluid approximation, it is the fluid approximation which is the more basic

one, and in fact it leads to more versatile algorithms which can be used for problems of fixed

route job-shops with general number of similar jobs.

13

In this section we consider the job shop with fixed routes r = 1, . . . , R, with general

number of jobs Jr on route r, and with similar but not identical processing times Xr,o,j. We

let mr,o be the average processing time of operation (r, o), mr,o = 1Jr

∑Jrj=1 Xr,o,j. Recall that

we used Qr,o(t) to denote the number of jobs on route r which have completed operations

1, . . . , o− 1 but have not yet completed operation o, we refer to those as jobs in buffer (r, o),

and we call the Qr,o(t) the system buffer levels. We define in addition Q+r,o(t) =

∑ol=1 Qr,l(t)

which is the total number of jobs on route r which have not yet completed operation o. We

call Q+r,o(t) the system cumulative buffer levels.

We present two algorithms for this problem which have the following two features: First,

these algorithms base scheduling decisions at time t on Qr,o(t), Q+r,o(t) alone. Second, these

algorithms emulate an optimal solution of a fluid approximation to the discrete problem. In

the fluid approximation of the problem we treat all the jobs as fluid, and we assume that

the fluid level of a buffer decreases linearly at a rate proportional to the machine effort.

4.1 The Fluid Model

Consider the following optimization problem (this was first proposed and solved in [23]):

min∫ ∞0

1{∑R

r=1q+r,Kr (t)>0}dt

s.t. q+r,o(t) = q+

r,o(0)−∫ t

0ur,o(s)ds,

q+r,Kr(t) ≥ · · · ≥ q+

r,1(t) ≥ 0,∑(r,o)∈Ci

mr,o ur,o(t) ≤ 1,

ur,o(t) ≥ 0.

The unknowns are the time functions q+r,o(t) which is the fluid cumulative buffer level for

buffers (r, 1), . . . , (r, o) at time t, and ur,o(t) which is the rate of outflow from buffer (r, o) at

time t. The problem data consists of the routes and the Ci, the unit processing times mr,o

(non-negative), and the initial fluid levels q+r,o(0) (non-negative).

Here q+r,o(t) is the fluid analog of the actual system cumulative buffer levels, Q+

r,o(t). The

objective is to minimize total time until the fluid system is empty. The first constraint is

the fluid dynamics of the state q+r,o(t) which is changing continuously and linearly rather

than in discrete unit jumps. The second constraint is all that is left of the route precedence

constraints, and it incorporates the relaxation that fluid is transferred between the buffers

continuously. In the third constraint we see that processing time of operation (r, o) is mr,o

per job, and that the unit capacity of each machine is infinitely divisible between its buffers.

14

An optimal solution of this problem is achieved by the following constant flow rates:

ur,o(t) = ur,o =q+r,o(0)

T ∗, o = 1, . . . , Kr, r = 1, . . . , R, 0 < t < T ∗,

where

T ∗ = maxi=1,...,I

∑(r,o)∈Ci

mr,oq+r,o(0),

is the usual machine lower bound.

The fluid buffer levels and the fluid cumulative buffer levels for this solution are given

by:

qr,o(t) = qr,o(0)(1− t

T ∗

),

q+r,o(t) = q+

r,o(0)(1− t

T ∗

), o = 1, . . . , Kr, r = 1, . . . , R, o < t < T ∗.

In particular, if qr,1(0) = Jr, qr,o(0) = 0, o > 1 then ur,o(t) = Jr/T∗, qr,1(t) = q+

r,o(t) =

Jr(1 − t/T ∗), qr,o(t) = 0, o > 1, 0 < t < T ∗, and qr,o(T∗) = 0, o ≥ 1. These fluid levels will

serve us as a goal for the discrete problem.

4.2 The Fluid Based Algorithms

We now introduce two algorithms for solving the job shop problem, both are based on the

fluid approximation model, but each imitates the fluid optimal solution in a slightly different

way. We call these algorithms the Cyclic Fluid Algorithm and the Greedy Fluid Algorithm.

Preceding both algorithms is a stage in which we construct safety stocks.

4.2.1 Construction of Safety Stocks

In the fluid solution, fluid can (and does) flow through empty buffers: If qr,o(t1) = 0 and if

ur,o−1(t) = ur,o(t), t1 < t < t2 then ur,o(t) can be arbitrarily large, and yet qr,o(t) = 0 for all

t1 < t < t2. On the other hand, any algorithm which processes real jobs cannot have outflow

from an empty buffer. Hence, we need safety stocks in buffers.

For simplicity we will assume again that Kr = K for all routes. We will use a safety

stock of size Sr,o in buffer (r, o) for o = 2, . . . , K, r = 1, . . . , R. Possibilities for the choice

of safety stock levels include safety stocks which are proportional to Jr, as in the heuristic

of Section 3.1, and equal safety stocks for all buffers, Sr,o = S, which is what we use in the

numerical calculations in Section 5. Many factors influence a good choice of the size of the

safety stocks, including the topology of the routes, the number of jobs on each route, the

15

average workloads of the machines, and the variability of the processing times in each buffer.

A good practical way of determining desired safety stock levels is to run a simulation with

infinite safety stocks, and see how much of the safety stocks get used at each buffer, and fix

the safety stocks accordingly.

To simplify the description of the algorithm, we use the following reformulation of the

job shop problem. We assume that at time t = 0 there are Jr jobs in buffer (r, 1), at the

beginning of route r. In addition we assume that at t = 0 there is a safety stock of Sr,o jobs

in each of the buffers (r, o), o = 2, . . . , K along the route, but we exclude these jobs from our

job count. Hence we let Qr,1(0) = Jr, Qr,o(0) = 0, o > 1, and these buffer levels change by ±1

whenever a job enters or leaves the buffer. The safety stocks with which we start enable us

to have negative buffer levels, and to process a job in buffer (r, o) as long as Qr,o(t) > −Sr,o.We wish to process jobs in the system until a total of Jr jobs on route r have left the system

(out of buffer (r,K)). At that time there will still be∑Ko=2 Sr,o safety stock jobs distributed

among the buffers of route r.

Note: The construction of the safety stocks will take an amount of time tf . In addition,

once Jr jobs leave the system from each route r, we will still need to continue processing

until all the safety stocks are exhausted, which will take an amount of time te. When we

come to evaluate the performance of the algorithms, we will need to add tf and te to the

makespan, and adjust the number of jobs to Jr +∑Ko=2 Sr,o .

4.2.2 Using the Fluid Solution to Prioritize Buffers

Analogous to the fluid model we denote by Q+r,o(t) =

∑ol=1 Qr,l(t), the number of jobs that

have not yet completed operation (r, o) (recall that this is not counting the safety stocks).

We will use these system cumulative buffer levels at time t in conjunction with the fluid

cumulative buffer levels, to determine the scheduling decisions at time t.

At the time t = 0:

Q+r,o(0) = q+

r,o(0) = Jr, o = 1, . . . , K, r = 1, . . . , R,

and for t > 0:

q+r,o(t) = max{q+

r,o(0)(1− t

T ∗

), 0}, t > 0.

Our scheduling rule is based on a comparison of the state of the system and the fluid solution.

We define the tardiness of buffer (r, o) at time t ≥ 0 by: Q+r,o(t) − q+

r,o(t), and the tardiness

ratio:

ρr,o(t) =Q+r,o(t)− q+

r,o(t)

q+r,o(0)

, t ≥ 0.

16

At any time t, we will use this tardiness ratio to prioritize the various buffers, and will give

higher priority to work on a buffer with a higher tardiness ratio.

4.2.3 The Scheduling Rules

We shall use the following rule (alternative rule) for prioritizing the assignment of machines

to buffers:

Cyclic Tardiness Rule [Greedy Tardiness Rule]: Let i be a machine that is free at

time t. Consider all the buffers [all the non-empty buffers, Qr,o(t) > −Sr,o], which belong

to machine i, (r, o) ∈ Ci. Assign machine i to the buffer that maximizes ρr,o(t). Break ties

between buffers of different routes in favor of the smaller route index. Break ties between

buffers which belong to the same route in favor of the earlier operation along the route.

4.2.4 The Cyclic Fluid Algorithm

Step 1: At time t = 0 and whenever the processing of an operation of a job is completed

at time t, update all the states, Q+r,o(t), and calculate ρr,o(t) for all the buffers.

Step 2: Use the Cyclic Tardiness Rule to choose a buffer for any machine that is available.

Step 3: If available machine i has been assigned to buffer (r, o) and if Qr,o > −Sr,o, start

processing the first job out of the buffer. If Qr,o ≤ −Sr,o, idle machine i.

Step 4: Stop when all work is complete.

We compare the cyclic fluid algorithm (CFA) to the algorithms of Section 3 in Section

4.3, and show that it can be equally efficient.

4.2.5 The Greedy Fluid Algorithm

Step 1: At time t = 0 and whenever the processing of an operation of a job is completed

at time t, update all the states, Q+r,o(t), and calculate ρr,o(t) for all the buffers.

Step 2: Use the Greedy Tardiness Rule to choose a buffer for any machine that is available.

Step 3: If available machine i has been assigned to buffer (r, o) start processing the first

job out of the buffer. If for all the buffers (r, o) ∈ Ci, Qr,o(t) ≤ −Sr,o, idle machine i.

Step 4: Stop when all work is complete.

17

The main feature of the greedy fluid algorithm (GFA), is that it creates its own safety

stocks. We discuss this in Section 4.4.

4.3 Some Properties of the Cyclic Fluid Algorithm

We now show that the cyclic fluid algorithm (CFA) is a generalization of the two algorithms

which we discussed in Section 3 in the sense that for a problem with a proportional number of

identical jobs, CFA will produce essentially the same schedule as the algorithms of Sections

3.1, 3.2. We also discuss the role of safety stocks, and the performance of CFA for problems

with a proportional number of similar jobs. The following two lemmas describe two of the

most basic properties of CFA. The first assures us that CFA will always keep at least one

machine busy. The second describes the cyclic nature of the CFA schedule.

Lemma 4.1 Consider a job-shop with a proportional number of jobs Jr = prJ on r =

1, . . . , R routes. Under CFA at least one machine will be busy until the system is empty.

Hence the makespan of CFA is bounded by J C I.

Proof: Note that ρr,o(t) =Q+r,o(t)

Q+r,o(0)

− max{0,(1− t

T ∗

)}. Hence the buffer which maximizes

the tardiness ratio is the one which maximizes ρ̃r,o(t) =Q+r,o(t)

Q+r,o(0)

, which we will call, for the

duration of the proof of this and the following Lemma, the modified tardiness ratio.

Consider at time t the buffers which maximize the modified tardiness ratio, and choose

among them the one which belongs to the lowest numbered route, and to the lowest numbered

operation on that route. Call this buffer (r∗, o∗). Assume it belongs to machine i.

Note that unless the system is empty, Q+r∗,o∗(t) > 0. Note also that at time 0 this is buffer

(r∗, o∗) = (1, 1), which is non-empty, and which will be immediately processed by machine i.

By the definition of CFA, machine i chooses to work on buffer (r∗, o∗) at time t.

Furthermore, we claim that Qr∗,o∗(t) > 0. Assume first that o∗ = 1. Then Qr∗,1(t) =

Q+r∗,1(t) > 0 as long as the system is non-empty. Assume next that o∗ > 1. Then for all

the other buffers (r∗, o), o < o∗ we have Q+r∗,o(t) < Q+

r∗,o∗(t), by definition of (r∗, o∗), and in

particular Qr∗,o∗(t) = Q+r∗,o∗(t)−Q+

r∗,o∗−1(t) > 0.

Hence at time t at least machine i will be busy. Since some work is done at all times,

the system will be empty at the latest by the time which is the sum of the processing times

of all the machines, and certainly by J C I. ✷

Lemma 4.2 Consider a job-shop with a proportional number of jobs Jr = prJ on r =

1, . . . , R routes. Under CFA each machine i will perform its work by scheduling J cycles,

18

each of which consists of the processing of pr successive jobs out of buffer (r, o) for every

(r, o) ∈ Ci, and the order of operations is the same in all the cycles.

Proof: Under CFA when machine i becomes available, at time t = 0 or at time t at which

it completes processing an operation, it chooses a buffer in Ci according to the tardiness

ratios (or equivalently the modified tardiness ratios) of the buffers in Ci. It then waits until

there is a job to process in the chosen buffer, and processes that job. During this waiting

and processing period the modified tardiness ratios of all the buffers in Ci are unchanged

(note that buffers of other machines do have their modified tardiness ratios changed, by the

processing which those other machines do). At the completion of the operation the modified

tardiness ratio of the chosen buffer is reduced, while the modified tardiness ratios of the

other buffers are unchanged.

It follows that the order in which machine i visits its buffers is unaffected by the parts of

the routes that belong to other machines, by the processing times of the various operations of

the various jobs, or by the safety stocks Sr,o. The order of operations is entirely determined

by the initial cumulative buffer levels Q+r,o(0), and by the precedences among (r, o) ∈ Ci,

in other words, it is entirely determined by the routes, and by the prJ . Given this order,

the remaining factors such as the parts of the routes belonging to the other machines, the

processing times, and the safety stocks, will determine the timing at which the various

operations of machine i will be processed, but not their order.

We now consider this order. For each buffer (r, o) on route r, the value of the modified

tardiness ratio decreases by 1/prJ every time that a job in that buffer is processed. By

the tie breaking rule, buffers on route r will be chosen for processing by machine i in a

cyclic order o1 < o2 < . . . < oLr where {(r, o1), . . . , (r, oLr)} = {(r, 1), . . . , (r,K)} ∩ Ci.

Consider now two buffers, (r′, o′), (r′′, o′′) in Ci, on two different routes, r′ < r′′. Then at

the beginning, t = 0, they will both haveQ+r′,o′ (t)

Q+r′,o′ (0)

=Q+r′′,o′′ (t)

Q+r′′,o′′ (0)

= 1, and so the tie breaking

rule will schedule buffer (r′, o′) on machine i first, followed by the first processing of a job

from (r′′, o′′). Thereafter, processing of the two buffers by machine i will alternate according

to the increasing sequence of values obtained by interleaving the two sequences: 1pr′

, 2pr′

, . . .,

and 1pr′′

, 2pr′′

, . . . (ties favor r′). Clearly, the order in which machine i will visit the two buffers

will give us cycles consisting of pr′ jobs from buffer (r′, o′) and pr′′ jobs from buffer (r′′, o′′).

These considerations determine a fixed order in which all the∑

(r,o)∈Ci pr operations of

each cycle are performed, and machine i performs J such cycles each according to that order.

19

Note: Lemmas 4.1,4.2 are independent of the values of the processing durations. Hence

they hold equally for job shops with proportional number of identical jobs and for job shops

with proportional number of similar jobs. They hold independent of the size of the safety

stocks.

4.3.1 Performance of CFA for proportional numbers of identical jobs

Recall the definition of C in Section 3, as the maximum over all the machines of the work

load per cycle.

Theorem 4.3 Consider a job-shop with a proportional number Jr = prJ of identical jobs on

r = 1, . . . , R routes. Assume safety stocks of size Sr,o ≥ pr. Then CFA will reach Q+r,o(t) = 0

at time JC.

Proof: Consider the time t = 0. Since Sr,o ≥ pr, we can process pr jobs out of each

buffer (r, o) immediately, without violating Qr,o(t) > −Sr,o at the start of processing. Hence,

during the time interval (0, C) each of the machines will complete all the operations of its

first processing cycle. Assume inductively that by the time mC each of the machines has

completed m processing cycles, where 1 ≤ m < J . We wish to show that by the time

(m + 1)C each machine will complete m + 1 processing cycles.

Consider then buffer (r, o). Let U be the number of jobs that have been processed out

of buffer (r, o) by time mC. By the induction hypothesis, U ≥ mpr, so there are still

0 ≤ max{0, (m + 1)pr − U} ≤ pr jobs to be processed out of that buffer. If o ≥ 2, let V

be the number of jobs which entered buffer (r, o) by time mC. By the induction hypothesis

applied to buffer (r, o− 1), V ≥ mpr. Clearly, for o ≥ 2, Qr,o(mC) = V − U , and hence we

have

Qr,o(mC)− [(m + 1)pr − U ] = V − U − [(m + 1)pr − U ] = V − (m + 1)pr ≥ −pr ≥ −Sr,o

where the last inequality is our assumption on the size of the safety stocks.

Hence, if o ≥ 2, and if (m+1)pr−U > 0, then we can do all the remaining (m+1)pr−U

jobs out of buffer (r, o) right away, without depleting the safety stock, so there is no idleness.

Also if o = 1, and if (m + 1)pr − U > 0, we can do all the remaining (m + 1)pr − U jobs in

buffer (r, o) without depleting the safety stock. Finally, if max{0, (m + 1)pr − U} = 0 then

the m + 1th cycle out of buffer (r, o) is already complete at time mC. ✷

Corollary 4.4 Theorem 4.3 holds also for safety stocks of size Sr,o ≥ �pr/2�.

20

Proof: Recall the definition of Ai in Section 3.2, and denote as before qr = �pr/2�, q′r =

�pr/2�. The induction hypothesis now is that at least (m − 1)pr + qr jobs out of buffer

(r, o) are completed by time mC − Ai for all i, and at least mpr jobs out of buffer (r, o) are

completed by time mC.

One then considers buffer (r, o) ∈ Ci at the times mC, (m + 1)C − Ai, and shows that

no more than qr jobs remain to be completed in (mC, (m + 1)C −Ai), and no more than q′rjobs remain to be completed in ((m+ 1)C −Ai, (m+ 1)C), and all these remaining jobs can

be started immediately. ✷

4.3.2 The role of safety stocks in the operation of CFA

Safety stocks are essential to the efficient performance of CFA as the following example shows:

Consider a single route, with 4 operations on 3 machines, where C1 = {(1, 1), (1, 4)}, C2 =

{(1, 2)}, C3 = {(1, 3)}, i.e. the order of machines for the 4 operations is 1→ 2→ 3→ 1. If

we use safety stocks of Sr,o = 0, then initially we can only perform operation (1, 1) on the first

job, by machine 1, while the other two machine idle. At the completion of this operation,

machine 2 will perform operation (1, 2) on the first job, while machine 3 idles. Machine 1

will meanwhile choose buffer (1, 4) and wait there for a job to arrive, so it will also idle. At

the completion of operation (1, 2) the first job will move to buffer (1, 3) and be processed by

machine 3 while the other two machines idle, and on completion of operation (1, 3) the job

will move to buffer (1, 4) where it will be completed by machine 1, while machines 2,3 idle.

This will be a single cycle, in which just 1 job will be processed throughout, and only one

machine will be busy throughout. At the departure moment of job 1, machine 1 will move

back to buffer (1, 1) and a second cycle, identical to the first will start, in which the 2nd job

will be processed, and this will continue with a periodic schedule. Clearly this is the most

inefficient schedule possible among all the schedules which keep at least one machine busy

at all times when there is still some work in the system. Of course, if CFA would start work

on this job shop with safety stocks of 1 in buffers (1, 2), (1, 3), (1, 4), then by Theorem 4.3

CFA will be fully efficient, performing each cycle in the minimum time of C.

4.3.3 Performance of CFA for proportional numbers of similar jobs

We now consider a job shop with a proportional number Jr = prJ of jobs on r = 1, . . . , R

routes, but we assume that the Jr jobs on each route are similar (in that they follow the

same route) but are not identical, with processing times Xr,o,j for j = 1, . . . , Jr. Recall that

mo,r denotes their average. Let T ∗ = maxi{∑

(r.o)∈Ci Jrmr,o} be the machine lower bound for

this problem, and let machine 1 be the unique bottleneck which achieves this maximum.

21

Consider the operations of a single cycle, pr out of each buffer (r, o), with their actual

processing times. If we start with safety stocks of Sr,o ≥ pr (or even Sr,o ≥ �pr/2�) then,

by an argument similar to the proof of Theorem 4.3 (or of Corollary 4.4) the cycle will be

completed in a time which does not exceed that which is required by the machine which has

the largest sum of processing times among all the machines, for that cycle. Hence, if we

assume that in all the J cycles, machine 1 has the maximum processing time among all the

machines, then the schedule for the J cycles will be fully efficient: The bottleneck machine

will be busy all the time, and the makespan of the J cycles will equal the machine lower

bound. Hence, in that case, the schedule produced by CFA will be fully efficient for these J

cycles.

If on the other hand, for some cycles machine 1 does not have the longest processing time

among all the machines, then safety stocks of size Sr,o = pr (or even more so Sr,o = �pr/2�)may not be sufficient. However, if we use larger safety stocks, machine 1 may still be kept

busy throughout the J cycles.

This problem is discussed by Dai and Weiss [8]. The following result follows directly from

their paper: Assume that the processing times are randomly and independently chosen, with

Xr,o,j identically distributed, with mean mr,o, and finite exponential moments. Choose safety

stocks of size c1 log J for each buffer, where c1 is a constant that depends on the routes, the

values pr, and the processing time distributions, but not on J . Consider the event that for

a particular problem instance of this form, CFA will keep machine 1 busy throughout the J

cycles. Then there exists c1 such that the probability of this event is > J−1J

.

To put it differently, a rough guide is that a safety stock of size S will let the system run

with maximum efficiency for J = eO(S) cycles.

4.4 Some Properties of the Greedy Fluid Algorithm

The main feature of the greedy fluid algorithm GFA, is that it creates its own safety stocks.

Assume that we schedule the processing of a job shop according to CFA, and we reach a time

when the buffer assigned to machine i, (r, o), is empty, that is Qr,o(t) ≤ −Sr,o. Then CFA

would idle the machine until a job arrives at buffer (r, o), from buffer (r, o − 1). By doing

so, CFA always adheres to the order dictated by the tardiness ratio, and if the safety stocks

are insufficient, then CFA just idles a machine and waits. In contrast to this, under GFA

in the same circumstances, machine i will search for a non-empty buffer and work on it. If

buffer (r, o) remains empty, machine i may work for a while on buffers of other routes, and

on buffers (r, l), l > o of route r, but eventually it will return and work on buffers (r, l), l < o,

and thus create safety stocks for work at buffer (r, o).

22

Consider a job-shop with a proportional number Jr = prJ of jobs (identical or similar)

on r = 1, . . . , R routes. To follow the performance of GFA, and to show how it creates its

own safety stocks we divide all the work into subsets of operations out of the various buffers

(on the successive jobs which go through these buffers). This division corresponds to the

partial and complete cycles of Section 3.

Subset 1 The first operation on each route, out of buffer (r, 1) is performed pr times,

r = 1, . . . , R. This work is completed by GFA at time t1.

Subset 2 The first and second operations on each route, out of buffers (r, 1), (r, 2), are

performed pr times, r = 1, . . . , R (on jobs 1, . . . , pr of buffer (r, 2) and on jobs pr +

1, . . . , 2pr of buffer (r, 1)). This work is completed by GFA at time t2.

Subset m, for m < K: The first m operations on each route, out of buffers (r, 1), . . . , (r,m),

are performed pr times, r = 1, . . . , R. This work is completed at by GFA at time tm.

Subset m, for K ≤ m ≤ J: Includes pr operations out of buffer (r, o) for all the buffers,

and is completed at times tK , tK+1, . . . , tJ .

Subset m, for J < m ≤ J + K − 1: Includes pr operations out of buffers (r, o),m − J <

o ≤ K are performed pr times, r = 1, . . . , R, and is completed at times tJ+1 . . . , tJ+K−1.

Consider the first subset:

(i) All the work to be performed in this subset is available for performance at time 0, since

all the jobs are initially in the first buffers of their routes.

(ii) As a result of (i) each machine will work without any idling until it completes all its

work on subset 1 (it may during the time (0, t1) also perform some work on later subsets,

the main point is that it will never be idle and will never be waiting for any of the work in

the first subset to arrive in the buffer).

It is easy to show inductively that (i),(ii) hold for all the subsets. Assuming this holds

for the previous subsets, we have, for m > 1:

(i) All the work to be performed on subset m, which has not been completed previous to

time tm−1, is available to be performed at time tm−1.

Proof of (i): For buffers (r, 1) there is nothing to prove. Consider buffer (r, o) where 1 < o ≤m. Subsets o − 1, . . . ,m − 1 include each of them pr jobs out of buffer (r, o − 1). Hence at

least pr(m− o+ 1) jobs will have left buffer (r, o− 1) and entered buffer (r, o) by time tm−1.

The last pr of these jobs are the jobs which belong to subset m out of buffer (r, o). Thus, all

those among them which have not been completed before tm−1 are available for processing

at time tm−1.

23

(ii) As a result of (i) each machine will work with no idling, from time tm−1 until it completes

all its work on subset m (again, this work period may include work which belongs to later

subsets).

We have shown:

Proposition 4.5 At the times tm−1 there are sufficient safety stocks for the performance of

all the remaining work in subset m without any idling.

In analogy with Theorem 4.3, we have for the case of proportional number of identical

jobs on R routes:

Corollary 4.6 Consider a job-shop with a proportional number Jr = prJ of identical jobs

on r = 1, . . . , R routes. Then GFA will reach Q+r,o(t) = 0 at time ≤ (J + K − 1)C.

Proof: It follows from Proposition 4.5 that the partial and complete cycles of Section 3

will be completed by GFA no later than under the cyclic algorithm of Section 3.1, hence the

Corollary follows from Theorem 3.3. ✷

5 Numerical Implementation and Simulation Results

In this section we present some results of the implementation of the algorithms described

in Sections 3, 4. As a basis for our implementation we chose the well known 10-jobs and

10-machines job shop problem instance, originally given by Fisher and Thompson [9] in 1963.

The original 10× 10 problem has been taken up as a challenge by the scheduling community

in 1976 and it took more than 10 years until it was solved by Carlier and Pinson [7]. This

same problem has been used in almost every numerical study of job shops, and in almost

every evaluation of heuristics for job shops (see for example [1, 16]).

We took the 10 routes of this problem, and we considered problems with these routes and

with varying multiplicities J . As values of J we took (1, 2, 3, 5, 10, 20, 30, 50, 100, 200, 300, 500,

1000).

We have considered both the identical job case, in which each of the J multiples is an

exact copy of the original 10×10 problem, and the similar jobs case. For the similar jobs case

we have used the processing times of the 100 processing operations of the original problem

as average processing times mr,o, and we then generated random instances of the similar jobs

case using these averages.

24

We have varied the amount of similarity of the jobs by generating independent processing

times from distributions with coefficient of variation (the ratio of standard deviation to mean)

of cv = 0.25 and cv = 1.0. The identical jobs case is of course in itself the case of cv = 0.

To generate the processing times for the case cv = 0.25 we have used a Gaussian N(µ, σ2)

distribution with mean µ = mr,o and standard deviation σ = 0.25mr,o. In the case of negative

values we re-sampled. Note that the probability of negative values is negligible (for σ = 0.25µ

the probability of a negative value is ∼ 10−5).

To generate the processing times for the case of cv = 1.0, we have used an exponential

distribution, exp(λ), with parameters λ = 1/mr,0. This is a classical distribution which is

often used for non-negative random quantities with high variability. Note that the average

of 16 exponential exp(λ) variates has a gamma distribution, γ(16, 16λ), with mean 1/λ and

with cv = 0.25, and this distribution is, by the central limit theorem, very close to normal.

For each of the cases cv = 0.25 and cv = 1.0, and for each value of J , we have used a 10

replicates simulation, generating 10 different instances. We then ran our various algorithms

on each replicate, to obtain various makespan values. We also ran the algorithms on the

single cv = 0 identical jobs with the original 10× 10 problem data.

The various algorithms which we implemented are the Cyclic Fluid Algorithm, CFA,

and the Greedy Fluid Algorithm, GFA, each with three different levels of the safety stocks

(where Sr,o = S for all the buffers), S = 0, 1, 3. Thus, overall we consider 6 variants of the

2 algorithms, and we get 6 makespans TH for each problem instance. We also get 6 bounds

on the suboptimality of the solution, given by the makespan of the heuristic schedule minus

the machine lower bound for that instance, Tε = TH − T ∗.

Figure 2 summarizes the results of these runs, by presenting a single value for each of

the combinations cv, J , for 5 of the algorithm variants. Each of these is an exact value if

cv = 0, and is the average of the 10 replicates in the case of cv > 0. The three charts in

Figure 2 present the results for cv = 0, 0.25, 1.0. The horizontal axis of the charts is the

problem multiplicity J which is presented on a logarithmic scale. The vertical axis measures

(the average over replicates of) the error bound, Tε. The results for CFA with S = 0 are not

included in these charts.

We need to stress that 10 replicates is too small a number to form any confident estimates

of the performance of the algorithms. Hence our results should only be considered as rough

indications.

The Cyclic Fluid Algorithm with S = 0 was unsatisfactory, as the gap between the

makespan and the lower bound grew linearly with J (and these values would be outside

the scale on the charts of Figure 2). This is to be expected, since under CFA the order of

25

operations within each cycle is fixed, and the lack of safety stocks forces even the bottleneck

machine to idle a certain fraction of the time in each cycle.

On the contrary, we found that the Greedy Fluid Algorithm, GFA, with S = 0 gave the

best overall performance, not just on the average but for each of the replicates which we ran.

This confirms our intuition that GFA creates its own safety stocks as they are needed.

In the top chart of Figure 2 we see the results for cv = 0, the identical jobs case. Since

pr = 1 for the 10 routes, a safety stock of S = 1 should suffice for a constant error bound for

all J , when we use the cyclic algorithm of Section 3.1. The charts confirm that both CFA

and GFA with s = 1 have a constant error bound, which consists of the time to build-up and

to empty the safety stocks, as stated in Theorem 4.3, and Corollary 4.6. GFA with S = 0

has a smaller error bound, indicating the more efficient construction of safety stocks only

when needed, and at times at which machines would otherwise be idle.

In the middle chart of Figure 2 we see the results for cv = 0.25. We see that a safety stock

s = 1 is enough to cope with the problem and retain a constant error bound for J ≤ 1000.

Increasing the safety stock to S = 3 is therefore unnecessary, and only uses up more time in

its creation and depletion, which is reflected in the almost constant gap between the lines

for S = 1 and S = 3, when 50 ≤ J ≤ 1000. The larger error bounds for smaller values of

J are because in these cases construction and depletion of safety stocks of size S = 3 takes

up all the cycles of the schedule (the same comment holds for S = 1 in the top chart). For

S = 1 or S = 3, the performance of GFA is similar to that of CFA, since both construct the

same initial safety stocks, and the error bounds are constant in J . Again, GFA with S = 0

is much better.

In the bottom chart of Figure 2 we see the results for cv = 1.0. Here it seems that

CFA with S = 3 can maintain a constant error bound for J up to a thousand, while with

S = 1 the error bound for CFA start to shoot up from J ∼ 50. The error bounds of GFA

are almost constant for all values of S = 0, 1, 3; the difference between them corresponds

to the construction of the safety stocks. Note that for S = 3, CFA and GFA maintain the

same error bounds. This confirms that if the safety stocks are sufficient, there is not much

difference between CFA and GFA.

In conclusion, we give the results of GFA with no safety stocks, S = 0, in Tables 1, 2.

References

[1] Adams, J., Balas, E., Zawack, D. (1988). The shifting bottleneck procedure for job shop

scheduling. Management Science 34, 391–401.

26

Table 1: Performance of the Greedy Fluid Algorithm, with no safety stocks, on the high

multiplicity 10× 10 job-shop, with identical jobs on each route.

J=1 J=2 J=3 J=5 J=10 J=20 J=30 J=50 J=100 J=200 J=300 j=500 J=1000

TH 1282 1982 2643 3974 7110 13380 19712 32323 63873 126945 190082 316260 631760

T ∗ 631 1262 1893 3155 6310 12620 18930 31550 63100 126200 189300 315500 631000

TNε 651 720 750 819 800 760 782 773 773 745 782 760 760

Table 2: Average values of the error bound Tε for i.i.d similar 10× 10 job-shop (averages of

10 replicates).

J=1 J=2 J=3 J=5 J=10 J=20 J=30 J=50 J=100 J=200 J=300 j=500 J=1000

cv = 0.25 615 750 741 786 678 777 738 775 718 761 776 740 712

cv = 1.0 616 882 887 1162 1376 2177 1673 1978 1823 2454 1394 1162 1313

[2] Anderson, E. J. (1981). A new continuous model for job-shop scheduling. International

J. Systems Science 12, 1469–1475.

[3] D.Barany, I. (1981) A vector sum theorem and its application to improving flow shop

guarantees. Mathematics of Operations Research 6, 445–452.

[4] Bertsimas, D. and Gamarnik, D. (1999) Asymptotically optimal algorithms for job shop

scheduling and packet routing. J. of Algorithms 33, 296–318.

[5] T. Boudoukh, M. Penn and G. Weiss (1998). Job-shop - an application of fluid approxi-

mation. Proceedings of the tenth conference of Industrial Engineering and Management,

Issachar Gilad (editor), June 1998, Haifa Israel, 254–258.

[6] Boudoukh, T. (1999) Algorithms for solving job shop problems with identical and

similar jobs, based on fluid approximation (Hebrew with English synopsis). M.Sc. Thesis,

Technion, Haifa, Israel.

[7] J. Carlier and E.Pinson (1989). An algorithm for solving the job-shop problem. Man-

agement Science 35, 164–176.

[8] J. B. Dai and G. Weiss (1999). A Fluid Heuristic for minimizing Makespan in Job-Shops.

Preprint.

27

[9] H. Fisher and G. L. Thompson (1963). Probabilistic learning combinations of local job-

shop scheduling rules. in J. F. Muth and G. L. Thompson (eds), Industrial Scheduling,

Prentice Hall, Englewood Cliffs, NJ, 225–251.

[10] M. R. Garey and D. S. Johnson (1979). Computers and Intractability: A Guide to the

Theory of NP-Completeness, Freeman, San Francisco.

[11] E. M. Goldratt and J. Cox (1987). The Goal: Excellence in Manufacturing, North Rever

Press.

[12] E. M. Goldratt (1996). Production, the TOC way, North Rever Press.

[13] C. Hanen(1994). Study of a NP-hard cyclic scheduling problem: the recurrent job-

shop,European journal of operational research 72, 82–101.

[14] D. S. Hochbaum and R. Shamir (1991). Strongly polynomial algorithms for high multi-

plicity scheduling problem, Operations Research, 39, 648–653.

[15] Jansen, K., Solis-Oba R. and Srividenko M. (2000) Makespan minimization in job shops,

a linear time approximation scheme. Preprint, see also preliminary versions in STOC’99

and APPROX’99.

[16] Martin P. and Shmoys, D.B. (1996) A new approach to computing optimal schedules

for the job-shop scheduling problem. International IPCO Conference, 389-403.

[17] H. Matsuo (1990). Cyclic sequencing problems in the two-machine permutation flow

shop: complexity, worst-case and average-case analysis, Naval Research logistics, 37,

679–694.

[18] S.T. McCormick, M. L. Pinedo, S. Shenker and B. Wolf (1989). Sequencing in an as-

sembly line with blocking to minimize cycle time, Operation Research, 37, 925–935.

[19] R. Roundy (1992). Cyclic scheduling for job shops with identical jobs, Mathematics of

operations research, 17, 842–865.

[20] Sevastyanov, S.V. (1987) Bounding algorithm for the routing problem with arbitrary

paths and alternative servers. Cybernetics 22, 773–781.

[21] Sevastyanov, S.V. (1994) On some geometric methods in scheduling theory, a survey.

Discrete Applied Mathematics 55, 59–82.

[22] Sevastyanov, S.V. and Woeginger, G.J. (1998) Makespan minimization in open shops,

a polynomial type approximation scheme. Mathematical Programming 82, 191–198.

28

[23] Weiss, G. (1995). On the Optimal Draining of a Fluid Re-Entrant Line, in Stochastic

Networks, Proceedings of IMA workshop, Minnesota, February 1994 Kelly, F.P. and

Williams, R. Editors, IMA Volumes in Mathematics and its Applications 71, pp 91–

104, Springer-Verlag, New York.

[24] Williamson D.P., Hall, L.A., Hoogeveen, J.A., Hurkens, C.A.J., Lenstra, J.K., Sev-

astyanov, S.V., Shmoys, D.B. (1997) Short shop scheduling. Operations Research 45,

288–294.

29

&RPSDULVRQ EHWZHHQ DOJRULWKPV� 9DU FRHIILFLHQW �

���

����

����

����

����

����

� �� ��� ����

-

JDSEHWZ

HHQDOJRULWKP

PDNHVSDQDQG

ORZHUERXQG

*)$ 6 �

*)$ 6 �

&)$ 6 �

&RPSDULVRQ EHWZHHQ DOJRULWKPV� 9DU FRHIILFLHQW ����

����

����

����

����

����

����

����

����

����

� �� ��� ����

-

JDSEHWZ

HHQDOJRULWKP

PDNHVSDQDQG

ORZHUERXQG

*)$ 6 �

*)$ 6 �

*)$ 6 �

&)$ 6 �

&)$ 6 �

&RPSDULVRQ EHWZHHQ DOJRULWKPV� 9DU FRHIILFLHQW �

����

�����

�����

�����

�����

� �� ��� ����

-

JDSEHWZ

HHQDOJRULWKP

PDNHVSDQ

DQGORZHUERXQG *)$ 6 �

*)$ 6 �

*)$ 6 �

&)$ 6 �

&)$ 6 �

Figure 2: Comparison between the algorithms.

30