How can we use heuristic algorithms to find the right strategy to load a maximum number of pallets in a sea container?
Find in the link below a short animated explained video to understand the concept behind this solution
In this Article, we will build a container loading optimization model using a heuristic method from a Python library.
You need to load in a 40' Container
- 20 European Pallets 80 x 120 (cm)
- 4 North American Pallets 100 x 120 (cm)
Results: 20/20 Euro Pallets loaded, 2/4 American pallets loaded. You need another container for the two remaining pallets.
Results: 20/20 Euro Pallets loaded, 4/4 American pallets loaded. You don’t need another container.
This repository code you will find all the code used to explain the concepts presented in the article.
- The full write-up, with the reasoning behind the code: Containers Loading Optimization with Python
- The video: Containers Pallet Loading Optimisation with Python (Source Code)
- Test what you learned: the Supply Science App has a quiz on road transportation and lessons on transportation management, free and in the browser.
- 100+ case studies with their source code: samirsaci.com
Samir Saci, supply chain engineer and data scientist with ten years in operations across Asia and Europe. Founder of LogiGreen, creator of Supply Science. For consulting on analytics and sustainable supply chain transformation: LogiGreen. More about me: samirsaci.com/about · LinkedIn


