Smart inventory allocation for delightful customer experience

Mohak Kumar Sukhwani
Myntra Engineering
Published in
4 min readFeb 21, 2022

--

You don’t need a reason to shop from Myntra, do you ? In case you need one, why don’t you check our recent collections here ! To make our products your proud possessions our ‘delivery partners’ are constantly engaged in expanding their networks and reach. In wake of growing technological advancements, we at Myntra are diligently working to empower our Fulfilment centres by locating our inventories close to our stakeholders .

As we expand our Fulfilment centres to have better delivery speeds, we keep a keen eye on optimising inventory allocation. Now, inventory placement is a complex problem. It requires in depth logistic planning and up to date demand analysis of our inventory. Buying and Replenishment is a major, throughout the year activity for us. Fast changing trends, seasonality, and just-in-time inventory models make inventory procurement an everyday activity. Once the buying quantity is fixed, typically using a demand forecasting model, the next task is to distribute the procured inventory optimally between the principal warehouses. Any optimisation of logistic cost by a few percentage points results in massive cost savings.

Optimal warehouse stocking leads to fast delivery of products with lower logistics costs and hence improved customer experience. Our team of Data scientists have developed an efficient solution to the problem of optimal warehouse allocations from a Regional Utilisation perspective using machine learning and optimisation methods. The system translates deep insights into feasible action plans that determine demand wise distribution across warehouses and thus bring brands closer to the customers. Better regional utilization leads to faster deliveries, improved bottom line, better visibility and higher conversion on marketplaces.

Regional Utilisation (RU) as a term defines the fraction of total demand which is fulfilled from the nearest warehouse. The quantity of the product that gets located in a warehouse must be in proportion to the regional demand of the product.

Procured inventory must be optimally allocated to warehouses in proportion to regional demand around the warehouse . This ensures that demand is fulfilled by the nearest warehouse thereby minimising delivery logistics cost and delivery times . We use machine learning models to estimate the geographical split of the demand for every product. Following are few essential constraints of product allocation across warehouses.

  1. The quantity of the product that gets located in a warehouse must be in proportion to the regional demand of the product.
  2. Warehouses have capacity constraints and old inventory which must be accounted for, while determining the new stocking quantities.

Problem formulation

Given a Purchase Order (PO) specification, which is a set of (𝑠𝑘𝑢𝑖 , 𝑞𝑢𝑎𝑛𝑡𝑖𝑡𝑦) pairs for 𝑀 unique SKUs and warehouses capacities with existing inventory of the SKUs in warehouses, we intend to compute the optimal warehouse allocations.

Ideal Splits Computation: Predicting the ideal split at the SKU level by a split prediction model and generating an ideal warehouse allocation.

  • Given a purchase order we compute, split matrix by computing the probability matrix of the purchase event of a SKU in a location associated with a warehouse.
  • The probabilities are computed by learning a classifier which predicts the warehouse probabilities using predictors like attributes of the style

Optimal Feasible Allocations: Warehouse allocation implied by ideal splits need not be always feasible because of warehouse capacity constraints. We impose warehouse capacity constraints on the ideal split matrix to compute optimal feasible allocations. Optimal Allocation is with respect to warehouse re-distribution tasks, which is formalised by defining redistribution cost penalty matrix. Penalties correspond to the cost involved in fulfilling an order from a warehouse instead of the nearest warehouse. We allow Non-assignment to handle cases where the total count of items in Purchase order is more than the combined capacity of all warehouses. By defining a redistribution penalty matrix, we can compute an optimal re-arrangement of ideal allocations which will be capacity feasible.

Redistribution Cost Penalty Matrix

We can think of the final allocation as minimum distortion from the ideal splits allocation which is feasible with distortion costs defined by the penalty Matrix. Having defined the redistribution cost penalty matrix 𝐿, we came up with integer programming based optimisation formulation.

Integer programming(using sku-level decision variables): In case of integer programming, we define integer decision variable Tensor. We determine optimal final split tensor Y-opt by solving the following integer programming problem.

We can efficiently solve the optimisation problem with total SKU quantity ranging in millions. The approach described here substantially upticks key business metrics like Regional Utilisation and Two-Days-Delivery. We tested the models on purchase orders created during an entire month using multiple scenarios. The models were tested for multiple purchase orders covering ~50L SKUs. To find more about our solution, detailed example and testing methodologies, please refer to: https://arxiv.org/pdf/2007.05081.pdf

--

--