You are on page 1of 118

Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.

com
1
The EOQ Model
To a pessimist, the glass is half empty.
to an optimist, it is half full.
Anonymous
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
2
EOQ History
Introduced in 1913 by Ford W. Harris, How Many
Parts to Make at Once

Interest on capital tied up in wages, material and
overhead sets a maximum limit to the quantity of parts
which can be profitably manufactured at one time;
set-up costs on the job fix the minimum. Experience
has shown one manager a way to determine the
economical size of lots.

Early application of mathematical modeling to
Scientific Management
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
3
MedEquip Example
Small manufacturer of medical diagnostic equipment.
Purchases standard steel racks into which components are
mounted.
Metal working shop can produce (and sell) racks more cheaply if
they are produced in batches due to wasted time setting up shop.
MedEquip doesnt want to tie up too much precious capital in
inventory.


Question: how many racks should MedEquip order at once?
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
4
EOQ Modeling Assumptions
1. Production is instantaneous there is no capacity constraint and
the entire lot is produced simultaneously.
2. Delivery is immediate there is no time lag between production
and availability to satisfy demand.
3. Demand is deterministic there is no uncertainty about the
quantity or timing of demand.
4. Demand is constant over time in fact, it can be represented as a
straight line, so that if annual demand is 365 units this translates
into a daily demand of one unit.
5. A production run incurs a fixed setup cost regardless of the size
of the lot or the status of the factory, the setup cost is constant.
6. Products can be analyzed singly either there is only a single
product or conditions exist that ensure separability of products.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
5
Notation
D demand rate (units per year)

c unit production cost, not counting setup or inventory costs
(dollars per unit)

A fixed or setup cost to place an order (dollars)

h holding cost (dollars per year); if the holding cost is consists
entirely of interest on money tied up in inventory, then h = ic
where i is an annual interest rate.

Q the unknown size of the order or lot
decision variable
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
6
Inventory vs Time in EOQ Model
Q/D 2Q/D 3Q/D 4Q/D
Q
Inventory
Time
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
7
Costs
Holding Cost:





Setup Costs: A per lot, so


Production Cost: c per unit

