Rectangle Close-Packing


I have written a definition for the optimization of hospital floor plans based on the intensity of interaction between different departments. I have used a close-packing approach, in a discrete solution space and with dynamic sliders (using metahopper). Galapagos is used for optimization, but the problem I have is I very rarely get good outcomes. Usually lots of gap remain between spaces. I would appreciate any help as to:

  1. how to decrease the gaps
  2. how to use Galapagos more efficiently in the case of this problem

hospital code (last version).gh (248.9 KB)
In this uploaded file, the last version of the definition is the one which is active.

Thanks again,
looking forward to hear from you!

Hi again, I was wondering if anyone can be of any help?