Chapter 5

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Ho Chi Minh City International University Scheduling

Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

• In some models a job may visit any given machine at most once and in other models a job may visit
each machine more than once, i.e, recirculation.

• A generalization of the basic job shop is a so-called flexible job shop which consists of a collection of
Chapter 5: Job Shop Scheduling workcenters and each workcenter consists of a number of identical machines in parallel.

• Each job follows a predetermined route visiting a number of workcenters; when a job visits a workcenter,
Phan Nguyen Ky Phuc it may be processed on any one of the machines at that workcenter.

March 14, 2022


2 Single Machine and Parallel Machine Models
• A single machine is the simplest case of a job shop and a parallel machine environment is equivalent
Contents
to a flexible job shop that consists of a single workcenter.

1 Introduction 1

Single Machine
2 Single Machine and Parallel Machine Models 2
• Consider a single machine and n jobs. Job j has a processing time pj , a release date rj and a due date
3 Job Shop and Mathematical Programming 3 dj . If rj = 0 and dj = ∞, then the processing of job j is basically unconstrained.
3.1 Mathematical Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
• The makespan Cm ax in a single machine environment does not depend on the schedule.
3.2 Cplex Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Pn
• If the objective is to minimize the total weighted completion time, i.e., j=1 wj Cj , and the processing
3.3 Job Shops and the Shifting Bottleneck Heuristic . . . . . . . . . . . . . . . . . . . . . . . . . 6 of the jobs is unconstrained, then the the optimal schedule is Weighted Shortest Processing Time
3.4 Example of Shifting Bottle Neck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 first WSPT rule, which schedules the jobs in decreasing order of wj /pj .

3.4.1 Iteration 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 • If the objective is to minimize the maximum lateness Lmax and the jobs are all released at time 0,
then the optimal schedule is the Earliest Due Date first (EDD) rule, which schedules the jobs in
3.4.2 Iteration 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
increasing order of dj
3.5 Job Shops and Constraint Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
• WSPT rule and the EDD rule are static priority rules.
3.6 Constraint Satisfaction Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
• When the release time is not known in advanced, if the objective is to minimize the maximum lateness
3.7 Example of Constraint Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Lmax then the Minimum Slack first (MS) is adopted. If the machine becomes available at time t,
3.7.1 Iteration 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 the job with the least slack,i.e., max(dj − pj − t, 0) is assigned to the machine.MS rule is a dynamic
3.7.2 Iteration 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 priority rule, in which the priority of each job is changed regarding to time.

3.7.3 Iteration 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 • If the objective is to minimize the total weighted tardiness , then the heuristic algorithm Apparent
3.7.4 Iteration 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Tardiness Cost first (ATC) rule is applied. If the machine is free at time t, according to ATC rule,
among the remaining jobs the job with the highest Ij (t) is selected
3.7.5 Iteration 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
 
wj max (dj − pj − t, 0)
3.7.6 Iteration 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Ij (t) = exp −
pj K p̄

4 Assigment 17 where K is a so-called scaling parameter and p̂ is the average of the processing times of the jobs that
remain to be scheduled.

1 Introduction Parallel Machines

This chapter focuses on job shops. • If the objective is minimize Cmax , a heuristic priority rule, namely the Longest Processing Time
first (LPT) rule is adopted. According to this rule, whenever one of the machines is freed, the longest
• There are n jobs and each job visits a number of machines following a PREDETERMINED ROUTE job among those waiting for processing is selected to go next. This rule guarantees a solution that is
within 33 % of the optimal

1 Chapter 5: Job Shop Scheduling Page 2


Ho Chi Minh City International University Scheduling Ho Chi Minh City International University Scheduling
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

• If all n jobs are available at t = 0, then the nonpreemptive SPT rule minimizes the total completion Table 1: Parameters of Example
P
time j Cj ;the nonpreemptive SPT rule remains optimal when preemtions are allowed.
Job Sequence Processing Time
• Minimizing the total weighted completion time
P 1 1,2,3 p11 = 10, p21 = 8, p31 = 4
j wj Cj in a parallel machine setting when all jobs are
2 2,1,4,3 p22 = 8, p12 = 3, p42 = 5, p32 = 6
available at t = 0 is NP-Hard, the WSPT rule can guarantee a solution within 22 % of the optimal. 3 1,2,4 p13 = 4, p23 = 7, p43 = 3

