MGTSC 352 Lecture 23: Inventory Management Big Blue Congestion Management Introduction: Asgard Bank...

Preview:

Citation preview

MGTSC 352

Lecture 23: Inventory Management

Big Blue

Congestion ManagementIntroduction: Asgard Bank example

Simulating a queueTypes of congested systems, queueing template

BigBluePills, Inc.

• Expensive drug treatments• Perishable – last only 3 months• Order once every 3 months• Regular cost: $400 per treatment• If demand > order size, place rush order• Rush cost: $1,000 per treatment• Price to patient: $650• How much should they order?

Pg. 161

Single period models

• Perishable product

• Past demand data

• Must decide how much to order before knowing actual demand for the period

• Must live with the consequences

• We’ve seen this before: it’s called the “newsvendor problem”

Five Years of Demand DataAverage 18.00

Stdev 6.66 min 5.00

max 34.00

Category bin Frequency<=5 5 1

6 - 10 10 311 - 15 15 316 - 20 20 521 - 25 25 626 - 30 30 1> 30 1

01234567

<=56 - 10

11 - 1516 - 2021 - 2526 - 30> 30

Quarterly demand

Frequency

Solution 1

• Average demand = 18, so …– … let’s order 18 each quarter– Profit = 18 (650 – 400) = $4,500– Right?

• Q < D lose ? / unit

• Q > D lose ? / unit

• Do these cancel out on average?

Tradeoffs

• Q > D wasted product– Lose $400 – On product bought but not sold

• Q < D loss on Sale– Lose $1000 - $650 = $350 – On Rush order (no lost sales)

• If order = average demand each outcome will occur half the time.

• Is that what you want?

Solution 2: simulation

-$10,000

-$8,000

-$6,000

-$4,000

-$2,000

$-

$2,000

$4,000

$6,000

$8,000

5 10 15 20 25 30 35 40 45

Order size

Average profit

5th percentile

95th percentile

Solution 1 predicted this profit with Q = 18

The Flaw of Averages

When input is uncertain...

output given average input

may not equal

the average output

Huh?

• Average BigBluePill demand = 18

• Profit for Q = 18, given D = 18: $4,500

• Average profit with Q = 18: $1,740– Less than half

• Optimal Q = 20, with avg. profit: $1,786• Using avg. demand (ignoring variability)

• Seriously overestimates profit • Results in a suboptimal decision

How bad can it get?

• What if rush cost is $1,800 (instead of $1,000)

• The “averaging analyst” will still recommend Q = 18 and estimate P = $4,500.

• The actual profit with Q = 18 will be -$565.

• Using Q = 20 generates P = $1,217

• Using average inputs is a bad idea. “How bad” will depend on data.

In general

Profit(AVERAGE(Demand1, Demand2, …, Demandn))

AVERAGE(Profit(Demand1), Profit(Demand2), …, Profit(Demandn))

Simple example of the flaw of averages:

• A drunk on a highway

• Random walk

Consider the drunk’s condition

• The AVERAGE location of the drunk– Middle of the road

• The outcome at the middle of the road

ALIVE

• What do you think the average outcome for the drunk is?

DEAD

Average inputs do not result in average outputs.

Congestion

Asgard Bank ATM

Pg. 168

Asgard Bank: Times Between Arrivals

(pg. 173)

0

10

20

30

40

50

60

70

0.00 - 0.250.25 - 0.500.50 - 0.750.75 - 1.001.00 - 1.251.25 - 1.501.50 - 1.751.75 - 2.002.00 - 2.252.25 - 2.502.50 - 2.752.75 - 3.003.00 - 3.253.25 - 3.503.50 - 3.753.75 - 4.00

> 4.00

Time between Arrivals (min.)

Frequency

Average = 1.00 min.St. dev. = 0.92 min.Arrival rate = λ = ?

pg. 168

Asgard Bank: Arrival Rate

• Given: avg. time between arrivals = 1.00 minute• average arrival rate per hour

= λ = ?

Asgard Bank: Service Times

0

10

20

30

40

50

60

70

80

0.00 - 0.100.20 - 0.300.40 - 0.500.60 - 0.700.80 - 0.901.00 - 1.101.20 - 1.301.40 - 1.501.60 - 1.701.80 - 1.902.00 - 2.102.20 - 2.302.40 - 2.502.60 - 2.702.80 - 2.903.00 - 3.103.20 - 3.303.40 - 3.503.60 - 3.703.80 - 3.90Duration of Service (min.)

Frequency

Average = 0.95 min. (57 sec.)St. dev. = 0.17 min. (10 sec.)

service rate = μ = ?

Asgard Bank: Service Rate

• Given: avg. service time = 0.95 minutes• average service rate per hour

(if working continuously)= μ =

• Note: – the service rate is not the rate at which customers are

