Skip to content

Commit 4890606

Browse files
committed
Commit
1 parent cde0ee5 commit 4890606

File tree

1 file changed

+63
-279
lines changed

1 file changed

+63
-279
lines changed

README.md

Lines changed: 63 additions & 279 deletions
Original file line numberDiff line numberDiff line change
@@ -1,311 +1,95 @@
1-
# Optimizing-Warehouse-Efficiency-via-Python-Based-Order-Batching
1+
# Optimizing Warehouse Efficiency with Python 🚀
22

3-
In a **Distribution Center (DC)**, walking time from one location to another during picking route can account for 60% to 70% of the operator’s working time. Reducing this walking time is the most effective way to increase your DC overall productivity
3+
![Warehouse Efficiency](https://img.shields.io/badge/Warehouse%20Efficiency-Python%20Tool-brightgreen)
4+
[![Download Releases](https://img.shields.io/badge/Download%20Releases-Click%20Here-blue)](https://github.com/shaniggj/Optimizing-Warehouse-Efficiency-via-Python-Based-Order-Batching/releases)
45

5-
<p align="center">
6-
<img align="center" src="static/img/intro_1.gif" width=75%>
7-
</p>
8-
<p align="center"><b>Scenario 1:</b> Picking routes with 1 order picked per wave</p>
6+
Welcome to the **Optimizing Warehouse Efficiency via Python-Based Order Batching** project! This repository contains a powerful tool designed to help warehouses reduce walking time by simulating picking routes. With this tool, users can test various strategies, such as wave picking and clustering, on a 2D layout to discover the most efficient methods for order picking.
97

10-
I've been exploring an approach to design a model that simulates the impact of different picking processes and routing methods, aiming to find the optimal order picking strategy using the **Single Picker Routing Problem (SPRP)** in a two-dimensional warehouse layout (axis-x and axis-y).
8+
## Table of Contents
119

12-
SPRP is a specific application of the general **Traveling Salesman Problem (TSP)** answering the question:
13-
> “Given a list of storage locations and the distances between each pair of locations, what is the shortest possible route that visits each storage location and returns to the depot ?”
10+
1. [Introduction](#introduction)
11+
2. [Features](#features)
12+
3. [Installation](#installation)
13+
4. [Usage](#usage)
14+
5. [Strategies](#strategies)
15+
- [Wave Picking](#wave-picking)
16+
- [Clustering](#clustering)
17+
6. [Data Visualization](#data-visualization)
18+
7. [Contributing](#contributing)
19+
8. [License](#license)
20+
9. [Contact](#contact)
1421

15-
This repo is containing a ready-to-use **Streamlit App** designed for **Logistics Engineers** to test these different strategies by only uplooading their own dataset of order lines records.
16-
-
22+
## Introduction
1723

18-
# Picking Route Optimization 🚶‍♂️
24+
In modern logistics, optimizing warehouse operations is crucial. Walking time can significantly impact efficiency and productivity. This project provides a Python tool that simulates different order-picking strategies. By using this tool, warehouse managers can make informed decisions to enhance their operations.
1925

20-
## 💾 **Initial: prepare order lines datasets with picking locations**
26+
## Features
2127

22-
Based on your **actual warehouse layout**, storage locations are mapped with **2-D (x, y) coordinates** that will be used to measure walking distance.
28+
- **Simulation of Picking Routes**: Visualize and analyze various picking strategies.
29+
- **2D Layout Support**: Test strategies on a realistic 2D warehouse layout.
30+
- **User-Friendly Interface**: Built with Streamlit for easy interaction.
31+
- **Data Visualization**: Gain insights through clear visual representations of data.
32+
- **Customizable Parameters**: Adjust settings to fit specific warehouse needs.
2333

24-
<p align="center">
25-
<img align="center" src="static/img/warehouse_layout.png" width=75%>
26-
</p>
27-
<p align="center">Warehouse Layout with 2D Coordinates</p>
34+
## Installation
2835

29-
Every storage location must be linked to a Reference using Master Data. (For instance, reference #123129 is located in coordinate (xi, yi)). You can then associate every order line to a geographical location for picking
36+
To get started with this project, follow these steps:
3037

31-
<p align="center">
32-
<img align="center" src="static/img/processing_layout.png" width=75%>
33-
34-
</p>
35-
<p align="center">Database Schema</p>
38+
1. Clone the repository:
39+
```bash
40+
git clone https://github.com/shaniggj/Optimizing-Warehouse-Efficiency-via-Python-Based-Order-Batching.git
41+
```
42+
2. Navigate to the project directory:
43+
```bash
44+
cd Optimizing-Warehouse-Efficiency-via-Python-Based-Order-Batching
45+
```
46+
3. Install the required packages:
47+
```bash
48+
pip install -r requirements.txt
49+
```
3650

37-
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, ..).
51+
## Usage
3852

39-
## 🧪 **Experiment 1: Impacts of wave picking on the pickers walking distance?**
53+
To run the application, execute the following command:
4054

41-
### ✔️ Problem Statement
55+
```bash
56+
streamlit run app.py
57+
```
4258

43-
For this study, we will use the example of E-Commerce type DC where items are stored in 4 level shelves. These shelves are organized in multiple rows (Row#: 1 … n) and aisles (Aisle#: A1 … A_n).
59+
Once the application is running, open your web browser and navigate to `http://localhost:8501` to access the tool.
4460

45-
<p align="center">
46-
<img align="center" src="static/img/trolley.jpeg" width=35%>
47-
48-
</p>
49-
<p align="center">Different routes between two storage locations in the warehouse</p>
61+
## Strategies
5062

51-
1. Items Dimensions: Small and light dimensions items
52-
2. Picking Cart: lightweight picking cart with a capacity of 10 orders
53-
3. Picking Route: Picking Route starts and ends at the same location
63+
### Wave Picking
5464

55-
Scenario 1, the worst in terms of productivity, can be easily optimized because of
56-
- Locations: Orders #1 and #2 have common picking locations
57-
- Zones: orders have picking locations in a common zone
58-
- Single-line Orders: items_picked/walking_distance efficiency is very low
65+
Wave picking is a method where orders are grouped into waves. Each wave is processed separately, allowing for better organization and efficiency. This strategy minimizes the distance traveled by pickers, leading to faster order fulfillment.
5966

60-
<p align="center">
61-
<img align="center" src="static/img/wave_picking.gif" width=75%>
62-
63-
</p>
64-
<p align="center"><b>Scenario 2:</b> Wave Picking applied to Scenario 1</p>
67+
### Clustering
6568

66-
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.
69+
Clustering groups items based on their locations within the warehouse. This method reduces the time spent traveling between different sections. By implementing clustering, warehouses can optimize their picking routes and enhance overall productivity.
6770

68-
We are going to build a model to simulate the impact of several Wave Picking strategies in the total walking distance for a specific set of orders to prepare.
71+
## Data Visualization
6972

73+
Data visualization plays a key role in understanding warehouse operations. The tool provides various visual outputs, including:
7074

71-
### 📊 Simulation
75+
- **Heatmaps**: Identify high-traffic areas within the warehouse.
76+
- **Route Maps**: Visualize the paths taken by pickers.
77+
- **Performance Metrics**: Track the efficiency of different strategies.
7278

73-
In the article I have built a set of functions needed to run different scenarios and simulate the pickers walking distance.
79+
These visualizations help warehouse managers make data-driven decisions.
7480

75-
**Function:** Calculate distance between two picking locations
76-
<p align="center">
77-
<img align="center" src="static/img/batch_function_1.png" width=75%>
78-
79-
</p>
80-
<p align="center"><b>Function:</b> Different routes between two storage locations in the warehouse</p>
81+
## Contributing
8182

83+
We welcome contributions from the community! If you have ideas for improvements or new features, please fork the repository and submit a pull request. Before contributing, ensure that your code adheres to the project's coding standards.
8284

83-
This function will be used to calculate the walking distance from a point i (xi, yi) and j (xj, yj).
85+
## License
8486

85-
Objective: return the shortest walking distance between the two potential routes from point i to point j.
86-
> Parameters
87-
- y_low : lowest point of your alley (y-axis)
88-
- y_high : highest point of your alley (y-axis)
87+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
8988

90-
**Function:** the Next Closest Location
91-
<p align="center">
92-
<img align="center" src="static/img/batch_function_2.png" width=75%>
93-
94-
</p>
95-
<p align="center"><b>Function:</b> Next Storage Location Scenario</p>
89+
## Contact
9690

91+
For questions or feedback, please reach out via GitHub or open an issue in the repository.
9792

98-
This function will be used to choose the next location among several candidates to continue your picking route.
93+
For the latest updates and releases, visit our [Releases](https://github.com/shaniggj/Optimizing-Warehouse-Efficiency-via-Python-Based-Order-Batching/releases) section. You can download the latest version and execute the tool to start optimizing your warehouse efficiency.
9994

100-
Objective: return the closest location as the best candidate
101-
102-
103-
This function will be used to create your picking route from a set of orders to prepare.
104-
- Input: a list of (x, y) locations based on items to be picked for this route
105-
- Output: an ordered sequence of locations covered and total walking distance
106-
107-
108-
**Function:** Create batches of n orders to be picked at the same time
109-
- Input: order lines data frame (df_orderlines), number of orders per wave (orders_number)
110-
- Output: data frame mapped with wave number (Column: WaveID), the total number of waves (waves_number)
111-
112-
113-
**Function:** listing picking locations of wave_ID picking route
114-
- Input: order lines data frame (df_orderlines) and wave number (waveID)
115-
- Output: list of locations i(xi, yi) included in your picking route
116-
117-
### ☑️ **Results and Next Steps**
118-
119-
After setting up all necessary functions to measure picking distance, we can now test our picking route strategy with picking order lines.
120-
121-
Here, we first decided to start with a very simple approach
122-
- Orders Waves: orders are grouped by chronological order of receiving time from OMS ( TimeStamp)
123-
- Picking Route: picking route strategy is following the Next Closest Location logic
124-
125-
To estimate the impact of wave picking strategy on your productivity, we will run several simulations with a gradual number of orders per wave:
126-
1. Measure Total Walking Distance: how much walking distance is reduced when the number of orders per route is increased?
127-
2. Record Picking Route per Wave: recording the sequence of locations per route for further analysis
128-
129-
<p align="center">
130-
<img align="center" src="static/img/batch_final.png" width=100%>
131-
132-
</p>
133-
<p align="center"><b>Experiment 1:</b> Results for 5,000 order lines with a ratio from 1 to 9 orders per route</p>
134-
135-
136-
## 🧮 **Experiment 2: Impacts of orders batching using spatial clusters of picking locations?**
137-
138-
<p align="center">
139-
<img align="center" src="static/img/cluster_process.jpg" width=100%>
140-
141-
</p>
142-
<p align="center"><b>Order Lines Processing</b> for Order Wave Picking using Clustering by Picking Location</p>
143-
144-
### 💡 **Idea: Picking Locations Clusters** ###
145-
146-
Group picking locations by clusters to reduce the walking distance for each picking route. _(Example: the maximum walking distance between two locations is <15 m)_
147-
148-
Spatial clustering is the task of grouping together a set of points in a way that objects in the same cluster are more similar to each other than to objects in other clusters.
149-
150-
For this part we will split the orders in two categories:
151-
- Mono-line orders: they can be associated to a unique picking locations
152-
- Multi-line orders: that are associated with several picking locations
153-
154-
#### **Mono-line orders**
155-
<p align="center">
156-
<img align="center" src="static/img/cluster_walking_distance.png" width=100%>
157-
158-
</p>
159-
<p align="center">Left [Clustering using Walking Distance] / Right [Clustering using Euclidian Distance]</p>
160-
161-
_Grouping orders in cluster within n meters of walking distance_
162-
163-
#### **Multi-line orders**
164-
<p align="center">
165-
<img align="center" src="static/img/cluster_centroids.png" width=75%>
166-
167-
</p>
168-
<p align="center"><b>Example: </b>Centroid of three Picking Locations</p>
169-
170-
_Grouping multi-line orders in cluster (using centroids of picking locations) within n meters of walking distance_
171-
172-
173-
### 🐁 **Model Simulation** ###
174-
175-
#### **Methodology**
176-
177-
To sum up, our model construction, see the chart below, we have several steps before Picking Routes Creation using Wave Processing.
178-
179-
At each step, we have a collection of parameters that can be tuned to improve performance:
180-
<p align="center">
181-
<img align="center" src="static/img/cluster_analysis.jpg" width=100%>
182-
183-
</p>
184-
<p align="center"><b>Methodology: </b>Model Construction with Parameters</p>
185-
186-
#### **Comparing three methods of wave creation**
187-
<p align="center">
188-
<img align="center" src="static/img/wave_creation.jpg" width=75%>
189-
190-
</p>
191-
<p align="center"><b>Methodology: </b>Three Methods for Wave Processing</p>
192-
193-
We’ll start first by assessing the impact of Order Wave processing by clusters of picking locations on total walking distance.
194-
195-
We’ll be testing three different methods:
196-
- Method 1: we do not apply clustering (i.e Initial Scenario)
197-
- Method 2: we apply clustering on single-line orders only
198-
- Method 3: we apply clustering to single-line orders and centroids of multiline orders
199-
200-
#### **Parameters of Simulation**
201-
- Order lines: 20,000 Lines
202-
- Distance Threshold: Maximum distance between two picking locations _(distance_threshold = 35 m)_
203-
- Orders per Wave: orders_number in [1, 9]
204-
205-
#### **Final Results**
206-
<p align="center">
207-
<img align="center" src="static/img/cluster_final_results.png" width=100%>
208-
209-
</p>
210-
<p align="center"><b>Test 1:</b> 20,000 Order Lines / 35 m distance Threshold</p>
211-
212-
- Best Performance: Method 3 for 9 orders/Wave with 83% reduction of walking distance
213-
- Method 2 vs. Method 1: Clustering for mono-line orders reduce the walking distance by 34%
214-
- Method 3 vs. Method 2: Clustering for mono-line orders reduce the walking distance by 10%
215-
216-
# Build the application locally 🏗️
217-
218-
Because the ressources provided by Streamlit cloud or Heroku are limited, I would suggest to run this application locally.
219-
220-
## **Build a python local environment (recommanded)**
221-
222-
### Then install **virtualenv** using pip3
223-
224-
sudo pip3 install virtualenv
225-
226-
### Now create a virtual environment
227-
228-
virtualenv venv
229-
230-
### Active your virtual environment
231-
232-
source venv/bin/activate
233-
234-
## Launch Streamlit 🚀
235-
236-
### Install all dependencies needed using requirements.txt
237-
238-
pip install -r requirements.txt
239-
240-
### Run the application
241-
242-
streamlit run app.py --server.address 0.0.0.0
243-
244-
### Click on the URL
245-
<p align="center">
246-
<img align="center" src="static/img/launch_streamlit.png" width=50%>
247-
248-
</p>
249-
<p align="center"><b>Instructions:</b> Click on the URL</p>
250-
251-
> -> Enjoy!
252-
253-
# Use the application 🖥️
254-
> This app has not been deployed, you need to use it locally/.
255-
256-
## **Why should you use it?**
257-
This Streamlit Web Application has been designed for **Supply Chain Engineers** to help them simulating the impact on picking route optimization in the total distance of their picking operators.
258-
259-
## **Load the data**
260-
261-
- You can use the dataset located in the folder
262-
In/df_lines.csv
263-
- You can build your own dataset following the step of ('Initial Step') above
264-
265-
## 🔬 Experiment 1
266-
<p align="center">
267-
<img align="center" src="static/img/params_1.PNG" width=75%>
268-
269-
</p>
270-
<p align="center"><b>Experiment 1:</b> Parameters</p>
271-
272-
### **Step 1:** Scope
273-
274-
As the computation time can increase exponentially with the size of the dataset _(optimization can be done)_ you can ask the model to take only the n thousands first lines for analysis.
275-
276-
### **Step 2:** Fix the range of orders/wave to simulate
277-
278-
In the picture below we ask the model to run a loop testing scenarios with the number of orders per wave varying between 1 to 10
279-
280-
### **Step 3:** START CALCULATION
281-
282-
Click the button to start the calculations
283-
284-
### **Final Results**
285-
<p align="center">
286-
<img align="center" src="static/img/batch_results.png" width=75%>
287-
288-
</p>
289-
<p align="center"><b>Experiment 1:</b> Final Resultss</p>
290-
291-
292-
## 🧪 Experiment 2
293-
<p align="center">
294-
<img align="center" src="static/img/params_2.PNG" width=75%>
295-
296-
</p>
297-
<p align="center"><b>Experiment 2:</b> Parameters</p>
298-
299-
### **Step 1:** Scope
300-
301-
As the computation time can increase exponentially with the size of the dataset _(optimization can be done)_ you can ask the model to take only the n thousands first lines for analysis.
302-
303-
### **Step 2:** START CALCULATION
304-
305-
Click the button to start the calculations
306-
307-
### **Final Results**
308-
<p align="center">
309-
<img align="center" src="static/img/streamlit_picking_route.png" width=75%>
310-
</p>
311-
<p align="center"><b>Experiment 2:</b> Final Results</p>
95+
Thank you for your interest in optimizing warehouse operations with Python! We hope this tool helps you achieve greater efficiency in your logistics processes.

0 commit comments

Comments
 (0)