3 Job Shop and Mathematical Programming 3.1 Mathematical Programming

Sets
Consider a job shop with n jobs and m machines. Each job has to be processed by a number of machines in
M : set of machines
a given order and there is no recirculation. The processing of job j on machine i is referred to as operation
J: set of jobs
(i, j), i.e., (machine, job) and its duration is pij . The objective is to minimize the makespan Cmax . The
A : be the set of solid arcs
problem can be presented a graph G
B : be the set of broken arcs
Graph G
N : be the set of nodes
Parameters
• Graph G composes of a set of nodes N and set of conjuntive (solid) arcs A and and disjunctive (broken)
pmj be processing time of job j on machine m
arcs B.
Variables
• A node is presented as (i, j) , i.e., (machine, job) ymj : starting of job j on machine m
xmjk : binary variable xmjk = 1 if job j is processed before job k in machine m; otherwise xmjk = 0
• The conjunctive (solid) arcs A represent the routes of the jobs. If arc (i, j) → (h, j) ∈ A, then job j
Cmax : the make span
has to be processed on machine i before it is processed on machine h

• Two operations that belong to two different jobs and which have to be processed on the same machine min Cmax
are connected to one another by two so-called disjunctive (broken) arcs going in opposite directions.
subject to
• All arcs emanating from a node, solid as well as broken, have as length the processing time of the
operation that is represented by that node. In addition there is a source U and a sink V , which are yhj ≥ ymj + pmj , ∀(m, j) → (h, j) ∈ A
dummy nodes. Cmax ≥ pmj + ymj , ∀(m, j) ∈ N
ymk ≥ pmj + ymj − BigM × (1 − xmjk ), ∀(m, k), (m, j), m ∈ M
• A feasible schedule corresponds to a selection of one broken arc from each pair. Such a selection
determines the sequence in which the operations are to be performed on that machine. xmjk + xmkj = 1
Example
• The makespan of a feasible schedule is determined by the longest path in the feasible schedule from
Consider the following example with 4 machines and 3 jobs. The route, i.e., the machine sequence, as well
the source U to the sink V .
as the processing times are presented in the Table 1 below.

3.2 Cplex Code

In this example, the tuple approach is used to write the code. Remind the structure of the set.
1 t u p l e tupleName {
2 dataType a t t r i b u t e 1 ;
3 dataType a t t r i b u t e 2 ;
4 };
5 s e t o f ( tupleName ) t u p l e S e t = . . . ;
6 f l o a t ParameterA [ t u p l e S e t ] = . . . ;
7 dvar b o o l e a n X[ t u p l e S e t ] ;

Figure 1: Directed Graph of Job Shop


Data is given in "JobShopTupleData.xlsx" excel file as