served– it’s the rate at which customers could be served, if

there were enough customers– service rate = capacity of a server

Asgard Bank – Collecting Data

Customer numberArrival timeInter-arrival timeService startsService endsService timeTime in systemWaiting time1 0.00 0.00 0.50 0.50 0.50 0.002 2.00 2.00 2.00 2.25 0.25 0.25 0.003 2.00 0.00 2.25 3.00 0.75 1.00 0.254 2.75 0.75 3.00 3.25 0.25 0.50 0.255 3.25 0.50 3.25 3.75 0.50 0.50 0.006 3.80 0.55 3.80 4.00 0.20 0.20 0.007 3.90 0.10 4.00 4.20 0.20 0.30 0.108 3.90 0.00 4.20 4.50 0.30 0.60 0.309 3.90 0.00 4.50 5.00 0.50 1.10 0.60

10 5.20 1.30 5.20 5.50 0.30 0.30 0.00

Real system:

• Record arrival time, service start, service end

• Compute inter-arrival times, service times, waiting time, time in system

Simulating the system:

• Simulate inter-arrival times, service times

• Compute arrival time, service start, service end, time in system, waiting time

Why Do Customers Wait?

Given:Average inter-arrival time = 1.00 min.Average service time = 0.95 min.

0.95

Customer arrives and begins service

Customer leavestimeNext customer arrives

and begins service

What’s missing from this picture?

What’s missing from this Picture?

VARIABILITY!

Including Randomness: Simulation• Service times:

Normal distribution,

mean = 57/3600 of an hour

stdev = 10/3600 of an hour

MAX(NORMINV(RAND(),57/3600,10/3600),0)

• Inter-arrival times:Exponential distribution,

mean = 1/ 60 of an hour.

(1/60)*LN(RAND())To Excel …

0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00

1

11

21

31

41

51

61

Customer number

Time (hours)

Waiting time

Service time

Press F9 to recalculate

Simulated Lunch Hour 1:

71 arrivals

0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00

1

11

21

31

41

51

61

Customer number

Time (hours)

Waiting time

Service time

Press F9 to recalculate

Simulated Lunch Hour 2:

50 arrivals

0.00 0.10 0.20 0.30 0.40 0.50 0.60 0.70 0.80 0.90 1.00

1

11

21

31

41

51

61

Customer number

Time (hours)

Waiting time

Service time

Press F9 to recalculate

Simulated Lunch Hour 3:

Unused capacity

Causes of Congestion

• Higher than average number of arrivals

• Lower than average service capacity

• Lost capacity due to timing

Lesson: For a service where customers arrive randomly, it is not a good idea to operate the system close to its average capacity

Anatomy of a Congested System (pg. 172)

waiting room =

queue

potential customers parallel servers

Notation: M/M/s/K/N

1. Inter-arrival time distribution2. Service time distribution

• M = exponential distribution• G = general distribution

3. s = number of servers4. K = max. # of customers allowed in system

• being served + waiting

5. N = population size• K and N are left out when they are infinite

Types of Congested Systems We Will Analyze (pg. 173)

Type Service time dist’n

Inter-arrival time

dist’n

# of servers

# that can wait

# of potential

customers

M/M/s Exponential exponential s

M/M/s/s+C exponential exponential s C

Finite Population

exponential exponential s M

M/G/1 general exponential 1

Analyzing a Congested System (pg. 174)

System Description

Measures of Quality of Service

Measures important to Servers

Model of the System

Inputs

Outputs

System Description

λ μ (mu) = service rate (per server per time unit) (lambda) = arrival rate (per time unit) s = number of servers C = maximum number that can wait in line

= queue capacity

M = number of potential customers

S (sigma sub S) = standard deviation of service times

Measures of Quality of Service

Wq = average time in queue

W = average time in system

Lq = average number of customers in queue

L = average number of customers in system

SL = service level = fraction of customers that wait less than some given amount of time

PrBalk = fraction of customers that balk (do not enter system)

PrWait = fraction of customers that wait

Measures Important to Servers

(rho) = utilization = fraction of time each server is busy

And now the formulas for the simplest case: M / M / 1

Or would you prefer an Excel template?

Template.xls

• Does calculations for– M/M/s– M/M/s/s+C– M/M/s//M– M/G/1

• Want to know more? Go to http://www.bus.ualberta.ca/aingolfsson/qtp/

• Asgard Bank Data– Model: M/G/1– Arrival rate: 1 per minute– Average service time: 57/60 min.– St. dev of service time: 10/60 min.

Asgard Conclusions

• The ATM is busy 95% of the time.

• Average queue length = 9.3 people

• Average no. in the system = 10.25 (waiting, or using the ATM)

• Average wait = 9.3 minutes

• What if the arrival rate changes to …– 1.05 / min.?– 1.06 / min.?

Recommended