스케줄 이론 Single Machine Independent Jobs - Part 2 Problems with due dates Single MC – Independent Jobs 스케줄 이론 Proof q Proof of Theorem 2.3 SPT minimizes MFT. Let S be a schedule w here job i precedes job j and and t i t j (say, non-S P T ). Let S ' be another schedule obtained by interchanging i and j. For convenience, let us assum e that job i in S and job j in S ' are both k k 1 T hen B t B ut [ j] , C= t[ j ] is the sam e for both S & S ' jk 2 Fi B t i , F j B ti t j Fi B t j t i , F j B t j 1 n job in sequece. n j 1 N ow th ( Fi F j ) 1 n ( Fi F j) since t i t j S ' has sm aller m ean flow tim e than S an d any non-S P T S chedule can be im proved by interchanging adjacent tw o jo bs. (cf) Proof by contradiction과 Proof by construction – Start from any non-SPT sequence, locate two adjacent jobs "i" and "j" violating SPT rule. Interchange two jobs, and eventually we will get to SPT sequence which is optimal). 1 Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates q Theorem 2.5 Mean Lateness & Mean Waiting Time is minimized by SPT sequencing. Proof R ecall F j C j - r j C j d j d j r j L j a j ( H ere, the allow ed tim e = d j r j ) So F L a W t Minimizing Flow Time is minimizing mean lateness or mean waiting time. q (Think) SPT Rule is independent of Due Date. Lateness is related to Due Date. _ _ _ Then why? In fact, F L W 2 Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates q Theorem 2.6 L m ax and Tm ax are minimized by EDD sequencing. Proof) By adjacent pair wise interchange. q Theorem2.7 L m in is maximized by Min. Slack Time Sequencing. R ecall S lack T im e = d i - ri - t i Proof) Similar to Theorem 2.6 What is the implication of this theorem? q Now, suppose we have a schedule with Tmax 0 ( perhaps sequenced by EDD rule). Then, is it possible to have schedules other than EDD which also satisfy due-date constraints and improve other measures of performance at the same time? 3 Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates q Theorem (Smith's Rule:1956, Mar., NRLQ) F o r th e n jo b , 1 m /c p ro b lem , su ch th at all th e d u e d ates can b e m et, th ere ex ists a sch ed u le w h ich m in im izes F su b ject to T m ax = 0 an d in w h ich jo b J i is last, if an d o n ly if n ① di t j j 1 n ② t i t k fo r all jo b s J k su ch th at d k t j j 1 Proof C o n s id e r S in w h ic h J i is la s t & ① &② S u p p o s e w e in te rc h a g e J i a n d s o m e jo b J k h o ld . . n N o w if d k t j th e n T m a x = 0 is v io la te d . j 1 n B u t if d k t j but t i tk v io la te d ), th e n F ( S ') F ( S ) (② j 1 w h e re S ' in d ic a t e s a s c h e d u le w ith J k a n d J i in te rc h a n g e d . 4 Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates q Example of Smith’s rule Job j tj dj 1 4 16 2 7 16 3 1 8 4 6 21 5 3 9 q [5]=4, and candidates for [4] are jobs 1,2 but we choose job 2 since t2 > t1 q Candidates for [3] are jobs 1,3,5 but we choose job 1 since t1 > t5 > t3 q Candidates for [2] are jobs 3,5 but we choose job 5 since t5 > t3 q [1] =3, and Optimal Sequence is 3-5-1-2-4, with Mean Flow Time = 9.8 and Total Tardiness = 0 5 Single MC – Independent Jobs 스케줄 이론 Proof q Proof of Theorem 2.6 Consider a sequence S which is not in EDD sequence ⇒ There are some jobs i & j in S with j following i and Set B i j Set A di > d j time tB Cn Consider another sequence S' with i and j interchanged. T hen L m ax ( S ) m ax { L m ax{ L k | K A or k B }, L i ( S ), L j ( S )} m ax { L , L i ( S '), L j ( S )} L m ax ( S ) A nd T m ax ( S ) m ax{ 0, L m ax ( S )} 6 m ax{0, L m ax ( S )} T m ax ( S )} Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates q Costs related to scheduling (Benefits from good schedules) Inventory – As inventory is related to Mean Flow Time, it may make us feel that the Processing time is shrinking. (Reducing Lead Time from the Customer's viewpoint) Facility – Given Workload can be consumed by small # of facilities. (Overtime, additional shift, overload subcontract can be reduced ) Lateness – – – – Construction project, etc. (It may be shown Explicitly) Not unreal problem (Inventory is acceptable, but missing due date is more critical) Are tardy jobs equally penalized no matter how late they are ? Minimization of number of tardy jobs may be used as a criterion for lateness. 7 Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates q Algorithm 2.1 (Moore & Hodgson's algorithm: Minimize N T ) Management Science, Sep., 1968 Use the fact that "EDD minimizes Tmax ". 1. Set all jobs in EDD sequence and place all jobs in set E. Let the set L . 2. If (there is no late job in E) then STOP. E is optimal. Otherwise, identify the first late job in E. Assume this is job [k] (k-th job in E). 3. Identify the job with maximum t(i.e. longest job) among the first k jobs in sequence. Remove this job from E and place it in L. Revise the completion times of the jobs in E and Goto 2. 의미: By EDD rule, we minimize Tmax . 8 Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates #jobs early late In the set E, we have at most one late job. If only one job is late, we can improve the schedule by choosing the job with the longest processing as the late job. q Proof of Moore & Hodgson's algorithm The final schedule consists of S M ( E , L ) . For set E, we optimize the schedule by EDD. (There is no late job) For set L, if we have m tardy jobs, processing time can be saved by rejecting it from E. An optimal schedule rejects at least m jobs as S M . 9 Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates q Minimizing Mean Tardiness T A heuristic algorithm (called Wilkerson-Irwin Algorithm, 1971, AIIE Trans). Notation – i precedes j ⇔ iⓟj. Among two adjacent jobs "i" and "j" in a sequence where date conditions should interchange be allowed ? 10 ti t j , on what due Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates q Preliminary to Wilkerson-Irwin Algorithm. Case 1. dj is earlier than di – 1.1. Job i is within due if jⓟi ⇒ jⓟi is admissible. – 1.2. Job i is late even if iⓟj ⇒ jⓟi Case 2. di is earlier than dj – 2.1 Job i is within due if iⓟj ⇒ iⓟj – 2.2 Job i is late even if iⓟj – 2.2.1 Job j is within due if iⓟj ⇒ iⓟj – 2.2.2 Job j is within due if jⓟi , but Job j is late if iⓟj – ⇒ iⓟj if Ci ≤ dj – jⓟi if Ci > dj – 2.2.3 Job j is late if jⓟi ⇒ jⓟi 즉 EDD is applied first except when di < dj, di < tB + ti and {dj < tB + ti or dj < tB + tj} Or if ti ≥ tj and di < dj , we may switch to SPT rule from EDD( Switch "i" and "j" ) when tB + max{ti, tj} > max{di, dj} 11 Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates q Mystery (Fallacy of Heuristics) di < dj, di < tB + ti and dj < tB + ti --- ① di < dj, di < tB + ti and dj < tB + tj --- ② Assume that ti ≥ tj For ①, di < tB + ti 는 redundant (di < dj ) . But for ②, di < tB + ti and dj < tB + tj are different conditions. Of course, since the smaller quantity (tB + tj) is larger than the larger(dj) ⇒ tB + max{ti, tj} > max{di, dj} (But the reverse(<=) does not hold) e.g.) Let tB = 0, ti=10, tj=1, di=3, dj=4. Then tB + max{ti, tj} > max{di, dj} ⇒ 10 > 4 ∴ holds But di < dj 3<4 holds di < tB + ti 3<10 holds dj < tB + tj 4<1 does not hold Two conditions are not equivalent. So W-I Algorithm is a heuristic algorithm. 12 Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates q Wilkerson-Irwin Algorithm (A Heuristic Algorithm) Step1 (Initialization) P lace all the jobs on u nscheduled list in E D D order. L et a and b denote the first tw o jobs on the list. If m ax{ t a , t b } m ax{ d a , d b }, then assign the first postion in sequence to the job w ith the earlier due date. O hterw ise, as sign the first position in sequence to t he shorter job. T he asigned job becom es and the other j ob becom es , the pivot job. Step2 If F + m ax{t ,t } m ax{d ,d } or if t t , then add job to the scheduled list. Job now becom es job ; Job becom es job ; and the next job on the unscheduled list now becom es job . R epeat S tep 2 un less the unscheduled list is em pty, in w hich case add job to the scheduled list and stop. If F + m ax{t ,t } m ax{d ,d } and if t > t , then return job to the unscheduled list and let job now becom e j ob . P roceed to S tep 3. 13 Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates q Wilkerson-Irwin Algorithm (A Heuristic Algorithm) Step3 If F -t + m ax{t ,t } m ax{d ,d } or if t t , then a dd job to the scheduled list. Job now becom es job ; the first unsched uled job now becom es the pivot job; and the next job on the unscheduled list now becom es job . G oto S tep 2 If F -t + m ax{t ,t }> m ax{d ,d } and if t t , the n a jum p condition results. G o to S tep 3 . Step4 (Jum p C ondition) R em ove job from the sc heduled list and return it to the unsche duled list in E D D order. If jobs rem ain on the sche duled list, the last rem aining job now b ecom es job . R eturn to S tep 3 . If there are no jobs on the scheduled li st, job is assigned first position on t he scheduled list and becom es job ; the first unscheduled job now becom es the pivot job; and the next job on the unsc heduled list now becom es job . G o to S te p 2. 14 Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates q Example Jobs 1 2 3 4 5 6 7 8 tj 42 115 111 96 117 93 95 98 dj 260 283 616 622 453 624 447 749 EDD order : 1-2-7-5-3-4-6-8 1. Compare 1 & 2. t1 < t2 S={1}, β=2, γ=7 Fα=42 2. Check if Fα + max{tβ, tγ} ≤ max{dβ, dγ} or if tβ ≤ tγ 42 + max{115, 95} ≤ max{283, 447} ∴ S={1-2}, β =7, γ=5, Fα=42+115 =157 3. tβ=95 ≤ tγ = 117 ∴ S={1-2-7}, β=5, γ=3, Fα=157+95=252 15 Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates 4. t =117 t = 115 252 + max{117,111} ≤ max{452,616} ∴ S={1-2-7-5}, β=3, γ=4, Fα=252+117=369 5. t 3 =111 t 4 =96 369 + max{111,96} ≤ max{616,622} ∴ S={1-2-7-5-3}, β=4, γ=6, Fα=369+111=480 6. t 4 =96 t 6 =93 480 + max{96,93} ≤ max{622,624} ∴ S={1-2-7-5-3-4}, β=6, γ=8, Fα=480+96=576 7. t 6 =93 t 8 =98 S = { 1-2-7-5-3-4-6-8 } j 1 2 7 5 3 4 6 8 Cj 42 157 252 369 480 576 669 767 dj 260 283 447 452 616 622 624 749 q (Discussion) Heuristic algorithm is simple but gives sub-optimal solution. 16 Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates q (Definition) For each tardy job in the final sequence, we define TARDINESS INTERVAL I j I j E m pty if C j d j I j [ d i , C j ] if C j d j q (Theorem 2.8 ) W-I Algorithm minimizes T if there is no overlapping tardiness interval (W-I gives Optimum in limited cases). q (Discussion) Above theorem is only a sufficient condition. Even with overlapping tardiness intervals, a sequence could be optimal. 17 Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates q (Theorem 2.9) If EDD sequence produces no more than one tardy job, it yields min T . (Proof) M in T M in T T j for som e late jobs j. U se the fact that E D D m inim izes T m ax . q (Theorem 2.10) If dj = some constant for all j, then T is minimized by SPT rule. (Proof) Make areas(the sum of tardiness) convex. 18 Single MC – Independent Jobs 스케줄 이론 Single Machine Sequencing with Due Dates q (Theorem 2.11) If it is impossible for any job to be on time in any sequence, then T is minimized by SPT sequencing. (Proof) R ecall t i t j , d i d j , d i t B t i d j t B t i or d i d j , d i t B ti d j t B t j then putting shorter processing tim e job first is beneficial q (Theorem 2.12) If SPT sequencing yields no jobs on time, then it minimizes T . q (Discussion) This theorem is a Corollary of Theorem 2.11. Mean lateness = Mean Tardiness (in this case, is minimized by SPT) 19 Single MC – Independent Jobs 스케줄 이론 Due Dates as Decisions q Suppose we may set due dates of the incoming order: CON: Constant flow allowance, dj = rj + γ SLK: Equal slack flow allowance, dj = rj + pj + γ TWK: Total work flow allowance, dj = rj + α pj q If possible tighter due date would be better: short flow allowance, better chance of getting order, etc. q Minimizing the sum of due dates with the constraint that Cj ≤ dj , for all j q Sum of due dates can be minimized by ( ) Sequencing. q CON is always dominated by other rules(simulation study reveals that TWK tends to be the rule most of the time. 20