Archetype Assignment Rule¶
Reference documentation for Archetype Assignment Rule objects in EnergyAtlas.
Overview¶
Archetype Assignment Rules define how buildings are matched to archetypes based on building characteristics. Rules use conditions to determine which archetype should be assigned to each building.
Object Structure¶
Properties¶
id (string, required) - Unique identifier for the rule - Format: UUID or custom identifier
name (string, required) - Human-readable rule name - Example: "Residential Pre-1980 Rule"
description (string, optional) - Rule description and purpose
conditions (array, required) - List of conditions that must be met - See condition structure below
archetype_id (string, required) - ID of archetype to assign when conditions are met
priority (integer, required) - Rule priority (higher number = higher priority) - Used when multiple rules match - Typical range: 1-100
active (boolean, required) - Whether rule is active - Default: true
created_at (datetime, required) - Creation timestamp
updated_at (datetime, required) - Last update timestamp
Condition Structure¶
Condition Object¶
1 2 3 4 5 | |
Operators¶
equals
- Field equals value exactly
- Example: building_type equals "Residential"
not_equals
- Field does not equal value
- Example: building_type not_equals "Commercial"
contains
- Field contains substring
- Example: building_type contains "Res"
greater_than
- Numeric field greater than value
- Example: year_built greater_than 1980
less_than
- Numeric field less than value
- Example: year_built less_than 2000
greater_than_or_equal
- Numeric field greater than or equal to value
- Example: floor_area greater_than_or_equal 1000
less_than_or_equal
- Numeric field less than or equal to value
- Example: floor_area less_than_or_equal 5000
in
- Field value in list
- Example: building_type in ["Residential", "MixedUse"]
not_in
- Field value not in list
- Example: building_type not_in ["Commercial"]
between
- Numeric field between two values
- Example: year_built between 1980 and 2000
Rule Logic¶
Multiple Conditions¶
When multiple conditions are specified: - AND logic: All conditions must be met (default) - OR logic: Any condition can be met (specify in rule)
Example Rule¶
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | |
Operations¶
Create Rule¶
1 2 3 4 5 6 7 | |
Get Rule¶
1 | |
Update Rule¶
1 2 3 4 5 | |
Delete Rule¶
1 | |
List Rules¶
1 | |
Apply Rules¶
1 2 3 4 5 | |
Usage Examples¶
Creating a Simple Rule¶
- Navigate to Archetype Assignment section
- Click "Create New Rule"
- Enter rule name
- Add conditions:
- Building type equals "Residential"
- Year built less than 1980
- Select target archetype
- Set priority
- Save rule
Creating a Complex Rule¶
- Create rule with multiple conditions
- Use AND logic for all conditions
- Set appropriate priority
- Test rule on sample buildings
- Refine conditions if needed
Rule Priority Example¶
Rule 1 (Priority: 20): - Building type = "Residential" - Year built < 1980 - Floor area > 2000 - → Assigns "Residential_Pre1980_Large"
Rule 2 (Priority: 10): - Building type = "Residential" - Year built < 1980 - → Assigns "Residential_Pre1980_Medium"
If a building matches both rules, Rule 1 (higher priority) applies.
Best Practices¶
- Start simple: Begin with basic conditions
- Test rules: Apply to sample buildings first
- Use priorities: Order rules by specificity
- Document logic: Explain rule purpose
- Review coverage: Ensure all buildings are covered
Common Patterns¶
By Building Type¶
1 2 3 4 5 | |
By Vintage¶
1 2 3 4 5 | |
By Size¶
1 2 3 4 5 | |
Combined¶
1 2 3 4 5 6 7 | |
Related Objects¶
References¶
- Template Definition Workflow - Using rules
- Archetype Library - Available archetypes