Professional Documents
Culture Documents
Newsvendor PDF
Newsvendor PDF
YL. Chang
Fall 2015
Newsvendor
Single period decision making for perishable products
Dealing with the demand uncertainty
Let
D: the demand of each period (Random, the distribution is known)
y: ordering quantity
Cv : buying price of one item from the supplier (variable cost)
Cp : selling price of one item to the customer.
Cs : the salvage value of each leftover item. Salvage value can be positive or negative.
We assume Cs < Cv and Cp > Cv .
Suppose the Demand follows the following distribution:
d
10
15
20
25
30
P[D = d]
1/8
1/8
1/8
1/8
1/4
1/4
Although we know the distribution, we dont know what the demand is exactly on each day. This is the
uncertainty we have to face.
Assume Cv = $0.25, Cp = $1.00, Cs = $0.00.
What is our objective? What is an optimal decision?
We first focus on maximize long-run average profit per day. Later on, we will also want to minimize long-run
average cost per day.
Lets explore the option that we order y = 25 copies flat every day.
Day
D
Product cost
# of sold item
Dy
# of unsold item
(y D)+
lost sale
(D y)+
Sale Rev.
Cp (D y)
Salvage Rev.
Cs (y D)+
Profit
1
10
25*0.25 = 6.25
2
25
25*0.25 = 6.25
3
15
25*0.25 = 6.25
4
5
25*0.25 = 6.25
5
30
25*0.25 = 6.25
10
25
15
25
15
10
20
10
25
15
25
10+0-6.25
=3.75
25+0-6.25
=18.75
15+0-6.25
=8.75
5+0-6.25
=-1.25
25+0-6.25
=18.75
Important Quantities:
# of sold item: D y;
# of unsold item: (y D)+ , y (D y);
lost sale: (D y)+ ;
Show that y = (D y) + (y D)+ .
Proof:
If D y, then (D y) + (y D)+ = y + 0 = y.
If D < y, (D y) + (y D)+ = D + y D = y.
Profit = Revenue - Cost
= (Sale Rev. ) + (Salvage Rev. ) - (Product Cost)
Profit(D, y) = Cp (D y) + Cs (y D)+ Cv y
= (Cp Cv )(y D) (Cv Cs )(y D)+
= money I earn - money i lose
Cp Cv : profit margin of each sold item
Cv Cs : loss of each leftover item
You can see on some day, you can make profit; on some other days, you lose money by using this policy.
The average profit over 100 days would be
1
(3.75 + 18.75 + 8.75 + (1.25) + 18.75 + ...)
100
Let Pn be the profit of day n and
Pn (D, y) =
1
(P1 + P2 + P3 + ... + Pn )
n
where Pn (D, y) be the average profit over n days, given the demand D and ordering quantity y.
Theorem 1 (Strong law of large numbers): Assume that demand of a day is independent and identically
distributed (i.i.d.) and the order is constant. Then the long-run average profit converges to the expected profit
for a single period with probability 1.
1
(P1 + P2 ... + Pn ) = E[P1 ]} = 1.
n n
P { lim
Hence, we want to maximize
max g(y) = E[P (D, y)] = (Cp Cv )E[y D] (Cv Cs )E[(y D)+ ]
y
Ry
c
Then
Z
f (x)dx + (Cp Cv )
0
= (Cp Cs )F (y) + Cp Cv
Setting g 0 (y ) = 0, we get
Cp Cv
.
Cp Cs
F (y ) =
d0
p0
d1
p1
d2
p2
...
...
P
Then F (x) = P (D x) = i pi . Following the same procedure, for discrete D, an optimal order quantity
y is the smallest y such that
Cp Cv
F (y)
Cp Cs
Remark: Because D can only take values in d0 , d1 , d2 , ..., the above y must be one of di s.
Cp Cv
,
Cp Cs
where
Cp Cv
Cp Cs
Cp Cv
.
Cp Cs
Examples:
(1) Discrete Demand D:
20
25
30
35
P [D = d]
0.1
0.2
0.4
0.3
F (d)
0.1
0.3
0.7
Cp = 1, Cv = 0.25, Cs = 0.
F (y )
Cp Cv
1 0.25
= 0.75.
=
Cp Cs
10
Hence, y = 35.
(2) Discrete Demand D :
10
P [D = d]
0.5
0.5
Cp = 2, Cv = 1, Cs = 0.
F (y )
Cp Cv
21
=
= 0.5.
Cp Cs
20
Hence, y = 0.
2
3
y 20
4020 , y
Cp Cv
21
=
= 2/3.
Cp Cs
2 0.5
= 100/3.
(4) The selling price of lettuce salad is $6, the buying price of one unit of lettuce is $1. Leftover lettuce of
a day cannot be used for future sale, and you have to pay 50 cents per unit of lettuce for disposal.
(a) What is the optimal order quantity?
Note, Cs = 0.5, negative salvage value.
F (y ) =
Cp Cv
Cp Cs
Cost Problem
Profit Problem
Cost Problem
D demand
Cp selling price
Cu understock cost
Cs salvage value
Cu Cv
,
Cu + Co
(1)
Cu Cv
.
Cu + Co
(2)
Cost problem with nonzero initial inventory (x) and nonzero fixed cost (Cf )
D demand
Cu understock cost
Co overstock cost
Cv unit production cost
Cf fixed operation cost
Cost function = Manufacturing cost + understock cost + overstock cost
Cost(D, y) = Cf + Cv y + Cu (D y)+ + Co (y D)+
Since fixed cost Cf is constant, it does NOT affect the optimal production quantity. Hence, the optimal
production quantity is still:
(1) If D is continuous r.v., choose y such that
F (y ) =
Cu Cv
,
Cu + Co
Cu Cv
.
Cu + Co
Remark:
(1) If Cu = Cv , order nothing
(2) If Cu >> Cv , order as many as you can.
Fixed cost Cf : We implicitly assume that we should order when Cf = 0 when we first look at the cost
problem. However, if Cf > 0, especially when it is very expensive to place an order (e.g. setting up a new
production line), we may not want to order.
Existing Inventory x: We implicitly assume that we should order when we have no inventory when placing
order (e.g. x = 0) before.
Now suppose y = 500:
(1) You have 499 units in your warehouse, then you should order 1 unit(s) if Cf = 0.
(2) You have 600 units in your warehouse, then you should order 0 unit(s) if Cf = 0.
(3) You have x units in your warehouse, then you should order (y x)+ unit(s) if Cf = 0.
Hence, we say y in previous section is in fact the optimal order-up-to/production-up-to quantity. It
means if you want to order, then you should order up to y .
Moreover, assume y = 500 and you have 499 units in your inventory, and the fixed order cost is very large.
Then you may want to stay with your current inventory and accept the understock cost.
Hence, we have two options when nonzero inventory (x) and nonzero fixed cost (Cf ).
(1) order up to y
(2) order nothing.
8
We must compare the cost for each option, and select the option with the smaller cost.
Summary of solution to the Newsvendor cost problem with nonzero initial inventory (x) and
nonzero fixed cost (Cf ):
(1) Calculate y using solution to standard Newsvendor cost problem (1)-(2).
(2) If x y , order nothing. Otherwise, calculate
expected cost (C1 ) w.r.t order quantity y x;
expected cost (C2 ) when order nothing.
If C1 < C2 , order y x; Otherwise, order nothing.
Examples:
1. Cu = $10, Cv = $4, Co = $2, Cf = $10. Initial inventory x = 13. D has a discrete uniform distribution
on {11, 12, 13, ..., 19, 20}. Should you make order? If so, what is the order quantity to minimize the
expected total cost? The optimal order-up-to quantity y is the smallest y such that
F (y)
Cu Cv
10 4
= 1/2
=
Cu + Co
10 + 2
Hence, y = 15. For x = 13, if you do order, order 2 items to bring order-up-to quantity to 15. In
order to decide whether we should order or not, we evaluate the total cost for two options: order 2
items, or not to order.
(i) If you do not order, the expected cost is
expected cost = Cu E[(D x)+ ] + Co E[(x D)+ ]
1
1
1
28
14
E[(D 13)+ ] = 1 + 2 + ... + 7
=
=
10
10
10
10
5
1
1
3
+
E[(13 D) ] = 2 + 1
=
10
10
10
3
14
= 28 + 0.6 = 28.6
expected cost = 10 + 2
5
10
(ii) If you do make an order, the expected cost is
expected cost = Cf + Cv (y x) + Cu E[(D y )+ ] + Co E[(y D)+ ]
= 10 + 4(15 13) + 10E[(D 15)+ ] + 2E[(15 D)+ ]
= 18 + 2(1) + 10(1.5) = 35
4+3+2+1
E[(15 D)+ ] =
=1
10
1+2+3+4+5
E[(D 15)+ ] =
= 1.5
10
Since 28.6 < 35, you should no order.
2. D U (10, 20), Cu = $10, Cv = $4, Co = $2, Cf = $30. Initial inventory x = 10. Should you make
order? If so, what is the order quantity to minimize the expected total cost?
(i) The optimal order-up-to quantity y satisfies
Cu Cv
10 4
=
= 1/2
Cu + Co
10 + 2
F (y ) =
By uniform random variable, it means that probability density is constant over the range of (10, 20).
The pdf of demand is
(
1
if 10 < x < 20
f (x) = 10
0
otherwise
And CDF:
0
F (x) = 1
x10
2010 ,
Hence,
if x 10
if x 20
if 10 < x < 20
1
y 10
=
20 10
2
y = 15.
(ii) If x = 10, evaluate the costs for two options:
(a) Order nothing:
expected cost = Cu E[(D x)+ ] + Co E[(x D)+ ]
= 10E[(D x)+ ] + 2E[(x D)+ ]
= 10E[D x] + 0 (since D x)
= 10(E[D] x) = 10(15 10) = 50
(b) Order y x = 15 10 = 5 gallons.
expected cost = Cf + Cv (y x) + Cu E[(D y )+ ] + Co E[(y D)+ ]
= 30 + 4(15 10) + 10E[(D 15)+ ] + 2E[(15 D)+ ]
= 50 + 10(1.25) + 2(1.25) = 65
Z 15
1
+
(15 x)dx = 1.25
E[(15 D) ] =
10 10
Z 20
1
E[(D 15)+ ] =
(x 15)dx = 1.25
10 15
10
We observe:
We should make an order when inventory level is low despite of fixed cost.
We tend not to order when inventory level is high.
There is a break even point where you should order up to y if inventory level is below the break even
point, and order nothing otherwise.
At the break even point, the two options should result in same total expected cost.
(s, S) policy
Definition 1 (s, S) policy is the inventory policy when you make an order up to S if and only if your
inventory level is below s.
(s, S) policy provide quick, consistent and exhaustive instructions to your assistant on ordering items. (s, S)
policy is used when
fixed ordering cost Cf > 0
initial inventory
s is the break even point of initial inventory level where the two options result in same total expected
cost. It is the threshold on your initial inventory level below which you wont make an order.
In other words, if your initial inventory level is s, then the cost for making an order and the cost for
ordering nothing are same.
S is the order up to quantity, hence, S = y .
Hence, assume the initial inventory level is x, then
(
no order
order S x
if x s
if x < s.
if x 4
if x < 4.
no order
order S x
11
if x s
if x < s.
Examples:
1. D U (10, 20), Cu = 10, Cv = 4, Co = 2, Cf = 30. Assume your initial inventory x = 10. Should you
make order? If so, what is the order quantity to minimize the expected total cost? What is (s, S)
policy? What is your decisions if your initial inventory level is x = 13? How about x = 3, 20?
The first part of the question has been solved on Page 10. When x = 10, we should not place the
order, hence, we know that 0 < s < 10.
In order to solve (s, S) policy, we note that the cost for ordering nothing equals the cost for ordering
(S s) when the initial inventory level is s.
(a) Order nothing:
E[total cost] = 10E[(D s)+ ] + 2E[(s D)+ ]
= 10(E(D s)) since (s < 10 < D)
= 10(15 s) = 150 10s
I want to emphasize that E[(D s)+ ] 6= E[D] s unless you can show D s.
(b) Order S s:
E[total cost] = Cf + Cv (S s) + Cu E[(D S)+ ] + Co E[(S D)+ ]
= 30 + 4(15 s) + 10E[(D 15)+ ] + 2E[(15 D)+ ]
= 4(10 s) + 65
Solving s
4(10 s) + 65 = 10(15 s)
s = 7.5
Hence, (s, S) = (7.5, 15).
x = 13 > s = 7.5, hence, order nothing.
x = 3 < s = 7.5, hence, order S x = 15 3 = 12.
x = 20 > s = 7.5, hence, order nothing. It is even greater than S = 15.
12
2. Next months production at a manufacturing company will use a certain solvent for part of its production process. You need to prepare solvent in prior and the demand of solvent is random. Assume that
there is an ordering cost of $1,500 incurred whenever an order for solvent is placed and the solvent
costs $50 per liter. Due to short product life cycle, unused solvent cannot be used in following months.
There will be a $15 disposal charge for each liter of solvent left over at the end of the month. If there
is a shortage of solvent, the production process is seriously disrupted at a cost of $100 per liter short.
Assume that the initial inventory level is x, where x = 0, 500, 700, and 800 liters.
(1) Assume D U (300, 900), what is the optimal ordering quantity for each case?
Cf = $1500
Cv = $50
Co = $15
Cu = $100
y 300
900300
100 50
Cu Cv
= 50/115
=
Cu + Co
100 + 15
= 50/115, y 560. By part (2) of this problem, we know (s, S) = (437, 560).
13
b b2 4ac
129000 1290002 4 115 34422000
s=
=
2a
2 115
s 684 or 437
Since s < S = 560, (s, S) = (437, 560).
14
(3) Assume optimal quantity will be ordered. What is the total expected cost when the initial inventory x = 0? What is the total expected cost when the initial inventory x = 700?
x = 0, order 560.
E[Cost of Ordering 560] = 1500 + 50(560) + 100E[(D 560)+ ] + 15E[(560 D)+ ]
= 1500 + 50(560) + 100 96 + 15 56 = 39940
x = 700, order nothing.
E[Cost] = 100E[(D 700)+ ] + 15E[(700 D)+ ]
Z
Z 900
15
100 900
+
(x 700) dx +
(700 x)+ dx
=
600 300
600 300
Z
Z 700
1 900
1
=
(x 700)dx +
(700 x)dx
6 700
40 300
1
=
[100(700 900)2 + 15(700 300)2 ]
1200
5333
15
16