36
1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines.

1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

Embed Size (px)

Citation preview

Page 1: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

1

Operation Scheduling- II

The Multi-Machine Case

Look! There are two machines.

Page 2: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

2

Chuck. Before you go to the highly interesting multi-

machine case, could you show us a real-world single

machine scheduling problem having makespan as a meaningful criteria?

Cmax = maxi=1,n {Ci}, makespanCi = completion time of job i

max1

n

ii

C t

Page 3: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

3

A Real-World Example

The machine: LeBlond Makino 5, axis CNC Wire EDM(Electronic Discharge Machining)

Objective: Maximize machine utilization rate(machine can run unattended)

Page 4: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

4

Electronic Discharge Machining (EDM)

A machining process that uses an electrode to remove metal, or any other conductive material, from a workpiece by generating sparks between conducting surfaces. The electrode is the cutting tool for the EDM process and cuts the workpiece with the shape of the electrode. This material removal technique uses electricity to remove metal by means of spark erosion. During this process, sparks are created between the electrode and the workpiece. The energy from the electrode dissipates the workpiece and the desired shape is formed.

Page 5: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

5

Data for a Real-World Example

Jobs: Received in batches. Set-up times are estimated.Machine processing times are based upon path lengthand work thickness.

Example: Job 3 has a machining path length of 49.05 inchesand a work thickness of 2.5 inches. Linear machinespeed at this thickness is .05 inches per minute. Estimated setup time is 180 minutes.

Total job time is 49.05/.05 + 180 = 1161 minutes.

Page 6: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

6

The Problem:

0 0800 1600 2400

machine attended

0703 1730

Job # Setup Machine Process ProcessTime Time Time (min.) Time (hr.)

J1 180 981 1161 19.35J2 45 605 650 10.83J3 45 321 366 6.1J4 75 667 742 12.37J5 90 974 1064 17.73J6 75 636 711 11.85total 78.23 = 3.26 days

FCFS: 1 –2 –3 – 4 – 5 –6 Cmax = 7090 min. (4.9 days) and I = 2426 min.Optimal: 1 – 4 – 5 –3 – 6 – 2 ; Cmax = 4763 min. (3.3 days), I = 99 min.

Page 7: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

7

Scheduling on Parallel Machines

jobs

assumptions:1. any job can be processedon any machine.2. process time is identicalon each machine (i.e. they are identical machines).3. once a job is processed on amachine, it is completed.

Machine m

Machine 1

Machine 2

Page 8: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

8

List schedules

0. let Hi = 0, i=1,2,…,m be the assigned workload on machine i1. Assign job j to machine i: then H’i = Hi + tj

2. set Cj = H’i

3. once a job has been assigned to each machine, then assign thenext job to the machine having the smallest Hi.

Minimize Flowtime: Schedule jobs in ascending order of their processing times (SPT).

