You are on page 1of 20

Job Shop Scheduling Problems

n jobs, m machines
Each job follows a predetermined route
(a sequence of machines)
Problem:
Operation (i,j) : Processing of job j on machine i
Processing time p
ij
ssume that jobs do not recirculate
!inimi"e #
ma$
E$ample %: & jobs, ' machines
Jobs !achine Sequence Processing (imes
% %,),& p
%%
*%+, p
)%
*,, p
&%
*'
) ),%,',& p
))
*,, p
%)
*&, p
')
*-, p
&)
*.
& %,),' p
%&
*', p
)&
*/, p
'&
*&
1
IP Formulation:
0ariables:
t
ij
* start time of job j on machine i, for i * %,),& and j *%,),&
$
ij1
* %, if job j precedes job 1 on machine i,
+, otherwise for i * %,),&,'
j *%,),& and j 2 1

!in #
ma$
s3t
#
ma$
t
&%
4 p
&%
#
ma$
t
&)
4 p
&)
#
ma$
t
&&
4 p
'&
t
)%
t
%%
4 p
%%
t
&%
t
)%
4 p
)%
t
%)
t
))
4 p
))
t
')
t
%)
4 p
%)
t
&)
t
')
4 p
')
t
)&
t
%&
4 p
%&
t
'&
t
)&
4 p
)&
t
i%
4 p
i%


t
i)
4 !(%5$
i%)
) for i*%,),&,'
t
i)
4 p
i)


t
i%
4 ! $
i%)
t
i%
4 p
i%


t
i&
4 !(%5$
i%&
)
t
i&
4 p
i&


t
i%
4 ! $
i%&
t
i)
4 p
i)


t
i&
4 !(%5$
i)&
)
t
i&
4 p
i&


t
i)
4 ! $
i)&
t
ij
+, for i*%,),&,' and j*%,),&
$
ij1
6+,%7 for i * %,),&,' j *%,),& and j 2 1
2
Disjunctive Graph Representation:
8irected graph 9, nodes :, arc sets and ;, 9*(:,,;)
(here e$ists a node for each operation (i,j)
#onjuncti<e arcs represent routes of the jobs
rc (i,j) (1,j) denotes that operation (i,j) precedes (1,j)
(defined for two operations of the same job)
8isjuncti<e arcs ; represent sequence of jobs on a machine
rc (i,j) (i,1) denotes that operation (i,j) precedes (i,1)
rc (i,j) (i,1) denotes that operation (i,1) precedes (i,j)
Arcs in both directions exist, only one of the to is selected in a
feasible schedule
(defined for two operations on the same machine)
=ength of an arc is the processing time of the operation from
which the arc originates (i,j) (1,j)
dd a source node > and a sin1 node 0
#onnect > to the first operation of each job b? a conjuncti<e
arc (going out of >) of length +
#onnect 0 to the last operation of each job b? a conjuncti<e arc
(going into 0)
feasible schedule corresponds to a subgraph S such that
S contains all the conjuncti<e arcs
@or each pair of disjuncti<e arcs between the same nodes,
e$actl? one arc is contained in S
S contains no directed c?cle
3
p
ij
E$ample %: revisited, & jobs, ' machines
Jobs !achine Sequence Processing (imes
% %,),& p
%%
*%+, p
)%
*,, p
&%
*'
) ),%,',& p
))
*,, p
%)
*&, p
')
*-, p
&)
*.
& %,),' p
%&
*', p
)&
*/, p
'&
*&
@irst, add the conjuncti<e arcs (set )
:ow, add the disjuncti<e arcs (set ;) (dashed arcs)
4
U
V
2,2 1,2 4,2 3,2
4,3
1,1 2,1 3,1
1,3 2,3
U
V
2,2
1,2 4,2 3,2
4,3
1,1 2,1 3,1
1,3 2,3
+
+
+
p
'&
p
)&
Ah? does this subgraph not gi<e a feasible scheduleB
CESPO:8S (O @ESD;=E S#EE8>=E D@ :8 O:=F D@ (EE
S>;9CPE #O:(D:S :O 8DCE#(E8 #F#=ES
!a1espan of a schedule is the critical path3
CE!CG ): (EE #CD(D#= P(E DS (EE
Eow can we minimi"e the ma1espanB
#hoose the arcs so as to minimi"e the length of the critical path3
5
U
V
2,2
1,2 4,2 3,2
4,3
1,1 2,1 3,1
1,3 2,3
+
+
+
8isjuncti<e Programming
set of constraints is conjuncti<e, if each constraint in the set
must be satisfied
set of constraints is disjuncti<e, if at least one of the
constraints in the set must be satisfied
n? integer program can be written as a disjuncti<e program
Disjunctive Pro!rammin! Formulation
"#ob $hop Problem, %inimi&e %a'espan(
0ariables:
t
ij
* start time of job j on machine i, for all operations (i,j)
!in #
ma$
s3t
#
ma$
t
ij
4 p
ij
for all (i,j) :
t
1j
t
ij
4 p
ij
for all (i,j) (1,j)
t
ij
t
i1
4 p
i1
or t
i1
t
ij
4 p
ij
for all

(i,j) and (i,1) :
t
ij
+ for all (i,j) :
E$ample %: revisited, & jobs, ' machines
Jobs !achine Sequence Processing (imes
% %,),& p
%%
*%+, p
)%
*,, p
&%
*'
) ),%,',& p
))
*,, p
%)
*&, p
')
*-, p
&)
*.
6
& %,),' p
%&
*', p
)&
*/, p
'&
*&
!in #
ma$
s3t
#
ma$
t
&%
4 p
&%
#
ma$
t
&)
4 p
&)
#
ma$
t
&&
4 p
'&
t
)%
t
%%
4 p
%%
t
&%
t
)%
4 p
)%
t
%)
t
))
4 p
))
t
')
t
%)
4 p
%)
t
&)
t
')
4 p
')
t
)&
t
%&
4 p
%&
t
'&
t
)&
4 p
)&
for i*%,),&,':
t
i%


