Orthogonal packing of rectangles
within isotropic convex regions

Introduction - Download

This Web site provides additional material to the paper

E. G. Birgin and R. D. Lobato. Orthogonal packing of identical rectangles within isotropic convex regions. Computers & Industrial Engineering (2010) 59, 595–602.

The full text is locally available in PDF and PS formats. The full text can also be found at ScienceDirect. The computer implementation in Fortran 77/95 is available to download under the terms of the GNU General Public License. Below you can find instructions on how to compile and run the program, visualize the solution, and modify the program in order to solve your own instance of the problem. If you have any questions, please send an e-mail to rafael@lobato.it.

Compiling and running it

To compile the program, just type

./compile.sh

To run it, type

./igenpack

The program will ask you which problem you would like to solve (choose a number between 1 and 16 to solve one of the 16 problems presented in the paper) and the minimum and maximum number of rectangles the method will try to pack.

The program will output the number of rectangles that have been packed until the upper bound is reached.

Graphical representation of the solution


Problem number 4 with 28 rectangles packed.
Problem number 4 with 28 rectangles packed.

To generate the graphical representation of the solution, first compile the MetaPost file solution.mp, which was created by IAlgencan, by typing

mpost solution.mp

It will generate a file called solution.1. Then, to create a PostScript file, just type

latex solution.tex

and then

dvips solution.dvi -o solution.ps

The PostScript file with the graphical representation of the solution will be in the file called solution.ps. To see this file, type, for example,

gv solution.ps

Solving your own problem

To solve your own instance of the problem, you just need a basic knowledge of Fortran 77/95 programming language to edit the file Packing.f95. In this file you will need add the information of your problem in the following subroutines:

After having modified the four subroutines, just compile the program and run it as explained above.

Sponsor

This work was partially supported by the Brazilian agency FAPESP (Fundação de Amparo à Pesquisa do Estado de São Paulo).