Supply Chain Process Design using the Queueing Theory

Apply several principles of the Queueing Theory with Python to design a parcel packing process for an e-commerce fulfilment centre

Samir Saci
Towards Data Science

--

Supply Chain Process Design using the Queueing Theory
Design a Parcel Packing Process using Queueing Theory — (Image by Author)

Improve your E-commerce Fulfilment Centre’s parcel packing process with the Queueing Theory principles and Python.

Learn about process analysis, Little’s Law, and how to estimate waiting time in the queue.

Follow along with our simulation model using Python to optimize your parcel packing process.

Introduction
A supply Chain is a network of processes and stock locations built to deliver services and goods to customers.

This network usually supports your company's business strategy; its objectives can be diverse, such as delivering the best quality products at the lowest cost or the most customized service or product in the market.

As a Supply Chain Engineer, your objective is to design the most efficient processes to ensure a good customer service level and profitability.

This article will apply principles from the Queueing Theory with Python to design a process for parcel packing in an E-Commerce fulfilment centre.

💌 New articles straight in your inbox for free: Newsletter
📘 Your complete guide for Supply Chain Analytics: Analytics Cheat Sheet

SUMMARY
I. Problem Statement
What is the most efficient solution between single and multiple lines solutions?
Scenario
You got the approval from your management for investing in a second packing station and you're wondering how should you design the layout.
II. Optimal Solution using Queuing Theory
1. Introduction to Process Analysis
2. The Little’s Law
3. Introduction to the Queuing Theory
4. How can we estimate this waiting time?
5. Queueing Theory to estimate tq
III. Build a Simulation Model with Python
IV. Conclusion
1. Generative AI: Process Design with GPT
2. Next Steps

If you prefer to watch, have a look at the video version of this article

Short Explainer Video — (Video by Author)

I. Problem Statement

Scenario

You are the Outbound Manager of a multinational clothing retail company known for its fast-fashion clothing for men, women, teenagers, and children.

A major problem you’re facing is outbound productivity; after picking up your orders, they wait too long to be shipped.

Based on on-site observations and productivity analysis, you understood that the packing process was the bottleneck.

Warehouse Outbound Area with a Single Line Packing Station
Outbound Area with a Single Line Packing Station — (Image by Author)
  1. Warehouse Pickers bring the parcels on a trolley and put them on the conveyor
Warehouse Packing Process: Step 1
Warehouse Packing Process: Step 1 — (Image by Author)

2. Packing Operator Take the parcels from the conveyor and performs quantity check and packing (put filling material, close the box)

Warehouse Packing Process: Step 2
Step 2 — (Image by Author)

You got the approval from your management for investing in a second packing station, and you’re wondering how you should design the layout.

Solution 1: Keep a single line with two parallel stations

Packing Process Design using the Queueing Theory: Solution 1
Solution 1 — (Image by Author)

Solution 2: Add a second line with a dedicated station

Packing Process Design using the Queueing Theory: Solution 2
Solution 2 — (Image by Author)

Question

What is the most efficient (Packing Productivity) solution?

💡 Follow me on Medium for more articles related to 🏭 Supply Chain Analytics, 🌳 Sustainability and 🕜 Productivity.

II. Optimal Solution using Queuing Theory

The Queueing Theory can be defined as the science of studying waiting time using advanced mathematical concepts.

If you want to learn more about it, I strongly recommend the book Supply Chain Science by Wallace J. Hopp.

Introduction to Process Analysis

Simple Process Representation
Simple Process — (Image by Author)

We define a process as a succession of actions that converts inputs to outputs.

To simplify the comprehension, let’s introduce some notations:

Notations — (Image by Author)

2. The Little’s Law

After a long time, when your system gets stable, you can use this law to calculate the average number of items in the system (WIP)

Notations — (Image by Author)

3. Introduction to the Queuing Theory

The productivity issues during this process are caused by the time needed to wait for a parcel in the conveyor before being packed.

Simple Process with waiting time
Simple Process with waiting time — (Image by Author)

Your operators’ picking productivity is quite stable.

You may face issues that will slow down the process

  • Picking Error
    For instance, the picker has put the wrong quantity of items
  • Damages
    Some items do not pass the quality final check because of damages

In the initial configuration, these events increase the waiting of the parcels in the WIP and impact the overall average CT.

How can we estimate this waiting time?

