Improve Warehouse Productivity using Spatial Clustering with Python.
Improve Warehouse Picking Productivity by Grouping Orders in Batches using Picking Location Spatial Clusters.
A significant cost reduction lever for logistics management is improving warehouse productivity of goods handling processes.
In a warehouse, 60% to 70% of the picking operators' working time is wasted walking from one location to another.
As a Data Scientist, how can we use Python to reduce this time?
In a previous article, we built the basis to estimate the total picking route walking distance for a set of orders using:
- Warehouse Mapping: Link each order line with your warehouse's associated picking location coordinate (x, y).
- Distance Calculating: This function calculates the walking distance from two picking locations.
The impact of grouping orders in waves on total walking distance is
- Up to 50% reduction after grouping three orders per wave
- We reach a 75% reduction if we achieve nine orders per wave
Can we find additional levers to reduce this distance even more by grouping orders in a smart way?
In this article, we will deep dive into the Order Wave Processing solution, focusing on using spatial clustering with Python to group orders.
I. Order Wave using Picking Locations Clustering
Group orders by geographical clusters of the picking locations
1. Picking locations clustering using Scipy
Apply clustering techniques on the picking locations to create groups
2. Picking locations clustering for Multi-line Orders
Centers of gravities can be used if we have multiple locations in an order
II. Model Simulation
1. Comparing 3 methods of Wave Processing
2. Tuning Distance Threshold for Clustering
III. Conclusion
1. Improve the pathfinding algorithm
2. Advanced Diagnostic using Process Mining
Order Wave using Picking Locations Clustering
In the previous simulation, we took a straightforward approach for
- Picking Route Design: Given a choice of several picking locations, the warehouse picker will always choose to go to the closest (Next Closest Location Strategy)
- Order Waving: Orders are ordered and grouped in waves by receiving time from OMS (TimeStamp)
Can we improve the performance by grouping orders by spatial location?
Let’s start implementing this with single-line orders, as they have the advantage of being in a single storage location.
Grouping several single-line orders by cluster can ensure that our picker will stay in a delimited zone.
Where single-line orders are located?
Function 1: Calculating the Number of single-line orders per storage
Code
Insights: Let us take the example of Distribution above
- Scope: 5,000 order lines for 23 aisles
- Single line orders: 49% of orders located in alleys A11, A10, and A09
We can spot clusters of high-concentration order lines picked, meaning these locations may be visited more than the others.
We should then group these locations by area to ensure the operators stay within their vicinity along the wave.
How can we create clusters of locations?
Picking locations clustering using Scipy
Group picking locations by clusters to reduce the walking distance for each picking route.
Example: the maximum walking distance between two places is <15 m
Spatial clustering is grouping a set of points so that objects in the same cluster are more similar than objects in other clusters.
Here, the similarity metric will be walking distance from one location to another.
For instance, I would like to group locations, ensuring the maximum walking distance between two locations is 10 m.
What are the challenges?
Challenge 1: Euclidian Distance vs. Walking Distance
We cannot use conventional clustering methods using Euclidian Distance for our specific model.
Indeed, walking distance (using the distance_picking function) differs from Euclidian Distance.
For this specific example, Euclidian distances between i (xi, Yi) and the two points p (x_p, y_p) and j (x_j, y_j) are equal.
But, if we compare picker Walking Distance, p (x_p, y_p) is closer.
Picker's Walking Distance is the specific metric we want to reduce for this model.
What can we do to adapt the distance to our specific layout?
We can use a custom-made distance_walking function for better performance.
Example: Locations Clustering within a 25 m distance (5,000 order lines)
- The left example uses walking distance grouping locations within the same aisle, reducing picking route distance.
- The right example can group locations covering several aisles.
Let’s implement it in a function!
Function 2: Clusters for Single Line Orders using Walking Distance
For a set of orders, lines extract single lines (df_orderlines) orders and create clusters of storage locations within a distance (dist_method) using the custom distance function (dist_method).
The Python code below uses Scipy’s ward and fcluster functions to create cluster-picking locations using the distance_func metric (walking distance).
Code
Now that we have created our clusters, we must link each order line to its optimal cluster.
Function 3: Single Line Orders Mapping with ClusterID
For a set of orders, lines extract single lines (df) orders, clusters id, and order numbers.
In this function, you map your Dataframe with cluster ID for wave creation.
Code
Challenge 2: Picking locations clustering for Multi-line Orders
Unlike single-line orders, multi-line orders can cover several picking locations.
However, we can apply the same methodology to the centroids of storage locations.
Example: Order with three lines covering three different picking locations
Code
After using this function, we return to the mono-line orders situation with a single point (x, y) per order.
We can then apply clustering to these points, trying to group orders per geographical zone with maximum distance conditions.
How can we guide operators along their picking route?
To help operators find their way, your operations can use voice-picking
🏫 Discover 70+ case studies using data analytics for supply chain optimization 🚚and business profitability 💵 in this Cheat Sheet
Model Simulation
To sum up our model construction, see the chart below.
We have several steps before picking routes to create using Wave Processing.
At each step, we have a collection of parameters that can be tuned to improve performance:
Comparing three methods of Wave Processing
We’ll first assess the impact of Order Wave processing by clusters of picking locations on total walking distance.
Scenario for Simulation
- Order lines: 20,000 Lines
- Distance Threshold: Maximum distance between two picking locations (distance_threshold = 35 m)
- Orders per Wave: orders_number in [1, 9]
We will be testing this dataset using three different methods.
- Method 1: we do not apply clustering
- Method 2: we apply clustering on single-line orders only
- Method 3: we apply clustering to single-line orders and centroids of multiline orders.
Results
- Best Performance: Method 3 for nine orders/Wave with 83% reduction of walking distance
- Method 2 vs. Method 1: Clustering for mono-line orders reduces the walking distance by 34%
- Method 3 vs. Method 2: Clustering for mono-line orders reduces the walking distance by 10%
Tuning Distance Threshold for Clustering
We validated our first assumption that Method 3 is the best for our particular scenario (20,000 order lines, 35 m Distance Threshold).
Let us look at the Distance Threshold impact on total walking distance.
The trade-off between Walking Distance between two locations and Wave Size:
- Low Distance: The walking distance between two locations is low, but you have fewer orders per wave (more waves)
- High Distance: The walking distance between two locations is higher, but you have more orders per wave (fewer waves)
We can find a local minimum for Distance_Threshold = 60 m, which reduces the distance by 39% compared to Distance_Threshold = 1 m.
We can find a local minimum for Distance_Threshold = 50 m, which reduces the distance by 27% compared to Distance_Threshold = 1 m.
Next Steps
Improve the pathfinding methodology
The good news is that this solution can be improved even more.
The next closest location strategy has limits that can be easily pointed out by picking route records.
In the example above, we can see that the operators have to cover the same area several times through the picking route.
This is not efficient!
Therefore, I have implemented a pathfinding algorithm presented in the article linked below.
How to measure inefficiencies and detect failures?
Advanced Diagnostic using Process Mining
Process mining is a type of data analytics that focuses on discovering, monitoring, and improving business processes.
This involves analyzing data from various sources, such as process logs, to understand how a process is being executed, identify bottlenecks and inefficiencies, and suggest ways to improve it.
Your Warehouse Manage System (WMS) will record every step of the picking process.
- Start of the wave by the operator
- The first item picked, the second item picked …
- The last item picked
A solution using process mining can support the automation of the diagnostic of productivity issues by targeting bottlenecks.
For more information,
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