Transcript Document

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
 Quizzes
 Assignment
 Midterm 1
 Final

5%
15% (4 quizzes)
15% (every week)
30% (chapters 1 and 2)
35% (all chapters)
3
IE5403 - Chapter 1
Forecasting methods
4
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
5
Why is forecasting important?
Better use of capacity
Proper forecasting
Reduced inventory costs
Lower overall personel costs
Increased customer satisfaction
Decreased profitability
Poor forecasting
Collapse of the firm
6
Planning horizon
demand
actual
demand?
Forcast
demand
past demand
actual
demand?
now
time
planning
horizon
7
Designing a forcasting system
Forecast need
NO
YES
Collect data?
NO
NO
Data avilable?
YES
Analyze data
Quantitative?
YES
Causal factors?
NO
YES
Qualitative approach
Causal approach
Time series
8
Regression Methods
Unknown parameters
Model
xt
xt  a  b t   t
dependent
variable
Random error component
independent
variable
xt = a + b t
Simple linear model
t
9
Estimating a and b parameters
e5
xt
xt = a + b t
e3
e4
e1
Such that
sum squares of the errors
(SSE) is minimized
e2
0
T=5
t
forecast error
et = ( xt – xt )
10
Least squares normal equations
T
T
t 1
t 1
SSE   ( xt  xˆt ) 2   ( xt  aˆ  bˆt ) 2
T
SSE
 2 ( xt  aˆ  bˆt )  0
aˆ
t 1
T
SSE
 2 ( xt  aˆ  bˆt )t  0
bˆ
t 1
T
T
T
t 1
T
t 1
T
t 1
t 1
t 1
aˆT  bˆ t   xt
aˆ  t  bˆ t 2   t xt
Least squares
normal equations
11
Coefficient of determination (r2)
unexplained
deviation = (xt – xt)2
xt


xt


xt
(xt

(xt – xt)2 = explained



– xt)2 = total deviation

deviation


2
ˆ
(
x

x
)
explained  t t
2
r 

2
total
(
x

x
)
 t t
t
, 0  r2  1
12
Coefficient of corelation (r)
r =  coeff. of determination =  r2
r shows the strength of relationship between xt and t
Sign of r ,(– / +), shows the direction, (
of the relationship between xt and t
r r
2
or
)
T  txt   t  xt
[T  t   t  ][T  x   xt  ]
2
2
2
t
2
–1r1
13
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
14
Example – 3.1(continued)
New
Furniture
Month Housing Sales /month
/month
($1000)
Jan.
100
461
Feb.
110
473
March
April
May
96
114
120
450
472
481
June
160
538
New
Furniture
Month Housing Sales /month
/month
($1000)
July
150
540
Aug.
124
517
Sep.
93
449
Oct.
88
452
Nov.
104
454
Dec.
116
495
15
Example – 3.1(solution to a)
t2
t
xt
txt
100
461
10,000 46,100
110
473
12,100 52,030
96
450
9216 43,200
114
472
12,996 53,808
120
481
14,400 57,720
160
538
25,600 86,080
150
540
22,500 81,000
124
517
15,376 64,108
93
449
8649 41,757
88
452
7744 39,776
104
454
10,816 47,216
116
495
13,456 57,420
T = 12
t = 1375
xt = 5782
t2 = 162,853
txt = 670,215
a T + b t = xt
a t + b t2 = txt
16
Example – 3.1(solution to a)
1375 x 12 a + 1375 b = 5782
– 12 x a 1375 + b 162,853 = 670,215
b (1375 2 – 12 x 162,853) = (1375 x 5782 – 12 x 670,215)
(1375 x 5782 – 12 x 670,215)
b =
(1375 2 – 12 x 162,853)
= 1.45
17
Example – 3.1(solution to a)
b = 1.45
12 a + 1375 b = 5782
a 1375 + b 162,853 = 670,215
a=
(5782 – 1375 x 1.45)
12
= 315.5
xt = a + b t
xt = 315.5 + 1.45 t
18
Example – 3.1(solution to b)
t
xt
xt
100
461
461
110
473
475
96
450
455
114
472
481
120
481
490
160
538
548
150
540
533
124
517
495
93
449
450
88
452
443
104
454
466
116
495
484
xt = 315.5 + 1.45 (100) = 461
xt =
xt
T
=
5782
12
= 482
19
Example – 3.1(solution to b)
xt
t
xt
xt
xt
xt xt
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





x
 t


t
Explained deviation

