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 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 that represents your complete end-to-end operations, from production to store delivery.
I. What is a Supply Chain Digital Twin?
Let us define a supply chain to understand why we need a digital twin
1. A goal-oriented network of processes
Let us define what is a supply chain
2. Data, Parameters & Simulation blocks
How do we build a supply chain digital twin?
II. Examples of building blocks
Let us illustrate the definition by building 4 blocks
1. How to simulate warehouse operations?
A location that receives and prepare orders
2. How to simulate road transportation?
The trucks loading goods at the warehouse to deliver them at the store
3. How do we simulate store inventory management?
Monitoring inventory levels and sending orders to the warehouse
III. Next Steps
Let us test our digital twin with actual applications
1. Connect the blocks
The warehouse sending pallets to the trucks to be delivered to the store
2. Simulate scenarios to answer business questions
What if we increase the truck capacity? What if we ...
IV. Examples of applications
1. Digital Twin for Sustainability: Green Inventory Management
Can we reduce CO2 emissions by reducing the delivery frequency?
2. Digital Twin x Sustainability: Fashion Circular Economy
Simulate the logistics challenges of a rental model for a Fashion retailer
3. What is Supply Chain Analytics?
Discover more case studies to feed your digital twin
What is a Supply Chain Digital Twin?
A goal-oriented network
A supply chain is a goal-oriented network of processes and stock points that delivers goods and services to customers.
As a data scientist, how can I support the optimization of this network?
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.
What kind of data is required?
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.
How do we build this structure?
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 supply chain's behaviour.
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)
Now that you have the general definition, let us look at an example.
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 will build a model of a warehouse delivering products to stores.
We define a Warehouse class with attributes for the warehouse’s location, capacity, and inventory.
The add_inventory and remove_inventory methods can add or remove items from the warehouse’s inventory.
Can we improve this model?
To improve the model, you can add additional attributes and methods by considering process productivity, warehouse cost structure, workforce management, or picking processes.
At this stage, involve operational teams and continuous improvement engineers to ensure your model replicates the operations.
Your simulation must include bottlenecks, unproductive tasks, and quality issues that occur in real life 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 this model provides, ensure that all the stakeholders validate the assumptions and parameters used to build it.
What do you need to keep in mind?
That means rushing to design a quick, 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.
Let’s be specific!
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
Now that we have our warehouse, we need trucks.
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, …).
What about the stores now?
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 items in inventory, the order will be fulfilled, and the inventory will be updated accordingly.
- Otherwise, an error message will be printed.
I kept the model to have a concise article, but 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 critical parameters linked to the demand.
Now that you have all the blocks of your distribution network. Let’s play!
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
🏫 Discover 70+ case studies using data analytics for supply chain sustainability🌳and business optimization 🏪 in this: Cheat Sheet
Next Steps
Connect the blocks
Now that you have built your elementary independent blocks, you must connect them.
- Your store is sending replenishment orders to the warehouse management system using the ERP
- Your warehouse prepares the orders, packs them, 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.
What do we do with it now?
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 impact 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 to see how much your overall performance decreases.
Then, you can adapt the other metric (warehouse capacity, replenishment lead time, …) until you reach the initial target.
This will show you the improvements you need to make in your Supply Chain to achieve the robustness needed 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.
What is the best network to provide good results across all scenarios?
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 to implement to improve your robustness while reducing costs.
Let’s not forget about sustainability!
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.
Rent instead of buying, the best way to cut emissions!
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 circular subscription model scenarios on emissions reductions and water usage at a fast-fashion retailer.
- What if we rent our clothes for at least one month?
- How many items do we need to cover ten sales vs. ten rentals?
For more details, have a look at the article linked below 👇
What are the different types of 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 in solving 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 who uses data analytics to improve logistics operations and reduce costs.
For consulting or advice on analytics and sustainable supply chain transformation, feel free to contact me via Logigreen Consulting.
If you are interested in Data Analytics and Supply Chain, look at my website.
💌 New articles straight in your inbox for free: Newsletter
📘 Your complete guide for Supply Chain Analytics: Analytics Cheat Sheet
💡 Follow me on Medium for more articles related to 🏭 Supply Chain Analytics, 🌳 Sustainability and 🕜 Productivity.