File *.mod
1 i n t numJob = . . . ;
2 i n t numMachine = . . . ;
3 t u p l e Node{

Chapter 5: Job Shop Scheduling Page 3 Chapter 5: Job Shop Scheduling Page 4
Ho Chi Minh City International University Scheduling Ho Chi Minh City International University Scheduling
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

Table 2: Data in "JobShopTupleData.xlsx" 26 dvar b o o l e a n x [ BrokenArcSet ] ;


27 dvar f l o a t+ Cmax ;
(b) Data in "Node Sheet" 28

A B C 29 e x e c u t e PRE_PROCESSING{
1 Machine Job ProTime 30 c p l e x . epgap = 0 . 0 1 ;
2 1 1 10 31 c p l e x . t i l i m =60∗60;
3 2 1 8 32 }
(a) Data in "Scalar Sheet"
33 m i n i m i z e Cmax ;
4 3 1 4
A B 34 s u b j e c t to {
5 2 2 8
1 numJob 3 35 f o r a l l (< j , p , s> i n S o l i d A r c S e t ) {
6 1 2 3
2 numMachine 4 36 y[< s , j >] >=y[<p , j >]+ProTime[<p , j > ] ;
7 4 2 5
37 }
8 3 2 6
38 f o r a l l (<m, j > i n NodeSet ) {
9 1 3 4 39 Cmax>=y[<m, j >]+ProTime[<m, j > ] ;
10 2 3 7 40 }
11 4 3 3 41 f o r a l l (<m, p , s> i n BrokenArcSet ) {
(c) Data in "BrokenArc Sheet" 42 y[<m, s >]>=y[<m, p>]+ProTime[<m, p>]−BigM∗(1−x[<m, p , s >]) ;
A B C 43 x[<m, p , s >]+x[<m, s , p>]==1;
1 Machine PreJob SucJob 44 }
45 }
2 1 1 2
46 e x e c u t e WRITE{
3 1 2 1 (d) Data in "SolidArc Sheet"
47 v a r o f i l e =new I l o O p l O u t p u t F i l e ( " R e s u l t . t x t " ) ;
4 1 2 3
A B C 48 o f i l e . w r i t e l n ( "The o b j e c t i v e f u n c t i o n v a l u e : " , c p l e x . getObjValue ( ) ) ;
5 1 3 2
1 Job PreMachine SucMachine 49 f o r ( v a r Node i n NodeSet ) {
6 1 1 3
2 1 1 2 50 o f i l e . w r i t e l n ( " Machine [ " , Node . Machine , " ] w i l l s t a r t Job [ " , Node . Job , " ] a t : " , y [ Node ] ) ;
7 1 3 1
3 1 2 3 51 o f i l e . w r i t e l n ( " P r o c e s s Time [ " , Node . Machine , Node . Job , " ] : " , ProTime [ Node ] ) ;
8 2 1 2 }
4 2 2 1 52
9 2 2 1 o f i l e . w r i t e l n ( "−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−−" ) ;
5 2 1 4 53
10 2 2 3 o f i l e . close () ;
6 2 4 3 54
11 2 3 2 }
7 3 1 2 55
12 2 1 3
8 3 2 4
13 2 3 1 File *.dat
14 3 1 2
15 3 2 1 1 S h e e t C o n n e c t i o n MyData ( " JobShopTupleData . x l s x " ) ;
16 4 2 3 2 numJob from SheetRead ( MyData , " S c a l a r ! B1" ) ;
17 4 3 2 3 numMachine from SheetRead ( MyData , " S c a l a r ! B2" ) ;
4 NodeSet from SheetRead ( MyData , "Node ! A2 : B11" ) ;
5 S o l i d A r c S e t from SheetRead ( MyData , " S o l i d A r c ! A2 : C8" ) ;
4 i n t Machine ; 6 BrokenArcSet from SheetRead ( MyData , " BrokenArc ! A2 : C17" ) ;
5 i n t Job ; 7 ProTime from SheetRead ( MyData , "Node ! C2 : C11" ) ;
6 }
7 tuple SolidArc {
8 int Job ;
3.3 Job Shops and the Shifting Bottleneck Heuristic
9 int PreMachine ;
10 int SucMachine ;
11 } One of the most successful procedures for minimizing the makespan in a job shop is the Shifting Bottleneck
12 tuple BrokenArc { heuristic.
13 int Machine ; In the following overview of the Shifting Bottleneck heuristic M denotes the set of all m machines. In the
14 int PreJob ;
heuristic algorithm it is assumed that in previous iterations a selection of disjunctive arcs (broken arcs) has
15 int SucJob ;
16 } been fixed for a subset M0 of machines. So for each one of the machines in M0 a sequence of operations has
17 range JobRange = 1 . . numJob ; already been determined.
18 range MachineRange = 1 . . numMachine ;
19

20 s e t o f ( Node ) NodeSet = . . . ; 3.4 Example of Shifting Bottle Neck


21 s e t o f ( SolidArc ) SolidArcSet = . . . ;
22 s e t o f ( BrokenArc ) BrokenArcSet = . . . ; Consider the following example with 4 machines and 3 jobs. The route, i.e., the machine sequence, as well
23 f l o a t BigM=10000;
as the processing times are presented in the Table 1 below.
24 f l o a t ProTime [ NodeSet ] = . . . ;
25 dvar f l o a t+ y [ NodeSet ] ;

Chapter 5: Job Shop Scheduling Page 5 Chapter 5: Job Shop Scheduling Page 6
Ho Chi Minh City International University Scheduling Ho Chi Minh City International University Scheduling
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

Table 3: Parameters of Example

Job Sequence Processing Time


1 1,2,3 p11 = 10, p21 = 8, p31 = 4
2 2,1,4,3 p22 = 8, p12 = 3, p42 = 5, p32 = 6
3 1,2,4 p13 = 4, p23 = 7, p43 = 3

