You are on page 1of 70

IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Lot Sizing with


Time–varying Demand
Dao Vu Truong Son
Email: dvtson@hcmiu.edu.vn

1
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Contents

• Characteristics

• Wagner – Whitin algorithm.

• Heuristic method:

• Silver – Meal algorithm

• Other heuristics

2
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

D
Q

T
• Infinite planning horizon

• Demand D is constant

 Highly impractical, D usually changes with time

 Production quantity changes with time

 inventory problems change with time


IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Characteristics
 Demand varies from period to period

 The demand for each period is exactly known

 Costs may vary from period to period

 Capacity may vary from period to period

4
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Big versus Small Buckets


 Big time-bucket models
 Items produced/ordered in a period can be used to satisfy
the demand for that period

 Small time-bucket models


 Production/supply leadtimes can take multiple periods

5
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Some Approaches
 Basic economic quantity (EOQ):
• Useful when the variation of demand is low.
 Optimal solution given by mathematical models:
• Wagner – Whitin algorithm.
 Heuristic (rule-based) method:
• Silver – Meal algorithm
• EOQ expressed as a time supply (POQ)
• Least unit cost (LUC)
• Part-Period Balancing (PPB)
6
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Assumptions for the Basic Model

Demand varies from period to period but is exactly known for


each period.
Demand in each period must be satisfied during the same
period (backordering is not allowed).
There are no limits on how much can be produced or ordered.
Itemsproduced/ordered in a period are available to satisfy
demand during the same period (big bucket model).
Setup/ordering, production/purchasing, and inventory holding
costs can vary period to period.

7
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Objective

Determine the optimal order quantity (lot size) in each


period so that the demand in each period is met while
the sum of ordering, purchasing, and inventory
holding costs are minimized.

8
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Notation
• t: a period (e.g., day, week, month); t = 1, … ,T, where T represents the
planning horizon
• Dt: demand in period t (number of units)
• ct: unit purchasing/production cost
• At (or Co,t): ordering/setup cost associated with placing an order (or initiating
production) in period t
• ht (or Ch,t): cost of holding one unit of inventory from period t to period t +1
• Qt: the size of the order (or lot size) in period t; a decision variable

9
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example

10
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

The Lot for Lot Solution

Order to satisfy exactly as demand in 1 period??

11
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

The Lot for Lot Solution

12
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

The Fixed Order Quantity Solution

Combine order to satisfy demand in a few periods


In this example,
a. use Q1 = Q4 = Q7 = 100
b. Q1 = D1 + D2; Q3 = D3+D4; …Q9 = D9+D10

13
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

The Fixed Order Quantity Solution

14
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

The Fixed Order Period Solution

15
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

A Mixed Integer Linear


Program (MILP) Formulation

16
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Solution Approach
Solve as a standard MILP (using for example a branch and
bound algorithm); several commercial MILP solver software tools
are available

Develop a customized solution that takes advantage of structural


properties specific to the problem (e.g., the Wagner-Whitin
algorithm)

17
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Property 1
A replenishment takes place when the inventory level is zero

Property II
There is an upper limit to how far a period j we would
include its requirements D(j) in a replenishment quantity.
Eventually, the carrying costs become so high that it is less
expensive to have a replenishment arrive at the start of period
j than to include its requirements in a replenishment from
many periods earlier

18
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

The Basic Idea of the


Wagner-Whitin Algorithm
zk* : the total costs of the best replenishment strategy that
satisfies the demand requirements in periods 1,2,…k.

Using property 1, either Qt=0 or Qt=Dt+…+Dk for some k.

If jk*
= t = last period when we have place order exactly Dt+
Dt+1 …Dk in period jk*.

19
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

The Basic Idea of the


Wagner-Whitin Algorithm
Construct an algorithm where the decision is whether or not
to order in a given period. If we order, then the order quantity
should be just enough to cover demand until the next period
in which we order.

Solve a series of smaller sub-problems (a one period problem,


a two period, …., N period problem), where the solution to
each sub-problem is used in solving the next subproblem.

20
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example

21
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example
 Step 1: Obviously, just satisfy D1 (note we are neglecting
production cost, since it is fixed).

 Step 2: Two choices, either j2* = 1 or j2* = 2.

