Download presentation
Presentation is loading. Please wait.
Published byGladys Webster Modified over 9 years ago
1
MGTSC 352 Finals Notes
2
Forecasting
3
Forecasting – Quantitative Time series analysis: uses only past records of demand to forecast future demand –moving averages –exponential smoothing –ARIMA Causal methods: uses explanatory variables (timing of advertising campaigns, price changes) –multiple regression –econometric models
4
Choosing a Forecasting Method
5
Simple models Notation –D t = Actual demand in time period t –F t = Forecast for period t –E t = D t - F t = Forecast error for period t
6
Simple models Last Point model –Yesterday’s demand will be today’s forecast F t+1 = D t –Not a good model cause it does no learning, it is just a follower Average Model –Take the average of all known data to make prediction –F t+1 = average(D 1,D 2,..., D t ) –Very old data is probably useless to us, so why include in the model?
7
Simple models Simple moving average (SMA) –Take the average of data in the past ‘m’ periods as a forecast –F t+1 = average(D t-m+1, D t-m+2,..., D t –Maybe some data points should have more weight on them than others –Can’t begin to forecast until you have the specified window of data points Weighted moving average –Like SMA but different points have different levels of importance, or weight –F t+1 = W 1 *D t-m+1 +W 2 *D t-m+2 +... + W m *D t –ΣW i = 1 –How to choose the weights? –Data that is closer to the forecast point should have more weight placed on it
8
Simple Exponential Smoothing (SES) Initialization: F 2 = D 1 Learning: F t+1 = LS*D t + (1-LS)*F t Predicting: F t+k = F t+1 –Future forecasts are equal to the last forecast LS = level smoother –Lower LS, higher the volatility –Higher LS, lower the volatility, however we will be doing less prediction and more following Must have some sort of compromise –At LS=0, all values will be same as the initialized forecast, –At LS=1, the graph will follow the demand perfectly one day late »Really worthless
9
Performance Measures Remember that for performance measures, you must have a demand and a corresponding forecast. What is error if there is nothing to compare to?
10
Bias Average error (1/n)Σ E t Positive and negative values will cancel out –May appear to have a small bias but large errors in the positive and negative direction will cancel each other out
11
Mean Absolute Deviation (MAD) (1/n) Σ |E t | Similar to bias, but no negative values No way of telling which direction the error is occurring, just that there is error
12
Mean Square Error (MSE) and Standard Error (SE) (1/(n-1)) Σ E t 2 Places more emphasis on large error terms Heavily influenced by outlier terms and also not in units of the error SE = (MSE) 1/2 Same units as error Dampens the effect of the error terms
13
Mean Absolute Percentage Error (MAPE) (1/n) Σ (E t /D t ) In terms of percentage, which is good If error is large but D t is humongous, MAPE will appear to be small – That is the problem when you have you performance measure influenced by the demand
14
More Complex Forecasting Models
15
Double Exponential Smoothing (DES) Takes level and trend into account Trend = change in the level Initialization: –L 2 = (D 1 +D 2 )/2 –T 2 = D 2 -D 1 Learning: –L t = LS*D t +(1-LS)(L t-1 +T t-1 ) –T t = TS(L t -L t-1 )+(1-TS)T t-1
16
DES Prediction: –F t+1 = L t +T t –Predicting k steps into the future F t+k = L t +kT t Change is exaggerated at beginning As time moves on, the emphasis a single data point has on the model decreases (less fluctuation) Remember that you can only make level and trend up to data points that you have, can’t make level and trend for predicted data
17
Triple Exponential Smoothing (TES) Takes level, trend and seasonality into account Use if you see seasonal trends in the data and if the data appears to be non-linear
18
TES - Initialization P is the number of seasons in a dataset –Ex) weeky = 7, monthly = 12, hourly = 24, quarterly = 4 The initialization window is equal to P, we allow P terms to pass before we begin to forecast
19
TES - Initialization Level: average of initial ‘P’ data points = A Trend: Tp = (Dp+1-D1)/P –Ex) if we have monthly data from Jan 2000 to Dec 2005, initialization would be: (D Jan2001 -D Jan2000 )/12 Seasonality: S i = D i /A –The initial seasonality indices are ratios of that period’s demand against the average of the initial ‘P’ data points (the level) Notice that whenever we deal with seasonality, we always match up corresponding seasons with one another. January matches up with January, Tuesday matches up with Tuesday, etc.
20
TES - Learning The one-time forecast is F t+1 = (L t +T t )/S t+1-P If F t+1 is a Tuesday, S t+1-P is the previous Tuesday’s seasonality
21
TES - Learning L t = LS(D t /S t-p )+(1-LS)(L t-1 +T t-1 ) We want to remove the effect of seasonality from level We want to know what December sales would be like if it weren’t Christmas, we want the deseasonalized level The old data is already deseasonalized (L t-1 +T t-1 )(S t+1-p /S t+1-p )
22
TES - Learning T t = TS(L t -L t-1 )+(1-TS)T t-1 –Trend is not effected by seasonality, it is merely a change in level –Same as in DES S t = SS(D t /L t )+(1-SS)S t-p –Don’t want the effects of level to effect seasonality, so we divide it out –Always remember to match up seasons with the same season
23
TES - Predicting F t+k = (L t +kT t )S t+k-P k<=p We can only use the last level and trend for the prediction For seasonality we can only use the seasonality for the last cycle. –When K>p, we must reset seasonality to the beginning of the cycle –We can not create seasonality for data we don’t have, just like level and trend
24
Solver When using solver to optimize forecasting problems, minimize MSE or SE cause they are linear functions –If using bias, make it so that bias = 0 Solver is used to optimize the smoothing factors so that we can achieve the optimum performance measure Boundaries must ve set in solver so that we aren’t chasing randomness and so we are actually predicting data –Set bounds so that 0.05<smoothers<0.95
25
Simple Linear Regression with Seasonality Indices (SLRwSI) Use this method if you have seasonal data and you can see a linear trend in the dataset SLR is intended to make bias = 0 SLR = Intercept + k*slope –Functions can be imputted by separate functions in excel or by adding treadline, but will be optimized by solver anyways, so it doesn’t really make a difference
26
SLRwSI Seasonality is not updated in SLRwSI, we will have a different seasonal index for each period and the dataset will cycle through those initial indices The average of the seasonal indices must equal 1 SLRwSI = SLR*SI To optimize –Minimize performance measure –Allow manipulation of slope, intercept and all of the SI’s –Restrain so that the average of the SI’s must equal 1
27
Limitation of Solver Solver tries to find the minimum value of the dataset, but that minimum may be the local minimum, we want the global minimum To help fix this, start the indices or the SI’s at different points to find the true minimum 95% Prediction Interval = Forecast ± 2*SE
28
Simulation
29
Simulating a value from a Normal Distribution: Breaking the formula down ROUND(NORMINV(RAND(),mean,stdev),0) Step 1: generate random number RAND() Step 2: convert random number to normal distribution NORMINV(RAND(),mean,stdev) Step 3: round to whole number ROUND(NORMINV(RAND(),mean,stdev),0)
30
Bard Outside Example: A “Newsvendor Problem” Bard Outside: –Decision: # of seats –Uncertain future demand –Demand > # of seats lost revenue –Demand < # of seats empty seats A newsvendor: –Decision: # of newspapers to get –Uncertain future demand –Demand > # of papers lost revenue –Demand < # of papers disposal costs
31
Simulation notes To find % of something above x amount –1-normdist(X,mean,stddev,true) To find simulated demand, use norminv function –Use max(0,round(...)), keeps it non-negative For table, highlight the variable cells and the count cells. –Highlight as many sells as the size of table that you want DONT FORGET TO FREEZE TABLE AFTER MAKING
32
Distributions Triangular distributions –Have min, max, and most likely scenario Adding two random values will give triangular dist. Uniform distribution –If you added one random variable Trapezoidal distribution
33
Aggregate Planning
34
Solver error: Unbounded Problem How will you know: The set cell values do not converge What it means: –Possible to achieve infinite profit Either you will become filthy rich, or (more likely) there is something wrong with your model How to fix it: look for missing constraints
35
Aggregate Planning Solver Error: Infeasible Problem How will you know: Solver could not find a feasible solution What it means: –Impossible to satisfy all constraints Possible reasons: –You need more resources –You over-constrained the problem
36
Sensitivity Report Allowable increase/decrease –The bounds that we are allowed to be within for our answer to still be the optimal one. –Once we go beyond these bounds we would have to re-solve the answer Shadow price –How much the objective function will change if we change the R.H side of the corresponding constraint within the limits given in the allowable increase/decrease columns How much the change in the target cell if the RH side of a constraint increases by 1 If we have unconsumed materials, shadow price will always be 0 –Deals with marginal pricing
37
Sensitivity report Reduced cost –For each variable which is currently zero, an estimate of how much the objective function will change if we force that variable to be non-zero. –Think opportunity cost To decide whether the objective function will go up or down use: –constraint more (less) restrictive after change in right- hand side implies objective function worse (better) –if objective is maximise (minimise) then worse means down (up), better means up (down)
38
Tolerance We should set tolerance to as low as possible so that solver will find the absolute optimal solution, instead of a value within a certain tolerance interval. –May take a little more time to solve if we have a low tolerance level
39
Level vs. Chase Level –Always producing at a constant rate no matter what the demand is Chase –Attempting to chase the simulated demand
40
Distribution Planning
41
What should overall distribution system be? Where should inventories of products or raw materials be stored? How much inventory of each product and raw material should be stored at each location How should the flow of products and raw materials through the distribution be coordinated What models of transportation should be used?
42
Distribution Planning All distribution problems are really special case of minimum cost problem, even the shortest distance problem, which replaces distances with cost Remember to freeze cells when using the sumif function Hit ctrl + ~ to get into formula mode, will make it much easier to debug
43
Distribution Planning if demand is greater than supply, solver will try to solve to satisfy the demand but there wont be enough supply, so it will cause an error (infeasible solution) if you have a node with no demand or supply, flow will come in and won't stay cause there is nothing required and will immediately flow out, like intersection
44
Distribution Planning Shortest path problem –If we are required to go to a certain path, best way is to solve it in two parts 1 st part is when we go from supply city to intermediate path 2 nd part is when we go from intermediate city to final demand path –Set demand = 1 at destination city and set supply = 1 at city of origin –Make sure that supply + flowin = demand + flow out This will allow us to make a path with no jumps
45
Distribution Planning Shortest Path problem cont. –If we have to traverse a specific arc, but not to a specific city to within that arc, before going to a specific city, make sure you allow for two-way travel In three cells, have: –city 1 -> city 2 –City 2 -> city 1 –sum Each path will reference truckload along that path Sum is the sum of the two arcs Constrain solver so that the sum>=1, that way it must traverse the path but also allows for back travel
46
Distribution Planning New locations If wondering whether or not to open a new facility, use a binary variable To ensure that we don’t produce if we don’t open: –Set an upper bound = max prod * binary –Constrain solver so that production can not be greater than the upper bound Must constrain solver so that supply + flow in + production >= demand + flow out
47
Inventory Management
48
Goods that have not yet been sold Keep inventory when –Demand unpredictable –Delivery takes time –Fixed cost for delivery Relevant question –When to order (ROP = Reorder point) –How much to order (Q = reorder quantity) MAKE SURE TIME UNITS ARE CONSISTENT, DON’T MIX YEARS WITH MONTHS
49
Relevant Costs Acquisition cost ($/unit purchased) Ordering costs ($/order) –clerical expenses –delivery, inspection –setup (prod.) Carrying costs = Holding costs ($/unit/time unit) –cost of capital –insurance –shrinkage, spoilage, obsolescence –material handling (fork lifts, space) Shortage costs ($/unit short) –lost goodwill, discounts, penalties –lost sales –shut down of assembly line (prod.)
50
Time Inventory ROP Leadtime Q Maximum inventory Minimum inventory Avg. inventory LTD = Demand during leadtime
51
Histogram Need 3 columns –# sold, bins, and frequency as headers –# sold will be a range (0-2, 3-4, etc..) –Bins refers to values at or below that value 2 means 0-2, 4 means 3-4, etc.. –Frequency means how often value corresponding to a bin shows up in the dataset
52
Histogram Highlight the empty frequency cells Type in frequency (data, bins) While they are all highlighted, hit ctrl + shift + enter, this will cause the frequency to appear in the cells
53
Histogram in the graph template, hit column graph Highlight # sales and frequency to be graphed Once graph is made, double click the graph and under options you can change the distance between the columns to be 0 Histogram complete
54
Simulation Orders take time to come into your place of business, this time will affect how your business is run because it will effect your reorder points and order quantities Beginning inventory is equal to ending inventory of the previous day + the order that came in that day
55
Simulation Inventory position is beginning inventory plus inventory that is in transit. If we ordered two day ago, and we know we will get the inventory in 5 days, then we wouldn’t order more stock because we know that we have an order on the way If a new order just arrives and it is too short, then we would put a new order through
56
Simulation Order if demand is greater than the inventory position –We can use if statements to ensure this –If(demand>=inventory position, order amount Q, else don’t place order) Sales will be the minimum of demand or beginning inventory, not inventory position because that inventory is not in the store –Min(demand, beginning inventory)
57
Simulation Shortage is demand less sales Ending inventory is beginning inventory less sales. If your order will come in at the end of the business day, then ending inventory will include this as well Holding cost is the average of beginning and ending inventory, multiplied by the holding cost per unit
58
Simulation Fill rate is the amount of demand that is satisfied by the inventory =total sales/total demand
59
Tables in Excel Say we want to see how net profit varies with differing ROP and Q Put values for ROP and Q along row and column, except leave the top left corner of the table blank In the top left corner, reference net profit Highlight entire area, then go data->table For row, reference original value for row, and for column, reference original value for column Can use conditional formatting to highlight the max amount or to highlight minimum amounts, if you require that we must reach a certain profit, or fill rate or whatever
60
EOQ = Economic Order Quantity Assumptions –Demand is constant –Inventory drops to zero just before an order arrives –Variables: S = order cost ( per order) H = carrying cost (per item per order) D = annual demand Order cost = (D/Q)/S; Carrying Cost = (Q/2)*H Q* = sqrt(2DS/H) Q* = quantity to order that will minimize cost under the EOQ model
61
EOQ = Economic Order Quantity Simulation modeling is a flexible modeling approach that is capable of replicating the real world intricacies of an inventory system but it is also generally an expensive (time and money) approach. In the previous worksheet we used a historical simulation to find a good policy (values for Q and ROP). We found the policy by trial and error, facilitated by a two-way data table. We will use a simpler approximate two-step analytical method to first find Q and then find ROP. We use the well-known EOQ model (which trades off ordering costs with holding costs) to find Q. Then we use this Q and an estimate of the probability distribution of demand during the lead time to determine ROP, either by meeting a pre-specified level of service or fill rate or by minimizing the costs of incurring a shortage plus the cost of carrying extra safety stock). This two-step method involves many approximations, but in practice it usually gives a near-optimal policy Find Q*, then use LTD (lead time demand model) to find ROP using Q from previous step.
62
Simulation versus EOQ DimensionSimulationEOQ + LTD Ease of evaluating a policy Need to build model – time consuming Simple formula for RC – back of an envelope Finding the optimumTrial and error / data table Plug into formula for Q* Random demand fluctuations Taken into accountIgnored in EOQ Seasonal demand fluctuations Can be taken into account Ignored ShortagesTaken into accountIgnored in EOQ Likely errors (common mistakes) Errors in formulasInconsistent units pg. 151
63
LTD – Lead time demand Lead time = how long we wait while receiving an order Lead time demand = how much demand would occur while we are waiting for our order to arrive Goal is to reduce the probability of shortages
64
LTD – Lead time demand Set the lead time LTD will be the sum of the demand for the lead time Shortage will occur if LTD>=ROP –If(LTD>=ROP,LTD-ROP,0) For shortage per cycle –cycle= demand/Q –Shortage = cycle*average shortages/year –Fill rate = sales/demand = (demand-shortages)/demand
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.