IE5403 Facilities Design and Planning Instructor: Assistant Prof. Dr. Rıfat Gürcan Özdemir
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 Participation5% Quizzes15% (4 quizzes) Assignment15%(every week) Midterm 130%(chapters 1 and 2) Final35%(all chapters) 3
4 IE 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 horizon demand time now past demand planning horizon actual demand? actual demand? Forcast demand
8 Designing a forcasting system Forecast need Data avilable? Quantitative? Analyze data YES Causal factors? YES Causal approach YES Collect data? NO YES Qualitative approach NO Time series NO
9 Regression Methods Model dependent variable independent variable Unknown parameters Random error component xtxt t Simple linear model x t = a + b t
10 Estimating a and b parameters xtxt t x t = a + b t e1e1 e2e2 e5e5 e3e3 e4e4 T = 5 0 Such that sum squares of the errors (SSE) is minimized forecast error e t = ( x t – x t )
11 Least squares normal equations Least squares normal equations
12 (x t – x t ) 2 unexplained deviation = (x t – x t ) 2 = explained deviation xtxt Coefficient of determination (r 2 ) xtxt xtxt t (x t – x t ) 2 = total deviation, 0 r 2 1
13 Coefficient of corelation (r) r = coeff. of determination = r 2 Sign of r,(– / +), shows the direction, of the relationship between x t and t ()or r shows the strength of relationship between x t and t – 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 r 2 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 Feb March96450 April May June Month New Housing /month Furniture Sales /month ($1000) July Aug Sep Oct Nov Dec
16 Example – 3.1(solution to a) T = 12 x t = 5782 tx t = 670,215 t = 1375 t 2 = 162,853 txtxt t2t2 10,000 12, ,996 14,400 25,600 22,500 15, ,816 13,456 tx t 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 = x t a t + b t 2 = tx t
17 Example – 3.1(solution to a) 12 a b = 5782 a b 162,853 = 670, x – 12 x b ( – 12 x 162,853) = (1375 x 5782 – 12 x 670,215) b ( – 12 x 162,853) (1375 x 5782 – 12 x 670,215) == 1.45
18 Example – 3.1(solution to a) b= a b = 5782 a b 162,853 = 670,215 a 12 (5782 – 1375 x 1.45) = = x t = a + b t x t = t
19 Example – 3.1(solution to b) txtxt T 12 xt =xt = xtxt 5782 ==482 x t = (100) = xtxt
20 Example – 3.1(solution to b) txtxt xtxt xtxt xtxt xtxt xtxt Explained deviation xtxt xtxt xtxt t Total deviation xtxt xtxt xtxt t
21 Example – 3.1(solution to b) txtxt xtxt xtxt xtxt xtxt xtxt xtxt xtxt ()2)2 xtxt xtxt ()2)2
22 Example – 3.1(solution to b) r2r2 = xtxt xtxt ()2)2 xtxt xtxt ()2)2 = =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.95 rr2r2 = 0.91 Coefficient of corelation: a very strong (+) relationship (highly corelated)
24 Example – 3.1(solution to b) x t 2 = r = 12 x 670,215 – 1375 x 5782 [12 x 162,853 – (1375) 2 ][12 x 2,798,274 – (5782) 2 ] = 0.95 r2r2 =(0.95) 2 = 0.91
25 Example – 3.1(solution to c) x t = a + b t x t = t t = 250 x t = (250) = 678 x t = $ 678,000 x $1000
26 Components of a time series 1. 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 xtxt t a2a2 a1a1 seasonal variation trend slope random effect Year 1Year 2
28 Simple Moving Average Model xtxt =a + tt xtxt Constant process t x t = a a Forecast error
Simple Moving Average Forecast is average of N previous observations or actuals X t : 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 today TT-1 T-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.2 WeekDemand 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 WM T = t=T-N+1 T w t x t t=T-N+1 T wtwt wtwt = weight value for xtxt The value of wtwt is higher for more recent data
35 Example 3.3 MonthSales Jan.10 Feb.12 March13 April? May? a) Use 3-month weighted moving average with the following weight values to predict the demand of april b) Assume demand of april is realized as 16, what is the demand of may? wTwT = 3 w T-1 = 2 w T-2 = 1
36 Exponential Smoothing Method A moving average technique which places weights on past observations exponentially STST = xTxT + S T-1 Smoothed valueSmoothing 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
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
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
44 The meaning of smoothing equation STST = xTxT + S T-1 xTxT STST = + S T-1 S T-1 STST = xTxT + () STST = x T+ New forecast for future periods S T-1 xTxT = Old forecast for the most recent period eTeT xTxT = xTxT – 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 average Parameter a determined empirically (whatever works best) Rule of thumb: < 0.5 Typically, = 0.2 or = 0.3 work well
46 Choice of Small Slower response Large Quicker response Equivelance between and N = 2 N+ 1 = 2 N –
47 Example 3.4 WeekDemand Given the weekly demand data, what are the exponential smoothing forecasts for periods 3 and 4 using = 0.1 and = 0.6 ? Assume that S 1 = x 1 = 820
48 Example 3.4 (solution for = 0.1) S 1 = x 1 = 820 S2S2 = x2x2 + S1S1 = x2x2 820 txtxt StSt xtxt S2S2 = 0.1(775) + 0.9(820) =815.5 = x3x
49 Example 3.4 (solution for = 0.6) S 1 = x 1 = 820 S2S2 = x2x2 + S1S1 = x2x2 820 txtxt StSt xtxt S2S2 = 0.6(775) + 0.4(820) =793.0 = x3x
50 Winters’ Method for Seasonal Variation Model xtxt =a + tt b t () ctct + Constant parameter Trend parameter Seasonal factor for period t Random error component t xtxt
51 Initial values of ac b, and t=1 L a0a0 = xtxt L b0b0 =0 ctct = xtxt a0a0 L ctct =L ctct values are valid ctct = L ctct t=1 L ctct ctct values are normalized : YES NO for one year available demand data
52 Smoothing equations 0 << 1 0 < < 1 0 < < 1
53 Forecast Equation aTaT bTbT c (T+ - L) x (T+ ) = ( )+ = the smallest integer ≥ L
54 Example 3.6 Month(2005) Demand 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) b0b0 =0 t=1 L a0a0 = xtxt L = = 8.3 c1c1 x (T+ ) = ( ) + 1 a0a0 b0b0 c1c1 = x1x1 a0a0 = = 0.48 t 12 ctct 0.48 x (12+1) = ( ) = 4
56 Example 3.6 (solution to b) x 13 = 5 JAN.’06 realizes as: = =8.72 = – =0.043 = =0.53 c2c2 x (T+ ) = ( ) + 1 a 13 b x (13+1) = ( ) = 2.11 x
Updated seasonal values should be normalized! 57
58 Example 3.6 (solution to c) FEB.’06 realizes as: x 14 = =0.31= c 14 = =10.34 a 14 = – =0.2 b x (14+1) = ( ) = 6.31 x 0.60 x (14+13) = ( ) = x Forecast of Mar.’06 Forecast of Mar.’07
59 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 ForecastActual demand xtxt etet = xtxt – Forecast error
60 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, E t 2.Mean error, ME 3.Mean square error, MSE 4.Mean absolute deviation, MAD 5.Mean absolute percentage error, MAPE
61 Cumulative (sum) error, E t E t 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 T ETET = t=1 etet
62 Mean error, ME ME should be interpreted same as sum error, E t, that is, it shows whether the model is biased toward certain direction or not n ME = t=1 etet n 1 A forecast consistently larger than actual is called biased high A forecast consistently lower than actual is called biased low
63 Example 3.9 txtxt Validate the moving average (N=3) if it is suited to the given past data using ME and E t, and say if it is bias
64 Example 3.9 (solution) txtxt MA (t-1) etet E 9 = = ME = 1/n ( e t )= E 9 / 6 = 6.00 BIASED LOW !
65 Mean square error, MSE n MSE = t=1 etet n 1 2 MSE is mainly used to counteract the inefficiency in error measuring as negative errors (– e t ) cancel out the positive error terms (+ e t ) By squaring the error terms, the “penalty” is increased for large errors. Thus a single large error greatly increases MSE
66 Mean absolute deviation, MAD n MAD = t=1 etet n 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
67 Mean absolute percentage error, MAPE n MAPE = t=1 PE t n 1 PE t = xtxt xtxt – xtxt (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. It may more meaningful to look at error relative to the magnitude of the forecasts, which is done by MAPE
68 Example 3.11 txtxt 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 xtxt MA[3] t-1 etet t= MSE = etet =
70 Example 3.11 (solution) t xtxt MA[6] t-1 etet t= MSE = etet =
71 Example 3.11 (solution) t xtxt MA[3] t-1 etet Pe t MA[6] t-1 etet Pe t MA[3] model results MA[6] model results MAPE PetPet 12 = t= = MAPE PetPet 12 = t= =
72 Example 3.11 (solution) Error measures Forecast models MA[3]MA[6] MSE MAPE