490 likes | 703 Views
Material Management Class Note # 5 SCHEDULING. Prof. Yuan-Shyi Peter Chiu Feb. 2012. ◇. § S1 : Introduction. § S1 : Introduction. ◇. ◇. § S5 : Characteristics of Job Shop Scheduling. ◇. § S5 : Objectives of Job Shop Management.
E N D
Material Management Class Note # 5 SCHEDULING Prof. Yuan-Shyi Peter Chiu Feb. 2012
◇ § S1:Introduction
◇ § S5:Characteristics of Job Shop Scheduling
◇ § S5:Objectivesof Job Shop Management IT IS IMPOSSIBLE TO OPTIMIZE ALL 7 OBJECTIVES SIMULTANEOUSLY. CUSTOMER Service Quality vs. Plant Efficiency / Cost
§ S6:Flow Shop vs. Job Shop (1) FLOW SHOP job M/C M/C M/C M/C M/C ... 1 2 3 4 m . . . Assembly Line different M/C = different operations. n . . . n ◇ (2) JOB SHOP job M/C M/C M/C M/C M/C ... 1 2 3 4 m {1, 3, 4, 1, m} {2, 4, 2, m-1} PROBLEMS are extremely complex. All-purpose solution algorithms for solving general job shop problems do not exist.
◇ § S6:Flow Shop vs. Job Shop (3)Parallel processing vs. Sequential processing JOB M/C M/C M/C M/C ... 1 2 3 m Sequential . . . n JOB M/C M/C M/C M/C 1 3 2 m 1 3 Parallel processing ... 2 m 1 3 . . . n 3
§ S7:Indicators of Performance Evaluation ◇ (1) FLOW TIME job 1 t1 = 25 sec. job 2 t2 = 13 sec. job 3 t3 = 21 sec. . . . (2) MEAN FLOW TIME
◇ § S7:Indicators of Performance Evaluation (3) MAKESPAN:F[n] TIME REQUIRED TO COMPLETE ALL n jobs Minimizing to the Makespan is a common objective in multiple - m/c sequencing problem. (4) TARDINESS max ( F[i] - D[i] , 0 ) where F[i] : Completion time of job i. D[i] : Job i ’s Due Date. Example : Job F[i] D[i] Tardiness 1 3 10 0 2 7 12 0 3 14 13 1 4 16 13 3
(6) MINIMIZINGAVG. TARDINESS MAX. TARDINESS ARE COMMON SCHEDULING OBJECTIVES. § S7:Indicators of Performance Evaluation ◇ (5) LATENESS F[i] - D[i] Job F[i] D[i] Lateness 1 3 10 -7 2 7 12 -5 3 14 13 1 4 16 13 3
§ S8:Notation ◇ ti ; di Wi = Fi- ti Fi = Wi + ti Li = Fi- di Ti = max[Li , 0] Ei = max[-Li , 0] Tmax = max {T1 , T2 , … , Tn} → SPT minimizes Mean flow Time. Mean waiting Time. Mean lateness. → EDD minimizes maximum lateness Lmax ~ Tmax. Lmax = max {L1 , L2 , L3 , … , Ln} 3 1 0 -3 -3 -2 -1 0
◇ • Common Scheduling Rules for single machine: • FCFS • Shortest Processing Time (SPT) • (3) Earliest Due Date (EDD) • (4) CRITICAL RATIO (CR)
(1) Plane 1 2 3 4 5 t[i]26 11 19 16 23 F[i] 95 11 46 27 69 makespan = 95 SPT = {2, 4, 3, 5, 1} = 49.6 (2) Plane 1 2 3 4 5 t[i]26 11 19 16 23 # of Passengers 180 12 45 75 252 # of Passengers per minute6.9 1.1 2.4 4.7 10.9 49 95 84 65 23 F[i] 432 564 552 507 252 # of Passengers {5, 1, 4, 3, 2} Example 8.2 – An example of priority rules
100% 90% % Passengers 76% 45% 23 49 65 time 20 40 60 80 100 (3) ARRIVAL TIME = DUE TIME. (4) PRIORITY e.g. continuing flights. low fuel level. carrying precious or perishable cargo.
§ S9:EDD Scheduling minimizes the maximum lateness. ◇ § S10:Moore’s (1968) algorithm minimizes the number of Tardy jobs. Step1:Sequence by earliest due date i.e. d[1] ≦ d[2] ≦ d[3] ≦ …≦ d[n] Step2:Find the 1st tardy job in the current sequence, say job i. IF None exists go to Step 4 Step3:Consider jobs [1], [2], …, [i] Reject the job with largest tj .and Return to Step2. Step4:Current sequence + rejected job(In any order.) Applications:chef, runway, preparing exam. garage, dock.
Ti = { max ( F[i] - D[i] , 0 ) } > 0 Job# 2 3 5 4 6 di 6 9 20 23 30 ti 3 4 10 8 6 Fi 3 7 17 25 31 × 5 × Example 8.3 Job# 2 3 1 5 4 6 Di 6 9 15 20 23 30 ti 3 4 10 10 8 6 Fi 3 7 17 27 35 41 × 1 ×
Example 8.3 2 3 4 6 di 6 9 23 30 ti 3 4 8 6 Fi 3 7 15 21 Done! 2 - 3 - 4 - 6 - 5 - 1 1 - 5 2 3 4 6 5 1 di 6 9 23 30 20 15 ti 3 4 8 6 10 10 Fi 3 7 15 21 31 41
§.S10.1: Class Problems Discussion Chapter 8 :# 3, 4, 5 p.413 30, 32(a),(b), 34 p.449-450 Preparation Time : 15 ~ 20 minutes Discussion : 15 minutes
§ S11:Lawler’s Algorithm : Precedence ◇ min. max. gi(Fi) 1 ≦ i ≦ N • gi(Fi) = Fi – di = Li min. max. Lateness. • gi(Fi) = max (Fi – di , 0) Tardiness. … next to LAST LAST
◇ JOBS: 1 2 3 5 4 6 Example 8.4 JOB 1 2 3 4 5 6 ti 2 3 4 3 2 1 di 3 6 9 7 11 7
JOBS 3 5 6 6 3 Example 8.4 ◇ v = { 3, 5, 6 } Total Processing time of all jobs is 15 min iv min iv {gi(Fi)}= {Fi-di} = min {15-9 , 15-11 , 15-7} = min {6 , 4 , 8}= 4 ∴ JOB # 5 is scheduled last. (6th) JOBS v = { 3, 6 } Total Processing time is 13 min iv {gi(Fi)}= min {13-9 , 13-7}= min {4 , 6}= 4 ∴ JOB # 3 is scheduled last. (5th) So far, { … , 3 , 5}
JOBS 1 2 4 2 6 2 v = { 2, 6 } Example 8.4 ◇ Total Processing time is 9 min iv {gi(Fi)}= min {9-6 , 9-7}= 2 ∴ JOB # 6 is scheduled last. (4th) So far, { … , 6 , 3 , 5} JOBS v = { 2, 4 } Total Processing time is 8 min iv {gi(Fi)}= min {8-6 , 8-7}= 1 ∴ JOB # 4 is scheduled 3rd ∴ So far, { … , 4 , 6 , 3 , 5} JOBS → ∴ { , 2 , 4 , 6 , 3 , 5} JOBS → ∴ { 1 , 2 , 4 , 6 , 3 , 5}
◇ Example 8.4 Job# ti Fi di Ti (Tardiness)1 2 2 3 0 2 3 5 6 0 4 3 8 7 1 6 1 9 7 2 3 4 13 9 4 5 2 15 11 4 ∴ maximum tardiness is 4 days.
◇ §.S12: Class Problems Discussion Chapter 8 : # 6, 7, 8, 9p.419 10# 37,p.451 Preparation Time : 10 ~ 15 minutes Discussion : 10 minutes
M/C 2 M/C m ◇ § S13:n job on m M/C’s (1) n JOBS Must BE PROCESSED ON 1 M/C’s n …….. 3 2 1 1 ……..(n-2) (n-1) n ∴ there are n! possible ways. (2) “n” JOBS Must BE PROCESSED ON “m” M/C’s n …….. 3 2 1 n! .……. n! …….. n! ∴ there are (n!)m possible ways. #12 p.428 M/C M/C1 … … … …
§ S14:Permutation schedules – characteristics • It provides better system performance in terms of both total flow time ( makespan ) and average flow time ( ). • mean IDLE time? • (B) SCHEDULING n Jobs on 2 M/C’s : if each Jobs must be processed in the order M/C-1 then M/C-2. • Results: The permutation schedule will minimize • “makespan” and minimizes “ ”. • (C) Theorem 8.2: (p.422) • The optimal solution for scheduling n jobs on 2 M/C’s is always a permutation schedule. F F
§ S15:2 jobs on 2 M/C’s • All Possible Schedules for Two Jobs on Two Machines. • (B) Assumes that both jobs must be processed first on M/C#1 then on M/C#2. makespanidleflow time 9 6 10 10 Machine 1 I J Machine 2 I J Machine 1 J I Machine 2 J I Machine 1 J I Machine 2 I J Machine 1 I J Machine 2 J I 4 5 9 1 5 6 1 5 6 10 4 5 9 10
◇ § S16:Permutation Schedules - Definition *Permutation Schedules= Same Sequence on both (all) M/C’s Total # of permutation schedules is exactly n!
§ S17: Johnson’s Rule ◇ TO MINIMIZE THE MAKESPAN (1) Definition: M/C-A M/C-B Jobs must be processed first on M/C-A then M/C-B Ai : Processing Time of Job i on M/C-A Bi : Processing Time of Job i on M/C-B Job i procedes Job i+1 if min (Ai , Bi+1) < min (Ai+1,Bi) 2 M/C’s
◇ (2) Working Procedures for Johnson’s rule: 1. List the values of Ai & Bi in 2 columns. 2. Find the smallest remaining element in the 2 columns. If it appears in column A then schedule that job next. If it appears in column B then schedule that job last. 3. Cross off the jobs as they are scheduled. Stop when all jobs have been scheduled. An easy way to implement Johnson’s Rule
◇ Example 8.5 Five jobs are to be scheduled on two machines. The processing times are Jobs Machine A Machine B 1 5 2 2 1 6 3 9 7 4 3 8 5 10 4
1 4 9 18 28 A #2 #4 #1 #3 #5 B #2 #4 #1 #3 #5 0 1 7 15 17 25 28 32 1 4 13 18 28 A #2 #4 #3 #5 #1 B #2 #4 #3 #5 #1 0 1 7 15 22 23 27 28 30 Example 8.5 (A) if using SPT in Ai then obtain the above 2-4-1-3-5 _____________________________________________________ IF BY JOHSON’S ROLE TO MINIMIZE THE MAKESPAN OR TOTAL FLOW TIME. Rule: Job i precedes job i+1 if MIN(Ai,Bi+1)<(Ai+1,Bi) in 2-4-3-5-1 order (B) makespan=30
§ S18:n jobs on 3 M/C’s ◇ (A)Objective : To minimize total flow time (“make span.”) it is still true that a permutation schedule is optimal. (B) But it is not necessarily optimal for the case of F’ . (C) 3 M/C’s can be reduced to 2 M/C’s (then using Johnson’s Rule to solve it) if min Ai≧max Bi or min Ci≧max Bi “either one” of these conditions be satisfied. then define
M/C’s Jobs A B C 1 4 5 8 2 9 6 10 3 8 2 6 4 6 3 7 5 5 4 11 ◇ Example 8.6 Consider the following job times for a three-machine problem. Assume that the jobs are processed in the sequence A-B-C Min Ci=6 Max Bi=6 ∴ Min Ci ≧ Max Bi let
M/C’s Jobs A’ B’ 1 9 13 2 15 16 3 10 8 4 9 10 5 9 15 ◇ Example 8.6 Using Johnson’s Rule 5-1-4-2-3
5-4-1-2-3 ◇ Example 8.6 5-1-4-2-3
◇ §.S18.1: Class Problems Discussion Chapter 8 : # 13, 14p.428 38,40p.451 ◆ Preparation Time : 10 ~ 15 minutes Discussion : 10 minutes
and ◇ § S19:more on 3 M/C’s problems • If neither ﹛min Ai ≧ max Bi Nor min Ci ≧ max Bi ﹜ • Then Using Will usually give “REASONABLE” but possibly “SUBOPTIMAL” result. Simplifying 3 M/C’s problems 2 M/C’s. (B) TO MINIMIZE “MAKESPAN” OR “TOTAL FLOW TIME” A PERMUTATION SCHEDULE IS OPTIMAL ON 3 M/C’s
§ S20:Akers’ procedures for solving 2 Jobs on m M/C’s problems ◇ • Draw a cartesian coordinate system. • Job 1 on X-axis • Job 2 on Y-axis • mark off the operation times • on X & Y axis • (2) BLOCK OUT AREAS for each M/C’s • (3)Determine a path from origin to the end of the final block. • move: • The path with minimum vertical distance is “Optimal”.
JOB 1 JOB 2 Oper. Time Oper. Time (A) Sanding 3 A 2 (B) Lacquering 4 B 5 (C) Polishing 5 C 3 Example 8.7 ◇ A regional manufacturing firm produces a variety of household products. One is a wooden desk lamp. Prior to packing, the lamps must be sanded, lacquered, and polished. Each operation requires a different machine. There are currently shipments of two models awaiting processing. The times required for the three operations for each of the two shipments are
◇ 1C 1B 2C 1B 2C 2B 2B 1C 2B 1A 1B 2A 2A 1B 1A Example 8.7 Fig. 8-8 p.426 maximize the diagonal movement = min. horizontal vertical
◇ Fig. 8-9 p.426 Example 8.7
◇ Example 8.8
16 (16,14) 14 12 (7,11) (16,11) 10 8 6 4 2 2 4 6 8 10 12 14 16 18 Example 8.8 ◇ A1 →B1 →C1 A2 A2 ↓ C1 D2 ↓ C2←D1←D1 ←D2 C2 B2 Time=16+1+3=20 C Job 2 (BOB) B D A Job 1 (Reggie) A2 →D2 →B2 →C2 →C2 →C2 →C1 →D1 A1 A1 A1 B1 Time=16+4+3=23
◇ §.S21: Class Problems Discussion Chapter 8 : # 15,16 p.428 39p.452 Preparation Time : 25 ~ 30 minutes Discussion : 20 minutes
◇ § S22:Parallel processing on identical M/C’s. SPT → minimize mean flow time. LPT → minimize total flow time, or makespan. ( longest ) The End
Scheduling Preview : Chap. 8 [ pp.413~442 ] Problem: # 5, #32(a),(b), #7, #8, #10, #37, #40, #39, #14, #15, #16