SINGLE MACHINE SEQUENCING Part 2 2011 2012 Fall semestre
Minimizing Total Weighted Flowtime In a common variation of the F-problem, obs do not have equal importance. One way of distinguishing the obs is to assign a value or weight, w, to each ob and to incorporate these weights into the performance measure. The weighted version of total flowtime is total weighted flowtime, defined by where we can think of weights as unit delay costs. 2
Job contributes w to the value of total in-process inventory while it awaits completion, and we can define a function V(t) to be the total value of inventory in the system at time t. The V(t) function is a step function, but unlike J(t), this step function decreases in steps of w rather than steps of 1. Figure 2.5 depicts V(t). If V denotes the time average of V(t) over the processing interval, we can again derive two expressions for the area under the V(t) graph. 3
4
Summing vertical strips Summing horizontal strips If we now equate the two expressions for A, we obtain the generalized flowtime inventory relation: F w = V F max Observing that F max is a constant, we conclude that V is directly proportional to F w and that the sequence which minimizes one minimizes the other. 5
In this case, we seek a path on the V(t) graph that connects the point (0, point (F max, 0). ) with the This time, the vectors that make up the path have slopes of ( w /p ), and to minimize the area under V(t), we again place the steepest slope first. In effect, the optimal rule is shortest weighted processing time (SWPT) sequencing n 1 w 6
Theorem 2.4 Total weighted flowtime is minimized by SWPT (shortest weighted processing time) sequencing (p [1] /w [1] p [2] /w [2]... p [n] /w [n] ). 7
PROBLEMS WITH DUE DATES: ELEMENTARY RESULTS Lateness Criteria Recall that ob lateness is defined as L = C d, or the discrepancy between the due date of a ob and its completion time. Theorem 2.5 Total lateness is minimized by SPT sequencing. 8
EARLIEST DUE DATE SEQUENCING Theorem 2.6 Maximum lateness and maximum tardiness are minimized by earliest due date (EDD) sequencing (d [1] d [2]... d [n] ). 9
Therefore, an optimal sequence can be constructed as follows (for L max /T max ). 1. Begin with an arbitrary non-edd sequence. 2. Find a pair of adacent obs i and, with following i, such that d i > d. 3. Interchange obs i and. 4. Return to Step 2 iteratively until an EDD sequence is constructed. 10
SLACK TIME A second measure of urgency for a given ob is the time until its due date less the time required to process it. This urgency measure is called slack time and, at time t, the slack time of ob is represented as (d t p ). 11
Theorem 2.7 Among schedules with no idle time, the minimum ob lateness is maximized by minimum slack time (MST) sequencing (d [1] p [1] d [2] p [2].. d [n] p [n] ). 12
Multiple Measures of Performance An important variation of the basic model involves the designation of both a primary and a secondary measure of performance. The primary measure is the dominant criterion, but if there are alternative optima with respect to the primary measure, we then want to identify the best sequence among those alternatives with respect to a secondary measure. 13
Suppose that a tardiness-based measure (such as T max ) is the primary measure and that several sequences are considered perfect because they contain no tardy obs. Furthermore, suppose that F is the secondary measure. Then, to construct a perfect sequence that minimizes F, we can employ a result known as Smith s Rule: 14
Smith s Rule Job i may be assigned the last position in sequence only if Once the last among n obs has been identified, there remain (n-1) obs to which the rule can be applied 15
Example 2.1 Consider a problem containing n = 5 obs, as described in the table 16
Minimizing the Number of Tardy Jobs If the EDD sequence should yield zero tardy obs, or should it yield exactly one tardy ob, then it is an optimal sequence for U. If it yields more than one tardy ob, however, the EDD sequence may not be optimal. The solution method assumes a particular form for an optimal sequence, shown in Figure 2.6. The form is as follows: _ First, a set (B) of early obs, in EDD order. _ Then, a set (A) of late obs, in any order. 17
Algorithm 2.1 Minimizing U Step 1. Index the obs using EDD order and place all obs in B. Let set A be empty. Step 2. Calculate the completion times of obs in B. If no ob in B is late, stop: B must be optimal. Otherwise, identify the first late ob in B. Suppose that turns out to be the kth ob in sequence. Step 3. Identify the longest ob among the first k obs in sequence. Remove that ob from B and place it in A. Return to Step 2. 18
Example 2.2 Consider a problem containing n = 5 obs, as described in the table. 19
Minimizing Total Tardiness Consider a schedule S, in which obs i and are adacent in sequence, and the schedule S that is identical to S except that obs i and are interchanged (see Figure 2.4). We seek conditions that will tell us which ob should appear earlier in the sequence. Rather than comparing T for both sequences, it suffices to compare the contributions to T that come from obs i and, because the total contributions of the other obs are the same in both sequences. 20
T i = T i (S) + T (S) = max{p(b) + p i d i, 0} + max{p(b) + p i + p d, 0} T i = T (S ) + T i (S ) = max{p(b) + p d, 0} + max{p(b) + p + p i d i, 0} 21
Theorem 2.8 If processing times and due dates are agreeable for all pairs of obs, then total tardiness (T ) is minimized by SPT sequencing with ties broken by EDD (or, equivalently, by EDD with ties broken by SPT). 22
Theorem 2.9 If obs i and are the candidates to begin at time t, then the ob with the earlier due date should come first, except if t + max{p i, p } > max{d i, d } in which case the shorter ob should come first. 23
Define the modified due date of ob at time t to be d = max{d, t + p } The modified due date is either the original due date or else the earliest time at which the ob could possibly be completed, whichever is later. The modified due date is a dynamic quantity, because it may change as time passes. Therefore, if we give priority to the ob with the earliest modified due date, then the choice between obs i and may be different early in the schedule than it is late in the schedule. The modified due date (MDD) priority rule is consistent with the prescriptions of Cases 1 and 2: if obs i and are the candidates to begin at time t, then the ob with the earlier modified due date should come first. 24
We conclude our treatment of the T -problem with some specialized results concerning optimal sequences. If the EDD sequence produces no more than one tardy ob, it yields the minimum value of T. If all obs have the same due date, then T is minimized by SPT sequencing. If it is impossible for any ob to be on time in any sequence, then T is minimized by SPT sequencing. If SPT sequencing yields no obs on time, then it minimizes T. 25
SINGLE MACHINE SCHEDULING Sets and indices,l : obs, is element of J={1,2,..., J } Parameters p : processing time of ob d : due date of ob Decision Variables X : starting time of ob T : tardiness of ob
SINGLE MACHINE SCHEDULING Minimize total tardiness (1) Minimize subect to J T Exactly one of the constraints must be active Constraints 1 : Two obs can not be processed simultaneously (2) Xl X p X Xl pl Disunctive constraints Constraints 2 : Tardiness of each ob (3) T X p d J, l J l Constraints 3 : Nonnegativity constraints (4) HOW TO LINEARISE? X 0 T 0 J
SINGLE MACHINE SCHEDULING CONSTRAINT 2 IN LINEAR FORM Xl X p X Xl pl l l l 0 if X l X p 0 if X X p 1 otherwise l 1otherwise l l l l 1 l l Xl X p M l X Xl pl Ml M J p An input parameter not a variable!
SINGLE MACHINE SCHEDULING Minimize total tardiness (1) Minimize subect to J T Code in OPL/Gams! Constraints 1 : Two ob s can not be processed simultaneously (2) X X p M l l l l 1 T X p d, l J l Constraints 2 : Tardiness of each ob (3) J, l J l Constraints 3 : Nonnegativity constraints (4) (2.1) (2.2) X 0 T 0 l 0,1 J
SINGLE MACHINE SCHEDULING ALTERNATIVE MODEL l 1 if X l X p 1 if X X p l 0 otherwise 0otherwise l l l 1 = l l 1 l X X p M 1 l l X Xl pl M l
SINGLE MACHINE SCHEDULING ALTERNATIVE MODEL l 1 = l l 1 l X X p M 1 l l X Xl pl M l
SINGLE MACHINE SCHEDULING ALTERNATIVE MODEL Minimize subect to J T (1) Code in OPL/Gams X X p M 1 l l, l J l (2) X Xl pl M l, l J l (3) T X p d J (4) l 0,1 X, T 0 J (5)
SINGLE MACHINE SCHEDULING Schedule the following 5 obs on a single machine by minimizing total tardiness where p : processing time of ob d : due date of ob
Single Machine Weighted Total Completion Times One machine and n obs 1// Minimize n 1 w C Define the decision variables n 1 w C x t 1 if ob startsat time t 0 otherwise. 10.11.2011 34
IP Formulation (Code in OPL/Gams) Minimize subect to n 1 n 1 x C C t max t0 max t0 t1 1 1 w x x smax{ t p t s,0} ( t p 0,1, t 1 1 t ) x t 10.11.2011 35
Obective function is the minimization of the weighted completion time for the ob that started at time t and ended at time t+p. The first set of constraints ensures all obs are assigned to a time slot, i.e., a ob can start only at one point in time. The second set of constraints ensures that only one ob can be processed at any point in time. The last set contains the integrality constraints on the variables. Assume w 1 =3; w 2 =1; w 3 =2; w 4 =5; w 5 =7 10.11.2011 36
Single Machine Sequencing with sequence dependent setup times (SMS-SDST) Order the following obs on a single machine to minimize the total setup times. Setup times are sequence dependent. J =6 J=6 J=3 J=5 J=4 J=1 J=2 Besides, the machine has to be prepared for the first ob and has to be cleaned after the last ob. Preparing and cleaning times are also sequence dependent. 37
SMS-SDST Sequence Dependent Setup Times 38
SMS-SDST Time required to prepare the machine for the first ob Time required to prepare the machine for ob 2 after ob 6 : 4 minutes Time required to clean the machine after the last ob =6 =2 =4 =3 =5 =1 = J +1 Real obs, =1,..., J wehere J =6 = J +2 Dummy starting Job =7 Optimal total setup time :17 minutes Dummy final Job =8 39
SMS-SDST Decision variables Position of each ob in the sequence Which ob is sequenced ust before the other? 40
Obective Function Minimize total setup time Subect to Assign dummy obs to the first and the last positions in the sequence (2) Assign each ob to exactly one position (3) Assign exactly one ob to each position (4) Linearization of sequencing constraints (5) 41
Indices J : total number of obs i, : obs, i, J 1,2,..., J 1, J 2 k, l : positions, k, l J Dummy obs J 1: first dummy ob J 2 : last dummy ob Parameters s i : sequence dependent setup time from ob i to Decision Variables X ik i, k,, l 1 if ob i is assigned to position k 0 otherwise 1 if X ik 1 X l 1 l k 1 0 otherwise 42
SMS-SDST minimize subect to X X J 1,1 J 2, J 2 J 1, k J 2, k J 2 J 1 J 2 i1 k 1 1 s i i, k,, k 1 1 1 (2) 1 (3) X 0 k J k 1 (4) X J 2 k 1 J 2 i1 0 k J k J 2 (5) X 1 i J 6 ik X 1 k J ik ik, k 1 i, k,, k 1 ik, k 1 i, k,, k 1 7 X X 1 i,, k J k J 2 i (8) X X 2 i,, k J k J 2 i (9) X ikl ik Code in OPL/Gams 0 i,, k, l J i l k 1 (10) 0, 1 i, k J 11 (1) (2) (3) (4) (5) 43