Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Set # 4 Dr. LEE Heung Wing Joseph Phone: 2766 6951 Office : HJ639.

Similar presentations


Presentation on theme: "1 Set # 4 Dr. LEE Heung Wing Joseph Phone: 2766 6951 Office : HJ639."— Presentation transcript:

1 1 Set # 4 Dr. LEE Heung Wing Joseph Email : majlee@polyu.edu.hk Phone: 2766 6951 Office : HJ639

2 2 2 machines 5 jobs Makespan of each machine is fixed once the allocation is fixed.

3 3 4 jobs 2 machineswith preemptions

4 4 =

5 5

6 6

7 7

8 8 Exercise 5.11 (b) Show that if an optimal schedule results in at most two jobs on any machine, then LPT is optimal. Under the condition, n ≤ 2m. By adding jobs with zero processing times we can make n = 2m, and each machine would have 2 jobs. If under the LPT, the largest would match with the smallest, the second largest would match with the second smallest etc etc.

9 9 We now show that this LPT arrangement is indeed optimal. Let p 1 ≥ p 2 ≥ …..≥ p n. Under LPT, C max =max{( p 1 + p n ), ( p 2 + p n-1 ), ( p 3 + p n-2 ), ….., ( p n/2 + p n/2+1 )} That is to say, C max =max j=1,2,…, n/2 { p j + p n-j+1 }. Let S 1 ={1,2,…,n/2} and S 2 ={n/2+1,n/2+2,…,n}. In the LPT arrangement, each machine would have one job from S 1 and one from S 2. Consider a schedule with exactly 2 jobs in each machine. Suppose one machine has 2 jobs {a,b} from S 1 and another machine has two jobs {c,d} from S 2 such that p a ≥ p b ≥ p c ≥ p d. The completion times for these two machines would be (p a + p b ) and (p c + p d ). But max{(p a + p b ), (p c + p d )} ≥ max{(p a + p d ), (p b + p c )}, so by interchanging jobs b and d, we can possibly improve the cost. Thus, for the optimal schedule, we must have each machine having one job from S 1 and the other one from S 2.

10 10 Now consider any two machines in a schedule with each machine having one job from S 1 and one from S 2. Suppose a and c are processed on one machine and b and d are on the other, where {a,b} are from S 1 and {c,d} from S 2 such that p a ≥ p b ≥ p c ≥ p d. The completion times for these two machines would be (p a + p c ) and (p b + p d ). But max{(p a + p c ), (p b + p d )} ≥ max{(p a + p d ), (p b + p c )}, so by interchanging jobs c and d, we can possibly improve the cost. That is to say, the larger job in S 1 would match with the smaller job in S 2 in one machine; and the smaller job in S 1 would match with the larger job in S 2 in another machine. Thus, we keep interchanging the jobs between machines to improve the cost until the largest job would match with the smallest, the second largest would match with the second smallest etc etc. That is to say, the LPT rule is the optimal.

11 11

12 12 or just freed, it follows that

13 13

14 14 Last job 3pn3pn At most 2 jobs cannot have 3 or more jobs for each machine, otherwise p n is not the smallest job processing time

15 15 Recall Exercise 5.11 (b): Show that if an optimal schedule results in at most two jobs on any machine, then LPT is optimal.

16 16

17 17 Project Scheduling Contents 1. Problem Statement 2. Critical Path Method 3. Extensions to the classical project scheduling problems

18 18 Environment: parallel-machines jobs are subject to precedence constraints Objective: to minimise the makespan P  | prec | C max m  nCritical Path Method Pm | prec | C max 2  m<n NP hard slack job: the start of its processing time can be postponed without increasing the makespan critical job: the job that can not be postponed critical path: the set of critical jobs Problem Statement

19 19 Critical Path Method Forward procedure that yields a schedule with minimum makespan. Notation: p j processing time of job j S' j the earliest possible starting time of job j C' j the earliest possible completion time of job j C' j = S' j +p j { all k  j } jobs that are predecessors of job j Step 1. For each job j that has no predecessors S' j =0 and C' j =p j Step 2. Compute inductively for each remaining job j C' j = S' j +p j Step 3. C max = max(C' 1,...,C' n )

