Note: I didn’t finish this assignment to the extent that I wanted to, but in the spirit of sharing work / ideas, below is a quick look at where I got with my design assistor tool for modular apartment construction.
Grasshopper logic to calculate just roof area and surface area (both were done by getting panels of geometry, and filtering their normals by dot product with an up vector and a down vector)
Grasshopper Logic to create lot and unit size (sliders on left), and then attempts to automate / parametrize stacking of the units within the lot - not successfully completed..