xt
xt




x
 t


t
Total deviation
20
Example – 3.1(solution to b)
t
xt
xt
xt
xt xt
xt ( xt
xt )2 ( xt
xt )2
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
21
Example – 3.1(solution to b)
Coefficient of determination:
 ( xt
r2 =
 ( xt
xt )2
11.215
=
xt )2
12.314
= 0.91
91% of the deviation in the furniture
sales can be explained by the
establishment of new housing in
the city
22
Example – 3.1(solution to b)
Coefficient of corelation:
r =  r2
=  0.91 = 0.95
a very strong (+) relationship
(highly corelated)
23
Example – 3.1(solution to b)
r r
T  txt   t  xt
2
[T  t   t 
2
2
2
][T  xt
  xt  ]
2
xt2 = 2.798.274
12 x 670,215 – 1375 x 5782
r=
= 0.95
 [12 x 162,853 – (1375)2 ][12 x 2,798,274 – (5782)2]
r2 = (0.95)2 = 0.91
24
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
25
Components of a time series
1.
2.
3.
4.
Trend ( a continious long term directional
movement, indicating growth or decline, in the
data)
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)
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)
Random effects (occasional and unpredictable
effects due to chance and unusual occurances.
They are the residual after the trend, seasonali
26
and cyclical variations are removed)
Components of a time series
xt
seasonal variation
a2
trend slope
a1
random effect
0
1
2
Year 1
3
4
5
6
7
t
8
Year 2
27
Simple Moving Average
Model
xt = a + t
xt
Constant process
Forecast error
xt = a
a
t
28
Simple Moving Average

ˆ
Forecast X
T 1
is average of N previous observations
or actuals Xt :
1
ˆ
X T 1 
( X T  XTT 1    X T 1 N )
N
T
1
Xˆ t 1 
Xt

N t T 1 N


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.
Simple Moving Average
Include N most recent observations
 Weight equally
 Ignore older observations

weight
1/N
T+1-N
...
T-2 T-1 T
today
Parameter N for Moving Average
If the process is relatively
stable  choose a large N
If the process is changing
 choose a small N
31
Example 3.2
Week
1
2
3
4
5
6
7
8
9
10
11
12
Demand
650
678
720
785
859
920
850
758
892
920
789
844
What are the 3-week and
6-week Moving Average
Forecasts for demand of periods 11,
12 and 13?
32
Weighted Moving Average
Include N most recent observations
 Weight decreases linearly when age
of demand increases

Weighted Moving Average
T
wx
t
t
wt = weight value for xt
t=T-N+1
WMT =
The value of wt is higher
T

wt
for more recent data
t=T-N+1
34
Example 3.3
Month
Jan.
Feb.
March
April
May
Sales
10
12
13
?
?
a) Use 3-month weighted
moving average with the
following weight values
to predict the demand
of april
wT = 3
b) Assume demand of april is realized
as 16, what is the demand of may?
wT-1 = 2
wT-2 = 1
35
Exponential Smoothing Method
A moving average technique which places weights
on past observations exponentially
Realized demand at period T
ST = a
Smoothed value
xT
+ 1a ST-1
Smoothing constant
36
Exponential Smoothing
Include all past observations
 Weight recent observations much more
heavily than very old observations:

weight
Decreasing weight given
to older observations
today
Exponential Smoothing


Include all past observations
Weight recent observations much more heavily
than very old observations:
0 a 1
a
weight
Decreasing weight given
to older observations
today
Exponential Smoothing


Include all past observations
Weight recent observations much more
heavily than very old observations:
weight
0 a 1
a
a (1  a )
Decreasing weight given
to older observations
today
Exponential Smoothing


Include all past observations
Weight recent observations much more
heavily than very old observations:
weight
0 a 1
a
a (1  a )
Decreasing weight given
to older observations
a (1  a ) 2
today
Exponential Smoothing


Include all past observations
Weight recent observations much more heavily
than very old observations:
0 a 1
weight
a
a (1  a )
Decreasing weight given
to older observations
a (1  a ) 2
a (1  a )
today

