NRCan-IETS-CE-O-HBC / HTAP

NRCan's Ruby scripts for batch analysis and optimization with HOT2000
http://www.nrcan.gc.ca/energy/efficiency/housing/home-improvements/17725
GNU Lesser General Public License v3.0
15 stars 7 forks source link

getHeatedFloorArea in substitute-h2k.rb does not correctly calculate the heated floor area #33

Closed fergusoa closed 6 years ago

fergusoa commented 6 years ago

Bug reported by Adam W. on Gen-Dev:

The method getHeatedFloorArea in substitute-h2k.rb does not correctly calculate the heated floor area of archetypes:

numStoreysInput = elements["HouseFile/House/Specifications/Storeys"].attributes["code"].to_f

For NRCan archetype 7 (two storey slab-on-grade), for example, the calculated floor area is 399 m2 and reported is 194 m2

jblake59 commented 6 years ago

Silly mistake! The number of storeys input is a code that maps as follows:

when 1 numStoreysInput = 1 when 2 numStoreysInput = 1.5 # 1.5 storeys when 3 numStoreysInput = 2 when 4 numStoreysInput = 2.5 # 2.5 storeys when 5 numStoreysInput = 3 when 6..7 numStoreysInput = 2 # Split level or Spli entry/raised basement