yzdxdydz / StripPacking

Steinberg's algorithm for the Strip Packing Problem with two heuristics

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Steinberg's algorithm for the Strip Packing Problem with two heuristics

Steinberg's algorithm is an approximation algorithm with approximation ratio 2 (see A. Steinberg, 1997).

We also apply two heuristics: ''removing gaps'' and ''dropping rectangles''.

Let us consider a strip of width W=10 and eight rectangles [1, 1], [1, 1], [10, 8], [3, 1], [9, 1], [2, 1], [1, 1], [3, 1].

Optimal height H_opt = 10 can be provided with the packing [9, 9], [8, 9], [0, 0], [5, 9], [0, 8], [3, 9], [9, 8], [0, 9].

Steinberg algorithm provides height H_1=18.25.

Alt text

''Removing gaps'' algorithm provides height H_2=13.0.

Alt text

''Dropping rectangles'' algorithm provides height H_3=12.0.

Alt text

For a description and comparison of the given algorithms, see StripPacking.pdf.

For an implementation, see StripPacking.

About

Steinberg's algorithm for the Strip Packing Problem with two heuristics


Languages

Language:Python 100.0%