Cost Function:
D
hQ
hQ
Q
2
cost holding unit
2
cost holding annual
2
inventory average
=
=
=
Q
A
= cost setup unit
c
Q
A
D
hQ
Q Y + + =
2
) (
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
8
MedEquip Example Costs
D = 1000 racks per year
c = $250
A = $500 (estimated from suppliers pricing)
h = (0.1)($250) + $10 = $35 per unit per year
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
9
Costs in EOQ Model
0.00
2.00
4.00
6.00
8.00
10.00
12.00
14.00
16.00
18.00
20.00
0 100 200 300 400 500
Order Quantity (Q)
C
o
s
t

(
$
/
u
n
i
t
)
hQ/2D
A/Q
c
Y(Q)
Q*=169
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
10
Economic Order Quantity
2
2
2
*
2 3
*
( ) 2 2
0
2
( ) 2
0, 0 is a minimum.
2
dY Q h A AD AD
Q Q
dQ D Q h h
d Y Q A
Q Q
dQ Q
AD
Q
h
= = = =
> = >
=
169
35
) 1000 )( 500 ( 2
*
= = Q MedEquip Solution
EOQ Square
Root Formula
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
11
EOQ Modeling Assumptions
1. Production is instantaneous there is no capacity
constraint and the entire lot is produced simultaneously.
2. Delivery is immediate there is no time lag between production and
availability to satisfy demand.
3. Demand is deterministic there is no uncertainty about the quantity
or timing of demand.
4. Demand is constant over time in fact, it can be represented as a
straight line, so that if annual demand is 365 units this translates into a
daily demand of one unit.
5. A production run incurs a fixed setup cost regardless of the size of
the lot or the status of the factory, the setup cost is constant.
6. Products can be analyzed singly either there is only a single
product or conditions exist that ensure separability of products.
relax via
EPL model
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
12
Notation EPL Model
D demand rate (units per year)

P production rate (units per year), where P>D

c unit production cost, not counting setup or inventory costs
(dollars per unit)

A fixed or setup cost to place an order (dollars)

h holding cost (dollars per year); if the holding cost is consists
entirely of interest on money tied up in inventory, then h = ic
where i is an annual interest rate.

Q the unknown size of the production lot
decision variable
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
13
Inventory vs Time in EPL Model
Inventory
Time
D
P D
Production run of Q takes Q/P time units
(P D)(Q/P)
(P D)(Q/P)/2
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
14
Solution to EPL Model
Annual Cost Function:





Solution (by taking derivative and setting equal to zero):


1
( )
2
D
h Q
AD
P
Y Q Dc
Q
| |

|
\ .
= + +
setup holding production
2
*
1
AD
Q
D
h
P
=
| |

|
\ .
tends to EOQ as P

otherwise larger than EOQ
because replenishment
takes longer
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
15
What If We Allow Up To B Backorders in EOQ Model?
Q/D 2Q/D 3Q/D 4Q/D
Q B
Inventory
Time
0
B
D
Q B
D
B
D
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
16
Notation for EOQ with Backorders
D demand rate (units per year)
c unit production cost (dollars per unit)
A fixed or setup cost to place an order (dollars)
h holding cost (dollars per year)
b backorder cost (dollars per year)
Q the unknown size of the order or lot
B the unknown maximum number of backorders
decision variable
decision variable
Annual Cost Function:
( )
2
2
( , )
2 2
Q B
D B
Y Q B A h b Dc
Q Q Q

= + + +
setup holding production shortage
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
17
Solution to EOQ with Backorders Model
Solution (by taking derivatives and setting both equal to zero):


2 2
2 2 2
2
2
2 2
2
2
0 ( , ) 0 ( , )
2 2
1
2
2 2
1
2 2
2
2
2
2 1 1
2
1
Y Q B Y Q B
Q B
h B bB
h B AD bB
Q Q
Q Q Q
h b
h h b
B h
B AD
Q
Q
h
h b AD
B Q
Q B
h b
h h
h h b AD
Q
h b h h
h AD
Q
h b h
AD
AD
h h b
h
h b
c c
= =
c c
| |
| |
= +
= |
|
\ .
\ .
+
+
| |
=
= +
|
\ .
+
=
= +
+
+
| |
= +
|
+
\ .
= +
+
| |
= = +
|
| |
\ .

|
+
\ .
*
* *
1 1
2 Q AD
h b
h
B Q
h b
| |
= +
|
\ .
=
+
As b ,
Q
*
tends to EOQ
and
B
*
tends to 0
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
18
The Key Insight of EOQ
There is a trade-off between lot size and inventory

Order Frequency:


Inventory Investment:
F
cD cQ
I
2 2
= =
Q
D
F =
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
19
EOQ Tradeoff Curve
0
5
10
15
20
25
30
35
40
45
50
0 20 40 60 80 100
Order/Year
I
n
v
e
n
t
o
r
y

I
n
v
e
s
t
m
e
n
t
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
20
Sensitivity of EOQ Model to Quantity
Optimal Unit Cost:









Optimal Annual Cost: Multiply Y* by D and simplify,

*
* *
*
( )
2
2
2
2
2
hQ A
Y Y Q
D Q
h AD h
A
D
AD h
Ah
D
= = +
= +
=
ADh 2 Cost Annual =
We neglect
unit cost c,
since it does
not affect Q*
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
21
Sensitivity of EOQ Model to Quantity (cont.)
Annual Cost from Using Q':



Ratio:



Example: If Q' = 2Q*, then the ratio of the actual to optimal cost is

(1/2)[2 + (1/2)] = 1.25

Q
AD Q h
Q Y
'
+
'
=
'
2
) (
(

'
+
'
=
'
+
'
=
'
=
'
Q
Q
Q
Q
ADh
Q AD Q h
Q Y
Q Y
Q
Q
*
* * *
2
1
2
2
) (
) (
) ( Cost
) ( Cost
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
22
Sensitivity of EOQ Model to Order Interval
Order Interval: Let T represent time (in years) between orders
(production runs)


Optimal Order Interval:


D
Q
T =
hD
A
D
h
AD
D
Q
T
2
2
*
*
= = =
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
23
Sensitivity of EOQ Model to Order Interval (cont.)
Ratio of Actual to Optimal Costs: If we use T' instead of T*




Powers-of-Two Order Intervals: The optimal order interval,
T
*
must lie within a multiplicative factor of \2 of a
power-of-two. Hence, the maximum error from using
the best power-of-two is

(

'
+
'
=
'
T
T
T
T
T
T
*
* *
2
1
under cost annual
under cost annual
1 1
2 1.06
2
2
(
+ ~
(

Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
24
The Root-Two Interval
*
1
T
2 2
m
*
2
T
m
2
1
2
+ m
divide by
less than
\2 to get
to 2
m

multiply by
less than
\2 to get
to 2
m+1

Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
25
MedEquip Example
Optimum: Q*=169, so T*=Q*/D =169/1000 = 0.169 years = 62 days



Round to Nearest Power-of-Two: 62 is between 32 and 64, but since
32\2=45.25, it is closest to 64. So, round to T=64 days or Q=
TD=(64/365)1000=175.
916 , 5 $
169
) 1000 ( 500
2
) 169 ( 35
* 2
*
*) ( = + = + =
Q
AD hQ
Q Y
920 , 5 $
175
) 1000 ( 500
2
) 175 ( 35
' 2
'
) ' ( = + = + =
Q
AD hQ
Q Y
Only 0.07% error because we were lucky and happened to
be close to a power of two. But we cant do worse than 6%.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
26
Powers-of-Two Order Intervals
0
2 1=
0 1 2 3 4 5 6 7 8
1
2 2 =
2
2 4 =
3
2 8 =
Order Interval Week
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
27
Powers-of-Two Computation Process
*
*
*
*
2
1. Compute the optimal order quantity (number of units): .
2
2. Compute the optimal order interval (years between orders): .
3. Express in the smallest possible distinct delivery time un
AD
Q
h
Q A
T
D hD
T
=
= =
( )
*
2
its (typically days).
4. Compute log .
5. Round to the nearest integer .
6. Compute the power-of-two order interval (days between orders): 2 .
7. Express in years.
8. Compute the power-of-two order
m
T
m
T
T

=
' =
'
quantity (number of units): .
9. Round up to an integer.
Q T D
Q
' '
=
'
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
28
Example
Given the data below for three products (with a carrying charge
of 0.2 $/unit/yr), and assuming that a delivery is possible every
day (assume 365 days per year), what would be the order
quantities for each product using the power-of-two policy?

In addition to the individual setup cost, there is also a $2,000
truck cost that can be shared between products if they are
ordered at the same time.
Product

Annual demand

Individual setup cost

Unit cost

X

200,000

$1,200

$20

Y

1,000,000

$1,100

$30

Z

180,000

$1,120

$50

Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
29
EOQ Takeaways
Batching causes inventory (i.e., larger lot sizes translate
into more stock).

Under specific modeling assumptions the lot size that
optimally balances holding and setup costs is given by the
square root formula:


Total cost is relatively insensitive to lot size (so rounding
for other reasons, like coordinating shipping, may be
attractive).
h
AD
Q
2
*
=
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
30
The Wagner-Whitin Model
Change is not made without inconvenience,
even from worse to better.
Robert Hooker
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
31
EOQ Assumptions
1. Instantaneous production.

2. Immediate delivery.

3. Deterministic demand.

4. Constant demand.

5. Known fixed setup costs.

6. Single product or separable products.
WW model relaxes this one
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
32
Dynamic Lot Sizing Notation
t a period (e.g., day, week, month); we will consider t = 1, ,T,
where T represents the planning horizon

D
t
demand in period t (in units)

c
t
unit production cost (in dollars per unit), not counting setup or
inventory costs in period t

A
t
fixed setup cost (in dollars) to place an order in period t

h
t
holding cost (in dollars) to carry a unit of inventory from period t to
period t +1

Q
t
the unknown size of the order or lot size in period t
decision
variables
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
33
Wagner-Whitin Example
Data





Lot-for-Lot Solution




t 1 2 3 4 5 6 7 8 9 10
D
t
20 50 10 50 50 10 20 40 20 30
c
t
10 10 10 10 10 10 10 10 10 10
A
t
100 100 100 100 100 100 100 100 100 100
h
t
1 1 1 1 1 1 1 1 1 1


t 1 2 3 4 5 6 7 8 9 10 Total
D
t
20 50 10 50 50 10 20 40 20 30 300
Q
t
20 50 10 50 50 10 20 40 20 30 300
I
t
0 0 0 0 0 0 0 0 0 0 0
Setup cost 100 100 100 100 100 100 100 100 100 100 1000
Holding cost 0 0 0 0 0 0 0 0 0 0 0
Total cost 100 100 100 100 100 100 100 100 100 100 1000
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
34
Wagner-Whitin Example (cont.)
Fixed Order Quantity Solution
t 1 2 3 4 5 6 7 8 9 10 Total
D
t
20 50 10 50 50 10 20 40 20 30 300
Q
t
100 0 0 100 0 0 100 0 0 0 300
I
t
80 30 20 70 20 10 90 50 30 0 0
Setup cost 100 0 0 100 0 0 100 0 0 0 300
Holding cost 80 30 20 70 20 10 90 50 30 0 400
Total cost 180 30 20 170 20 10 190 50 30 0 700


Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
35
Wagner-Whitin Property
Under an optimal lot-sizing policy
either the inventory carried to period t
from a previous period will be zero
or the production quantity in period t
will be zero.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
36
Basic Idea of Wagner-Whitin Algorithm
By WW Property I, either Q
t
=0 or Q
t
=D
t
++D
k
for some k > t.

If j
k
*
= last period of production in a k-period problem

then we will produce exactly D
j
k
*
++D
k
in period j
k
*
.

We can then consider periods 1, , j
k
*
1
as if they form an independent problem with j
k
*
1 periods.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
37
Wagner-Whitin Example
Step 1: Obviously, just satisfy D
1
(note we are neglecting
production cost, since it is fixed).


Step 2: Two choices, either j
2
*
= 1 or j
2
*
= 2.
1
100
*
1
1
*
1
=
= =
j
A Z
1
150
200 100 100
150 ) 50 ( 1 100
min
2 in produce , Z
1 in produce ,
min
*
2
2
*
1
2 1 1 *
2
=
=

= +
= +
=

+
+
=
j
A
D h A
Z
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
38
Wagner-Whitin Example (cont.)
Step 3: Three choices, j
3
*
= 1, 2, 3.
1
170
250 100 150
210 10 ) 1 ( 100 100
170 10 ) 1 1 ( ) 50 ( 1 100
min
3 in produce , Z
2 in produce , Z
1 in produce , ) (
min
*
3
3
*
2
3 2 2
*
1
3 2 1 2 1 1
*
3
=
=

= +
= + +
= + + +
=

+
+ +
+ + +
=
j
A
D h A
D h h D h A
Z
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
39
Wagner-Whitin Example (cont.)
Step 4: Four choices, j
4
*
= 1, 2, 3, 4.
4
270
270 100 170
300 50 ) 1 ( 100 150
310 50 ) 1 1 ( 10 ) 1 ( 100 100
320 50 ) 1 1 1 ( 10 ) 1 1 ( ) 50 ( 1 100
min
4 in produce , Z
3 in produce , Z
2 in produce , ) ( Z
1 in produce , ) ( ) (
min
*
4
4
*
3
4 3 3
*
2
4 3 2 3 2 2
*
1
4 3 2 1 3 2 1 2 1 1
*
4
=
=

= +
= + +
= + + + +
= + + + + + +
=

+
+ +
+ + + +
+ + + + + +
=
j
A
D h A
D h h D h A
D h h h D h h D h A
Z
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
40
Planning Horizon Property
If j
t
*
= k, then the last period in which production occurs in an
optimal t+1 period policy must be in the set k, k+1,t+1.

In the Example:

We produce in period 4 for period 4 of a 4-period
problem.
Thus, we would never produce in period 3 for period 5
in a 5-period problem.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
41
Wagner-Whitin Example (cont.)
Step 5: Only two choices, j
5
*
= 4, 5.










Step 6: Three choices, j
6
*
= 4, 5, 6.

And so on.
4
320
370 100 270
320 ) 50 ( 1 100 170
min
5 in produce , Z
4 in produce ,
min
*
5
5
*
4
5 4 4
*
3 *
5
=
=

= +
= + +
=

+
+ +
=
j
A
D h A Z
Z
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
42
Produce in period
8 for 8, 9, 10
(40 + 20 + 30
= 90 units)
Produce in period
4 for 4, 5, 6, 7
(50 + 50 + 10 + 20
= 130 units)
Produce in period
1 for 1, 2, 3
(20 + 50 + 10
= 80 units)
Wagner-Whitin Example Solution
Planning Horizon (t) Last Period
with Production
1 2 3 4 5 6 7 8 9 10
1 100 150 170 320
2 200 210 310
3 250 300
4 270 320 340 400 560
5 370 380 420 540
6 420 440 520
7 440 480 520 610
8 500 520 580
9 580 610
10 620
Zt 100 150 170 270 320 340 400 480 520 580
jt 1 1 1 4 4 4 4 7 7 or 8 8
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
43
Wagner-Whitin Example Solution (cont.)
Optimal Policy:
Produce in period 8 for 8, 9, 10 (40 + 20 + 30 = 90 units)
Produce in period 4 for 4, 5, 6, 7 (50 + 50 + 10 + 20 = 130 units)
Produce in period 1 for 1, 2, 3 (20 + 50 + 10 = 80 units)
t 1 2 3 4 5 6 7 8 9 10 Total
D
t
20 50 10 50 50 10 20 40 20 30 300
Q
t
80 0 0 130 0 0 0 90 0 0 300
I
t
60 10 0 80 30 20 0 50 30 0 0
Setup cost 100 0 0 100 0 0 0 100 0 0 300
Holding cost 60 10 0 80 30 20 0 50 30 0 280
Total cost 160 10 0 180 30 20 0 150 30 0 580


Note: we produce in 7 for an 8-period problem, but this
never comes into play in optimal solution.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
44
Problems with Wagner-Whitin
1. Fixed setup costs.

2. Deterministic demand and production (no uncertainty)

3. Never produce when there is inventory (WW Property I).
safety stock (don't let inventory fall to zero)
random yields (cant produce for exact number of
periods)
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
45
Statistical Reorder Point Models
When your pills get down to four,
Order more.
Anonymous, from Hadley & Whitin
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
46
EOQ Assumptions
1. Instantaneous production.

2. Immediate delivery.

3. Deterministic demand.

4. Constant demand.

5. Known fixed setup costs.

6. Single product or separable products.
WW model relaxes this one
newsvendor and (Q, r) relax this one
can use constraint approach
Chapter 17 extends (Q, r)
to multiple product cases
lags can be added to EOQ or other models
EPL model relaxes this one
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
47
Modeling Philosophies for Handling Uncertainty
1. Use deterministic model, then adjust solution
- EOQ to compute order quantity, then add safety stock
- deterministic scheduling algorithm, then add safety lead time

2. Use stochastic model
- news vendor model
- base stock and (Q,r) models
- variance-constrained investment models
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
48
The Newsvendor Approach
Assumptions:
1. single period
2. random demand with known distribution
3. linear overage/shortage costs
4. minimum expected cost criterion

Examples:
newspapers or other items with rapid obsolescence
Christmas trees or other seasonal items
capacity for short-life products
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
49
Newsvendor Model Notation
demand (in units), a random variable.
( ) ( )
cumulative distribution function of demand
(assumed continuous.)
( ) ( )
probability density function of demand.
cost (in dollars) per unit le
o
X
G x P X x
d
g x G x
dx
c
=
= s
=
=
=
= ft over after demand is realized.
cost (in dollars) per unit of shortage.
production or order quantity (in units), the decision variable.
s
c
Q
=
=
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
50
Newsvendor Model
Cost Function:





| | | |
{ } { }
0 0
0
( ) expected overage expected shortage cost
units over units short
max , 0 ( ) max , 0 ( )
( ) ( ) ( ) ( )
o s
o s
Q
o s
Q
Y Q
c E c E
c Q x g x dx c x Q g x dx
c Q x g x dx c x Q g x dx

= +
= +
= +
= +
} }
} }
Note: for any given day, we will
be either over or short, not both.
But in expectation, overage and
shortage can both be positive.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
51
Newsvendor Model (cont.)
( )
( )
| |
( )
0
0
0 ( )
( ) ( )
( ) ( )
1 ( ) 0
1 ( ) 0
( ) 1 ( )
( )
Q
o
s
Q
Q
o
s
Q
o s
o s s
d
Y Q
dQ
d
c Q x g x dx
dQ
c x Q g x dx
c g x dx
c g x dx
c G Q c G Q
c c G Q c

(
+
(

(
=
(

(
+
(

=
= +
}
}
}
}
Optimal Solution: taking the derivative of Y(Q) with respect to Q,
setting it equal to zero, and solving yields:
( )
( )
( )
( )
( )
( )
( ) ( ) ( )
( ) ( ) ( )
2
1
2
1
1 1
2 2
Leibnitz's Rule:
,
,
,
,
f Q
f Q
f Q
f Q
d
f Q x dx
dQ
f Q x dx
Q
d
f Q f Q f Q
dQ
d
f Q f Q f Q
dQ

( c

(
c

}
}
{ }
* *
( )
s
o s
c
G Q P X Q
c c
= s =
+
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
52
Newsvendor Model (cont.)
Notes:

{ }
s o
s
c c
c
Q X P Q G
+
= s =
* *
) (
s
o
c Q
c Q
|
+
*
*
Critical Ratio is
probability stock
covers demand
G(Q)
1
s o
s
c c
c
+
Q*
Q
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
53
Newsvendor Example T Shirts
Scenario:
Demand for T-shirts is exponential with mean 1000,
so G(x) = P(X s x) = 1 e
x/1000
.
(Note: this is an odd demand distribution;
Poisson or Normal would probably be better modeling choices.)
Cost of shirts is $10.
Selling price is $15.
Unsold shirts can be sold off at $8.

Model Parameters:
c
s
= 15 10 = $5
c
o
= 10 8 = $2
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
54
Newsvendor Example T Shirts (cont.)
Solution:




Sensitivity: If c
o
= $10 (i.e., shirts must be discarded) then

1000
*
5 5
( ) 1 0.714
2 5 7
5
1000ln 1 1, 253
7
Q
s
o s
c
G Q e
c c
Q

= = = = =
+ +
| |
= ~
|
\ .
1000
*
5
( ) 1 0.333
10 5
405
Q
s
o s
c
G Q e
c c
Q

= = = =
+ +
~
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
55
Note: Q* increases in both
and o if z is positive (i.e.,
if ratio is greater than 0.5).
Newsvendor Model with Normal Demand
Suppose demand is normally distributed with mean and
standard deviation o. Then the critical ratio formula
reduces to:
o
o

o

z Q
c c
c
z z
Q
c c
c Q
Q G
s o
s
s o
s
+ =
+
= u =

+
= |
.
|

\
|
u =
*
) ( where
*
*
) (
*
z 0
0.00
3.00
1 7 13 19 25 31 37 43 49 55 61 67 73 79 85 91 97 103 109 115 121 127 133 139 145 151 157
u(z)
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
56
Multiple Period Problems
Difficulty: Technically, the Newsvendor model is for a single period.

Extensions: However, the Newsvendor model can be applied to
multiple period situations, provided:
demand during each period is iid, distributed according to G(x)
there is no setup cost associated with placing an order
stockouts are either lost or backordered

Key: make sure c
o
and c
s
appropriately represent
overage and shortage cost.

Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
57
Example
Scenario:
GAP orders a particular clothing item every Friday
mean weekly demand is 100, standard deviation is 25
wholesale cost is $10, retail is $25
holding cost has been set at $0.5 per week (to reflect
obsolescence, damage, etc.)

Problem: how should they set order amounts?

Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
58
Example (cont.)
Newsvendor Parameters:
c
o
= $0.5
c
s
= $15
Solution:

( )
*
*
*
15
( ) 0.9677
0.5 15
100
0.9677 1.85
25
100 1.85(25) 146.25 146
G Q
Q
z z
Q
= =
+

u = = =
= + = ~
Every Friday, they
should order up to
146, that is, if there
are x on hand, then
order 146x.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
59
Newsvendor Takeaways
Inventory is a hedge against demand uncertainty.

Amount of protection depends on overage and
shortage costs, as well as distribution of demand.

If shortage cost exceeds overage cost, optimal order
quantity generally increases in both the mean and
standard deviation of demand.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
60
The (Q,r) Approach
Assumptions:
1. Continuous review of inventory.
2. Demands occur one at a time.
3. Unfilled demand is backordered.
4. Replenishment lead times are fixed and known.

Decision Variables:
Reorder Point: r affects likelihood of stockout (safety stock).
Order Quantity: Q affects order frequency (cycle inventory).
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
61
Inventory vs Time in (Q,r) Model
Q
Inventory
Time
r
l
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
62
Base Stock Model Assumptions
1. There is no fixed cost associated with placing an order.

2. There is no constraint on the number of orders that can
be placed per year.


That is, we can replenish
one at a time (Q = 1).
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
63
Base Stock Notation
Q = 1, order quantity (fixed at one)
r = reorder point
R = r +1, base stock level
l = delivery lead time
u = mean demand during lead time l
o = standard deviation of demand during lead time l
p(x) = Prob{demand X during lead time l is equal to x}
G(x) = Prob{demand X during lead time l is less than or equal to x}
h = unit holding cost
b = unit backorder cost
S(R) = average fill rate (service level)
B(R) = average backorder level
I(R) = average on-hand inventory level
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
64
Inventory Balance Equations
Balance Equation:

(inventory position) = (on-hand inventory) (backorders) + (orders)

Under Base Stock Policy

(inventory position) = R


Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
65
Inventory Profile for Base Stock System (R = 5)
0
1
2
3
4
5
6
7
0 5 10 15 20 25 30 35
Time
On Hand Inventory
Backorders
Orders
Inventory Position
l
R
r
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
66
Service Level (Fill Rate)
Let:
X = (random) demand during lead time l

so E[X] = u. Consider a specific replenishment order.
Since inventory position is always R,
the only way this item can stock out is if X > R.

Expected Service Level:
( ) ( )
( 1) ( ) if is discrete
( ) if is continuous
S R P X R
G R G r X
G R X
= <
=

Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com


67
Backorder Level
Note: At any point in time, number of orders equals number demands
during last l time units (X) so from our previous balance equation:
R = on-hand inventory backorders + orders
on-hand inventory backorders = R X
Note: on-hand inventory and backorders are never positive at the same
time, so if X=x, then


Expected Backorder Level (also called First-Order Loss Function):

0 if
backorders
if
x R
x R x R
<

=

>

{ }
( ) ( ) if is discrete
( ) max , 0
( ) ( ) if is continuous
x R
R
x R p x X
B R E x R
x R g x dx X

= = (

}
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
68
( )
| |
| |
| |
| | | |
1
1 1
1 1
1
1
If ~ Poisson( ), then
( ) ( ) ( )
( ) ( )
( )
!
1 ( )
1 !
1 ( )
!
( ) 1 ( )
( ) 1 ( ) 1 ( )
( ) (
x R
x R x R
x
x R x R
x
x R
x
x R
x R
X
B R x R p x
xp x Rp x
e
x R p x
x
e
R G R
x
e
R G R
x
p x R G R
p R G R R G R
p R R
u
u
u
u
u
u
u
u
u
u
u
u u

= +

= + = +


= + = +

= +

=
=
=
=
=

=
=
= +
= +

| |
| | | |
) 1 ( )
( ) ( ) 1 ( )
G R
Var x p R R G R u

= +
Backorder Level (Cont.)
( )
( )
( ) ( )
( ) ( )
( ) ( )
2
2
If ~ Normal , , then
( ) ( ) ( )
1
( )
( )
( )
( )
( ) 1
( ) 1
R
R
R
R R
R R
X
B R x R g x dx
x
x R dx
z R z dz
z z dz R z dz
z dz R z dz
R R
R
g R R G R
u
o
u u
o o
u u
o o
u o
u
|
o o
u o |
o | u |
o | u |
u u
o| u
o o
o u

| |
=
|
\ .
= +
= +
'
= +
(
| | | |
= + u
| |
(
\ . \ .

= +

}
}
}
} }
} }
(

( ) ( )
Note that
z z z | |
'
=
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
69
Inventory Level
Observe:
on-hand inventory = R X + backorders
E[X] = u from data
E[backorders] = B(R) from previous slide

Result:
( )
2
( ) ( )
( ) ( ) ( ) if Poisson
( ) ( ) if Normal
I R R B R
p R R G R X
g R R G R X
u
u u
o u
= +
+

=

+

Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com


70
Base Stock Example
l = one month

u = 10 units (per month)

Assume Poisson demand, so

= =

|
|
.
|

\
|
= =
x
k
x
k
k
k
e
k p x G
0 0
10
!
10
) ( ) (
Note: Poisson
demand is a good
choice when no
variability data
is available.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
71
Base Stock Example Calculations
x p(x) G(x) B(x) x p(x) G(x) B(x)
0 0.000 0.000 10.000 12 0.095 0.792 0.531
1 0.000 0.000 9.000 13 0.073 0.864 0.322
2 0.002 0.003 8.001 14 0.052 0.917 0.187
3 0.008 0.010 7.003 15 0.035 0.951 0.103
4 0.019 0.029 6.014 16 0.022 0.973 0.055
5 0.038 0.067 5.043 17 0.013 0.986 0.028
6 0.063 0.130 4.110 18 0.007 0.993 0.013
7 0.090 0.220 3.240 19 0.004 0.997 0.006
8 0.113 0.333 2.460 20 0.002 0.998 0.003
9 0.125 0.458 1.793 21 0.001 0.999 0.001
10 0.125 0.583 1.251 22 0.000 0.999 0.000
11 0.114 0.697 0.834 23 0.000 1.000 0.000

This table is correct only for a Poisson distribution with mean u = 10.
If u has some other value, a whole new table needs to be generated.
It is usually better to approximate the Poisson with the normal
distribution, and scale it to the standard normal CDF table.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
72
Base Stock Example Results
Service Level: For fill rate of 90%, we must set R 1 = r = 14,
so R = 15 and safety stock s = r u = 4. Resulting service
is 91.7%.

Backorder Level:

B(R) = B(15) = 0.103

Inventory Level:

I(R) = R u + B(R) = 15 10 + 0.103 = 5.103

Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
73
Optimal Base Stock Levels
Objective Function: Solution: if we assume X is continuous,
Implication: set base stock
level so fill rate is b/(h+b).

Note: R* increases in b
and decreases in h.
holding plus backorder cost
( ) ( ) ( )
( ) ( )
( )
( )
( ) ( )
( )
*
0 ( )
( ) ( )
( )
1
u

=
= + + (

= + +
= + +
(
= + +
(

= + + (

=
+
}
}
R
R
d
Y R
dR
d
h R h b B R
dR
d
h h b B R
dR
d
h h b x R g x dx
dR
h h b g x dx
h h b G R
b
G R
h b
( )
| | ( )
( ) ( ) ( )
( ) ( )
( )
Y R hI R bB R
h R B R bB R
h R h b B R
u
u
= +
= + +
= + +
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
74
Base Stock Normal Approximation
If X ~ Normal(u,o), then



So R* = u + z o

( )
*
( *)
u
o

| |
u = u = =
|
+
\ .
R b
z G R
h b
Note: R* increases in u
and also increases in o
provided z > 0.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
75
Optimal Base Stock Example
Data: Approximate Poisson with mean 10 by normal with mean
10 units/month and standard deviation \10 ~ 3.16 units/month.
Set h = $15, b = $25.

Calculations:

since u(0.32) = 0.625, z = 0.32 and hence

R* = u + zo = 10 + 0.32(3.16) = 11.01 ~ 11

Observation: from previous table fill rate is G(10) = 0.583, so
maybe backorder cost is too low.
0.625
25 15
25
=
+
=
+b h
b
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
76
Inventory Pooling
Situation:
n different parts with lead time demand Normal(u, o)
z = 2 for all parts (i.e., fill rate is around 97.5%)

Specialized Inventory:
base stock level for each item = u + 2o
total safety stock = 2no

Pooled Inventory: suppose parts are substitutes for one another
lead time demand is normal (nu,\no)
base stock level (for same service) = nu + 2\no
ratio of safety stock to specialized safety stock = 1/\n
cycle stock safety stock
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
77
Effect of Pooling on Safety Stock
Conclusion: cycle stock is
not affected by pooling, but
safety stock falls dramatically.
So, for systems with high safety
stock, pooling (through product
design, late customization, etc.)
can be an attractive strategy.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
78
Pooling Example
PCs consist of 6 components (CPU, HD, CD ROM,
RAM, removable storage device, keyboard)
3 choices of each component: 3
6
= 729 different PCs
Each component costs $150 ($900 material cost per
PC)
Demand for all models is Poisson distributed with
mean 100 per year
Replenishment lead time is 3 months (0.25 years)
Use base stock policy with fill rate of 99%
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
79
Base Stock Level for Each PC: u = 100 0.25 = 25, so using
Poisson formulas,

G(R 1) > 0.99 R = 38 units

Average On-Hand Inventory for Each PC:

I(R) = R u + B(R) = 38 25 + 0.0138 = 13.0138 units

Value of Total On-Hand Inventory:

13.0138 729 $900 = $8,538,358


Pooling Example - Stock PCs
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
80
Pooling Example - Stock Components
Necessary Service for Each Component:
(assuming independence)
S = (0.99)
1/6
= 0.9983

Base Stock Level for Components: u = (100 729/3) 0.25 = 6075,
so
G(R 1) > 0.9983 R = 6306

Average On-Hand Inventory Level for Each Component:
I(R) = R u + B(R) = 6306 6075 + 0.0363 = 231.0363 units

Value of Total On-Hand Inventory:
231.0363 18 $150 = $623,798 93% reduction!
729 models of PC.
3 types of each component.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
81
Base Stock Insights
1. Reorder points control probability of stockouts by
establishing safety stock.
2. To achieve a given fill rate, the required base stock level (and
hence safety stock) is an increasing function of the mean and
(provided backorder cost exceeds shortage cost) standard
deviation of demand during replenishment lead time.
3. The optimal fill rate is increasing in the backorder cost and
a decreasing in the holding cost. We can use either a service
constraint or a backorder cost to determine the appropriate
base stock level.
4. Base stock levels in multi-stage production systems are very
similar to kanban systems and therefore the above insights
apply.
5. Base stock model allows us to quantify benefits of inventory
pooling.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
82
The Single Product (Q,r) Model
Motivation: Either
1. Fixed cost associated with replenishment
orders and cost per backorder.
2. Constraint on number of replenishment orders
per year and service constraint.


Objective:
fixed setup costs
min holding costs
backorder or stockout costs

+

`
+


)
Q,r
As in EOQ, this makes
batch production attractive.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
83
Summary of (Q,r) Model Assumptions
1. One-at-a-time demands.
2. Demand is uncertain, but stationary over time and
distribution is known.
3. Continuous review of inventory level.
4. Fixed replenishment lead time.
5. Constant replenishment batch sizes.
6. Stockouts are backordered.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
84
(Q,r) Notation
expected demand per year
replenishment lead time (assumed constant)
(random) demand during replenishment lead time
[ ] expected demand during replenishment lead time
standard deviation of deman
D
X
E X u
o
=
=
=
= =
= d during replenishment lead time
( ) ( ) cdf of demand during lead time
( ) ( ) pdf of demand.
( ) ( ) pmf of demand during lead time
fixed cost per order
unit cost of an item
annual uni
G x P X x
d
g x G x
dx
p x P X x
A
c
h
= s =
= =
= = =
=
=
= t holding cost per year
cost per stockout
annual unit backorder cost per year
k
b
=
=
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
85
(Q,r) Notation (cont.)
order quantity
reorder point
safety stock implied by
( ) average order frequency
( , ) average service level (fill rate)
( , ) average backorder level
( , ) average inventory level
Q
r
s r
r
F Q
S Q r
B Q r
I Q r
u
=
=
=
=
=
=
=
=
Decision Variables:





Performance Measures:
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
86
Inventory Position is uniformly distributed between r + 1 = 5 and r + Q = 8.
Inventory and Inventory Position for Q = 4, r = 4
-2
-1
0
1
2
3
4
5
6
7
8
9
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32
Time
Q
u
a
n
t
i
t
y
Inventory Position Net Inventory
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
87
Annual Costs in (Q,r) Model
Fixed Setup Cost: AF(Q)

Stockout Cost: kD[1 S(Q,r)], where k is cost per stockout

Backorder Cost: bB(Q,r)

Inventory Carrying Costs: hI(Q,r)
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
88
Fixed Setup Cost in (Q,r) Model
Observation: since the number of orders per year is D/Q,


( ) =
D
F Q
Q
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
89
Stockout Cost in (Q,r) Model
Key Observation: inventory position is uniformly
distributed between r+1 and r+Q.
Thus, service in (Q,r) model is weighted sum of
service in base stock model.

Result:
1
1
( ) if is discrete
( , )
1
( ) if is continuous
r Q
x r
r Q
r
G x X
Q
S Q r
G x dx X
Q
+
=
+

}
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
90
1
1
( ) ( 1) ( ) ( )
( 1) ( )
0 ( ) ( ) ( )
x r
x r
x r
B r B r x r p x
x r p x
p r x r p x

= +

= +
+ =

= +

1
( ) ( )
x r
x r p x

= +

( )
( )
( ) | |
1
1
( )
1
Thus, 1 ( ) ( 1)
1 ( ) ( 1)
( ) ( 1) ( ) ( ) ( )
x r
y x y x
y x y x y x y x
p x
G r
G r B r B r
G y B y B y
B y B y B y B y B x

= +

= =

= = = = +
+
=
= + +
= + (

= + = =



Stockout Cost in (Q,r) Model (Cont.)
If X is Discrete, then
| |
1
1
1 1 1
1
1
1
( , ) ( )
1
1 ( ) ( 1)
1 ( ) ( 1)
( ) ( )
( ) ( )
1
r Q
x r
r Q
x r
r Q r Q r Q
x r x r x r
r Q r Q
x r x r
S Q r G x
Q
B x B x
Q
B x B x
Q
Q B x B x
Q
B r B r Q
Q
+
=
+
=
+ + +
= = =
+ +
= = +
=
= + +
+ +
=
+
=
+
=



Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
91
( ) ( )
( )
( ) ( )
( ) ( )
( ) ( )
( )
1
Thus, 1
1
( ) ( )
( )
r
r
x x
d
B r B r
dr
d
x r g x dx
dr
g x dx
G r
d
G r B r
dr
G y dy B y dy
B x B
B x


'
=
=
=
=
= +
'
= ( (

=
=
}
}
} }
Stockout Cost in (Q,r) Model (Cont.)
If X is Continuous, then
( )
( ) ( ) ( )
1
( , ) ( )
1
1
( ) ( )
1
r Q
r
r Q
r
S Q r G x dx
Q
d
B x dx
Q dx
r Q r B r Q B r
Q
B r B r Q
Q
+
+
=
(
= +
(

+ + + ( (

=
+
=
}
}
Note: this form, which is the same for
both Discrete and Continuous demand,
is easier to use in spreadsheets because
it does not involve a sum.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
92
Service Level Approximations
Type I (base stock):



Type II:
) ( ) , ( r G r Q S ~
( )
( , ) 1
B r
S Q r
Q
~
Note: computes number
of stockouts per cycle,
underestimates S(Q,r)
Note: neglects B(r+Q) term,
underestimates S(Q,r)
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
93
Backorder Costs in (Q,r) Model
Key Observation: B(Q,r) can also be computed by averaging
base stock backorder level function over the range (r, r + Q].

Result:
1
1
( ) if is discrete
( , )
1
( ) if is continuous
r Q
x r
r Q
r
B x X
Q
B Q r
B x dx X
Q
+
= +
+

}
Notes:
1. B(Q,r)~ B(r) is a base stock approximation for backorder level.

2. If we can compute B(x) (base stock backorder level function),
then we can compute stockout and backorder costs in (Q,r) model.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
94
{ } { }
1
1
1
1
Let ( ) max 0, max 0, 1
2
1
( )( 1) ( )
2
1 1
( 1) ( ) ( 1)( ) ( ) ( )( 1) ( )
2 2
1 1
( 1)( ) ( ) ( 1)( ) ( )
2 2
k x
k x k x
k x
x E X x X x
k x k x p k
x x k x k x p k k x k x p k
x x x x p k k x k x p k
|
| |

= +

= = +

= +
(

=
= +
= + + +

1
1
( )( 1) ( )
2
k x
k x k x p k

= +
+

| |
| |
( ) ( )
1
1
1 1 1 1
1 1
1
( )( 2) ( )
2
0 ( ) ( )
( )
( ) ( 1) ( ) ( 1) ( ) ( )
1 1
( , ) ( ) ( 1) ( )
k x
k x
y x y x y x y x
r Q r Q
x r x r
k x p k
k x p k
B x
B y y y y y x
r r Q
B Q r B x x x
Q Q Q
| | | | |
| |
| |

= +

= +

= + = + = + = +
+ +
= + = +

= +
=
= = =
+
= = =



Second-Order Loss Function (Discrete Distribution)
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
95
{ } ( ) ( )
( ) ( )
( ) ( ) ( ) ( ) ( ) ( )
( ) ( )
( ) ( )
| |
2 2
2
2 2 2
1 1
Let ( ) max 0,
2 2
1
( ) ( )
2
1
2
1
0 0 2
2
( )
( ) ( )
x
x
x
x
x
x x
x E X x y x g y dy
d d
x x y x g y dy
dx dx
d dx d
x g x x g x y x g y dy
dx dx dx
y x g y dy
y x g y dy
B x
B y dy x dy
|
| |
| |


(
=

'
= =

| | | |
(
= +
`
| |

\ . \ .
)

= + (
`

)
=
=
'
= =
}
}
}
}
}
} }
( ) ( )
( )
1
( , ) ( )
r Q
r
x
r r Q
B Q r B x dx
Q Q
| |
+
+
= =
}
Second-Order Loss Function (Continuous Distribution)
Note: this form, which is the
same for both Discrete and
Continuous demand, is also
easier to use in spreadsheets,
because it does not involve a
sum.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
96
( ) ( )
( ) ( )
( ) ( )
( )
2 2
1 1
2 2
1 1 1
2 1
2 2
1 1 1
2
1
1 1
( )( 1) ( ) 2
2 2 !
2
2 ! ! !
2
2 2 ! 1 ! !
2
2 !
k
k x k x
k k k
k x k x k x
k k k
k x k x k x
k
k x
e
x k x k x p k k k xk x x
k
e
k k x k x x
k k k
e
x x x
k k k
e
x
k
u
u
u
u
u
|
u u u
u u u
u u
u
u u


= + = +


= + = + = +


= + = + = +


=
= = + +
(
= + +
(

(
= + +
(


=


( )
( )
( )
( ) ( )
( ) ( ) ( ) ( )
2
1
1
2 2 2
1
2 2 2
1
2
! !
1
2 2
2 1 ! ! ! !
1
2
2 ! !
1
2
k k
k x k x
x x x k
k x
x k
k x
x x
k k
e e e e
x x x x
x x x k
e e
x x x x
x k
x p x x x G x
u u u u
u u
u u
u u u u
u u u u
u u
u u u u
u u u

= = +

= +

= +
(
+ +
(

(
| |
= + + + +
( |
|

(
\ .

(
= + + +
(

(
+ + (


=

Second-Order Loss Function (Poisson Distribution)


Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
97
( )
( )
{ }
( )
( ) ( )
( ) ( )
( )
0
( ) 1
1 1 1
1
1 1
1 1
1
1
1
1
y x
y
y x
y
y x
x y x
y x
x k
k
x
x
B x G y
p
p
p p
p p
p
p
u
u

=
= (

(
=

=
=
=
=
| |
=
|
\ .

Second-Order Loss Function (Geometric Distribution)


( )
( )
( )
( )
( )
( )
( )
1
1
1
1
1
1
0
1
1
2
1
2
( ) ( )
1
1
1
1
1
1
1
1
1
1
1
y x
y
y x
x
y x
y x
x
k
k
x
x
x
x B y
p
p
p
p
p
p
p
p
p
p p
p
p
|
u
u

= +

= +
+


= +
+

=
+
+
+
=
=

=
| |
=
|
\ .

Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com


98
Second-Order Loss Function (Normal Distribution)
( ) ( )
( ) ( ) ( )
( ) ( ) ( )
( ) ( ) ( ) ( ) ( )
( ) ( ) ( )
2
2
2
2 2 2 2
2 2 2 2
2 2
1
( )
2
1 1
2
2
1
2 2
2
1
2 2
2
1
2 1 2
2
x
x
x
x x x
x
x y x g y dy
z x z x z dz
z z x z x z dz
x x z dz x z z dz z z dz
x
x x x z dz
u
o
u
o
u u u
o o o
|
u o u o | o
o
u uo o u o |
u u | o u | o |
u
u u o u |
o

=
(
= + + +

(
= + + + +



= + + +
`

)
(
| |
'
= + u
|
(
\ .

}
}
}
} } }
( )
2
x
z z dz
u u
o o
o |