22
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example (Continued…)
 Step3: Three choices, j3* = 1, 2, 3.

23
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example (Continued…)
 Step 4: Four choices, j4* = 1, 2, 3, 4.

24
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example (Continued…)
 Step 5: Only two choices, j5* = 4, 5.

 Step 6: Three choices, j6* = 4, 5, 6.

And so on.

25
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example Solution

26
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example Solution
 Optimal Policy:
• Order in period 8 for 8, 9, 10 (40 + 20 + 30 = 90 units)
• Order in period 4 for 4, 5, 6, 7 (50 + 50 + 10 + 20 = 130
units)
• Order in period 1 for 1, 2, 3 (20 + 50 + 10 = 80 units)

 Note: we order in 7 for an 8 period problem, but this never


comes into play in optimal solution.

27
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Disadvantages
 The algorithm is too complicated.
 Need a well – defined ending point.
 The replenishment quantities should not change.
 Replenishments can be made only in discrete interval

28
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Assignment 1 (optional)
 Using any software (Matlab, Excel, Cplex) to get
optimal ordering policy
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Assignment 2
 Find the optimum ordering policy using the following
data using Wagner-Whitin algorithm

Month Demand Setup cost Inv. Cost


1 80 60 2
2 60 40 2
3 40 60 1
4 70 45 2
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Assignment 3
 Demand for a 12-month horizon is as follows: 400; 600;
1000; 800; 1200; 900; 800; 1000; 1200; 700; 600; 800.
 Inventory holding is 20% of unit prize C = $20.
 Ordering cost is $300 per time. Calculate total cost
 a. using lot-for-lot approach.
 b. Using fixed order quantity, 4 times a year.
 c. Using fixed order quantity, 2 times a year.
 d. Using Wagner-Whitin approach.
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Heuristics
Instead of solving the problem optimally, we could use a
heuristic (a rule) that leads to reasonably good solutions but not
necessarily optimal.

The advantage of heuristics is ease of implementation and lower


computational effort to reach a solution.

32
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Heuristics
Example
Choose a fixed order quantity and order in multiples of this
order quantity. Order again when demand in a period cannot be
met from available inventory.

Choose a fixed order period P. Then, every P periods order all


the demand for the next P periods.

 Use a greedy heuristic such as the Silver-Meal heuristic.


33
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Heuristic approach

• Practice requires fast calculation  “good enough”


solutions are preferred

• Rolling forecasts are normal  no fixed periods for


integer and dynamic programming

 Simpler approaches are required: rule-based or


heuristics.
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Other heuristic approaches


 The EOQ expressed as a Time Supply (POQ)
 The EOQ is determined by using the average demand D

 Determine the time supply of EOQ (rounded to the nearest integer)

 The order are placed to cover TEOQ periods.

35
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Other heuristic approaches

 The Least Unit Cost (LUC):


• The same approach of Silver – Meal except the average cost per
unit is used instead of average cost in Silver – Meal approach.
 The Part – Period Balancing (PPB):
• Select the number of periods covered by the replenishment such
that the total carrying costs are made as close as possible to the
setup cost.

36
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

PPB
 Initial value of the trial lot size should be the same as the
initial net requirement
 Try to use order cost/holding cost as a economic part
period (EPP)
 Select the number of periods covered by the
replenishment such that the total carrying costs are made
as close as possible to the setup cost.
 Part periods = sum of products of inv. And number of
holding periods
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

 Setup cost $80


 Inv. Holding cost $2/unit/week

1 2 3 4 5 6 7
Demand 20 40 0 20 15 0 20
Order
Inv.

1. L4L total cost 5* $80 = $400.


IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

 EOQ heuristics:
 Avg Demand = 115/7 = 16.43 units
 Q = Sqrt(2*16.43*80/2) = 36.3 units  use 37

1 2 3 4 5 6 7
Demand 20 40 0 20 15 0 20
Order 37 37 37 4
Inv 17 14 14 31 16 16 0

Use EOQ formula: TC = 36.3*$2/2 + 16.43*$80/36.3 = $72.5


Weekly  $72.5 x 7 = $507.5
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

