You are on page 1of 57

Chapter 3: Lotsizing with Time Varying

Demand
 Characteristics
 Some Approaches
 Basic model

 Wagner – Whitin algorithm.

 Heuristic methods:
 Silver – Meal algorithm

 Other heuristics

 Network Representation -DP


1. 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
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
2. Some Approaches
 Basic economic quantity (EOQ):
¨ Useful when the variation of demand is low.
 Optimal solution given by mathematical models:
¨ Wagner – Whitin algorithm.
 Heuristic methods:
¨ Silver – Meal algorithm
¨ EOQ expressed as a time supply (POQ)
¨ Least unit cost (LUC)
¨ Part-Period Balancing (PPB)

4
2.1. 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.
Items produced/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.

5
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.

6
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

7
Example

8
The Lot for Lot Solution (L4L)

9
The Fixed Order Quantity Solution (FOQ)

Qt=100

1
The Fixed Order Period Solution (POQ)

11
Practice
The orders give the following production schedule for kitchen
tables. Leadtime = 2 weeks. Safety stock = 0. Plan order by:
 Lot-4-Lot
 FOQ = 230
 POQ = 3 periods

kitchen tables
Week 1 2 3 4 5 6 7 8
Gross Requirement 150 120 150 120
Scheduled Receipts 230
On-hand 37
Planned Receipts
Planned Order Releases
Solution
A Mixed Integer Linear Program
(MILP) Formulation
advantage of this: can get optimal solution
disadvantage: it can solved short period problem

inventory balance
constraint

capacity constraint: limit


MOQ<= order quantity
MOQ: minimum order quantity

Yt: binary show that period t we order or not order

A: ordering cost
C: buying cost 14
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) run faster than
branch and bound

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

Or: “Under an optimal lot-sizing policy either the inventory carried to period t+1
from the previous period will be zero or the production quantity in period t+1 will be
zero”
Property 2
▪ 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


2.2. The Basic Idea of the
Wagner-Whitin Algorithm
Try to minimize the total cost of replenishment and carrying inventory

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*.
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. then repeat solved the problems until the end

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.

1
Example

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

Q1= D1+D2
 Step 2: Two choices, either j2 *= 1 or j2 = 2.
* Q1=D1, Q2=D2

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

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

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

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

And so on.
2
3
Example Solution

????
A replenishment takes place when the inventory
level is zero
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.

2
Practice
The orders give the following delivery schedule for instant
noodle boxes (‘000) with associated information. Apply W-W
to develop order plan

Instant noodle boxes (‘000)


Week 1 2 3 4 5 6 7 8
Dt 30 40 10 20 50 40 40 20
Ct 12 12 12 12 12 12 12 12
At 150 150 150 150 150 150 150 150
ht 1 1 1 1 1 1 1 1
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

2
2.3. 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.

28
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. (FOQ)

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


all the demand for the next P periods. (POQ)

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


29
2.3.1. The Silver-Meal Heuristic

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.

30
The Silver-Meal Algorithm
Step 1: Set t = 1

Step 2:

Step 3: t’=t+1

Step 4: If t’ > T, go to step 7. Otherwise go to step 5

Step 5:

31
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.

32
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

33
Example
z1,1 = 40 + 20 = 60=40+2*10
z1,2 = (60 + 4 + 2)/2 = 66/2=33 < 60 60+2*2+2*1
z1,3 = 114/3 = 38>33 66+12*2+2*12*1

So the heuristic sets Q1 = 12. Next,


z3,3 = 64
z3,4 = 76/2 = 36 < 64
z3,5 = 132/3 = 44>36

So, Q3 = 16. Next,


z5,5 = 68.

Since we have reached the end of the planning horizon, the heuristic sets Q5 = 14.

34
Practice
The orders give the following delivery schedule for instant
noodle boxes (‘000) with associated information. Apply S-M
to develop order plan

Instant noodle boxes (‘000)


Week 1 2 3 4 5 6 7 8
Dt 30 40 10 20 50 40 40 20
Ct 12 12 12 12 12 12 12 12
At 150 150 150 150 150 150 150 150
ht 1 1 1 1 1 1 1 1
2.3.2.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.

3
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. (divide to
total order quantity)
 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
order/setup cost.

3
2.4. 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. include demand from t to t'-1

38
The Network

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


39
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.

40
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:

41
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.

42
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

43
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

44
Example
1 6

2 5

3 4

45
Example (Continued…)
1 6

2 5

3 4

46
Example (Continued…)
1 6

2 5

3 4

47
(Continued…)
1 6

2 5

3 4

48
Example (Continued…)
1 6

2 5

3 4

49
Example (Continued…)
1 6

2 5

3 4

50
Example (Continued…)
1 6

2 5

3 4

51
Example (Continued…)
1 6

2 5

3 4

52
Example (Continued…)
1 6

2 5

3 4

53
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

54
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
c14=40+2*24+1*2+2*12=114
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 = 90, c5,6 = 68


z6* = min (218, 226, 198, 204, 202) = 198
p6*= 3
Practice
The orders give the following delivery schedule for instant
noodle boxes (‘000) with associated information. Apply DP
to develop order plan

Instant noodle boxes (‘000)


Week 1 2 3 4 5 6 7 8
Dt 30 40 10 20 50 40 40 20
Ct 12 12 12 12 12 12 12 12
At 150 150 150 150 150 150 150 150
ht 1 1 1 1 1 1 1 1

You might also like