This piece of software implements the procedure called GENPACK for 
solving the problem of packing identical circles into a rectangular 
region, described in [1] and [2].

[1] E. G. Birgin, J. M. Martnez and D. P. Ronconi, "Optimizing the Packing 
of Cylinders into a Rectangular Container: A Nonlinear Approach", European 
Journal of Operational Research 160, pp. 19-33, 2005.

[2] E. G. Birgin and J. M. Martnez, Large-scale active-set box-constrained 
optimization method with spectral projected gradients, Computational 
Optimization and Applications 23, pp. 101-125, 2002.

This instructions guides you on how to install and run it in a SUN, Solaris 
or Linux platform (installation in a Windows platform is also possible,
but it may vary from system to system, depending on the compiler you have).

Description of the files:
=========================

genpack-cir.f       : implements the procedure called GENPACK for solving  
                      the problem of packing identical circles into a 
                      rectangualr region.

solution.tex        : is a latex file that you can use to generate a 
                      postscript file with the graphical representation of 
                      the solution.

genpack.out         : is a text file with the output generated by GENPACK 
                      when used to solve the 48 problems presented in [1].

p01.mp, ..., p48.mp : are the 48 MetaPost files, automaticaly generated by
                      GENPACK, which contain the graphical representation
                      of the solutions.

new-experiments.ps  : is a description of the numerical experiments that
                      were run on August 23, 2005, after the publication
                      of [1]. In this numerical experiments, a better
                      solution was found for problem 1.9, in which 75
                      circles were packed instead of the the 74 circles
                      packed in [1]. Moreover, a new table describes with
                      more detail the performance of the nonlinear solver.

How to compile:
===============

Type

f77 -O4 genpack-cir.f -o genpack-cir

(If the compiler gives you a "warning" just ignore it.)

How to run:
===========

Just type

genpack-cir

The program will ask you some information of the problem you would like to 
solve (dimensions of the rectangle, radius of the circles, a lower bound on
the number of circles than can be packed (0 is a feasible option), an upper
bound on the number of circles that can be packed and the maximum CPU time 
the method will used).

The program will show in the screen the number of circles it is
being packed until the upper bound is reached or the time is exhausted.

How to generate the graphical representation of the solution:
=============================================================

Compile the metapost file generated by GENPACK typing

mpost solution.mp

It will generate a file called solution.1

Then, to generate the postcript 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