t
i)
4 p
i)
or t
i)
t
i%
4

p
i%
t
i%


t
i&
4 p
i&
or t
i&
t
i%
4

p
i%
t
i)


t
i&
4 p
i&
or t
i&
t
i)
4

p
i)
t
ij
+, for all (i,j) :
7
cti<e Schedules:
(wo t?pes of modification of a feasible schedule to obtain another
feasible schedule
left shift: mo<e an operation left to start it earlier
left jump: mo<e an operation left into an idle slot to start it
earlier
=eft shift
=eft jump
8
%+
+
)+
+
!# '
!# %
!# )
&%
+
% &
&
& )
)
%
%
!# &
)
)
!# '
!# %
!# )
&++
% &
&
& )
)
%
%
!# &
)
)
feasible schedule is active if it cannot be modified b? a left
shift or a jump to complete an operation earlier without
completing another operation later
cti<e schedule
;ranch and ;ound for 8isjuncti<e Programs:
(here e$ists an optimal solution that is an acti<e schedule
Ae can restrict our search to onl? acti<e schedules
Generatin! All Active $chedules
t e<er? le<el of the search tree one operation is fi$ed
t a gi<en le<el, operations that are alread? fi$ed ma1e up a
partial schedule
:o operation is considered until all its predecessors are
scheduled
Df all the predecessors of an operation are scheduled, then the
operation is said to be 0D=;=E
9
%++
)++
!# '
!# %
!# )
&++
% &
&
& )
)
%
%
!# &
)
)
),+
9i<en a partial schedule, all 0D=;=E OPEC(DO:S can be
found easil?
:otation:
O * set of all operations whose predecessors ha<e alread? been
scheduled (0D=;=E OPEC(DO:S)
(denoted b? in the te$tboo1)
r
ij
* earliest starting time of operation (i,j) in O
9i<en a partial schedule and an a<ailable operation (i,j), how
do we calculate r
ij
B
lgorithm O@
Step %3 (Dnitiali"ation)
O * 6first operation of each job7
r
ij
* + for all (i,j) in O
Step )3 (!achine Selection)
#alculate t(O) * min
(i,j) in O
6 r
ij 4
p
ij
7
and let i
H
be the machine corresponding to the operation
that minimi"es r
ij 4
p
ij
Step &3 (;ranching)
10
@or each operation (i
H
,j) on machine i
H
such that r
iHj
2 t(O),
#onstruct a branch b? fi$ing that operation as the ne$t
operation on machine i
H
delete the operation from O
add the immediate follower of the operation to O
Df O is empt?, stop3 Else, return to Step )3
(he 1e? condition that ?ields acti<e schedules is the inequalit?
r
iHj
2 t(O) in Step &3
(here cannot be an? operation that can be completed before
t(O)
#reate a branch for each a<ailable operation on machine i
H
with
earliest start time smaller than t(O)
#an ?ou thin1 of a lower bound that can be obtained at a node
of the enumeration treeB
9D0E: @ESD;=E S#EE8>=E CEPCESE:(E8 ;F 8DSJ>:#(D0E
9CPE, EOA 8O FO> @D:8 (EE #CD(D#= P(EB
@inding the critical path is equi<alent to finding the longest
path from u to < in the gi<en acyclic directed graph
Ae calculate a label for each node
11

333
(i
H
,1)
=e<el 14%
=e<el 1
(i
H
,j)
(i
H
,l) (i
H
,p)
=et r
ij
be the label of node (i,j) corresponding to operation (i,j)
=et DP
ij
be the set of immediate predecessors of (i,j)
DP
ij
contains all nodes that ha<e an arc originating from itself
and ending at node (i,j)
Start with r
u
* + (source node has label equal to +)
Cepeat
Pic1 a node (i,j) such that the labels of all nodes in DP
ij

ha<e been calculated
@or e<er? node in DP
ij
calculate 6label of the node 4 length
of the arc from this node to (i,j)7 and set r
ij
to the
ma$imum of these terms
>ntil the label of <, the sin1 node, is calculated
%3 =ength of the longest u5< path equals r
v
, the label of the sin1
node
)3 (o find the longest path itself trace bac1 the nodes that ga<e the
ma$imum term in the label calculations
&3 (he label of node (i,j), r
ij
, equals
the length of the longest path from the source node to (i,j)
the earliest possible start time of operation (i,j)
E$ample:
12
U
V
2,2
1,2 4,2 3,2
4,3
1,1 2,1 3,1
1,3 2,3
+
+
+
&
/
.
'
, %+
& -
%+
%+
%+
,
,
,
,
&
-
.
#an ?ou thin1 of a lower bound that can be obtained at a node
of the enumeration treeB
=;
%
*
Eow can ?ou impro<e this lower boundB
D8E:
%3 AEE: AE #=#>=(E (EE !GESP: O@ PC(D=
S#EE8>=E, AE ==OA SE0EC= OPEC(DO:S (O ;E PCO#ESSE8
O: !#ED:E ( (EE S!E (D!E
)3 PD#G O:E O@ (EE !#ED:ES :8 ==OA == O(EEC !#ED:ES
(O PCO#ESS !>=(DP=E OPEC(DO:S SD!>=(:EO>S=F EI#EP(
(EE #EOSE: !#ED:E3
#=#>=(DO: O@ (EE ;O>:8:
%3 #onsider machine i
)3 #ompute r
ij
for all operations (i,j) on machine i
&3 @ind the longest path from (i,j) to the sin1 for all (i,j) on
machine iJ let l
ij
be the length of this path
'3 Set a due date for (i,j): d
ij
* =;
%
5 l
ij
4 p
ij

-3 Sol<e the following single machine problem on machine i:
Operations (i,j) on machine i are the jobs
Operation (i,j) has release time r
ij
and due date d
ij

:o preemptions allowed
13
'
!inimi"e =
ma$
, the ma$imum lateness
.3 =; * =;
%
4 =
ma$
:O(E %: (EE OP(D!= SEK>E:#E O@ (EE SD:9=E !#ED:E
PCO;=E! D!P=DES :EA 8DSJ>:#(D0E C#SJ 88 (EE :EA C#S (O
(EE #>CCE:( S>;9CPE :8 #=#>=(E (EE !GESP: O: (EE
:EA ((E!POCCF) 9CPE3 (EDS !GESP: DS (EE #=#>=(E8
=OAEC ;O>:8
:O(E ): (EE =OAEC ;O>:8 #=#>=(DO: #: ;E CEPE(E8 @OC
== !#ED:ES SO (E( (EE =C9ES( =OAEC ;O>:8 DS GEP(
;C:#E :8 ;O>:8
E$ample %: revisited, & jobs, ' machines
Start with a subgraph consisting of onl? the conjuncti<e arcs
#alculate the ma1espan of this graph

!a1espan *
ppl? algorithm O@ to branch and generate all nodes at le<el %
14
U
V
2,2
1,2 4,2 3,2
4,3
1,1 2,1 3,1
1,3 2,3
+
+
+
&
/
.
'
,
'
- ,
%+
&
Step%3 Dnitiali"e
O * 6(%,%), (),)), (%,&)7
r
ij
* + for all (i,j) in O
Step )3 (!achine Selection)
#alculate t(O) * min
(i,j) in O
6 r
ij 4
p
ij
7
t(O) * min 6 +4%+, +4,, +4'7 * '
and let i
H
be the machine corresponding to the operation
that minimi"es r
ij 4
p
ij
i
H
* %
Step &3 (;ranching)
@or each operation (i
H
,j) on machine i
H
such that r
iHj
2 t(O),
#onstruct a branch b? fi$ing that operation as the ne$t
operation on machine i
H
delete the operation from O
add the immediate follower of the operation to O
;ranch on operations (%,%) and (%,&)
15


=; * ),
=e<el %
=e<el +
=; * ),
(%,&)
scheduled first
on !# %
(%,%)
scheduled first
on !# %
:o disjuncti<e arcs,
=; * ))
Df (%,%) is scheduled first, then two disjuncti<e arcs !oin!
out of (%,%) are added to the graph
L:EI(, O;(D: =OAEC ;O>:8SM
#alculate the ma1espan on the new graph
=;
%
* )'
Dmpro<e this lower bound
#=#>=(DO: O@ (EE ;O>:8 ( (%,%):
%3 #onsider machine %
)3 #ompute r
))
, r
)*
, and r
)+

&3 @ind the longest path from (%,j) to the sin1 for all (%,j) on
machine %J find l
))
, l
)*
, and l
)+
'3 Set a due date for (i,j): d
ij
* =;
%
5 l
ij
4 p
ij
,
-3 Sol<e the following single machine problem on machine %:
Jobs % ) &
p
%j
%+ & '
16
U
V
2,2
1,2 4,2 3,2
4,3
1,1 2,1 3,1
1,3 2,3
+
+
+
&
/
.
'
,
'
- ,
%+
&
%+
%+
r
%j
d
%j
!inimi"e =
ma$
, the ma$imum lateness
(he optimal sequence * %5)5& and =
ma$
* &
=; * =;
%
4 =
ma$
* )' 4 & * )/
Cepeat the =; calculation for machine )
(he optimal sequence * )5%5& and =
ma$
* '
=; * =;
%
4 =
ma$
* )' 4 ' * ), GEEP (EDS ;O>:8N
Cepeat the =; calculation for machines & and ', best =; * ),
Df (%,&) is scheduled first, then two disjuncti<e arcs !oin! out of
(%,&) are added to the graph
!a1espan * =;
%
*
;est lower bound obtained b? sol<ing single machine problems
is ),
;ranch from node (%,%) at =e<el %J appl? algorithm O@
17
U
V
2,2
1,2 4,2 3,2
4,3
1,1 2,1 3,1
1,3 2,3
+
+
+
&
/
.
'
,
'
- ,
%+
&
'
'
O * 6(),%), (),)), (%,&)7
r
))
* +, r
)%
* %+, r
%&
* %+
#alculate t(O) * min
(i,j) in O
6 r
ij 4
p
ij
7
t(O) * min 6 +4,, %+4,, %+4'7 * , and i
H
* )
;ranch on operation (),))
Process the currentl? onl? node at le<el )
(he four disjuncti<e arcs !oin! out of (%,%) and (),)) are added
to the original graph
18


=; * ),
=e<el %
=e<el +
=; * ),
(%,&)
scheduled first
on !# %
(%,%)
scheduled first
on !# %
:o disjuncti<e arcs,
=; * ))
(%,%)
scheduled first
on !# %
(),))
scheduled first
on !# )
=; * ),
=e<el )
U
V
2,2
1,2 4,2 3,2
4,3
1,1 2,1 3,1
1,3 2,3
+
+
+
& /
.
'
,
'
- ,
%+
&
%+
%+
,
=;
%
*
=
ma$
* + for all single machine problems, so =; * ),
Df all the unprocessed nodes in the branch and bound tree are
processed, the following optimal solution with ma1espan ), is
obtained:
!achine Job Sequence
% %,&,) or (%,),&)
) ),%,&
& %,)
' ),&

19
,
20

You might also like