Minimize Makespan: Schedule jobs in descending order of their processing times (LPT).(good heuristic with bound given by Cmax (LPT) / C*max <= 4/3 – 1/(3m)

Page 9: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

9

Example Problem – FCFS (SPT)job 1 2 3 4 5 6 7 8time 1 3 4 5 6 10 10 11job 9 10 11 12 13 14 15time 12 13 13 14 16 18 19

m = 3Machine 1 Machine 2 Machine 3j tj Cj j tj Cj j tj Cj

1 1 1 2 3 3 3 4 44 6 7 5 9 12 6 10 147 10 17 8 11 23 9 12 2610 13 30 11 13 36 12 14 4013 16 46 14 18 54 15 19 59

F = 372 and makespan = 59

Page 10: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

10

More Example Problem - LPTjob 1 2 3 4 5 6 7 8time 1 3 4 5 6 10 10 11job 9 10 11 12 13 14 15time 12 13 13 14 16 18 19

m = 3Machine 1 Machine 2 Machine 3j tj Cj j tj Cj j tj Cj

15 19 19 14 18 18 13 16 1610 13 32 11 13 31 12 14 307 10 42 8 11 42 9 12 426 10 52 5 9 51 4 6 481 1 53 2 3 54 3 4 52

F = 582 and makespan = 54

Page 11: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

11

m = 3Machine 1 Machine 2 Machine 3j tj Cj j tj Cj j tj Cj

1 1 1 2 3 3 3 4 46 10 11 5 9 12 4 6 107 10 21 8 11 23 9 12 2210 13 34 11 13 36 12 14 3615 19 53 14 18 54 13 16 52

F = 372 and makespan = 54

Apply SPT to each machine:

Hey, that is pretty neat. You have minimized flowtime without the makespan getting larger. Will that always happen?

Page 12: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

12

Flow Shops

Machine 1

Machine 2

Machine m

jobs

… …

The two-machine problem: Johnson’s algorithmSchedule n jobs on two machines to minimize makespan or flowtime

The optimal schedule is always a permutation. Therefore, thereare n! alternates and the two machine problem is roughly of thesame order of difficulty as the single machine problem.

Page 13: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

13

2-job, 2-machine problem

Machine A

Machine B

Machine A

Machine B

Machine A

Machine B

Machine A

Machine B

1 2

1 2

2

2

2

1

1

1

2

2

2

1

1

1

Page 14: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

14

Non-permutation Schedules

Different job sequences occur on different machines.

Machine 1

Machine 2

Machine 3

2 4 3 1 5

5 1 3 2 4

4 2 3 5 1

Oh I get it. The job order is different on

each machine.

Page 15: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

15

The Two Machine ProblemTheorem: The optimal sequence of jobs is always the same on

both machines.

Machine 1

Machine 2

i

i

j

j

reverse i – j on either machine to decrease flowtimeMachine 1

Machine 2

i

j

j

i

Machine 1

Machine 2

j

i

i

j

Page 16: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

16

Johnson’s Algorithm (1954)Label machine 1 – A and machine 2 – B:

Rule: Job i precedes job i+1 if min {ti,A , ti+1,B} < min {ti+1,A ti,B}

1. List the values of ti,A and ti,B in two columns2. Find the smallest remaining time in the two columns.

a. If it appear in Col A, then schedule that job next.b. If it appears in Col B, then schedule that job just

prior to the previous last job3. Cross off the jobs as they are scheduled. Stop onceall jobs have been scheduled.

The twoMachineproblem

Page 17: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

17

Johnson’s Algorithm - Example

n =5 ; m = 2JobA B1. 5 22. 1 63. 9 74. 3 85. 10 4

2 14 53first: last

1

2

3 9

6 4

10 5

8 7

Cmax = 30

Page 18: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

18

Anybody can do two machines.

What about three? Bet you can’t do

three!

Page 19: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

19

The Three Machine Problem

If min ti,1 >= max ti,2 or min ti,3 >= max ti,2 convert to a 2-machine problem by setting

t’i,1 = ti,1 + ti,2 and t’i,2 = ti,2 + ti,3

If the middle machine is dominated by either the 1st or 3rd ,then it cannot cause a delay in the schedule.

A job starts on a machine as soon as the previous job onthe machine has completed or as soon as its operation on the previous machine has completed.

A permutation schedule is optimal in generalfor the 3-machine problem if the objective isto minimize makespan or total flowtime!

Page 20: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

20

The Three Machine Problem - Example

Job M1 M2 M3J1 5 3 9J2 7 2 5J3 4 3 7J4 8 4 3J5 6 2 2J6 7 0 8

min {ti,1; i = 1,6} = 4

max {ti,2; i = 1,6} = 4

Job M’1 M’2J1 8 12J2 9 7J3 7 10J4 12 7J5 8 4J6 7 8

Johnson’s algorithm:3 – 6 – 1 – 2 – 4 - 5

Page 21: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

21

m-machine Heuristics

1 21

' 'k m

i ij i ijj j l

t t and t t

The Cambell, Dudek, & Smith (CDS) heuristic:convert m-machine problem into a 2-machine problem.

1. set k = 1 and l = m and generate a Johnson schedule.2. set k = 2 and l = m-1 and repeat3. continue until k = m-1 and l = 2.4. the best of the m-1 schedules is used.

Page 22: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

22

m-machine Heuristics - Example

Job Machine 1 Machine 2 Machine 3 Machine 4J1 5 6 4 5J2 4 7 3 5J3 9 5 5 3J4 6 8 4 1

k = 1; m = 4

Job Machine 1 Machine 4J1 5 5J2 4 5J3 9 3J4 6 1

Johnson’s algorithm:2 – 1 – 3 – 4Cmax = 37

Page 23: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

Finding Cmax

23

  job2     job 1     job 3     job 4      start t2 finish start t1 finish start t3 finish start t4 finishMachine 1 0 4 4 4 5 9 9 9 18 18 6 24Machine 2 4 7 11 11 6 17 18 5 23 28 8 36Machine 3 11 3 14 17 4 21 23 5 28 33 4 37Machine 4 14 5 19 21 5 26 28 3 31 34 1 35

2 – 1 – 3 – 4Cmax = 37

Job M1 M2 M3 M4J1 5 6 4 5J2 4 7 3 5J3 9 5 5 3J4 6 8 4 1

Page 24: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

24

m-machine Heuristics - Example

Job Machine 1 Machine 2 Machine 3 Machine 4J1 5 6 4 5J2 4 7 3 5J3 9 5 5 3J4 6 8 4 1

k = 2; m = 3

Job M1/2 M3/4J1 11 9J2 11 8J3 14 8J4 14 5

Johnson’s algorithm:1 – 2 – 3 – 4Cmax = 37

Page 25: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

25

m-machine Heuristics - Example

Job Machine 1 Machine 2 Machine 3 Machine 4J1 5 6 4 5J2 4 7 3 5J3 9 5 5 3J4 6 8 4 1

k = 3; m = 2

Job M1/2/3 M2/3/4J1 15 15J2 14 15J3 19 13J4 18 13

Johnson’s algorithm:2 – 1 – 3 – 4Cmax = 37

Page 26: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

26

More m-machine Heuristics

Gupta’s algorithm:

1

1

1

1i im

ii im

if t te

if t t

1, 1 , , 1mini

i

k m i k i k

es

t t

permutation sequence determined by:s[1] >= s[2] >= … >= s[n]

Don’t let this happen to you!

I didn’t use theGupta heuristic.Now my makespanis too long!

Form a relationship which holds for Johnson’s algorithm (when m=2)

Page 27: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

27

Gupta’s Algorithm - Example

Job 1 2 3 4 5ti,1 6 4 3 9 5ti,2 8 1 9 5 6ti,3 2 1 5 8 6

s1 = -1/10; s2 = -1/2; s3 = 1/12; s4 = -1/13; s5 = 1/11

sequence: 5 – 3 – 4 – 1 –2 Cmax = 36

5 312

96

6 49 5 8

6 5 8 1

2734

36

se

t t

eif t t

if t t

jj

k mj k j k

j

j j m

j j m

RST|

min , ,

, ,

, ,

1 11

1

1

1

1

n s

Page 28: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

28

Job Shops

Machine A

Machine DMachine C

Machine B

Job 1

Job 2

(N!)M Sequences

Job 3

Page 29: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

29

Two-machine Job Shop

Jackson’s algorithm to minimize makespan:{A} – jobs processed only by machine A{B} – jobs processed only by machine B{AB} – jobs processed by machine A then B{BA} – jobs processed by machine B then A

rules for machine A:1. jobs in {AB} should precede jobs in {BA}2. jobs in {A} should precede jobs{BA}3. No {A} job should precede {AB} on machine A

therefore ordering for A: {AB}{A}{BA}

and ordering for B: {BA}{B}{AB}

Page 30: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

30

Jackson’s Algorithm

to determine the order within a set:

Machine A: {AB} jobs ordered by Johnson’s algorithm,then {A} in any order, followed by {BA} jobs in reverseJohnson’s order.

Machine B: {BA} jobs ordered by reverse Johnson’s algorithm,then {B} in any order, followed by {AB} jobs inJohnson’s order.

Page 31: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

31

Two-machine Job Shop - Example

1 2 3 4 5 6 7 8 9 10BA AB BA B A AB B BA BA AB3 1 11 0 3 9 0 8 13 28 10 13 1 0 8 6 10 6 6

Jobrouteti,1

t1,2

{A} = {5}; {B} = {4,7}; {AB} = {2,6,10}; {BA} = {1,3,8,9}

Machine A: {AB}Job 2 6 10ti,1 1 9 2ti.2 10 8 6

Johnson’s algorithm:2 – 10 - 6

Page 32: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

32

Two-machine Job Shop - Example1 2 3 4 5 6 7 8 9 10BA AB BA B A AB B BA BA AB3 1 11 0 3 9 0 8 13 28 10 13 1 0 8 6 10 6 6

Jobrouteti,1

t1,2

{BA}Job 1 3 8 9ti,1 3 11 8 13ti.2 8 13 10 6

Johnson’s algorithm:1 – 8 – 3 – 9reverse: 9 – 3 – 8 - 1

A: 2 – 10 – 6 – 5 – 9 – 3 – 8 – 1B: 9 – 3 – 8 – 1 – 4 – 7 – 2 – 10 – 6 Cmax = 67

{A} = {5}; {B} = {4,7}; {AB} = {2,10,6}; {BA} = {1,8,3,9}

Page 33: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

33

2-job, m-machine problemmachine

job a b c d total ordering1 2 5 3 2 12 a-b-c-d2 3 5 2 6 16 d-b-a-c

job 1

job 2

0 2 4 6 8 10 12 14

20

15

10

5

-

a b c d

c

a

b

d

a

b

c

d

. (12,16)

Page 34: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

34

Dispatching Rules

1. SPT

2. FCFS

3. MWKR – most work remaining

4. EDD

5. SLK (slack): s = d – tp – t (t is current time)

6. CR (critical ratio)

7. SLK/OP – slack to operations remaining

(d – tp – t ) / ( m – j + 1)

Schedule an operation as soon as possible. If more than one job waiting to be processed at the same machine, schedule the one with the best priority.

The Human Machine

Page 35: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

35

Results for Multiple MachinesParallel Machines• Use SPT (min flowtime) or LPT (min makespan)

Flow Shops• The optimal solution for scheduling n jobs on two machines is always a permutation

schedule (that is, jobs are done in the same order on both machines). (This is the basis for Johnson’s algorithm.)

• For three machines, a permutation schedule is still optimal if we restrict attention to total flow time only. Under rare circumstances, the two machine algorithm can be used to solve the three machine case.

• Use Cambell, Dudek, & Smith (CDS) or Gupta heuristic for n jobs, m machines

Job Shops• When scheduling n jobs on 2 machines, use Jackson’s algorithm• When scheduling two jobs on m machines, the problem can be solved by graphical

means.

Page 36: 1 Operation Scheduling- II The Multi-Machine Case Look! There are two machines

36

The scheduling but not the discussion ends…

Is not. Cambell, Dudek, & Smith (CDS) heuristic is better.

The Guptaalgorithm is best!