The world’s leading publication for data science, AI, and ML professionals.

Improve Warehouse Productivity using Order Batching with Python

Design a simulation model to estimate the impact of several Single Picker Routing Problem strategies in your Picking Productivity

Improve Warehouse Productivity using Order Batching with Python - (Image by Author)
Improve Warehouse Productivity using Order Batching with Python – (Image by Author)

In a Distribution Center (DC), walking time from one location to another during the picking route can account for 60% to 70% of the operator’s working time.

As a Data Scientist, how can you help logistics operations improve this figure?

Reducing this walking time is the most effective way to increase your DC overall productivity.

(1) Scenario 1: **** Picking routes with one order picked per wave - (Image by Author)
(1) Scenario 1: **** Picking routes with one order picked per wave – (Image by Author)

The objective is to simulate the impact of several picking strategies with Python, using the Single Picker Routing Problem (SPRP) for a two-dimensional warehouse model (axis-x, axis-y).

This specific application of the general Traveling Salesman Problem (TSP) finds the shortest route to prepare a specific set of orders.

Using data analytics , can we compare several routing strategies?

In this article, we will use Python to simulate several order-batching strategies to estimate their impact on the total walking distance.

I. What is Wave Picking?
  E-Commerce Warehousing Operations: Improve the picking productivity
  1. Assumptions
  Picking locations, cart size and operational conditions
  2. Initial Picking Strategy
  What if the operator prepares only 1 order per wave ?
II. Test several Optimization Algorithms
  1. Warehouse Layout with storage location mapping
  Each location (x, y) coordinates w
  2. Order lines from your Warehouse Management System (WMS)
  Data source coming from the system 
  3. Functions for calculating Picking Route distance
  A custom function to measure distances considering the alleys
  4. Functions for creating order waves
  How to group orders per wave?
III. Results & Next Steps
  1. Results of the Initial Experiment
  How much distance reduction if we group orders in the same wave?
  2. Next Steps: Exploring other batching strategy
  Like grouping orders per clusters of locations or using pathfinding algo
  3. Statistical Approach: What is the impact of other parameters?
  Lean six sigma: a statistical approach to process improvement

What is Wave Picking?

For this study, we will use the example of E-Commerce type DC, where items are stored on 4-level shelves.