3.4.1 Iteration 1

The graph with only solid arcs are contructed. In this graph Cmax = 22

Algorithm 1 Shifting Bottleneck Heuristic


Input:
Given processing time parameters pij
Job sequence
Process:
1: Step 0: Initial Condition
2: Set M0 = ∅
3: Graph G is the graph with all the solid arcs and no broken arcs.
4: Set Cmax (M0 ) equal to the longest path in graph G.
5:
6: Step 1: Analysis of machines still to be scheduled
7: Do for each machine i, i 6∈ M0 the following: formulate a single machine problem with all operations Figure 2: Shifting Bottleneck Iteration 1
subject to release dates and due dates
8: The release date of operation (i, j) is determined by the longest path in graph G from the source to
node (i, j) Remind
9: The due date of operation (i, j) can be computed by considering the longest path in graph G from node
(i, j) to the sink and subtracting pij • The release date of operation (i, j) is determined by the longest path in graph G from the source to
10: Minimize the Lmax in each one of these single machine subproblems. node (i, j)
11: Let Lmax (i) denote the minimum Lmax in the subproblem corresponding to machine i.
12: • The due date of operation (i, j) can be computed by considering the longest path in graph G from
13: Step 2: Bottleneck selection and sequencing)
node (i, j) to the sink and subtracting pij
14: Let Lmax (h) = max (Lmax (i))
i∈M −M0
15: Sequence machine h according to the sequence generated for it in Step 1.
16: Insert all the corresponding broken arcs in graph G. Table 4: Release Date and Due Date of Operations in Iteration 1
17: Insert machine h in M0
Job (1,1) (2,1) (3,1) (2,2) (1,2) (4,2) (3,2) (1,3) (2,3) (4,3)
18:
19: Step 3:Resequencing of all machines scheduled earlier Processing time 10 8 4 8 3 5 6 4 7 3
20: Do for each machine i, ∈ M0 − h the following: Release Date 0 10 18 0 8 11 16 0 4 11
21: Delete the corresponding broken arcs from G; formulate a single machine subproblem for machine i
Due Date 10 18 22 8 11 16 22 12 19 22
with release dates and due dates of the operations determined by longest path calculations in G. Slack Time 0 0 0 0 0 0 0 8 8 8
22: Find the sequence that minimizes Lmax (i) and insert the corresponding disjunctive arcs in graph G.
23: Table 5: Data for Each Single Machine in Iteration 1
24: Step 4:Stopping criterion
25: If M0 = M then STOP, otherwise go to Step 1. (a) Machine 1 (b) Machine 2 (c) Machine 3 (d) Machine 4

Job 1 2 3 Job 1 2 3 Job 1 2 Job 2 3


p1j 10 3 4 p2j 8 8 7 p3j 4 6 p4j 5 3
r1j 0 8 0 r2j 10 0 4 r3j 18 16 r4j 11 11
d1j 10 11 12 d2j 18 8 19 d3j 22 22 d4j 16 22

For each machine, the Earliest Release Day First rule is applied:

• For machine 1, the sequence is (1, 1) → (1, 3) → (1, 2), Lmax (1) = 6

• For machine 2, the sequence is (2, 2) → (2, 3) → (2, 1), Lmax (2) = 5

• For machine 3, the sequence is (3, 2) → (3, 1), Lmax (3) = 4

Chapter 5: Job Shop Scheduling Page 7 Chapter 5: Job Shop Scheduling Page 8
Ho Chi Minh City International University Scheduling Ho Chi Minh City International University Scheduling
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

• For machine 4, the sequence is (4, 2) → (4, 3), Lmax (4) = 0

Focus on machine with largest bottle neck. Machine 1 is selected to be included in M0 .

3.4.2 Iteration 2

Figure 4: Shifting Bottle Neck Final Schedule

• A algorithm has to produce a sequence for each machine so that the overall schedule has a makespan
¯
is less than or equal to a given deadline d.

• The earliest possible starting time and latest possible completion time for each operation on the machine
are found

