Upload
justin-weaver
View
230
Download
3
Tags:
Embed Size (px)
Citation preview
IE5403 Facilities Design and Planning
Instructor: Assistant Prof. Dr.
Rıfat Gürcan Özdemir
http://web.iku.edu.tr/~rgozdemir/IE551/index(IE551).htm
Course topics
Chapter 1: Forecasting methods Chapter 2: Capacity planning Chapter 3: Facility location Chapter 4: Plant layout Chapter 5: Material handling and storage
systems
Grading
Participation 5% Quizzes 15% (4 quizzes) Assignment 15% (every week) Midterm 130% (chapters 1 and 2) Final 35% (all chapters)
3
4
IE5403 - Chapter 1
Forecasting methods
5
Forecasting
Forecasting is the process of analyzing the past data of a time – dependent variable & predicting its future values by the help of a qualitative or quantitative method
6
Why is forecasting important?
Proper forecasting
Better use of capacity
Reduced inventory costs
Lower overall personel costs
Increased customer satisfaction
Poor forecasting Decreased profitability
Collapse of the firm
7
Planning horizondemand
timenow
past demand
planning horizon
actual demand?
actual demand?
Forcast demand
8
Designing a forcasting systemForecast need
Data avilable?
Quantitative?
Analyze data
YES
Causal factors?
YES
Causal approach
YES
Collect data?
NO
YES
Qualitative approach
NO
Time series
NO
NO
9
Regression Methods
Model
dependent variable
independent variable
Unknown parameters
Random error componenttt tbax
xt
t
Simple linear model
xt = a + b t
10
Estimating a and b parameters
xt
t
xt = a + b t
e1
e2
e5
e3
e4
T = 50
Such that sum squares of the errors (SSE) is minimized
forecast erroret = ( xt – xt )
11
Least squares normal equations
Least squares normal equations
T
tt
E tbaxa
SS
1
0)ˆˆ(2ˆ
T
tt
T
tttE tbaxxxSS
1
2
1
2 )ˆˆ()ˆ(
T
tt
E ttbaxb
SS
1
0)ˆˆ(2ˆ
T
tt
T
t
xtbTa11
ˆˆ
T
tt
T
t
T
t
xttbta11
2
1
ˆˆ
12
(xt – xt)2unexplained deviation =
(xt – xt)2 = explained deviation
xt
Coefficient of determination (r2)
xt
xt
t
(xt – xt)2 = total deviation
2
22
)(
)ˆ(
total
explained
tt
tt
xx
xxr , 0 r2 1
13
Coefficient of corelation (r)
r = coeff. of determination = r2
Sign of r ,(– / +), shows the direction,of the relationship between xt and t
( )or
r shows the strength of relationship between xt and t
]][[2222
2
tt
tt
xxTttT
xttxTrr
– 1 r 1
14
Example – 3.1 It is assumed that the monthly furniture sales in a city is directly proportional to the establishment of new housing in that month
a) Determine regression parameters, a and b
b) Determine and interpret r and r2
c) Estimate the furniture sales, when expected establishment of new housing
is 250
15
Example – 3.1(continued)
Month
New Housing
/month
Furniture
Sales /month
($1000)
Jan. 100 461
Feb. 110 473
March 96 450
April 114 472
May 120 481
June 160 538
Month
New Housing
/month
Furniture
Sales /month
($1000)
July 150 540
Aug. 124 517
Sep. 93 449
Oct. 88 452
Nov. 104 454
Dec. 116 495
16
Example – 3.1(solution to a)
T = 12
xt = 5782
txt = 670,215
t = 1375
t2 = 162,853
t xt
100 461
110 473
96 450
114 472
120 481
160 538
150 540
124 517
93 449
88 452
104 454
116 495
t2
10,000
12,100
9216
12,996
14,400
25,600
22,500
15,376
8649
7744
10,816
13,456
txt
46,100
52,030
43,200
53,808
57,720
86,080
81,000
64,108
41,757
39,776
47,216
57,420
a T + b t = xt
a t + b t2 = txt
17
Example – 3.1(solution to a)
12 a + 1375 b = 5782
a 1375 + b 162,853 = 670,215
1375 x
– 12 x
b (1375 2 – 12 x 162,853)= (1375 x 5782 – 12 x 670,215)
b(1375 2 – 12 x 162,853)
(1375 x 5782 – 12 x 670,215)= = 1.45
18
Example – 3.1(solution to a)
b = 1.4512 a + 1375 b = 5782
a 1375 + b 162,853 = 670,215
a12
(5782 – 1375 x 1.45)= = 315.5
xt = a + b t
xt = 315.5 + 1.45 t
19
Example – 3.1(solution to b)
t xt
100 461
110 473
96 450
114 472
120 481
160 538
150 540
124 517
93 449
88 452
104 454
116 495
T 12xt =
xt 5782= = 482
xt = 315.5 + 1.45 (100) = 461
461
475
455
481
490
548
533
495
450
443
466
484
xt
20
Example – 3.1(solution to b)
t xt
100 461 461 -21 -21
110 473 475 -7 -9
96 450 455 -27 -32
114 472 481 -1 -10
120 481 490 8 -1
160 538 548 66 56
150 540 533 51 58
124 517 495 13 35
93 449 450 -32 -33
88 452 443 -39 -30
104 454 466 -16 -28
116 495 484 2 13
xt xt xtxt xt
Explained deviation
xtxt
xt
t
Total deviation
xtxt
xt
t
21
Example – 3.1(solution to b)
t xt
100 461 461 -21 -21 441 441
110 473 475 -7 -9 49 81
96 450 455 -27 -32 729 1.024
114 472 481 -1 -10 1 100
120 481 490 8 -1 64 1
160 538 548 66 56 4.356 3.136
150 540 533 51 58 2.601 3.364
124 517 495 13 35 169 1.225
93 449 450 -32 -33 1.024 1.089
88 452 443 -39 -30 1.521 900
104 454 466 -16 -28 256 784
116 495 484 2 13 4 169
xt xt xtxt xt xt xt( )2xt xt( )2
22
Example – 3.1(solution to b)
r2 =
xt xt( )2
xt xt( )2=
11.215
12.314= 0.91
Coefficient of determination:
91% of the deviation in the furniture sales can be explained by the
establishment of new housing in the city
23
Example – 3.1(solution to b)
= = 0.95r r2 = 0.91
Coefficient of corelation:
a very strong (+) relationship (highly corelated)
24
Example – 3.1(solution to b)
]][[ 2222
2
tt
tt
xxTttT
xttxTrr
xt2 = 2.798.274
r =12 x 670,215 – 1375 x 5782
[12 x 162,853 – (1375)2 ][12 x 2,798,274 – (5782)2]=0.95
r2 = (0.95)2 = 0.91
25
Example – 3.1(solution to c)
xt = a + b t
xt = 315.5 + 1.45 t t = 250
xt = 315.5 + 1.45 (250) = 678
xt = $ 678,000 x $1000
26
Components of a time series1. Trend ( a continious long term directional
movement, indicating growth or decline, in the data)
2. Seasonal variation ( a decrease or increase in the data during certain time intervals, due to calendar or climatic changes. May contain yearly, monthly or weekly cycles)
3. Cyclical variation (a temporary upturn or downturn that seems to follow no observable pattern. Usually results from changes in economic conditions such as inflation, stagnation)
4. Random effects (occasional and unpredictable effects due to chance and unusual occurances. They are the residual after the trend, seasonali and cyclical variations are removed)
27
Components of a time series
0
xt
t1 2 3 4 5 6 7 8
a2
a1
seasonal variation
trend slope
random effect
Year 1 Year 2
28
Simple Moving Average
Model
xt = a + t
xt
Constant process
t
xt = a
a
Forecast error
Simple Moving Average Forecast is average of N previous observations
or actuals Xt :
Note that the N past observations are equally weighted.
Issues with moving average forecasts: All N past observations treated equally; Observations older than N are not included at all; Requires that N past observations be retained.
T
NTttt
NTTTT
XN
X
XXTXN
X
11
111
1ˆ
)(1ˆ
1ˆ
TX
Simple Moving Average Include N most recent observations Weight equally Ignore older observations
weight
today
TT-1T-2...T+1-N
1/N
31
Parameter N for Moving Average
If the process is relatively stable choose a large N
If the process is changing choose a small N
32
Example 3.2Week Demand
1 6502 6783 7204 7855 8596 9207 8508 7589 892
10 92011 78912 844
What are the 3-week and 6-week Moving Average Forecasts for demand of periods 11, 12 and 13?
Weighted Moving Average Include N most recent observations Weight decreases linearly when age
of demand increases
34
Weighted Moving Average
WMT =
t=T-N+1
T
wt xt
t=T-N+1
T
wt
wt = weight value for xt
The value of wtis higher
for more recent data
35
Example 3.3
Month Sales
Jan. 10
Feb. 12
March 13
April ?
May ?
a) Use 3-month weighted moving average with the following weight valuesto predict the demand of april
b) Assume demand of april is realized as 16, what is the demand of may?
wT = 3
wT-1 = 2
wT-2 = 1
36
Exponential Smoothing Method
A moving average technique which places weights on past observations exponentially
ST = xT + ST-1
Smoothed value Smoothing constant
Realized demand at period T
Exponential Smoothing Include all past observations Weight recent observations much more heavily
than very old observations:
weight
today
Decreasing weight given to older observations
Exponential Smoothing Include all past observations Weight recent observations much more heavily
than very old observations:
weight
today
Decreasing weight given to older observations
10
Exponential Smoothing Include all past observations Weight recent observations much more heavily
than very old observations:
weight
today
Decreasing weight given to older observations
10
)1(
Exponential Smoothing Include all past observations Weight recent observations much more heavily
than very old observations:
weight
today
Decreasing weight given to older observations
10
2)1(
)1(
Exponential Smoothing Include all past observations Weight recent observations much more heavily
than very old observations:
weight
today
Decreasing weight given to older observations
10
3
2
)1(
)1(
)1(
Exponential Smoothing
211
22
11
)1()1(ˆ
)1()1(ˆ
tttT
tttT
XaXXX
XXXX
Exponential Smoothing
TTT XaaXX ˆ)1(ˆ1
211
22
11
)1()1(ˆ
)1()1(ˆ
tttT
tttT
XaXXX
XXXX
1)1( TTT SaaXS
44
The meaning of smoothing equation
ST = xT + ST-1
xTST = + ST-1ST-1
ST = xT+ ST-1ST-1( )
ST = xT+New forecast forfuture periods
ST-1 xT=Old forecast forthe most recent period
eT xT= xT –Forecast error
Exponential Smoothing
Thus, new forecast is weighted sum of old forecast and actual demand
Notes:Only 2 values ( and ) are required,
compared with N for moving averageParameter a determined empirically (whatever
works best)Rule of thumb: < 0.5Typically, = 0.2 or = 0.3 work well
TX̂TX
46
Choice of
Small Slower response
Large Quicker response
Equivelance between and N
=2
N+ 1 =2
N–
47
Example 3.4
Week Demand
1 820
2 775
3 680
Given the weekly demand data, what are the exponential smoothing forecasts for periods 3 and 4 using = 0.1 and = 0.6 ?
Assume that S1 = x1 = 820
48
Example 3.4 (solution for = 0.1) S1 = x1 = 820
S2 = x2 + S1
=x2 820
t xt St1 820
2 775
3 680
4
xt
S2 = 0.1(775) + 0.9(820) = 815.5
=x3 815.5
820
815.5 820
815.5801.95
801.95
49
Example 3.4 (solution for = 0.6) S1 = x1 = 820
S2 = x2 + S1
=x2 820
t xt St1 820
2 775
3 680
4
xt
S2 = 0.6(775) + 0.4(820) = 793.0
=x3 793.0
820
793.0 820
793.0725.2
725.2
50
Winters’ Method for Seasonal Variation
Model
xt = a + tb t( ) ct +
Constant parameter
Trend parameter
Seasonal factor for period t
Random error component
t
xt
51
Initial values of a cb, and
t=1
L
a0 =xt
L
b0 = 0
ct =xt
a0
t=1
Lct = L
ct values are valid
ct =Lct
t=1
Lct
ct values arenormalized :
YES
NO
for one year available demand data
52
Smoothing equations
11ˆˆ)1(
ˆˆ
TT
LT
TT ba
c
xa
]ˆ)[1(ˆˆˆ11 TTTT baab
0 < < 1
0 < < 1
0 < < 1LT
T
TT c
a
xc
ˆ)1(
ˆˆ
53
Forecast Equation
aT bT c(T+-L)x(T+) =( )+
= the smallest integer ≥L
54
Example 3.6
Month(2005) 1 2 3 4 5 6 7 8 9 10 11 12
Demand 4 2 5 8 11 13 18 15 9 6 5 4
a) Forecast the demand of Jan.’06 using Winters method with = 0.2, = 0.1, = 0.5
b) Forecast the demand of Feb.’06 when Jan.’06 realizes as 5 using Winters method with = 0.2, = 0.1, = 0.5
c) Forecast the demand of Mar.’06 and Mar.’07 when Feb.’06 realizes as 4 using Winters method with = 0.2, = 0.1, = 0.5
55
Example 3.6 (solution to a)
b0 = 0
t=1
L
a0 =xt
L=
100
12= 8.3
c1x(T+) = ( )+1a0 b0
c1 =x1
a0
=4
8.3= 0.48
t
1 0.48
2 0.24
3 0.60
4 0.96
5 1.32
6 1.56
7 2.16
8 1.80
9 1.08
10 0.72
11 0.60
12 0.48
12
ct
0.48x(12+1)= ( )+8.3 0 = 4
56
Example 3.6 (solution to b)
001213
1313
ˆˆ)1(ˆ
ˆ bac
xa
x13 = 5JAN.’06 realizes as:
]ˆ)[1(ˆˆˆ11 TTTT baab
LTT
TT c
a
xc
ˆ)1(
ˆˆ
= 0.2 50.48 + 0.8 8.3+ 0 = 8.72
= 0.1 8.72 – 8.3 + 0.9 0 = 0.043
= 0.5 58.72 + 0.5 0.48 = 0.53
c2x(T+) = ( )+1a13 b13
0.24x(13+1) =( )+8.72 0.043 = 2.11 x
Updated seasonal values should be normalized!
57
58
Example 3.6 (solution to c)FEB.’06 realizes as:
x14 = 4
0.5 410.34 + 0.5 0.24 = 0.31=c14
= 0.2 40.24 + 0.8 8.72 + 0.043 = 10.34a14
= 0.1 10.34 – 8.72 + 0.9 0.043 = 0.2b14
0.60x(14+1) =( )+10.34 0.2 = 6.31 x
0.60x(14+13) =( )+10.34 0.2 = 7.7613 x
Forecast of Mar.’06
Forecast of Mar.’07
59
Forecast accuracyForecast accuracy shows the performance of the model for complying with the demand process, and is measured by using forecast error
Forecast error is the difference between the actual demand and the forecast
Forecast Actual demand
xtet = xt –
Forecast error
60
Error measuresLooking at the error for an isolated period does not provide much useful information
Rather we will look at errors over the history of the forecasting system. There are several methods for this process, although each has different meaning
1. Cumulative (sum) error, Et
2. Mean error, ME3. Mean square error, MSE4. Mean absolute deviation, MAD5. Mean absolute percentage error, MAPE
61
Cumulative (sum) error, Et
Et should be close to zero if the forecast is behavingproperly. That is, sometimes it overestimates and sometimes it underestimates, but in the long run these should cancel out
T
ET =t=1
et
62
Mean error, ME
ME should be interpreted same as sum error, Et , that is, it shows whether the model is biased toward certain direction or not
n
ME = t=1
etn1
A forecast consistently larger than actual is called biased highA forecast consistently lower than actual is called biased low
63
Example 3.9
t xt
1 92 123 154 185 216 247 278 309 33
Validate the moving average (N=3) if it is suited to the given past data using ME and Et , and say if it is bias
64
Example 3.9 (solution)t xt MA(t-1) et
1 9
2 12
3 15
4 18 12 6
5 21 15 6
6 24 18 6
7 27 21 6
8 30 24 6
9 33 27 6
E9 = 6 + 6 +... + 6 = 36.00
ME = 1/n (et)= E9 / 6 = 6.00
BIASED LOW !
65
Mean square error, MSEn
MSE = t=1
etn1 2
MSE is mainly used to counteract the inefficiency in error measuring as negative errors (– et) cancel out the positive error terms (+ et)
By squaring the error terms, the “penalty” is increasedfor large errors. Thus a single large error greatly increases MSE
66
Mean absolute deviation, MAD
n
MAD = t=1
etn1
MAD is another error measure for solving the neutralizing problem
MAD measures the dispersion of the errors, and if MAD is small the forecast should be close to actual demand
67
Mean absolute percentage error, MAPEn
MAPE = t=1
PEtn1
PEt =xtxt –
xt
(100)
MAPE is mainly used to counteract the inefficiency in error measuring as the previously defined mesaures depend on the magnitude of the numbers being forecast
If the numbers are large the error tends to be large. Itmay more meaningful to look at error relative to the magnitude of the forecasts, which is done by MAPE
68
Example 3.11t xt
1 102 123 154 455 1306 1807 1708 1209 125
10 10011 12512 135
Compare a 3-period moving average model and a 6-period moving average model using given past data and show which suits better with respect to MSE, MAPE.
69
Example 3.11 (solution)t xt MA[3]t-1 et
1 102 123 154 45 12.335 130 24.006 180 63.337 170 118.33 51.678 120 160.00 -40.009 125 156.67 -31.67
10 100 138.33 -38.3311 125 115.00 10.0012 135 116.67 18.33
t=76
12MSE= et
1 21196.30=
70
Example 3.11 (solution)t xt MA[6]t-1 et
1 102 123 154 455 1306 1807 170 65.33 104.678 120 92.00 28.009 125 110.00 15.00
10 100 128.33 -28.3311 125 137.50 -12.5012 135 136.67 -1.67
t=76
12MSE= et
1 22154.32=
71
Example 3.11 (solution)
t xt MA[3]t-1 et Pet
7 170 118.33 51.67 30.398 120 160.00 -40.00 33.339 125 156.67 -31.67 25.33
10 100 138.33 -38.33 38.3311 125 115.00 10.00 8.0012 135 116.67 18.33 13.58
MA[6]t-1 et Pet
65.33 104.67 61.5792.00 28.00 23.33
110.00 15.00 12.00128.33 -28.33 28.33137.50 -12.50 10.00136.67 -1.67 1.23
MA[3] model results MA[6] model results
MAPE Pet12
= t=76
124.83= MAPE Pet
12=
t=761
22.74=
72
Example 3.11 (solution)
Error
measures
Forecast models
MA[3] MA[6]
MSE 2154.32
MAPE 24.83
1196.30
22.74