class archetypal.template.BuildingTemplate(Name, Core=None, Perimeter=None, Structure=None, Windows=None, Lifespan=60, PartitionRatio=0.35, DefaultWindowToWallRatio=0.4, YearFrom=None, YearTo=None, Country=None, ClimateZone=None, Authors=None, AuthorEmails=None, Version='v1.0', **kwargs)[source]

Main class supporting the definition of a single building template.


Initialize a BuildingTemplate object with the following attributes:

  • Core (ZoneDefinition) – The Zone object defining the core zone. see Zone for more details.

  • Perimeter (ZoneDefinition) – The Zone object defining the perimeter zone. see Zone for more details.

  • Structure (StructureInformation) – The StructureInformation object defining the structural properties of the template.

  • Windows (WindowSetting) – The WindowSetting object defining the window properties of the object.

  • Lifespan (float) – The projected lifespan of the building template in years. Used in various calculations such as embodied energy.

  • PartitionRatio (float) – The number of lineal meters of partitions (Floor to ceiling) present in average in the building floor plan by m2.

  • DefaultWindowToWallRatio (float) – The default Window to Wall Ratio (WWR) for this template (same for all orientations). Number between 0 and 1.

  • YearFrom (int) – Start year for range.

  • YearTo (int) – End year for range.

  • Country (list of str) – alpha-3 Country Code.

  • ClimateZone (list of str) – ANSI/ASHRAE/IESNA Standard 90.1 International Climatic Zone. eg. “5A”

  • Authors (list of str) – Authors of this template

  • AuthorEmails (list of str) – Contact information.

  • Version (str) – Version number.

  • **kwargs – other optional keywords passed to other constructors.

property Perimeter

Get or set the perimeter ZoneDefinition.

property Core

Get or set the core ZoneDefinition.

property Structure

Get or set the StructureInformation.

property Windows

Get or set the WindowSetting.

property DefaultWindowToWallRatio

Get or set the DefaultWindowToWallRatio [-].

property Lifespan

Get or set the building life span [years].

property Category

Get or set the Category attribute.

property Comments

Get or set the object comments.

property DataSource

Get or set the datasource of the object.

property Name

Get or set the name of the object.

property allow_duplicates

Get or set the use of duplicates [bool].


Get copy of self.

extend(other, allow_duplicates)

Append other to self. Modify and return self.


other (UmiBase) –



Return type


float_mean(other, attr, weights=None)

Calculates the average attribute value of two floats. Can provide weights.

  • other (UmiBase) – The other UmiBase object to calculate average value with.

  • attr (str) – The attribute of the UmiBase object.

  • weights (iterable, optional) – Weights of [self, other] to calculate weighted average.

property id

Get or set the id.

property predecessors

Get or set the predecessors of self.

Of which objects is self made of. If from nothing else then self, return self.


renames self as well as the cached object


name (str) – the name.


Return a ref pointer to self.

property PartitionRatio

Get or set the partition ratio [-].

property YearFrom

Get or set the YearFrom [int].

property YearTo

Get or set the YearTo [int].

property Country

Get or set the list of alpha-3 country codes [list].

property ClimateZone

Get or set the list of climatic zones [list].

property Authors

Get or set the list of authors [list].

property AuthorEmails

Get or set list of author emails [list].

property Version

Get or set the template version [str].

classmethod from_dict(data, zone_definitions, structure_definitions, window_settings, schedules, window_constructions, **kwargs)[source]

Create an BuildingTemplate from a dictionary.

  • data (dict) – The python dictionary.

  • zone_definitions (dict) – A dictionary of ZoneDefinition objects with their id as keys.

  • structure_definitions (dict) – A dictionary of StructureInformation with their id as keys.

  • window_settings (dict) – A dictionary of WindowSetting objects with their id as keys.

  • schedules (dict) – A dictionary of UmiSchedule with their id as keys.

  • window_constructions (dict) – A dictionary of WindowConstruction objects with their id as keys.

  • **kwargs – keywords passed to the constructor.

  "Core": {
    "$ref": "178"
  "Lifespan": 60,
  "PartitionRatio": 0.3,
  "Perimeter": {
    "$ref": "178"
  "Structure": {
    "$ref": "64"
  "Windows": {
    "$ref": "181"
  "DefaultWindowToWallRatio": 0.4,
  "YearFrom": 0,
  "YearTo": 0,
  "Country": [
  "ClimateZone": [
  "Authors": [
    "Carlos Cerezo"
  "AuthorEmails": [
  "Version": "v1.0",
  "Category": "Residential and Lodging",
  "Comments": "Base building definition for MIT 4433",
  "DataSource": "MIT_SDL",
  "Name": "B_Res_0_WoodFrame"
classmethod from_idf(idf, **kwargs)[source]

Create a BuildingTemplate from an IDF object.

  • idf (IDF) –

  • **kwargs

classmethod reduced_model(name, zones, **kwargs)[source]

Create reduced BuildingTemplate from list of ZoneDefinitions.

  • name (str) – The name of the building template.

  • zones (list of ZoneDefinition) – A list of zone definition objects to reduce. At least one must be a perimeter zone (ZoneDefinition.is_core is False).

  • **kwargs – keywords passed to the class constructor.


The reduced BuildingTemplate.

Return type



Return BuildingTemplate dictionary representation.


Validate object and fill in missing values.


Replace recursively every objects with the first equivalent object.


Get a dict based on the object properties, useful for dict repr.


validate (bool) – If True, try to validate object before returning the mapping.


Get item matching reference id.