Figure 3: Shifting Bottleneck Iteration 2 • The time windows of two operations on a given machine are compared to check whether they overlap,
then the precedence constraints will be applied
The makespan is given by:
0
• Sij denote the earliest possible starting time of operation (i, j)
U → (1, 1) → (1, 3) → (1, 2) → (4, 2) → (3, 2) → V
The makespan is Cmax = 28 0
• Cij denote the earliest possible completion time of operation (i, j)
Table 6: Release Date and Due Date for Iteration 2 00
• Sij denote the latest possible starting time of operation (i, j)
Job (1,1) (2,1) (3,1) (2,2) (1,2) (4,2) (3,2) (1,3) (2,3) (4,3) 00
• Cij denote the latest possible completion time of operation (i, j)
Processing time 10 8 4 8 3 5 6 4 7 3
Release Date 0 10 18 0 14 17 22 10 14 21 0
• The earliest possible starting time of operation (i, j), i.e., Sij , may be regarded as a local release date
Due Date 10 24 28 14 17 22 28 14 25 28 00
of the operation and denoted by rij , whereas the latest possible completion time, i.e., Cij , may be
Slack Time 0 6 6 6 0 0 0 0 4 4
considered a local due date denoted by dij

Table 7: Data for Each Single Machine in Iteration 2

(a) Machine 1 (b) Machine 2 (c) Machine 3 (d) Machine 4

Job 1 2 3 Job 1 2 3 Job 1 2 Job 2 3


p1j 10 3 4 p2j 8 8 7 p3j 4 6 p4j 5 3
r1j 0 14 10 r2j 10 0 14 r3j 18 22 r4j 17 21
d1j 10 17 14 d2j 24 14 25 d3j 28 28 d4j 22 28

For each machine, the Earliest Release Day First rule is applied:

• For machine 2, the sequence is (2, 2) → (2, 1) → (2, 3), Lmax (2) = 0

• For machine 3, the sequence is (3, 1) → (3, 2), Lmax (3) = 0

• For machine 4, the sequence is (4, 2) → (4, 3), Lmax (4) = 0

None of the machines constitutes a bottleneck in any way. The final schedule is

3.5 Job Shops and Constraint Programming

• Constraint Programming only tries to find a good solution that is feasible and satisfies all the given
Figure 5: Slack Calculation
constraints. The constraints may include release dates and due dates for the jobs.

Chapter 5: Job Shop Scheduling Page 9 Chapter 5: Job Shop Scheduling Page 10
Ho Chi Minh City International University Scheduling Ho Chi Minh City International University Scheduling
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

• The slack between the processing of operations (i, j) and (i, k) on machine i is defined as Algorithm 2 Constraint Satisfaction Procedure
Input:
00 0 Given processing time parameters pij
σ(i,j)→(i,k) = Sik − Cij
00 0 Job sequence
= Cik − Sij − pij − pik Process:
= dik − rij − pij − pik 1: Step 1
2: Compute for each unordered pair of operations the slacks σ(i,j)→(i,k) and σ(i,k)→(i,j)
σ(i,k)→(i,j) = dij − rik − pij − pik 3:
4: Step 2
• Case 1 If σ(i,j)→(i,k) ≥ 0 and σ(i,k)→(i,j) < 0 then (i, j) → (i, k) 5: Check dominance conditions and classify remaining ordering decisions.
6: If any ordering decision is of Case 3, then BACKTRACK.
• Case 2 If σ(i,k)→(i,j) ≥ 0 and σ(i,j)→(i,k) < 0 then (i, k) → (i, j) 7: If any ordering decision is either of Case 1 or Case 2 go to Step 3; otherwise go to Step 4.
8:
• Case 3 If σ(i,j)→(i,k) < 0 and σ(i,k)→(i,j) < 0 then there is no schedule that satisfies the precedence 9: Step 3
constraints. 10: Insert new precedence constraint and go to Step 1.
11:
• Case 4 If σ(i,j)→(i,k) ≥ 0 and σ(i,k)→(i,j) ≥ 0 then either ordering between the two operations is still 12: Step 4
13: If no ordering decision is of Case 4, then solution is found. STOP..
possible.
14: Otherwise go to Step 5
15:
• If there is more than one pair of operations that satisfy the conditions of Case 4, then a selection
16: Step 5
heuristic has to be applied. The pair with the lowest flexibility is selected. 17: Compute φ0 ((i, j)(i, k)) for each pair of operations not yet ordered. Select the pair with the minimum
q φ0 ((i, j)(i, k)).
φ0 ((i, j), (i, k)) =
 
