Journal of Algorithms
33,
296318 (1999)
Article ID jagm.1999.1047, available online at
http://www.idealibrary.com
on
I DE +L3
Asymptotically Optimal Algorithms
for Job
Shop
Scheduling and Packet Routing
Dimitris Bertsimas"
Sloan School
of
Management and Operations Research Center,
Massachusetts Institute
of
Technology,
E53363,
Cambridge, Massachusetts
02139
and
David Gamarnik
T.J.
Watson Research Center, IBM, Yorktown Heights, New York
I0598
We propose asymptotically optimal algorithms for the job shop scheduling and
packet routing problems. We propose
a
fluid relaxation for the job shop scheduling
problem in which we replace discrete jobs with the flow of a continuous fluid. We
compute
an
optimal solution of the fluid relaxation in closed form, obtain
a
lower
bound
C,,,
to the job shop scheduling problem, and construct
a
feasible schedule
from the fluid relaxation with objective value at most C,,,,,
+
O ( c ),
where the
constant in the
O(.)
notation is independent of the number of jobs, but it depends
on the processing time of the jobs, thus producing an asymptotically optimal
schedule
as
the total number of jobs tends to infinity. If the initially present jobs
increase proportionally, then our algorithm produces a schedule with value at most
C,,,
+
O(1). For the packet routing problem with fixed paths the previous algo
rithm applies directly. For the general packet routing problem we propose a linear
programming relaxation that provides a lower bound C,,,, and an asymptotically
optirnal algorithm that uses the optimal solution of the relaxation with objective
value at most
C,,,,
+
O ( c ).
Unlike asymptotically optirnal algorithms that
rely
on
probabilistic assumptions, our proposed algorithms make
no
probabilistic
assumptions and they are asymptotically optimal for all instances with a large
number of jobs (packets). In computational experiments our algorithms produce
schedules which are within 1% of optimality even for moderately sized problems.
0
1999
Academic Piess
*
The research of this author was partially supported by NSF Grant DMI9610486
296
01966774/99
$30.00
Copyright 0
1999
by
Academic Piess
All
rigtits of reproduction in
any
form resemed.
ASYMPTOTIC SCHEDULINGROUTING ALGORITHMS
297
1. INTRODUCTION
The job shop scheduling and the packet routing problems are funda
mental problems in operations research and computer science. The job
shop scheduling problem is the problem of scheduling
a
set of I job types
on
J
machines. Job type i consists of
.Ti
stages, each of which must be
completed on a particular machine. The pair
(i,
j )
represents the j t h stage
of the ith job and has processing time pi,
j.
The completion time of job
i
is
the completion time of the last stage
.Ti
of job type
i.
Assuming that we
have
yli
jobs of type
i,
the objective is to find a schedule that minimizes the
maximum completion time, called the makespan, subject to the following
restrictions:
1.
The schedule must be nonpreemptive. That is, once a machine
begins processing a stage of a job, it must complete that stage before doing
anything else.
2. Each machine may work on at most one task at any given time.
3. The stages of each job must be completed in order.
The classical job shop scheduling problem involves exactly one job from
each type, i.e., the initial vector of job types is
(1,1,.
. .
,
1).
The job shop
scheduling problem is a classical NPhard problem, notoriously difficult to
solve even in relatively small instances. As an example,
a
specific instance
involving 10 machines and 10 jobs posed in a book by Muth and Thompson
1111 in 1963 remained unsolved for over 20 years until solved by Carlier
and Pinson
[2]
in 1985.
The packet routing problem in a communication network
( V,d)
is the
problem of routing a collection of packets from a source node to a
destination node. It takes one time unit for
a
packet to traverse an edge in
d,
and only one packet can traverse a given edge at
a
time. As in the job
shop scheduling problem, the objective is to find
a
schedule that minimizes
the time, called the makespan, that all packets are routed to their destina
tions. For the case that the paths along which packets need to be routed
are given, the problem can be modeled exactly as a job shop scheduling
problem. However, when we can select the paths along which to route
packets, the problem is more complicated as it involves both routing (path
selection) and sequencing (which packet each edge process) decisions.
Our overall approach for these problems relies on two ideas from two
distinct communities. First, we consider a relaxation for the job shop
scheduling problem called the fluid control problem, in which we replace
discrete jobs with the flow of a continuous fluid. The motivation for this
approach comes from optimal control of multiclass queueing networks.
Multiclass queueing networks are stochastic and dynamic versions of job
298
BERTSIMAS AND GAMARNIK
shops. In recent years there has been considerable progress in solving the
fluid control problem in multiclass queueing networks. Focusing on objec
tive functions that minimize a weighted combination of the number of jobs
at the various machines, as opposed to makespan, Avram, Bertsimas, and
Ricard
[l]
show that by using the Pontryagin maximum principle, we can
find the optimal control explicitly. However, the description of the optimal
control, while insightful for the original problem, involves the enumeration
of an exponential number of cases.
Luo
and Bertsimas [lo], building upon
the work of Pullan [12], use the theory of continuous linear programming
to propose a convergent numerical algorithm for the problem that can
solve efficiently problems involving hundreds of machines and job types.
For the objective we consider (minimize the length of the schedule, i.e.,
the maximum completion time) the optimal solution of the fluid control
problem can be computed in closed form and provides a lower bound
C,,,
to the job shop scheduling problem. Weiss 1171 has considered and solved
the makespan objective for a fluid control problem with arrivals. Our proof
of the fluid control problem without arrivals follows along similar lines.
The second idea of the paper is motivated by the considerable progress
in the deterministic scheduling community in providing approximation
algorithms for scheduling problems that rounds the solution of a linear
programming relaxation of the scheduling problem. Shmoys, Stein, and
Wein [15], Goldberg
et
al. [4], and Feige and Scheideler [3] provide
algorithms that are within a multiplicative logarithmic guarantee from the
optimal solution value. Very recently Jansen, SolisOba, and Sviridenko [6]
provided a polynomial time approximation scheme. For a review of this
approach see Hall [5] and Karger, Stein, and Wein [7]. However, the paper
closest in spirit to the current work is a scheduling algorithm for job shop
problems constructed by Sevast2anov
[
131 (see also
[
141). Sevastlanov’s
algorithm is based on an interesting geometric method, unrelated to the
methods of the current paper, and produces a schedule with length
C,,,,
+
O(l), and as a result, is asymptotically optimal as the number of
jobs tends to infinity. Our algorithm is significantly simpler than
Sevast2anov’s and produces superior bounds for a variety of instances. For
example, for the 10 by 10 instance defined in Muth and Thompson [ l l ]
with the same number n of jobs for every job type, then the bound for our
algorithm is always stronger for all n. We compare the bounds given by
our methods and those by Sevastlanov in Section 4.3.
We use the optimal solution of the fluid control problem to construct a
feasible schedule with the objective value
C,,,
+
O ( c ).
If the initially
present jobs increase proportionally, then our algorithm produces a sched
ule with a value of at most
C,,,
+
O(1). Similarly, for the packet routing
problem we propose a linear programming relaxation that provides a lower
ASYMPTOTIC SCHEDULINGROUTING ALGORITHMS
299
bound
C,,,,
and use its solution to construct a feasible schedule with
objective value
C,,,
+
O ( c ).
We note that the constant in the
O(.)
notation is independent of the number of jobs, but it does depend on the
processing times of the jobs. This implies that as the total number of jobs
(packets, respectively) tends to infinity, the proposed algorithm is asymp
totically optimal. Unlike asymptotically optimal algorithms that rely on
probabilistic assumptions, the above algorithm makes no probabilistic
assumptions, and it is asymptotically optimal for all instances with a large
number of jobs (packets, respectively). The classical result in this area is
the work of Karp
[8],
who provided an asymptotically optimal algorithm for
the traveling salesman problem when the points are randomly and uni
formly distributed in the unit square in the Euclidean plane.
The combinatorial structure of the job scheduling problem makes the
problem very complicated to solve when there is a small number of jobs in
the system. Interestingly, the results of the paper indicate that as the
number of jobs increases, the combinatorial structure of the problem is
increasingly less important, and as a result, a fluid approximation of the
problem becomes increasingly exact. Similarly, the packet routing problem
has an even richer combinatorial structure. The results of the paper also
imply that a continuous approximation to the problem is asymptotically
exact.
The paper is structured as follows. In Section 2, we formulate the job
shop scheduling problem and describe the notation. In Section
3,
we
introduce the fluid control problem for the job shop scheduling problem
and solve it in closed form. In Section
4,
we present and analyze the
rounding algorithm, called the synchronization algorithm. We also provide
some computational results and contrast our bounds with those by
Sevast2anov
[13].
In Section
5,
we address packet routing in communica
tion networks with fixed paths as an application of job shop scheduling. In
Section
6,
we propose an asymptotically optimal algorithm for the general
packet routing problem in communication networks. Section
7
contains
some concluding remarks.
2. PROBLEM FORMULATION AND NOTATION
In the job shop scheduling problem there are J machines,
al,
a2,.
. .
,
a,,
which process
I
different types of jobs. Each job type is specified by the
sequence of machines to be processed on and the processing time on each
machine. In particular, jobs of type
i, i
=
1,2,.
. .
,
I,
are processed on J,
machines
a;, a;,
. . .
,
a,:
in that order. Let
J,,,
=
max,
JL.
The time to
300
BERTSIMAS AND GAMARNIK
process a type
i
job on machine
a;
is denoted by pi,k. Throughout the
paper we assume that
pi,k
are integers.
The jobs of type
i
that have been processed on machines
a;,
. . .
,
a,
but not on machine
a;
are queued at machine
a;
and are called type
i
jobs in stage
k.
The set of jobs in stages
k
2
2 in any specific machine
a;.
is called a noninitial queue in machine
a;..
In particular, at time zero all
noninitial queues are empty.
We will also think
of
each machine
a;.
as a collection of all types and
stage pairs that it processes. Namely, for each
j
=
1,2,.
. .
,
J
i
There are
ni
jobs for each type
i
initially present at their corresponding
first stage. Our objective is to minimize the makespan, i.e., to process all
the
n
=
n1
+
ng
+
...
+n,
jobs on machines
al,.
. .
,
q,, so
that the time it
takes to process all the jobs is minimized.
Each machine
a;.
has a certain processing time required to process jobs
that eventually come to this machine. Specifically, for machine
a;.
this time
is
The quantity
Cj
is called the congestion of machine
a;..
We denote the
maximum congestion by
C,,,
=
max
Ci.
1sjs.l
The following proposition is immediate.
problem satisfies
PROPOSITION
1.
The minimum makespan
C"
of
the job shop scheduling
In the next section we consider a fluid (fractional) version of this
problem, in which the number of jobs
ni
of type
i
can take arbitrary
positive real values, and machines are allowed to work simultaneously on
several types
of
jobs (the formal description
of
the fluid job shop schedul
ing problem is provided in the next section). For the fluid control problem
we show that a simple algorithm leads to a makespan equal to
C,,,
and
therefore is optimal.
ASYMPTOTIC SCHEDULINGROUTING ALGORITHMS
30
1
3. THE FLUID JOB SHOP SCHEDULING PROBLEM
In this section, we describe a fluid version of the job scheduling
problem. The input data for the fluid job shop scheduling problem are the
same as for the original problem. There are I processing machines
a,, a2,
. . .
,
aJ,
I job types, each specified by the sequence of machines
a;,
k
=
1,2,.
. .
,
.Ti,
and the sequence of processing times
pi,k
for type
i
jobs in
stage k. We introduce the notation
pi,k
=
l,’~;,~
which represents the
rate of machine
a;
on a type
i
job. The number of type
i
jobs initially
present, denoted by
xi,
takes nonnegative real values.
In order to specify the fluid control problem we introduce some nota
tion. We let
~;,~ ( t )
be the total (fractional in general) number of type
i
jobs in stage k at time
t.
We call this quantity the fluid level of type
i
in
stage k at time
t.
We denote by
q,k(t)
the total time the machine
a;
works on type
i
jobs in stage k during the time interval [0, tl. Finally 1CA)
denotes the indicator function for the set
A.
The fluid control problem of minimizing makespan can be formulated as
follows:
minimize (I(
c
x i,k ( t ) ~ ) dt
(1)
1
5; 5
I,
1
5
k
5
J,
subject to
xi,
,(
t )
=
xi

pi,
,Ti,
,(
t )
,
i
=
1,2,.
. .
,
I,
t
2
0,
(2)
X i.k ( t )
=
P i.k  I T,k  l ( t >

PLi,kT,k(t L
k
=
2,.
. .
,
I;,
i
=
1,2,.
. .
,
I,
t
2
0,
(3)
c
( T,k ( t 2 )

T.k ( t l ) )
5
t 2

t l,
(i
.
k
)
E
u,
vt 2,
t,, t,,t,
2
0,
j
=
1,2,.
.
.,I.
(4)
(5)
Xi,&)
2
0,
T,&)
2
0.
The objective function (1) represents the total time that at least one of
the fluid levels is positive. It corresponds to the minimum makespan
schedule in the discrete problem. Equations
(21,
(3) represent the dynamics
of the system. The fluid level of type
i
in stage
k
at time
t
is the initial
number of type
i
jobs in stage
k ( x i
for
k
=
1, zero for
k
#
1) plus the
number of type
i
jobs processed in stage k

1 during [0,
t ]
(given by
pi,
k p k p
,(t)),
minus the number of type
i
jobs processed in stage k
during [0,
t ]
(given by
~ ~,~ q,~ ( t ) ).
Constraint
(4)
is just the aggregate
feasibility constraint for machine
q.
302
BERTSIMAS AND GAMARNIK
Similar to the definition for the discrete problem, we define congestion
in station
q
as
and the maximal congestion as
C,,,
=
max
Ci.
1sjs.l
(7)
We next show that the fluid control problem can be solved in closed form.
The fluid control problem
(1)
has an optimal value equal
to the maximum congestion
C,,,,.
We first show that the maximum congestion
C,,,
is a lower
bound
on
the optimal value of the control problem. For any positive time
t
and for each
i
I
I,
k
I
.Ti,
we have from
(21,
(3):
PROPOSITION
2.
Pro08
k
C
X i,l ( t )
=
"i

P i,k T,k ( t ).
I =
1
For each station
ai
we obtain
k
C
~ i,k
Cx i,/( t >
=
C
Pi.kxi

C
~,k ( t )
2
Cj

t,
( i,k ) s q
I =1
( i.k ) s u j
( i,
k ) s
uj
where the last inequality follows from the definition of Cj and constraint
(4)
applied to t,
=
0,
t,
=
t.
It follows then, that the fluid levels are
positive for all times
t
smaller than
Ci.
Therefore, the objective value of
the optimal control problem is at least maxi
Ci
=
C,,,.
We now construct a feasible solution that achieves this value. For each
i
I
I,
k
I
Ji and each
t
I
C,,,, we let
xi
Xi,,(
t )
=
xi

Pi,,T,,(t)
=
xi


t,
i
=
l,...,I,
x&)
=
0,
k = 2,3
,...,
J,,i =
1
,...,I.
For all t
2
C,,,
we set T,k ( t )
=
p i,k ~ i,
~ ~,~ ( t )
=
0.
Clearly, this solution
has an objective value equal to
C,,,.
We now show that this solution is
feasible. It is nonnegative by construction. Also by construction,
Eq.
(2) is
Cmax
ASYMPTOTIC SCHEDULINGROUTING ALGORITHMS
303
satisfied for all
t
I
C,,,,.
In particular,
X,,~(C,,,~)
=
0,
i
=
1,2,.
. .
,
I.
Moreover, for all
i,
k
=
2,3,.
. .
,
J, and
t
I
C,,,,
we have

and
Eq.
(3) is satisfied.
ai,
we have
Finally, for any
t,
<
t,
I
C,,,
and for any machine
and constraint (4) is satisfied. Note that for the constructed solution
X~,~( C,,~,,)
=
0
for all
i
I
I,
k
I
.Ti.
Therefore, the feasibility for times
t
2
C,,,,
follows trivially.
The constructed solution has a structure resembling a processor sharing
policy. It calculates the maximal congestion
C,,,
and allocates a propor
tional effort to different job types within each machine to achieve the
target value
C,,,,.
Such an optimal policy is possible, since we relaxed the
integrality constraint on the number of jobs and allowed machines to work
simultaneously on several job types. In the following section, we use the
fluid solution to construct an asymptotically optimal solution for the
original discrete job shop scheduling problem.
I
4.
AN ALGORITHM FOR THE JOB SHOP
SCHEDULING PROBLEM
In this section, we consider the original job shop scheduling problem,
described in Section 2. Recall that we are initially given
ni
jobs for each
type
i, i
=
1,2,.
. .
,
I,
where n, is some nonnegative integer. Station
q
has
congestion
Cj
given by
C(i,k)t
rri pi,kni. Again, let
C,,,,
denote the maxi
mal congestion. Let
R
be a certain positive real value. An exact value for
R
will be specified later. For each job type
i
we let
304
BERTSIMAS AND GAMARNIK
For each station
a;.
let
Namely,
q
is the workload of station
a;.
when only one job per type is
present. Finally, let
U,,,,
=
max
q
1sjsJ
(9)
The proposed algorithm revisits the schedule in time intervals of length
For each interval
[m(R
+
qnax),
( m
+
l)(R
+
qnaX)],
m
=
O,l,.
. .
,
of length
R
+
U,,,,,
each machine
a ~,
and each pair
(i,
k )
E
a/,
machine
9
processes exactly
a,
jobs of type
i
(which takes
p,
ka,
time units) and idles
a
+
&ax.
THE SYNCHRONIZATION ALGORITHM.
a
+
uniax

c
PI
kar
( z
k ) E q
time units. If for some
i,
at time
m( a
+
Urnax),
the number of type
i
jobs
in machine
a/
is less than
a,,
then machine
a/
processes all the available
type
i
jobs and idles for the remaining time.
Note that the synchronization algorithm produces a feasible schedule,
since for each machine
a/
and each
(i,
k )
E
9,
it takes
p, kul
time units to
process
a,
jobs of type
i.
Since
it follows that the schedule is indeed feasible.
In the fluid relaxation, each job ( i,k) receives
(pi,kai/Cnlax)%
of the
effort from the corresponding machine. The synchronization algorithm
over each interval of length
R
+
qnax
allocates time
a;~;,~
on jobs
(i,
k).
Thus, job
(i,
k ) receives
of the effort from the corresponding machine. We used approximation in
the last equality, since in the synchronization algorithm we deal with
discrete jobs. Intuitively, the synchronization algorithm gives essentially
the same amount of effort as in the fluid relaxation.
ASYMPTOTIC SCHEDULINGROUTING ALGORITHMS
305
The next theorem shows that the algorithm does a good job of synchro
nizing and pipelining the total workload in the system and achieves
asymptotic optimality.
Consider
a
job shop schedulingproblem with I job types and THEOREM
1.
J
machines
ul, uz,
. . .
,
uJ.
Given initially ni jobs
of
type
i
=
1,2,.
. .
,
I, the
synchronization algorithm with
R
=
Jc,,,
UmaX/Jmax
produces
a
schedule
with makespan time C, such that
where U,,, is defined by
(9).
In particular,
as
I
E n,
+
i =
1
where
C"
is the optimal makespan. In
lengths at each station
a;.
are at most
urnax
Cmax
d
Jmax
m,
addition,
all
the noninitial queue
+
U*,ax.
(
12)
Pro05 For each i
I
I, k
I
J, and each integer time t, let &.,,(t) denote
the number of type i jobs in stage k (waiting to be processed on the
machine
a;).
Note that
&,k( 0)
=
0
for all
k
2
2.
For each i, machine
a;
will process exactly
aj
jobs during the interval
[0,
R
+
Urnax].
Therefore,
..
Also, for each i machines
a;,
ah
will process exactly
a;
jobs during the
interval
[
R
+
U,,,,
,
2(R
+
qnax)].
Therefore,
306
BERTSIMAS AND GAMARNIK
Similarly, we observe that for each
(i,
k )
E
a;.,
machine
a;.
does not
receive type
i
jobs until time
t
=
( k

l)(R
+
U,,,,),
and during each
subsequent interval
[m(R
+
Unlax),(m
+
l)(R
+
qnax)],
m
2
k

1 it re
ceives and processes exactly
a;
jobs of type
i,
until no new jobs of type
i
arrive. Let
Then
for all
i.
Therefore, all jobs leave the initial stage during the time interval
10, TI.
We next estimate the time to process all
Cf=
jobs initially present in
the system. We tag a given job
8
of type
i.
This job, as shown in (141,
leaves the first stage
(i,
1) at some time not bigger than
T.
Given any
k
4
J,,
suppose job
8
arrives at the kt h stage at some time
interval
[(rn

l)(R
+
Umax),m(R
+
Unlax>1.
All the type
i
jobs that ar
rived at stage
k
before time
(rn

l)(R
+
U,,,,)
have been processed, and
job
8
is one of the
a,
jobs of type
i
that arrived at stage
k
(machine
a;)
during the time interval [(m

l)(R
+
qn,,>,
m(R
+
U,,,,>I,
from the pre
vious stage. During the time interval
[m(R
+
Unlax>,(m
+
l>(R
+
Unl,,>1
machine
a;
processes
a,
jobs of type
i,
so
job
8
is in stage
k
+
1
at time
(rn
+
1)R. We conclude that the delay for job
8
between leaving the first
stage and being processed at the last machine
a(
is at most
( J,

l>(R
+
Combining this with
(14),
we conclude that the total delay for the job
8
U,,,,)
5
(J,,,,

l >(R
+
U,,,,).
is at most
U,,ax
C*l,X
+
Jmax

R

Cmax
+
JmaxUniax
+
Recall that we have not specified the value of
R.
We now select
R
to be
the minimizer of the expression above; i.e.,
ASYMPTOTIC SCHEDULINGROUTING ALGORITHMS
307
Therefore, the total makespan time under the algorithm is at most
This proves the bound
(10).
total number
of
jobs
Xf=
Notice that the maximum congestion
C,,,
tends to infinity, as the initial
tends to infinity. Therefore,
 + l
CH
Cmax
as
El=
+
a.
From Proposition
1,
C,,,
is a lower bound on the optimal
makespan time
C".
Therefore,
(1 1)
follows, i.e., the synchronization algo
rithm is asymptotically optimal.
Finally, as we have seen, the number of type
i
jobs in machine
gL
is
never more than
a,
for
k
2
2.
As a result, the noninitial queue length in
machine
9
is at most
From the integrality
of
queue length in machine
c
a;.
( i,
k) E
0,.
k t
2
processing times, it follows that the noninitial
9
is at most
This proves
(12).
I
Note that the makespan
CH of
the synchronization algorithm satisfies
'H
=
cnlax
+
'(c).
4.1. The
Proportional Case
In this section, we address the case with ni
=
bin,
and
bi
are integers. In
this case, we let
0
=
m a j
C(i,k)t
Then
C,,,,
=
no.
We modify
slightly the synchronization algorithm in this case: For each interval
308
BERTSIMAS AND GAMARNIK
[ mn,( m
+
l ) 0],
rn
=
O,l,
...,
of length
0,
each machine
q,
and each
pair ( i,
k )
E
q,
machine
a;.
processes exactly
bi
jobs of type i (which takes
pi,kbi time units) and idles
0

c
Pi,kbi
( i,
k )
t
u,
time units.
By following the same analysis as in Theorem
1,
we show that the
modified synchronization algorithm produces a schedule with makespan at
most
4.2. Computational Results
We have implemented three algorithms for the job scheduling problem.
The first algorithm is the synchronization algorithm (called original fluid
tracking heuristic in Figs. 1 and 2), the second is the modified synchroniza
tion algorithm outlined in the proportional case (called new heuristic for
uniform
N
in Figs. 1 and 2), and the third is a final modification of the
synchronization algorithm, in which the machines do not idle if they do not
have work to do (called variable omega heuristic in Figs.
1
and 2). We run
these algorithms on the 10 by 10 instances in Muth and Thompson [ l l ]
with ni
=
N jobs present and varied N. Figure 1 shows the performance of
the synchronization algorithm and its modification for N
5
50, while Fig.
2
shows the performance of all three algorithms for
N
I
2500. It is interest
ing that for
N
2
500, the variable
Cl
heuristic produces solutions within
1% from the lower bound.
4.3. Comparison with Sevast ’janou
’s
Algorithm
Sevast3anov
[
131 has constructed a scheduling algorithm with makespan
time not exceeding C,,,
+
(Jmax

l)(JJ&x
+
2Jmax

l)pnlaX, where pmax
=
max{pi,k} is the maximal processing time of a single job. We now
compare this performance bound with the one given by Theorem 1.
(a)
If
the total number ofjobs n satisfies n
5
no
=
((J,,,,
PROPOSITION
3.

l)(JJI:ax
+
ZJ,,,,

1 ) )/3 a, then
+
q n a x
Jmax
i.e., the upper bound on the makespan time C, corresponding to the synchro
ASYMPTOTIC SCHEDULINGROUTING ALGORITHMS
10
9
*
.
>
,

0
0
3
c
6
_
t
P
2
309
......................................................

Original Fluid Trackin Heuristic
:
,
New Heuristic for
Un&m
N
.
:
_  
Variable Omega Heuristic
........................
............................................................................................
.......................
.........................................
...............................
....................
.......................................................................
:
....
..;
FIG.
1.
The performance of the synchronization algorithm and its modification for
N
4
50.
nization algorithm is superior to the upper bound on the Seuast'janoc schedul
ing algorithm.
(b) If all
job types haue the same number n
of
jobs initially present,
there are at most
Jmax
job types, and each job type is processed by any given
machine at most once, then the bound gicen by the synchronization algorithm
is always stronger than the bound given by Secast 'janou
's
scheduling algo
rithm.
(a) Trivially,
qnaX
I
C,,,,
I
np,,,,.
Then, the left hand side of
Pro05
(15) is smaller than
Cmax
+
2 n P ma x c
+
npmax
J max
.
Therefore, the left hand side of (15) is smaller than
Cmax
+
2nPmax
Jmax
9
which is less than
or
equal to
Cmax
+
( J ma x

1)
( J J &x
+
z ~ m a x

1)Pmax
9
if
n
I
no,
310
BERTSIMAS AND GAMARNIK
..........................
.
1.16

Original Fluid Trackin Heuristic
.

.
_
.

 _ _
Variable Omega Heuristic
New Heuristic for
Un&m
N
s
0
0
I
>,,,2.
0
500
1Mx)
15M)
xxx)
2500
Number
of
jobs
in
each cbss

N
FIG.
2.
The
performance
of all three algorithms
for N
I
2500
..........................
.:.....
.......................
..I
............
:
(b)
If
all job types have the same number n of jobs initially present,
i.e.,
ni
=
n, the performance bound of the synchronization algorithm is
If there are at most
.Tn,,,
job types, and each job type is processed
given machine at most once, then
U,,,,
I
.TI,,,
pIna,,
and thus the
given by the synchronization algorithm is always stronger.
I
by any
bound
For example, for the
10
by
10
instance defined in Muth and Thompson
[
111
with the same number n
of
jobs for every job type, then the bound for
the synchronization algorithm is always stronger for all n.
5.
THE PACKET ROUTING PROBLEM WITH FIXED PATHS
In this section, we apply our results on the job shop scheduling problem
to the problem of packet routing in communication networks. Given a
directed graph
(V,
d)
that represents a communication network, there is a
ASYMPTOTIC SCHEDULINGROUTING ALGORITHMS
31
1
collection of packets that needs to be sent from a source node to a
destination node along given paths. Each packet is given with a prespeci
fied simple path (each node visited at most once), connecting the source to
the destination, i.e., each packet is represented by the triplet
(s,,
t,,
P,),
where
s,
is the source node,
t,
is the destination node, and
P,
is the
prespecified simple path. It takes one time unit for a packet to traverse an
edge in
d,
and only one packet can traverse a given edge at a time. We
will consider two versions of the packet routing problem: in this section,
we address the problem where the paths are given, and in the next section,
we address the problem where we need to select the paths. For the packet
routing problem with fixed paths there are n,, packets that need to be sent
along path
P,
for each simple path
P.
Let
9
denote the collection of all
simple paths, for which np
>
0.
A scheduler decides which packets traverse any given edge and which
packets wait in queue. The goal is to find a schedule which routes all
packets from their sources to their destinations in minimal possible
(makespan) time, given the initial number of packets nl, for each simple
path
P.
Extensive research has been conducted on this problem (see Leighton
191). It is easy to see that the packet routing problem with fixed paths is a
special case of the job shop scheduling problem. Each edge can be seen as
a processing machine. Each path is a sequence of machines (edges) that
jobs (packets) need to follow. All the processing (traversing) times are
equal to one. The job types correspond to paths in
9,
and the stages
correspond to edges within the path. Also, the quantity
in the job shop scheduling problem corresponds simply to the number of
paths crossing any given edge e. The number is at most
191.
The conges
tion
C,
of a given edge
e
EA?
is simply the number of packets that
eventually cross
e
(the corresponding paths contain e):
The maximal congestion
C,,,,
is max,
C,
and is clearly a lower bound on
the optimal makespan time.
Applying the synchronization algorithm for the job shop scheduling
problem we obtain the following result.
312
BERTSIMAS AND GAMARNIK
THEOREM
2.
Given
a
directed graph
( V,d),
suppose for each
P
€9)
there are np packets that need to follow path
P.
There exists
a
schedule that
brings all the packets to their destinations in time
C,
at most
where
191
is the cardinality of the set
9)
and
L
is the size of the longest simple
path in the graph.
In
particular,
as
and
C"
is the optimal makespan time.
6. THE PACKET ROUTING PROBLEM WITH
PATH SELECTION
In this section, we consider a more general version of the packet routing
problem in which the collection of paths is not given a priori, but needs to
be determined. Given a directed network
( V,d),
for each pair of nodes
k,
1
E
V
there is a number of packets nkl (called packets of type
( k,
I))
that need to be routed from source k to destination
1
via some path in the
network. Let
9)
denote the collection of all types in the network
P = { ( k,l ):n k L >
o}.
The scheduler is free to choose a path for each packet. The objective is to
construct a schedule (which selects paths and chooses packets to traverse
any given edge)
so
as to minimize the total time it takes to route all the
packets to their destinations. Srinivasan and Teo
[
161
provide an algorithm
that uses a linear programming problem that finds a schedule within a
constant factor from the minimum makespan.
In this section, we construct
a
schedule that has makespan C,
5
C"
+
O(Jc"), where C" denotes the minimum makespan time. Therefore, our
algorithm is asymptotically optimal as the total number of packets in
creases to infinity.
In the previous sections we used a dynamic fluid relaxation to construct
a schedule. We will now use a static multicommodity flow relaxation of the
problem. For any feasible schedule, we define decision variables
xf
to be
ASYMPTOTIC SCHEDULINGROUTING ALGORITHMS
313
the total number of type
( k,
Z )
packets that traverse the edge
(i,
j ).
We can
assume without loss of generality that origin and destination nodes are not
revisited by any packet. In particular,
xfl
=
xt!
=
0
for all
k,
I,
i,
j
E
V.
For each edge
(i,
j )
E
d
the value
represents the total time that edge
(i,
j )
is processing packets. Clearly, the
optimal makespan time
C"
is at least max(i,
j ) t,g
Cj,
j.
Therefore, the
following multicommodity flow problem provides a lower bound on
C"
:
minimize
C,,,
(17)
subject to
c
x::
=
n k l,
( k,l )
€9,
(
18)
c
.,"/I
=
'k l >
( k,l )
€9,
(19)
i:( k,i ) s ~ d
i:( i,O€*:d
c
x k l =
I'
c
x,",',
( k,l )
~ 9,i f k,Z,
j:( j,i ) e,w'
P
:
( i,
r )
€J#.
(20)
c.
'> I
.
=
c
xjj
k l
,
( i,j )
E d,
(21)
Ci.j
5
'ma,,
( i,j )
E d,
(22)
Xt!,Cj j
2
0,
(23)
( k,
1 )
€9
( i,j )
€d,
( k,Z)
€9.
Eqs. (18)(20) represent conservation of flow. The objective function value
of this linear programming problem, denoted also by
C,,,,
is clearly a
lower bound on the optimal makespan time
C".
The linear programming
problem has
Id1
191
variables and
1V1
191
+
Id1
constraints. Thus, it can
be solved in polynomial time even if the
nkl
are large. We next propose an
algorithm that constructs a schedule with performance close to
C,,,,
when
the number of packets is large.
PACKET ROUTING
SYNCHRONIZATION
ALGORITHM
1. Calculate the optimal value
of
C,,,,
of
the linear programming
problem (17).
Let
R
be a positive real value, to be specified later. For each
interval [ mR,( m
+
l)R], m
=
O,l,.
. .
,[C,,,/Rl

1, each edge
( i,j )
2.
314
processes
BERTSIMAS AND GAMARNIK
packets of type
( k,
I )
€9
and idles the remaining time.
If
there are less
than
uI"J
jobs of type
( k,l )
available, then all available packets are
processed and the rest of the dedicated time the edge idles, i.e., the edge
does not process other packets.
3. At time
we process all remaining
M
packets sequentially, taking
MP,,,,
time units,
where
P,,,,
is the length of the maximal simple path in the network.
Note that the last step is inefficient, but as we will see the number of
packets left in the network after time
T
is small. Let
us
first show that the
algorithm is feasible. For each edge
(i,
j )
E&
we have
We will show first that the number of packets left in the network at time
T
is
O ( c ),
by selecting
Q
appropriately. For each node
i,
let
d(i)
denote the outdegree of node
i
PROPOSITION
4.
Let
Then the total number
of
packets present in the network at time T defined in
(25)
is
at most
Pro08
We first show that for each
( k,
I )
€9,
the total number of
packets of type
( k,O
present in node
k
at time
T
is not bigger than
d(k)(Cm,,/Q).
During each interval [mQ,(m
+
l)Q],
m
=
0,1,2,.
. .
,
[C,,,,/R1

1,
the number of type
( k,
I )
packets processed from node
k
is
ASYMPTOTIC SCHEDULINGROUTING ALGORITHMS
315
equal to
where the second inequality follows from (18). Therefore, the number of
type
( k,
I )
packets present in node
k
at time
T
=
[CnlaX/RlR
is at most
We next consider any node
i
E
V and any type
(k,Z)
such that
i
#
k.
Initially, there are no type
( k,
I )
packets at node
i.
Let
rn,
be the largest
integer such that there are no type
( k,
I )
packets at node
i
at time
m,R.
The total number of type
( k,
I )
packets that arrive into
i
during
[rn,R,
(rn,
+
l ) R] is at most
During each subsequent interval
[ mR,
( m
+
l )R], m
2
m, the total num
ber of type
( k,
I )
packets that arrive into
i
during
[ ma,
(rn
+
l ) R] is also
at most
The schedule will allocate at least
time units to type
( k,
I )
during each interval
[ ma,
(rn
+
l)R],
rn
2
rn,
+
1.
Thus, during each subsequent interval
[ mR,
( m
+
l)R], m
=
m,
+
1, m,
+
2,.
. .
the number of type
( k,
I )
packets in node
i
increases by at most
X;'R
X;Q
c
7
c 7
+
d(i)
=
d(i),
where the equality follows from
(20).
Combining with
(26),
the total
number of type
( k,
I )
packets at node
i
at time
T
is at most
316
BERTSIMAS AND GAMARNIK
By summing over all nodes
i
E
I/
and types
( k,
1)
€9,
we obtain that the
total number
of
packets in the network at time T is at most
We now select
R
to minimize the quantity above. Namely, set
R
=
d m.
Then the total number
of
packets in the network at time
T
is at most
Z I d I d m
+ Idl=N
I
time realized by the algorithm.
packets with origin k and destination
1
in time
C,
satisfying
We next apply Proposition
4
to obtain an upper bound on the makespan
THEOREM
3.
The packet routing synchronization algorithm routes all nkl
where
C"
is the optimal makespan time.
In
particular,
and
as
ASYMPTOTIC SCHEDULINGROUTING ALGORITHMS
317
Pro08
From Proposition 4, at time
T
we have at most
packets in the network. These packets can be routed to their destination
by any trivial algorithm (as in Step 3 of the algorithm) within time at most
where
P,,,,
is the length of the maximal simple path in the network. Since
P,,,,
4
1V1,
we obtain that the total makespan time of the algorithm is,
using the bound
(251,
at most
I
7. CONCLUDING
REMARKS
We presented algorithms for the job shop scheduling and packet routing
problems that are asymptotically optimal as the number of jobs (packets,
respectively) in the system approaches infinity. Unlike asymptotically opti
mal algorithms that rely on probabilistic assumptions, the proposed algo
rithms make no probabilistic assumptions, and they are asymptotically
optimal for all instances with a large number of jobs (packets, respectively).
The algorithm for job shop scheduling and its analysis underscores the
importance of the fluid control problem and it shows that for instances of
the problem with a large number of jobs, it is the dynamic and not the
combinatorial character of the problem that dominates. Interestingly, the
dynamic character of the problem that can be captured by the fluid control
problem has a very simple structure. The algorithm for packet routing
underscores the importance of the idea already observed in other discrete
optimization problems that continuous relaxations carry information about
the discrete optimization problem that can be used to construct near
optimal solutions.
Finally, the results of the paper imply that in the limit of a large number
of jobs (packets) the combinatorial structure of the problems, which is the
essential difficulty of the problems, becomes increasingly unimportant as
both problems are well approximated by continuous relaxations that are
efficiently solvable.
318
BERTSIMAS AND GAMARNIK
ACKNOWLEDGMENT
We thank Leon Hsu for his implementation of the algorithms proposed in this paper
regarding the job shop scheduling problem.
REFERENCES
1. F. Avram, D. Bertsimas, and M. Ricard, Optimization of multiclass queueing networks:
a
linear control approach,
in
“Stochastic Networks, Proceedings of the IMA” (F. Kelly and
R. Williams, Eds.), pp. 199234, Inst. of Math. Appl., 1995.
2.
J. Carlier and
E.
Pinson, An algorithm for solving the jobshop problem,
Manag. Sci.
35
3.
U.
Feige and C. Scheideler, Improved bounds for acyclic job shop scheduling,
in
“ACM
Symposium
on
the Theory of Computing,” pp. 624633, 1998.
4. L. A. Goldberg, M. S. Peterson, A. Srinivasan, and
E.
Sweedyk, Better approximation
guarantees for jobshop scheduling,
in
“ACMSIAM Symposium
on
Discrete Algorithms,”
pp. 599608, 1997.
5. L. Hall, Approximation algorithms for scheduling,
in
“Approximation Algorithms for
Scheduling NPHard Problems” (D. Hochbaum, Ed.), pp. 145, PWSKent, Boston, 1997.
6. K. Jansen, R. SolisOba, and M. Sviridenko, Makespan minimization in job shops: a linear
time approximation scheme,
in
“ACM Symposium
on
the Theory of Computing,” pp.
394399, 1999.
7. D. Karger, C. Stein, and
J.
Wein, Scheduling algorithms,
in
“CRC Handbook of
Theoretical Computer Science,” to appear, CRC Press, Boca Raton, 1999.
8. R. M. Karp, Probabilistic analysis of partitioning algorithms for the traveling salesman
problem in the plane,
Math. Oper.
Res.
2 (1977), 209224.
9. F. T. Leighton, “Introduction to Parallel Algorithms and Architectures: Arrays, Trees,
and Hypercubes,” Morgan Kaufmann, San Mateo, CA, 1992.
10. X. Luo and D. Bertsimas, A new algorithm for state constrained separated continuous
linear programs,
S U M
.I.
Control
Optim. 36 (1998). 177210.
11. J. F. Muth and
G.
L. Thompson (Eds.), “Industrial Scheduling,” PrenticeHall, Engle
wood Cliffs, NJ, 1963.
12. M. C. Pullan, An algorithm for
a
class of continuous linear programming problems,
SIAM
.I.
Control
Optim. 31 (1993). 15581577.
13.
S.
V.
Sevast’janov, An algorithm with
an
estimate for
a
problem with routing of parts of
arbitrary shape and alternative executors,
Cybernetics
22 (19861, 773781.
14.
S.
V.
Sevast’janov,
On
some geometric methods in scheduling theory:
a
survey,
Discrete
Appl.
Math.
55
(1994), 5982.
15. D. B. Shmoys, C. Stein, and J. Wein, Improved approximation algorithms for shop
scheduling problems,
S U M
.I.
Comput.
23 (1994), 617632.
16. A. Srinivasan and C. P. Teo, A constantfactor approximation algorithm for packet
routing, and balancing local vs. global criteria, in “ACM Symposium
on
the Theory of
Computing,” pp. 636643, 1997.
17. G. Weiss, On the optimal draining of reentrant fluid lines, in “Stochastic Networks,
Proceedings of the IMA” (F. Kelly and R. Williams, Eds.), pp. 91104, Inst. of Math.
Appl., 1995.
(1985), 164176.
Σχόλια 0
Συνδεθείτε για να κοινοποιήσετε σχόλιο