20 20 Backward procedure determines the latest possible starting and completion times. Notation: C'' j the latest possible completion time of job j S'' j the latest possible starting time of job j { j  all k } jobs that are successors of job j Step 1. For each job j that has no successors C'' j =C max and S'' j =C max -p j Step 2. Compute inductively for each remaining job j S'' j = C' j - p j Step 3. Verify that 0 = min(S'' 1,..., S'' n )

21 21 The jobs whose earliest possible starting times are earlier than latest possible starting times are referred to as slack jobs. The jobs whose earliest possible starting times are equal to their latest possible starting times are critical jobs. A critical path is a chain of jobs which begin at time 0 and ends at C max.

22 22 Example 12 6 345 7 8 9 4 9 8 8 33 6 12 6

23 23 12 6 345 7 8 9 4 9 8 8 33 6 12 6

24 24 12 6 345 7 8 9 4 9 8 8 33 6 12 Critical Path 6

25 25 So far, the activities (jobs) are on the nodes, and the arrows are only representing the precedence of the jobs. Activities on the arrow In another textbook “Operations Research” 7 th ed. by Hamdy A. Taha, the CPM is somewhat presented in another way. The activities (jobs) are on the arrows instead of the nodes.

26 26

27 27

28 28

29 29

30 30

31 31

32 32

33 33

34 34

35 35

36 36

37 37

38 38 Extensions to the classical project scheduling problems Stochastic activity (job) durations Nonavailability of resources Multiple resource types Preemption of activities Multiple projects with individual project due-dates Objectives: common one: minimising overall project duration resource leveling minimise resource loading peaks without increasing project duration maximise resource utilisation factors

39 39 Flow Shop Scheduling Contents 1. Problem Statement 2. Johnson's rule

40 40 F2 | | C max Flow shop environment: 2 machines, n jobs objective function: makespan arrival times of jobs r j = 0 Problem Statement

41 41

42 42

43 43 (a) (b)

44 44 Algorithm [S.M. Johnson (1954)] for F2 | | C max Step 1. Schedule the group of jobs U that are shorter on the first machine than the second. U = { j | p 1j < p 2j } Step 2. Schedule the group of jobs V that are shorter on the second machine than the first. V = { j | p 1j  p 2j } Step 3. Arrange jobs in U in non-decreasing order by their processing times on the first machine. Step 4. Arrange jobs in V in non-increasing order by their processing times on the second machine. Step 5. Concatenate U and V and that is the processing order for both machines.

45 45... first machine second machine idle time...

46 46 Example. U = {2, 3, 6} V = {1, 4, 5, 7, 8} C max = 37

47 47 Job Shop Scheduling Contents 1. Problem Statement 2. Disjunctive Graph 3. The Shifting Bottleneck Heuristic and the Makespan

48 48 Literature: 1. Scheduling, Theory, Algorithms, and Systems, Michael Pinedo, Prentice Hall, 1995, or new: Second Addition, 2002 Chapter 7 or 2. Operations Scheduling with Applications in Manufacturing and Services, Michael Pinedo and Xiuli Chao, McGraw Hill, 2000 Chapter 5

49 49 Job shop environment: m machines, n jobs objective function each job follows a predetermined route routes are not necessarily the same for each job machine can be visited once or more than once (recirculation) NP hard problems Problem Statement

50 50

51 51 Disjunctive Graph S 1,3 1,1 1,2 2,3 2,1 4,2 4,3 3,1 3,2T 2,2 Example of a job shop problem: 4 machines and 3 jobs

