Skip to content

Solving Rectangle Packing problem with Genetic Algorithm

Notifications You must be signed in to change notification settings

Jeziorop/Rectangle-Packing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Packing Smaller Rectangles into a Larger One

Our task is to fill Large Rectangle with given smaller ones, I encountered this problem a few years ago when I had to write a program to optimize the packing of pallets into a truck. At the time, the task was too challenging for me. The only solution I could come up with was an ugly brute-force approach, which would not have been effective anyway. As it turns out, this is an NP-hard problem, which is even described on Wikipedia:
Rectangle Packing on Wikipedia

During my studies, I learned about Genetic Algorithms (GA), which are perfectly suited for this type of problem.
Please note that this algorithm finds very good, but rarely the most optimal solutions.

For more information, see placing_packages.ipynb

Here are some visualizations of found solutions:

2522 2565 1933 2025 2210 2346 2846 3021

About

Solving Rectangle Packing problem with Genetic Algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published