Job Shop Scheduling
description
Transcript of Job Shop Scheduling
![Page 1: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/1.jpg)
Operational Research & Management Operations Scheduling
Job Shop Scheduling
1. Modelling Job Shop Problems
2. Shifting Bottleneck Heuristic
3. Branch & Bound
![Page 2: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/2.jpg)
Operational Research & Management Operations Scheduling
Topic 1
Job Shop Scheduling Problems
![Page 3: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/3.jpg)
Operational Research & Management Operations Scheduling 3
Job Shops
Have m machines and n jobs
Each job visits some or all of the machines– Only once (or sometimes multiple times if recirculation is allowed)
Customer order of small batches– Wafer fabrication in semiconductor industry
– Hospital
Very difficult to solve
max||Jm C
![Page 4: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/4.jpg)
Operational Research & Management Operations Scheduling 4
Job Shop Example
Constraints
– Job follows a specified route of operations (Conjunctive constraints)
– One job at a time on each machine (Disjunctive constraints)
(1,1)
(2,3)
(3,1)
(4,3)
(1,2) (1,3)
(2,1) (2,2)
(4,2)
(3,3)
Machine 1
Machine 2
Machine 3
Machine 4
![Page 5: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/5.jpg)
Operational Research & Management Operations Scheduling 5
Definitions
A schedule is non-delay if no machine is kept idle (or free resource is kept unused) when there is an operation available
A schedule is called active if -without delaying other operations- no operation can be completed earlier
For “regular” objectives: at least one optimal schedule is active (but not necessarily non-delay)
![Page 6: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/6.jpg)
Operational Research & Management Operations Scheduling 6
Non-active Schedule
(3,2)
Machine 2
Machine 1
Machine 3
(1,1)
(2,3) (2,2) (2,1)(2,1)
0 2 4 6 8
![Page 7: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/7.jpg)
Operational Research & Management Operations Scheduling 7
Active Schedule, not Non-delay
(3,2)
Machine 2
Machine 1
Machine 3
(1,1)
(2,3) (2,2) (2,1)
0 2 4 6 8
![Page 8: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/8.jpg)
Operational Research & Management Operations Scheduling 8
Non-delay schedule
(3,2)
Machine 2
Machine 1
Machine 3
(1,1)
(2,3) (2,2)(2,1)
0 2 4 6 8
![Page 9: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/9.jpg)
Operational Research & Management Operations Scheduling 9
Graph Representation (J-on-N)
Each job follows a given route through the job shop– Picturing each job as a row of nodes: (i,j)=operation on machine i of job j
(1,1) (2,1) (3,1)
(1,2) (2,2) (4,2)
(2,3) (1,3) (4,3) (3,3)
SinkSource
(Conjunctive arcs A)
![Page 10: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/10.jpg)
Operational Research & Management Operations Scheduling 10
Graph Representation
To model the machine constraints, introduce the arc set B (...), giving ‘a clique’ of bidirected arc-pairs on each machine
Full Graph G(N, AB)
(Disjunctive arc-pairs B)
(1,1) (2,1) (3,1)
(1,2) (2,2) (4,2)
(2,3) (1,3) (4,3) (3,3)
SinkSource
![Page 11: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/11.jpg)
Operational Research & Management Operations Scheduling 11
Solving the Problem
Select one arc from each pair of disjunctive arcs: D out of B
Longest path in G(D)=G(N, A D) determines the makespan
(1,1) (2,1) (3,1)
(1,2) (2,2) (4,2)
(2,3) (1,3) (4,3) (3,3)
SinkSource
![Page 12: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/12.jpg)
Operational Research & Management Operations Scheduling 12
Feasibility of the Schedule
Are all selections feasible?
(1,1) (2,1) (3,1)
(1,2) (2,2) (4,2)
(2,3) (1,3) (4,3) (3,3)
SinkSource
Resulting graph G(D) should be acyclic
![Page 13: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/13.jpg)
Operational Research & Management Operations Scheduling 13
Disjunctive Programming
Minimize
s.t.
maxC
max for all operat's ( , )
for all ( , ) ( , )
// arcs in
for all ( , ) ( , )
// arc
ij ij
kj ij ij
ij il il il ij ij
C y p i j
y y p i j k j
A
y y p y y p i j and i l
ors in
0 for all ( , )ij
B
y i j
![Page 14: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/14.jpg)
Operational Research & Management Operations Scheduling 14
Solution Methods
Exact solution– Branch & Bound
– 20 machines and 20 jobs
Dispatching rules (16+)– Shifting Bottleneck
Search heuristics– Tabu, SA, GA, etc.
![Page 15: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/15.jpg)
Operational Research & Management Operations Scheduling
Topic 2
Shifting Bottleneck Heuristic for
Job Shop Scheduling Problems
![Page 16: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/16.jpg)
Operational Research & Management Operations Scheduling 16
Shifting Bottleneck
Minimize makespan in a job shop Let M denote the set of machines
Let M0 M be machines for which disjunctive arcs have been selected
Basic idea:
– Select a machine in M - M0 to be included in M0
– Sequence the operations on this machine
![Page 17: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/17.jpg)
Operational Research & Management Operations Scheduling 17
Example
Three jobs on four machines
Processing job 1 (or 2) without delay requires 22
Job j Sequence 1 2 3 4 total1 1, 2, 3 10 8 4 - 222 2, 1, 4, 3 3 8 6 5 223 1, 2, 4 4 7 - 3 14
Processing Times on Machine i
![Page 18: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/18.jpg)
Operational Research & Management Operations Scheduling 18
Iteration 1
(1,1) (2,1) (3,1)
(2,2) (1,2) (3,2)
(1,3) (2,3) (4,3)
SinkSource (4,2)
0
10 84
8 3 5 6
4 7 30
0
0M
22)( 0max MC
![Page 19: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/19.jpg)
Operational Research & Management Operations Scheduling 19
Selecting a Machine
Set up a non-preemptive single machine maximum lateness (1||Lmax) problem for Machine 1:
Consider rj as earliest starting time and dj as latest finish time
Optimum sequence is 1, 2, 3 with Lmax(1) = 5
Job j 1 2 3p(1, j) 10 3 4r(1, j) 0 8 0d(1, j) 10 11 12
![Page 20: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/20.jpg)
Operational Research & Management Operations Scheduling 20
Optimum sequence is 2, 3, 1 with Lmax(2) = 5
Selecting a Machine
Set up a non-preemptive single machine maximum lateness (1||Lmax) problem for Machine 2:
Job j 1 2 3p(2, j) 8 8 7r(2, j) 10 0 4d(2, j) 18 8 19
![Page 21: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/21.jpg)
Operational Research & Management Operations Scheduling 21
Selecting a Machine
Similarly,
Either Machine 1 or Machine 2 is the bottleneck
0)4(
4)3(
max
max
L
L
![Page 22: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/22.jpg)
Operational Research & Management Operations Scheduling 22
Iteration 2
(1,1) (2,1) (3,1)
(2,2) (1,2) (3,2)
(1,3) (2,3) (4,3)
SinkSource (4,2)
0
10 84
8 3 5 6
4 7 30
0
0 {1}M
10
3
27522)1()(})1({ maxmaxmax LCC
![Page 23: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/23.jpg)
Operational Research & Management Operations Scheduling 23
Optimum sequence is 2, 1, 3 with Lmax(2) = 1
Selecting a Machine
Set up a non-preemptive single machine maximum lateness (1||Lmax) problem for Machine 2:
Old:
New:
Job j 1 2 3p(2, j) 8 8 7r(2, j) 10 0 4d(2, j) 18 8 19
Job j 1 2 3p(2, j) 8 8 7r(2, j) 10 0 17d(2, j) 23 10 24
![Page 24: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/24.jpg)
Operational Research & Management Operations Scheduling 24
Optimum sequence is 1, 2 with Lmax(3) = 1
Selecting a Machine
Set up a non-preemptive single machine maximum lateness (1||Lmax) problem for Machine 3:
Job j 1 2p(3, j) 4 6r(3, j) 18 18d(3, j) 27 27
![Page 25: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/25.jpg)
Operational Research & Management Operations Scheduling 25
Selecting a Machine
Similarly,
Either Machine 2 or Machine 3 is the bottleneck
max
max
(3) 1
(4) 0
L
L
![Page 26: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/26.jpg)
Operational Research & Management Operations Scheduling 26
Iteration 3
(1,1) (2,1) (3,1)
(2,2) (1,2) (3,2)
(1,3) (2,3) (4,3)
SinkSource (4,2)
0
10 84
8 3 5 6
4 7 30
0
0 {1,2}M
10
3
max max max({1, 2}) ({1}) (2) 27 1 28C C L
8 8
![Page 27: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/27.jpg)
Operational Research & Management Operations Scheduling 27
Shifting Bottleneck Heuristic
1. M0:=; G=(N, u, v, A); Cmax := longest path-length in G between u and v
2. iM-M0 do // solving a single machine problem
a. for all operations o=(i,j) on machine i do
- find longest paths u-o and o-v of lengths lu,o and lo,v, say,
- define release time rij = lu,o, due date dij = Cmax - (lo,v -pij)
b. for this single machine problem on i: determine L*max(i) with choices D*(i)
3. k := arg max iM0 L*max(i) ; // decide for bottleneck machine k
Insert arcs D(k)=D*(k) in G and update Cmax // Cmax may increase
4. iM0-{k} do // Re-sequencing ‘decided’ machines
a. remove D(i) from G and recompute Cmax
b. recompute D*(i) as in step 2 above
c. insert D(i)= D*(i) in G and update Cmax // Cmax may decrease
5. M0:= M0 {k}; if M0<M then (add delayed precedence and) return to step 2.
![Page 28: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/28.jpg)
Operational Research & Management Operations Scheduling 28
Discussion
Procedure continues until all disjunctive arcs have been added Watch out for cycles, because of other (scheduled) machines
– delayed precedence constraints may be required, see example in book
Very effective– Relatively fast
– Good solutions
– More general Job Shop problems can be solved as well
‘Just a heuristic’– No guarantee of optimum
– The subproblem Max. Lateness, 1 | rj , prec | Lmax , is NP-hard
![Page 29: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/29.jpg)
Operational Research & Management Operations Scheduling 30
Discussion
Shifting bottleneck can be applied generally Basic idea
– Solve problem “one variable at a time”
– Determine the “most important” variable
– Find the best value of that variable
– Move on to the “second most important” ….
– Here we treat each machine as a variable
![Page 30: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/30.jpg)
Operational Research & Management Operations Scheduling
Topic 3
Branch & Bound for
Job Shop Scheduling Problems
![Page 31: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/31.jpg)
Operational Research & Management Operations Scheduling 32
Branch and Bound
Minimize makespan Notation
– operation (i,j) has duration pij
– Let W denote operations whose predecessors have all been scheduled
– Let rij be the earliest possible starting time of (i,j) in W.
FIRST SUBJECT: How to branch to active schedules
![Page 32: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/32.jpg)
Operational Research & Management Operations Scheduling 33
Branching
In the optimal schedule each machine has some order for its operations: let machine i has first (i, j1), then (i, j2) etc.
In partial schedules, B&B subproblems at level k, it is decided for [some] machines i, in ancestor B&B nodes, which operations are (i,j1), (i,j2),..., (i, jk(i) ) [possibly k(i)=0 –if i has no decisions yet]
(i*, jk(i)+1)=(i*, j')
New choices:for some machine i* decide on a next operation (i*, jk(i)+1)=(i*, j''')
(i*, jk(i)+1)=(i*, j'')
Ancestor choices
!Avoid partial schedules that are not active!
![Page 33: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/33.jpg)
Operational Research & Management Operations Scheduling 34
Which operations can be next in active schedule?
Machine i*
(i*, j)
(i*,k)
0 t
* 0 * 0
*
{ }
( ) min //( , )
'( *) {( *, ) : operations on * with release ( )}
ij ij i j i j
i j
first of unscheduled operations for each job
t r p r p first finishi j
i i j i r t
(i*, j0) ( *, ) 'i k
If active, a schedule can have (i*, j) ' as the next i*-operation, but not (i*,k) '
(i*, j0)
ri* j t() ri* k
![Page 34: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/34.jpg)
Operational Research & Management Operations Scheduling 35
' is a subset of , why?
Then:ri* j0 + pi* j0 = t() <= ri1 j + pi1 j <= ri* j,
showing that (i*,j) is cannot be part of
Suppose (i*, j) in ' is not part of : i.e., some other operation, say (i1, j) is first for job j. (i1, j) is by definition in and to be scheduled before (i*, j)
(i1, j) (i*, j)
(i*, j0)
*' {( *, ) on * | ( )}i ji j i r t
Gant-Chart of operations of j:
and of j0:
t()
![Page 35: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/35.jpg)
Operational Research & Management Operations Scheduling 36
Generating Active Schedules
Step 1. (Initialize)– Let contain the first operations of each job; rij = 0 for all (i,j) ;
Step 2. (Machine selection)– Compute of current partial schedule: time
– i* = associated machine
( ) min( , )
ij ijt r pi j
Step 3. (Branching) // extends current schedule in all active ways
– Let ’ consist of operations (i*, j) on machine i* with
– For each (i*, j) in ’ extend current partial schedule with (i*, j) next on i*
– For each thus generated, extended partial schedule:
a. delete (i*, j) from , insert immediate follower (k, j) in ,
b. return with this schedule, as current, to step 2.
* ( )i jr t
![Page 36: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/36.jpg)
Operational Research & Management Operations Scheduling 37
Branching Tree
(i*, jk(i)+1)=(i*, j')
Some machine i* decides on next operation (i*, jk(i)+1)=(i*, j''')
(i*, jk(i)+1)=(i*, j'')
ancestor choices
Generating active schedules, that is
not all choices, only operations (i*, j' ) of '
![Page 37: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/37.jpg)
Operational Research & Management Operations Scheduling 38
On Example
(1,1) (2,1) (3,1)
(2,2) (1,2) (3,2)
(1,3) (2,3) (4,3)
SinkSource (4,2)
010 8
48 3 5 6
4 7 30
0
*
'
{(1,1), (2, 2), (1,3)}( ) min{0 10,0 8,0 4} 4
1
{(1,1), (1,3)}
t
i
Level 1 root
Branch at level 1 for possibilities ’ of (1, j1) at i* =1
(1,1) (1,3)
22
![Page 38: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/38.jpg)
Operational Research & Management Operations Scheduling 39
Level 1: when (1,1) is first on machine 1
Disjunctive Arcs
(1,1) (2,1) (3,1)
(2,2) (1,2) (3,2)
(1,3) (2,3) (4,3)
SinkSource (4,2)
010 8
4
8 3 5 6
4 7 30
0
1010
Cmax >= 24
![Page 39: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/39.jpg)
Operational Research & Management Operations Scheduling 40
Level 1: when (1,3) is first on machine 1
Disjunctive Arcs
(1,1) (2,1) (3,1)
(2,2) (1,2) (3,2)
(1,3) (2,3) (4,3)
SinkSource (4,2)
0
10 84
8 3 5 6
4 7 30
0
4 4
Cmax >= 26
![Page 40: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/40.jpg)
Operational Research & Management Operations Scheduling 41
Branching Tree
(1,1) scheduled firston machine 1
LB = 24
(1,3) scheduled firston machine 1
LB = 26
Start, no disjunctive arcsLB=22
![Page 41: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/41.jpg)
Operational Research & Management Operations Scheduling 42
Next branching: at subproblem (1,1)
*
'
{(2,2), (2,1), (1,3)}( ) min{0 8, 10 8, 10 4} 8
2
{(2,2)}
t
i
(1,1) (2,1) (3,1)
(2,2) (1,2) (3,2)
(1,3) (2,3) (4,3)
SinkSource (4,2)
010 8
4
8 3 5 6
4 7 30
0
Level 2
1010
root
(1,1) (1,3)
22
(2,2)
![Page 42: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/42.jpg)
Operational Research & Management Operations Scheduling 43
Level 2: Extending to (2,2) as first on machine 2
As yet no new disjunctive Arcs
(1,1) (2,1) (3,1)
(2,2) (1,2) (3,2)
(1,3) (2,3) (4,3)
SinkSource (4,2)
010 8
4
8 3 5 6
4 7 30
0
108
8
Still LB=24
![Page 43: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/43.jpg)
Operational Research & Management Operations Scheduling 44
(1,1) scheduled firston machine 1
LB = 24(1,3) scheduled firston machine 1
LB = 26
LB=22, no disjunctive arcs
(1,1) first on M1 and(2,2) first on M2
LB = 24
Branching Tree
![Page 44: Job Shop Scheduling](https://reader037.fdocuments.in/reader037/viewer/2022110215/56816773550346895ddc64d7/html5/thumbnails/44.jpg)
Operational Research & Management Operations Scheduling 45
Lower Bounds
Lower bounds
– Length of critical path in G(D’). Very quick but not very tight
– Linear programming relaxation. Less quick but tighter
– Maximum Lmax over all machines
Like in Shifting-Bottleneck Heuristic
slowest (m NP-hard problems), but tightest !