min σ(i,j)→(i,k) , σ(i,k)→(i,j) × max σ(i,j)→(i,k) , σ(i,k)→(i,j) 18: If σ(i,j)→(i,k) ≥ σ(i,k)→(i,j) , then operation (i, k) must follow (i, j); otherwise operation (i, j) must follow
operation (i, k).
19: Go to Step 3.
• After the pair of operations with the least flexibility φ0 ((i, j)(i, k)) has been selected, the precedence
constraint that retains the most flexibility is imposed, i.e., if
Algorithm 3 Framework for Constraint Programming
Input:
σ(i,j)→(i,k) ≥ σ(i,k)→(i,j) Given processing time parameters pij
Job sequence
then operation (i, j) must precede operation(i, k) Process:
1: Step 1
• In order to apply the constraint satisfaction procedure to a job shop problem with the makespan 2: Set d = (du + dl )/2
objective, it has to be embedded in the following framework. First, an upper bound du and a lower 3: Apply the Constraint Satisfaction Procedure Algorithm
bound dl have to be found for the makespan. 4:
5: Step 2
6: If Cmax < d set du = d
3.6 Constraint Satisfaction Procedure 7: If Cmax > d set dl = d
8:
9: Step 4
3.7 Example of Constraint Programming 10: If du − dl > 1 return to Step 1
11: Otherwise STOP
Consider the following example with 4 machines and 3 jobs. The route, i.e., the machine sequence, as well
as the processing times are presented in the Table below. Consider a due date d = 32 when all jobs have to
3.7.1 Iteration 1
be completed.
The graph with only solid arcs is contructed. In this graph set the makespan equal to the due date d = 32
Table 8: Parameters of Example
Table 9: Release Date and Due Date in Iteration 1
Job Sequence Processing Time
Job (1,1) (2,1) (3,1) (2,2) (1,2) (4,2) (3,2) (1,3) (2,3) (4,3)
1 1,2,3 p11 = 10, p21 = 8, p31 = 4
Processing time 10 8 4 8 3 5 6 4 7 3
2 2,1,4,3 p22 = 8, p12 = 3, p42 = 5, p32 = 6
Release Date 0 10 18 0 8 11 16 0 4 11
3 1,2,4 p13 = 4, p23 = 7, p43 = 3
Due Date 20 28 32 18 21 26 32 22 29 32

For each machine the slack between 2 operations are computed


From this table following precedence constraints are applied

Chapter 5: Job Shop Scheduling Page 11 Chapter 5: Job Shop Scheduling Page 12
Ho Chi Minh City International University Scheduling Ho Chi Minh City International University Scheduling
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

Table 12: Data for Each Single Machine in Iteration 2

(a) Machine 1
(b) Machine 2
σR→C (1, 1) (1, 2) (1, 3)
σR→C (2, 1) (2, 3)
(1, 1) 8
(2, 1) 4
(1, 2) 5
(2, 3) 5
(1, 3) 4 14
(c) Machine 3 (d) Machine 4

σR→C (3, 1) (3, 2) σR→C (4, 2) (4, 3)


(3, 1) 4 (4, 2) 11
Figure 6: Constraint Programming Iteration 1 (3, 2) 4 (4, 3) 3

Table 10: Data for Each Single Machine in Iteration 1


No further precedence constraints are applied, for each pair σ(i,j)→(i,k) ≥ 0 and σ(i,k)→(i,j) ≥ 0 the
(a) Machine 1 (b) Machine 2
φ0 ((i, j)(i, k)) is computed The pair with least flexibility is (3, 1), (3, 2). Since the slack are such that
σR→C (1, 1) (1, 2) (1, 3) σR→C (2, 1) (2, 2) (2, 3)
(1, 1) 8 8 (2, 1) -8 4 Table 13: The calculation of φ0 ((i, j)(i, k)) at Iteration 2
(1, 2) -1 7 (2, 2) 12 14 0
(1, 3) 6 14 (2, 3) 9 -1 pair φ
√ ((i, j)(i, k))
(c) Machine 3 (d) Machine 4
(1, 1)(1, 3) √4 × 8 = 5.65
(1, 2)(1, 3) √5 × 14 = 8.36
σR→C (3, 1) (3, 2) σR→C (4, 2) (4, 3) (2, 1)(2, 3) √4 × 5 = 4.47
(3, 1) 4 (4, 2) 12 (3, 1)(3, 2) √4 × 4 = 4.00
(3, 2) 6 (4, 3) 7 (4, 2)(4, 3) 3 × 11 = 5.74