3
Exponential Smoothing
2
ˆ
X T 1  aX t  a (1  a ) X t 1  a (1  a ) X t  2  
Xˆ T 1  aX t  (1  a )aX t 1  a (1  a ) X t  2  
Exponential Smoothing
2
ˆ
X T 1  a X t  a (1  a ) X t 1  a (1  a ) X t  2  
Xˆ T 1  a X t  (1  a )aX t 1  a (1  a ) X t  2  
Xˆ T 1  aX T  (1  a ) Xˆ T
ST  aX T  (1  a) ST 1
The meaning of smoothing equation
ST = a
xT
ST = a
+ 1a ST-1
xT
+ ST-1  a ST-1
ST = ST-1 + a (
ST =
xT+t
New forecast for
future periods
ST-1 =
xT  ST-1 )
xT
Old forecast for
the most recent period
eT =
xT
–
xT
Forecast error
44
Exponential Smoothing
Thus, new forecast is weighted sum of old
forecast and actual demand
 Notes:

2 values ( X T and Xˆ T ) are required,
compared with N for moving average
 Parameter a determined empirically (whatever
works best)
 Rule of thumb: a < 0.5
 Typically, a = 0.2 or a = 0.3 work well
 Only
Choice of a
Small a  Slower response
Large a  Quicker response
Equivelance between a and N
a =
2
N+ 1

N =
2–a
a
46
Example 3.4
Week
1
2
3
Demand
820
775
680
Given the weekly demand
data, what are the
exponential smoothing
forecasts for periods 3 and 4
using a = 0.1 and a = 0.6 ?
Assume that S1 = x1 = 820
47
Example 3.4 (solution for a = 0.1)
t xt
St
xt
1 820 820
2 775 815.5 820
3 680 801.95 815.5
4
S1 = x1 = 820
x2 = 820
S2 = a x2 + 1a S1
S2 = 0.1(775) + 0.9(820) = 815.5
801.95 x3 = 815.5
48
Example 3.4 (solution for a = 0.6)
t xt
St
xt
1 820 820
2 775 793.0 820
3 680 725.2 793.0
4
725.2
S1 = x1 = 820
x2 = 820
S2 = a x2 + 1a S1
S2 = 0.6(775) + 0.4(820) = 793.0
x3 = 793.0
49
Winters’ Method for Seasonal Variation
Seasonal
factor for period t
Model
xt = ( a + b t ) ct + t
xt
Constant
parameter
Trend
parameter
Random error
component
t
50
Initial values of a , b and c
for one year available demand data
L
xt

t=1
a0 =
L
b0 = 0
ct =
xt
a0
L
ct

t=1
= L
YES
ct values
are valid
NO
ct values are
normalized :
ct =
ct L
L
ct

t=1
51
Smoothing equations

 xT 
ˆ
ˆ
aˆT  a 

(
1

a
)
a

b
T 1
T 1

ˆ
c
 T L 

0 <a < 1
bˆT   aˆT  aˆT 1  (1   )[bˆT 1 ]
0<<1
 xT 
cˆT  g 
 (1  g )cˆT  L

 aˆT 
0 <g < 1
52
Forecast Equation
x(T+t) = ( aT + t bT ) c(T+t-L)
 = the smallest integer ≥
t
L
53
Example 3.6
Month(2005) 1
Demand
4
2
2
3 4 5 6 7 8 9 10 11 12
5 8 11 13 18 15 9 6 5 4
a) Forecast the demand of Jan.’06 using Winters method
with a = 0.2,  = 0.1, g = 0.5
b) Forecast the demand of Feb.’06 when Jan.’06 realizes
as 5 using Winters method with a = 0.2,  = 0.1, g = 0.5
c) Forecast the demand of Mar.’06 and Mar.’07 when
Feb.’06 realizes as 4 using Winters method with a = 0.2,
 = 0.1, g = 0.5
54
Example 3.6 (solution to a)
L
a0 =
xt

t=1
L
=
100
12
= 8.3
b0 = 0
c1 =
x1
a0
=
4
= 0.48
8.3
x(T+t) = ( a0 +1b0 ) c1
x(12+1)= ( 8.3 + 0 ) 0.48 = 4
t
1
2
3
4
5
6
7
8
9
10
11
12

ct
0.48
0.24
0.60
0.96
1.32
1.56
2.16
1.80
1.08
0.72
0.60
0.48
12
55
Example 3.6 (solution to b)
JAN.’06 realizes as:
x13 = 5


 x13 
5
ˆ = 0.2
ˆ
aˆ13  a 

(
1

a
)
a

b
0.8 8.3 + 0 = 8.72
+
0
0

0.48
 cˆ1312 
bˆT   aˆT  aˆT 1  (1   )[bˆT 1 ] = 0.1 8.72 – 8.3 + 0.9 0 = 0.043
 xT 
