+ All Categories
Home > Documents > 1 Set # 4 Dr. LEE Heung Wing Joseph Email : [email protected] Phone: 2766 6951 Office : HJ639.

1 Set # 4 Dr. LEE Heung Wing Joseph Email : [email protected] Phone: 2766 6951 Office : HJ639.

Date post: 21-Dec-2015
Category:
View: 216 times
Download: 0 times
Share this document with a friend
Popular Tags:
73
1 Set # 4 Dr. LEE Heung Wing Joseph Email : [email protected] Phone: 2766 6951 Office : HJ639
Transcript

1

Set # 4

Dr. LEE Heung Wing Joseph

Email : [email protected]: 2766 6951Office : HJ639

2

2 machines

5 jobs

Makespan of each machine is fixedonce the allocation is fixed.

3

4 jobs2 machines with preemptions

4

=

5

6

7

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 timeswe 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

We now show that this LPT arrangement is indeed optimal. Let p1 ≥ p2 ≥ …..≥ pn. Under LPT, Cmax=max{( p1+ pn ) , ( p2+ pn-1 ) , ( p3+ pn-2 ) , ….., ( pn/2+ pn/2+1)}That is to say, Cmax=maxj=1,2,…,n/2 { pj+ pn-j+1}.Let S1={1,2,…,n/2} and S2={n/2+1,n/2+2,…,n}. In the LPT arrangement, each machine would have one job from S1 and one from S2.

Consider a schedule with exactly 2 jobs in each machine. Suppose one machine has 2 jobs {a,b} from S1 and another machine has two jobs {c,d} from S2 such that pa ≥ pb ≥ pc ≥ pd . The completion times for these two machines would be (pa+ pb ) and (pc+ pd). But max{(pa+ pb ) , (pc+ pd)} ≥ max{(pa+ pd ) , (pb+ pc)}, 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 S1 and the other one from S2.

10

Now consider any two machines in a schedule with each machine having one job from S1 and one from S2. Suppose a and c are processed on one machine and b and d are on the other, where {a,b} are from S1 and {c,d} from S2 such that pa ≥ pb ≥ pc ≥ pd . The completion times for these two machines would be (pa+ pc ) and (pb+ pd). But max{(pa+ pc ) , (pb+ pd)} ≥ max{(pa+ pd ) , (pb+ pc)}, so by interchanging jobs c and d, we can possibly improve the cost. That is to say, the larger job in S1 would match with the smaller job in S2 in one machine; and the smaller job in S1 would match with the larger job in S2 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

12

or just freed, it follows that

13

14

Last job

3pn

At most 2 jobscannot have 3 or more jobsfor each machine, otherwise pn is not the smallest job processing time

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

17

Project Scheduling

Contents

1. Problem Statement

2. Critical Path Method

3. Extensions to the classical project scheduling problems

18

Environment:parallel-machines jobs are subject to precedence constraintsObjective: to minimise the makespan

P | prec | Cmax m n Critical Path MethodPm | prec | Cmax 2m<n NP hard

• slack job: the start of its processing time can be postponed withoutincreasing the makespan

• critical job: the job that can not be postponed• critical path: the set of critical jobs

Problem Statement

19

Critical Path Method

Forward procedure that yields a schedule with minimum makespan.Notation: pj processing time of job jS'j the earliest possible starting time of job jC'j the earliest possible completion time of job jC'j = S'j +pj