• (1, 1) → (1, 2),


σ(3,2)→(3,1) = σ(3,1)→(3,2) = 4
• (2, 2) → (2, 1)
either precedence constraint can be inserted. Assume that (3, 2) → (3, 1) is adopted.
• (2, 2) → (2, 3)

3.7.3 Iteration 3
3.7.2 Iteration 2
The updated graph and updated release date and due date are given as
The updated graph and updated release date and due date are given as Based on the former precedent

Figure 8: Constraint Programming Iteration 3


Figure 7: Constraints Programming Iteration 2

Table 14: Release Date and Due Date in Iteration 3


Table 11: Release Date and Due Date in Iteration 2
Job (1,1) (2,1) (3,1) (2,2) (1,2) (4,2) (3,2) (1,3) (2,3) (4,3)
Job (1,1) (2,1) (3,1) (2,2) (1,2) (4,2) (3,2) (1,3) (2,3) (4,3) Processing time 10 8 4 8 3 5 6 4 7 3
Processing time 10 8 4 8 3 5 6 4 7 3 Release Date 0 10 24 0 10 13 18 0 8 15
Release Date 0 10 18 0 10 13 18 0 8 15 Due Date 14 28 32 14 17 22 28 22 29 32
Due Date 18 28 32 18 21 26 32 22 29 32

Impose the precedence constraints (4, 2) → (4, 3)


constraints some computations can be eliminated

Chapter 5: Job Shop Scheduling Page 13 Chapter 5: Job Shop Scheduling Page 14
Ho Chi Minh City International University Scheduling Ho Chi Minh City International University Scheduling
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

Table 15: Data for Each Single Machine in Iteration 3 3.7.5 Iteration 5
(a) Machine 1
(b) Machine 2 The updated graph and updated release date and due date are given as
σR→C (1, 1) (1, 2) (1, 3)
σR→C (2, 1) (2, 3)
(1, 1) 8
(2, 1) 4
(1, 2) 5
(2, 3) 5
(1, 3) 10 3
(c) Machine 4

σR→C (4, 2) (4, 3)


(4, 2) 11
(4, 3) -1

3.7.4 Iteration 4
Figure 10: Constraint Programming Iteration 5
The updated graph and updated release date and due date are given as

Table 19: Release Date and Due Date at Iteration 5

Job (1,1) (2,1) (3,1) (2,2) (1,2) (4,2) (3,2) (1,3) (2,3) (4,3)
Processing time 10 8 4 8 3 5 6 4 7 3
Release Date 0 10 24 0 10 13 18 10 14 21
Due Date 14 28 32 14 17 22 28 22 29 32

Table 20: Data for Each Single Machine in Iteration 5

(a) Machine 1 (b) Machine 2


Figure 9: Constraint Programming Iteration 4
σR→C (1, 2) (1, 3) σR→C (2, 1) (2, 3)
(1, 2) 5 (2, 1) 4
Table 16: Release Date and Due Date in Iteration 4 (1, 3) 0 (2, 3) -1

Job (1,1) (2,1) (3,1) (2,2) (1,2) (4,2) (3,2) (1,3) (2,3) (4,3) Precedence constraint (2, 1) → (2, 3) is inserted
Processing time 10 8 4 8 3 5 6 4 7 3
Release Date 0 10 24 0 10 13 18 0 8 18
Due Date 14 28 32 14 17 22 28 22 29 32 3.7.6 Iteration 6

The updated graph and updated release date and due date are given as
Table 17: Data for Each Single Machine in Iteration 4

(a) Machine 1
(b) Machine 2
σR→C (1, 1) (1, 2) (1, 3)
σR→C (2, 1) (2, 3)
(1, 1) 8
(2, 1) 4
(1, 2) 5
(2, 3) 5
(1, 3) 0 10

