Grid division of floor plans

How to find the different placement of units on a floor plan in a grid cell while considering minimum and maximum area limits for each type of housing, which is 10 cells for two types of housing and 6 cells for the others ensuring that each type of housing has at least one cell near the Service Core.

@Mahdiyar