Scheduling and Timetabling, Lecture 14 Han Hoogeveen, Utrecht University 1
Description Parallel machine scheduling: each job is executed by exactly one machine, and you can choose which one. Shop scheduling: each job is divided in several operations . Each operation must be executed by a prespecified machine (conveyor belt). The operations are never allowed to overlap in their execution. Depending on the type of model, the order in which the operations are executed can be either fixed (job shop, flow shop) or free to choose (open shop). 2
Open shop Notation in the α | β | γ notation: O in the α field. There are n jobs to be scheduled. Each job consists of a number of operations (usually one operation per machine); the i th operation of job j is denoted by O ij and its processing time by p ij . Each operation must be executed by a prespecified machine, which is assumed to be continuously available from time zero onwards. You can choose in which order to process the operations, but the operations are not allowed to overlap in their execution. All non-preemptive open shop problems are NP -hard, except for O 2 || C max . 3
Gonzalez & Sahni’s algorithm for O 2 || C max Lower bounds: ?? Gonzalez-Sahni’s algorithm constructs a schedule with makespan equal to the lower bound in O ( n ) time. 4
Gonzalez & Sahni’s algorithm for O 2 || C max Lower bounds: total processing time on machine 1, total processing time on machine 2, length of the longest job. Main problem to find a schedule with makespan equal to the lower bound: the two operations of the same job should not overlap. Trivial if the length of the longest job equals the makespan. Suppose that this is not the case. 5
Gonzalez & Sahni’s algorithm for O 2 || C max Partition the jobs in two classes: Class A contains the jobs with p 1 j ≥ p 2 j . Class B contains the jobs with p 1 j < p 2 j . Choose any two distinct jobs J l and J r such that p 1 r ≥ max p 2 l ≥ max J j ∈ A p 2 j and J j ∈ B p 1 j Define A ′ = A \ { J l , J r } and B ′ = B \ { J l , J r } . 6
Gonzalez & Sahni’s algorithm for O 2 || C max Assume (the other case is comparable) that n n � � p 1 j − p 1 l ≥ p 2 j − p 2 r j =1 j =1 Construct a feasible schedule as follows: M 1 first executes J l , then all jobs from B ′ in any order, then all jobs from A ′ in any order, and finally job J r . M 2 executes J r , J l , then the jobs from B ′ and finally the jobs from A ′ The execution intervals are as follows: If p 1 r + p 2 r ≤ � p 2 j , then both machines process the jobs contiguously (not necessarily starting at time zero) such that on both machines the last operation ends at time max { � p 1 j , � p 2 j } . If p 1 r + p 2 r > � p 2 j , then M 1 and M 2 execute the jobs in the interval [0 , � p 1 j ] and [ � p 1 j − p 1 r − p 2 r , � p 1 j ]. 7
Flow shop Notation in the α | β | γ notation: F in the α field. There are n jobs, and each job consists of m operations. The i th ( i = 1 , . . . , m ) operation of job j ( j = 1 , . . . , n ) must be executed by machine M i ( i = 1 , . . . , m ). The order in which the operations must be executed is given. Hence, the jobs flow through the machines in the same order (conveyor belt). All problems with general processing times p ij are NP -hard in the strong sense, except for F 2 || C max , which was solved in 1954 by Johnson. In case of the proportionate flow shop problem p ij = p j for all j = 1 , . . . , n . The problems become polynomially solvable then. 8
Permutation flow shop There exists an optimal schedule in which the first two machines execute the jobs in the same order, irrespective of the objective function. If you want to minimize the makespan, then there exists an optimal schedule in which the first three machines execute the jobs in the same order. Special case: the permutation flow shop, in which all machines execute the jobs in the same order. Adding the constraint that the jobs must be executed in the same order on all machines generally leads to a worse solution. In case of for example the proportionate flow shop problem the optimal solution is a permutation flow shop. 9
Bad instance for a permutation flow shop There are 4 machines and two jobs J 1 has processing times (1 , 3 , 3 , 1); J 2 has (3 , 1 , 1 , 3) Optimum solution: J 1 → J 2 on machines M 1 and M 2 ; J 2 → J 1 on machines M 3 and M 4 . This schedule has makespan 10: J 2 is processed without idle time, with the first and fourth operation of J 1 around it. The permutation schedule J 1 → J 2 has makespan 11: job J 1 is processed without idle time, but after that the fourth operation of J 2 has to be processed. The same holds for the permutation schedule J 2 → J 1 : here J 1 must wait for the first operation of J 2 to get started. 10
Johnson’s algorithm for F 2 || C max Characteristic: The machines execute the jobs in the same order. There is no idle time on the first machine. You can shift back all jobs on the second machine, such that these are processed contiguously. The (last) job for which C 1 j = S 2 j is called the pivot . If you renumber the jobs according to the order in which they appear in the schedule, and if job q is the pivot, then q n � � C max = p 1 j + p 2 j j =1 j = q What would you do with a job j with p 1 j = 0? And what with a job j with p 2 j = 0? 11
Johnson’s algorithm for F 2 || C max Partition the jobs in two classes: Class 1 contains the jobs with p 1 j ≤ p 2 j . Class 2 contains the jobs with p 1 j > p 2 j . The optimal schedule executes first all jobs from Class 1 in order of non-decreasing p 1 j value and then all jobs from Class 2 in order of non-increasing p 2 j . Running time: O ( n log n ) time. Argument why this solution is optimal: A job with p 1 j = 0 is best put first A job with p 2 j = 0 is best put last If there is no such job, then reduce all processing times by p min ; this changes the objective value by a constant. 12
Definition job shop problem We are given: m machines M 1 , . . . , M m ; n jobs J 1 , . . . , J n with l operations O 1 , . . . , O l . For each operation O v we are given: its processing time p v ; the machine that executes O v ; the job O v belongs to. The order of the operations in job j is given. 13
Definition continued Machine assumptions: Continuously available from time 0; At most one operation at a time. Goal : minimize completion time last job (maximize machine utilization) 14
Example instance ✎☞ ✎☞ ✎☞ ✎☞ ✲ ✲ ✲ J 1 1 2 3 4 ✍✌ ✍✌ ✍✌ ✍✌ ✎☞ ✎☞ ✲ J 2 5 6 ✍✌ ✍✌ ✎☞ ✎☞ ✲ J 3 7 8 ✍✌ ✍✌ 1 2 3 4 5 6 7 8 O v p v 6 4 2 3 7 5 5 8 M v 1 2 3 2 3 2 3 1 15
Example schedule 1 8 M 1 2 4 6 M 2 5 3 7 M 3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 16
Disjunctive graph Construct a graph with vertices O 1 , . . . , O l ; arcs ( O i , O j ) if O i − → O j in some job; edges ( O i , O j ) if O i and O j are executed by the same machine. ✎☞ ✎☞ ✎☞ ✎☞ ✲ ✲ ✲ ✘✘✘✘✘✘✘✘✘✘✘✘✘ ✘✘✘✘✘✘✘✘✘✘✘✘✘ ✘ ✘ J 1 1 2 3 4 ✍✌ ✍✌ ✍✌ ✍✌ ❅ ❅ ✎☞ ✎☞ ❅ ✲ J 2 5 6 ❅ ✍✌ ✍✌ ❅ ❅ ✎☞ ❅ ✎☞ ✲ J 3 7 8 ✍✌ ✍✌ 17
Example continued ✎☞ ✎☞ ✎☞ ✎☞ ✲ ✲ ✲ ✘ ✘ J 1 1 ✘✘✘✘✘✘✘✘✘✘✘✘✘ 2 ✘✘✘✘✘✘✘✘✘✘✘✘✘ 3 4 ✍✌ ✍✌ ✍✌ ✍✌ ❅ ❅ ✎☞ ✎☞ ❅ ✲ J 2 5 6 ❅ ✍✌ ✍✌ ❅ ❅ ✎☞ ❅ ✎☞ ✲ J 3 7 8 ✍✌ ✍✌ Direct the undirected edges such that: O 1 → O 8 (defining the order on M 1 ) O 2 → O 6 , O 4 → O 6 ( M 2 ) O 5 → O 7 , O 5 → O 3 , O 3 → O 7 ( M 3 ). = ⇒ previous schedule. 18
Adjusting the schedule ✎☞ ✎☞ ✎☞ ✎☞ ✲ ✲ ✲ ✘✘✘✘✘✘✘✘✘✘✘✘✘ ✘✘✘✘✘✘✘✘✘✘✘✘✘ ✘ ✘ J 1 1 2 3 4 ✍✌ ✍✌ ✍✌ ✍✌ ❅ ❅ ✎☞ ✎☞ ❅ ✲ J 2 5 6 ❅ ✍✌ ✍✌ ❅ ❅ ✎☞ ❅ ✎☞ ✲ J 3 7 8 ✍✌ ✍✌ Direct the undirected edges such that: O 1 → O 8 (defining the order on M 1 ) O 2 → O 6 , O 4 → O 6 ( M 2 ) O 5 → O 7 , O 5 → O 3 , O 7 → O 3 ( M 3 ; the order of operations O 3 and O 7 has been reversed). 19
Adjusted schedule 1 8 M 1 2 4 6 M 2 5 3 7 M 3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 8 M 1 2 4 6 M 2 5 7 3 M 3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 20
Next adjustment ✎☞ ✎☞ ✎☞ ✎☞ ✲ ✲ ✲ ✘ ✘ J 1 1 ✘✘✘✘✘✘✘✘✘✘✘✘✘ 2 ✘✘✘✘✘✘✘✘✘✘✘✘✘ 3 4 ✍✌ ✍✌ ✍✌ ✍✌ ❅ ❅ ✎☞ ✎☞ ❅ ✲ J 2 5 6 ✍✌ ❅ ✍✌ ❅ ❅ ✎☞ ❅ ✎☞ ✲ J 3 7 8 ✍✌ ✍✌ Direct the undirected edges such that: O 1 → O 8 (defining the order on M 1 ) O 2 → O 6 , O 6 → O 4 ( M 2 ; the order of operations O 4 and O 6 has been reversed) O 5 → O 7 , O 5 → O 3 , O 7 → O 3 ( M 3 ). 21
Adjusted schedule 1 8 M 1 2 4 6 M 2 5 7 3 M 3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 1 8 M 1 2 6 4 M 2 5 7 3 M 3 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 22
Recommend
More recommend