1
JOB SHOPSCHEDULING
Job Shop scheduling
Problem with m machines and n jobsEach job visits some or all of the machines
Only once (or multiple times if recirculation is allowed)Each customer order is unique and of small batches
Wafer fabrication in semiconductor industryHospital (patients are jobs or machines?)
Special case of project scheduling with workforceconstraintsVery difficult to solve! (NP-hard)
84
2
Classic scheduling theory
Look at a specific machine environment with a specificobjectiveAnalyze to prove an optimal policy or to show that nosimple optimal policy existsThousands of problems have been studied in detailwith mathematical proofs!
But often, scheduling solutions are found usingdispatching rules, which are heuristics.
85
Dispatching rules
Release/due date relatedEarliest release date first (ERD) rule
variance in throughput timesEarliest due date first (EDD) rule
maximum latenessMinimum slack first (MS) rule
maximum latenessApparent tardiness cost first (ATC)
maximum total weighted lateness
86
max ,0j jd p t
3
Dispatching rules
Processing time relatedLongest Processing Time first (LPT) rule
balance load on parallel machinesmakespan
Shortest Processing Time first (SPT) rulesum of completion timesWIP
Weighted Shortest Processing Time first (WSPT) rule
87
Discussion
Very simple to implementOptimal for special casesOnly focus on one objectiveCombine several dispatching rules:
Composite Dispatching Rules
88
4
Single machine models
With n jobs with pj, rj and dj, andTotal weighted completion time should be minimized:
Solution: Weighted Shortest Processing Time (WSPT)first is optimal.
Schedules jobs in decreasing order of wj /pj.SPT rule starts with job with the shortest pj, moves onto job with second shortest pj, and so on.
89
j jw C
Single machine models
If rj = 0Each job has its own dj
Objective: minimize lateness Lmax
Earliest Due Date (EDD) results in optimal scheduleOrder operations in increasing order of dj
90
5
Types of dispatching rules
WSPT and EDD are static.Static – basis for ordering operations does not changebased on scheduling decisions
All operations can be sorted onceDynamic – scheduling decisions change the order ofremaining operations
Need to resort operations in queue (potentially) afterevery decision
91
Single machine models
If rj = 0, andObjective: minimize lateness Lmax
Minimum Slack (MS) orders operations at time t indescending order of:
max(dj – pj – t, 0)MS does not guarantee optimal schedule!
92
6
Composite rule
Two good heuristics:Weighted Shorted Processing Time (WSPT)
optimal with due dates zeroMinimum Slack (MS)
Optimal when due dates are “spread out”Any real problem is somewhere in betweenCombine the characteristics of these rules into onecomposite dispatching rule.
93
Composite dispatching rule
One-machine, rj = 0Objective: minimize weighted tardiness wjTj
Apparent Tardiness Cost (ATC) rule orders operationsin descending order (K is a parameter):
94
max( ,0)( ) expj j j
jj
w d p tI t
p K p
WSPT MSMean pj
7
Special cases
If K is very large:ATC reduces to WSPT
If K is very small and no overdue jobs:ATC reduces to MS
If K is very small and overdue jobs:ATC reduces to WSPT applied to overdue jobs
95
Jobs with different release dates
One-machine problem with different rj
Objective: minimize lateness Lmax
Problem is NP-hardPossible algorithms to solve the problem (from theOptimization and Decision course)
Branch-and-bound (see Appendix B of Pinedo’s book)Dynamic Programming
96
8
Parallel machines
A set of m machines in parallel is available.Objective: minimize makespan Cmax
P2||Cmax is already NP-Hard!
Longest Processing Time (LPT) firstpick operations in descending order of processing time
LPT balances the loads of the machines (why?).LPT does not guarantee optimality.
97
Parallel machines
Pm|| Cj; Objective: minimize completion time Cj
SPT assures optimality, even when preemptions areallowed.
Objective: minimize weighted completion time wjCj
WSPT does not assures optimality.
Objective: minimize total weighted tardiness wjTj
This more general problem is even harder. ATC can beapplied, but solutions can be poor.
98
9
Single and parallel machine problems
Dispatching rules for single machine problems:
99
Problem Heuristic Complexity1||Lmax Earliest Due Date (OPT) P1|| Cj Shortest Processing Time (OPT) P1|| jCj Weighted Shortest Processing Time (OPT) P1||rj| Lmax Branch and Bound (OPT) NP-Hard1|| Tj Branch and Bound (OPT) NP-HardPn||Cmax Longest Processing Time NP-Hard
FLOW SHOP MODELS
10
Flow shop
m machines in series and each job has to be processedon each of the m machinesF2 ||Cmax
Heuristic: Johnson´s rule (SPT(1) – LPT(2))Use SPT for set of jobs (p1j< p2j)Use LPT for set of jobs (p1j> p2j)
Provides optimal solutionF3 ||Cmax
NP- Hard Problem
101
JOB SHOP MODELS
11
Job Shop scheduling
103
precedence constraint
job
operation/task/activity
Dispatching rule for Job Shop
104
J0
J1
J2
12
Dispatching rule for Job Shop
105
J0
J1
J2
Dispatching rule for Job Shop
106
J0
J1
J2
13
Dispatching rule for Job Shop
107
J0
J1
J2
What is the dispatchingrule being used?
Dispatching rule for Job Shop
108
J0
J1
J2
14
Dispatching rule for Job Shop
109
J0
J1
J2
Dispatching rule for Job Shop
110
J0
J1
J2
15
Dispatching rule for Job Shop
111
J0
J1
J2
Dispatching rule for Job Shop
112
J0
J1
J2
16
Dispatching rule: SPT
113
makespan
j = 2
j = 2
j = 2
J0
J1
J2
Job Shop models
Jm - m machines and each job has its ownpredetermined route to follow
Processing of job j in machine i is operation (i, j) withduration pij, and (i, j) N nodes.
J2 ||Cmax can be reduced to 2 problems F2 ||Cmax
Heuristic: SPT(1) - LPT(2) (provides optimal solution)
Jm ||Cmax can be represented in a disjunctive graphG(N,A,B).
114
17
Job Shop models
Direct graph G = (N, A, B) with a set of N operations.Arcs A - conjunctive arcs represent the precedencerelationships between processing operations of a job.Arcs B - disjunctive arcs connect two operations whichbelong to two different jobs, that are to be processedon the same machine.Source U and sink V:
115
k,lU V
operation (k,l)source sink
Disjunctive graph
Example of a Job Shop problem:4 machines3 jobs
116
U
1,3
1,1
1,2
2,3
2,1
4,2
4,3
3,1
3,2 V2,2
p43
0
0
0
p23
p42
p43
18
Solution methods
Branch-and-BoundOptimal solutionWorks until 20 jobs, 20 machines
Search heuristics (Tabu search, Simulated Annealing,Genetic Algorithms, etc.)
Do not guarantee the optimal solutionShifting Bottleneck
Easy and successful
117
Shifting Bottleneck heuristic
Minimize makespan in a job shopLet M denote the set of machinesLet M0 M be machines for which disjunctive arcshave been selectedBasic idea:
Select a machine in M – M0 to be included in M0
Sequence the operations on this machine
118
19
Shifting Bottleneck algorithm
Step 1: Set the initial conditionsSet M0 = . Graph G is the graph with all theconjunctive arcs and no disjunctive arcs.Set Cmax(M0) equal to the longest path in graph G.
Step 2: Analysis of the machines still to be scheduledFor each machine i in M – M0: formulate a singlemachine problem with all operations subject to releasedates and due dates. Release date is the longest path inG from the source to the node. Due date is the longestpath in G from the node to the sink and subtracting pij.Minimize Lmax in each machine.
119
Shifting Bottleneck algorithm
Step 3: Bottleneck selectionThe machine with the highest cost is designated thebottleneck.Insert all the corresponding disjunctive arcs in graph G.Insert machine which is the bottleneck in M0.
Step 4: Resequencing all machines scheduled earlierFind the sequence that minimized the cost and insertthe corresponding disjunctive arcs in graph G.
Step 5: Stopping conditionIf all machines are scheduled (M0 = M) then STOP, elsego to Step 2.
120
20
Example 5.4.2 (p. 89)
121
Jobs Machine sequence Processing Times1 1,2,3 P11=10, P21=8, P31=42 2,1,4,3 P22=8, P12=3, P42=5,P32=63 1,2,4 P13=4, P23=7, P43=3
U
1,3
1,1
1,2
2,3
2,1
4,2
4,3
3,1
3,2 V2,2
p43
0
0
0
p23
p42
p43
Example
Another form of presenting processing times:
122
J1
J2
J3
10 8 4
8 3 5 6
4 7 3
M1
M2
M4
M3
21
Initial conditions
M0 = Ø(set of machines with determined sequence)Set graph G with conjunctive arcs:
123
S
1,3
1,1
1,2
2,3
2,1
4,2
4,3
3,1
3,2 T2,2
10 8
0 4
0
0
8 3 5 6
4 73
Step 1
Find release date and due date of each operationRemove all sequence constraints among activities inM – M0, use CPM to find critical path and minimizestart time, maximize ending time for each activity
Since M0 is initially empty, only conjunctive arcs appearin the graph.
124
22
Step 1: Find Cmax(M0)
For each machine in M-M0 generate an instance of1|rj|Lmax
125
J1
J2
J3
10 8 4
8 3 5 6
4 7 3
Cmax(M0)0 22
[16 22]
J1
J2
J3
10 8 4
8 3 5 6
4 7 3
[0 10] [10 18] [18 22]
[0 8] [8 11] [11 16]
[0 12] [4 19] [11 22]
[rj dj]
Step 1: Find release and due dates
126
J1
J2
J3
10 8 4
8 3 5 6
4 7 3
Cmax(M0)0 22
[16 22]
J1
J2
J3
10 8 4
8 3 5 6
4 7 3
[0 10] [10 18] [18 22]
[0 8] [8 11] [11 16]
[0 12] [4 19] [11 22]
[rj dj]
23
Step 2: Find optimal 1-machine schedules
minimize Lmax for each subproblem
127
Lj = Cj – djLmax = max(Lj)
[16 22]
M1
M2
M3
10
8
4
8
3
5
6
4
7
3
[0 10]
[10 18]
[18 22]
[0 8]
[8 11]
[11 16]
[0 12]
[4 19]
[11 22]M4
J2 J3
10 3 4 Lmax(1) = 5
0 10 13
88 7J2 J3 J1 Lmax(2) = 40 8 15
46 Lmax(3) = 416 22
5 311 16
Lmax(4) = 0
J1
Step 3: Add machine to M0
Pick machine with highest Lmax
Use sequence found in Step 2Lmax(1) = 5Machine 1 must be added to M0
Pinedo’s book has a small mistake (Lmax(2) = 5 in the book)
128
24
Graph after iteration 1
129
S
1,3
1,1
1,2
2,3
2,1
4,2
4,3
3,1
3,2 T2,2
10 8
0 4
0
0
8 3 5 6
4 73
10
3
Cmax({1}) = Cmax( ) + Lmax(1) = 22 + 5 = 27
Iteration 2, Step 1
M0 = {1}Cmax(M0) = 27, find release and due dates
130
[18 27]M3 4 6
[18 27]
5 3[13 21] [24 27]
M4
M2 8 8 7[10 23] [0 10] [17 24]
J2J1 J3J1
J2
J3
10 8 4
8 3 5 6
4 7 3
Cmax(M0)0 27
25
Iteration 2, Step 1
M0 = {1}Cmax(M0) = 27, find release and due dates
131
[18 27]M3 4 6
[18 27]
5 3[13 21] [24 27]
M4
M2 8 8 7[10 23] [0 10] [17 24]
J2J1 J3J1
J2
J3
10 8 4
8 3 5 6
4 7 3
Cmax(M0)0 27
Iteration 2, Step 2
Using release and due dates, minimize Lmax
132
46 Lmax(3) = 118 24
5 313 24
Lmax(4) = 0
[18 27]M3 4 6
[18 27]
5 3[13 21] [24 27]
M4
M2 8 8 7[10 23] [0 10] [17 24]
J2J1 J3 88 7J2 J3J1 Lmax(2) = 10 8 1810
26
Iteration 2, Step 3
Assign machine to M0
Pick machine with highest Lmax
Use sequenc found in Step 2Lmax(2) = Lmax(3) = 1Arbitrarily choose to add machine 2
133
Graph after iteration 2
M0 = {1,2}
134
S
1,3
1,1
1,2
2,3
2,1
4,2
4,3
3,1
3,2 T2,2
10 8
0 4
0
0
8 3 5 6
4 73
10
3
88
Cmax({1,2}) = Cmax({1}) + Lmax(2) = 27 + 1 = 28
27
Iteration 3, Step 1
M0 = {1, 2}Cmax(M0) = 28, find release and due dates
135
[18 28]M3 4 6
[18 28]
5 3[13 22] [25 28]
M4
J1
J2
J3
10 8 4
8 3 5 6
4 7 3
Cmax(M0+)0 28
Iteration 3, Step 1
M0 = {1, 2}Cmax(M0) = 28, find release and due dates
136
[18 28]M3 4 6
[18 28]
5 3[13 22] [25 28]
M4
J1
J2
J3
10 8 4
8 3 5 6
4 7 3
Cmax(M0+)0 28
28
Iteration 3, Step 2
Using release and due dates, min. Lmax
137
46 Lmax(3) = 018 24
5 313 24
Lmax(4) = 0
[18 28]M3 4 6
[18 28]
5 3[13 22] [25 27]
M4
Iteration 3, Step 3
Lmax(3) = Lmax(4) = 0Thus, a final schedule was found in Step 2
138
8J2
6
5
M1
M2
M4
M3
10 3 4
8J1
4
3
7J3
29
Iteration 3, Step 4
If M0 = M, STOPCmax({1,2,3,4}) = Cmax({1})+Lmax(2)+Lmax(3)+Lmax(4)=27+1+0+0 = 28
139
S
1,3
1,1
1,2
2,3
2,1
4,2
4,3
3,1
3,2 T2,2
10 8
0 4
0
0
8 3 5 6
4 73
10
3
88
Discussion
Very effectiveRelatively fastGood solutionsMore general Job Shop problems can be solved as well
‘Just a heuristic’No guarantee of optimum
140
30
LEKIN
On disk with bookGeneric job shop scheduling systemUser friendly windows environmentC++ object oriented designCan add own routinesLook at slides from University of Nottingham comingwith book! or:
http://www.cs.nott.ac.uk/~sxp/
141
LEKIN
142