Preparing for the next
Midterm
Adventures in production
engineering
Three easy questions
Question #1
Question #2
Determining delivery routes (Sec 6.6)
lot sizing with capacity constraints (Sec 7.4)
Question #3
Scheduling on multiple machines (Sec. 8.7)
Problem #1
Apply the delivery route algorithm given in the textbook in
attempting to find a minimum cost (distance in miles)
delivery routing where each truck has a capacity of 225
units.
customer
1
2
3
4
5
Warehouse
24
Customer 1
33
12
18
20
45
27
14
23
10
27
34
14
22
Customer 2
Customer 3
Customer 4
Weekly Demands (units)
16
65
110
72
68
91
The n-truck problem
Let c0j = cost of one trip from the depot to customer j
cij = cost of trip from customer i to customer j (assume
cij = cji)
If separate vehicle assigned to each customer then cost
n
is given by:
2 c0 j
j 1
If go from depot to i to j then back to depot, the saving
would be found from:
sij c0i c0 j cij
The Algorithm
Compute sij for all possible customer pairs
Rank the sij in decreasing order
Consider each of the links in descending order of
savings and include link (i,j) in a route if it is
feasible
if infeasible, go to the next link
Once the list is exhausted, eliminate those on the
current route and begin a new route
The Algorithm in Action
customer
1
Warehouse
24
2
3
4
5
33 12 18 20
Customer 1
45 27 14 23
Customer 2
10 27 34
Customer 3
14 22
Customer 4
16
Weekly Demands
(units)
compute savings
s12 = c01 + c02 – c12 = 24 + 33 – 45 = 12
s13 = c01 + c03 – c13 = 24 + 12 – 27 = 9
s14 = 24 + 18 – 14 = 28
s25 = c02 + c05 – c25 = 33 + 20 – 34 = 19
s34 = c03 + c04 – c34 = 12 + 18 – 14 = 16
s23 = c02 + c03 – c23 = 33 + 12 – 10 = 35
65 110 72 68 91
Rank order pairwise savings
from
Customer 2
Customer 1
Customer 2
Customer 4
Customer 1
Customer 2
Customer 3
Customer 1
Customer 3
Customer 1
to
Customer 3
Customer 4
Customer 4
Customer 5
Customer 5
Customer 5
Customer 4
Customer 2
Customer 5
Customer 3
saving
35
28
24
22
21
19
16
12
10
9
Problem #1 – The Final Solution
customer
1
Warehouse
Customer 1
2
24
3
4
5
33
12
18
20
45
27
14
23
10
27
34
14
22
Customer 2
Customer 3
Customer 4
Weekly Demands
16
65 110
72
68
91
from
Customer 2
Customer 1
Customer 2
Customer 4
Customer 1
Customer 2
Customer 3
Customer 1
Customer 3
Customer 1
to
Customer 3
Customer 4
Customer 4
Customer 5
Customer 5
Customer 5
Customer 4
Customer 2
Customer 5
Customer 3
capacity = 225
Truck
Customer Route
Miles traveled
1
2,3
33+10+12=55
2
1,4,5
24+14+16+20=74
Total miles traveled per week
129
Savings over sending a separate truck to each
customer
2 x (24+33+12+18+20) –
129 = 85
saving
35
28
24
22
21
19
16
12
10
9
Lot Sizing with Capacity
Constraints
Known requirements in each period versus capacities
ri = requirement in period i
ci = production capacity in period i
yi = production level in period i
r1 , r2 ,..., rn
c1 , c2 ,..., cn
Find y1 , y2 ,..., yn where
j
j
c r
i 1
i
i 1
i
yi ci , for 1 i n
for j 1,..., n
9
Our Very Next Problem
The finishing department of the Capacity Constrained Construction
Company (CCCC) has just received its daily production requirements for
the next two weeks (10 working days). Because of planned downtime on
several of the finishing machines, the department capacity will vary over
this time period. Each day, the machines must be setup and aligned for
that days production run at a cost of $400. Holding cost on inventory held
over each day is $3.00.
Day
requirement
capacity
1
2
3
4
5
80 90 100 100 70
120 120 120 90 100
6
7
8
9 10
80 100 70 80 50
70 70 100 100 100
10
Check for feasibility
Day
requirement
capacity
cumulative
requirement
cumulative
capacity
1
80
120
2
90
120
3
100
120
4
100
90
5
70
100
6
80
70
7
100
70
8
70
100
9
80
100
10
50
100
80
170
270
370
440
520
620
690
770
820
120
240
360
450
550
620
690
790
890
990
Check for feasibility
Day
requirement
capacity
cumulative
requirement
cumulative
capacity
test for
feasibility
1
80
120
2
90
120
3
100
120
4
100
90
5
70
100
6
80
70
7
100
70
8
70
100
9
80
100
10
50
100
80
170
270
370
440
520
620
690
770
820
120
240
360
450
550
620
690
790
890
990
Ok
Ok
Ok
Ok
Ok
Ok
Ok
Ok
Ok
Ok
The simple 2-step algorithm
1.
2.
Find next period in which demand > capacity
Back-shift demands to period(s) having
excess capacity
The simple 2-step algorithm in
action
Day
requirement
capacity
exceeds cap
reschedule
1
80
120
2
90
120
3
100
120
80
90
Day
requirement
capacity
exceeds cap
reschedule
1
80
120
Day
requirement
capacity
exceeds cap
reschedule
5
70
100
6
80
70
10
7
100
70
30
8
70
100
9
80
100
10
50
100
110
4
100
90
10
90
2
90
120
3
100
120
4
100
90
5
70
100
7
100
70
30
8
70
100
9
80
100
10
50
100
80
90
110
90
80
6
80
70
10
70
1
80
120
2
90
120
3
100
120
4
100
90
5
70
100
6
80
70
80
90
120
90
100
70
7
100
70
30
70
8
70
100
9
80
100
10
50
100
70
80
50
Costing the schedule
Setup cost = $400; holding cost = $3.00
requirement
schedule
inventory
80
80
0
90 100 100 70
90 120 90 100
0 20 10 40
80 100
70 70
30
0
70
70
0
80
80
0
Feasible but not necessarily optimal!
50total cost
50 10 4000
0 100 300
4300
The Improvement 2-Step algorithm
Start at end and work backwards
1.
Determine if it is cheaper to shift entire
production lot to prior periods having excess
capacity
2.
Repeat until no further improvement is possible
The Improvement 2-Step
algorithm in action
Setup cost = $400; holding cost = $3.00
requirement
schedule
inventory
capacity
requirement
reschedule
inventory
capacity
excess
80
80
0
120
80
80
0
90 100 100 70
90 120 90 100
0 20 10 40
120
120
90
100
90 100 100 70
90 120 90 100
0 20 10 40
80 100
70 70
30
0
70
70
70
70
0
100
80
80
0
100
80 100 70 80
70 70 100 100
30
0 30 50
50total cost
50 10 4000
0 100 300
4300
100
50total cost
9 3600
0 180 540
4140
120 120 120 90 100 70 70 100 100 100
40 30
0
0
0
0
0
0
0 100
Iteration 2 of the Improvement
2-Step algorithm in action
requirement
reschedule
inventory
capacity
80
80
0
90 100 100 70
90 120 90 100
0 20 10 40
120
120
120
90
100
80 100 70 80
70 70 100 100
30
0 30 50
70
70
100
100
requirement
80 90 100 100 70 80 100 70 80
reschedule 120 120 120 90 100 70
100 100
inventory
40 70 90 80 110 100
0 30 50
50total cost
9 3600
0 180 540
4140
100
50total cost
8 3200
0 570 1710
4910
Iteration 3 of the Improvement
2-Step algorithm in action
requirement
reschedule
inventory
capacity
80
80
0
90 100 100 70
90 120 90 100
0 20 10 40
120
120
120
90
100
requirement
80 90 100 100 70
reschedule 120 120 120 90 100
inventory
40 70 90 80 110
80 100 70 80
70 70 100 100
30
0 30 50
70
70
100
100
80 100 70 80
70 100 100
30
0 30 50
50total cost
9 3600
0 180 540
4140
100
50total cost
8 3200
0 500 1500
4700
Final Solution
requirement
reschedule
inventory
80
80
0
90 100 100 70
90 120 90 100
0 20 10 40
80 100 70 80
70 70 100 100
30
0 30 50
50total cost
9 3600
0 180 540
4140
Multi-machine job scheduling
Skill set
Performance Measures
Gantt Charts
Multi-machine scheduling
Parallel machines
Johnson’s algorithm (2-machine problem)
The m-machine problem
CDS and Gupta heuristics
2 –machine flow shop problem (Jackson’s
algorithm)
Results for Multiple Machines
Parallel Machines
Use SPT (min flowtime) or LPT (min makespan)
Flow Shops
The optimal solution for scheduling n jobs on two machines is always a
permutation schedule (that is, jobs are done in the same order on both
machines). (This is the basis for Johnson’s algorithm.)
For three machines, a permutation schedule is still optimal if we restrict
attention to total flow time only. Under rare circumstances, the two machine
algorithm can be used to solve the three machine case.
Use Cambell, Dudek, & Smith (CDS) or Gupta heuristic for n jobs, m machines
Job Shops
When scheduling n jobs on 2 machines, use Jackson’s algorithm
When scheduling two jobs on m machines, the problem can be solved by
graphical means.
22
Parallel machines – one more time
Professors James, Jones, and Smith are
team teaching the new undergraduate
course in production engineering. Each
student in the course must turn in a class
project report consisting of an introduction,
a literature review, a data collection and
analysis, a methodology and results, and a
conclusion. Each student’s report will be
assigned to one of the instructors to
evaluate and grade. The table is an
estimate of the amount of time it will take
to grade each student’s report based upon
their respective page counts.
ID Student
A
B
C
D
E
F
G
H
I
J
K
L
M
N
Harry
Tom
Dick
Jane
Sally
John
Mike
Pete
Betty
Mary
Molly
Ned
Ted
Fred
Grading
time in
minutes
120
43
83
107
38
57
111
75
72
47
80
138
112
84
Min Makespan
LPT Solution
Grades must be turned in now to the registrar.
Determine which reports each instructor should
grade to minimize the total time required to
grade all the reports. The first report to be
assigned should go to Professor James and the
second to Professor Jones.
ID
A
B
C
D
E
F
G
H
I
J
K
L
M
N
Student
Harry
Tom
Dick
Jane
Sally
John
Mike
Pete
Betty
Mary
Molly
Ned
Ted
Fred
Professor James
ID
time
Professor Jones
ID
time
Professor Smith
ID
time
L
N
C
J
B
A
D
H
I
M
G
K
F
E
138
84
83
47
43
138
222
305
352
395
120
107
75
72
120
227
302
374
112
111
80
57
38
112
223
303
360
398
Time to grade all projects (hours): 398 min = 6.63 hr.
Average student waiting time for grade: 273.6 min = 4.56 hrs
time
120
43
83
107
38
57
111
75
72
47
80
138
112
84
LPT Solution with SPT
by Instructor
Students are to be notified of their grade by email as
soon as their report has been evaluated by one of the
instructors. For the solution found in a, determine the
order in which each instructor should grade the reports
assigned in order to reduce the average time (per
student) that students have to wait for their grades.
ID
A
B
C
D
E
F
G
H
I
J
K
L
M
N
Student
Harry
Tom
Dick
Jane
Sally
John
Mike
Pete
Betty
Mary
Molly
Ned
Ted
Fred
Professor James
ID
time
Professor Jones
ID
time
Professor Smith
ID
time
B
J
C
N
L
I
H
D
A
E
F
K
G
M
43
47
83
84
138
43
90
173
257
395
72
75
107
120
72
147
254
374
374
38
57
80
111
112
38
95
175
286
398
Time to grade all projects (hours): 398 min = 6.63 hr
Average student waiting time for grade: 99.78 min. = 3.33 hr.
time
120
43
83
107
38
57
111
75
72
47
80
138
112
84
SPT Solution
Can the average waiting time for grades in b. be
reduced further? If so, determine which reports to
assign to each instructor along with the order in
which they should be graded. The first report to be
assigned should go to Professor James and the
second to Professor Jones.
ID
A
B
C
D
E
F
G
H
I
J
K
L
M
N
Student
Harry
Tom
Dick
Jane
Sally
John
Mike
Pete
Betty
Mary
Molly
Ned
Ted
Fred
Professor James
ID
time
Professor Jones
ID
time
Professor Smith
ID
time
E
F
K
D
A
B
I
C
G
L
J
H
N
M
38
57
80
107
120
38
95
175
282
402
43
72
83
111
138
43
115
198
309
447
47
75
84
112
47
122
206
318
318
Time to grade all projects (hours): 447 min. = 7.45 hr.
Average student waiting time for grade: 190.57 min. = 3.176 hr.
time
120
43
83
107
38
57
111
75
72
47
80
138
112
84
Johnson Algorithm – one more time
Professors Johnson and Jackson operate a
landscaping business over their summer
break in order to pay for their rent and food
until the fall term begins. Johnson prepares
the beddings and Jackson follows with the
planting and mulching. For the coming
month, they have lined up 12 customers with
the job times given in the table to the right
time in hours
customer prepare plant
beddings and
mulch
A
B
C
D
E
F
G
H
I
J
K
L
6
8
12
4
20
15
6
12
22
31
14
9
7
12
20
6
5
18
20
11
7
27
15
30
Johnson in action
SORTED BY PREPARE
BEDDINGS
1
D
customer
prepare
beddings
D
A
G
B
L
C
H
K
F
E
I
J
4
6
6
8
9
12
12
14
15
20
22
31
2
A
3
G
SORTED BY PLANTING
AND MULCHING
customer plant and
mulch
E
D
A
I
H
B
K
F
C
G
J
L
4
B
5
L
5
6
7
7
11
12
15
18
20
20
27
30
6
C
7
K
8
F
9
J
10
H
11
I
12
E
Total time to complete all the
jobs
Customer
prepare
time
finish
plant time
start time
finish time
1
D
2
A
3
G
4
B
5
L
6
C
7
K
8
F
4
4
6
4
10
6
10
7
10
17
6
16
20
17
37
8
24
12
37
49
9
33
30
49
79
12
45
20
79
99
14
59
15
99
114
15
74
18
114
132
182 hr. / 8 hr. per day = 22.75 days
Average flowtime (hours)
Days
102.0833
12.76042
9
J
10
H
31 12
105 117
27
11
132 159
159 170
11
I
12
E
22
139
7
170
177
20
159
5
177
182
More than two machines
Job
J1
J2
J3
J4
J5
Job
J1
J2
J3
J4
J5
Machine 1
1
10
17
12
11
Machine 1
1
10
17
12
11
Machine 2
13
12
9
17
3
Machine 4
2
18
4
6
16
Machine 3
6
18
13
2
5
Machine 4
2
18
4
6
16
Johnson sequence:
1 -2 – 5 – 4 – 3
Cmax = 88
More than two machines
Job
J1
J2
J3
J4
J5
Machine 1
1
10
17
12
11
Machine 2
13
12
9
17
3
Job
J1
J2
J3
J4
J5
Machine 1&2
14
22
26
29
14
Machine 3&4
8
36
17
8
21
Machine 3
6
18
13
2
5
Machine 4
2
18
4
6
16
Johnson sequence:
5 – 2 – 3 -1 -4
Cmax = 85
More than two machines
Job
J1
J2
J3
J4
J5
Machine 1
1
10
17
12
11
Machine 2
13
12
9
17
3
Job
J1
J2
J3
J4
J5
Machine 1,2&3
20
40
39
31
19
Machine 2,3&4
21
48
26
25
24
Machine 3
6
18
13
2
5
Machine 4
2
18
4
6
16
Johnson sequence:
5–1–2–3-4
Cmax = 85
The Gantt Chart
5 – 2 – 3 -1 -4
job5
start t5
Machine 1
Machine 2
Machine 3
Machine 4
0
11
14
19
11
3
5
16
job 2
job 3
job 1
finis
h start t2
finis
h start t3
finis
h start t1
11
14
19
35
11
21
33
51
10
12
18
18
Optimum makespan is 80
Gupta’s algorithm will find it!
Or try all 5! (120) permutations
An exercise for the student
21
33
51
69
21
38
51
69
17
9
13
4
38
47
64
73
38
47
64
73
job 4
1
13
6
2
finis
h start
39
60
70
75
39
60
77
79
t4
12
17
2
6
finish
51
77
79
85
The 2-machine Job Shop
Mr. Otto Mo Beale operates an automobile repair service. Otto has two
servicing bays in his shop.
The “A” bay has a hydraulic lift and is used for tire rotations, brake
replacements, oil and filter changes, transmission repairs, etc.
The “B: bay has wheel alignment equipment and an engine diagnostic
computer. It is also used for tune-ups, carburetor repair, battery and belt
replacements, etc.
There are 12 automobiles scheduled for servicing today with the following
service times in minutes required on each bay.
1
2
3
4
route
A,B B
A
A,B B,A
A time
40
30
25
35
B time
35
40
25
25
5
6
7
8
9
11
12
B,
B,
A,
A,B A,B B,A
B,A
80
45
40
30
34
35
55
75
60
60
75
10
The Jackson algorithm in action
1
2
3
4
route
A,B B
A
A,B B,A
A time
40
30
25
35
B time
55
40
25
25
AB = {1,4,9,10}
5
BA = {5,11,12}
A Bay: {AB}
Job
1
A
40
4
25
9
45
10
45
B
40
35
55
55
6
7
8
9
11
12
B,
B,
A,
A,B A,B B,A
B,A
80
45
45
30
34
35
55
75
60
60
75
A = {3,8}
10
B = {2,6,7}
Johnson’s algorithm:
4 – 1 – 10 – 9
The Jackson algorithm in action
1
2
3
4
route
A,B B
A
A,B B,A
A time
40
30
25
35
B time
55
40
25
25
AB = {1,4,9,10}
BA = {5,11,12}
B Bay: {BA}
Job
5
A
35
11
30
12
35
B
75
60
25
5
6
7
8
9
11
12
B,
B,
A,
A,B A,B B,A
B,A
80
45
45
30
35
35
55
75
60
60
75
A = {3,8}
Johnson’s algorithm:
11 – 12 – 5
Reverse:
5 – 12 – 11
10
B = {2,6,7}
Jackson’s Algorithm
to determine the order within a set:
Machine A: {AB} jobs ordered by Johnson’s algorithm,
then {A} in any order, followed by {BA} jobs in reverse
Johnson’s order.
Machine B: {BA} jobs ordered by reverse Johnson’s algorithm,
then {B} in any order, followed by {AB} jobs in
Johnson’s order.
37
The Jackson algorithm in action
AB = {1,4,9,10}
BA = {5,11,12}
A Bay: {AB}
Job
1
A
40
4
25
9
45
10
45
B
55
40
35
55
B Bay: {BA}
Job
5
A
35
11
30
12
35
B
75
60
25
A = {3,8}
Johnson’s algorithm:
4 – 1 – 10 – 9
Johnson’s algorithm:
11 – 12 – 5
Reverse:
5 – 12 – 11
A : 4 – 1 – 10 – 9 – 3 – 8 - 5 – 12 – 11
B: 5 – 12 – 11 – 2 – 6 – 7 – 4 – 1 – 10 – 9
B = {2,6,7}
How long must the Otto work
today?
A Bay
A Time
start
time
finish
B Bay
B time
start
time
finish
time
1
4
25
2
1
40
0
25
5
25
3
10
45
4
9
45
5
3
30
6
8
80
7
5
35
8
12
35
9
11
30
25
65
12
60
65 110
110 155
11
2
75 25
155
185
6
60
185
265
7
75
265
300
4
40
300
335
1
55
335
365
10
55
9
35
0
25
85 160
185
245
320
360
415
470
25
85
160 185
245
320
360
415
470
505
505 minutes / 60 = 8.42 hours
10
Midterm #2
REGISTER TODAY!
© Copyright 2026 Paperzz