52 52 Jm | | C max (i, j) processing of job j on machine i p ij processing time of job j on machine i G = (N, A  B) (i, j)  Nall the operations that must be performed on the n jobs Aconjunctive (solid) arcs represent the precedence relationships between the processing operations of a single job Bdisjunctive (broken) arcs connect two operations which belong to two different jobs, that are to be processed on the same machine, they go in opposite directions Disjunctive arcs form a clique for each machine. Clique is a maximal subgraph in which all pairs of nodes are connected with each other. Operations in the same clique have to be done on the same machine.

53 53 How to construct a feasible schedule? Select D - a subset of disjunctive arcs (one from each pair) such that the resulting directed graph G(D) has no cycles. Graph G(D) contains conjunctive arcs + D. D represents a feasible schedule. A cycle in the graph corresponds to a schedule that is infeasible. Example h,ji,j i,kh,k invalid machine i machine h jk kj

54 54 S 1,3 1,1 1,2 2,3 2,1 4,2 4,3 3,1 3,2T 2,2 108 0 4 0 0 8356 47 3 The makespan of a feasible schedule is determined by the longest path in G(D) from S to T. Minimise makespan: find a selection of disjunctive arcs that minimises the length of the longest path (the critical path).

55 55 The Shifting Bottleneck Heuristic and the Makespan Idea: A classic idea in nonlinear programming is to hold all but one variable fixed and then optimise over that variable. Then hold all but a different one fixed, and so on. Furthermore, if we can do the one-variable optimisation in order of decreasing importance, there is better hope that the local optimum so found will be the global one, or close to it. In job shop problems fixing the value of variable means fixing the sequence in which jobs are to be processed on a given machine.

56 56 Iteration M set of m machines M 0  M machines for which sequence of jobs has already been determined in previous iterations Analysis of machines still to be scheduled S i,ji,jT p ij Define a single-machine problem 1 | r j | L max for machine i i{M-M0}i{M-M0}

57 57 Bottleneck selection A machine k with the largest maximum lateness is a bottleneck. 1. Schedule machine k according to the sequence which minimises the corresponding L max (single-machine problem). 2. Insert all the corresponding disjunctive arcs in the graph. 3. Insert machine k in M 0. C max (M 0  k)  C max (M 0 ) + L max (k)

58 58 Resequencing of all machines scheduled earlier Aim: to reduce the makespan Do for each machine l  {M 0 - k} delete the disjunctive arcs associated with the machine l formulate a single machine problem for the machine l and find the sequence that minimises L max (l) Insert the corresponding disjunctive arcs.

59 59 Shifting Bottleneck Algorithm Step 1. Set the initial conditions M 0 =  set of scheduled machines. Graph G is the graph with all the conjunctive arcs and no disjunctive arcs. Set C max (  ) equal to the longest path in graph G. Step 2. Analysis of the machines still to be scheduled Solve the simple problem for each machine still to be scheduled: formulate a single machine problem with all operations subject to release dates and due dates. Step 3. Bottleneck selection The machine with the highest cost is designated the bottleneck. Insert all the corresponding disjunctive arcs in graph G. Insert machine which is the bottleneck in M 0.

60 60 Step 4. Resequencing of all the machines scheduled earlier Find the sequence that minimised the cost and insert the corresponding disjunctive arcs in graph G. Step 5. Stopping condition If all the machines are scheduled (M 0 = M) then STOP else go to Step 2.

61 61 S 1,3 1,1 1,2 2,3 2,1 4,2 4,3 3,1 3,2T 2,2 108 0 4 0 0 8356 47 3 Example.

62 62 Iteration 1. M 0 =  C max (  )=22 1,2,3 L max (1)=5 Machine 1 S 1,3 1,1 1,2 2,3 2,1 4,2 4,3 3,1 3,2T 2,2 108 0 4 0 0 8356 47 3 L max (1, 2, 3) = max {0, 2, 5} = 5 L max (1, 3, 2) = max {0, 2, 6} = 6 L max (2, 1, 3) = max {0, 11,...} >11 L max (2, 3, 1) = max {0, 3, 15} = 15 L max (3, 1, 2) = max {-8, 4, 6} = 6 L max (3, 2, 1) = max {-8, 0, 15} = 15