1 2
PPB 3 4 5 6 7
Demand 20 40 0 20 15 0 20

 Per. Lot size Part periods


 1 20 20(0) = 0
 1,2 20+40=60
 2 40 40(0)=0
 2,3 40+0=40 40(0)+0(1)=0
 2,3,4 60
 4 20 20(0)=0
 4,5 35 20(0)+15(1)=15
 4,5,6 35 20(0)+15(1)+0(2)=15
 4,5,6,7 55
 7 20 20(0)=0
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

1 2 3 4 5 6 7

Demand 20 40 0 20 15 0 20

Order 20 40 35 20

Inv 0 0 0 15 0 0 0

Inv cost 0 0 0 30

Setup 80 80 80 80
cost

Total cost: $320 + $30 = $350


L4L cost: $400
EOQ cost: $507.5
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

The Silver-Meal Heuristic


This is a forward method that requires determining the
average cost per period as a function of number of periods
the current order to span.
𝐴 + ℎ𝑑2 + 2ℎ𝑑3 + ⋯ + 𝑗 − 1 ℎ𝑑𝑗
𝐶(𝑗) =
𝑗
A: fixed cost, h: holding cost, d: demand
Starting with a period t, order for the next k periods if the
resulting average cost per period zt,t+k is smaller than the
average cost per period if we ordered only for the next (k-
1) periods. 42
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

The Silver-Meal Algorithm


Step 1: start the calculation from period 1 to next period
C(1)=A;
C(2)=(A+hd2)/2;
C(3)=(A+hd2+2hd3)/3

Step 2: Stop the calculation when C(j)>C(j-1)

Step 3: set Q1=d1+…+dj-1

Step 4: Start over at period j, repeat step 1-3.

43
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

The Silver-Meal Algorithm


Step 6: If zt,t’ ≤ zt,t’-1 , set t’= t’+1 and go to step 4. Otherwise
go to step 7.

Step 7: Set Qt = Dt + Dt+1 + … + Dt’-1

Step 8: Set t=t’.

Step 9: If t > T, stop. Otherwise, go to step 2.

44
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

1 2 3 4 5 6 7

Demand 20 40 0 20 15 0 20

• C(1) = 80
• C(2) = (80 + 40*2)/2 = 160/2 = 80
• C(3) = (80 + 40*2 + 2*2*0)/3 = 53.33
• C(4) = (80 + 40*2 + 0 + 3*2*20)/4 = 70  stop
• Q1 = 20 + 40 + 0 = 60
• Start at period 4:
• C(1) = 80
• C(2) = (80 + 15*2)/2 = 55
• C(3) = (80 + 30 + 2*0)/3 = 36.67
• C(4) = (80 + 30 + 0 + 3*2*20)/4 = 55  stop
• Q2 = 20 + 15 = 35
• Q3 = 20
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

1 2 3 4 5 6 7

Demand 20 40 0 20 15 0 20

Order 60 35 20

Setup 80 80 80
cost
Inv. 40 0 0 15 0 0 0

Inv. cost 80 0 0 30

• Total cost: 240 + 80 + 30 = 350 Silver-Meal

• Remember, total cost: 350 PPB; 400 L4L; 507.5 EOQ


IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Least unit cost

• The LUC is to select the number of periods covered by


the replenishment order such that the total relevant cost
per unit demand is minimized.

• Minimize cost per unit demand

• C(j) = (A + hd2 + 2hd3 + … +(j-1)hdj)/(d1 + d2 +…+ dj)


IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

LUC
• Step 1: Start the calculation from period 1 to next period

• C(1) = A/d1;

• C(2) = (A + hd2) / (d1+d2)

• C(3) = (A+hd2+2hd3)/(d1+d2+d3)

• Step 2: stop the calculation when C(j)>C(j-1)

• Step 3: set Q1 = d1+d2+..dj-1

• Step 4: Start over at period j, repeat step 1 - 3


IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

LUC
1 2 3 4 5 6 7
Demand 20 40 0 20 15 0 20

• Starting in period 1:
• C(1) = 80/20=4
• C(2) = (80+2*40)/(20+40)=2.67
• C(3) = (80+2*40+0)/(20+40+0)=2.67
• C(4) = (80+80+3*2*20)/(20+40+20)=3.5  stop
• Q1 = 20 + 40 = 60
• Starting in period 4:
• C(1) = 80/20 = 4
• C(2) = (80+2*15)/(20+15) = 3.14
• C(3) = (80+30)/(35)=3.14
• C(4) = (80+30+3*2*20)/(20+15+20)=4.18  stop
• Q2 = 20+15 = 35
• Q3 = 20
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

