engineering management tidbits! © washington state university-20101 [email protected] james r. holt,...

15
© Washington State University -2010 1 Engineering Management Tidbits! [email protected] http:// www.engrmgt.wsu.edu / James R. Holt, Ph.D., PE Professor Engineering Management The Job Shop Game Solving the NP Complete Scheduling Problem

Upload: estefany-revill

Post on 14-Dec-2015

217 views

Category:

Documents


3 download

TRANSCRIPT

© Washington State University-2010 1

Engineering Management Tidbits!

[email protected]://www.engrmgt.wsu.edu/

James R. Holt, Ph.D., PEProfessor

Engineering Management

The Job Shop Game

Solving the NP Complete Scheduling Problem

© Washington State University-2010 2

What is a Job Shop?

• Say you have a shop that makes machine parts. Many, many types of machine parts. You could have 50-100 machines and produces 2000 different parts.

• Each part takes a different route through the machine shop using different machines in different order. Some are drilled first. Some are milled first. Some are cut, polished, ground. Others are not. Some are turned, taped, threaded. Some are not.

• Big parts take longer than small parts. Simple parts take shorter paths than complex parts.

• The algorithm to solve such a complex scheduling problems is called “NP complete.” That is, the number of computations needed to find the optimal schedule is estimated to be some number raised to the n power where n is the number of tasked to schedule. You could do the math or simulate the system to find an answer. But, it is faster to do the work than to calculate the optimal schedule.

• Operations Researchers love to talk about Job Shop schedules, but never solve them. I know, I’m one. So, I invented a Job Shop Game.

© Washington State University-2010 3

A Simple Job Shop

• Consider a simple shop with four operations: A, B, C, D and four products P1, P2, P3, P4.

• Each product flows through four processes but not the same ones or in the same order

A

D

B

C

In Out

P1

P2

P4

P3

P1 goes: A->B->C->D Out

P3 goes: A->C->D->B Out

P2 goes: B->C->B->D Out

P4 goes: A->B->B->C Out

© Washington State University-2010 4

The Job Shop Game

• Let’s use this simple Job Shop and develop our intuition about such processes.

• Here are some world wide web links to detailed instructions about playing this game: Video Instruction Instructions Playing Cards Blank Recording Sheets

(may look funny but prints fine)

• I’ll explain a bit about the game in the next few slides.

A

D

B

C

In Out

P1

P2

P4

P3

© Washington State University-2010 5

The Playing Cards

• Here is a typical order card. This one is for Product 4.

• On the left is the Routing path (first to A, then to B, and then return to B for a second operation, then to C and out).

• At the top is the Release Day line. On this line the Gate Keeper records the date the order was released to the shop floor.

• Each operation has a box to write the date their process was completed.

• Flow time is the last operation completion date minus release date.

© Washington State University-2010 6

The Four Product types

• There are four on one page at Playing Cards

• Print out 5+ copies of the Playing Card page for each game. Cut out the order cards. You should have at least 20 cards (equal numbers of P1, P2, P3, P4)

• For the first game, shuffle the 20 cards.

• We will be playing the game until all the order cards are processed (just short of 35 days for 20 cards).

© Washington State University-2010 7

The Play

• You need these people: Assign a Gate Keeper, a person for each operation (A, B, C, D) and a Recorder.(Hard to do alone, but you could)

• Each operation can perform a maximum of one operation per day. The operation is documented by writing the date in the appropriate Routing Box

• The Gate Keeper holds the shuffled stack of Order Cards. Each day, the Gate Keeper writes the day on the Release Day line and calls out loud the day (so the operations will know which number to write).

© Washington State University-2010 8

The Play

• After the operator writes a date in the Routing Box (or the Gate Keeper releases the Order Card) the order advances to the next operation where it waits for the next day (or longer) to be completed.

• The routing must be followed and each Order only receives one operation per day.

• Each operator can only write a number if they have an Order Card that needs their operation on that day.

• Sounds complicated, but its not. I’ll show you a couple of days.

A

B

C

DStart Finish

Product #1

A

B

C

D

Start

Finish

Product #2

A

B

C

DStart

Finish

Product #3

A

B

C

DStart

Finish

Product #4

© Washington State University-2010 9

The Play

Assume the first card in the shuffled deck is Product 2. As the play starts, the Gate Keeper calls out loud, “Day 1” and writes a “1”. No one else has work.

1

Assume the second card in the deck is Product 3. As the play starts, the Gate Keeper calls out loud, “Day 2” and writes a “2” on the Product 3 Card.