cˆT  g    (1  g )cˆT  L = 0.5 5
0.5 0.48 = 0.53
+
8.72
 aˆT 
x(T+t) = ( a13 +1b13 ) c2
x(13+1)= ( 8.72 + 1 x 0.043 ) 0.24 = 2.1
56
Updated seasonal values
should be normalized!
57
Example 3.6 (solution to c)
FEB.’06 realizes as:
x14 = 4
a14 = 0.2
4
+ 0.8 8.72 + 0.043 = 10.34
0.24
b14 = 0.1 10.34 – 8.72 + 0.9 0.043 = 0.2
c14 = 0.5
4
+ 0.5 0.24
10.34
= 0.31
x(14+1)= ( 10.34 + 1 x 0.2 ) 0.60 = 6.3
x(14+13)= ( 10.34 + 13 x 0.2 ) 0.60 = 7.76
Forecast of
Mar.’06
Forecast of
Mar.’07
58
Forecast accuracy
Forecast 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
et = xt – xt
Forecast error
Actual demand
Forecast
59
Error measures
Looking 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, ME
3. Mean square error, MSE
4. Mean absolute deviation, MAD
5. Mean absolute percentage error, MAPE
60
Cumulative (sum) error, Et
T
ET =  et
t=1
Et should be close to zero if the forecast is behaving
properly. That is, sometimes it overestimates and
sometimes it underestimates, but in the long run
these should cancel out
61
Mean error, ME
1
ME =
n
n
et

t=1
ME should be interpreted same as sum error, Et ,
that is, it shows whether the model is biased toward
certain direction or not
A forecast consistently larger than actual is called
biased high
A forecast consistently lower than actual is called
biased low
62
Example 3.9
t
xt
1
2
3
4
5
6
7
8
9
9
12
15
18
21
24
27
30
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
63
Example 3.9 (solution)
t xt MA(t-1) et
1
2
3
4
9
12
15
18
12
6
5
6
7
8
21
24
27
30
15
18
21
24
6
6
6
6
E9 = 6 + 6 +... + 6 = 36.00
9 33
27
6
ME = 1/n (et)= E9 / 6 = 6.00
BIASED LOW !
64
Mean square error, MSE
1
MSE =
n
n
et

t=1
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 increased
for large errors. Thus a single large error greatly
increases MSE
65
Mean absolute deviation, MAD
1
MAD =
n
n
et

t=1
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
66
Mean absolute percentage error, MAPE
1
MAPE =
n
n
PEt

t=1
xt – xt
PEt = x (100)
t
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. It
may more meaningful to look at error relative to the
magnitude of the forecasts, which is done by MAPE
67
Example 3.11
t
1
2
3
4
5
6
7
8
9
10
11
12
xt
10
12
15
45
130
180
170
120
125
100
125
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.
68
Example 3.11 (solution)
t
1
2
3
4
5
6
7
8
9
10
11
12
xt MA[3]t-1
10
12
15
45 12.33
130 24.00
180 63.33
170 118.33
120 160.00
125 156.67
100 138.33
125 115.00
135 116.67
et
51.67
-40.00
-31.67
-38.33
10.00
18.33
1 12 e 2
MSE=
 t = 1196.30
6 t=7
69
Example 3.11 (solution)
t xt MA[6]t-1 et
1 10
2 12
3 15
4 45
5 130
6 180
7 170 65.33 104.67
8 120 92.00 28.00
9 125 110.00 15.00
10 100 128.33 -28.33
11 125 137.50 -12.50
12 135 136.67 -1.67
1 12 e 2
MSE=
 t = 2154.32
6 t=7
70
Example 3.11 (solution)
MA[3] model results
t xt MA[3]t-1
7 170 118.33
8 120 160.00
9 125 156.67
10 100 138.33
11 125 115.00
12 135 116.67
et
51.67
-40.00
-31.67
-38.33
10.00
18.33
MA[6] model results
Pet  MA[6]t-1
30.39
33.33
25.33
38.33
8.00
13.58
65.33
92.00
110.00
128.33
137.50
136.67
et
Pet 
104.67
28.00
15.00
-28.33
-12.50
-1.67
61.57
23.33
12.00
28.33
10.00
1.23
1 12Pe 
1 12Pe 

MAPE = 6 
t = 24.83 MAPE =
t = 22.74
6
t=7
t=7
71
Example 3.11 (solution)
Error
measures
MSE
MAPE
Forecast models
MA[3]
1196.30
24.83
MA[6]
2154.32
22.74
72