Skip to Content

Examining the Effect of Forecast Accuracy on a Dynamic Inventory Optimization Model for Spares

Prasad Gujela, Shan Lin, Surya Gundavarapu, Matthew A. Lanham
Purdue University Krannert School of Management;;;


Retailers continue to develop data-driven decision-support solutions to help improve inventory management decisions. If retailers can better handle inventory that will be more successful at fulfilling customer needs, while simultaneously managing the firm’s cash flows for more efficient operations and opportunities. It has been stated in the literature that increasing the accuracy of demand forecasts can save retailers millions of dollars a year in lost sales and inventory holding costs. The research question in this study is: how does demand forecast accuracy translate to additional inventory costs when using a dynamic inventory optimization model for replenishment of spare-type items?


Data Source

The dataset used in this study was inventory records from 2016 to 2017 obtained from a spare item distributor. They reviewed item quantity on a weekly basis and placed orders based on their demand forecast. Other features of the dataset include inventory on hand, actual shipping quantity, purchase price, lead time, minimum order level, and item class. Item class is the parameter used to divide the items in inventory based on the expected service level.

Data Preparation

The sparse items inventory data was first cleaned to remove items which had one or two data points. We cannot optimize orders based on very few data points and hence they were ignored from the model. The cleaned data was then subset on spare patterns observed in the data. We did this two ways:

I. Algorithmic: used an unsupervised learning algorithm to cluster the data and provide grouped inventory items.
II. Segmentation: partitioned data based on the Item Class that was known to us.

The objective of this step is to have all homogenous data together and then apply a model to those groups.

Figure: Data preparation methodology

Demand Forecast

To explore the impact of demand forecast accuracy on cost, we designed three sets of demand forecasts as the input for modeling.

I. Predicted demand by retailer’s model
II. Actual shipping quantity as actual demand
III. Based on the demand distribution pattern. We used a random ±1 of actual shipping quantity as our forecast set.

Graph: Actual demand

Figure: Fixed-time Period Ording ModelFixed-time Period Ordering Model

In Fixed-time Period Ordering Model, the order is placed only after a fixed time period, and the order quantity can be varied based on expected demand. Initially, we are in idle state and when demand occurs, we satisfy the demand based on the current inventory position. In a Fixed-time Period model, we wait till review time occurs. When the time occurs, we compute the inventory position based on the formula below. Then we compute the order quantity level up to which the distributor should place an order, and orders are placed.
𝑃𝑜𝑠𝑖𝑡𝑖𝑜𝑛 𝑃 = 𝑂𝑛 ℎ𝑎𝑛𝑑 + 𝑂𝑛 𝑂𝑟𝑑𝑒𝑟 − 𝐵𝑎𝑐𝑘 𝑂𝑟𝑑𝑒𝑟


  • 𝑂𝑛 ℎ𝑎𝑛𝑑 refers to the inventory for the items available at the distributor
  • 𝑂𝑛 𝑂𝑟𝑑𝑒𝑟 refers to the order for items made to the vendor expected to be delivered in a lead time agreed with the vendor
  • 𝐵𝑎𝑐𝑘 𝑂𝑟𝑑𝑒𝑟 refers to the order for items which is to be delivered to the customer as soon as it is available at the distributor

Dynamic Programming model

Dynamic Programming was coined by Richard Bellman in the 1940s when creating solutions to solving sequential decision problems. The model is for solving a series of smaller sub-problems such as an N period problem, where the solution to each sub-problem is used in solving the next subproblem.

Figure: Dynamic Programming model

Model Building and Comparison

We compared total cost computed by the two models after considering 3 sets of demand forecasts.

Figure: Model Building and Comparison


Exploratory Data Analysis

Inventory management should consider demand distribution, cost factors, service level, minimum order quantity, and inventory capability. In our dataset, we only focus on studying the demand distribution of spare item and held other factors as constant. We found that the predicted demand computed by the established model did not consider seasonality and did not match with the trend of actual demand. In fact, when we visualized the distribution of actual quantity demanded of each item class, we found that some classes showed higher deviation than others. For instance, class A, which requires the most demanding service level, and fluctuates significantly more than other classes.

Graph: Demand distribution by item classGraphs: Demand forecast and actual demand

Decision Variables

The variables that would be required to be decided are the Order Quantity and the Frequency of Order. From our model we can predict when you need to order. The quantity to be ordered is based on predicted demand.


TC = Total cost over a period of time t
Q = Total demand over time t
P = Ordering price of the item
V = Vendor request minimum order quantity O = Order up to level in units
M = Minimum Order Level
SL = Service Level
SOQ = Suggested Order Quantity
I = Inventory on hand
PoS = Percentage of Stock-outs

Objective Function

Min {TC} = Q*P + I*R*P


PoS (when I < D) < 1 – SL

We also included other constraints in our model such as the maximum order quantity (O) that can be placed for every item at a time. This quantity will depend on the size of warehouse and what the dimensions of the item are.

Dynamic Programming model

We construct a Dynamic Programming Model, which allows us to order based on the objective to minimize the Total cost of fulfilling demand over a period. The model aim helps to determine whether or not to order at time t and the quantity that is to be ordered. If we order, then the order quantity should be just enough to cover demand until the next period in which we order. Here are the steps to find out Least Costly Path for fulfilling demand predicted over a period of time.


Step 1: t = 1, zt* = 0

Step 2: t = t+1. If t > T+1, stop. Otherwise go to step 3.

Step 3: For all t = 1, 2, …, t - 1,

Step 4: Compute

z*t= min {z*t'+ct',t}


t = week number
T = week for window
𝑧𝑡 = optimum cost at time t
𝐷𝑡 = Demand at time t
𝐴𝑡 = min cost till the previous week ℎ𝑡 = inventory holding cost
𝑐𝑡 = total cost at time t

Total Cost Saving for Item Y


We compare the results from our model for the three predicted demands to see which one performed better based on the accuracy of demand. We used total cost incurred during the period under consideration including the cost of stock-outs as a metric to compare the performance. We found that the client’s predicted demand had the highest total cost associated with it due to poor forecasted demand accuracy. Our attempt to use exponential smoothing technique to simulate predicted demand did not yield an accurate forecast. As the model with highly accurate predicted demand showed least total cost, we suggest the client to focus their efforts in improving the accuracy of their demand forecasts.


We would like to thank the industry partner and professor for their guidance and feedback throughout the course of this study. The BIAC partially funded this work.