63 63 2,3,1 L max (2)=5 Machine 2 L max (1, 2, 3) = max {0, 16, 14} = 16 L max (1, 3, 2) = max {0, 6, 25} = 25 L max (2, 1, 3) = max {0, 0, 6} = 6 L max (2, 3, 1) = max {0, -4, 5} = 5 L max (3, 1, 2) = max {-8, 1, 19} = 19 L max (3, 2, 1) = max {-8, 7, 5} = 7 S 1,3 1,1 1,2 2,3 2,1 4,2 4,3 3,1 3,2T 2,2 108 0 4 0 0 8356 47 3

64 64 L max (3)=4 L max (1, 2) = max {0, 6} = 6 L max (2, 1) = max {0, 4} = 4 Machine 3 S 1,3 1,1 1,2 2,3 2,1 4,2 4,3 3,1 3,2T 2,2 108 0 4 0 0 8356 47 3

65 65 L max (4)=3 L max (2, 3) = max {0, -3} = 0 L max (3, 2) = max {-8, 3} = 3 Machine 4 S 1,3 1,1 1,2 2,3 2,1 4,2 4,3 3,1 3,2T 2,2 108 0 4 0 0 8356 47 3

66 66 L max (2)=5 2,3,1 L max (1)=5 1,2,3 L max (3)=4 L max (4)=3 Machines 1 and 2 are bottlenecks. Machine 1 is chosen as a bottleneck!

67 67 S 1,3 1,1 1,2 2,3 2,1 4,2 4,3 3,1 3,2T 2,2 108 0 4 0 0 8356 47 3 3 C max ({1}) = C max (  ) + L max (1) = 22 + 5 = 27

68 68 Iteration 2. M 0 = {1}, C max ({1})=27 2,1,3 L max (2)=1 Machine 2 S 1,3 1,1 1,2 2,3 2,1 4,2 4,3 3,1 3,2T 2,2 108 0 4 0 0 8356 47 3 3

69 69 1,2 or 2,1 L max (3)=1 L max (4)=0 Machine 3 Machine 4 Machines 2 and 3 are bottlenecks. Machine 2 is chosen as a bottleneck!

70 70 S 1,3 1,1 1,2 2,3 2,1 4,2 4,3 3,1 3,2T 2,2 108 0 4 0 0 8356 47 3 3 C max ({1,2}) = C max ({1}) + L max (2) = 27 + 1 = 28 Can we decrease C max ({1,2}) ? Will resequencing machine 1 give any improvement ? 8 8

71 71 S 1,3 1,1 1,2 2,3 2,1 4,2 4,3 3,1 3,2T 2,2 0 4 0 0 8356 47 3 10 3 8 8   8 Resequencing machine 1 does not give any improvement. original sequence: 1,2,3 Machine 1 L max (1, 2, 3) = max {0, -4, -1} = 0 L max (1, 3, 2) = max {0, -4, 0} = 0 L max (2, 1, 3) = max {-6, 11,7} =11 L max (2, 3, 1) = max {-6, -3, 15} = 15 L max (3, 1, 2) = max {-14, 4, 0} = 4 L max (3, 2, 1) = max {-14, 2, 15} = 15 C max ({1,2}) = 28

72 72 Iteration 3. M 0 = {1,2} C max ({1,2})=28 1,2 or 2,1 L max (3) = 0 L max (4) = 0 Machine 3 Machine 4 No machine is a bottleneck!

73 73 S 1,3 1,1 1,2 2,3 2,1 4,2 4,3 3,1 3,2T 2,2 108 0 4 0 0 8356 47 3 3 8 8 1 2 3 2 1 3 2 1 23 Machine 1 Machine 2 Machine 3 Machine 4 5 15 20 251030 t


Download ppt "1 Set # 4 Dr. LEE Heung Wing Joseph Phone: 2766 6951 Office : HJ639."

Similar presentations


Ads by Google