Shop Scheduling Problem Lesson 9 General Shop Problem
Shop Scheduling Problem Lesson 9
General Shop Problem Given: n jobs i = 1, . . . , n and m machines M 1, . . . , Mm. Each job i consists of a set of operations Oij (j = 1, . . . , ni) must be processed on a machine μij {M 1, . . . , Mm}. There may be precedence relations between the operations of all jobs. Each job can be processed only by one machine at a time. The objective is to find a feasible schedule that minimizes some objective function of the finishing times Ci of the jobs i = 1, . . . , n. The objective functions are assumed to be regular.
Disjunctive Graph Model G = (V, C, D) • V is the set of nodes representing the operations of all jobs. In addition, there are two special nodes, a source 0 V, and a sink V. A weight is associated with each node. The weights of 0 and are zero, while the weights of the other nodes are the processing times of the corresponding operations. • C is the set of directed conjunctive arcs. These arcs reflect the precedence relations between the operations. Additionally, there are conjunctive arcs between the source and all operations without a predecessor, and between all operations without a successor and the sink. • D is set of undirected disjunctive arcs. Such an arc exists for each pair of operations belonging to the same job which a not connected by a conjunctive arc and for each pair of operations belonging to the same machine which a not connected by a conjunctive arc
Figure 9. 1 M 4 O 11 O 12 O 21 s O 31 M 2 O 13 M 3 O 22 M 1 M 2 O 32 M 3 O 33 M 1 O 41 O 42 M 3
Selection • The basic scheduling decision is to define an ordering between the operations connected by disjunctive arcs. This can be done by turning the undirected disjunctive arcs into directed ones. A selection S is a set of directed disjunctive arcs. Disjunctive arcs which have been directed are called fixed.
Complete Selection A selection is a complete selection if • each disjunctive arc has been fixed, and • the resulting graph G(S) = (V, C∪S) is acyclic.
Figure 9. 1 M 4 O 11 O 12 O 21 s O 31 M 2 M 2 O 32 O 13 O 22 M 3 O 33 M 1 O 41 O 42 M 3
Figure 9. 1 O 12 O 13 O 22 O 21 s O 31 O 33 O 32 O 41 O 42
Selection Schedule • Given a complete selection S, we may construct a corresponding nonpreemptive (semi-active) schedule x = (xi) defined by the starting times of all operations i. For each path p from vertex i to vertex j in G(S), define the length of p to be the sum of all labels of nodes in p, j included. For each operation i, let l(i) be the length of a longest path from 0 to the vertex representing i. If we define xi = l(i) for all operations i, then we get the feasible schedule x associated with S.
Schedule Selection • On the other hand, an arbitrary feasible schedule x defines an order of operations for each job and each machine. This induces a complete selection S and, given a regular objective function, the corresponding schedule x’ is not worse than x. Thus, a complete selection always exists which represents an optimal schedule.
Open Shop Problems An open shop problem is a special case of the general shop in which • each job i consists of m operations Oij (j = 1, . . . , m) where Oij must be processed on machine Mj, • there are no precedence relations between the operations. Thus, the problem is to find job orders and machine orders.
O 2||Cmax • Let A and B be the two machines and denote by ai and bi the processing times of job i (i = 1, . . . , n) on machines A and B, respectevely. • Define I = {i | ai bi ; i = 1, . . . , n} and J = {i | ai > bi ; i = 1, . . . , n}. • We determine job with the largest small operation.
Case 1 ar = max{ai| i I}, max{bi| i J}} An optimal schedule is constructed by scheduling • first all jobs in I {r} in an arbitrary order on machine A, then all jobs in J in an arbitrary order, and, finally, job r, • first job r on machine B, then all jobs in I {r} in the same order as jobs in I {r} are scheduled on A, and finally, all jobs in J in the same order as on machine A.
Case 1 I = {i | ai bi ; i = 1, . . . , n} J = {i | ai > bi ; i = 1, . . . , n}. ar = max{ai| i I}, max{bi| i J}} A B I {r} r J
Case 2 I = {i | ai bi ; i = 1, . . . , n} J = {i | ai > bi ; i = 1, . . . , n}. br = max{ai| i I}, max{bi| i J}} A B r J {r} I I r
Correctness (case 1) G(S) I {r} J r 0 r 1) 0 → ai (i I {r}) → ai (i J ) → ar → 2) 0 → br → bi (i I {r}) → bi (i J ) → 3) 0 → br → ar →
Case 1, i I an = max{ai| i I}, max{bi| i J}} I = {i | ai bi ; i = 1, . . . , n} ai max{aj | j I} = an bn.
Case 1, i J an = max{ai| i I}, max{bi| i J}} J = {i | ai > bi ; i = 1, . . . , n} bi max{bj | j J} max{ai| i I}, max{bi| i J}} = an
Flow Shop Problems An flow shop problem is a general shop problem in which • each job i consists of m operations Oij with processing time pij (j = 1, . . . , m) where Oij must be processed on machine Mj, • there are precedence relations of the form Oij → Oij+1 (i = 1, . . . , m – 1) for each i = 1, . . . , n, i. e. each job is first processed on machine 1, then on machine 2, then on machine 3, etc. Thus, the problem is to find a job order πj for each machine Mj.
Job Sequence Lemma 9. 2 For problem Fm||Cmax an optimal schedule exists with the following properties: 1. The job sequence on the first two machines is the same. 2. The job sequence on the last two machines is the same.
Proof of Lemma 9. 2 Consider an optimal schedule in which the processing order on both machines is identical for the first k scheduled jobs, where k < n is maximal. Let i be the k-th job and let j be the job scheduled on machine 2 after the second operation of job i. ●●● M 1 M 2 i ●●● 0 l ●●● i h j j t If on machine 1 we shift job j to the position immediately after job i and move the jobs scheduled previously between job i and job j by p 1 j time units to the right, we get another optimal schedule. This contradict the maximality of k.
Permutation Flow Shop • A flow shop is called a permutation flow shop if solution are restricted to job sequences: π1, . . . , πm with π1 = π2 =. . . = πm. • Lemma 6. 8 shows that for two and three machines the optimal solution of the flow problem is not better than that of the corresponding permutation flow shop.
4 machines O 11 J 2 O 21 O 12 O 23 O 11 O 21 O 12 O 13 O 24 O 14 O 23 O 14 O 22 O 13 M 1 1 3 M 2 3 1 M 3 3 1 M 4 1 3
F 2||Cmax • For solving two-machine flow shop problem we have to find a permutation L: L(1), . . . , L(n) of all jobs are scheduled in this order on both machines, then the makespan is minimized. • An optimal order is constructed by calculating a left list T: L(1), . . . , L(t) and a right list R: L(t + 1), . . . , L(n) and then concatenating them to obtain L = T ○ R = L(1), . . . , L(n). • The lists T and R are constructed step by step.
Johnson’s Rule • At each step we consider an operation Oi*j* with the smallest pi*j* -value. If j*=1, then we put job i* at the end of list T, i. e. we replace T by T ○ i*. Otherwise we put i* at the beginning of list R, i. e. we replace R by i*○ R. Job i* and processing times pi*1 and pi*2 are then deleted from consideration.
Example 9. 3 pi 1 pi 2 Job 1 4 8 Job 2 3 3 Job 3 3 4 Job 4 1 4 Job 5 8 7 T : 4, 3, 1 4 3 4 M 1 M 2 0 R : 5, 2 1 5 3 2 1 5 2 27 t
Lemma 9. 4 Let L: L(1), . . . , L(n) be a list constructed by Johnson’s rule. Then min{pi 1, pj 2}< min{pj 1, pi 2} implies that job i precedes job j in L.
Proof of Lemma 9. 4 (i → j) pi 1 < min{ pj 1, pi 2 } pi 1 < pi 2 j R j T i→j pi 1 < pj 1 j appears after i in T i T L = T○R i→j T →T ○ i*
Lemma 9. 5 Consider a schedule in which job j is scheduled immediately after job i. Then min{pj 1, pi 2} min{pi 1, pj 2} (6. 10) implies that i and j can be swapped without increasing the Cmax-value.
Three Cases wij = pi 1 + pj 2 M 1 M 2 i ●●● j ●●● wij = pi 1 + pi 2 + pj 2 M 1 M 2 i ●●● x M 1 M 2 ●●● j i ●●● j ●●● wij = x + pi 2 + pj 2 ●●● j i j ●●●
Proof of Lemma 9. 5 wij = max{ pi 1 + pj 2 , pi 1 + pi 2 + pj 2 , x + pi 2 + pj 2 } = max{ pi 1 + pj 2 + max{ pj 1 , pi 2}, x + pj 1 + pj 2 } wji = max{ pj 1 + pi 2 + max{ pi 1 , pj 2}, x + pj 1 + pj 2 } L 9. 4: min{pj 1, pi 2} min{pi 1, pj 2} max{–pi 1, –pj 2} max{–pj 1, –pi 2} wji wij + pi 1 + pi 2 + pj 1 + pj 2 = pj 1 + pi 2 + max{ pi 1 , pj 2} pi 1 + pj 2 + max{ pj 1 , pi 2}
Correctness Theorem 9. 6 The sequence L: L(1), . . . , L(n) constructed by Jonson’s rule is optimal.
Proof of Theorem 9. 6 • Let Λ be the set of all optimal sequences and assume that L Λ. Then we consider a sequence R Λ with L(ν) = R(ν) for ν = 1, . . . , s – 1 and i = L(s) ≠ R(s) = j where s is maximal.
Proof • Job i is a (not necessarily immediate) successor j in R. • Let k be a job scheduled between job j and job i or k = j in R. In L, job k is scheduled after job i. • Thus, by Lemma 9. 4 we must have min{pk 1, pi 2} ≥ min{pi 1, pk 2}, otherwise job i would follow by job k in L.
Proof • min{pk 1, pi 2} ≥ min{pi 1, pk 2} holds for each such job k. • Applying Lemma 9. 5 to R, we may swap each immediate predecessor k of job i without increasing the objective value. • We finally get a sequence R# Λ with L(ν) = R#(ν) for ν = 1, . . . , s. • Contradiction with maximality s.
Job Shop Problems The job shop problem is a special case of general shop problem which generalize the flow shop problem. • Each job i consists of ni operations Oi 1, Oi 2, . . . , Oini, which must be processed on this order. • We have precedence relations of the form Oij → Oij+1 (i = 1, . . . , ni – 1). • There is a machine μij {M 1, . . . , Mm} and a processing time pij associated with each operation Oij must be processed for pij time units on machine μij. • The problem is to find a feasible schedule which minimizes some objective function depending on the finishing time Ci of the last operation Oini of the jobs. • We assume that μij ≠ μij+1 for i = 1, . . . , ni – 1.
J 2|ni 2 |Cmax • This two machine job shop problem with at most two operations per job can be solved by a reduction to the two-machine flow shop problem.
Set of Jobs To describe this reduction, it is convenient to divide the set of jobs into the following subsets: I 1: jobs which are processed only on machine 1 I 2: jobs which are processed only on machine 2 I 1, 2: jobs which are processed first on machine 1 and then on machine 2 I 2, 1: jobs which are processed first on machine 2 and then on machine 1
Reduction To construct an optimal solution for problem J 2|ni 2|Cmax we have to apply the following steps. 1. Calculate an optimal sequence R 1, 2 for the flow shop problem with job set I 1, 2. 2. Calculate an optimal sequence R 2, 1 for the flow shop problem with job set I 2, 1. 3. On machine 1 first schedule I 1, 2 according R 1, 2, then all jobs in I 1 in an arbitrary order, and finally, I 2, 1 according to R 2, 1. 4. On machine 2 first schedule I 2, 1 according R 2, 1, then all jobs in I 2 in an arbitrary order, and finally, I 1, 2 according to R 1, 2.
Structure of Schedule • We may assume that the schedule constructed in this way is active. Then at least one machine processes the jobs without idle time. More specifically, if then there is no idle time on machine 1. Otherwise there is no idle time on machine 2.
Optimality No idle time I 12 M 1 M 2 I 21 I 2 I 12 I 21 No idle time M 1 M 2 I 21 I 12 I 1 I 21 I 12 t t = OPT(I 12)
- Slides: 42