These shelves are organized in multiple rows (Row#: 1 … n) and aisles (Aisle#: A1 … A_n).

Assumptions

(2) Warehouse Picking Carts - (Image by Author)
(2) Warehouse Picking Carts – (Image by Author)
  1. Items Dimensions: Small and light dimensions items
  2. Picking Cart: lightweight picking cart with a capacity of 10 orders
  3. Picking Route: Picking Route starts and ends at the same location

Scenario 1, the worst in terms of productivity, can be easily optimized because of

  • Locations: Orders #1 and #2 have common picking locations
  • Zones: orders have picking locations in a common zone
  • Single-line Orders: items_picked/walking_distance efficiency is very low
(3) Scenario 2: Wave Picking applied to Scenario 1 - (Image by Author)
(3) Scenario 2: Wave Picking applied to Scenario 1 – (Image by Author)

How can you organise picking routes?

The first intuitive way to optimize this process is to combine these three orders in one picking route – this strategy is commonly called Wave Picking.

We will build a model to simulate the impact of several Wave Picking strategies on the total walking distance for a specific set of orders to prepare.

This problem aims to maximize the picking productivity, i.e., the number of boxes an operator picks per hour worked.

To learn more about Picking Productivity,


Test several Optimization Algorithms

Now that we have set the objective, let us gather assumptions and operational parameters to build a model.

How do we measure the walking distance?

Warehouse Layout with storage location mapping

(5) Warehouse Layout with 2D Coordinates - (Image by Author)
(5) Warehouse Layout with 2D Coordinates – (Image by Author)

Based on the actual warehouse layout, storage locations are mapped with 2-D (x, y) coordinates that will be used to measure walking distance.

Every storage location is linked to a Reference using Master Data.

For instance, reference #123129 is located in coordinate (xi, yi)

You can then link every order line to a geographical location for picking.

Order lines from your Warehouse Management System (WMS)

(6) Database Schema - (Image by Author)
(6) Database Schema – (Image by Author)

Order lines can be extracted from your WMS Database.

This table should be joined with the Master Data table to link every order line to a storage location and its (x, y) coordinate in your warehouse.

Extra tables can be added to include more parameters in your model, like (Destination, Delivery lead time, Special Packing, ..).

Now that we have the locations of our items, we need functions to calculate the walking distance for a specific order.

What is the distance between two picking locations?

Function 1: Calculate the distance between two picking locations

Let us assume that your operator needs to pick a box in the location j and another two boxes in the location I.

(5) Different routes between two storage locations in the warehouse - (Image by Author)
(5) Different routes between two storage locations in the warehouse – (Image by Author)

This function calculates the walking distance between points i (xi, yi) and j (xj, yj).

Objective: return the shortest walking distance between the two potential routes from point i to point j.

Parameters

_y_low: the lowest point of your alley (y-axis) yhigh: highest point of your alley (y-axis)

Code

Now, we can calculate the distance between locations I and J.

Now that the operator picked in location I, to which location should she go?

Function 2: The Next Closest Location

We assume that your operator picked a box in the location

(6) Next Storage Location Scenario - (Image by Author)
(6) Next Storage Location Scenario – (Image by Author)

This function will help you choose the next location among several candidates to continue your picking route.

Objective: return the closest location as the best candidate

(**) We will see later that this choice will impact overall productivity.

Code

Function 3: Create your picking route and calculate the total walking distance

This function will create your picking route from a set of orders to prepare.

  • Input: a list of (x, y) locations based on items to be picked for this route
  • Output: an ordered sequence of locations covered and total walking distance

Code

Now that we have the tools to locate the locations and measure the distances, we need to implement a strategy to group orders.

What if we prepare ten orders per picking wave?

Function 1: Create batches of n orders to be picked at the same time

Let us create a function that will group orders by batch.

For each batch, the total walking distance of the picking route will be calculated.

  • Input: order lines data frame _(dforderlines), number of orders per wave _(ordersnumber)
  • Output: data frame mapped with wave number (Column: WaveID), the total number of waves _(wavesnumber)

Code

We now have our waves.

We must create IDs and store their locations in lists.

Function 2: Listing picking locations of wave_ID picking route

  • Input: order lines data frame _(dforderlines) and wave number (waveID)
  • Output: list of locations i(xi, yi) included in your picking route

Code

👉 You can find the complete code in my GitHub repository: Link

There are now all the Lego parts to build our simulation engine to answer the question:

What is the best number of orders per wave to minimize the total distance?


Results of the simulation

Initial Experiment

After setting up all necessary functions to measure picking distance, we can test our picking route strategy with picking order lines.

Here, we first decided to start with a straightforward approach

  • Orders Waves: Orders are grouped by chronological order of receiving time from OMS ( TimeStamp)
  • Picking Route: The ** picking route strategy follows the Next Closest Locatio**n logic

To estimate the impact of wave picking strategy on your productivity, we will run several simulations with a gradual number of orders per wave:

  1. Measure Total Walking Distance: how much is walking distance reduced when the number of orders per route increases?
  2. Record Picking Route per Wave: recording the sequence of locations per route for further analysis

Code

(8) Results for 5,000 order lines with a ratio from 1 to 9 orders per route - (Image by Author)
(8) Results for 5,000 order lines with a ratio from 1 to 9 orders per route – (Image by Author)

We steeply decrease the distance when we move from one to two orders per wave.

From six orders per wave, the reduction of distance becomes more negligible.

What are the limits of this approach?

Exploring other batching strategies

This solution is far from being the most optimal.

Therefore, I have introduced more advanced strategies in the following articles of the series:

  • We can group orders by geographical clusters of Picking Locations to reduce pickers’ walking distance.

Improve Warehouse Productivity using Spatial Clustering with Python

  • The next closest location strategy has its limits that can be easily pointed out by picking route records

Improve Warehouse Productivity using Pathfinding Algorithm with Python

The final solution can mix these three strategies to minimize the walking distance and improve productivity.

Do you want to implement this solution?

Check the source code in my GitHub repository 👇

GitHub – samirsaci/picking-route: Improve Warehouse Productivity using Order Batching


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.

Samir Saci | Data Science & Productivity

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


Related Articles