In most cases a building is occupied by various inhabitants. In the example used during this post, we will imagine that each building can have a "Mixed" zone type. These buildings have different uses per floor, these will include Commercial Use, Residential Use and Unspecified. I will also create reports showing revenue generated by all floor types (using the floor area).
![]() |
Individual Floor Usage |
Attributes
In this post, there was only 5 attributes added (see the image below). These were:
- CommercialFloorUse: The % of floors that will have a commercial use
- ResidentialFloorUse: The % of floors that will have a residential use
- CommercialRevenueSquareMeter: Revenue generated per square meter of commercial use
- ResidentialRevenueSquareMeter: Revenue generated per square meter of residential use
- VoidRevenueSquareMeter: Minimum Revenue lost per square meter
**Another disclaimer: Just ignore the bad attribute naming convention....I didn't spend too much time on the attribute names
Rules
Only two rules were added during this post: ColorFloors and ColorFloors2 (once again great usage of my naming convention).
- ColorFloors checks if a floor has a "Mixed" ZoneType, and calls the ColorFloors2 rule if it does. It also creates a report for all floors created. To read more about reports, click here.
- ColorFloors2 uses the CommercialFloorUse and ResidentialFloorUse attributes to determine the usage of each floor by applying the "p-function". The remaining floors are assigned a usage of Unspecified. The rules also create reports on each floor usage as well as the potential revenue generated.
![]() |
Rules |
Reports
The reports that are created with the new rules can be seen in the image below. The N, Sum and Avg, columns returns the Count, Sum and Average of each floor or floor revenue, respectively.
- All Floors displays the count of all floors (excluding the ground floor)
- Commercial Floors, Residential Floors and Unspecified Floors returns the count for each floor usage type
- Commercial Floors Revenue and Residential Floors Revenue returns the count of each floor type as well as the estimated revenue generated by each (as a sum and average). The revenue is generated by multiplying the square meters of the floor (getArea in the image above) with the price-per-square-meter for the specified floor type (e.g. CommercialRevenueSquareMeter)
- The Unspecified Floors Revenue calculates the estimated amount of revenue lost by having a unspecified/void floor.
![]() |
Reporting per Floor |