{ 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=pj

Step 2.Compute inductively for each remaining job j

kjk

j CS 'max'}all{

C'j = S'j +pj

Step 3.Cmax = max(C'1, ... ,C'n)

20

Backward procedure determines the latest possible startingand completion times.Notation: C''j the latest possible completion time of job jS''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=Cmax and S''j=Cmax-pj

Step 2.Compute inductively for each remaining job j

kkj

j SC ''min''} all{

S''j = C'j - pj

Step 3.Verify that 0 = min(S''1,..., S''n)

21

• The jobs whose earliest possible starting times are earlier thanlatest possible starting times are referred to as slack jobs.

• The jobs whose earliest possible starting times are equal to theirlatest possible starting times are critical jobs.

• A critical path is a chain of jobs which begin at time 0 and endsat Cmax.

22

Example

1 26

3 4 5

7

8

9

4 98 8

3 3 612

jobs 1 2 3 4 5 6 7 8 9pj 4 9 3 3 6 8 8 12 6

6

23

jobs 1 2 3 4 5 6 7 8 9S'j 0 4 0 3 6 max

{13,12}= 13

max{21,24}=24

12 24

C'j 4 4+9=13 3 3+3=6 6+6=12 13+8=21

24+8=32

12+12=24

24+6=30

C''j 7 16 3 6 min{16,12}=12

24 32 min{24,26}=24

32

S''j 7-4=3 16-9=7 3-3=0 6-3=3 12-6=6 24-8=16

32-8=24

24-12=12

32-6=26

1 26

3 4 5

7

8

9

4 98 8

3 3 612

6

24

1 26

3 4 5

7

8

9

4 98 8

3 3 612

Critical Path

6

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” 7th 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

27

28

29

30

31

32

33

34

35

36

37

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 increasingproject duration

• maximise resource utilisation factors

39

Flow Shop Scheduling

Contents

1. Problem Statement

2. Johnson's rule

40

F2 | | Cmax

Flow shop environment:

• 2 machines, n jobs

• objective function: makespan

• arrival times of jobs rj = 0

Problem Statement

41

42

43

(a)

(b)

44

Algorithm [S.M. Johnson (1954)] for F2 | | Cmax

Step 1. Schedule the group of jobs U that are shorter on thefirst machine than the second.U = { j | p1j < p2j }

Step 2. Schedule the group of jobs V that are shorter on thesecond machine than the first.V = { j | p1j p2j }

Step 3. Arrange jobs in U in non-decreasing order by theirprocessing times on the first machine.

Step 4. Arrange jobs in V in non-increasing order by theirprocessing times on the second machine.

Step 5. Concatenate U and V and that is the processing orderfor both machines.

45

...first machine

second machine

idle time

idle time

...

46

Example.

jobs 1 2 3 4 5 6 7 8p1j 5 2 1 7 6 3 7 5p2j 2 6 2 5 6 7 2 1

jobs 3 2 6 5 4 7 1 8p1j 1 2 3 6 7 7 5 5p2j 2 6 7 6 5 2 2 1C1j 1 3 6 12 19 26 31 36C2j 3 9 16 22 27 29 33 37

U = {2, 3, 6}V = {1, 4, 5, 7, 8}

Cmax = 37

47

Job Shop Scheduling

Contents

1. Problem Statement

2. Disjunctive Graph

3. The Shifting Bottleneck Heuristic and the Makespan

48

Literature:

1. Scheduling, Theory, Algorithms, and Systems, Michael Pinedo, Prentice Hall, 1995, or new: Second Addition, 2002Chapter 7

or

2. Operations Scheduling with Applications in Manufacturingand Services, Michael Pinedo and Xiuli Chao, McGraw Hill, 2000Chapter 5

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

51

Disjunctive Graph

S

1,3

1,1

1,2

2,3

2,1

4,2

4,3

3,1

3,2 T2,2

Example of a job shop problem: 4 machines and 3 jobs

52

Jm | | Cmax

(i, j) processing of job j on machine i

pij processing time of job j on machine i

G = (N, AB)

(i, j)N all the operations that must be performed on the n jobs

A conjunctive (solid) arcs represent the precedence relationshipsbetween the processing operations of a single job

B disjunctive (broken) arcs connect two operations whichbelong to two different jobs, that are to be processed on thesame 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 areconnected with each other.

• Operations in the same clique have to be done on the same machine.

53

How to construct a feasible schedule?

Select D - a subset of disjunctive arcs (one from each pair) suchthat 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,j i,j

i,k h,k

invalid

machine i

machine h

j k

k j

54

S

1,3

1,1

1,2

2,3

2,1

4,2

4,3

3,1

3,2 T2,2

10 8

0 4

0

0

8 3 5 6

4 73

• The makespan of a feasible schedule is determined by the longest pathin G(D) from S to T.

• Minimise makespan: find a selection of disjunctive arcs thatminimises the length of the longest path (the critical path).

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 buta different one fixed, and so on.

• Furthermore, if we can do the one-variable optimisation in orderof decreasing importance, there is better hope that the local optimumso found will be the global one, or close to it.

• In job shop problems fixing the value of variable means fixingthe sequence in which jobs are to be processed on a given machine.

56

Iteration

M set of m machinesM0 M machines for which sequence of jobs has already been

determined in previous iterations

Analysis of machines still to be scheduled

S i,j Tpij

Jobs ... j ...pij pij

rij longest path from S to (i,j)dij Cmax(M0) – longest path

from (i,j) to T + pij

Define asingle-machineproblem 1 | rj | Lmax

for machine i

i{M-M0}

57

Bottleneck selection

• A machine k with the largest maximum lateness is a bottleneck.

))((max)( max}{

max0

iLkLMMi

1. Schedule machine k according to the sequence which minimisesthe corresponding Lmax (single-machine problem).

2. Insert all the corresponding disjunctive arcs in the graph.

3. Insert machine k in M0.

Cmax(M0 k) Cmax(M0) + Lmax(k)

58

Resequencing of all machines scheduled earlier

Aim: to reduce the makespan

Do for each machine l{M0 - k}

delete the disjunctive arcs associated with the machine l

formulate a single machine problem for the machine l andfind the sequence that minimises Lmax(l)

Insert the corresponding disjunctive arcs.

59

Shifting Bottleneck Algorithm

Step 1. Set the initial conditionsM0 = set of scheduled machines.Graph G is the graph with all the conjunctive arcs andno disjunctive arcs.Set Cmax() equal to the longest path in graph G.

Step 2. Analysis of the machines still to be scheduledSolve the simple problem for each machine still to be scheduled:formulate a single machine problem with all operations subject torelease dates and due dates.

Step 3. Bottleneck selectionThe 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 M0 .

60

Step 4. Resequencing of all the machines scheduled earlierFind the sequence that minimised the cost and insert thecorresponding disjunctive arcs in graph G.

Step 5. Stopping conditionIf all the machines are scheduled (M0 = M) then STOPelse go to Step 2.

61

S

1,3

1,1

1,2

2,3

2,1

4,2

4,3

3,1

3,2 T2,2

10 8

0 4

0

0

8 3 5 6

4 73

Example.

Jobs MachineSequence

Procesing Times

1 1, 2, 3 p11=10, p21=8, p31=42 2, 1, 4, 3 p22=8, p12=3, p42=5, p32=63 1, 2, 4 p13=4, p23=7, p43=3

62

Iteration 1.M0 = Cmax()=22

Jobs 1 2 3p1j 10 3 4r1j 0 8 0d1j 10 11 12

1,2,3 Lmax(1)=5

Machine 1

S

1,3

1,1

1,2

2,3

2,1

4,2

4,3

3,1

3,2 T2,2

10 8

0 4

0

0

8 3 5 6

4 73

Lmax(1, 2, 3) = max {0, 2, 5} = 5Lmax(1, 3, 2) = max {0, 2, 6} = 6Lmax(2, 1, 3) = max {0, 11,...} >11Lmax(2, 3, 1) = max {0, 3, 15} = 15Lmax(3, 1, 2) = max {-8, 4, 6} = 6Lmax(3, 2, 1) = max {-8, 0, 15} = 15

63

Jobs 1 2 3p2j 8 8 7r2j 10 0 4d2j 18 8 19

2,3,1 Lmax(2)=5

Machine 2

Lmax(1, 2, 3) = max {0, 16, 14} = 16Lmax(1, 3, 2) = max {0, 6, 25} = 25Lmax(2, 1, 3) = max {0, 0, 6} = 6Lmax(2, 3, 1) = max {0, -4, 5} = 5Lmax(3, 1, 2) = max {-8, 1, 19} = 19Lmax(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,2 T2,2

10 8

0 4

0

0

8 3 5 6

4 73

64

Lmax(3)=4

Jobs 1 2p3j 4 6r3j 18 16d3j 22 22

Lmax(1, 2) = max {0, 6} = 6Lmax(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,2 T2,2

10 8

0 4

0

0

8 3 5 6

4 73

65

Lmax(4)=3

Jobs 2 3p4j 5 3r4j 11 11d4j 16 22

Lmax(2, 3) = max {0, -3} = 0Lmax(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,2 T2,2

10 8

0 4

0

0

8 3 5 6

4 73

66

Lmax(2)=5 2,3,1

Lmax(1)=5 1,2,3

Lmax(3)=4

Lmax(4)=3

Machines 1 and 2 are bottlenecks.

Machine 1 is chosen as a bottleneck!

67

S

1,3

1,1

1,2

2,3

2,1

4,2

4,3

3,1

3,2 T2,2

10 8

0 4

0

0

8 3 5 6

4 73

10

3

Cmax({1}) = Cmax() + Lmax(1) = 22 + 5 = 27

68

Iteration 2.

M0 = {1}, Cmax({1})=27

Jobs 1 2 3p2j 8 8 7r2j 10 0 17d2j 23 10 24 2,1,3 Lmax(2)=1

Machine 2

S

1,3

1,1

1,2

2,3

2,1

4,2

4,3

3,1

3,2 T2,2

10 8

0 4

0

0

8 3 5 6

4 73

10

3

69

Jobs 1 2p3j 4 6r3j 18 18d3j 27 27

1,2 or 2,1 Lmax(3)=1

Lmax(4)=0

Machine 3

Machine 4

Machines 2 and 3 are bottlenecks.

Machine 2 is chosen as a bottleneck!

70

S

1,3

1,1

1,2

2,3

2,1

4,2

4,3

3,1

3,2 T2,2

10 8

0 4

0

0

8 3 5 6

4 73

10

3

Cmax({1,2}) = Cmax({1}) + Lmax(2) = 27 + 1 = 28

Can we decrease Cmax({1,2}) ?

Will resequencing machine 1 give any improvement ?

88

71

S

1,3

1,1

1,2

2,3

2,1

4,2

4,3

3,1

3,2 T2,2

0 4

0

0

8 3 5 6

4 73

10

3

88

10 8

Resequencing machine 1 does not give any improvement.

Jobs 1 2 3p1j 10 3 4r1j 0 8 0d1j 10 17 18

original sequence: 1,2,3

Machine 1

Lmax(1, 2, 3) = max {0, -4, -1} = 0Lmax(1, 3, 2) = max {0, -4, 0} = 0Lmax(2, 1, 3) = max {-6, 11,7} =11Lmax(2, 3, 1) = max {-6, -3, 15} = 15Lmax(3, 1, 2) = max {-14, 4, 0} = 4Lmax(3, 2, 1) = max {-14, 2, 15} = 15

Cmax({1,2}) = 28

72

Iteration 3.M0 = {1,2}Cmax({1,2})=28

Jobs 1 2p3j 4 6r3j 18 18d3j 28 28 1,2 or 2,1 Lmax(3) = 0

Lmax(4) = 0

Machine 3

Machine 4

No machine is a bottleneck!

73

S

1,3

1,1

1,2

2,3

2,1

4,2

4,3

3,1

3,2 T2,2

10 8

0 4

0

0

8 3 5 6

4 73

10

3

88

1 2 3

2 1 3

2 1

2 3

Machine 1

Machine 2

Machine 3

Machine 4

5 15 20 2510 30 t


Recommended