A New Safety Stock Formula - Part 2
This article covers Time Granularity. It is part 2 in a series where I present an experimental new safety stock formula. I start with the most commonly used safety stock formula, the King formula, and work towards a new formula. Although the King formula has some well-known and dramatic accuracy issues, it is still used pervasively because better options are not readily available. In this series I attempt to address each issue separately and combine them in a formula that any company can implement in Excel or other inexpensive software.
The series consists of the following parts:
Each individual contribution can be added independently of the other parts, and tests conducted suggest that each will already improve upon the original King formula. Readers are encouraged to experiment with their own data, and I would greatly appreciate any feedback from such experiments, either privately or as comments to these articles.
Introduction
After a break from writing due to excessive workload, I will continue the series with this easy chapter. There will not be much groundbreaking content, or adjustments to the King formula, but rather a level setting to ensure all readers have the correct understanding of the various terms used in safety stock formulas. Like most, the King formula contains a number of averages and standard deviations. These are average demand and average lead time, as well as standard deviation of demand and standard deviation of lead time.
The questions to answer are “average compared to what?” and “standard deviation relative to what?”.
What the Formula Covers
Before addressing what values to supply to the formula let's first map what each term covers. In this part, whenever I speak of "the formula" this applies to any version of the safety stock formulas mentioned in part 1: the original King formula or the two alternatives provided in the section titled "Dependence of Demand and Supply Variability". All three contain the same three terms, treated differently:
In this part of the series we will look at the last 2 terms. If there were no variability in demand or supply, in other words they were perfectly predictable, there would be no need for safety stock:
Inventory would follow a typical saw-tooth pattern. Inventory would reduce at a known and predictable rate of demand, resupply would be ordered exactly a supply lead time prior to stock out, and just as inventory would hit zero the delivery occurs to replenish it. The demand quantity per time period is D overline, and the supply lead time is LT overline. The reorder level is D*LT (omitting overlines in text going forward). As soon as actual inventory drops to that number the supply order is placed so that it arrives exactly when the inventory hits zero.
In practice demand does have variability. Sometimes actual demand is less than predicted, which leads to higher than expected inventory, but no detriment to customer service. The problem occurs when actual demand is greater than predicted:
In the time range after the resupply order is placed, if demand per time period is greater (in the graph by an amount equal to ΔD) then a stock out will occur. The shortage will be ΔD * LT. If demand per time period has a normal distribution with standard deviation σD then shortage will also have a normal distribution, with a mean of zero and a standard deviation:
Similarly, supply lead time is also variable. If delivery is sooner than expected there will again be an increased inventory level, but customer service will not suffer. If however, delivery is later than expected, inventory will run out and customer service levels will be affected:
In the time range after the resupply order is placed, if supply lead time is greater (in the graph by an amount equal to ΔLT) then a stock out will occur. The shortage will be ΔLT * D. If lead time has a normal distribution with standard deviation σLT then shortage will also have a normal distribution, with a mean of zero and a standard deviation:
领英推荐
So, with these two standard deviations we capture the variability of demand and supply independently from each other. Instead of reordering a lead time before inventory hits zero, we could order a lead time before it hits a higher value determined from these two terms. This is the safety stock. If demand is greater than expected or lead time is longer than expected, demand will eat into this extra amount and not stock out most of the time.
The King formula squares each term, turning them into variances, sums them and takes the square root of the sum. Two things can be noted from that approach. First, it is valid if both distributions are normal and independent from one another, but not in general. To accommodate that generally demand and supply are not independent the two alternative formulas in part 1 are provided. The last one allowing any level of dependence. The second note is that the formulas can only be correct if there is no unit of time. If lead time were expressed with a unit of time, of say days, weeks, months, etc, or even generic periods, then there is no way to make the units of the two terms in the formulas match. This would be a requirement to sum them. Similarly demand is not expressed as a rate, for example cases/day or units/week or kg/period, because that would also result in incompatible units of the two terms in the formulas. Hence, lead times are unitless and demand has a simple unit of measure such as units, cases, kg, etc.
Choosing Time Periods
Because the formulas are unitless with respect to time it creates both opportunity and risk of error. The opportunity is that we can choose any granularity of time periods that is convenient. If we want to express everything in days, we can. Weeks, months, quarters, years, dito. Or any arbitrary time period is fine too. If we have a lead time of 3 weeks, we could express everything in multiples of 3 weeks. The error I see sometimes is that not all terms are expressed in the same time period. For example, if a period of a week is chosen, then lead times need to be expressed as multiples of weeks and demand quantities need to be weekly amounts. This goes for both the average values and the standard deviations.
However, whilst there is a degree of freedom to pick any size of time period, not all choices are equally good. The reason is the assumption of a normal distribution of both demand and lead times. Under this assumption we could express the values in any granularity and translate it to any other without any loss of accuracy. For example, if demand were truly normal then we could translate daily standard deviation to a weekly one by multiplying the daily value with the square root of 7. If we wanted to translate it to a monthly one we could do so by multiplying by a factor of square root of 30 or 31. The problem is, in almost all cases demand and supply are not normally distributed. The monthly conversion shows evidence of a tricky issue: not all months have equal number of days, so any conversion from days or weeks to months, quarters or years will be inaccurate to some degree regardless.
The normal assumption comes to play through the use of the square root of the lead time. The rule of thumb is, the further away the lead time value is from 1, the larger the inaccuracy introduced. So, in the ideal case, your chosen time period granularity matches your lead time. In such a case the lead time value in the formula will always be 1, thus lossless. This means all the calculation burden is shifted to the demand side. Say, average lead time is 3 weeks, and a time granularity of 3 weeks is chosen. Then we need to determine the average demand in the upcoming 3 weeks and the standard deviation of demand residuals across all 3-week periods. Since different items will generally have different lead times it means that the calculation will now be item-specific. That is quite a bit of extra complexity in the calculation, but if feasible will reward itself in accuracy. Generally though, the other inaccuracies of the safety stock formula will be greater than the error from not getting this perfect. In practice, it should be sufficient to get "somewhat close". For example if most lead times are in the range of 2 weeks to 3 months, then a monthly time granularity should work fine. The biggest lead time factor is 3 on the high end, whilst on the low end it is slightly less (31/(2*7) = 2.214...). Keeping lead time values within the range 1/3 to 3 is a good rule of thumb that loss of accuracy of this kind is within reason. If there are cases where these values are outside of the range I would seriously explore alternatives. For example, if lead times are often 2 weeks, choosing a granularity of a day will result in lead time values of 14. This is solidly in the danger zone. If the demand pattern is very close to normal this will still not be an issue, but in general it will result in low accuracy.
A Few Words on Workdays
The above examples have another assumption embedded in them, namely that demand can occur on any day of the week or month. If however sales are only made on weekdays, then conversion from days to weeks needs to use a factor of square root of 5, not 7. From days to months needs square root of 20 or 21, rather than of 30 or 31. The closer to a normal distribution the demand during weekdays is, the more error is introduced by using all days of the week instead of workdays. As an example, for a fast moving item, selling 100 units on average per weekday with a standard deviation of 25, assuming sales on all days will instead yield an average demand of 71 units with a standard deviation of 50. Each of these values is used in the opposing term within the safety stock formula, causing an underestimation by 29% of the lead time safety and an overestimation by 100% of the demand safety. Depending on the specific behavior of your supply chain the error could be significant in either direction.
Generally, you will not need to worry about this. Simply calculate each value in the formula based on data in the same time granularity and it is not an issue. However, maybe you have determined that you need to use a weekly time granularity, but only have monthly demand history or a monthly demand forecast. In that case you have to pick your poison: one inaccuracy or the other. The conversion from months to weeks will likely be the least erroneous if done correctly. In that regard, you do not necessarily need to pick integer conversions, like 30 or 31. Dividing monthly standard deviation values by 2.085 is in most cases the best. This is the average of square roots of different month to week conversions, including correction for leap year. It works regardless of how many days in the week you are open for business. For month to day conversions you will want to divide 12 by the sum of all workdays within a year and take the square root. This is less simple because of holiday closures. Similarly be aware that week to day conversion is not usually a simple square root of 7 (sell all days) or 5 (sell on weekdays) since holidays may take those values down somewhat.
Finally, when using lead time values that are stored in some existing system be especially careful. When using a safety stock formula that ignores lead time variability, these values can be used. But beware that supplier lead times are often provided in calendar days, whilst manufacturing lead times are often provided in business days. You may need to convert them so they match the assumptions made in the other values used in the formula.
Lead Time: Average versus Maximum
When using any safety stock formula that incorporates supply lead time variability the lead times found in most systems of record (such as ERP, MRP, etc) cannot be used. Even though both formula and system call for something called a "lead time", these are not the same thing. The lead time stored in MRP/ERP is generally a practical maximum lead time, whilst the safety stock formula needs an average lead time and standard deviation around that. Also the lead time in the MRP/ERP system is often a lead time that is agreed with the supplier. In reality they may not even achieve this number. Remember, you have a service level target of less than 100% for your customers. Your supplier has a service level target of less than 100% for you. Worse, you may not always achieve your target, and neither will your supplier. Whenever this topic comes up the most common response is to suggest to just take the maximum and either assume the variation is zero or calculate the positive variation above and beyond that maximum. This is a really bad idea. For products with smooth demand (average >> standard deviation) it will lead to underestimation of safety stock. For products with intermittent demand (average << standard deviation) it will lead to severe overestimation of safety stock. Overall inventory will tend to be inflated, but you are not achieving the service levels you should with that inventory. Generally, not even close.
To get to an average lead time and its deviation you need to extract it from data. You will need to mine historic supply data and take the number of days between the dates when it was ordered and when it was received and available in stock. Take all such occurrences and find the average and the standard deviation. Note that this is often much more complex than it may seem at first blush. Orders and receipts may not be mapped to each other. Some orders may be blanket orders. Maybe not all dates were entered correctly. Some items may never have been supplied before or suppliers may have never been utilized before. You may need to add a fixed number of days for order receiving, quality assurance and stocking. This will be the most cumbersome task in getting your safety stock levels set right. And you will need to revisit it regularly. At least annually, but maybe more often.?
Note that it is generally easiest to do the calculation by supplier or by route (i.e. by supplier or plant and destination inventory location), not by item. The latter will be sparse data, statistically insignificant, and sensitive to outliers. In some cases you may want to do the calculation by some product grouping if the same supplier has dramatically different lead times for different kinds of items (for example their MTO vs their MTS).?
In part 5 I will provide more guidance on how to perform this calculation.
Average Demand When Demand is Seasonal or Trending
When demand is relatively stationary throughout a year using an "average demand" in the safety stock formula may be just fine. When demand shows seasonal behavior, or is trending, or is in a state of change during its lifecycle, the specific time range within which to determine an average becomes important. If you will order an item today that has a one month lead time you need to aim to hit your safety stock one month from now. Thus in the safety stock formula you need to estimate the average demand you can expect between now and then. If you are approaching high season this value will be much greater than if you are just heading into low season. Using an annual average demand value will all but guarantee stock outs during high season and mountains of excess inventory after you come out of it. Similarly, if there is a strong trend either in the past or expected within forward-looking lead time (for example new product or new market) the average demand value needs to accommodate that. You may need to correct annual averages with seasonal or trend factors, or use the demand forecast which should already contain this if it is significant.
Under such conditions note that a standard deviation calculated using annual averages will be overstated. Depending on the magnitude of seasonality or trend this may be very significant. The standard deviation used in the formula should be that of the forecast residuals after correction for long-term patterns. Again, this is typically a standard output of any forecasting system.?
Conclusion
Getting time granularity right and providing all the values into a safety stock formula at that granularity is trickier than it seems. But it is not rocket science. Using a few rules of thumb, common sense, and doing the grunt work to extract the correct values from data will make a tremendous difference in the accuracy of the result.
The big problem with safety stock calculations is that you cannot tell beforehand if the resulting values are any good, except for some extreme cases. Even then, you can tell they are wrong, but not what the correct values should be. The best you can do is ensure the values provided as input are the very best you can determine and that the logic is sound. This part discussed the values. Starting with the next part we will cover the logic.
Find all my articles by category here. Also listing outstanding articles by other authors.
Supply Chain Planning | Supply Chain Design & Modeling | Inventory Simulation | Logistics Planning | Project Management | Continuous Improvement | Leadership
11 个月Hi Stefan, what about the cases where we have supply lead time having some subset lead times ? For instance the total supply lead time is 10 day > of which 6 days in transportation + 4 days of order confirmation/booking time. And they both have different variabilities. How to include these independent variations and have safety stock having segmented for each independently so as to give levers to manager to influence them.
Planning Supervisor, at SMTC
6 年Looking forward to the rest of series
Supply Chain professional focused on continuous improvement
6 年Fruitful read
Delivery Head
6 年Looking forward for more articles.