1 2 3 4 5 6 7

Demand 20 40 0 20 15 0 20

Order 60 35 20

Setup 80 80 80
cost
Inv. 40 0 0 15 0 0 0

Inv. cost 80 0 0 30

• LUC, Silver-Meal, PPB give the same result for this case:
350 (it may not be true for other cases)

• EOQ: 507.5; L4L 400


IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Assignment (contd)
 Demand for a 12-month horizon is as follows: 400; 600;
1000; 800; 1200; 900; 800; 1000; 1200; 700; 600; 800.
 Inventory holding is 20% of unit prize C = $20.
 Ordering cost is $300 per time. Calculate total cost
 a. Using lot-for-lot approach.
 b. Using Wagner-Whitin approach.
 c. Using Silver Meal approach
 d. Using Part Period Balancing approach
 e. Using Least Unit Cost approach
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

A Network Representation

The lot sizing problem can be represented as a


network, where each node t represents a period
and an arc from node t’ to node t represents the
fact that we order (or produce) in both periods t’
and t but not in periods in between.

52
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

The Network

Node 6 is a pseudo node representing the “end” of the problem.


53
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example Path

Interpretation: Order (or produce) in periods 1, 3, and 4


so that Q1 = D1 + D2 ; Q2 = 0; Q3 = D3; Q4 = D4 + D5 ; and Q5 = 0

54
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Arc Costs

The cost ct’,t of reaching node t from t’ is the cost of


ordering in t’ but not in t’+1, t’+2, …, t-1:

55
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Key Insight

Finding the minimum cost solution is equivalent to


finding the least costly path (shortest path) in the
network to go from node 1 to node T+1, where T is
number of periods.

56
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

A Dynamic Programming Algorithm


to Find the Least Costly Path
Step 1: t = 1, zt* = 0

Step 2: t = t+1. If t > T+1, stop. Otherwise go to step 3.

Step 3: For all t’ = 1, 2, …, t - 1,

Step 4: Compute

57
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

A Dynamic Programming Algorithm


to Find the Least Costly Path (cont.)
Step 5: Compute

(that is, choose the period t’ that minimizes )

Step 6: Go to to step 2.

The optimal cost is given by

The optimal set of periods in which ordering/production takes


place can be obtained by backtracking from
58
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example
1 6

2 5

3 4

59
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example (Continued…)
1 6

2 5

3 4

60
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example (Continued…)
1 6

2 5

3 4

61
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

(Continued…)
1 6

2 5

3 4

62
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example (Continued…)
1 6

2 5

3 4

63
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example (Continued…)
1 6

2 5

3 4

64
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example (Continued…)
1 6

2 5

3 4

65
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example (Continued…)
1 6

2 5

3 4

66
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example (Continued…)
1 6

2 5

3 4

67
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example

t Dt At ct ht

1 10 40 2 1
2 2 40 2 1
3 12 40 2 1
4 4 40 2 1
5 14 40 2 1

68
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example
z1*= 0

c1,2 = 40 + 20 = 60
z2*= z1*+ c1,2 = 0+60=60
p2*= 1

c1,3 = 40 + 24+2 = 66
c2,3 = 40 + 4 = 44
z3* = min (z1*+ c1,3, z2*+ c2,3) = min (66, 104) = 66
p3*= 1

69
IU ISE506IU: INVENTORY CONTROL & MANAGEMENT I S E

Example
c1,4 = 114, c2,4 = 80, c3,4 = 64
z4* = min (z1*+ c1,4, z2*+ c2,4, z3*+ c3,4) = min (114, 140, 130) =114
p4*= 1

c1,5 = 134, c2,5 = 96, c3,4 = 76, c4,5 = 48,


z5* = min (134, 156, 142, 162) = 134
p5*= 1

c1,6 = 218, c2,6 = 166, c3,6= 132, c4,6 = 86, c5,6 = 68


z6* = min (218, 226, 198, 200, 202) = 198
p6*= 3

70

You might also like