Optimize Warehouse Value Added Services with Python

Use Linear Programming to Increase your Production Capacity for the Final Assembly of Luxury Products

Optimize Warehouse Value Added Services with Python

Use Linear Programming to Increase your Production Capacity for the Final Assembly of Luxury Products

Article originally published on Medium.

Most of the challenges faced by Distribution Centers (DC) handling Luxury Products, Garments or high-value goods are during Inbound Process.

We will take the example of a DC storing imported Luxury Bags, Garments and Shoes that need:

  • Machine 1 — Anti-theft tag: put a self alarm tag to protect your goods against theft in the store
Example of Anti-theft tag — (Image by Author)
  • Machine 2 — Labelling: print labels in the local language and perform label sewing
Example of label — (Image by Author)
  • Machine 3 — Kitting & Repackaging: transfer your goods in the sales packaging and add Gift With Purchase (GWP), Individual Note or Certificate of Authenticity
Example of packing with Gift with purchase and certificate — (CAD Model by Author)

After the completion of these 3 steps, your goods are ready to be put away in the stock area waiting to be picked for shipping to their final destinations (Store).

If your capacity of items handled by day is too low, this process can quickly become a major bottleneck.

💌 New articles straight in your inbox for free: Newsletter

I. Problem Statement


1. Scenario

You are an Inbound Manager of a Distribution Center (DC) for an iconic Luxury Maison focusing on Fashion, Fragrance and Watches.

You have received 600 prêt-à-porter sets (Ready-to-wear) including:

  • 1 Female dress that requires Label Sewing and Re-packing
  • 1 Handbag that requires Label Sewing, an Anti-theft tag and Re-packing
  • 1 Leather Belt that requires an Anti-theft tag, Label Sewing and Re-packing

Because they are sold together, these SKUs need to be ready at the same time and co-packed together to be ready for shipping to stores as soon as possible after the following steps:

  • Inbound Team is unloading pallets from the truck and putting them in the staging area
Step 1: Unloading and transfer of the pallet to the staging area — (CAD Model by Author)
  • Machine 1: Anti-theft tag — an operator put an anti-theft tag on each bag and belt
Step 2: 2 workstations where operators put an anti-theft tag on each Handbag and Belt — (CAD Model by Author)
  • Machine 2 — Labelling: after printing in a dedicated area, labels are sewed on belts, handbags and dress
Step 3: 4 workstations where operators perform label sewing — (CAD Model by Author)
  • Machine 3 — Kitting & Repackaging: for each item, you need to add a certificate of authenticity, plastic protection and perform fine packing
Step 4: 4 workstations where operators perform re-packaging — (CAD Model by Author)

After the re-packaging process, goods are transferred to a final staging area to wait for shipping (X-Docking Mode).

Objective: Reach maximum productivity of sets assembled per hour (sets/hour)

2. Problem Statement: The Job-Shop Problem

The Job Shop Scheduling Problem (JSSP) is an NP-hard problem defined by a set of jobs that must be executed by a set of machines in a specific order for each job.

Our example with 3 jobs using 3 machines — (Image by Author)

For each of our jobs, we have defined execution time (min) and processing order of machines in the table above.

For instance, Job 2 (Handbag) is starting with Anti-theft Tags placement using Machine 1 (6 min) followed by Labels Sewing using Machine 2 (4 min), to finally end with Kitting and Packing using Machine 3 (3 min).

The machines can only execute a job at a time and once started, the machine cannot be interrupted until the completion of the assigned job.

Objective: minimize the makespan i.e the total time for completion of all jobs

i. The Naive Solution: 1 job cycle at a time

First Naive Approach — (Image by Author)

Results

  • Makespan: 30 min
  • Productivity: 2 sets/hour

Comments

This simple approach is the worst in terms of productivity. Because of the processing of jobs in sequence, machines stay idle (unused) quite often.

Question: What would be the result if we perform jobs in parallel?

ii. Optimal Solution: The Job Shop Scheduling Problem using Google OR-Tools

OR-Tools part of Google AI Solutions — (Source: Google AI Logo, Link)

OR-Tools is an open-source collection of Google with tools for combinatorial optimization. The objective is to find the best solution out of a very large set of possible solutions.

I am a fan of this library that I have been using in several examples:

  • Samir Saci, Design Pathfinding Algorithm using Google AI to Improve Warehouse Productivity
Improve Warehouse Productivity using Pathfinding Algorithm with Python | by Samir Saci
Implement Pathfinding Algorithm based on Travelling Salesman Problem Designed with Google AI Operation Research Libraries
  • Samir Saci, Optimize Workforce Planning using Linear Programming with Python
Optimize Workforce Planning using Linear Programming with Python | Samir Saci
What is the minimum number of temporary workers you need to hire to absorb your weekly workload while ensuring employees retention?

Let us try to use this library to find the optimal sequencing to reduce the makespan for this specific set of processes.

II. Optimization of your Scheduling


1. Results: Optimized vs. Naive Solutions

First Naive Approach — (Image by Author)
Optimized Solution with Google OR-Tools — (Image by Author)

You can see above two graphs above representing the initial solution (Naive Solution: 1 job at a time) and the Optimized Solution (Parallel Tasking).

Results

  • Total Makespan: 16 min (-47%)
  • Productivity: 3.75 sets/hour (+85%)
  • Idle time per cycle: 18 min (-71.4%)

The results are satisfying

I will explain now how to reach these results.

Edit: You can find a Youtube version of this article with animations in the link below.

2. Build the optimization model


a. Initialize your model

3 machines
Total Time using Naive Solution: 30 min

b. Initialize variables and create sequences

c. Add Constraints and Set up the Solver

d. Solver Optimal Solution

Output -
Optimal Schedule Length: 16
Machine 1: job_2_1 job_3_2
[0,6] [6,10]
Machine 2: job_3_1 job_1_1 job_2_2
[0,3] [3,7] [7,11]
Machine 3: job_1_2 job_3_3 job_2_3
[7,10] [10,13] [13,16]

Based on this output we can draw the updated schedule:

Optimized Solution with Google OR-Tools — (Image by Author)

III. Conclusion & Next Steps


1. Conclusion

We increased productivity by +48% by implementing a solution for smart scheduling that use the maximum potential of our resources (Machines).

This solution was based on a simple scenario using a single line of assembly (1 Machine per Type).

Question: What could be the results with several lines?

I let you test it and share your results (or questions) in the comment area.

2. Next Steps

Can we have higher productivity by changing the conditions?

Optimized Solution with idle sequences (yellow) — (Image by Author)

In the chart above, I have highlighted the potential additional jobs we’ve could add during the idle time:

  • Machine 1: 1 sequence of 4 min which equals the time for Job 3
  • Machine 2: 1 sequence of 4 min which equals the time for Job 1 and Job 2
  • Machine 3: 2 sequences of 4 min which equals the time for Jobs 1,2 and 3

Question: What would be the average productivity if we start Jobs of Cycle n+1 during these idle sequences of Cycle n?

About Me

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

References

[1] Google AI, Google OR-Tools Library, Link