No further precedence constraints are applied, for each pair σ(i,j)→(i,k) ≥ 0 and σ(i,k)→(i,j) ≥ 0 the
φ0 ((i, j)(i, k)) is computed
The pair with the least flexibility is (1, 1)(1, 3) and the precedence constraint (1, 1) → (1, 3) is inserted.
Figure 11: Constraint Programming Iteration 6
Table 18: The calculation of φ0 ((i, j)(i, k)) for iteration 4
0 These two operations can be ordered in either way without violating any due dates. A feasible ordering is
pair φ
√ ((i, j)(i, k)) (1, 3) → (1, 2)
(1, 1)(1, 3) √0 × 8 = 0
(1, 2)(1, 3) √5 × 10 = 7.07
(2, 1)(2, 3) 4 × 5 = 4.47

Chapter 5: Job Shop Scheduling Page 15 Chapter 5: Job Shop Scheduling Page 16
Ho Chi Minh City International University Scheduling Ho Chi Minh City International University Scheduling
Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc Industrial Systems Engineering Department Lecturer: Phan Nguyen Ky Phuc

Table 21: Release Date and Due Date at Iteration 6 (a) Compute the makespan under LPT.

Job (1,1) (2,1) (3,1) (2,2) (1,2) (4,2) (3,2) (1,3) (2,3) (4,3) (b) Find the optimal schedule.
Processing time 10 8 4 8 3 5 6 4 7 3
Release Date 0 10 24 0 10 13 18 10 18 25
Q.4 Consider the following instance of the job shop problem with no recirculation and the makespan as
Due Date 14 28 32 14 17 22 28 22 29 32
objective. Give an integer programming formulation of this instance
Table 22: Data for Each Single Machine in Iteration 6
Table 25: Data of Q.4
(a) Machine 1
jobs sequence processing time
σR→C (1, 2) (1, 3) 1 1,2,3 p11 = 9, p21 = 8, p31 = 8
(1, 2) 5 2 1,2,4 p12 = 5, p22 = 6, p42 = 3
(1, 3) 0 3 3,1,2 p33 = 10, p13 = 4, p23 = 9

Q.5 Given the data in Question 5. Apply the Shifting Bottleneck heuristic to the instance of Question 5 .

Table 26: Data of Q.5

jobs sequence processing time


1 1,2,3,4 p11 = 9, p21 = 8, p31 = 4, p41 = 4
2 1,2,4,3 p12 = 5, p22 = 6, p42 = 3, p32 = 6
3 3,1,2,4 p33 = 10, p13 = 4, p23 = 9, p43 = 2

Q.6 Consider the following two machine job shop with 10 jobs. All jobs have to be processed first on machine
Figure 12: Constraint Programming Final Schedule 1 and then on machine 2. (This implies that the two machine job shop is actually a two machine flow shop).

4 Assigment Table 27: Data of Q.6

Q.1 What does the ATC rule reduce to jobs 1 2 3 4 5 6 7 8 9 10 11


p1j 3 6 4 3 4 2 7 5 5 6 12
p2j 4 5 5 2 3 3 6 6 4 7 2
(a) when K goes to ∞

(b) when K is very close to zero?


(a) Construct now a schedule as follows. The jobs have to go through the second machine in the same
Q.2 Consider an instance with two machines in parallel and the total weighted tardiness as objective to be sequence as they go through the first machine. A job whose processing time on machine 1 is shorter
minimized. There are 5 jobs. than its processing time on machine 2 must precede each job whose processing time on machine 1 is
longer than its processing time on machine 2. The jobs with a shorter processing time on machine
Table 23: Data of Q.2
1 are sequenced in increasing order of their processing times on machine 1. The jobs with a shorter
jobs 1 2 3 4 5 processing time on machine 2 follow in decreasing order of their processing times on machine 2. (This
pj 13 9 13 10 8 rule is usually referred to as Johnson’s Rule.)
dj 6 18 10 11 13
wj 2 4 2 5 4 (b) Apply the shifting bottleneck heuristic to this instance

(a) Apply the ATC heuristic on this instance with the look-ahead parameter K = 1.

(b) Apply the ATC heuristic on this instance with the look-ahead parameter K = 5.

Q.3. Consider 6 machines in parallel and 13 jobs. The processing times of the 13 jobs are tabulated below.

Table 24: Data of Q.3

jobs 1 2 3 4 5 6 7 8 9 10 11 12 13
pj 6 6 6 7 7 8 8 9 9 10 10 11 11

Chapter 5: Job Shop Scheduling Page 17 Chapter 5: Job Shop Scheduling Page 18

You might also like