Solution | Inventory Allocation Optimization with Grid Dynamics#
Overview#
Business Case#
Managing inventory levels across multiple locations is a mission-critical task for retailers of perishable and seasonal goods, and overall represents a significant challenge for all organizations managing complex supply chains with impact on costs, customer attractiveness, and competitiveness.
Leveraging data and analytics offers Supply Chain Managers the opportunity to rethink allocation strategies of inventories across warehouses and other locations to:
Minimize the order shipping costs by allocating to the most optimal locations and sourcing orders from there.
Reduce/avoid order splits (i.e. sourcing one order from multiple locations).
Reduce/avoid expensive shipping options (e.g. international shipping due to local stockouts).
Reduce/avoid cross-warehouse inventory movements and backorders.
Improve customer experience by increasing availability and providing better order fulfillment SLAs.
With the Inventory Allocation Optimization solution powered by Dataiku and Grid Dynamics, Supply Chain Managers and their Analytics teams take a jump start in determining the optimal allocation parameters for their inventories based on specific business objectives and constraints. With the comprehensive insights provided in the scalable Dataiku platform, Supply Chain Managers quickly embark in a successful journey to streamline their end-to-end supply chain operations.
Note
This solution is developed by Grid Dynamics in cooperation with Dataiku. Grid Dynamics is a leading provider of technology consulting, agile co-creation, data science, and supply chain optimization services. Grid Dynamics is a public Nasdaq-traded (NASDAQ:GDYN) company headquartered in San Ramon, California with offices in 13 countries worldwide. The company is known for delivering innovative Solutions that combine AI and cloud-native technologies for Fortune 1000 clients. Professional services for integrating this solution and developing custom analytics Solutions are provided by Grid Dynamics on demand.
Installation#
The process to install this solution differs depending on whether you are using Dataiku Cloud or a self-managed instance.
This solution is not available on Dataiku Cloud. Although you may try to import the zip file found in the self-managed instructions onto a Cloud instance, Dataiku offers no support in this case.
After meeting the technical requirements below, self-managed users can install the Solution in one of two ways:
On your Dataiku instance connected to the internet, click + New Project > Dataiku Solutions > Search for Inventory Allocation Optimization.
Alternatively, download the Solution’s .zip project file, and import it to your Dataiku instance as a new project.
Technical Requirements#
To leverage this solution, you must meet the following requirements:
Have access to a Dataiku 11.2+ instance.
To benefit natively from the solution’s Dataiku Application, an SQL connection storing your data (see Data Requirements) is needed. However, the solution comes with demo data available on the filesystem-managed connection.
A Python 3.6 code environment named
sol_inventory-allocation-optimization
with the following required packages:
pandas==1.0.5
numpy==1.19.5
absl-py==1.4.0
ortools==9.4.1874
protobuf==3.19.6
python-dateutil==2.8.1
pytz==2020.5
PyYAML==6.0
six==1.16.0
Data Requirements#
The solution’s full data model can be found in the accompanying solution wiki.
Dataset |
Description |
---|---|
supply_nodes (mandatory) |
Lists the present warehouses (aka supply nodes) and their respective capacity. |
supply (mandatory) |
Contains information about current product stock at different warehouses. Also contains information about the cost of procurement per product unit at different warehouses. |
demand_forecast (mandatory) |
Contains a list of demand for product sets per demand node (e.g., stores). |
shipping (mandatory) |
Indicates the shipping costs between warehouses and stores for an individual unit of product. |
demand_nodes (mandatory) |
Contains the list of demand nodes. |
product_procurement_baseline (optional) |
Contains information about the number of procured products at different warehouses. This data represents baseline numbers for procurement quantities. |
product_allocation_baseline (optional) |
Contains information about the number of different products shipped from a specific warehouse to a specific store. This data represents baseline product allocation. |
Workflow Overview#
You can follow along with the solution in the Dataiku gallery.
The project has the following high-level steps:
Input and Preprocess supply, demand, and product data.
Optimize Inventory Allocation via Mixed Integer Programming (MIP).
Calculate total procurement, shipping, and baseline costs.
Visualize applicable metrics for every stage of the supply chain involved in Inventory Allocation Optimization.
Compare optimized results with the benchmark to assess optimization strategies.
Walkthrough#
Note
In addition to reading this document, it is recommended to read the wiki of the project before beginning to get a deeper technical understanding of how this Solution was created and more detailed explanations of Solution-specific vocabulary.
Plan Inventory Distribution Across Warehouses - Optimized for Procurement and Shipping Costs#
In order to determine the optimal level of inventories on hand, and their distribution across warehouses, we must first have sufficient data on our Supply Nodes (aka Warehouses), the supply of our products, forecasted demand of products within stores, store information, and shipping costs. All of this information corresponds to the required datasets detailed in the previous Data Requirements section. All of this information can be connected to this solution via the Dataiku Application. To begin, you will need to create a new instance of the Inventory Allocation Optimization Dataiku Application. This can be done by selecting the Dataiku Application from your instance home, and clicking Create App Instance. Several Application instances can be created if you want to determine Optimization strategies based on different data or different parameters.
Once the new instance has been created, you can walk through the steps of the Application to connect your data and align it to the defined Data Model shipped with this solution. The changes made to these first steps of the Dataiku Application will impact and update the inputs and preprocess_zone Flow zones so that the Flow can properly adjust to our input data. In the event that we have the optional datasets (product_procurement_baseline and product_allocation_baseline) we can identify these datasets from the Dataiku Application. Doing so will trigger the product_procurement_benchmark_calculation, product_shipping_benchmark_calculation, and cost_benchmark_calculation Flow zones to be activated. We’ll go into more detail about the impact of these zones in the next section of the article.
Once our data is connected and the full Flow has been rebuilt with our data and adjusted needs, we can continue to the final section of the Dataiku Application in order to configure parameters for optimization settings. Specifically, it is here that we can set our relative MIP gap (this serves as a hard constraint that cannot be violated while our solution searches for an optimized inventory allocation strategy that minimizes costs) and identify if we’re using product sets in our demand forecast. We can tell the Dataiku App to Optimize and Solve with our selected values via the “Run Now” button. This will run the optimization Flow zone’s python recipe, which converts our input data into an optimization objective and constraints. The library used to optimize is specifically developed by Grid Dynamics. The processes need some time to finish optimizing but once it’s complete, the solution will also rebuild the dashboard_zone Flow zone so that all datasets used for visualization are updated. Once this is all complete, we can go directly to the Dataiku Dashboards provided to visualize our results.
Compare Optimized Plans With a Baseline or Historical Plan#
Having provided the optional product_procurement_baseline and product_allocation_baseline datasets when setting up the Dataiku Application, the solution will analyze our optimized plan against a Baseline Historical Plan. This is done by joining the product_procurement_baseline dataset to a cleaned version of the supply dataset within the product_procurement_benchmark_calculation Flow zone. From this joined dataset, we are then able to calculate the total procurement cost from the baseline. In parallel, the product_shipping_benchmark_calculation Flow zone joins our product_allocation_baseline data to shipping data and calculates the total shipping cost from the baseline. The outputs of these two Flow zones are stacked and grouped cost_benchmark_calculation by the Flow zone so that a final dataset baseline_objective_cost contains the overall baseline cost for Inventory Allocation Plan represented in our baseline data.
With our Baseline identified, the dashboard_zone Flow zone is used to join our baseline costs to the costs of an optimized plan and create visualizations comparing the two. All of these comparative visualizations and metrics are contained in the Benchmark Dashboard.
This single page dashboard shows the most important metrics related to the total cost, procurement costs, procurement quantities, shipping costs, and shipping quantities for both plans. We can use the filter on the left side to filter the metrics and charts by specific warehouse(s).
At the top of the page, we have a comparison of the total optimized cost vs. baseline cost. As we move down the page, we go into a more detailed and comprehensive cost-by-cost comparison that makes up the total cost differences. Each individual cost/quantity section has a vertical stacked bar plot comparing the corresponding metric and a pivot table providing an in-depth overview of the average enhancement for the given metric per warehouse.
Through this dashboard, we are able to validate whether or not the output of optimization is actually better than our current Inventory Allocation Plan, and over time, could be used to analyze the success of ongoing Inventory Allocation Optimization strategies.
Visualize Warehouse Utilization, Product Stocks, and Distribution Costs#
In addition to the optional Benchmark Dashboard, this solution comes with a prebuilt Results Dashboard, which will be fully built independent of the optional benchmark datasets. This dashboard contains visualizations and metrics based on data analyzing our optimized Inventory Allocation plan and is broken down into three distinct pages: Warehouse, Shipping, and Procurement. The pre-built dashboards provided with this solution can be a powerful tool for the supply chain manager to gain real-time insights and visualize key performance indicators (KPIs) crucial for managing their supply chain operations.
Starting first with the Warehouse page, we are provided a comparison of the capacity of our warehouses (aka supply nodes) before and after optimization. We specifically monitor the number of distinct products and warehouses, as well as the total quantity of products that need to be kept on hand in the warehouse. We can filter all charts and metrics by warehouse and/or Product ID. Use of these visualizations can help us better understand how the capacity of our warehouses is being utilized and make decisions on how to best distribute our products across warehouses to ensure they are available to meet demand.
Having better understood how to optimize our supply, it’s now relevant to see how the optimization plan impacts shipping. The Shipping page provides information about our shipping costs per store and per warehouse by visualizing our total shipping costs, average shipping costs, and total order count. Once again, we have filters on the left to filter by Warehouse or by Store. Looking at these visualizations can help us identify where the highest shipping costs are being incurred so that we can quantify the impact of a new Inventory Allocation plan on a significant cost of our Supply Chain.
Finally, the Procurement page visualizes procurement costs per warehouse and products. Here we can see where the majority of procurement is happening and the most popular products. The filters on this page allow us to adjust the data based on the warehouse(s) and product(s). This information can help Supply Chain Managers to better plan the procurement of products for different warehouses, as well as product allocation.
Based on the visualizations provided in the dashboard, we could go back to the Dataiku Application and make adjustments to the MIP gap parameters to further adjust the optimization and identify the best parameter/result combination for our needs.
Use Outputs to Support Downstream Decisions#
Beyond the dashboards provided with the solution, two results datasets for download are also generated in the final step of the Dataiku Application. The first dataset, product_allocation provides a list of quantities needed for specific products to be shipped from a warehouse (supply node) to the store (demand node). The product_procurement_list output dataset provides a list of certain quantities needed to procure in a warehouse (supply node). The aggregated form of this data is visualized in the dashboard but we also are provided this data in a direct CSV format as it is useful for a supply-chain manager to understand what product(s) he/she must procure and where they need to be shipped to. These CSV outputs could thus be connected to other decision-supporting tools, such as inventory replenishment tools, and ensure that the outputs of analysis and optimization are making a meaningful impact on our end-to-end supply chain operations. Furthermore, this entire solution can be automated using the pre-built scenarios to refresh the input data, rerun the optimization, and send the results to the downstream optimization systems.
Reproducing these Processes With Minimal Effort For Your Own Data with Grid Dynamics#
The intent of this project is to help supply chain management teams understand how Dataiku can be used to optimize stock levels across locations, improve fulfillment SLAs, and minimize order shipping costs.
By creating a singular solution that can benefit and influence the decisions of a variety of teams in a single organization, smarter and more holistic strategies can be designed in order to minimize shipping costs, reduce order splits, avoid expensive shipping options, reduce cross-warehouse inventory movements, and improve customer experience.
We’ve provided several suggestions on how your Inventory Allocation Plans can be optimized, but ultimately the “best” approach will depend on your specific needs and your data. To customize this solution to your needs get in touch with Grid Dynamics supply chain and data science experts. In addition to customizing this solution, Grid Dynamics is a leading provider of technology consulting with services for Supply Chain Consulting, Analytics, and AI Strategy Consulting, and Engineering.