Forecasting (Production Planning)
Forecasting (Production Planning)
2
Hierarchy of Production Planning Decisions
▪ A hierarchy of decisions, during which some aggregate planning has to be done before detailed
planning and scheduling can be made.
Forecasting
Methods
Qualitative Quantitative
6
Time Series Forecasting
Forecasting of fast demand
7
Time series Exploration
Demand Patterns Over Time: Any time series (i.e. data over time) is composed of the following:
DATA = Level + Trend + Seasonality + Random Variation
DATA = PATTERN + Random Variation
(a) Level or Horizontal Pattern: Data follow a
(b) Trend Pattern: Data are progressively
horizontal pattern around the mean
increasing (shown) or decreasing
Quantity
Quantity
Time Time
(c) Seasonal Pattern: Data exhibit a regularly (d) Cycle: Data increase or decrease over time
repeating pattern (Data patterns created by economic fluctuations)
Quantity
Quantity
Time (Quarters) 8
Time (Quarters)
Time series Exploration…
DATA = Level + Trend + Seasonality + Random Variation
DATA = PATTERN + Random Variation
9
Measures of Forecast Accuracy: Two Approaches
Forecast
Accuracy
Approaches
In-Sample Out-of-sample
10
Beware of over-fitting
▪ A model which fits the data well does not necessarily forecast well.
▪ Over-fitting a model to data is as bad as failing to identify the systematic pattern in the data.
▪ Problems can be overcome by measuring true out-of-sample forecast accuracy. That is, total data divided
into “training” set and “test” set.
Available data
Training set Test set
(e.g., 80%) (e.g., 20%)
Training set used to estimate parameters. Forecasts are made for test set.
▪ The test set must not be used for any aspect of model development or calculation of forecasts.
11
Measures of Forecast Accuracy
Let 𝑦𝑡 denote the 𝑡 𝑡ℎ observation and 𝐹𝑡 denote its forecast based on all previous data, where 𝑡 = 1, … , 𝑇.
Then the following measures are useful.
σ𝑇𝑡=1 𝐴𝑡 − 𝐹𝑡
𝑀𝐴𝐸 =
𝑇
σ𝑇𝑡=1(𝐴𝑡 − 𝐹𝑡 )2 ▪ MAE, MSE, RMSE are all scale dependent.
𝑀𝑆𝐸 =
𝑇
▪ MAPE is scale independent but is only sensible if 𝐴𝑡 > 0 for all t.
σ𝑇𝑡=1(𝐴𝑡 − 𝐹𝑡 )2
𝑅𝑀𝑆𝐸 = ▪ MASE is also scale independent
𝑇
𝐴𝑡 − 𝐹𝑡
σ𝑇𝑡=1
𝐴𝑡
𝑀𝐴𝑃𝐸 = × 100
𝑇
12
Moving Average Method
▪ Simple moving average Ft +1 = A t / n
where
o Stable demand with no pronounced
behavioral patterns Ft+ 1 = Forecast for period t+1
At = Actual demand in period t
n = number of periods in the moving average
o Uses several demand values during the
recent past to develop a forecast o Moving averages are computed for specific
periods, such as 3 or 5 months.
o The average value over a set time period
(e.g.: the last four weeks) o If the variations in the variable remain
reasonably constant over time, a large n is
recommended.
o Each new forecast drops the oldest data
point & adds a new observation o Otherwise, if the data exhibit change patterns, a
small value of n is advisable.
13
Simple Moving Average
Actual 3-SMA Absolute Actual 5-SMA Absolute
Month Error Month Error
Demand Forecast Error Demand Forecast Error
June 1311 839 472 472 June 1311 712 599 599
September 822 1114 -292 292 September 822 1027 -205 205
November 599 897 -298 298 November 599 1011 -412 412
December 608 771 -163 163 December 608 869 -261 261
14
Weighted Moving Average Method
Adjusts moving average method to more closely reflect data fluctuations.
Ft +1 = w t A t
where
Ft+ 1 = Forecast for period t+1
wt = 1.00
15
Weighted Moving Average
𝑇𝑎𝑘𝑒 𝑤1 = 0.2, 𝑤2 = 0.3, 𝑤3 = 0.5
Actual 3-WMA Absolute Error Absolute %
Month Error
Demand Forecast Error Squared Error
January 437
February 605
March 722
April 893
May 901
June 1311
July 1055
August 975
September 822
October 893
November 599
December 608
January
16
Exponential Smoothing Methods
▪ Weighted Moving Average & Simple Exponential Smoothing Method
o Useful if the recent changes in the data are significant and unpredictable
instead of just random fluctuations
17
Simple Exponential Smoothing Method
ℓ 𝑇 = 𝛼𝑦𝑇 + (1 − 𝛼)ℓ 𝑇−1 where is a smoothing constant between 0 and 1.
= 𝛼𝑦𝑇 + (1 − 𝛼)[𝛼𝑦𝑇−1 + (1 − 𝛼)ℓ 𝑇−2 ]
18
Simple Exponential Smoothing Method
0.0 1.0
If = 0, then
Ft +1 = 0 At + 1 Ft = Ft
Forecast does not reflect recent actual demand
If = 1, then
Ft +1 = 1 At + 0 Ft = At
Forecast based only on most recent demand i.e. it is the same as the naïve forecast.
19
Simple Exponential Smoothing Method: Example
𝑭(𝒕+𝟏) = 𝜶𝒀𝒕 + 𝟏 − 𝜶 𝑭𝒕
𝑭𝟐 = 𝒀𝟏 = 𝟐𝟎𝟎
𝑭𝟑 = 𝟎. 𝟏 𝟏𝟑𝟓 + 𝟎. 𝟗(𝟐𝟎𝟎)
20
Simple Exponential Smoothing Method: Example # 2
Application of exponential smoothing to inventory demand for product E15
with α = 0.654 chosen by minimizing the MSE.
21
Holt's linear method: Example
α = 0.501 & β = 0.072 chosen by minimizing the MSE.
Initialization Values:
Set L1 = Y1 = 143; & b1 = Y2 – Y1 = (152 – 143 = 9)
22
Holt-Winters' trend and seasonality Method
Additive seasonality Multiplicative seasonality
▪ To determine initial estimates of the seasonal indices we need to use at least one complete season’s data (i.e., s
periods).
o Level is initialized by taking the average of the first season:
1
• 𝐿𝑠 = 𝑠 𝑌1 + 𝑌2 + ⋯ + 𝑌𝑠
o To initialize trend, it is convenient to use two complete seasons (i.e., 2s periods):
1 𝑌 −𝑌 𝑌 −𝑌 𝑌 −𝑌
• 𝑏𝑠 = 𝑠 𝑠+1𝑠 1 + 𝑠+2𝑠 2 + ⋯ + 𝑠+𝑠𝑠 𝑠
Additive Multiplicative
The seasonal indices are initialized using the ratio of the
𝑆1 = 𝑌1 − 𝐿𝑠 , 𝑆2 = 𝑌2 − 𝐿𝑠 , … , 𝑆𝑠 = 𝑌𝑠 − 𝐿𝑠 first few data values to the mean of the first year so that
𝑌1 𝑌2 𝑌𝑠
𝑆1 = , 𝑆2 = , … , 𝑆𝑠 =
𝐿𝑠 𝐿𝑠 𝐿𝑠
23
Holt-Winters' trend and seasonality Method: Example
Quarterly sales data
24
Multiplicative Holt-Winters' Method: Example…
α= 0.822, β = 0.055, γ = 0.00
▪ Level Initial Value:
1
o 𝐿4 = 362 + 385 + 432 + 341 = 380
4
▪ Trend Initial Value:
1 382−362 409−385 498−432 387−341
o 𝑏4 = + + + = 9.75
4 4 4 4 4
▪ Seasonal Initial Value:
362 385
o 𝑆1 = = 0.953, 𝑆2 = = 1.013
380 380
432 341
o 𝑆3 = = 1.137, 𝑆4 = = 0.897
380 380
25
Multiplicative Holt-Winters' Method: Example…
26
Q&A
27