What Is a Supply Chain Digital Twin?
Discover digital twins with Python: model supply chain networks, enhance decision-making & optimize operations.
A digital twin is a digital replica of a physical object or system.
A Supply Chain digital twin is a computer model representing various components and processes involved in the supply chain, such as warehouses, transportation networks, and production facilities.
In previous articles, I shared examples of Python models designed for specific applications such as transportation routing optimization, supply chain network design or production planning.
In this article, we will step back and build a Supply Chain Digital Twin representing your complete end-to-end operations from production to store delivery.
💌 New articles straight in your inbox for free: Newsletter
📘 Your complete guide for Supply Chain Analytics: Analytics Cheat Sheet
What is a Supply Chain Digital Twin?
A goal-oriented network
A supply chain is a goal-oriented network of processes and stock points used to deliver goods and services to customers.
To create a digital twin of a supply chain using Python, you first need to define the various components and processes that make up the supply chain.
This could involve creating data structures representing warehouses, transportation operations, and production facilities and defining the relationships between these components.
Data & parameters
Next, you would need to collect data on the various components and processes of the supply chain, such as
- Locations and capacities of warehouses
- Routes and capacities of transportation networks
- Production rates of production facilities
- Customer and store demand
This data could be stored in databases or other data storage systems or directly connected to your warehouse management systems and ERP.
Simulation blocks
Once you have the data on the supply chain components and processes, you can use Python to create algorithms and simulations that replicate the behaviour of the supply chain.
This could involve using optimization algorithms to
- Determine the most efficient routes (output) to deliver stores using replenishment orders (input) coming from the store model
- Improve the picking processes (output) in your warehouse to prepare store replenishment orders (input)
- Schedule your production (output) based on demand forecasts built with the stores’ sales historical data (input)
💡 Follow me on Medium for more articles related to 🏭 Supply Chain Analytics, 🌳 Sustainability and 🕜 Productivity.
Examples of building blocks
Overall, creating a supply chain digital twin with Python would involve a combination of data collection and analysis, algorithm development, and simulation modelling.
It requires a deep understanding of supply chain management and experience with Python programming.
Let us take three examples of elementary blocks built with Python.
How to simulate warehouse operations?
We define a Warehouse class with attributes for the warehouse’s location, capacity, and inventory.
The add_inventory and remove_inventory methods can add and remove items from the warehouse’s inventory.
This is a simple example; you can add additional attributes and methods by considering processes productivity, warehouse cost structure, workforce management or picking processes to improve the model.
At this stage, involve operational teams and continuous improvement engineers to ensure that your model replicates the actual operations.
Bottlenecks, unproductive tasks and quality issues that happen in real life must be included in your simulation to validate your model.
💡 Do not forget the “Twin”
If your model is too far from reality, it will lose credibility.
Indeed, if your final goal is to use the insights you can get from this model, make sure that the assumptions and parameters used to build it are validated by all the stakeholders.
That means rushing to design a quick and dirty model with gross assumptions is useless.
You can be sure that the operations will carefully analyze its results if you use them to drive continuous improvement initiatives or challenge their management.
For instance, make sure to consider:
- Reasonable productivity per worker and capacities in your factories and warehouse
- External constraints like holidays, labour regulations or equipment sourcing limitations when assessing the robustness of your operations (for instance, you cannot double your picking capacity in 1 day)
- Transportation constraints like truck sourcing, road restrictions or traffic jams
How to simulate road transportation?
We define a Truck class with attributes for the truck’s location, capacity, and load.
The move_to method can be used to move the truck to a new location, and the load_cargo and unload_cargo methods can be used to load and unload cargo, respectively.
The solution above can be improved by adding loading and unloading times, timestamps for lead time calculations, costing parameters, or detailing the handling units (pallets, cartons, …).
How to simulate store inventory management?
We define a Store class with attributes for the store’s location and inventory.
The place_order method can be used to order a given item and quantity.
- If the store has enough of the items in inventory, the order will be fulfilled, and the inventory will be updated accordingly.
- Otherwise, an error message will be printed.
You can improve it by
- Adding the requested delivery date
- Managing several handling units
- Including the outbound sales and lead times
Outbound sales will represent the most important parameters linked to the demand.
You can test the resilience of your supply chain by
- Simulating the variability of this demand (for instance, using a normal distribution)
- Create seasonality and peak periods to replicate the promotions and collection launches
- Project future sales and new store openings to stress test your network and get insights on how to improve it
💡 Follow me on Medium for more articles related to 🏭 Supply Chain Analytics, 🌳 Sustainability and 🕜 Productivity.
Next Steps
Connect the blocks
Now that you have built your elementary independent blocks, you need to connect them.
- Your store is sending replenishment orders to the warehouse management system using the ERP
- Your warehouse prepares the orders, packs the items and puts them on pallets.
- Pallets are loaded in a truck
- The truck delivers the pallets to the store
And add external parameters such as customer demand or raw materials supply constraints.
Simulate several scenarios to answer business questions
Scenario 1: stores demand is doubling
- What would be the impact on the warehouse(s) capacity?
- How many days of stock coverage would we need to avoid stock-outs at stores?
Scenario 2: You merge all local warehouses into a central distribution centre:
- What would be the impact on the service level?
- Can we reduce transportation and warehousing costs by delivering stores directly from factories (for some SKUs)?
Scenario 3: You want a 25% reduction of your warehouse(s) inventory
- What should be the maximum replenishment lead time from the factories?
- What is the minimum accuracy of demand planning needed to avoid stock-outs?
- What would be the impact on the stability of production levels in the factories?
Scenario 4: you would like to stop air freight to reduce your CO2 emissions
- What would be the impact on the stores' replenishment lead times?
- How far ahead do the distribution planners need to create replenishment orders?
For each scenario, you can manipulate the parameter linked to the question and see how much your overall performance will decrease.
Then, you can adapt the other metric (warehouse capacity, replenishment lead time, …) until you reach the initial target.
This will show you the improvements in your Supply Chain to get the level of robustness to adapt to these new business needs.
You get inspiration from the methodology used for Supply Chain Network Design, where we try to simulate demand volatility for 50 scenarios assuming a normal demand distribution.
For each scenario, we use linear programming with Python to find the best combination of factories to produce and deliver products to markets at the lowest cost.
You can decide which combination you would like to implement to improve your robustness while reducing costs.
Digital Twin x Sustainability: Green Inventory Management
Green inventory management can be defined as managing inventory in an environmentally sustainable way.
For a distribution network, this can involve a set of processes and rules that aim to reduce the environmental impact of order transmission, preparation and delivery.
What would be the impact on CO2e emissions if we reduce the frequency of store replenishments?
Use data analytics to simulate the variation of store replenishment frequency and measure the impact on the overall environmental impact.
Digital Twin x Sustainability: Fashion Circular Economy
A circular economy is an economic model that aims to minimize waste and maximize resource efficiency.
It involves designing products and processes focusing on longevity, reuse, and recycling.
Some companies have implemented a subscription model where customers pay a regular fee to access a product or service for a specific period.
Use data analytics to simulate the impacts of several scenarios of circular subscription models on emissions reductions and water usage of a Fast Fashion Retailer.
Supply Chain Analytics
Now that you have the replica of your supply chain, you can play with the parameters and use data to perform.
Descriptive Analytics: monitor your processes with dashboards and visuals
A set of tools to provide visibility and a single source of truth across the supply chain to track your shipments, detect incidents and measure the performance of your operations.
Diagnostic Analytics: automate root cause analysis processes
This can be summarized as incident root cause analysis.
Predictive and Prescriptive Analytics: add forecasting and optimization models into your digital twin to improve ordering rules or planning
Support the operations to understand the most likely outcome or future scenario and its business implications.
Thus, you can assist the operations to solve problems and optimize the resources to maximise efficiency.
- How To: Machine Learning-Driven Demand Forecasting, Nicolas Vandeput
- Production Fixed Horizon Planning with Python, Samir Saci
For more details,
Your digital twin can be seen as a core model in which you can add models that solve specific issues.
About Me
Let’s connect on Linkedin and Twitter, I am a Supply Chain Engineer that is using data analytics to improve logistics operations and reduce costs.
If you are interested in Data Analytics and Supply Chain, look at my website.
💡 Follow me on Medium for more articles related to 🏭 Supply Chain Analytics, 🌳 Sustainability and 🕜 Productivity.