Skip to content

Commit

Permalink
Merge pull request #132 from BuildingSync/common-floor-area
Browse files Browse the repository at this point in the history
map common floor-area type
  • Loading branch information
kflemin authored Sep 11, 2021
2 parents c94cb54 + 05d32d9 commit f5c5fd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- BuildingSync to OpenStudio Translation for MLOD 200
- Add action for building the documentation
- Fix purge measures method to only remove measures with SKIP argument set to True
- Map "Common" BuildingSync floor area type

## Version 0.2.0

Expand Down
8 changes: 3 additions & 5 deletions lib/buildingsync/model_articulation/spatial_element.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def initialize(base_xml, ns)
@space_types_floor_area = nil
@conditioned_floor_area_heated_only = nil
@conditioned_floor_area_cooled_only = nil
@conditioned_floor_area_heated_cooled = nil
@conditioned_floor_area_heated_cooled = 0
@custom_conditioned_above_grade_floor_area = nil
@custom_conditioned_below_grade_floor_area = nil

Expand All @@ -85,12 +85,10 @@ def read_floor_areas(parent_total_floor_area)
floor_area_type = floor_area_element.elements["#{@ns}:FloorAreaType"].text
if floor_area_type == 'Gross'
@total_floor_area = OpenStudio.convert(validate_positive_number_excluding_zero('gross_floor_area', floor_area), 'ft^2', 'm^2').get
elsif floor_area_type == 'Heated and Cooled'
@conditioned_floor_area_heated_cooled = OpenStudio.convert(validate_positive_number_excluding_zero('@heated_and_cooled_floor_area', floor_area), 'ft^2', 'm^2').get
elsif floor_area_type == 'Footprint'
@footprint_floor_area = OpenStudio.convert(validate_positive_number_excluding_zero('@footprint_floor_area', floor_area), 'ft^2', 'm^2').get
elsif floor_area_type == 'Conditioned'
@conditioned_floor_area_heated_cooled = OpenStudio.convert(validate_positive_number_excluding_zero('@conditioned_floor_area_heated_cooled', floor_area), 'ft^2', 'm^2').get
elsif floor_area_type == 'Conditioned' || floor_area_type == 'Common' || floor_area_type == 'Heated and Cooled'
@conditioned_floor_area_heated_cooled += OpenStudio.convert(validate_positive_number_excluding_zero('@conditioned_floor_area_heated_cooled', floor_area), 'ft^2', 'm^2').get
elsif floor_area_type == 'Heated Only'
@conditioned_floor_area_heated_only = OpenStudio.convert(validate_positive_number_excluding_zero('@heated_only_floor_area', floor_area), 'ft^2', 'm^2').get
elsif floor_area_type == 'Cooled Only'
Expand Down

0 comments on commit f5c5fd0

Please sign in to comment.