Live data from Hacker News

The Skyline algorithm for packing 2D rectangles

jvernay.fr

11–20 of 60 posts

Re: The Skyline algorithm for packing 2D rectangles

#11

An interesting variation is Dynamic Storage Allocation, in which the rectangles can slide only alongside one axis. AKA "static memory allocation", since the heights of the rectangles can be interpreted as buffer sizes, and their widths as lifetimes. Most of my PhD's effort has been devoted to beating the SOTA in this. Problem's importance nowadays is owed to deep learning's memory wall.

nice! you have your thesis or any related paper available online?

Re: The Skyline algorithm for packing 2D rectangles

#12
This blog post references https://github.com/juj/RectangleBinPack/blob/master/Rectangl... ( and implicitly https://github.com/juj/RectangleBinPack/ ) as it's primary source.

The README even mentions the guillotine algorithm / method that someone else posted (not the same link, but the same method).

Re: The Skyline algorithm for packing 2D rectangles

#13
post #9

Very fun. I wonder if a heap could improve the performance of the "loop through the skyline in order to find the best candidate location" step. (I think it would improve the asymptotic time, if I'm understanding the algorithm correctly, but obviously the real performance is more complex).

With some clever bit twiddling hacks, you might be able to avoid the loop entirely.

Re: The Skyline algorithm for packing 2D rectangles

#15
post #2

This looks useful for auto-placing parts inside a PCB.

Packing has so many applications for different things. Such as optimal packing of a truck or shipping container. Or how to optimally pack graphics into a GPU texture. I had this guy as a prof. https://en.wikipedia.org/wiki/David_A._Klarner I have never encountered someone so excited about dividing up rectangles, as it is related to combinatorics. Also with such a seething hatred for floating point numbers.

3d printing build plate optimalisation, passenger transport, real estate plot division. Let's make this list longer?

Re: The Skyline algorithm for packing 2D rectangles

#16
post #11

An interesting variation is Dynamic Storage Allocation, in which the rectangles can slide only alongside one axis. AKA "static memory allocation", since the heights of the rectangles can be interpreted as buffer sizes, and their widths as lifetimes. Most of my PhD's effort has been devoted to beating the SOTA in this. Problem's importance nowadays is owed to deep learning's memory wall.

nice! you have your thesis or any related paper available online?

[deleted]

Re: The Skyline algorithm for packing 2D rectangles

#17
post #2

This looks useful for auto-placing parts inside a PCB.

Packing has so many applications for different things. Such as optimal packing of a truck or shipping container. Or how to optimally pack graphics into a GPU texture. I had this guy as a prof. https://en.wikipedia.org/wiki/David_A._Klarner I have never encountered someone so excited about dividing up rectangles, as it is related to combinatorics. Also with such a seething hatred for floating point numbers.

Hell, I needed something like this when working on my Halloween costumes this year!

Re: The Skyline algorithm for packing 2D rectangles

#18
I wonder how well Montecarlo works with a problem like this (for the online version), where you try all the potential places and run simulations adding new random boxes similar to the one added so far in order to see which option allows for better outcome. For sure it's slow, yet it should work well, which is interesting per-se since it would show once more how you can come up with slow but good solutions just simulating stuff. But likely, this is how this heuristics, like Skyline, were found: analyzing the properties of the brute-forced best picks.

Re: The Skyline algorithm for packing 2D rectangles

#20
post #2

This looks useful for auto-placing parts inside a PCB.

Packing has so many applications for different things. Such as optimal packing of a truck or shipping container. Or how to optimally pack graphics into a GPU texture. I had this guy as a prof. https://en.wikipedia.org/wiki/David_A._Klarner I have never encountered someone so excited about dividing up rectangles, as it is related to combinatorics. Also with such a seething hatred for floating point numbers.

Packing things into a GPU texture is probably the #1 most common use. If you played a game today then your computer probably spent some time packing rectangles into rectangles.
Post reply on HN