Inventory Management for Retail — Stochastic Demand | by Samir Saci | Towards Data Science

For most retailers, inventory management systems take a fixed, rule-based approach to forecast and replenishment orders management.
Considering the distribution of the demand, the objective is to build a replenishment policy that will minimize your ordering, holding and shortage costs.
In a previous article, we have built a simulation model assuming a deterministic constant demand (Units/Day).
towardsdatascience.com
In this article, we will improve this model and introduce a simple methodology using a discrete simulation model built with Python to test several inventory management rules assuming a normal distribution of the customer demand.
SUMMARYI. Scenario1. Problem StatementAs an Inventory Manager of a mid-size retail chain, you are in charge of setting the replenishment quantity in the ERP.2. Limits of the deterministic modelWhat could be the results with a normally distributed demand?II. Continuous Review Policy: Order Point, Order Quantity (s, Q)1. Introduction of the Inventory Policy2. Definition of the Safety Stock3. How do you define k?III. Example of replenishment policies1. Target of CSL = 95%2. Target of IFR = 99%III. Conclusion & Next Steps
As an Inventory Manager of a mid-size retail chain, you are in charge of setting the replenishment quantity in the ERP.
Based on the feedback of the store manager, you start to doubt that the replenishment rules of the ERP are the most optimal especially for the fast runners because your stores are facing lost sales due to stock-outs.
For each SKU, you would like to build a simple simulation model to test several inventory rules and estimate the impact on:
Performance Metrics
Cycle Service Level (CSL): probability to have a stock-out for each cycle (%)
Item Fill Rate (IFR): percentage of customer demand met without stock-out (%)
In this article, we will build this model for,
# Total Demand (units/year)D = 2000# Number of days of sales per year (days)T_total = 365# Customer demand per day (unit/day)D_day = D/T_total# Purchase cost of the product (Euros/unit)c = 50# Cost of placing an order (/order)c_t = 500# Holding Cost (% unit cost per year)h = .25c_e = h * c# Selling Price (Euros/unit)p = 75# Lead Time between ordering and receivingLD# Cost of shortage (Euros/unit)c_s = 12# Order Quantity Q = 82 (units/order)
To simplify the comprehension, let’s introduce some notations
In the previous article, we assumed a constant deterministic of the demand; we’ll now introduce randomness to get closer to real demand.
μ_D = 2000 (items/year)σ_D = 50(items/year)
You need to improve your replenishment policy to compensate for the volatility of your demand.
You can find the full code in my Github repository: Link (Follow me :D)My portfolio with other projects: Samir Saci
To solve this issue of demand volatility, we’ll introduce a continuous review policy (s, Q)
Continuous Review = your inventory level will be checked every day
(s, Q) = if your inventory level ≤ s your ERP will order Q
To simplify the comprehension, let’s introduce some notations:
The reorder point can be defined as the minimum inventory level you need to meet your customers’ demand during the lead time between your ordering and receiving.
The safety stock is a buffer to compensate for the volatility of the demand.
Your performance metrics will be directly impacted by the safety stock level; the highest k is the best your performance will be:
You fix your target for any of the two metrics (e.g: I want my CSL to be 95%)You calculate k to reach this targetYou fix your reorder point
You fix your target for any of the two metrics (e.g: I want my CSL to be 95%)
You calculate k to reach this target
You fix your reorder point
samirsaci.com
Based on the definition of the CSL, we have:
k = 1.64Reoder point with CSL: 36 units
Comments
In this example, we can see that we do not face any stock and the minimum stock level is very close to zero.
Code
In this previous example, our target was to have 95% of the replenishment cycles without stock-out.
In this example, we’ll focus more on our capacity to deliver products in full with a target of IFR. This formula is using the Unit Normal Loss Function (you can find more information about this function here: Link).
# G(k) = Q/sigma_ld * (1 - IFR)IFR = 0.99G_k = (Q/sigma_ld) * (1 - IFR) = 0.14# Final value of kk = 0.71Reoder point with CSL: 31 units
Comments
To reach 99% of demand units fulfilled without stock-out you need a lower safety stock. (31 units vs. 32 units)
Code
This improved model is bringing better results as it considers the variability of the demand in the safety stock sizing.
The process is simple, you start by fixing your performance metrics targets (IRF, CSL) and then you calculate your safety stock level using the k value.
The main issue with the continuous review policy is the high number of replenishment if you have many SKUs in your portfolio.
As a store manager (or Warehouse Manager), you would prefer to fix the replenishment time (e.g: 2 times per week). Therefore, we will introduce the periodic review policy in the next article.
Please feel free to contact me, I am willing to share and exchange on topics related to Data Science and Supply Chain.My Portfolio: https://samirsaci.com
[1] Supply Chain Science, Wallace J. Hopp
[2] Inventory Management for Retail — Deterministic Demand, Samir SACI, Link