Intelligent Warehouse Allocator for Optimal Regional Utilization Girish Sathayanarayana Arun Patro girish.sathyanarayana@myntra.com arun.patro@myntra.com Myntra Designs Myntra Designs
Introduction • Buying and Replenishment is a major, throughout the year activity in large fashion e-commerce firms. • Hundreds of Purchase Orders (POs) are raised every day to procure styles of di ff erent article types from vendors. • The task is to distribute the procured inventory optimally between the principal warehouses. • Goal is to reduce logistics cost and faster delivery times to customers.
Introduction SKU ID QUANTITY Vendor Partner 1 A0001 320 Vendor Partner 2 A0002 234 …. A0003 124 …. … … …. … … … … …. … … Vendor Partner N A1000 1034 3. Optimally distribute the stock 1. Raise a Purchase Order 2. Vendors deliver the products among warehouses
Caveats of Allocation • The quantity of the product (SKU) that gets located in a warehouse must be in proportion to the regional (areas in the vicinity of the warehouse) demand of the product. • Warehouses have capacity constraints and old inventory which must be accounted while determining the new stocking quantities.
Problem Statement Input Output Optimal warehouse allocations Purchase Order {( 𝑡𝑙𝑣 𝑗 , 𝑂 𝑗 ) |1 ≤ 𝑗 ≤ 𝑁 } {( 𝑡𝑙𝑣 𝑗 , [ 𝑌 𝑗 1 , ... 𝑌 𝑗𝐿 , 𝑌 𝑗𝑚 ]) |1 ≤ 𝑗 ≤ 𝑁 } Compute 𝐿 warehouses with capacities [ 𝐷 1 , 𝐷 2 , … 𝐷 𝐿 ] where 𝑌 𝑗𝑘 is the number of 𝑡𝑙𝑣 𝑗 allocated to Existing inventory of the SKUs { 𝐹 𝑗𝑘 |1 ≤ 𝑗 ≤ 𝑁 ; 1 ≤ 𝑘 ≤ 𝐿 } warehouse 𝑘 . 𝑌 𝑗𝑚 denotes the number of 𝑡𝑙𝑣 𝑗 not assigned to any warehouse. Subject To Total Orders Constraint Warehouse Capacity Constraint
Problem Statement Output Non-assigned quantity Input K warehouses SKU ID QUANTITY X 11 X 12 … … X 1K X 1L SKU 1 N 1 X 21 X 22 … … X 2K X 2L SKU 2 N 2 M orders … … … … … … SKU 3 N 3 …. …. X M1 X M2 … … X MK X ML SKU M N M Optimal Warehouse Allocation Matrix Purchase Order X ∈ R M *( K +1) 𝑌 𝑗𝑘 is the number of 𝑡𝑙𝑣 𝑗 allocated to warehouse 𝑘 𝑌 𝑗 L denotes the number of 𝑡𝑙𝑣 𝑗 not assigned to any warehouse
Problem Statement Subject to Constraints sum ( X 11 X 12 … … X 1K X 1L X 21 X 22 … … X 2K X 2L sum ( ) <= N 2 Total Orders Constraint … … … … … … X ML X M1 X M2 … … X MK ) <= C 2 Warehouse Capacity Constraint
Solution 1. Ideal Splits Computation: Predicting the ideal split at the SKU level by a split prediction model and generating an ideal warehouse allocation given the order quantity from a demand model for every SKU assuming unlimited capacity in warehouses. 2. Optimal Feasible Allocations: Finding optimal feasible allocations considering warehouse capacity constraints by defining an allocation penalty matrix and solving the constrained optimization problem.
Step 1: Ideal Splits Computation • Given a purchase order of size M and K warehouses, we compute the Ideal Split Matrix by calculating the probability matrix I P • = Probability (Purchase event for is located in geographical cluster P ij sku i with associated nearest warehouse being warehouse ) j • Ideal splits are computed by: I ij [ I i 1 , I i 2 , . . . I ik ] = N i * [ P i 1 , P i 2 , . . . P ik ]
Step 1: Ideal Splits Computation • We estimate these probabilities by learning a classifier which predicts the warehouse probabilities using predictors like attributes of the style P 1 P 2 P 3 sku i ... … P K Feature Vector Probability Vector representing attributes like representing colour, brand, fabric, size, age group, price, regional demand of the product sleeve length, neck-type etc
Step 1: Ideal Splits Computation Log Loss for the three layer multi layer perceptron for various article types and genders
Step 2: Optimal Feasible Allocations • Given Ideal Split Matrix and Warehouse Capacity constraints, we can compute the Optimal Allocation Matrix using two formulations 1. Binary Integer Programming 2. Integer Programming
Step 2: Optimal Feasible Allocations Non-assignment Loss • Optimality is with regard to the inter warehouse redistribution task. We L 11 L 12 … … L 1K λ NA formalise this by defining a redistribution cost penalty matrix L 21 L 22 … … L 2K λ NA • Penalties mirror logistics cost involved in … … … … … … fulfilling an order from warehouse 𝑘 when … … … … … λ NA the nearest warehouse is warehouse 𝑗 . L K1 L K2 … … L KK λ NA • Non-assignment is allowed to handle cases where total number of items in the Redistribution Cost Penalty Matrix PO is greater than the combined capacity of all warehouses. L ∈ R K *( K +1) L i , K +1 = λ NA λ NA > > L ij
Step 2: Optimal Feasible Allocations Binary Integer Programming • Given a specification , we can define an exploded PO Specification {( sku i , N i ) | 1 ≤ i ≤ M } PO item set by repeating number of times represented as . PO ′ sku i N i item ij • We compute the warehouse allocation using a one-hot decision vector for each item of the exploded set. We define a Boolean Decision Variable Matrix Y 11 Y 12 … … Y 1K ITEM QUANTITY SKU ID QUANTITY item 1 1 N 1 Y 21 Y 22 … … Y 2K SKU 1 N 1 items of SKU 1 item 2 1 SKU 2 N 2 … 1 SKU 3 N 3 … … … … … … 1 …. …. … 1 N M items of SKU M SKU M N M Y N1 Y N2 … … Y NK item N 1 PO Exploded PO Decision Variable Matrix M ∑ N = N i Y ∈ {0,1} N * K i =1
Step 2: Optimal Feasible Allocations Binary Integer Programming Y opt Mapping from W = Ideal Allocation Matrix Item Allocation to SKU Allocation Z = 1 N − Y 1 K (Truncated Loss Matrix) L ′ = L [1 : K ][1 : K ] Solved using https://github.com/coin-or/Cbc
Step 2: Optimal Feasible Allocations Integer Programming • In the Integer Programming Case, we define Y 11 Y 12 … … Y 1K Y 1,K+1 an Integer Decision Variable Tensor Y ∈ Z M * K *( K +1) Y 21 Y 22 … … Y 2K Y 2,K+1 + … … … … … … • = number of ideally allocated to Y iuv sku i warehouse which is finally placed in u Y K1 Y K2 … … Y KK Y K,K+1 warehouse ( implies not v v = K + 1 assigned to any warehouse) Decision Variable Matrix Y i
Step 2: Optimal Feasible Allocations Integer Programming Y opt Solved using https://github.com/coin-or/Cbc
Evaluation and Results • We back-tested the model on purchase orders created during an entire month at Myntra using 2 scenarios • Tested for Apparel, Footwear and Personal Care, covering 23 di ff erent Article types. Around 8,000 purchase orders were created for 43,000 SKUs and a total quantity of 3.4 million.
Evaluation and Results RU: Regional Utilization which is the 2DD: Percentage Two-Day-Delivery which fraction of orders which are fulfilled by is the fraction of orders which are fulfilled the nearest warehouse within two days of placing the order.
End
Recommend
More recommend