2 On Day 2, Operation B can work and writes a “2”.

2

“Day 3,” the Gate Keeper calls out and writes on a Product 1 Order Card.

3

On Day 3, both Operation C and A have work.

3

3

The Gate Keeper releases one card per day until the Order Cards are gone.

© Washington State University-2010 10

Calculating Flow Days

• On Day 5 (or maybe 6) the first job will finish and come to the recorder.

• The recorder subtracts the Release Day from the Last Operation to calculate the total flow days for the Product.

• Here, Product #4 was released on Day 4, finished A on day 5, finished first B on day 9, finished second B on day 10, finished C on day 12.

• The flow days then are 12-4=8days

• The flow days number is recorded on two charts

4

5

9

10

12

8

© Washington State University-2010 11

Record Keeper

On the left are two charts (turned to be on this page--so tilt your head).

The top chart (left most) is a scatter plot of the Day Released versus Flow days. There is one Order released each Day. Put an X for the flow days are for each completed order.

x

The second chart (right most) is a histogram of the number of times a particular flow day occurred. I’ll but an ‘x’ for the first 8 flow days. There will probably be many orders with 8 flow days

x

© Washington State University-2010 12

Traditional Results for Scatter Plot and Histogram (first Game)

2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 3617 18 19 20

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 3617 18 19 20

4

26

28

24

22

20

18

16

14

12

10

8

6

1

2

12

11

10

9

8

7

6

5

4

3

No.

of F

LOW

DAY

SN

o. o

f OR

DE

RS

FLOW DAYS (Distribution)

ORDERS (in Release Day sequence)

x

xx x

x

x

xx

x

x x

x

x

x

x

x

x

x

x

x

x

x xx

x x

x x

x x

x

x

x

x

x

x

x

x

x x

x

x x

x

x x x

x

x

x

x

x x

x

x

x

Notice the trend line. What would you forecast would you make for the order released on the 35th day?

Can you see how muchvariability there is in the number of flow days expected?

© Washington State University-2010 13

Second Game.Play again juggling the release order using the best schedule you can find.

• Play the Job Shop again

• This time, don’t shuffle the deck of Order Cards.

• Sit down and thoughtfully schedule the cards.

• Get all the best ideas from your group (Max of 10 min discussion).

• Sequence the Order cards to take advantage of your constraint.

• Now, with a better sequence (better than random), how well did your charts look? Much better? A bit Better? No Change?

• What was the difference in the final completion date? Did you finish sooner?

• What would you predict would be the flow days for a job released on Day 35?

• How confident would you be about your prediction?

© Washington State University-2010 14

Third GameDBR in the Job Shop

• Play the Job Shop Game one last time. This time use Drum-Buffer-Rope.

• The Drum is the B process. The Buffer is: “The Number of Days of Uncompleted Work released to the floor that is Awaiting B” wherever it is. You can try 5 days, 6 days or 7 days of work (you decide).

• The Rope is a choke on the Gate Keeper. Each day, the Gate Keeper assess how many products in process have empty Routing Boxes for B. Look at all WIP to find them. If the WIP of uncompleted B operations exceeds the ‘Buffer Size’, then NO NEW WORK IS RELEASED THAT DAY. If the number of B operations yet to be done, is less than ‘Buffer size’, then RELEASE WORK that day.

• This is scary! You are not releasing work to the floor a third of the time!

• Now, do your charts look any worse? Much better? A bit Better? No Change?

• What was the difference in the final completion date? Did you finish sooner?

• What would you predict would be the flow days for a job released on Day 35?

• How confident would you be about your prediction?

© Washington State University-2010 15

Washington State University’sEngineering Management Program

http://www.engrmgt.wsu.edu/

• Have fun with the Job Shop Game. There is lots to learn!

• There are versions for those who need variability and more complexity if you want them.

• More information is available at:http://www.wsu.edu/~engrmgmt/holt/

em530/2

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 3617 18 19 20

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 3617 18 19 20

4

26

28

24

22

20

18

16

14

12

10

8

6

1

2

12

11

10

9

8

7

6

5

4

3

No.

of F

LOW

DAY

SNo

. of O

RDER

S

FLOW DAYS (Distribution)

ORDERS (in Release Day sequence)

x

xx x

x x x x

x

x

xx

xx

x xx

x

xx

x xx x

xx

x x

x x

x

x

x

x

x

x

x

x

x x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

x

Keep Thinking!Dr Holt

Typical Results from DBR

Interactive Live Lectures over the Internet in the evenings Pacific Time Zone. See you there!