Let’s introduce some notations:

Arrivals Parameters
Arrivals Parameters — (Image by Author)
Processing Parameters — (Image by Author)

The main indicator that we want to improve is the average cycle time which can be defined by:

CT = tq + tpwith
tq: waiting time in the queue (min)
tp: effective process time

Queueing Theory to estimate tq

Using Queueing Theory, we can approximate the waiting time with,

Equation — (Image by Author)

💡 Follow me on Medium for more articles related to 🏭 Supply Chain Analytics, 🌳 Sustainability and 🕜 Productivity.

You can find the full code in this Github (Follow Me) repository: Link
My portfolio with other projects:
Samir Saci

III. Build a Simulation Model with Python

Parameters

Arrivals,
ra = 6 parcels/min
ta = 0.17 min/parcel
CVa: coefficient of variation of ta
Processing,
rp = 3 parcels/min
tp = 0.33 min/parcel
CVb: coefficient of variation of tp

1. Waiting Time Formula for the Two Solutions

Equation — (Image by Author)

Note

We have u -> u/2 because the input flow is splitted through the two packing stations.

Simulation

Scenario

  • Deterministic Distribution of Arrivals: CVa = 0
  • Stochastic Distribution of Processing Time: CVp in [0, 2]

This scenario can be based on packing by batch: your picking operators are preparing orders in advance and sending the parcels in a continuous flow with a constant interval time.

Simulation Results for Scenario 1
Simulation Results for Scenario 1 — (Image by Author)

Comments

  • For a purely deterministic scenario (CVp = CVa = 0) we have no difference as the queuing time is zero for both solutions.
  • When we bring variability in the processing time (number of items per parcel to check, picking errors, quality issues we see that solution 1 outperforms solution 2.

Interpretation of the results

  1. A parcel with a quality issue will paralyze a full line if you take solution 2 (50% of input flow). Therefore, this solution is not optimal if you have high variability in your processing time.
  2. With Solution 1, we can ensure that the first parcels In will be more or less the first parcels Out, while we can’t predict that result with Solution 2 (imagine that one of your lines is facing a huge delay because of one parcel)

IV. Conclusion

Queueing Theory with Python has been used to design an efficient parcel-packing process that meets the demands of an e-commerce fulfilment centre.

We can optimize supply chain processes and improve customer satisfaction by using data-driven insights.

Generative AI: Process Design with GPT

Following the adoption of large language models (LLMs), I started experimenting with designing a LangChain Agent connected to a TMS.

Supply Chain Control Tower Agent with LangChain SQL Agent [Article Link] — (Image by Author)

The results are quite impressive; my agent can answer advanced operational questions by querying a database of delivery shipments and analysing the results.

What if we create a “Process Optimization” super agent?

Lean Six Sigma Super Agent — (Image by Author)

The vision is to equip customs GPTs with

  • Python Scripts of Lean Six Sigma Tools, Statistical Tests and Queueing Theory
  • Context, articles and knowledge about mathematical tools for Process Optimization

Continuous improvement engineers could use this GPT with an agent to find the analytical product, apply it to datasets uploaded and provide answers.

For more information,

Go Beyond

Based on these simulation results, you can estimate the impact on the average cycle time (by adding the processing time to queueing) and motivate your choices in the design.

Fortunately, the most efficient solution is also the cheapest as you do not need to invest in a new conveyor.

Include your model in a Digital Twin
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.

Example of Digital Twin with Python
Example of Digital Twin with Python — (Image by Author)

Your core model will include a sub-model to simulate the behaviour of your factory

  • Input Data: Production planning with expected production quantity and delivery date
  • Output data: Actual production quantity and delivery date

The algorithm developed in this article can be integrated into the digital twin to link your stores and the factory

  • Stores’ output will provide historical sales data to forecast future demand: algorithm input
  • The factory’s input will take the planning generated by the Wagner-Within algorithm as the quantity to produce per period

You can then easily simulate the impact of several solutions on the productivity of your warehouse.

💡 For more details,

About Me

Let’s connect on Linkedin and Twitter, I am a Supply Chain Engineer using data analytics to improve logistics operations and reduce costs.

If you are interested in Data Analytics and Supply Chain, have a look at my website

References

--

--

Top Supply Chain Analytics Writer — Follow my journey using Data Science for Supply Chain Sustainability 🌳 and Productivity ⌛