'

`

)
} }
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
99
Second-Order Loss Function (Normal Distribution, Cont.)
( ) ( )
( ) ( )
( ) ( )
2 2
2
2 2
1
2 1 2 0
2

1
2 1 2
2
x
x
x x
x x x
z z z dz
x x
x x x
u
o
u
o
u u
u u o u |
o o
o | |
u u
u u o u |
o o

( (
| | | |
= + u

| |
( (
\ . \ .

(

`
(

(

)
(
| | | |
= + u +
|
(
\ . \ .

}
( ) ( )
( ) ( )
2
2 2 2
2
2
0 1
1
2 1
2
1
1
2
x x x
x x
x x x
x x
x x
u u u
o |
o o o
u u
u u o o u |
o o
u
u o o u |
o

(
| | | |
+ u
`
| |
(
\ . \ .

)

(
| | | |
= + + u +
`
| |
(
\ . \ .

)
(
| |
(
= + u
|
(

\ .

( ) ( ) ( )
2
2
1 1
where
2
z z z z
x
z
u
o
|
u
o
o

| |
`
|
\ .
)
+ u (


= =
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
100
Second-Order Loss Function (Exponential Distribution)
( )
( )
( )
( ) 1
1
1
x
y
x
y
x
x
x
B x G y dy
e dy
e dy
g y dy
G x
e
u
u
u
u
u
u
u
u

= (

=
=
=
= (

=
}
}
}
}
( )
( )
2
2
2
2
( ) ( )
1
1
x
y
x
y
x
x
x
x B y dy
e dy
e dy
g y dy
G x
e
u
u
u
|
u
u
u
u
u
u

=
=
=
=
= (

=
}
}
}
}
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
101
Inventory Costs in (Q,r) Model
Approximate Analysis: on average, inventory declines from Q+s
to s+1 so



Exact Analysis: this neglects backorders, which add to average
inventory since on-hand inventory can never go below zero. The
corrected version turns out to be

(*)

Note that for a continuous demand distribution, the correct
expression for inventory costs would be


However, if the continuous distribution is just used to approximate
the actual discrete distribution, the discrete version (*) is better.
u +
+
= +
+
=
+ + +
~ r
Q
s
Q s s Q
r Q I
2
1
2
1
2
) 1 ( ) (
) , (
1
( , ) ( , )
2
Q
I Q r r B Q r u
+
= + +
( , ) ( , )
2
Q
I Q r r B Q r u = + +
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
102
Inventory vs Time in (Q,r) Model
I
n
v
e
n
t
o
r
y

Time
r
s+1=ru+1
s+Q
Expected Inventory Actual Inventory
Approx I(Q,r)
Exact I(Q,r)
= Approx I(Q,r)
+ B(Q,r)
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
103
Expected Inventory Level for Q = 4, r = 4, u = 2
0
1
2
3
4
5
6
7
0 5 10 15 20 25 30 35
Time
I
n
v
e
n
t
o
r
y

L
e
v
e
l
s+Q
s
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
104
Optimizing (Q,r) Model with Backorder Cost
Objective Function:





Approximation: B(Q,r) makes optimization complicated
because it depends on both Q and r. To simplify,
approximate with base stock backorder formula, B(r):
( )
( , ) ( , ) ( , )
1
( , )
2
D
Y Q r A bB Q r hI Q r
Q
AD Q
h r b h B Q r
Q
u
= + +
+
| |
= + + + +
|
\ .
( )
( , ) ( , )
1
( )
2
Y Q r Y Q r
AD Q
h r b h B r
Q
u
~
+
| |
= + + + +
|
\ .
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
105
Results of Approximate Optimization
Assumptions:
Q,r can be treated as
continuous variables
G(x) is a continuous cdf
Results:

2
*
( *)
* u o
=
=
+
= +
AD
Q
h
b
G r
h b
r z
if G is Normal(u,o
2
),
where u(z)=b/(h+b)
Note:
this is
just the
EOQ
formula
Note:
this is
just the
base
stock
formula
( )
( )
( )
( ) ( )
2
0 ( , )
1
( )
2
2
0 ( , )
1
( )
2
( )
1
Y Q r
Q
AD Q
h r b h B r
Q Q
AD h
Q
Y Q r
r
AD Q
h r b h B r
r Q
d
h b h B r
dr
h b h G r
u
u
c
=
c
( c +
| |
= + + + +
| (
c
\ .

= +
c
=
c
( c +
| |
= + + + +
| (
c
\ .

= + +
= + (

Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
106
(Q,r) Example
Stocking Repair Parts:

D = 14 units per year
c = $150 per unit
h = 0.1 150 + 10 = $25 per unit
l = 45 days
u = 1445/365 = 1.726 units during replenishment lead time
b = $40
A = $10
Demand during lead time is Poisson
Values for Poisson(u) Distribution
107
r p(r) G(r) B(r)
0 0.178 0.178 1.726
1 0.307 0.485 0.904
2 0.265 0.750 0.389
3 0.153 0.903 0.140
4 0.066 0.969 0.042
5 0.023 0.991 0.011
6 0.007 0.998 0.003
7 0.002 1.000 0.001
8 0.000 1.000 0.000
9 0.000 1.000 0.000
10 0.000 1.000 0.000
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
108
Calculations for Example
( ) ( )
2 2(10)(14)
* 3.3466, so * 3 or 4
25
40
0.615
25 40
Using Poisson:
1 0.485 0.615 0.750 2 , so * 1 or 2
Or using Normal:
(0.29) 0.615, so 0.29
* 1.726 0.29(1.314) 2.107, so * 2 or 3
AD
Q Q
h
b
h b
G G r
z
r z r u o
= = = =
= =
+ +
= < < = =
u = =
= + = + = =
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
109
Performance Measures for Example
( )
( )
( ) ( )
* *
*
*
* * *
* *
*
Choose 4 and 2
14
4
3.5
, 1
(2) (2 4)
1
4
0.389 0.003
1
4
0.904
Q r
D
F Q
Q
B r B r Q
S Q r
Q
B B
= =
=
=
=
+
=
+
=

=
=
Orders placed at rate of 3.5 per year.
Fill rate fairly high (90.4%).
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
110
Performance Measures for Example (Cont.)
( )
( ) ( )
* *
*
* *
*
1
*
* * * * *
1
, ( )
(3) (4) (5) (6)
4
0.140 0.042 0.011 0.003
4
0.049
1
, ,
2
4 1
2 1.726 0.049
2
2.823
r Q
x r
B Q r B x
Q
B B B B
Q
I Q r r B Q r u
+
= +
=
+ + +
=
+ + +
=
=
+
= + +
+
= + +
=

Very few outstanding backorders.


Average on-hand inventory just below 3.
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
111
Varying the Example
Change: suppose we order twice as often so F = 7 per year,
then Q = 2 and:


which may be too low, so increase r from 2 to 3:


This is better. For this policy (Q = 2, r = 3) we can compute
B(2,3) = 0.026,
I(Q,r) = 2.80.

Conclusion: this has higher service and lower inventory than
the original policy (Q = 4, r = 2). But the cost of achieving
this is an extra 3.5 replenishment orders per year.
826 . 0 ] 042 . 0 389 . 0 [
2
1
1 )] ( ) ( [
1
1 ) , ( = = + = Q r B r B
Q
r Q S
936 . 0 ] 011 . 0 140 . 0 [
2
1
1 )] ( ) ( [
1
1 ) , ( = = + = Q r B r B
Q
r Q S
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
112
Optimizing (Q,r) Model with Stockout Cost
Objective Function:



Approximation: Assume we can still use EOQ to compute
Q* but replace S(Q,r) by Type II approximation and
B(Q,r) by base stock approximation:

| |
( , ) 1 ( , ) ( , )
D
Y Q r A kD S Q r hI Q r
Q
= + +
( ) 1
( , ) ( , ) ( )
2
D B r Q
Y Q r Y Q r A kD h r B r
Q Q
u
+
(
~ = + + + +
(

Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
113
Results of Approximate Optimization
Assumptions:
Q and r can be treated as continuous variables
G(x) is a continuous cdf

Results:

2
*
( *)
*
AD
Q
h
kD
G r
kD hQ
r z u o
=
=
+
= +
if G is Normal(u, o
2
),
where u(z) = kD/(kD+hQ)
Note: this is just the EOQ formula
Note: another version of the base
stock formula (only z is different)
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
114
Backorder vs. Stockout Model
Backorder Model
when real concern is about stockout time
because B(Q,r) is proportional to time orders wait for
backorders
useful in multi-level systems

Stockout Model
when concern is about fill rate
better approximation of lost sales situations (e.g., retail)

Note:
We can use either model to generate frontier of solutions
Keep track of all performance measures regardless of model
B-model will work best for backorders, S-model for stockouts
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
115
Lead Time Variability
Problem: replenishment lead times may be variable,
which increases variability of lead time demand.

Notation:
L = replenishment lead time (days), a random variable
l = E[L] = expected replenishment lead time (days)
o
L
= standard deviation of replenishment lead time (days)
D
t
= demand on day t, a random variable,
(assumed independent and identically distributed)
d = E[D
t
] = expected daily demand
o
D
= standard deviation of daily demand (units)

Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
116
Including Lead Time Variability in Formulas
Standard Deviation of Lead Time Demand:





Modified Base Stock Formula (Poisson demand case):
2 2 2 2 2
L L D
d d o u o o o + = + =
2 2
L
R z
z d
u o
u u o
= +
= + +
Inflation term due to
lead time variability
Note: o can be used in any base stock or (Q,r) formula
as before. In general, it will inflate safety stock.
if demand is Poisson
Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
117
Single Product (Q,r) Insights
Basic Insights:
Safety stock provides a buffer against stockouts.
Cycle stock is an alternative to setups/orders.


Other Insights:
1. Increasing D tends to increase optimal order quantity Q.
2. Increasing u tends to increase the optimal reorder point.
(Note: either increasing D or l increases u.)
3. Increasing the variability of the demand process tends to
increase the optimal reorder point (provided z > 0).
4. Increasing the holding cost tends to decrease the optimal
order quantity and reorder point.

Wallace J. Hopp, Mark L. Spearman, 1996, 2000 http://www.factory-physics.com
118
Main Models Discussed So Far
Features: Model: EOQ EPL WW NV BS (Q, r)
Time: Continuous (C) or Discrete (D) C C D D C C
Products: Single (S) or Multiple (M) S S S S S S
Periods: Single (S) or Multiple (M) - - M S - -
Backordering (B) or Lost Sales (L) - - - L B B
Setup or Order Cost: Yes (Y) or No (N) Y Y Y N N Y
Demand: Deterministic (D) or Random
(R)
D D D R R R
Production: Deterministic (D) or
Random (R)
D D D D D D
Demand Rate: Constant (C) or Dynamic
(D)
C C D - C C
Production Rate: Finite (F) or Infinite (I) I F I - I I
Time Horizon: Finite (F) or Infinite (I) I I F F I I
Echelons: Single (S) or Multiple (M) S S S S S S

You might also like