urbanopt-cli 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (691) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +5 -0
  3. data/CMakeLists.txt +9 -9
  4. data/Gemfile +10 -12
  5. data/README.md +1 -0
  6. data/example_files/Gemfile +26 -10
  7. data/example_files/mappers/Baseline.rb +9 -0
  8. data/example_files/mappers/CreateBar.rb +2 -0
  9. data/example_files/mappers/Floorspace.rb +12 -10
  10. data/example_files/mappers/floorspace_workflow.osw +9 -0
  11. data/example_files/residential/clothes_washer.tsv +1 -1
  12. data/example_files/residential/water_heater.tsv +1 -1
  13. data/example_files/resources/hpxml-measures/.circleci/config.yml +20 -0
  14. data/example_files/resources/hpxml-measures/.github/pull_request_template.md +13 -0
  15. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/measure.rb +583 -334
  16. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/measure.xml +687 -586
  17. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/resources/geometry.rb +21 -22
  18. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/resources/schedules.rb +34 -24
  19. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/resources/schedules_config.yml +14 -1
  20. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-appliances-coal.osw +33 -35
  21. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-appliances-dehumidifier-50percent.osw +33 -35
  22. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/{base-appliances-dehumidifier-ief.osw → base-appliances-dehumidifier-ief-portable.osw} +34 -36
  23. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-appliances-dehumidifier-ief-whole-home.osw +361 -0
  24. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-appliances-dehumidifier.osw +33 -35
  25. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-appliances-gas.osw +33 -35
  26. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-appliances-modified.osw +33 -35
  27. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-appliances-none.osw +33 -35
  28. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-appliances-oil.osw +33 -35
  29. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-appliances-propane.osw +33 -35
  30. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-appliances-wood.osw +33 -35
  31. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-atticroof-flat.osw +33 -35
  32. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-atticroof-radiant-barrier.osw +33 -35
  33. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-atticroof-unvented-insulated-roof.osw +33 -35
  34. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-atticroof-vented.osw +33 -35
  35. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/{extra-mechvent-shared-preconditioning.osw → base-bldgtype-multifamily-shared-mechvent-preconditioning.osw} +47 -48
  36. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/{extra-mechvent-shared.osw → base-bldgtype-multifamily-shared-mechvent.osw} +47 -48
  37. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/{extra-pv-shared.osw → base-bldgtype-multifamily-shared-pv.osw} +49 -50
  38. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-bldgtype-multifamily-shared-water-heater.osw +365 -0
  39. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/{base-multifamily.osw → base-bldgtype-multifamily.osw} +43 -44
  40. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/{base-single-family-attached.osw → base-bldgtype-single-family-attached.osw} +36 -38
  41. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-combi-tankless-outside.osw +33 -34
  42. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-combi-tankless.osw +33 -34
  43. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-dwhr.osw +33 -35
  44. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-indirect-outside.osw +33 -34
  45. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-indirect-standbyloss.osw +33 -34
  46. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-indirect-with-solar-fraction.osw +33 -34
  47. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-indirect.osw +33 -34
  48. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-jacket-electric.osw +33 -35
  49. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-jacket-gas.osw +33 -35
  50. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-jacket-hpwh.osw +33 -35
  51. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-jacket-indirect.osw +33 -34
  52. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-low-flow-fixtures.osw +33 -35
  53. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-none.osw +33 -35
  54. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-recirc-demand.osw +33 -35
  55. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-recirc-manual.osw +33 -35
  56. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-recirc-nocontrol.osw +33 -35
  57. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-recirc-temperature.osw +33 -35
  58. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-recirc-timer.osw +33 -35
  59. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-solar-direct-evacuated-tube.osw +33 -35
  60. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-solar-direct-flat-plate.osw +33 -35
  61. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-solar-direct-ics.osw +33 -35
  62. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-solar-fraction.osw +33 -35
  63. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-solar-indirect-flat-plate.osw +33 -35
  64. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-solar-thermosyphon-flat-plate.osw +33 -35
  65. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tank-coal.osw +33 -35
  66. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tank-elec-uef.osw +362 -0
  67. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tank-gas-outside.osw +33 -35
  68. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tank-gas-uef.osw +362 -0
  69. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tank-gas.osw +33 -35
  70. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tank-heat-pump-outside.osw +33 -35
  71. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tank-heat-pump-uef.osw +362 -0
  72. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tank-heat-pump-with-solar-fraction.osw +33 -35
  73. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tank-heat-pump-with-solar.osw +33 -35
  74. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tank-heat-pump.osw +33 -35
  75. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tank-oil.osw +33 -35
  76. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tank-wood.osw +33 -35
  77. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tankless-electric-outside.osw +33 -36
  78. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tankless-electric-uef.osw +361 -0
  79. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tankless-electric.osw +33 -35
  80. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tankless-gas-uef.osw +361 -0
  81. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tankless-gas-with-solar-fraction.osw +33 -35
  82. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tankless-gas-with-solar.osw +33 -35
  83. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tankless-gas.osw +33 -35
  84. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-dhw-tankless-propane.osw +33 -35
  85. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-enclosure-2stories-garage.osw +33 -35
  86. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-enclosure-2stories.osw +33 -35
  87. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-enclosure-beds-1.osw +33 -35
  88. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-enclosure-beds-2.osw +33 -35
  89. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-enclosure-beds-4.osw +33 -35
  90. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-enclosure-beds-5.osw +33 -35
  91. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-enclosure-garage.osw +33 -35
  92. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-enclosure-infil-ach-house-pressure.osw +33 -35
  93. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-enclosure-infil-cfm-house-pressure.osw +33 -35
  94. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-enclosure-infil-cfm50.osw +33 -35
  95. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-enclosure-infil-flue.osw +33 -35
  96. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-enclosure-infil-natural-ach.osw +33 -35
  97. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-enclosure-overhangs.osw +33 -35
  98. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-enclosure-windows-none.osw +33 -35
  99. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-foundation-ambient.osw +33 -35
  100. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-foundation-conditioned-basement-slab-insulation.osw +33 -35
  101. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-foundation-slab.osw +33 -35
  102. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-foundation-unconditioned-basement-assembly-r.osw +33 -35
  103. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-foundation-unconditioned-basement-wall-insulation.osw +33 -35
  104. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-foundation-unconditioned-basement.osw +33 -35
  105. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-foundation-unvented-crawlspace.osw +33 -35
  106. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-foundation-vented-crawlspace.osw +33 -35
  107. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-air-to-air-heat-pump-1-speed.osw +34 -35
  108. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-air-to-air-heat-pump-2-speed.osw +33 -35
  109. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-air-to-air-heat-pump-var-speed.osw +33 -35
  110. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-boiler-coal-only.osw +33 -35
  111. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-boiler-elec-only.osw +33 -35
  112. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-boiler-gas-central-ac-1-speed.osw +33 -34
  113. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-boiler-gas-only.osw +33 -34
  114. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-boiler-oil-only.osw +33 -35
  115. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-boiler-propane-only.osw +33 -35
  116. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-boiler-wood-only.osw +33 -35
  117. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-central-ac-only-1-speed.osw +34 -35
  118. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-central-ac-only-2-speed.osw +33 -35
  119. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-central-ac-only-var-speed.osw +33 -35
  120. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-central-ac-plus-air-to-air-heat-pump-heating.osw +35 -35
  121. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-dual-fuel-air-to-air-heat-pump-1-speed-electric.osw +34 -35
  122. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-dual-fuel-air-to-air-heat-pump-1-speed.osw +34 -35
  123. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-dual-fuel-air-to-air-heat-pump-2-speed.osw +33 -35
  124. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-dual-fuel-air-to-air-heat-pump-var-speed.osw +33 -35
  125. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-dual-fuel-mini-split-heat-pump-ducted.osw +34 -35
  126. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-ducts-leakage-percent.osw +33 -35
  127. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-elec-resistance-only.osw +33 -35
  128. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-evap-cooler-furnace-gas.osw +33 -35
  129. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-evap-cooler-only-ducted.osw +33 -35
  130. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-evap-cooler-only.osw +34 -35
  131. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-fireplace-wood-only.osw +34 -35
  132. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-fixed-heater-gas-only.osw +34 -35
  133. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-floor-furnace-propane-only.osw +34 -35
  134. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-furnace-elec-central-ac-1-speed.osw +33 -35
  135. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-furnace-elec-only.osw +33 -35
  136. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-furnace-gas-central-ac-2-speed.osw +33 -35
  137. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-furnace-gas-central-ac-var-speed.osw +33 -35
  138. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-furnace-gas-only.osw +34 -35
  139. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-furnace-gas-room-ac.osw +33 -35
  140. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-furnace-oil-only.osw +33 -35
  141. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-furnace-propane-only.osw +33 -35
  142. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-furnace-wood-only.osw +33 -35
  143. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-ground-to-air-heat-pump.osw +35 -37
  144. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-mini-split-air-conditioner-only-ducted.osw +34 -35
  145. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-mini-split-air-conditioner-only-ductless.osw +34 -35
  146. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-mini-split-heat-pump-ducted-cooling-only.osw +34 -35
  147. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-mini-split-heat-pump-ducted-heating-only.osw +34 -35
  148. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-mini-split-heat-pump-ducted.osw +34 -35
  149. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-mini-split-heat-pump-ductless.osw +34 -35
  150. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-none.osw +33 -35
  151. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-portable-heater-gas-only.osw +34 -35
  152. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-room-ac-only-33percent.osw +33 -35
  153. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-room-ac-only.osw +33 -35
  154. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-setpoints.osw +33 -35
  155. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-stove-oil-only.osw +34 -35
  156. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-stove-wood-pellets-only.osw +34 -35
  157. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-undersized.osw +33 -35
  158. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-hvac-wall-furnace-elec-only.osw +34 -35
  159. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-lighting-ceiling-fans.osw +34 -36
  160. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-lighting-detailed.osw +33 -35
  161. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-location-AMY-2012.osw +33 -35
  162. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-location-baltimore-md.osw +33 -35
  163. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-location-dallas-tx.osw +33 -35
  164. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-location-duluth-mn.osw +33 -35
  165. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-location-miami-fl.osw +33 -35
  166. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-mechvent-balanced.osw +33 -35
  167. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-mechvent-bath-kitchen-fans.osw +33 -35
  168. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-mechvent-cfis-evap-cooler-only-ducted.osw +33 -35
  169. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-mechvent-cfis.osw +33 -35
  170. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-mechvent-erv-atre-asre.osw +33 -35
  171. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-mechvent-erv.osw +33 -35
  172. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-mechvent-exhaust.osw +33 -35
  173. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-mechvent-hrv-asre.osw +33 -35
  174. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-mechvent-hrv.osw +33 -35
  175. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-mechvent-supply.osw +33 -35
  176. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-mechvent-whole-house-fan.osw +33 -35
  177. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-misc-defaults.osw +36 -38
  178. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-misc-loads-large-uncommon.osw +39 -41
  179. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-misc-loads-large-uncommon2.osw +39 -41
  180. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-misc-neighbor-shading.osw +33 -35
  181. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-misc-usage-multiplier.osw +30 -32
  182. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-pv.osw +29 -31
  183. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-schedules-stochastic.osw +33 -35
  184. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-schedules-user-specified.osw +33 -35
  185. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-simcontrol-calendar-year-custom.osw +33 -35
  186. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-simcontrol-daylight-saving-custom.osw +33 -35
  187. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-simcontrol-daylight-saving-disabled.osw +33 -35
  188. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-simcontrol-runperiod-1-month.osw +33 -35
  189. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base-simcontrol-timestep-10-mins.osw +33 -35
  190. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/base.osw +33 -35
  191. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/build_residential_hpxml_test.rb +19 -8
  192. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/extra-auto.osw +33 -35
  193. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/extra-dhw-solar-latitude.osw +33 -35
  194. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/extra-enclosure-garage-partially-protruded.osw +33 -35
  195. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/extra-hvac-programmable-thermostat.osw +369 -0
  196. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/extra-plug-loads-additional-multipliers.osw +361 -0
  197. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/extra-pv-roofpitch.osw +33 -35
  198. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/{extra-dhw-shared-water-heater.osw → extra-schedules-random-seed.osw} +47 -50
  199. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/extra-second-heating-system-fireplace.osw +33 -35
  200. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/extra-second-heating-system-portable-heater.osw +33 -35
  201. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/extra-second-refrigerator.osw +33 -35
  202. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/extra-vacancy-6-months.osw +33 -35
  203. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/conditioned-attic-with-floor-insulation.osw +33 -35
  204. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/conditioned-basement-with-ceiling-insulation.osw +33 -35
  205. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/cooling-system-and-heat-pump.osw +33 -35
  206. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/dhw-indirect-without-boiler.osw +33 -35
  207. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/ducts-location-and-areas-not-same-type.osw +33 -35
  208. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/heating-system-and-heat-pump.osw +33 -35
  209. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/multifamily-bottom-crawlspace-zero-foundation-height.osw +41 -42
  210. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/multifamily-bottom-slab-non-zero-foundation-height.osw +41 -42
  211. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/multifamily-no-building-orientation.osw +40 -41
  212. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/{base-hvac-programmable-thermostat.osw → invalid_files/multipliers-without-fuel-loads.osw} +31 -33
  213. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/{base-dhw-uef.osw → invalid_files/multipliers-without-plug-loads.osw} +35 -37
  214. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/non-electric-heat-pump-water-heater.osw +33 -35
  215. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/non-integer-ceiling-fan-quantity.osw +33 -35
  216. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/non-integer-geometry-num-bathrooms.osw +33 -35
  217. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/second-heating-system-serves-majority-heat.osw +33 -35
  218. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/single-family-attached-ambient.osw +35 -37
  219. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/single-family-attached-no-building-orientation.osw +35 -37
  220. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/single-family-detached-finished-basement-zero-foundation-height.osw +33 -35
  221. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/single-family-detached-slab-non-zero-foundation-height.osw +33 -35
  222. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/slab-non-zero-foundation-height-above-grade.osw +33 -35
  223. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/unconditioned-basement-with-wall-and-ceiling-insulation.osw +33 -35
  224. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/unvented-attic-with-floor-and-roof-insulation.osw +33 -35
  225. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/unvented-crawlspace-with-wall-and-ceiling-insulation.osw +36 -38
  226. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/vented-attic-with-floor-and-roof-insulation.osw +33 -35
  227. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/invalid_files/vented-crawlspace-with-wall-and-ceiling-insulation.osw +33 -35
  228. data/example_files/resources/hpxml-measures/Gemfile +0 -2
  229. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb +141 -129
  230. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/measure.xml +183 -153
  231. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/BaseElements.xsd +4 -4
  232. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/EPvalidator.xml +247 -121
  233. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/HPXMLDataTypes.xsd +0 -10
  234. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/HPXMLvalidator.xml +434 -0
  235. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/airflow.rb +28 -35
  236. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/constants.rb +4 -12
  237. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/constructions.rb +60 -53
  238. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/energyplus.rb +11 -15
  239. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/generator.rb +81 -0
  240. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/geometry.rb +3 -1
  241. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hotwater_appliances.rb +21 -12
  242. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hpxml.rb +1150 -1072
  243. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hpxml_defaults.rb +799 -389
  244. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hvac.rb +227 -351
  245. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hvac_sizing.rb +122 -89
  246. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/lighting.rb +1 -1
  247. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/location.rb +2 -3
  248. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/meta_measure.rb +0 -6
  249. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/misc_loads.rb +8 -13
  250. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/pv.rb +23 -21
  251. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedules.rb +8 -7
  252. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/simcontrols.rb +2 -2
  253. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/validator.rb +80 -19
  254. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/version.rb +9 -2
  255. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/waterheater.rb +103 -72
  256. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/xmlhelper.rb +110 -37
  257. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_airflow.rb +16 -7
  258. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_constructions.rb +109 -0
  259. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_defaults.rb +1747 -838
  260. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_generator.rb +99 -0
  261. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_hotwater_appliance.rb +5 -16
  262. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_hvac.rb +23 -25
  263. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_hvac_sizing.rb +54 -0
  264. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_lighting.rb +1 -1
  265. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_location.rb +10 -10
  266. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_miscloads.rb +1 -1
  267. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_pv.rb +2 -2
  268. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_simcontrols.rb +10 -10
  269. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_validation.rb +77 -60
  270. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_water_heater.rb +186 -34
  271. data/example_files/resources/hpxml-measures/README.md +1 -0
  272. data/example_files/resources/hpxml-measures/Rakefile +2 -9
  273. data/example_files/resources/hpxml-measures/SimulationOutputReport/measure.rb +278 -254
  274. data/example_files/resources/hpxml-measures/SimulationOutputReport/measure.xml +32 -5
  275. data/example_files/resources/hpxml-measures/SimulationOutputReport/resources/constants.rb +1 -2
  276. data/example_files/resources/hpxml-measures/SimulationOutputReport/tests/output_report_test.rb +73 -137
  277. data/example_files/resources/hpxml-measures/docs/source/build_residential_hpxml.rst +3 -3
  278. data/example_files/resources/hpxml-measures/docs/source/conf.py +7 -4
  279. data/example_files/resources/hpxml-measures/docs/source/getting_started.rst +4 -4
  280. data/example_files/resources/hpxml-measures/docs/source/index.rst +2 -2
  281. data/example_files/resources/hpxml-measures/docs/source/intro.rst +4 -5
  282. data/example_files/resources/hpxml-measures/docs/source/nstatic/stylesheet.css +13 -1
  283. data/example_files/resources/hpxml-measures/docs/source/workflow_inputs.rst +2340 -0
  284. data/example_files/resources/hpxml-measures/docs/source/{simulation_output_report.rst → workflow_outputs.rst} +18 -16
  285. data/example_files/resources/hpxml-measures/tasks.rb +1154 -669
  286. data/example_files/resources/hpxml-measures/workflow/run_simulation.rb +64 -20
  287. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-coal.xml +557 -559
  288. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-dehumidifier-50percent.xml +523 -524
  289. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-appliances-dehumidifier-ief.xml → base-appliances-dehumidifier-ief-portable.xml} +3 -4
  290. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-dehumidifier-ief-whole-home.xml +524 -0
  291. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-dehumidifier.xml +523 -524
  292. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-gas.xml +557 -559
  293. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-modified.xml +563 -565
  294. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-none.xml +511 -513
  295. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-oil.xml +557 -559
  296. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-propane.xml +557 -559
  297. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-wood.xml +557 -559
  298. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-cathedral.xml +564 -566
  299. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-conditioned.xml +632 -634
  300. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-flat.xml +530 -532
  301. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-radiant-barrier.xml +516 -518
  302. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-unvented-insulated-roof.xml +561 -563
  303. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-vented.xml +564 -566
  304. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-enclosure-other-multifamily-buffer-space.xml → base-bldgtype-multifamily-adjacent-to-multifamily-buffer-space.xml} +30 -59
  305. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-adjacent-to-multiple.xml +553 -0
  306. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-enclosure-other-non-freezing-space.xml → base-bldgtype-multifamily-adjacent-to-non-freezing-space.xml} +30 -59
  307. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-enclosure-other-heated-space.xml → base-bldgtype-multifamily-adjacent-to-other-heated-space.xml} +30 -59
  308. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-enclosure-other-housing-unit.xml → base-bldgtype-multifamily-adjacent-to-other-housing-unit.xml} +30 -59
  309. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-boiler-chiller-baseboard.xml +426 -0
  310. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-boiler-chiller-fan-coil-ducted.xml +457 -0
  311. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-boiler-chiller-fan-coil.xml +429 -0
  312. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-boiler-chiller-water-loop-heat-pump.xml +469 -0
  313. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-boiler-cooling-tower-water-loop-heat-pump.xml +464 -0
  314. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-boiler-only-baseboard.xml +409 -0
  315. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-boiler-only-fan-coil-ducted.xml +439 -0
  316. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-boiler-only-fan-coil-eae.xml +408 -0
  317. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-boiler-only-fan-coil.xml +411 -0
  318. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-boiler-only-water-loop-heat-pump.xml +445 -0
  319. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-chiller-only-baseboard.xml +408 -0
  320. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-chiller-only-fan-coil-ducted.xml +438 -0
  321. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-chiller-only-fan-coil.xml +410 -0
  322. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-chiller-only-water-loop-heat-pump.xml +445 -0
  323. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-cooling-tower-only-water-loop-heat-pump.xml +440 -0
  324. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-generator.xml +459 -0
  325. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-ground-loop-ground-to-air-heat-pump.xml +451 -0
  326. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-laundry-room.xml +465 -0
  327. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-mechvent-shared-multiple.xml → base-bldgtype-multifamily-shared-mechvent-multiple.xml} +35 -410
  328. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-mechvent-preconditioning.xml +488 -0
  329. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-mechvent.xml +472 -0
  330. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-pv.xml +464 -0
  331. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-water-heater-recirc.xml +457 -0
  332. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily-shared-water-heater.xml +450 -0
  333. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-multifamily.xml +447 -0
  334. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-single-family-attached.xml +606 -0
  335. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-combi-tankless-outside.xml +517 -519
  336. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-combi-tankless.xml +517 -519
  337. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater-2-speed.xml +549 -551
  338. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater-gshp.xml +564 -566
  339. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater-hpwh.xml +562 -564
  340. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater-tankless.xml +550 -549
  341. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater-var-speed.xml +549 -551
  342. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater.xml +552 -551
  343. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-dwhr.xml +566 -568
  344. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect-dse.xml +518 -520
  345. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect-outside.xml +518 -520
  346. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect-standbyloss.xml +519 -521
  347. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect-with-solar-fraction.xml +526 -528
  348. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect.xml +518 -520
  349. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-jacket-electric.xml +566 -568
  350. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-jacket-gas.xml +567 -569
  351. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-jacket-hpwh.xml +565 -567
  352. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-jacket-indirect.xml +523 -525
  353. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-low-flow-fixtures.xml +561 -563
  354. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-multiple.xml +576 -578
  355. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-none.xml +495 -497
  356. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-recirc-demand.xml +564 -566
  357. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-recirc-manual.xml +564 -566
  358. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-recirc-nocontrol.xml +564 -566
  359. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-recirc-temperature.xml +564 -566
  360. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-recirc-timer.xml +564 -566
  361. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-direct-evacuated-tube.xml +576 -578
  362. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-direct-flat-plate.xml +576 -578
  363. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-direct-ics.xml +576 -578
  364. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-fraction.xml +569 -571
  365. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-indirect-flat-plate.xml +576 -578
  366. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-thermosyphon-flat-plate.xml +576 -578
  367. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-coal.xml +562 -564
  368. data/example_files/resources/hpxml-measures/workflow/sample_files/{invalid_files/invalid-window-interior-shading.xml → base-dhw-tank-elec-uef.xml} +8 -9
  369. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-gas-outside.xml +562 -564
  370. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-gas-uef.xml +564 -0
  371. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-gas.xml +562 -564
  372. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump-outside.xml +560 -562
  373. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-flowrate.xml → base-dhw-tank-heat-pump-uef.xml} +6 -13
  374. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump-with-solar-fraction.xml +568 -570
  375. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump-with-solar.xml +575 -577
  376. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump.xml +560 -562
  377. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-oil.xml +562 -564
  378. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-wood.xml +562 -564
  379. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-electric-outside.xml +560 -562
  380. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-electric-uef.xml +560 -0
  381. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-electric.xml +559 -561
  382. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-gas-uef.xml +560 -0
  383. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-gas-with-solar-fraction.xml +567 -569
  384. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-gas-with-solar.xml +574 -576
  385. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-gas.xml +559 -561
  386. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-propane.xml +559 -561
  387. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-2stories-garage.xml +660 -664
  388. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-2stories.xml +574 -576
  389. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-beds-1.xml +561 -563
  390. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-beds-2.xml +561 -563
  391. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-beds-4.xml +561 -563
  392. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-beds-5.xml +561 -563
  393. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-garage.xml +635 -639
  394. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-ach-house-pressure.xml +561 -563
  395. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-cfm-house-pressure.xml +561 -563
  396. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-cfm50.xml +561 -563
  397. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-flue.xml +564 -566
  398. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-natural-ach.xml +560 -562
  399. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-overhangs.xml +576 -578
  400. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-rooftypes.xml +589 -591
  401. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-skylights.xml +589 -591
  402. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-split-level.xml +516 -0
  403. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-split-surfaces.xml +2473 -2493
  404. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-walltypes.xml +753 -755
  405. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-windows-interior-shading.xml +561 -563
  406. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-windows-none.xml +503 -505
  407. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-ambient.xml +497 -497
  408. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-complex.xml +723 -729
  409. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-conditioned-basement-slab-insulation.xml +561 -563
  410. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-conditioned-basement-wall-interior-insulation.xml +561 -563
  411. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-multiple.xml +684 -688
  412. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-slab.xml +515 -517
  413. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-unconditioned-basement-above-grade.xml +608 -610
  414. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-unconditioned-basement-assembly-r.xml +557 -559
  415. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-unconditioned-basement-wall-insulation.xml +572 -574
  416. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-unconditioned-basement.xml +572 -574
  417. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-unvented-crawlspace.xml +572 -574
  418. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-vented-crawlspace.xml +575 -577
  419. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-walkout-basement.xml +626 -628
  420. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-1-speed.xml +563 -562
  421. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-2-speed.xml +560 -562
  422. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-var-speed.xml +560 -562
  423. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-coal-only.xml +519 -521
  424. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-elec-only.xml +519 -521
  425. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-gas-central-ac-1-speed.xml +571 -573
  426. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-gas-only.xml +520 -522
  427. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-oil-only.xml +519 -521
  428. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-propane-only.xml +519 -521
  429. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-wood-only.xml +519 -521
  430. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-central-ac-only-1-speed.xml +550 -549
  431. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-central-ac-only-2-speed.xml +547 -549
  432. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-central-ac-only-var-speed.xml +547 -549
  433. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-central-ac-plus-air-to-air-heat-pump-heating.xml +580 -576
  434. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dse.xml +533 -535
  435. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dual-fuel-air-to-air-heat-pump-1-speed-electric.xml +564 -563
  436. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dual-fuel-air-to-air-heat-pump-1-speed.xml +564 -563
  437. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dual-fuel-air-to-air-heat-pump-2-speed.xml +561 -563
  438. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dual-fuel-air-to-air-heat-pump-var-speed.xml +561 -563
  439. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dual-fuel-mini-split-heat-pump-ducted.xml +563 -562
  440. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ducts-leakage-percent.xml +561 -563
  441. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-elec-resistance-only.xml +510 -512
  442. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-evap-cooler-furnace-gas.xml +553 -555
  443. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-evap-cooler-only-ducted.xml +526 -528
  444. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-evap-cooler-only.xml +506 -505
  445. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-fireplace-wood-only.xml +513 -513
  446. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-fixed-heater-gas-only.xml +563 -563
  447. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-floor-furnace-propane-only.xml +513 -513
  448. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-coal-only.xml +548 -0
  449. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-elec-central-ac-1-speed.xml +561 -563
  450. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-elec-only.xml +547 -549
  451. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-central-ac-2-speed.xml +561 -563
  452. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-central-ac-var-speed.xml +561 -563
  453. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-only.xml +550 -550
  454. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-room-ac.xml +559 -561
  455. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-oil-only.xml +547 -549
  456. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-propane-only.xml +547 -549
  457. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-wood-only.xml +547 -549
  458. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-x3-dse.xml +577 -579
  459. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ground-to-air-heat-pump.xml +562 -564
  460. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ideal-air.xml +498 -500
  461. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-air-conditioner-only-ducted.xml +549 -548
  462. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-air-conditioner-only-ductless.xml +512 -511
  463. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ducted-cooling-only.xml +556 -555
  464. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ducted-heating-only.xml +562 -561
  465. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ducted.xml +562 -561
  466. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ductless.xml +519 -518
  467. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-multiple.xml +913 -912
  468. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-multiple2.xml +834 -837
  469. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-none.xml +487 -489
  470. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-portable-heater-gas-only.xml +563 -563
  471. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-programmable-thermostat-detailed.xml +566 -0
  472. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-programmable-thermostat.xml +569 -571
  473. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-room-ac-only-33percent.xml +509 -511
  474. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-room-ac-only.xml +509 -511
  475. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-setpoints.xml +561 -563
  476. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-stove-oil-only.xml +513 -513
  477. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-stove-wood-pellets-only.xml +513 -513
  478. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-undersized-allow-increased-fixed-capacities.xml +564 -566
  479. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-undersized.xml +561 -563
  480. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-wall-furnace-elec-only.xml +513 -513
  481. data/example_files/resources/hpxml-measures/workflow/sample_files/base-lighting-ceiling-fans.xml +572 -574
  482. data/example_files/resources/hpxml-measures/workflow/sample_files/base-lighting-detailed.xml +584 -586
  483. data/example_files/resources/hpxml-measures/workflow/sample_files/base-lighting-none.xml +487 -489
  484. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-AMY-2012.xml +561 -563
  485. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-baltimore-md.xml +561 -563
  486. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-dallas-tx.xml +515 -517
  487. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-duluth-mn.xml +561 -563
  488. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-miami-fl.xml +515 -517
  489. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-balanced.xml +573 -575
  490. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-bath-kitchen-fans.xml +589 -591
  491. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-cfis-dse.xml +546 -548
  492. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-cfis-evap-cooler-only-ducted.xml +539 -541
  493. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-cfis.xml +574 -576
  494. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-erv-atre-asre.xml +575 -577
  495. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-erv.xml +575 -577
  496. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-exhaust-rated-flow-rate.xml +573 -575
  497. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-exhaust.xml +573 -575
  498. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-hrv-asre.xml +574 -576
  499. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-hrv.xml +574 -576
  500. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-multiple.xml +793 -795
  501. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-supply.xml +573 -575
  502. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-whole-house-fan.xml +571 -573
  503. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-defaults.xml +476 -495
  504. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-generators.xml +578 -0
  505. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-loads-large-uncommon.xml +753 -833
  506. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-loads-large-uncommon2.xml +740 -820
  507. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-loads-none.xml +549 -559
  508. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-neighbor-shading.xml +574 -576
  509. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-shelter-coefficient.xml +564 -566
  510. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-usage-multiplier.xml +723 -725
  511. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv.xml +2 -4
  512. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-stochastic.xml +2 -4
  513. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-user-specified.xml +2 -4
  514. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-calendar-year-custom.xml +562 -564
  515. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-daylight-saving-custom.xml +568 -570
  516. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-daylight-saving-disabled.xml +564 -566
  517. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-runperiod-1-month.xml +565 -567
  518. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-timestep-10-mins.xml +561 -563
  519. data/example_files/resources/hpxml-measures/workflow/sample_files/base.xml +561 -563
  520. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-autosize.xml +559 -561
  521. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-air-to-air-heat-pump-1-speed-autosize-manual-s-oversize-allowances.xml +562 -561
  522. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-air-to-air-heat-pump-1-speed-autosize.xml +559 -558
  523. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-air-to-air-heat-pump-2-speed-autosize-manual-s-oversize-allowances.xml +559 -561
  524. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-air-to-air-heat-pump-2-speed-autosize.xml +556 -558
  525. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-air-to-air-heat-pump-var-speed-autosize-manual-s-oversize-allowances.xml +559 -561
  526. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-air-to-air-heat-pump-var-speed-autosize.xml +556 -558
  527. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-boiler-elec-only-autosize.xml +518 -520
  528. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-boiler-gas-central-ac-1-speed-autosize.xml +569 -571
  529. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-boiler-gas-only-autosize.xml +519 -521
  530. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-central-ac-only-1-speed-autosize.xml +549 -548
  531. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-central-ac-only-2-speed-autosize.xml +546 -548
  532. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-central-ac-only-var-speed-autosize.xml +546 -548
  533. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-central-ac-plus-air-to-air-heat-pump-heating-autosize.xml +575 -571
  534. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-dual-fuel-air-to-air-heat-pump-1-speed-autosize.xml +560 -559
  535. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-dual-fuel-mini-split-heat-pump-ducted-autosize.xml +559 -558
  536. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-elec-resistance-only-autosize.xml +509 -511
  537. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-evap-cooler-furnace-gas-autosize.xml +552 -554
  538. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-floor-furnace-propane-only-autosize.xml +512 -512
  539. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-furnace-elec-only-autosize.xml +546 -548
  540. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-furnace-gas-central-ac-2-speed-autosize.xml +559 -561
  541. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-furnace-gas-central-ac-var-speed-autosize.xml +559 -561
  542. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-furnace-gas-only-autosize.xml +549 -549
  543. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-furnace-gas-room-ac-autosize.xml +557 -559
  544. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-ground-to-air-heat-pump-autosize-manual-s-oversize-allowances.xml +562 -564
  545. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-ground-to-air-heat-pump-autosize.xml +559 -561
  546. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-mini-split-air-conditioner-only-ducted-autosize.xml +548 -547
  547. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-mini-split-heat-pump-ducted-autosize-manual-s-oversize-allowances.xml +561 -560
  548. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-mini-split-heat-pump-ducted-autosize.xml +558 -557
  549. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-mini-split-heat-pump-ducted-cooling-only-autosize.xml +553 -552
  550. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-mini-split-heat-pump-ducted-heating-only-autosize.xml +558 -557
  551. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-room-ac-only-autosize.xml +508 -510
  552. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-stove-oil-only-autosize.xml +512 -512
  553. data/example_files/resources/hpxml-measures/workflow/sample_files/hvac_autosizing/base-hvac-wall-furnace-elec-only-autosize.xml +512 -512
  554. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/cfis-with-hydronic-distribution.xml +533 -535
  555. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/clothes-dryer-location.xml +561 -563
  556. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/clothes-washer-location.xml +561 -563
  557. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/cooking-range-location.xml +561 -563
  558. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/dhw-frac-load-served.xml +576 -578
  559. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-dhw-uef.xml → invalid_files/dhw-invalid-ef-tank.xml} +3 -5
  560. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/dhw-invalid-uef-tank-heat-pump.xml +563 -0
  561. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/dishwasher-location.xml +561 -563
  562. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/duct-location-unconditioned-space.xml +561 -563
  563. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/duct-location.xml +561 -563
  564. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/duplicate-id.xml +561 -563
  565. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/enclosure-attic-missing-roof.xml +545 -547
  566. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/enclosure-basement-missing-exterior-foundation-wall.xml +542 -544
  567. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/enclosure-basement-missing-slab.xml +545 -545
  568. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/enclosure-floor-area-exceeds-cfa.xml +562 -0
  569. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/enclosure-garage-missing-exterior-wall.xml +612 -616
  570. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/enclosure-garage-missing-roof-ceiling.xml +625 -629
  571. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/enclosure-garage-missing-slab.xml +609 -611
  572. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/enclosure-living-missing-ceiling-roof.xml +549 -551
  573. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/enclosure-living-missing-exterior-wall.xml +471 -473
  574. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/enclosure-living-missing-floor-slab.xml +534 -534
  575. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/heat-pump-mixed-fixed-and-autosize-capacities.xml +561 -560
  576. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/heat-pump-mixed-fixed-and-autosize-capacities2.xml +562 -561
  577. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/hvac-distribution-multiple-attached-cooling.xml +913 -912
  578. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/hvac-distribution-multiple-attached-heating.xml +913 -912
  579. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/hvac-distribution-return-duct-leakage-missing.xml +532 -534
  580. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/hvac-dse-multiple-attached-cooling.xml +547 -549
  581. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/hvac-dse-multiple-attached-heating.xml +547 -549
  582. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/hvac-frac-load-served.xml +913 -912
  583. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/{invalid-calendar-year.xml → hvac-inconsistent-fan-powers.xml} +8 -5
  584. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/hvac-invalid-distribution-system-type.xml +569 -571
  585. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-datatype-boolean.xml +562 -0
  586. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-datatype-float.xml +562 -0
  587. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-datatype-integer.xml +562 -0
  588. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-daylight-saving.xml +568 -567
  589. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-distribution-cfa-served.xml +561 -563
  590. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-epw-filepath.xml +561 -563
  591. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-facility-type-equipment.xml +465 -0
  592. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-facility-type-surfaces.xml +643 -0
  593. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-input-parameters.xml +564 -0
  594. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-neighbor-shading-azimuth.xml +574 -576
  595. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-relatedhvac-desuperheater.xml +552 -551
  596. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-relatedhvac-dhw-indirect.xml +518 -520
  597. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-runperiod.xml +563 -565
  598. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-schema-version.xml +562 -0
  599. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-timestep.xml +561 -563
  600. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-window-height.xml +576 -578
  601. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/lighting-fractions.xml +561 -563
  602. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/missing-duct-location.xml +909 -908
  603. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/missing-elements.xml +559 -561
  604. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/multifamily-reference-appliance.xml +561 -563
  605. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/multifamily-reference-duct.xml +561 -563
  606. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/multifamily-reference-surface.xml +564 -566
  607. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/multifamily-reference-water-heater.xml +561 -563
  608. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/net-area-negative-roof.xml +589 -591
  609. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/net-area-negative-wall.xml +561 -563
  610. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/num-bedrooms-exceeds-limit.xml +562 -0
  611. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/orphaned-hvac-distribution.xml +545 -547
  612. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/refrigerator-location.xml +561 -563
  613. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/refrigerators-multiple-primary.xml +567 -569
  614. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/refrigerators-no-primary.xml +567 -569
  615. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/repeated-relatedhvac-desuperheater.xml +565 -564
  616. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/repeated-relatedhvac-dhw-indirect.xml +527 -529
  617. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/slab-zero-exposed-perimeter.xml +561 -563
  618. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/solar-thermal-system-with-combi-tankless.xml +532 -534
  619. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/solar-thermal-system-with-desuperheater.xml +567 -566
  620. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/solar-thermal-system-with-dhw-indirect.xml +532 -534
  621. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/unattached-cfis.xml +574 -576
  622. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/unattached-door.xml +561 -563
  623. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/unattached-hvac-distribution.xml +561 -563
  624. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/unattached-shared-clothes-washer-water-heater.xml +464 -827
  625. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/unattached-shared-dishwasher-water-heater.xml +464 -827
  626. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/unattached-skylight.xml +589 -591
  627. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/unattached-solar-thermal-system.xml +576 -578
  628. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/unattached-window.xml +561 -563
  629. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/water-heater-location-other.xml +561 -563
  630. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/water-heater-location.xml +561 -563
  631. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L100AC.xml +6 -14
  632. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L100AL.xml +6 -14
  633. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L110AC.xml +6 -14
  634. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L110AL.xml +6 -14
  635. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L120AC.xml +6 -14
  636. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L120AL.xml +6 -14
  637. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L130AC.xml +6 -14
  638. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L130AL.xml +6 -14
  639. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L140AC.xml +6 -14
  640. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L140AL.xml +6 -14
  641. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L150AC.xml +6 -14
  642. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L150AL.xml +6 -14
  643. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L155AC.xml +6 -14
  644. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L155AL.xml +6 -14
  645. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L160AC.xml +6 -14
  646. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L160AL.xml +6 -14
  647. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L170AC.xml +6 -14
  648. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L170AL.xml +6 -14
  649. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L200AC.xml +6 -14
  650. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L200AL.xml +6 -14
  651. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L202AC.xml +6 -14
  652. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L202AL.xml +6 -14
  653. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L302XC.xml +6 -16
  654. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L304XC.xml +6 -16
  655. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L322XC.xml +6 -16
  656. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L324XC.xml +6 -16
  657. data/example_files/resources/hpxml-measures/workflow/tests/hpxml_translator_test.rb +277 -224
  658. data/lib/uo_cli/version.rb +1 -1
  659. data/scripts/setup-env-gitbash.sh +4 -4
  660. data/scripts/setup-env.bat +14 -11
  661. data/scripts/setup-env.ps1 +13 -10
  662. data/uo_cli.gemspec +6 -4
  663. metadata +106 -57
  664. data/example_files/resources/hpxml-measures/docs/source/hpxml_to_openstudio.rst +0 -1386
  665. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-shared-laundry-room.xml +0 -828
  666. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-shared-water-heater-recirc.xml +0 -820
  667. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-shared-water-heater.xml +0 -813
  668. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-attached-multifamily.xml +0 -810
  669. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-common-surfaces.xml +0 -928
  670. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-boiler-chiller-baseboard.xml +0 -777
  671. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-boiler-chiller-fan-coil-ducted.xml +0 -808
  672. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-boiler-chiller-fan-coil.xml +0 -780
  673. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-boiler-chiller-water-loop-heat-pump.xml +0 -820
  674. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-boiler-cooling-tower-water-loop-heat-pump.xml +0 -815
  675. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-boiler-only-baseboard.xml +0 -760
  676. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-boiler-only-fan-coil-ducted.xml +0 -790
  677. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-boiler-only-fan-coil-eae.xml +0 -759
  678. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-boiler-only-fan-coil.xml +0 -762
  679. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-boiler-only-water-loop-heat-pump.xml +0 -796
  680. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-chiller-only-baseboard.xml +0 -759
  681. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-chiller-only-fan-coil-ducted.xml +0 -789
  682. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-chiller-only-fan-coil.xml +0 -761
  683. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-chiller-only-water-loop-heat-pump.xml +0 -796
  684. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-cooling-tower-only-water-loop-heat-pump.xml +0 -791
  685. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-shared-ground-loop-ground-to-air-heat-pump.xml +0 -814
  686. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-shared-preconditioning.xml +0 -851
  687. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-shared.xml +0 -835
  688. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-shared.xml +0 -827
  689. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/appliances-location-unconditioned-space.xml +0 -564
  690. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/coal-for-non-boiler-heating.xml +0 -514
  691. data/example_files/resources/hpxml-measures/workflow/sample_files/invalid_files/invalid-facility-type.xml +0 -828
@@ -3,20 +3,33 @@
3
3
  class XMLHelper
4
4
  # Adds the child element with 'element_name' and sets its value. Returns the
5
5
  # child element.
6
- def self.add_element(parent, element_name, value = nil)
6
+ def self.add_element(parent, element_name, value = nil, datatype = nil, defaulted = false)
7
7
  added = Oga::XML::Element.new(name: element_name)
8
8
  parent.children << added
9
9
  if not value.nil?
10
+ if datatype == :integer
11
+ value = to_integer(value)
12
+ elsif datatype == :float
13
+ value = to_float(value)
14
+ elsif datatype == :boolean
15
+ value = to_boolean(value)
16
+ elsif datatype != :string
17
+ # If value provided, datatype required
18
+ fail 'Unexpected datatype.'
19
+ end
10
20
  added.inner_text = value.to_s
11
21
  end
22
+ if defaulted
23
+ XMLHelper.add_attribute(added, 'dataSource', 'software')
24
+ end
12
25
  return added
13
26
  end
14
27
 
15
28
  # Adds the child element with 'element_name' to a single extension element and
16
29
  # sets its value. Returns the extension element.
17
- def self.add_extension(parent, element_name, value)
30
+ def self.add_extension(parent, element_name, value, datatype, defaulted = false)
18
31
  extension = XMLHelper.create_elements_as_needed(parent, ['extension'])
19
- return XMLHelper.add_element(extension, element_name, value)
32
+ return XMLHelper.add_element(extension, element_name, value, datatype, defaulted)
20
33
  end
21
34
 
22
35
  # Creates a hierarchy of elements under the parent element based on the supplied
@@ -44,23 +57,53 @@ class XMLHelper
44
57
  end
45
58
 
46
59
  # Returns the value of 'element_name' in the parent element or nil.
47
- def self.get_value(parent, element_name)
48
- val = parent.at_xpath(element_name)
49
- if val.nil?
50
- return val
60
+ def self.get_value(parent, element_name, datatype)
61
+ value, isdefaulted = get_value_and_defaulted(parent, element_name, datatype)
62
+ return value
63
+ end
64
+
65
+ def self.get_value_and_defaulted(parent, element_name, datatype)
66
+ element = parent.at_xpath(element_name)
67
+ if element.nil?
68
+ return
51
69
  end
70
+ value = element.text
52
71
 
53
- return val.text
72
+ if datatype == :integer
73
+ value = to_integer_or_nil(value)
74
+ elsif datatype == :float
75
+ value = to_float_or_nil(value)
76
+ elsif datatype == :boolean
77
+ value = to_boolean_or_nil(value)
78
+ elsif datatype != :string
79
+ fail 'Unexpected datatype.'
80
+ end
81
+
82
+ isdefaulted = get_attribute_value(element, 'dataSource') == 'software'
83
+
84
+ return value, isdefaulted
54
85
  end
55
86
 
56
87
  # Returns the value(s) of 'element_name' in the parent element or [].
57
- def self.get_values(parent, element_name)
58
- vals = []
59
- parent.xpath(element_name).each do |val|
60
- vals << val.text
88
+ def self.get_values(parent, element_name, datatype)
89
+ values = []
90
+ parent.xpath(element_name).each do |value|
91
+ value = value.text
92
+
93
+ if datatype == :integer
94
+ value = to_integer_or_nil(value)
95
+ elsif datatype == :float
96
+ value = to_float_or_nil(value)
97
+ elsif datatype == :boolean
98
+ value = to_boolean_or_nil(value)
99
+ elsif datatype != :string
100
+ fail 'Unexpected datatype.'
101
+ end
102
+
103
+ values << value
61
104
  end
62
105
 
63
- return vals
106
+ return values
64
107
  end
65
108
 
66
109
  # Returns the element in the parent element.
@@ -105,30 +148,6 @@ class XMLHelper
105
148
  return element.get(attr_name)
106
149
  end
107
150
 
108
- # Copies the element if it exists
109
- def self.copy_element(dest, src, element_name, backup_val = nil)
110
- return if src.nil?
111
-
112
- element = src.at_xpath(element_name)
113
- if not element.nil?
114
- dest << element.dup
115
- elsif not backup_val.nil?
116
- # Element didn't exist in src, assign backup value instead
117
- add_element(dest, element_name.split('/')[-1], backup_val)
118
- end
119
- end
120
-
121
- # Copies the multiple elements
122
- def self.copy_elements(dest, src, element_name)
123
- return if src.nil?
124
-
125
- if not src.xpath(element_name).nil?
126
- src.xpath(element_name).each do |el|
127
- dest << el.dup
128
- end
129
- end
130
- end
131
-
132
151
  def self.validate(doc, xsd_path, runner = nil)
133
152
  if Gem::Specification::find_all_by_name('nokogiri').any?
134
153
  require 'nokogiri'
@@ -191,6 +210,7 @@ class XMLHelper
191
210
  doc_s.gsub!('"', "'")
192
211
  doc_s.gsub!(' />', '/>')
193
212
  doc_s.gsub!(' ?>', '?>')
213
+ doc_s.gsub!('&quot;', '"')
194
214
 
195
215
  # Write XML file
196
216
  if not Dir.exist? File.dirname(out_path)
@@ -201,3 +221,56 @@ class XMLHelper
201
221
  end
202
222
  end
203
223
  end
224
+
225
+ def to_float(value)
226
+ begin
227
+ return Float(value)
228
+ rescue
229
+ fail "Cannot convert '#{value}' to float."
230
+ end
231
+ end
232
+
233
+ def to_integer(value)
234
+ begin
235
+ value = Float(value)
236
+ rescue
237
+ fail "Cannot convert '#{value}' to integer."
238
+ end
239
+ if value % 1 == 0
240
+ return Integer(value)
241
+ else
242
+ fail "Cannot convert '#{value}' to integer."
243
+ end
244
+ end
245
+
246
+ def to_boolean(value)
247
+ if value.is_a? TrueClass
248
+ return true
249
+ elsif value.is_a? FalseClass
250
+ return false
251
+ elsif (value.downcase.to_s == 'true') || (value == '1') || (value == 1)
252
+ return true
253
+ elsif (value.downcase.to_s == 'false') || (value == '0') || (value == 0)
254
+ return false
255
+ end
256
+
257
+ fail "Cannot convert '#{value}' to boolean."
258
+ end
259
+
260
+ def to_float_or_nil(value)
261
+ return if value.nil?
262
+
263
+ return to_float(value)
264
+ end
265
+
266
+ def to_integer_or_nil(value)
267
+ return if value.nil?
268
+
269
+ return to_integer(value)
270
+ end
271
+
272
+ def to_boolean_or_nil(value)
273
+ return if value.nil?
274
+
275
+ return to_boolean(value)
276
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative '../resources/minitest_helper'
4
4
  require 'openstudio'
5
- require 'openstudio/ruleset/ShowRunnerOutput'
5
+ require 'openstudio/measure/ShowRunnerOutput'
6
6
  require 'minitest/autorun'
7
7
  require 'fileutils'
8
8
  require_relative '../measure.rb'
@@ -430,7 +430,7 @@ class HPXMLtoOpenStudioAirflowTest < MiniTest::Test
430
430
 
431
431
  def test_shared_mechvent_multiple
432
432
  args_hash = {}
433
- args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-mechvent-shared-multiple.xml'))
433
+ args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-bldgtype-multifamily-shared-mechvent-multiple.xml'))
434
434
  model, hpxml = _test_measure(args_hash)
435
435
 
436
436
  # Get HPXML values
@@ -540,14 +540,23 @@ class HPXMLtoOpenStudioAirflowTest < MiniTest::Test
540
540
  assert_equal(5066, exterior_area)
541
541
  assert_equal(5066, total_area)
542
542
 
543
- # Test complex SFA/MF building w/ unvented attic within infiltration volume
544
- hpxml = HPXML.new(hpxml_path: File.absolute_path(File.join(sample_files_dir, 'base-enclosure-attached-multifamily.xml')))
543
+ # Test unvented attic/crawlspace not within infiltration volume
544
+ hpxml = HPXML.new(hpxml_path: File.absolute_path(File.join(sample_files_dir, 'base-foundation-unvented-crawlspace.xml')))
545
545
  hpxml.attics.each do |attic|
546
- attic.within_infiltration_volume = true
546
+ attic.within_infiltration_volume = false
547
+ end
548
+ hpxml.foundations.each do |foundation|
549
+ foundation.within_infiltration_volume = false
547
550
  end
548
551
  total_area, exterior_area = hpxml.compartmentalization_boundary_areas
549
- assert_equal(5550, exterior_area)
550
- assert_equal(8076, total_area)
552
+ assert_equal(3900, exterior_area)
553
+ assert_equal(3900, total_area)
554
+
555
+ # Test multifamily
556
+ hpxml = HPXML.new(hpxml_path: File.absolute_path(File.join(sample_files_dir, 'base-bldgtype-multifamily.xml')))
557
+ total_area, exterior_area = hpxml.compartmentalization_boundary_areas
558
+ assert_equal(686, exterior_area)
559
+ assert_equal(2780, total_area)
551
560
  end
552
561
 
553
562
  def test_infiltration_assumed_height
@@ -0,0 +1,109 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../resources/minitest_helper'
4
+ require 'openstudio'
5
+ require 'openstudio/measure/ShowRunnerOutput'
6
+ require 'minitest/autorun'
7
+ require 'fileutils'
8
+ require_relative '../measure.rb'
9
+ require_relative '../resources/util.rb'
10
+
11
+ class HPXMLtoOpenStudioConstructionsTest < MiniTest::Test
12
+ def sample_files_dir
13
+ return File.join(File.dirname(__FILE__), '..', '..', 'workflow', 'sample_files')
14
+ end
15
+
16
+ def test_windows
17
+ args_hash = {}
18
+ args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base.xml'))
19
+ model, hpxml = _test_measure(args_hash)
20
+
21
+ # Check window properties
22
+ hpxml.windows.each do |window|
23
+ os_window = model.getSubSurfaces.select { |w| w.name.to_s == window.id }[0]
24
+ os_simple_glazing = os_window.construction.get.to_LayeredConstruction.get.getLayer(0).to_SimpleGlazing.get
25
+
26
+ assert_equal(window.shgc, os_simple_glazing.solarHeatGainCoefficient)
27
+ assert_in_epsilon(window.ufactor, UnitConversions.convert(os_simple_glazing.uFactor, 'W/(m^2*K)', 'Btu/(hr*ft^2*F)'), 0.001)
28
+ end
29
+ end
30
+
31
+ def test_windows_interior_shading
32
+ args_hash = {}
33
+ args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-enclosure-windows-interior-shading.xml'))
34
+ model, hpxml = _test_measure(args_hash)
35
+
36
+ summer_date = OpenStudio::Date.new(OpenStudio::MonthOfYear.new('June'), 1, model.yearDescription.get.assumedYear)
37
+ winter_date = OpenStudio::Date.new(OpenStudio::MonthOfYear.new('January'), 1, model.yearDescription.get.assumedYear)
38
+
39
+ # Check window shading properties
40
+ hpxml.windows.each do |window|
41
+ os_window = model.getSubSurfaces.select { |w| w.name.to_s == window.id }[0]
42
+ os_summer_control = os_window.shadingControls.select { |sc| sc.schedule.get.to_ScheduleRuleset.get.getDaySchedules(summer_date, summer_date).map { |ds| ds.values.sum }.sum == 1 }[0]
43
+ os_winter_control = os_window.shadingControls.select { |sc| sc.schedule.get.to_ScheduleRuleset.get.getDaySchedules(winter_date, winter_date).map { |ds| ds.values.sum }.sum == 1 }[0]
44
+
45
+ if window.interior_shading_factor_summer == 1
46
+ assert_nil(os_summer_control) # No shading
47
+ else
48
+ refute_nil(os_summer_control)
49
+ assert_equal(window.interior_shading_factor_summer, os_summer_control.shadingMaterial.get.to_Shade.get.solarTransmittance)
50
+ end
51
+ if window.interior_shading_factor_winter == 1
52
+ assert_nil(os_winter_control) # No shading
53
+ else
54
+ refute_nil(os_winter_control)
55
+ assert_equal(window.interior_shading_factor_winter, os_winter_control.shadingMaterial.get.to_Shade.get.solarTransmittance)
56
+ end
57
+ end
58
+ end
59
+
60
+ def test_skylights
61
+ args_hash = {}
62
+ args_hash['hpxml_path'] = File.absolute_path(File.join(sample_files_dir, 'base-enclosure-skylights.xml'))
63
+ model, hpxml = _test_measure(args_hash)
64
+
65
+ # Check skylight properties
66
+ hpxml.skylights.each do |skylight|
67
+ os_skylight = model.getSubSurfaces.select { |w| w.name.to_s == skylight.id }[0]
68
+ os_simple_glazing = os_skylight.construction.get.to_LayeredConstruction.get.getLayer(0).to_SimpleGlazing.get
69
+
70
+ assert_equal(skylight.shgc, os_simple_glazing.solarHeatGainCoefficient)
71
+ assert_in_epsilon(skylight.ufactor / 1.2, UnitConversions.convert(os_simple_glazing.uFactor, 'W/(m^2*K)', 'Btu/(hr*ft^2*F)'), 0.001)
72
+ end
73
+ end
74
+
75
+ def _test_measure(args_hash)
76
+ # create an instance of the measure
77
+ measure = HPXMLtoOpenStudio.new
78
+
79
+ runner = OpenStudio::Measure::OSRunner.new(OpenStudio::WorkflowJSON.new)
80
+ model = OpenStudio::Model::Model.new
81
+
82
+ # get arguments
83
+ arguments = measure.arguments(model)
84
+ argument_map = OpenStudio::Measure.convertOSArgumentVectorToMap(arguments)
85
+
86
+ # populate argument with specified hash value if specified
87
+ arguments.each do |arg|
88
+ temp_arg_var = arg.clone
89
+ if args_hash.has_key?(arg.name)
90
+ assert(temp_arg_var.setValue(args_hash[arg.name]))
91
+ end
92
+ argument_map[arg.name] = temp_arg_var
93
+ end
94
+
95
+ # run the measure
96
+ measure.run(model, runner, argument_map)
97
+ result = runner.result
98
+
99
+ # show the output
100
+ show_output(result) unless result.value.valueName == 'Success'
101
+
102
+ # assert that it ran correctly
103
+ assert_equal('Success', result.value.valueName)
104
+
105
+ hpxml = HPXML.new(hpxml_path: args_hash['hpxml_path'])
106
+
107
+ return model, hpxml
108
+ end
109
+ end
@@ -2,7 +2,7 @@
2
2
 
3
3
  require_relative '../resources/minitest_helper'
4
4
  require 'openstudio'
5
- require 'openstudio/ruleset/ShowRunnerOutput'
5
+ require 'openstudio/measure/ShowRunnerOutput'
6
6
  require 'minitest/autorun'
7
7
  require 'fileutils'
8
8
  require_relative '../measure.rb'
@@ -35,57 +35,57 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
35
35
  hpxml = _create_hpxml('base.xml')
36
36
  hpxml.header.timestep = 30
37
37
  hpxml.header.sim_begin_month = 2
38
- hpxml.header.sim_begin_day_of_month = 2
38
+ hpxml.header.sim_begin_day = 2
39
39
  hpxml.header.sim_end_month = 11
40
- hpxml.header.sim_end_day_of_month = 11
40
+ hpxml.header.sim_end_day = 11
41
41
  hpxml.header.sim_calendar_year = 2008
42
42
  hpxml.header.dst_enabled = false
43
43
  hpxml.header.dst_begin_month = 3
44
- hpxml.header.dst_begin_day_of_month = 3
44
+ hpxml.header.dst_begin_day = 3
45
45
  hpxml.header.dst_end_month = 10
46
- hpxml.header.dst_end_day_of_month = 10
46
+ hpxml.header.dst_end_day = 10
47
47
  hpxml.header.use_max_load_for_heat_pumps = false
48
48
  hpxml.header.allow_increased_fixed_capacities = true
49
49
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
50
50
  hpxml_default = _test_measure()
51
- _test_default_header_values(hpxml_default, 30, 2, 2, 11, 11, 2008, false, 3, 3, 10, 10, false, true)
51
+ _test_default_header_values(hpxml_default, false, 30, 2, 2, 11, 11, 2008, false, 3, 3, 10, 10, false, true)
52
52
 
53
53
  # Test defaults - DST not in weather file
54
54
  hpxml.header.timestep = nil
55
55
  hpxml.header.sim_begin_month = nil
56
- hpxml.header.sim_begin_day_of_month = nil
56
+ hpxml.header.sim_begin_day = nil
57
57
  hpxml.header.sim_end_month = nil
58
- hpxml.header.sim_end_day_of_month = nil
58
+ hpxml.header.sim_end_day = nil
59
59
  hpxml.header.sim_calendar_year = nil
60
60
  hpxml.header.dst_enabled = nil
61
61
  hpxml.header.dst_begin_month = nil
62
- hpxml.header.dst_begin_day_of_month = nil
62
+ hpxml.header.dst_begin_day = nil
63
63
  hpxml.header.dst_end_month = nil
64
- hpxml.header.dst_end_day_of_month = nil
64
+ hpxml.header.dst_end_day = nil
65
65
  hpxml.header.use_max_load_for_heat_pumps = nil
66
66
  hpxml.header.allow_increased_fixed_capacities = nil
67
67
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
68
68
  hpxml_default = _test_measure()
69
- _test_default_header_values(hpxml_default, 60, 1, 1, 12, 31, 2007, true, 3, 12, 11, 5, true, false)
69
+ _test_default_header_values(hpxml_default, true, 60, 1, 1, 12, 31, 2007, true, 3, 12, 11, 5, true, false)
70
70
 
71
71
  # Test defaults - DST in weather file
72
72
  hpxml = _create_hpxml('base-location-AMY-2012.xml')
73
73
  hpxml.header.timestep = nil
74
74
  hpxml.header.sim_begin_month = nil
75
- hpxml.header.sim_begin_day_of_month = nil
75
+ hpxml.header.sim_begin_day = nil
76
76
  hpxml.header.sim_end_month = nil
77
- hpxml.header.sim_end_day_of_month = nil
77
+ hpxml.header.sim_end_day = nil
78
78
  hpxml.header.sim_calendar_year = nil
79
79
  hpxml.header.dst_enabled = nil
80
80
  hpxml.header.dst_begin_month = nil
81
- hpxml.header.dst_begin_day_of_month = nil
81
+ hpxml.header.dst_begin_day = nil
82
82
  hpxml.header.dst_end_month = nil
83
- hpxml.header.dst_end_day_of_month = nil
83
+ hpxml.header.dst_end_day = nil
84
84
  hpxml.header.use_max_load_for_heat_pumps = nil
85
85
  hpxml.header.allow_increased_fixed_capacities = nil
86
86
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
87
87
  hpxml_default = _test_measure()
88
- _test_default_header_values(hpxml_default, 60, 1, 1, 12, 31, 2012, true, 3, 11, 11, 4, true, false)
88
+ _test_default_header_values(hpxml_default, true, 60, 1, 1, 12, 31, 2012, true, 3, 11, 11, 4, true, false)
89
89
  end
90
90
 
91
91
  def test_site
@@ -95,14 +95,14 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
95
95
  hpxml.site.shelter_coefficient = 0.3
96
96
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
97
97
  hpxml_default = _test_measure()
98
- _test_default_site_values(hpxml_default, HPXML::SiteTypeRural, 0.3)
98
+ _test_default_site_values(hpxml_default, false, HPXML::SiteTypeRural, 0.3)
99
99
 
100
100
  # Test defaults
101
101
  hpxml.site.site_type = nil
102
102
  hpxml.site.shelter_coefficient = nil
103
103
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
104
104
  hpxml_default = _test_measure()
105
- _test_default_site_values(hpxml_default, HPXML::SiteTypeSuburban, 0.5)
105
+ _test_default_site_values(hpxml_default, true, HPXML::SiteTypeSuburban, 0.5)
106
106
  end
107
107
 
108
108
  def test_occupancy
@@ -111,31 +111,69 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
111
111
  hpxml.building_occupancy.number_of_residents = 1
112
112
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
113
113
  hpxml_default = _test_measure()
114
- _test_default_occupancy_values(hpxml_default, 1)
114
+ _test_default_occupancy_values(hpxml_default, false, 1)
115
115
 
116
116
  # Test defaults
117
117
  hpxml.building_occupancy.number_of_residents = nil
118
118
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
119
119
  hpxml_default = _test_measure()
120
- _test_default_occupancy_values(hpxml_default, 3)
120
+ _test_default_occupancy_values(hpxml_default, true, 3)
121
121
  end
122
122
 
123
123
  def test_building_construction
124
124
  # Test inputs not overridden by defaults
125
125
  hpxml = _create_hpxml('base-enclosure-infil-flue.xml')
126
- hpxml.building_construction.number_of_bathrooms = 4.0
126
+ hpxml.building_construction.number_of_bathrooms = 4
127
+ hpxml.building_construction.conditioned_building_volume = 20000
128
+ hpxml.building_construction.average_ceiling_height = 7
127
129
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
128
130
  hpxml_default = _test_measure()
129
- _test_default_building_construction_values(hpxml_default, 21600, true, 4)
131
+ _test_default_building_construction_values(hpxml_default, false, 20000, 7, true, 4)
130
132
 
131
- # Test defaults w/ average ceiling height
133
+ # Test defaults
132
134
  hpxml.building_construction.conditioned_building_volume = nil
133
- hpxml.building_construction.average_ceiling_height = 10
135
+ hpxml.building_construction.average_ceiling_height = nil
134
136
  hpxml.building_construction.has_flue_or_chimney = nil
135
137
  hpxml.building_construction.number_of_bathrooms = nil
136
138
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
137
139
  hpxml_default = _test_measure()
138
- _test_default_building_construction_values(hpxml_default, 27000, false, 2)
140
+ _test_default_building_construction_values(hpxml_default, true, 21600, 8, false, 2)
141
+
142
+ # Test defaults w/ average ceiling height
143
+ hpxml.building_construction.conditioned_building_volume = nil
144
+ hpxml.building_construction.average_ceiling_height = 10
145
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
146
+ hpxml_default = _test_measure()
147
+ _test_default_building_construction_values(hpxml_default, true, 27000, 10, false, 2)
148
+
149
+ # Test defaults w/ average ceiling height
150
+ hpxml.building_construction.conditioned_building_volume = 27000
151
+ hpxml.building_construction.average_ceiling_height = nil
152
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
153
+ hpxml_default = _test_measure()
154
+ _test_default_building_construction_values(hpxml_default, true, 27000, 10, false, 2)
155
+ end
156
+
157
+ def test_infiltration
158
+ # Test inputs not overridden by defaults
159
+ hpxml = _create_hpxml('base.xml')
160
+ hpxml.air_infiltration_measurements[0].infiltration_volume = 25000
161
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
162
+ hpxml_default = _test_measure()
163
+ _test_default_infiltration_values(hpxml_default, false, 25000)
164
+
165
+ # Test defaults w/ conditioned basement
166
+ hpxml.air_infiltration_measurements[0].infiltration_volume = nil
167
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
168
+ hpxml_default = _test_measure()
169
+ _test_default_infiltration_values(hpxml_default, true, 2700 * 8)
170
+
171
+ # Test defaults w/o conditioned basement
172
+ hpxml = _create_hpxml('base-foundation-slab.xml')
173
+ hpxml.air_infiltration_measurements[0].infiltration_volume = nil
174
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
175
+ hpxml_default = _test_measure()
176
+ _test_default_infiltration_values(hpxml_default, true, 1350 * 8)
139
177
  end
140
178
 
141
179
  def test_attics
@@ -144,13 +182,13 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
144
182
  hpxml.attics[0].vented_attic_sla = 0.001
145
183
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
146
184
  hpxml_default = _test_measure()
147
- _test_default_attic_values(hpxml_default, 0.001)
185
+ _test_default_attic_values(hpxml_default, false, 0.001)
148
186
 
149
187
  # Test defaults
150
188
  hpxml.attics[0].vented_attic_sla = nil
151
189
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
152
190
  hpxml_default = _test_measure()
153
- _test_default_attic_values(hpxml_default, 1.0 / 300.0)
191
+ _test_default_attic_values(hpxml_default, true, 1.0 / 300.0)
154
192
  end
155
193
 
156
194
  def test_foundations
@@ -159,54 +197,70 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
159
197
  hpxml.foundations[0].vented_crawlspace_sla = 0.001
160
198
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
161
199
  hpxml_default = _test_measure()
162
- _test_default_foundation_values(hpxml_default, 0.001)
200
+ _test_default_foundation_values(hpxml_default, false, 0.001)
163
201
 
164
202
  # Test defaults
165
203
  hpxml.foundations[0].vented_crawlspace_sla = nil
166
204
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
167
205
  hpxml_default = _test_measure()
168
- _test_default_foundation_values(hpxml_default, 1.0 / 150.0)
206
+ _test_default_foundation_values(hpxml_default, true, 1.0 / 150.0)
169
207
  end
170
208
 
171
- def test_infiltration
209
+ def test_roofs
172
210
  # Test inputs not overridden by defaults
173
- hpxml = _create_hpxml('base.xml')
174
- hpxml.air_infiltration_measurements[0].infiltration_volume = 25000
211
+ hpxml = _create_hpxml('base-atticroof-radiant-barrier.xml')
212
+ hpxml.roofs[0].roof_type = HPXML::RoofTypeMetal
213
+ hpxml.roofs[0].solar_absorptance = 0.77
214
+ hpxml.roofs[0].roof_color = HPXML::ColorDark
215
+ hpxml.roofs[0].emittance = 0.88
175
216
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
176
217
  hpxml_default = _test_measure()
177
- _test_default_infiltration_values(hpxml_default, 25000)
218
+ _test_default_roof_values(hpxml_default, false, HPXML::RoofTypeMetal, 0.77, HPXML::ColorDark, 0.88, true)
178
219
 
179
- # Test defaults w/ conditioned basement
180
- hpxml.air_infiltration_measurements[0].infiltration_volume = nil
220
+ # Test defaults w/ RoofColor
221
+ hpxml.roofs[0].roof_type = nil
222
+ hpxml.roofs[0].solar_absorptance = nil
223
+ hpxml.roofs[0].roof_color = HPXML::ColorLight
224
+ hpxml.roofs[0].emittance = nil
225
+ hpxml.roofs[0].radiant_barrier = nil
181
226
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
182
227
  hpxml_default = _test_measure()
183
- _test_default_infiltration_values(hpxml_default, 2700 * 8)
228
+ _test_default_roof_values(hpxml_default, true, HPXML::RoofTypeAsphaltShingles, 0.75, HPXML::ColorLight, 0.90, false)
184
229
 
185
- # Test defaults w/o conditioned basement
186
- hpxml = _create_hpxml('base-foundation-slab.xml')
187
- hpxml.air_infiltration_measurements[0].infiltration_volume = nil
230
+ # Test defaults w/ SolarAbsorptance
231
+ hpxml.roofs[0].solar_absorptance = 0.99
232
+ hpxml.roofs[0].roof_color = nil
188
233
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
189
234
  hpxml_default = _test_measure()
190
- _test_default_infiltration_values(hpxml_default, 1350 * 8)
235
+ _test_default_roof_values(hpxml_default, true, HPXML::RoofTypeAsphaltShingles, 0.99, HPXML::ColorDark, 0.90, false)
191
236
  end
192
237
 
193
- def test_roofs
238
+ def test_rim_joists
194
239
  # Test inputs not overridden by defaults
195
240
  hpxml = _create_hpxml('base.xml')
196
- hpxml.roofs[0].roof_type = HPXML::RoofTypeMetal
197
- hpxml.roofs[0].solar_absorptance = 0.77
198
- hpxml.roofs[0].roof_color = HPXML::ColorDark
241
+ hpxml.rim_joists[0].siding = HPXML::SidingTypeBrick
242
+ hpxml.rim_joists[0].solar_absorptance = 0.55
243
+ hpxml.rim_joists[0].color = HPXML::ColorLight
244
+ hpxml.rim_joists[0].emittance = 0.88
199
245
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
200
246
  hpxml_default = _test_measure()
201
- _test_default_roof_values(hpxml_default, HPXML::RoofTypeMetal, 0.77, HPXML::ColorDark)
247
+ _test_default_rim_joist_values(hpxml_default, false, HPXML::SidingTypeBrick, 0.55, HPXML::ColorLight, 0.88)
202
248
 
203
- # Test defaults
204
- hpxml.roofs[0].roof_type = nil
205
- hpxml.roofs[0].solar_absorptance = nil
206
- hpxml.roofs[0].roof_color = HPXML::ColorLight
249
+ # Test defaults w/ Color
250
+ hpxml.rim_joists[0].siding = nil
251
+ hpxml.rim_joists[0].solar_absorptance = nil
252
+ hpxml.rim_joists[0].color = HPXML::ColorDark
253
+ hpxml.rim_joists[0].emittance = nil
254
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
255
+ hpxml_default = _test_measure()
256
+ _test_default_rim_joist_values(hpxml_default, true, HPXML::SidingTypeWood, 0.95, HPXML::ColorDark, 0.90)
257
+
258
+ # Test defaults w/ SolarAbsorptance
259
+ hpxml.rim_joists[0].solar_absorptance = 0.99
260
+ hpxml.rim_joists[0].color = nil
207
261
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
208
262
  hpxml_default = _test_measure()
209
- _test_default_roof_values(hpxml_default, HPXML::RoofTypeAsphaltShingles, 0.75, HPXML::ColorLight)
263
+ _test_default_rim_joist_values(hpxml_default, true, HPXML::SidingTypeWood, 0.99, HPXML::ColorDark, 0.90)
210
264
  end
211
265
 
212
266
  def test_walls
@@ -215,36 +269,69 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
215
269
  hpxml.walls[0].siding = HPXML::SidingTypeFiberCement
216
270
  hpxml.walls[0].solar_absorptance = 0.66
217
271
  hpxml.walls[0].color = HPXML::ColorDark
272
+ hpxml.walls[0].emittance = 0.88
218
273
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
219
274
  hpxml_default = _test_measure()
220
- _test_default_wall_values(hpxml_default, HPXML::SidingTypeFiberCement, 0.66, HPXML::ColorDark)
275
+ _test_default_wall_values(hpxml_default, false, HPXML::SidingTypeFiberCement, 0.66, HPXML::ColorDark, 0.88)
221
276
 
222
- # Test defaults
277
+ # Test defaults W/ Color
223
278
  hpxml.walls[0].siding = nil
224
279
  hpxml.walls[0].solar_absorptance = nil
225
280
  hpxml.walls[0].color = HPXML::ColorLight
281
+ hpxml.walls[0].emittance = nil
282
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
283
+ hpxml_default = _test_measure()
284
+ _test_default_wall_values(hpxml_default, true, HPXML::SidingTypeWood, 0.5, HPXML::ColorLight, 0.90)
285
+
286
+ # Test defaults W/ SolarAbsorptance
287
+ hpxml.walls[0].solar_absorptance = 0.99
288
+ hpxml.walls[0].color = nil
226
289
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
227
290
  hpxml_default = _test_measure()
228
- _test_default_wall_values(hpxml_default, HPXML::SidingTypeWood, 0.5, HPXML::ColorLight)
291
+ _test_default_wall_values(hpxml_default, true, HPXML::SidingTypeWood, 0.99, HPXML::ColorDark, 0.90)
229
292
  end
230
293
 
231
- def test_rim_joists
294
+ def test_foundation_walls
232
295
  # Test inputs not overridden by defaults
233
296
  hpxml = _create_hpxml('base.xml')
234
- hpxml.rim_joists[0].siding = HPXML::SidingTypeBrick
235
- hpxml.rim_joists[0].solar_absorptance = 0.55
236
- hpxml.rim_joists[0].color = HPXML::ColorLight
297
+ hpxml.foundation_walls[0].thickness = 7.0
237
298
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
238
299
  hpxml_default = _test_measure()
239
- _test_default_rim_joist_values(hpxml_default, HPXML::SidingTypeBrick, 0.55, HPXML::ColorLight)
300
+ _test_default_foundation_wall_values(hpxml_default, false, 7.0)
240
301
 
241
302
  # Test defaults
242
- hpxml.rim_joists[0].siding = nil
243
- hpxml.rim_joists[0].solar_absorptance = nil
244
- hpxml.rim_joists[0].color = HPXML::ColorDark
303
+ hpxml.foundation_walls[0].thickness = nil
304
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
305
+ hpxml_default = _test_measure()
306
+ _test_default_foundation_wall_values(hpxml_default, true, 8.0)
307
+ end
308
+
309
+ def test_slabs
310
+ # Test inputs not overridden by defaults
311
+ hpxml = _create_hpxml('base.xml')
312
+ hpxml.slabs[0].thickness = 7.0
313
+ hpxml.slabs[0].carpet_r_value = 1.1
314
+ hpxml.slabs[0].carpet_fraction = 0.5
315
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
316
+ hpxml_default = _test_measure()
317
+ _test_default_slab_values(hpxml_default, false, 7.0, 1.1, 0.5)
318
+
319
+ # Test defaults w/ conditioned basement
320
+ hpxml.slabs[0].thickness = nil
321
+ hpxml.slabs[0].carpet_r_value = nil
322
+ hpxml.slabs[0].carpet_fraction = nil
323
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
324
+ hpxml_default = _test_measure()
325
+ _test_default_slab_values(hpxml_default, true, 4.0, 2.0, 0.8)
326
+
327
+ # Test defaults w/ crawlspace
328
+ hpxml = _create_hpxml('base-foundation-unvented-crawlspace.xml')
329
+ hpxml.slabs[0].thickness = nil
330
+ hpxml.slabs[0].carpet_r_value = nil
331
+ hpxml.slabs[0].carpet_fraction = nil
245
332
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
246
333
  hpxml_default = _test_measure()
247
- _test_default_rim_joist_values(hpxml_default, HPXML::SidingTypeWood, 0.95, HPXML::ColorDark)
334
+ _test_default_slab_values(hpxml_default, true, 0.0, 0.0, 0.0)
248
335
  end
249
336
 
250
337
  def test_windows
@@ -258,7 +345,7 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
258
345
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
259
346
  hpxml_default = _test_measure()
260
347
  n_windows = hpxml_default.windows.size
261
- _test_default_window_values(hpxml_default, [0.66] * n_windows, [0.77] * n_windows, [0.5] * n_windows)
348
+ _test_default_window_values(hpxml_default, false, [0.66] * n_windows, [0.77] * n_windows, [0.5] * n_windows)
262
349
 
263
350
  # Test defaults
264
351
  hpxml.windows.each do |window|
@@ -269,7 +356,7 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
269
356
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
270
357
  hpxml_default = _test_measure()
271
358
  n_windows = hpxml_default.windows.size
272
- _test_default_window_values(hpxml_default, [0.7] * n_windows, [0.85] * n_windows, [0.67] * n_windows)
359
+ _test_default_window_values(hpxml_default, true, [0.7] * n_windows, [0.85] * n_windows, [0.67] * n_windows)
273
360
  end
274
361
 
275
362
  def test_skylights
@@ -282,7 +369,7 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
282
369
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
283
370
  hpxml_default = _test_measure()
284
371
  n_skylights = hpxml_default.skylights.size
285
- _test_default_skylight_values(hpxml_default, [0.66] * n_skylights, [0.77] * n_skylights)
372
+ _test_default_skylight_values(hpxml_default, false, [0.66] * n_skylights, [0.77] * n_skylights)
286
373
 
287
374
  # Test defaults
288
375
  hpxml.skylights.each do |skylight|
@@ -292,24 +379,103 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
292
379
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
293
380
  hpxml_default = _test_measure()
294
381
  n_skylights = hpxml_default.skylights.size
295
- _test_default_skylight_values(hpxml_default, [1.0] * n_skylights, [1.0] * n_skylights)
382
+ _test_default_skylight_values(hpxml_default, true, [1.0] * n_skylights, [1.0] * n_skylights)
296
383
  end
297
384
 
298
- def test_air_conditioners
385
+ def test_central_air_conditioners
299
386
  # Test inputs not overridden by defaults
300
- hpxml = _create_hpxml('base.xml')
387
+ hpxml = _create_hpxml('base-hvac-central-ac-only-1-speed.xml')
301
388
  hpxml.cooling_systems[0].cooling_shr = 0.88
302
389
  hpxml.cooling_systems[0].compressor_type = HPXML::HVACCompressorTypeVariableSpeed
390
+ hpxml.cooling_systems[0].fan_watts_per_cfm = 0.66
303
391
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
304
392
  hpxml_default = _test_measure()
305
- _test_default_air_conditioner_values(hpxml_default, 0.88, HPXML::HVACCompressorTypeVariableSpeed)
393
+ _test_default_central_air_conditioner_values(hpxml_default, false, 0.88, HPXML::HVACCompressorTypeVariableSpeed, 0.66)
306
394
 
307
395
  # Test defaults
308
396
  hpxml.cooling_systems[0].cooling_shr = nil
309
397
  hpxml.cooling_systems[0].compressor_type = nil
398
+ hpxml.cooling_systems[0].fan_watts_per_cfm = nil
399
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
400
+ hpxml_default = _test_measure()
401
+ _test_default_central_air_conditioner_values(hpxml_default, true, 0.73, HPXML::HVACCompressorTypeSingleStage, 0.5)
402
+ end
403
+
404
+ def test_room_air_conditioners
405
+ # Test inputs not overridden by defaults
406
+ hpxml = _create_hpxml('base-hvac-room-ac-only.xml')
407
+ hpxml.cooling_systems[0].cooling_shr = 0.88
408
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
409
+ hpxml_default = _test_measure()
410
+ _test_default_room_air_conditioner_values(hpxml_default, false, 0.88)
411
+
412
+ # Test defaults
413
+ hpxml.cooling_systems[0].cooling_shr = nil
414
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
415
+ hpxml_default = _test_measure()
416
+ _test_default_room_air_conditioner_values(hpxml_default, true, 0.65)
417
+ end
418
+
419
+ def test_mini_split_air_conditioners
420
+ # Test inputs not overridden by defaults
421
+ hpxml = _create_hpxml('base-hvac-mini-split-air-conditioner-only-ducted.xml')
422
+ hpxml.cooling_systems[0].cooling_shr = 0.78
423
+ hpxml.cooling_systems[0].fan_watts_per_cfm = 0.66
424
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
425
+ hpxml_default = _test_measure()
426
+ _test_default_mini_split_air_conditioner_values(hpxml_default, false, 0.78, 0.66)
427
+
428
+ # Test defaults
429
+ hpxml.cooling_systems[0].cooling_shr = nil
430
+ hpxml.cooling_systems[0].fan_watts_per_cfm = nil
431
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
432
+ hpxml_default = _test_measure()
433
+ _test_default_mini_split_air_conditioner_values(hpxml_default, true, 0.73, 0.18)
434
+ end
435
+
436
+ def test_furnaces
437
+ # Test inputs not overridden by defaults
438
+ hpxml = _create_hpxml('base.xml')
439
+ hpxml.heating_systems[0].fan_watts_per_cfm = 0.66
440
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
441
+ hpxml_default = _test_measure()
442
+ _test_default_furnace_values(hpxml_default, false, 0.66)
443
+
444
+ # Test defaults
445
+ hpxml.heating_systems[0].fan_watts_per_cfm = nil
446
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
447
+ hpxml_default = _test_measure()
448
+ _test_default_furnace_values(hpxml_default, true, 0.375)
449
+ end
450
+
451
+ def test_wall_furnaces
452
+ # Test inputs not overridden by defaults
453
+ hpxml = _create_hpxml('base-hvac-wall-furnace-elec-only.xml')
454
+ hpxml.heating_systems[0].fan_watts = 22
455
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
456
+ hpxml_default = _test_measure()
457
+ _test_default_wall_furnace_values(hpxml_default, false, 22)
458
+
459
+ # Test defaults
460
+ hpxml.heating_systems[0].fan_watts = nil
461
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
462
+ hpxml_default = _test_measure()
463
+ _test_default_wall_furnace_values(hpxml_default, true, 0)
464
+ end
465
+
466
+ def test_floor_furnaces
467
+ # Test inputs not overridden by defaults
468
+ hpxml = _create_hpxml('base-hvac-floor-furnace-propane-only.xml')
469
+ hpxml.heating_systems[0].fan_watts = 22
470
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
471
+ hpxml_default = _test_measure()
472
+ _test_default_floor_furnace_values(hpxml_default, false, 22)
473
+
474
+ # Test defaults
475
+ hpxml.heating_systems[0].fan_watts = nil
310
476
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
311
477
  hpxml_default = _test_measure()
312
- _test_default_air_conditioner_values(hpxml_default, 0.73, HPXML::HVACCompressorTypeSingleStage)
478
+ _test_default_floor_furnace_values(hpxml_default, true, 0)
313
479
  end
314
480
 
315
481
  def test_boilers
@@ -318,49 +484,163 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
318
484
  hpxml.heating_systems[0].electric_auxiliary_energy = 99.9
319
485
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
320
486
  hpxml_default = _test_measure()
321
- _test_default_boiler_values(hpxml_default, 99.9)
487
+ _test_default_boiler_values(hpxml_default, false, 99.9)
322
488
 
323
489
  # Test defaults w/ in-unit boiler
324
490
  hpxml.heating_systems[0].electric_auxiliary_energy = nil
325
491
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
326
492
  hpxml_default = _test_measure()
327
- _test_default_boiler_values(hpxml_default, 170.0)
493
+ _test_default_boiler_values(hpxml_default, true, 170.0)
328
494
 
329
495
  # Test inputs not overridden by defaults (shared boiler)
330
- hpxml = _create_hpxml('base-hvac-shared-boiler-only-baseboard.xml')
496
+ hpxml = _create_hpxml('base-bldgtype-multifamily-shared-boiler-only-baseboard.xml')
331
497
  hpxml.heating_systems[0].shared_loop_watts = nil
332
498
  hpxml.heating_systems[0].electric_auxiliary_energy = 99.9
333
499
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
334
500
  hpxml_default = _test_measure()
335
- _test_default_boiler_values(hpxml_default, 99.9)
501
+ _test_default_boiler_values(hpxml_default, false, 99.9)
336
502
 
337
503
  # Test defaults w/ shared boiler
338
504
  hpxml.heating_systems[0].electric_auxiliary_energy = nil
339
505
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
340
506
  hpxml_default = _test_measure()
341
- _test_default_boiler_values(hpxml_default, 220.0)
507
+ _test_default_boiler_values(hpxml_default, true, 220.0)
508
+ end
509
+
510
+ def test_stoves
511
+ # Test inputs not overridden by defaults
512
+ hpxml = _create_hpxml('base-hvac-stove-oil-only.xml')
513
+ hpxml.heating_systems[0].fan_watts = 22
514
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
515
+ hpxml_default = _test_measure()
516
+ _test_default_stove_values(hpxml_default, false, 22)
517
+
518
+ # Test defaults
519
+ hpxml.heating_systems[0].fan_watts = nil
520
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
521
+ hpxml_default = _test_measure()
522
+ _test_default_stove_values(hpxml_default, true, 40)
523
+ end
524
+
525
+ def test_portable_heaters
526
+ # Test inputs not overridden by defaults
527
+ hpxml = _create_hpxml('base-hvac-portable-heater-gas-only.xml')
528
+ hpxml.heating_systems[0].fan_watts = 22
529
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
530
+ hpxml_default = _test_measure()
531
+ _test_default_portable_heater_values(hpxml_default, false, 22)
532
+
533
+ # Test defaults
534
+ hpxml.heating_systems[0].fan_watts = nil
535
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
536
+ hpxml_default = _test_measure()
537
+ _test_default_portable_heater_values(hpxml_default, true, 0)
538
+ end
539
+
540
+ def test_fixed_heaters
541
+ # Test inputs not overridden by defaults
542
+ hpxml = _create_hpxml('base-hvac-fixed-heater-gas-only.xml')
543
+ hpxml.heating_systems[0].fan_watts = 22
544
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
545
+ hpxml_default = _test_measure()
546
+ _test_default_fixed_heater_values(hpxml_default, false, 22)
547
+
548
+ # Test defaults
549
+ hpxml.heating_systems[0].fan_watts = nil
550
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
551
+ hpxml_default = _test_measure()
552
+ _test_default_fixed_heater_values(hpxml_default, true, 0)
553
+ end
554
+
555
+ def test_fireplaces
556
+ # Test inputs not overridden by defaults
557
+ hpxml = _create_hpxml('base-hvac-fireplace-wood-only.xml')
558
+ hpxml.heating_systems[0].fan_watts = 22
559
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
560
+ hpxml_default = _test_measure()
561
+ _test_default_fireplace_values(hpxml_default, false, 22)
562
+
563
+ # Test defaults
564
+ hpxml.heating_systems[0].fan_watts = nil
565
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
566
+ hpxml_default = _test_measure()
567
+ _test_default_fireplace_values(hpxml_default, true, 0)
568
+ end
569
+
570
+ def test_air_source_heat_pumps
571
+ # Test inputs not overridden by defaults
572
+ hpxml = _create_hpxml('base-hvac-air-to-air-heat-pump-1-speed.xml')
573
+ hpxml.heat_pumps[0].cooling_shr = 0.88
574
+ hpxml.heat_pumps[0].compressor_type = HPXML::HVACCompressorTypeVariableSpeed
575
+ hpxml.heat_pumps[0].fan_watts_per_cfm = 0.66
576
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
577
+ hpxml_default = _test_measure()
578
+ _test_default_air_to_air_heat_pump_values(hpxml_default, false, 0.88, HPXML::HVACCompressorTypeVariableSpeed, 0.66)
579
+
580
+ # Test defaults
581
+ hpxml.heat_pumps[0].cooling_shr = nil
582
+ hpxml.heat_pumps[0].compressor_type = nil
583
+ hpxml.heat_pumps[0].fan_watts_per_cfm = nil
584
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
585
+ hpxml_default = _test_measure()
586
+ _test_default_air_to_air_heat_pump_values(hpxml_default, true, 0.73, HPXML::HVACCompressorTypeSingleStage, 0.5)
587
+ end
588
+
589
+ def test_mini_split_heat_pumps
590
+ # Test inputs not overridden by defaults
591
+ hpxml = _create_hpxml('base-hvac-mini-split-heat-pump-ducted.xml')
592
+ hpxml.heat_pumps[0].cooling_shr = 0.78
593
+ hpxml.heat_pumps[0].fan_watts_per_cfm = 0.66
594
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
595
+ hpxml_default = _test_measure()
596
+ _test_default_mini_split_heat_pump_values(hpxml_default, false, 0.78, 0.66)
597
+
598
+ # Test defaults
599
+ hpxml.heat_pumps[0].cooling_shr = nil
600
+ hpxml.heat_pumps[0].fan_watts_per_cfm = nil
601
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
602
+ hpxml_default = _test_measure()
603
+ _test_default_mini_split_heat_pump_values(hpxml_default, true, 0.73, 0.18)
342
604
  end
343
605
 
344
- def test_ground_source_heat_pumps
606
+ def test_ground_to_air_heat_pumps
345
607
  # Test inputs not overridden by defaults
346
608
  hpxml = _create_hpxml('base-hvac-ground-to-air-heat-pump.xml')
347
609
  hpxml.heat_pumps[0].pump_watts_per_ton = 9.9
348
610
  hpxml.heat_pumps[0].fan_watts_per_cfm = 0.99
349
611
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
350
612
  hpxml_default = _test_measure()
351
- _test_default_gshp_values(hpxml_default, 9.9, 0.99)
613
+ _test_default_ground_to_air_heat_pump_values(hpxml_default, false, 9.9, 0.99)
352
614
 
353
615
  # Test defaults
354
616
  hpxml.heat_pumps[0].pump_watts_per_ton = nil
355
617
  hpxml.heat_pumps[0].fan_watts_per_cfm = nil
356
618
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
357
619
  hpxml_default = _test_measure()
358
- _test_default_gshp_values(hpxml_default, 30.0, 0.5)
620
+ _test_default_ground_to_air_heat_pump_values(hpxml_default, true, 30.0, 0.375)
621
+ end
622
+
623
+ def test_hvac_controls
624
+ # Test inputs not overridden by defaults
625
+ hpxml = _create_hpxml('base-hvac-programmable-thermostat.xml')
626
+ hpxml.hvac_controls[0].heating_setback_start_hour = 12
627
+ hpxml.hvac_controls[0].cooling_setup_start_hour = 12
628
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
629
+ hpxml_default = _test_measure()
630
+ _test_default_hvac_control_values(hpxml_default, false, 12, 12)
631
+
632
+ # Test defaults
633
+ hpxml.hvac_controls[0].heating_setback_start_hour = nil
634
+ hpxml.hvac_controls[0].cooling_setup_start_hour = nil
635
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
636
+ hpxml_default = _test_measure()
637
+ _test_default_hvac_control_values(hpxml_default, true, 23, 9)
359
638
  end
360
639
 
361
640
  def test_hvac_distribution
362
641
  # Test inputs not overridden by defaults
363
642
  hpxml = _create_hpxml('base.xml')
643
+ hpxml.hvac_distributions[0].number_of_return_registers = hpxml.building_construction.number_of_conditioned_floors
364
644
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
365
645
  hpxml_default = _test_measure()
366
646
  expected_supply_locations = ['attic - unvented']
@@ -368,9 +648,10 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
368
648
  expected_supply_areas = [150.0]
369
649
  expected_return_areas = [50.0]
370
650
  expected_n_return_registers = hpxml_default.building_construction.number_of_conditioned_floors
371
- _test_default_duct_values(hpxml_default, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
651
+ _test_default_duct_values(hpxml_default, false, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
372
652
 
373
653
  # Test defaults w/ conditioned basement
654
+ hpxml.hvac_distributions[0].number_of_return_registers = nil
374
655
  hpxml.hvac_distributions.each do |hvac_distribution|
375
656
  hvac_distribution.ducts.each do |duct|
376
657
  duct.duct_location = nil
@@ -384,7 +665,7 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
384
665
  expected_supply_areas = [729.0]
385
666
  expected_return_areas = [270.0]
386
667
  expected_n_return_registers = hpxml_default.building_construction.number_of_conditioned_floors
387
- _test_default_duct_values(hpxml_default, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
668
+ _test_default_duct_values(hpxml_default, true, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
388
669
 
389
670
  # Test defaults w/ multiple foundations
390
671
  hpxml = _create_hpxml('base-foundation-multiple.xml')
@@ -401,7 +682,7 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
401
682
  expected_supply_areas = [364.5]
402
683
  expected_return_areas = [67.5]
403
684
  expected_n_return_registers = hpxml_default.building_construction.number_of_conditioned_floors
404
- _test_default_duct_values(hpxml_default, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
685
+ _test_default_duct_values(hpxml_default, true, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
405
686
 
406
687
  # Test defaults w/ foundation exposed to ambient
407
688
  hpxml = _create_hpxml('base-foundation-ambient.xml')
@@ -418,10 +699,10 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
418
699
  expected_supply_areas = [364.5]
419
700
  expected_return_areas = [67.5]
420
701
  expected_n_return_registers = hpxml_default.building_construction.number_of_conditioned_floors
421
- _test_default_duct_values(hpxml_default, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
702
+ _test_default_duct_values(hpxml_default, true, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
422
703
 
423
704
  # Test defaults w/ building/unit adjacent to other housing unit
424
- hpxml = _create_hpxml('base-enclosure-other-housing-unit.xml')
705
+ hpxml = _create_hpxml('base-bldgtype-multifamily-adjacent-to-other-housing-unit.xml')
425
706
  hpxml.hvac_distributions.each do |hvac_distribution|
426
707
  hvac_distribution.ducts.each do |duct|
427
708
  duct.duct_location = nil
@@ -432,10 +713,10 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
432
713
  hpxml_default = _test_measure()
433
714
  expected_supply_locations = ['living space']
434
715
  expected_return_locations = ['living space']
435
- expected_supply_areas = [364.5]
436
- expected_return_areas = [67.5]
716
+ expected_supply_areas = [243.0]
717
+ expected_return_areas = [45.0]
437
718
  expected_n_return_registers = hpxml_default.building_construction.number_of_conditioned_floors
438
- _test_default_duct_values(hpxml_default, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
719
+ _test_default_duct_values(hpxml_default, true, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
439
720
 
440
721
  # Test defaults w/ 2-story building
441
722
  hpxml = _create_hpxml('base-enclosure-2stories.xml')
@@ -452,7 +733,7 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
452
733
  expected_supply_areas = [820.13, 273.38]
453
734
  expected_return_areas = [455.63, 151.88]
454
735
  expected_n_return_registers = hpxml_default.building_construction.number_of_conditioned_floors
455
- _test_default_duct_values(hpxml_default, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
736
+ _test_default_duct_values(hpxml_default, true, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
456
737
 
457
738
  # Test defaults w/ 1-story building & multiple HVAC systems
458
739
  hpxml = _create_hpxml('base-hvac-multiple.xml')
@@ -469,7 +750,7 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
469
750
  expected_supply_areas = [91.125, 91.125] * hpxml_default.hvac_distributions.size
470
751
  expected_return_areas = [33.75, 33.75] * hpxml_default.hvac_distributions.size
471
752
  expected_n_return_registers = hpxml_default.building_construction.number_of_conditioned_floors
472
- _test_default_duct_values(hpxml_default, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
753
+ _test_default_duct_values(hpxml_default, true, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
473
754
 
474
755
  # Test defaults w/ 2-story building & multiple HVAC systems
475
756
  hpxml = _create_hpxml('base-hvac-multiple.xml')
@@ -487,146 +768,260 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
487
768
  expected_supply_areas = [68.34, 68.34, 22.78, 22.78] * hpxml_default.hvac_distributions.size
488
769
  expected_return_areas = [25.31, 25.31, 8.44, 8.44] * hpxml_default.hvac_distributions.size
489
770
  expected_n_return_registers = hpxml_default.building_construction.number_of_conditioned_floors
490
- _test_default_duct_values(hpxml_default, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
771
+ _test_default_duct_values(hpxml_default, true, expected_supply_locations, expected_return_locations, expected_supply_areas, expected_return_areas, expected_n_return_registers)
491
772
  end
492
773
 
493
- def test_water_heaters
774
+ def test_mech_ventilation_fans
494
775
  # Test inputs not overridden by defaults
495
- hpxml = _create_hpxml('base.xml')
776
+ hpxml = _create_hpxml('base-mechvent-exhaust.xml')
496
777
  hpxml.building_construction.residential_facility_type = HPXML::ResidentialTypeSFA
497
- hpxml.water_heating_systems.each do |wh|
498
- wh.is_shared_system = true
499
- wh.number_of_units_served = 2
500
- wh.heating_capacity = 15000.0
501
- wh.tank_volume = 40.0
502
- wh.recovery_efficiency = 0.95
503
- end
778
+ vent_fan = hpxml.ventilation_fans.select { |f| f.used_for_whole_building_ventilation }[0]
779
+ vent_fan.is_shared_system = true
780
+ vent_fan.fraction_recirculation = 0.0
781
+ vent_fan.in_unit_flow_rate = 10.0
782
+ vent_fan.hours_in_operation = 22.0
504
783
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
505
784
  hpxml_default = _test_measure()
506
- _test_default_water_heater_values(hpxml_default, [true, 15000.0, 40.0, 0.95])
785
+ _test_default_mech_vent_values(hpxml_default, false, true, 22.0)
507
786
 
508
- # Test defaults w/ 3-bedroom house & electric storage water heater
509
- hpxml.water_heating_systems.each do |water_heating_system|
510
- water_heating_system.is_shared_system = nil
511
- next unless water_heating_system.water_heater_type == HPXML::WaterHeaterTypeStorage
512
-
513
- water_heating_system.heating_capacity = nil
514
- water_heating_system.tank_volume = nil
515
- water_heating_system.recovery_efficiency = nil
516
- end
787
+ # Test defaults
788
+ vent_fan.rated_flow_rate = nil
789
+ vent_fan.start_hour = nil
790
+ vent_fan.quantity = nil
791
+ vent_fan.is_shared_system = nil
792
+ vent_fan.fraction_recirculation = nil
793
+ vent_fan.in_unit_flow_rate = nil
794
+ vent_fan.hours_in_operation = nil
517
795
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
518
796
  hpxml_default = _test_measure()
519
- _test_default_water_heater_values(hpxml_default, [false, 18766.7, 50.0, 0.98])
520
-
521
- # Test defaults w/ 5-bedroom house & electric storage water heater
522
- hpxml = _create_hpxml('base-enclosure-beds-5.xml')
523
- hpxml.water_heating_systems.each do |water_heating_system|
524
- water_heating_system.is_shared_system = nil
525
- next unless water_heating_system.water_heater_type == HPXML::WaterHeaterTypeStorage
797
+ _test_default_mech_vent_values(hpxml_default, true, false, 24.0)
526
798
 
527
- water_heating_system.heating_capacity = nil
528
- water_heating_system.tank_volume = nil
529
- water_heating_system.recovery_efficiency = nil
530
- end
799
+ # Test inputs not overridden by defaults w/ CFIS
800
+ hpxml = _create_hpxml('base-mechvent-cfis.xml')
801
+ vent_fan = hpxml.ventilation_fans.select { |f| f.used_for_whole_building_ventilation }[0]
802
+ vent_fan.is_shared_system = false
803
+ vent_fan.hours_in_operation = 12.0
531
804
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
532
805
  hpxml_default = _test_measure()
533
- _test_default_water_heater_values(hpxml_default, [false, 18766.7, 66.0, 0.98])
534
-
535
- # Test defaults w/ 3-bedroom house & 2 storage water heaters (1 electric and 1 natural gas)
536
- hpxml = _create_hpxml('base-dhw-multiple.xml')
537
- hpxml.water_heating_systems.each do |water_heating_system|
538
- water_heating_system.is_shared_system = nil
539
- next unless water_heating_system.water_heater_type == HPXML::WaterHeaterTypeStorage
806
+ _test_default_mech_vent_values(hpxml_default, false, false, 12.0)
540
807
 
541
- water_heating_system.heating_capacity = nil
542
- water_heating_system.tank_volume = nil
543
- water_heating_system.recovery_efficiency = nil
544
- end
808
+ # Test defaults w/ CFIS
809
+ vent_fan.is_shared_system = nil
810
+ vent_fan.hours_in_operation = nil
545
811
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
546
812
  hpxml_default = _test_measure()
547
- _test_default_water_heater_values(hpxml_default, [false, 15354.6, 50.0, 0.98],
548
- [false, 36000.0, 40.0, 0.756])
813
+ _test_default_mech_vent_values(hpxml_default, true, false, 8.0)
549
814
  end
550
815
 
551
- def test_hot_water_distribution
552
- # Test inputs not overridden by defaults -- standard
553
- hpxml = _create_hpxml('base.xml')
554
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
555
- hpxml_default = _test_measure()
556
- _test_default_standard_distribution_values(hpxml_default, 50.0)
557
-
558
- # Test inputs not overridden by defaults -- recirculation
559
- hpxml = _create_hpxml('base-dhw-recirc-demand.xml')
560
- hpxml.hot_water_distributions[0].recirculation_pump_power = 65.0
561
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
562
- hpxml_default = _test_measure()
563
- _test_default_recirc_distribution_values(hpxml_default, 50.0, 50.0, 65.0)
564
-
565
- # Test inputs not overridden by defaults -- shared recirculation
566
- hpxml = _create_hpxml('base-dhw-shared-water-heater-recirc.xml')
567
- hpxml.hot_water_distributions[0].shared_recirculation_pump_power = 333.0
568
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
569
- hpxml_default = _test_measure()
570
- _test_default_shared_recirc_distribution_values(hpxml_default, 333.0)
816
+ def test_local_ventilation_fans
817
+ # Test inputs not overridden by defaults
818
+ hpxml = _create_hpxml('base-mechvent-bath-kitchen-fans.xml')
819
+ kitchen_fan = hpxml.ventilation_fans.select { |f| f.used_for_local_ventilation && f.fan_location == HPXML::LocationKitchen }[0]
820
+ kitchen_fan.rated_flow_rate = 300
821
+ kitchen_fan.fan_power = 20
822
+ kitchen_fan.start_hour = 12
823
+ kitchen_fan.quantity = 2
824
+ kitchen_fan.hours_in_operation = 2
825
+ bath_fan = hpxml.ventilation_fans.select { |f| f.used_for_local_ventilation && f.fan_location == HPXML::LocationBath }[0]
826
+ bath_fan.rated_flow_rate = 80
827
+ bath_fan.fan_power = 33
828
+ bath_fan.start_hour = 6
829
+ bath_fan.quantity = 3
830
+ bath_fan.hours_in_operation = 3
831
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
832
+ hpxml_default = _test_measure()
833
+ _test_default_kitchen_fan_values(hpxml_default, false, 2, 300, 2, 20, 12)
834
+ _test_default_bath_fan_values(hpxml_default, false, 3, 80, 3, 33, 6)
835
+
836
+ # Test defaults
837
+ kitchen_fan.rated_flow_rate = nil
838
+ kitchen_fan.fan_power = nil
839
+ kitchen_fan.start_hour = nil
840
+ kitchen_fan.quantity = nil
841
+ kitchen_fan.hours_in_operation = nil
842
+ bath_fan.rated_flow_rate = nil
843
+ bath_fan.fan_power = nil
844
+ bath_fan.start_hour = nil
845
+ bath_fan.quantity = nil
846
+ bath_fan.hours_in_operation = nil
847
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
848
+ hpxml_default = _test_measure()
849
+ _test_default_kitchen_fan_values(hpxml_default, true, 1, 100, 1, 30, 18)
850
+ _test_default_bath_fan_values(hpxml_default, true, 2, 50, 1, 15, 7)
851
+ end
852
+
853
+ def test_storage_water_heaters
854
+ # Test inputs not overridden by defaults
855
+ hpxml = _create_hpxml('base.xml')
856
+ hpxml.building_construction.residential_facility_type = HPXML::ResidentialTypeSFA
857
+ hpxml.water_heating_systems.each do |wh|
858
+ wh.is_shared_system = true
859
+ wh.number_of_units_served = 2
860
+ wh.heating_capacity = 15000.0
861
+ wh.tank_volume = 40.0
862
+ wh.recovery_efficiency = 0.95
863
+ wh.location = HPXML::LocationLivingSpace
864
+ wh.temperature = 111
865
+ end
866
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
867
+ hpxml_default = _test_measure()
868
+ _test_default_storage_water_heater_values(hpxml_default, false,
869
+ [true, 15000.0, 40.0, 0.95, HPXML::LocationLivingSpace, 111])
870
+
871
+ # Test defaults w/ 3-bedroom house & electric storage water heater
872
+ hpxml.water_heating_systems.each do |wh|
873
+ wh.is_shared_system = nil
874
+ wh.heating_capacity = nil
875
+ wh.tank_volume = nil
876
+ wh.recovery_efficiency = nil
877
+ wh.location = nil
878
+ wh.temperature = nil
879
+ end
880
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
881
+ hpxml_default = _test_measure()
882
+ _test_default_storage_water_heater_values(hpxml_default, true,
883
+ [false, 18766.7, 50.0, 0.98, HPXML::LocationBasementConditioned, 125])
884
+
885
+ # Test defaults w/ 5-bedroom house & electric storage water heater
886
+ hpxml = _create_hpxml('base-enclosure-beds-5.xml')
887
+ hpxml.water_heating_systems.each do |wh|
888
+ wh.is_shared_system = nil
889
+ wh.heating_capacity = nil
890
+ wh.tank_volume = nil
891
+ wh.recovery_efficiency = nil
892
+ wh.location = nil
893
+ wh.temperature = nil
894
+ end
895
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
896
+ hpxml_default = _test_measure()
897
+ _test_default_storage_water_heater_values(hpxml_default, true,
898
+ [false, 18766.7, 66.0, 0.98, HPXML::LocationBasementConditioned, 125])
899
+
900
+ # Test defaults w/ 3-bedroom house & 2 storage water heaters (1 electric and 1 natural gas)
901
+ hpxml = _create_hpxml('base-dhw-multiple.xml')
902
+ hpxml.water_heating_systems.each do |wh|
903
+ wh.is_shared_system = nil
904
+ next unless wh.water_heater_type == HPXML::WaterHeaterTypeStorage
905
+
906
+ wh.heating_capacity = nil
907
+ wh.tank_volume = nil
908
+ wh.recovery_efficiency = nil
909
+ wh.location = nil
910
+ wh.temperature = nil
911
+ end
912
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
913
+ hpxml_default = _test_measure()
914
+ _test_default_storage_water_heater_values(hpxml_default, true,
915
+ [false, 15354.6, 50.0, 0.98, HPXML::LocationBasementConditioned, 125],
916
+ [false, 36000.0, 40.0, 0.756, HPXML::LocationBasementConditioned, 125])
917
+ end
918
+
919
+ def test_tankless_water_heaters
920
+ # Test inputs not overridden by defaults
921
+ hpxml = _create_hpxml('base-dhw-tankless-gas.xml')
922
+ hpxml.water_heating_systems[0].performance_adjustment = 0.88
923
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
924
+ hpxml_default = _test_measure()
925
+ _test_default_tankless_water_heater_values(hpxml_default, false, [0.88])
926
+
927
+ # Test defaults w/ EF
928
+ hpxml.water_heating_systems[0].performance_adjustment = nil
929
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
930
+ hpxml_default = _test_measure()
931
+ _test_default_tankless_water_heater_values(hpxml_default, true, [0.92])
932
+
933
+ # Test defaults w/ UEF
934
+ hpxml.water_heating_systems[0].energy_factor = nil
935
+ hpxml.water_heating_systems[0].uniform_energy_factor = 0.93
936
+ hpxml.water_heating_systems[0].first_hour_rating = 5.7
937
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
938
+ hpxml_default = _test_measure()
939
+ _test_default_tankless_water_heater_values(hpxml_default, true, [0.94])
940
+ end
941
+
942
+ def test_hot_water_distribution
943
+ # Test inputs not overridden by defaults -- standard
944
+ hpxml = _create_hpxml('base.xml')
945
+ hpxml.hot_water_distributions[0].pipe_r_value = 2.5
946
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
947
+ hpxml_default = _test_measure()
948
+ _test_default_standard_distribution_values(hpxml_default, false, 50.0, 2.5)
949
+
950
+ # Test inputs not overridden by defaults -- recirculation
951
+ hpxml = _create_hpxml('base-dhw-recirc-demand.xml')
952
+ hpxml.hot_water_distributions[0].recirculation_pump_power = 65.0
953
+ hpxml.hot_water_distributions[0].pipe_r_value = 2.5
954
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
955
+ hpxml_default = _test_measure()
956
+ _test_default_recirc_distribution_values(hpxml_default, false, 50.0, 50.0, 65.0, 2.5)
957
+
958
+ # Test inputs not overridden by defaults -- shared recirculation
959
+ hpxml = _create_hpxml('base-bldgtype-multifamily-shared-water-heater-recirc.xml')
960
+ hpxml.hot_water_distributions[0].shared_recirculation_pump_power = 333.0
961
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
962
+ hpxml_default = _test_measure()
963
+ _test_default_shared_recirc_distribution_values(hpxml_default, false, 333.0)
571
964
 
572
965
  # Test defaults w/ conditioned basement
573
966
  hpxml = _create_hpxml('base.xml')
574
967
  hpxml.hot_water_distributions[0].standard_piping_length = nil
968
+ hpxml.hot_water_distributions[0].pipe_r_value = nil
575
969
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
576
970
  hpxml_default = _test_measure()
577
- _test_default_standard_distribution_values(hpxml_default, 93.48)
971
+ _test_default_standard_distribution_values(hpxml_default, true, 93.48, 0.0)
578
972
 
579
973
  # Test defaults w/ unconditioned basement
580
974
  hpxml = _create_hpxml('base-foundation-unconditioned-basement.xml')
581
975
  hpxml.hot_water_distributions[0].standard_piping_length = nil
976
+ hpxml.hot_water_distributions[0].pipe_r_value = nil
582
977
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
583
978
  hpxml_default = _test_measure()
584
- _test_default_standard_distribution_values(hpxml_default, 88.48)
979
+ _test_default_standard_distribution_values(hpxml_default, true, 88.48, 0.0)
585
980
 
586
981
  # Test defaults w/ 2-story building
587
982
  hpxml = _create_hpxml('base-enclosure-2stories.xml')
588
983
  hpxml.hot_water_distributions[0].standard_piping_length = nil
984
+ hpxml.hot_water_distributions[0].pipe_r_value = nil
589
985
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
590
986
  hpxml_default = _test_measure()
591
- _test_default_standard_distribution_values(hpxml_default, 103.48)
987
+ _test_default_standard_distribution_values(hpxml_default, true, 103.48, 0.0)
592
988
 
593
989
  # Test defaults w/ recirculation & conditioned basement
594
990
  hpxml = _create_hpxml('base-dhw-recirc-demand.xml')
595
991
  hpxml.hot_water_distributions[0].recirculation_piping_length = nil
596
992
  hpxml.hot_water_distributions[0].recirculation_branch_piping_length = nil
597
993
  hpxml.hot_water_distributions[0].recirculation_pump_power = nil
994
+ hpxml.hot_water_distributions[0].pipe_r_value = nil
598
995
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
599
996
  hpxml_default = _test_measure()
600
- _test_default_recirc_distribution_values(hpxml_default, 166.96, 10.0, 50.0)
997
+ _test_default_recirc_distribution_values(hpxml_default, true, 166.96, 10.0, 50.0, 0.0)
601
998
 
602
999
  # Test defaults w/ recirculation & unconditioned basement
603
1000
  hpxml = _create_hpxml('base-foundation-unconditioned-basement.xml')
604
1001
  hpxml.hot_water_distributions.clear
605
1002
  hpxml.hot_water_distributions.add(id: 'HotWaterDistribution',
606
1003
  system_type: HPXML::DHWDistTypeRecirc,
607
- recirculation_control_type: HPXML::DHWRecirControlTypeSensor,
608
- pipe_r_value: 3.0)
1004
+ recirculation_control_type: HPXML::DHWRecirControlTypeSensor)
609
1005
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
610
1006
  hpxml_default = _test_measure()
611
- _test_default_recirc_distribution_values(hpxml_default, 156.96, 10.0, 50.0)
1007
+ _test_default_recirc_distribution_values(hpxml_default, true, 156.96, 10.0, 50.0, 0.0)
612
1008
 
613
1009
  # Test defaults w/ recirculation & 2-story building
614
1010
  hpxml = _create_hpxml('base-enclosure-2stories.xml')
615
1011
  hpxml.hot_water_distributions.clear
616
1012
  hpxml.hot_water_distributions.add(id: 'HotWaterDistribution',
617
1013
  system_type: HPXML::DHWDistTypeRecirc,
618
- recirculation_control_type: HPXML::DHWRecirControlTypeSensor,
619
- pipe_r_value: 3.0)
1014
+ recirculation_control_type: HPXML::DHWRecirControlTypeSensor)
620
1015
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
621
1016
  hpxml_default = _test_measure()
622
- _test_default_recirc_distribution_values(hpxml_default, 186.96, 10.0, 50.0)
1017
+ _test_default_recirc_distribution_values(hpxml_default, true, 186.96, 10.0, 50.0, 0.0)
623
1018
 
624
1019
  # Test defaults w/ shared recirculation
625
- hpxml = _create_hpxml('base-dhw-shared-water-heater-recirc.xml')
1020
+ hpxml = _create_hpxml('base-bldgtype-multifamily-shared-water-heater-recirc.xml')
626
1021
  hpxml.hot_water_distributions[0].shared_recirculation_pump_power = nil
627
1022
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
628
1023
  hpxml_default = _test_measure()
629
- _test_default_shared_recirc_distribution_values(hpxml_default, 220.0)
1024
+ _test_default_shared_recirc_distribution_values(hpxml_default, true, 220.0)
630
1025
  end
631
1026
 
632
1027
  def test_water_fixtures
@@ -635,13 +1030,13 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
635
1030
  hpxml.water_heating.water_fixtures_usage_multiplier = 2.0
636
1031
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
637
1032
  hpxml_default = _test_measure()
638
- _test_default_water_fixture_values(hpxml_default, 2.0)
1033
+ _test_default_water_fixture_values(hpxml_default, false, 2.0)
639
1034
 
640
1035
  # Test defaults
641
1036
  hpxml.water_heating.water_fixtures_usage_multiplier = nil
642
1037
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
643
1038
  hpxml_default = _test_measure()
644
- _test_default_water_fixture_values(hpxml_default, 1.0)
1039
+ _test_default_water_fixture_values(hpxml_default, true, 1.0)
645
1040
  end
646
1041
 
647
1042
  def test_solar_thermal_systems
@@ -650,85 +1045,178 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
650
1045
  hpxml.solar_thermal_systems[0].storage_volume = 55.0
651
1046
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
652
1047
  hpxml_default = _test_measure()
653
- _test_default_solar_thermal_values(hpxml_default, 55.0)
1048
+ _test_default_solar_thermal_values(hpxml_default, false, 55.0)
654
1049
 
655
1050
  # Test defaults w/ collector area of 40 sqft
656
1051
  hpxml.solar_thermal_systems[0].storage_volume = nil
657
1052
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
658
1053
  hpxml_default = _test_measure()
659
- _test_default_solar_thermal_values(hpxml_default, 60.0)
1054
+ _test_default_solar_thermal_values(hpxml_default, true, 60.0)
660
1055
 
661
1056
  # Test defaults w/ collector area of 100 sqft
662
1057
  hpxml.solar_thermal_systems[0].collector_area = 100.0
663
1058
  hpxml.solar_thermal_systems[0].storage_volume = nil
664
1059
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
665
1060
  hpxml_default = _test_measure()
666
- _test_default_solar_thermal_values(hpxml_default, 150.0)
1061
+ _test_default_solar_thermal_values(hpxml_default, true, 150.0)
667
1062
  end
668
1063
 
669
- def test_mech_ventilation_fans
1064
+ def test_pv_systems
670
1065
  # Test inputs not overridden by defaults
671
- hpxml = _create_hpxml('base-mechvent-exhaust.xml')
1066
+ hpxml = _create_hpxml('base-pv.xml')
672
1067
  hpxml.building_construction.residential_facility_type = HPXML::ResidentialTypeSFA
673
- vent_fan = hpxml.ventilation_fans.select { |f| f.used_for_whole_building_ventilation }[0]
674
- vent_fan.is_shared_system = true
675
- vent_fan.fraction_recirculation = 0.0
676
- vent_fan.in_unit_flow_rate = 10.0
1068
+ hpxml.pv_systems.each do |pv|
1069
+ pv.is_shared_system = true
1070
+ pv.number_of_bedrooms_served = 20
1071
+ pv.inverter_efficiency = 0.90
1072
+ pv.system_losses_fraction = 0.20
1073
+ pv.location = HPXML::LocationGround
1074
+ pv.tracking = HPXML::PVTrackingType1Axis
1075
+ pv.module_type = HPXML::PVModuleTypePremium
1076
+ end
1077
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1078
+ hpxml_default = _test_measure()
1079
+ _test_default_pv_system_values(hpxml_default, false, 0.90, 0.20, true, HPXML::LocationGround, HPXML::PVTrackingType1Axis, HPXML::PVModuleTypePremium)
1080
+
1081
+ # Test defaults w/o year modules manufactured
1082
+ hpxml.pv_systems.each do |pv|
1083
+ pv.is_shared_system = nil
1084
+ pv.inverter_efficiency = nil
1085
+ pv.system_losses_fraction = nil
1086
+ pv.location = nil
1087
+ pv.tracking = nil
1088
+ pv.module_type = nil
1089
+ end
1090
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1091
+ hpxml_default = _test_measure()
1092
+ _test_default_pv_system_values(hpxml_default, true, 0.96, 0.14, false, HPXML::LocationRoof, HPXML::PVTrackingTypeFixed, HPXML::PVModuleTypeStandard)
1093
+
1094
+ # Test defaults w/ year modules manufactured
1095
+ hpxml.pv_systems.each do |pv|
1096
+ pv.year_modules_manufactured = 2010
1097
+ end
1098
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1099
+ hpxml_default = _test_measure()
1100
+ _test_default_pv_system_values(hpxml_default, true, 0.96, 0.182, false, HPXML::LocationRoof, HPXML::PVTrackingTypeFixed, HPXML::PVModuleTypeStandard)
1101
+ end
1102
+
1103
+ def test_generators
1104
+ # Test inputs not overridden by defaults
1105
+ hpxml = _create_hpxml('base-misc-generators.xml')
1106
+ hpxml.building_construction.residential_facility_type = HPXML::ResidentialTypeSFA
1107
+ hpxml.generators.each do |generator|
1108
+ generator.is_shared_system = true
1109
+ generator.number_of_bedrooms_served = 20
1110
+ end
677
1111
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
678
1112
  hpxml_default = _test_measure()
679
- _test_default_mech_vent_values(hpxml_default, true)
1113
+ _test_default_generator_values(hpxml_default, false, true)
680
1114
 
681
1115
  # Test defaults
682
- vent_fan.rated_flow_rate = nil
683
- vent_fan.start_hour = nil
684
- vent_fan.quantity = nil
685
- vent_fan.is_shared_system = nil
686
- vent_fan.fraction_recirculation = nil
687
- vent_fan.in_unit_flow_rate = nil
1116
+ hpxml.generators.each do |generator|
1117
+ generator.is_shared_system = nil
1118
+ end
688
1119
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
689
1120
  hpxml_default = _test_measure()
690
- _test_default_mech_vent_values(hpxml_default, false)
1121
+ _test_default_generator_values(hpxml_default, true, false)
691
1122
  end
692
1123
 
693
- def test_local_ventilation_fans
1124
+ def test_clothes_washers
694
1125
  # Test inputs not overridden by defaults
695
- hpxml = _create_hpxml('base-mechvent-bath-kitchen-fans.xml')
696
- kitchen_fan = hpxml.ventilation_fans.select { |f| f.used_for_local_ventilation && f.fan_location == HPXML::LocationKitchen }[0]
697
- kitchen_fan.rated_flow_rate = 300
698
- kitchen_fan.fan_power = 20
699
- kitchen_fan.start_hour = 12
700
- kitchen_fan.quantity = 2
701
- kitchen_fan.hours_in_operation = 2
702
- bath_fan = hpxml.ventilation_fans.select { |f| f.used_for_local_ventilation && f.fan_location == HPXML::LocationBath }[0]
703
- bath_fan.rated_flow_rate = 80
704
- bath_fan.fan_power = 33
705
- bath_fan.start_hour = 6
706
- bath_fan.quantity = 3
707
- bath_fan.hours_in_operation = 3
1126
+ hpxml = _create_hpxml('base.xml')
1127
+ hpxml.building_construction.residential_facility_type = HPXML::ResidentialTypeSFA
1128
+ hpxml.water_heating_systems[0].is_shared_system = true
1129
+ hpxml.water_heating_systems[0].number_of_units_served = 6
1130
+ hpxml.water_heating_systems[0].fraction_dhw_load_served = 0
1131
+ hpxml.clothes_washers[0].location = HPXML::LocationBasementConditioned
1132
+ hpxml.clothes_washers[0].is_shared_appliance = true
1133
+ hpxml.clothes_washers[0].usage_multiplier = 1.5
1134
+ hpxml.clothes_washers[0].water_heating_system_idref = hpxml.water_heating_systems[0].id
708
1135
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
709
1136
  hpxml_default = _test_measure()
710
- _test_default_kitchen_fan_values(hpxml_default, 2, 300, 2, 20, 12)
711
- _test_default_bath_fan_values(hpxml_default, 3, 80, 3, 33, 6)
1137
+ _test_default_clothes_washer_values(hpxml_default, false, true, HPXML::LocationBasementConditioned, 1.21, 380.0, 0.12, 1.09, 27.0, 3.2, 6.0, 1.5)
712
1138
 
713
1139
  # Test defaults
714
- kitchen_fan.rated_flow_rate = nil
715
- kitchen_fan.fan_power = nil
716
- kitchen_fan.start_hour = nil
717
- kitchen_fan.quantity = nil
718
- kitchen_fan.hours_in_operation = nil
719
- bath_fan.rated_flow_rate = nil
720
- bath_fan.fan_power = nil
721
- bath_fan.start_hour = nil
722
- bath_fan.quantity = nil
723
- bath_fan.hours_in_operation = nil
1140
+ hpxml.clothes_washers[0].is_shared_appliance = nil
1141
+ hpxml.clothes_washers[0].location = nil
1142
+ hpxml.clothes_washers[0].integrated_modified_energy_factor = nil
1143
+ hpxml.clothes_washers[0].rated_annual_kwh = nil
1144
+ hpxml.clothes_washers[0].label_electric_rate = nil
1145
+ hpxml.clothes_washers[0].label_gas_rate = nil
1146
+ hpxml.clothes_washers[0].label_annual_gas_cost = nil
1147
+ hpxml.clothes_washers[0].capacity = nil
1148
+ hpxml.clothes_washers[0].label_usage = nil
1149
+ hpxml.clothes_washers[0].usage_multiplier = nil
1150
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1151
+ hpxml_default = _test_measure()
1152
+ _test_default_clothes_washer_values(hpxml_default, true, false, HPXML::LocationLivingSpace, 1.0, 400.0, 0.12, 1.09, 27.0, 3.0, 6.0, 1.0)
1153
+
1154
+ # Test defaults before 301-2019 Addendum A
1155
+ hpxml = _create_hpxml('base.xml')
1156
+ hpxml.header.eri_calculation_version = '2019'
1157
+ hpxml.clothes_washers[0].is_shared_appliance = nil
1158
+ hpxml.clothes_washers[0].location = nil
1159
+ hpxml.clothes_washers[0].integrated_modified_energy_factor = nil
1160
+ hpxml.clothes_washers[0].rated_annual_kwh = nil
1161
+ hpxml.clothes_washers[0].label_electric_rate = nil
1162
+ hpxml.clothes_washers[0].label_gas_rate = nil
1163
+ hpxml.clothes_washers[0].label_annual_gas_cost = nil
1164
+ hpxml.clothes_washers[0].capacity = nil
1165
+ hpxml.clothes_washers[0].label_usage = nil
1166
+ hpxml.clothes_washers[0].usage_multiplier = nil
724
1167
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
725
1168
  hpxml_default = _test_measure()
726
- _test_default_kitchen_fan_values(hpxml_default, 1, 100, 1, 30, 18)
727
- _test_default_bath_fan_values(hpxml_default, 2, 50, 1, 15, 7)
1169
+ _test_default_clothes_washer_values(hpxml_default, true, false, HPXML::LocationLivingSpace, 0.331, 704.0, 0.08, 0.58, 23.0, 2.874, 999, 1.0)
728
1170
  end
729
1171
 
730
- def test_clothes_dryer_exhaust
1172
+ def test_clothes_dryers
731
1173
  # Test inputs not overridden by defaults
1174
+ hpxml = _create_hpxml('base.xml')
1175
+ hpxml.building_construction.residential_facility_type = HPXML::ResidentialTypeSFA
1176
+ hpxml.water_heating_systems[0].is_shared_system = true
1177
+ hpxml.water_heating_systems[0].number_of_units_served = 6
1178
+ hpxml.water_heating_systems[0].fraction_dhw_load_served = 0
1179
+ hpxml.clothes_dryers[0].location = HPXML::LocationBasementConditioned
1180
+ hpxml.clothes_dryers[0].is_shared_appliance = true
1181
+ hpxml.clothes_dryers[0].control_type = HPXML::ClothesDryerControlTypeMoisture
1182
+ hpxml.clothes_dryers[0].combined_energy_factor = 3.33
1183
+ hpxml.clothes_dryers[0].usage_multiplier = 1.1
1184
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1185
+ hpxml_default = _test_measure()
1186
+ _test_default_clothes_dryer_values(hpxml_default, false, true, HPXML::LocationBasementConditioned, HPXML::ClothesDryerControlTypeMoisture, 3.33, 1.1)
1187
+
1188
+ # Test defaults w/ electric clothes dryer
1189
+ hpxml.clothes_dryers[0].location = nil
1190
+ hpxml.clothes_dryers[0].is_shared_appliance = nil
1191
+ hpxml.clothes_dryers[0].control_type = nil
1192
+ hpxml.clothes_dryers[0].combined_energy_factor = nil
1193
+ hpxml.clothes_dryers[0].usage_multiplier = nil
1194
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1195
+ hpxml_default = _test_measure()
1196
+ _test_default_clothes_dryer_values(hpxml_default, true, false, HPXML::LocationLivingSpace, HPXML::ClothesDryerControlTypeTimer, 3.01, 1.0)
1197
+
1198
+ # Test defaults w/ gas clothes dryer
1199
+ hpxml.clothes_dryers[0].fuel_type = HPXML::FuelTypeNaturalGas
1200
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1201
+ hpxml_default = _test_measure()
1202
+ _test_default_clothes_dryer_values(hpxml_default, true, false, HPXML::LocationLivingSpace, HPXML::ClothesDryerControlTypeTimer, 3.01, 1.0)
1203
+
1204
+ # Test defaults w/ electric clothes dryer before 301-2019 Addendum A
1205
+ hpxml.header.eri_calculation_version = '2019'
1206
+ hpxml.clothes_dryers[0].fuel_type = HPXML::FuelTypeElectricity
1207
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1208
+ hpxml_default = _test_measure()
1209
+ _test_default_clothes_dryer_values(hpxml_default, true, false, HPXML::LocationLivingSpace, HPXML::ClothesDryerControlTypeTimer, 2.62, 1.0)
1210
+
1211
+ # Test defaults w/ gas clothes dryer before 301-2019 Addendum A
1212
+ hpxml.clothes_dryers[0].fuel_type = HPXML::FuelTypeNaturalGas
1213
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1214
+ hpxml_default = _test_measure()
1215
+ _test_default_clothes_dryer_values(hpxml_default, true, false, HPXML::LocationLivingSpace, HPXML::ClothesDryerControlTypeTimer, 2.32, 1.0)
1216
+ end
1217
+
1218
+ def test_clothes_dryer_exhaust
1219
+ # Test inputs not overridden by defaults w/ vented dryer
732
1220
  hpxml_name = 'base.xml'
733
1221
  hpxml = HPXML.new(hpxml_path: File.join(@root_path, 'workflow', 'sample_files', hpxml_name))
734
1222
  clothes_dryer = hpxml.clothes_dryers[0]
@@ -736,37 +1224,303 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
736
1224
  clothes_dryer.vented_flow_rate = 200
737
1225
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
738
1226
  hpxml_default = _test_measure()
739
- _test_default_clothes_dryer_exhaust_values(hpxml_default, true, 200)
1227
+ _test_default_clothes_dryer_exhaust_values(hpxml_default, false, true, 200)
740
1228
 
1229
+ # Test inputs not overridden by defaults w/ unvented dryer
741
1230
  clothes_dryer.is_vented = false
742
1231
  clothes_dryer.vented_flow_rate = nil
743
1232
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
744
1233
  hpxml_default = _test_measure()
745
- _test_default_clothes_dryer_exhaust_values(hpxml_default, false, nil)
1234
+ _test_default_clothes_dryer_exhaust_values(hpxml_default, false, false, nil)
746
1235
 
747
1236
  # Test defaults
748
1237
  clothes_dryer.is_vented = nil
749
1238
  clothes_dryer.vented_flow_rate = nil
750
1239
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
751
1240
  hpxml_default = _test_measure()
752
- _test_default_clothes_dryer_exhaust_values(hpxml_default, true, 100)
1241
+ _test_default_clothes_dryer_exhaust_values(hpxml_default, true, true, 100)
753
1242
  end
754
1243
 
755
- def test_ceiling_fans
1244
+ def test_dishwashers
756
1245
  # Test inputs not overridden by defaults
757
- hpxml = _create_hpxml('base-lighting-ceiling-fans.xml')
1246
+ hpxml = _create_hpxml('base.xml')
1247
+ hpxml.building_construction.residential_facility_type = HPXML::ResidentialTypeSFA
1248
+ hpxml.water_heating_systems[0].is_shared_system = true
1249
+ hpxml.water_heating_systems[0].number_of_units_served = 6
1250
+ hpxml.water_heating_systems[0].fraction_dhw_load_served = 0
1251
+ hpxml.dishwashers[0].location = HPXML::LocationBasementConditioned
1252
+ hpxml.dishwashers[0].is_shared_appliance = true
1253
+ hpxml.dishwashers[0].usage_multiplier = 1.3
1254
+ hpxml.dishwashers[0].water_heating_system_idref = hpxml.water_heating_systems[0].id
758
1255
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
759
1256
  hpxml_default = _test_measure()
760
- _test_default_ceiling_fan_values(hpxml_default, 2, 100)
1257
+ _test_default_dishwasher_values(hpxml_default, false, true, HPXML::LocationBasementConditioned, 307.0, 0.12, 1.09, 22.32, 4.0, 12, 1.3)
761
1258
 
762
1259
  # Test defaults
763
- hpxml.ceiling_fans.each do |ceiling_fan|
764
- ceiling_fan.quantity = nil
765
- ceiling_fan.efficiency = nil
766
- end
767
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1260
+ hpxml.dishwashers[0].is_shared_appliance = nil
1261
+ hpxml.dishwashers[0].location = nil
1262
+ hpxml.dishwashers[0].rated_annual_kwh = nil
1263
+ hpxml.dishwashers[0].label_electric_rate = nil
1264
+ hpxml.dishwashers[0].label_gas_rate = nil
1265
+ hpxml.dishwashers[0].label_annual_gas_cost = nil
1266
+ hpxml.dishwashers[0].label_usage = nil
1267
+ hpxml.dishwashers[0].place_setting_capacity = nil
1268
+ hpxml.dishwashers[0].usage_multiplier = nil
1269
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1270
+ hpxml_default = _test_measure()
1271
+ _test_default_dishwasher_values(hpxml_default, true, false, HPXML::LocationLivingSpace, 467.0, 0.12, 1.09, 33.12, 4.0, 12, 1.0)
1272
+
1273
+ # Test defaults before 301-2019 Addendum A
1274
+ hpxml.header.eri_calculation_version = '2019'
1275
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1276
+ hpxml_default = _test_measure()
1277
+ _test_default_dishwasher_values(hpxml_default, true, false, HPXML::LocationLivingSpace, 467.0, 999, 999, 999, 999, 12, 1.0)
1278
+ end
1279
+
1280
+ def test_refrigerators
1281
+ # Test inputs not overridden by defaults
1282
+ hpxml = _create_hpxml('base.xml')
1283
+ hpxml.refrigerators[0].location = HPXML::LocationBasementConditioned
1284
+ hpxml.refrigerators[0].usage_multiplier = 1.2
1285
+ hpxml.refrigerators[0].weekday_fractions = ConstantDaySchedule
1286
+ hpxml.refrigerators[0].weekend_fractions = ConstantDaySchedule
1287
+ hpxml.refrigerators[0].monthly_multipliers = ConstantMonthSchedule
1288
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1289
+ hpxml_default = _test_measure()
1290
+ _test_default_refrigerator_values(hpxml_default, false, HPXML::LocationBasementConditioned, 650.0, 1.2, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1291
+
1292
+ # Test defaults
1293
+ hpxml.refrigerators[0].location = nil
1294
+ hpxml.refrigerators[0].rated_annual_kwh = nil
1295
+ hpxml.refrigerators[0].usage_multiplier = nil
1296
+ hpxml.refrigerators[0].weekday_fractions = nil
1297
+ hpxml.refrigerators[0].weekend_fractions = nil
1298
+ hpxml.refrigerators[0].monthly_multipliers = nil
1299
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1300
+ hpxml_default = _test_measure()
1301
+ _test_default_refrigerator_values(hpxml_default, true, HPXML::LocationLivingSpace, 691.0, 1.0, '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837')
1302
+
1303
+ # Test defaults w/ refrigerator in 5-bedroom house
1304
+ hpxml.building_construction.number_of_bedrooms = 5
1305
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1306
+ hpxml_default = _test_measure()
1307
+ _test_default_refrigerator_values(hpxml_default, true, HPXML::LocationLivingSpace, 727.0, 1.0, '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837')
1308
+
1309
+ # Test defaults before 301-2019 Addendum A
1310
+ hpxml.header.eri_calculation_version = '2019'
1311
+ hpxml.building_construction.number_of_bedrooms = 3
1312
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1313
+ hpxml_default = _test_measure()
1314
+ _test_default_refrigerator_values(hpxml_default, true, HPXML::LocationLivingSpace, 691.0, 1.0, '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837')
1315
+ end
1316
+
1317
+ def test_extra_refrigerators
1318
+ # Test inputs not overridden by defaults
1319
+ hpxml = _create_hpxml('base-misc-loads-large-uncommon.xml')
1320
+ hpxml.refrigerators.each do |refrigerator|
1321
+ refrigerator.location = HPXML::LocationLivingSpace
1322
+ refrigerator.rated_annual_kwh = 333.0
1323
+ refrigerator.usage_multiplier = 1.5
1324
+ refrigerator.weekday_fractions = ConstantDaySchedule
1325
+ refrigerator.weekend_fractions = ConstantDaySchedule
1326
+ refrigerator.monthly_multipliers = ConstantMonthSchedule
1327
+ end
1328
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1329
+ hpxml_default = _test_measure()
1330
+ _test_default_extra_refrigerators_values(hpxml_default, false, HPXML::LocationLivingSpace, 333.0, 1.5, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1331
+
1332
+ # Test defaults
1333
+ hpxml.refrigerators.each do |refrigerator|
1334
+ refrigerator.location = nil
1335
+ refrigerator.rated_annual_kwh = nil
1336
+ refrigerator.usage_multiplier = nil
1337
+ refrigerator.weekday_fractions = nil
1338
+ refrigerator.weekend_fractions = nil
1339
+ refrigerator.monthly_multipliers = nil
1340
+ end
1341
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1342
+ hpxml_default = _test_measure()
1343
+ _test_default_extra_refrigerators_values(hpxml_default, true, HPXML::LocationBasementConditioned, 244.0, 1.0, '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837')
1344
+ end
1345
+
1346
+ def test_freezers
1347
+ # Test inputs not overridden by defaults
1348
+ hpxml = _create_hpxml('base-misc-loads-large-uncommon.xml')
1349
+ hpxml.freezers.each do |freezer|
1350
+ freezer.location = HPXML::LocationLivingSpace
1351
+ freezer.rated_annual_kwh = 333.0
1352
+ freezer.usage_multiplier = 1.5
1353
+ freezer.weekday_fractions = ConstantDaySchedule
1354
+ freezer.weekend_fractions = ConstantDaySchedule
1355
+ freezer.monthly_multipliers = ConstantMonthSchedule
1356
+ end
1357
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1358
+ hpxml_default = _test_measure()
1359
+ _test_default_freezers_values(hpxml_default, false, HPXML::LocationLivingSpace, 333.0, 1.5, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1360
+
1361
+ # Test defaults
1362
+ hpxml.freezers.each do |freezer|
1363
+ freezer.location = nil
1364
+ freezer.rated_annual_kwh = nil
1365
+ freezer.usage_multiplier = nil
1366
+ freezer.weekday_fractions = nil
1367
+ freezer.weekend_fractions = nil
1368
+ freezer.monthly_multipliers = nil
1369
+ end
1370
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1371
+ hpxml_default = _test_measure()
1372
+ _test_default_freezers_values(hpxml_default, true, HPXML::LocationBasementConditioned, 320.0, 1.0, '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837')
1373
+ end
1374
+
1375
+ def test_cooking_ranges
1376
+ # Test inputs not overridden by defaults
1377
+ hpxml = _create_hpxml('base.xml')
1378
+ hpxml.cooking_ranges[0].location = HPXML::LocationBasementConditioned
1379
+ hpxml.cooking_ranges[0].is_induction = true
1380
+ hpxml.cooking_ranges[0].usage_multiplier = 1.1
1381
+ hpxml.cooking_ranges[0].weekday_fractions = ConstantDaySchedule
1382
+ hpxml.cooking_ranges[0].weekend_fractions = ConstantDaySchedule
1383
+ hpxml.cooking_ranges[0].monthly_multipliers = ConstantMonthSchedule
1384
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1385
+ hpxml_default = _test_measure()
1386
+ _test_default_cooking_range_values(hpxml_default, false, HPXML::LocationBasementConditioned, true, 1.1, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1387
+
1388
+ # Test defaults
1389
+ hpxml.cooking_ranges[0].location = nil
1390
+ hpxml.cooking_ranges[0].is_induction = nil
1391
+ hpxml.cooking_ranges[0].usage_multiplier = nil
1392
+ hpxml.cooking_ranges[0].weekday_fractions = nil
1393
+ hpxml.cooking_ranges[0].weekend_fractions = nil
1394
+ hpxml.cooking_ranges[0].monthly_multipliers = nil
1395
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1396
+ hpxml_default = _test_measure()
1397
+ _test_default_cooking_range_values(hpxml_default, true, HPXML::LocationLivingSpace, false, 1.0, '0.007, 0.007, 0.004, 0.004, 0.007, 0.011, 0.025, 0.042, 0.046, 0.048, 0.042, 0.050, 0.057, 0.046, 0.057, 0.044, 0.092, 0.150, 0.117, 0.060, 0.035, 0.025, 0.016, 0.011', '0.007, 0.007, 0.004, 0.004, 0.007, 0.011, 0.025, 0.042, 0.046, 0.048, 0.042, 0.050, 0.057, 0.046, 0.057, 0.044, 0.092, 0.150, 0.117, 0.060, 0.035, 0.025, 0.016, 0.011', '1.097, 1.097, 0.991, 0.987, 0.991, 0.890, 0.896, 0.896, 0.890, 1.085, 1.085, 1.097')
1398
+
1399
+ # Test defaults before 301-2019 Addendum A
1400
+ hpxml.header.eri_calculation_version = '2019'
1401
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
768
1402
  hpxml_default = _test_measure()
769
- _test_default_ceiling_fan_values(hpxml_default, 4, 70.4)
1403
+ _test_default_cooking_range_values(hpxml_default, true, HPXML::LocationLivingSpace, false, 1.0, '0.007, 0.007, 0.004, 0.004, 0.007, 0.011, 0.025, 0.042, 0.046, 0.048, 0.042, 0.050, 0.057, 0.046, 0.057, 0.044, 0.092, 0.150, 0.117, 0.060, 0.035, 0.025, 0.016, 0.011', '0.007, 0.007, 0.004, 0.004, 0.007, 0.011, 0.025, 0.042, 0.046, 0.048, 0.042, 0.050, 0.057, 0.046, 0.057, 0.044, 0.092, 0.150, 0.117, 0.060, 0.035, 0.025, 0.016, 0.011', '1.097, 1.097, 0.991, 0.987, 0.991, 0.890, 0.896, 0.896, 0.890, 1.085, 1.085, 1.097')
1404
+ end
1405
+
1406
+ def test_ovens
1407
+ # Test inputs not overridden by defaults
1408
+ hpxml = _create_hpxml('base.xml')
1409
+ hpxml.ovens[0].is_convection = true
1410
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1411
+ hpxml_default = _test_measure()
1412
+ _test_default_oven_values(hpxml_default, false, true)
1413
+
1414
+ # Test defaults
1415
+ hpxml.ovens[0].is_convection = nil
1416
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1417
+ hpxml_default = _test_measure()
1418
+ _test_default_oven_values(hpxml_default, true, false)
1419
+
1420
+ # Test defaults before 301-2019 Addendum A
1421
+ hpxml.header.eri_calculation_version = '2019'
1422
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1423
+ hpxml_default = _test_measure()
1424
+ _test_default_oven_values(hpxml_default, true, false)
1425
+ end
1426
+
1427
+ def test_lighting
1428
+ # Test inputs not overridden by defaults
1429
+ hpxml = _create_hpxml('base.xml')
1430
+ hpxml.lighting.interior_usage_multiplier = 2.0
1431
+ hpxml.lighting.garage_usage_multiplier = 2.0
1432
+ hpxml.lighting.exterior_usage_multiplier = 2.0
1433
+ hpxml.lighting.interior_weekday_fractions = ConstantDaySchedule
1434
+ hpxml.lighting.interior_weekend_fractions = ConstantDaySchedule
1435
+ hpxml.lighting.interior_monthly_multipliers = ConstantMonthSchedule
1436
+ hpxml.lighting.exterior_weekday_fractions = ConstantDaySchedule
1437
+ hpxml.lighting.exterior_weekend_fractions = ConstantDaySchedule
1438
+ hpxml.lighting.exterior_monthly_multipliers = ConstantMonthSchedule
1439
+ hpxml.lighting.garage_weekday_fractions = ConstantDaySchedule
1440
+ hpxml.lighting.garage_weekend_fractions = ConstantDaySchedule
1441
+ hpxml.lighting.garage_monthly_multipliers = ConstantMonthSchedule
1442
+ hpxml.lighting.holiday_exists = true
1443
+ hpxml.lighting.holiday_kwh_per_day = 0.7
1444
+ hpxml.lighting.holiday_period_begin_month = 11
1445
+ hpxml.lighting.holiday_period_begin_day = 19
1446
+ hpxml.lighting.holiday_period_end_month = 12
1447
+ hpxml.lighting.holiday_period_end_day = 31
1448
+ hpxml.lighting.holiday_weekday_fractions = ConstantDaySchedule
1449
+ hpxml.lighting.holiday_weekend_fractions = ConstantDaySchedule
1450
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1451
+ hpxml_default = _test_measure()
1452
+ _test_default_lighting_values(hpxml_default, false, 2.0, 2.0, 2.0,
1453
+ { int_wk_sch: ConstantDaySchedule,
1454
+ int_wknd_sch: ConstantDaySchedule,
1455
+ int_month_mult: ConstantMonthSchedule,
1456
+ ext_wk_sch: ConstantDaySchedule,
1457
+ ext_wknd_sch: ConstantDaySchedule,
1458
+ ext_month_mult: ConstantMonthSchedule,
1459
+ grg_wk_sch: ConstantDaySchedule,
1460
+ grg_wknd_sch: ConstantDaySchedule,
1461
+ grg_month_mult: ConstantMonthSchedule,
1462
+ hol_kwh_per_day: 0.7,
1463
+ hol_begin_month: 11,
1464
+ hol_begin_day: 19,
1465
+ hol_end_month: 12,
1466
+ hol_end_day: 31,
1467
+ hol_wk_sch: ConstantDaySchedule,
1468
+ hol_wknd_sch: ConstantDaySchedule })
1469
+
1470
+ # Test defaults
1471
+ hpxml.lighting.interior_usage_multiplier = nil
1472
+ hpxml.lighting.garage_usage_multiplier = nil
1473
+ hpxml.lighting.exterior_usage_multiplier = nil
1474
+ hpxml.lighting.interior_weekday_fractions = nil
1475
+ hpxml.lighting.interior_weekend_fractions = nil
1476
+ hpxml.lighting.interior_monthly_multipliers = nil
1477
+ hpxml.lighting.exterior_weekday_fractions = nil
1478
+ hpxml.lighting.exterior_weekend_fractions = nil
1479
+ hpxml.lighting.exterior_monthly_multipliers = nil
1480
+ hpxml.lighting.garage_weekday_fractions = nil
1481
+ hpxml.lighting.garage_weekend_fractions = nil
1482
+ hpxml.lighting.garage_monthly_multipliers = nil
1483
+ hpxml.lighting.holiday_exists = nil
1484
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1485
+ hpxml_default = _test_measure()
1486
+ _test_default_lighting_values(hpxml_default, true, 1.0, 1.0, 1.0,
1487
+ { ext_wk_sch: '0.046, 0.046, 0.046, 0.046, 0.046, 0.037, 0.035, 0.034, 0.033, 0.028, 0.022, 0.015, 0.012, 0.011, 0.011, 0.012, 0.019, 0.037, 0.049, 0.065, 0.091, 0.105, 0.091, 0.063',
1488
+ ext_wknd_sch: '0.046, 0.046, 0.045, 0.045, 0.046, 0.045, 0.044, 0.041, 0.036, 0.03, 0.024, 0.016, 0.012, 0.011, 0.011, 0.012, 0.019, 0.038, 0.048, 0.06, 0.083, 0.098, 0.085, 0.059',
1489
+ ext_month_mult: '1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248' })
1490
+
1491
+ # Test defaults w/ garage
1492
+ hpxml = _create_hpxml('base-enclosure-garage.xml')
1493
+ hpxml.lighting.interior_usage_multiplier = nil
1494
+ hpxml.lighting.garage_usage_multiplier = nil
1495
+ hpxml.lighting.exterior_usage_multiplier = nil
1496
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1497
+ hpxml_default = _test_measure()
1498
+ _test_default_lighting_values(hpxml_default, true, 1.0, 1.0, 1.0,
1499
+ { ext_wk_sch: '0.046, 0.046, 0.046, 0.046, 0.046, 0.037, 0.035, 0.034, 0.033, 0.028, 0.022, 0.015, 0.012, 0.011, 0.011, 0.012, 0.019, 0.037, 0.049, 0.065, 0.091, 0.105, 0.091, 0.063',
1500
+ ext_wknd_sch: '0.046, 0.046, 0.045, 0.045, 0.046, 0.045, 0.044, 0.041, 0.036, 0.03, 0.024, 0.016, 0.012, 0.011, 0.011, 0.012, 0.019, 0.038, 0.048, 0.06, 0.083, 0.098, 0.085, 0.059',
1501
+ ext_month_mult: '1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248',
1502
+ grg_wk_sch: '0.046, 0.046, 0.046, 0.046, 0.046, 0.037, 0.035, 0.034, 0.033, 0.028, 0.022, 0.015, 0.012, 0.011, 0.011, 0.012, 0.019, 0.037, 0.049, 0.065, 0.091, 0.105, 0.091, 0.063',
1503
+ grg_wknd_sch: '0.046, 0.046, 0.045, 0.045, 0.046, 0.045, 0.044, 0.041, 0.036, 0.03, 0.024, 0.016, 0.012, 0.011, 0.011, 0.012, 0.019, 0.038, 0.048, 0.06, 0.083, 0.098, 0.085, 0.059',
1504
+ grg_month_mult: '1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248' })
1505
+ end
1506
+
1507
+ def test_ceiling_fans
1508
+ # Test inputs not overridden by defaults
1509
+ hpxml = _create_hpxml('base-lighting-ceiling-fans.xml')
1510
+ hpxml.ceiling_fans[0].quantity = 2
1511
+ hpxml.ceiling_fans[0].efficiency = 100
1512
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1513
+ hpxml_default = _test_measure()
1514
+ _test_default_ceiling_fan_values(hpxml_default, false, 2, 100)
1515
+
1516
+ # Test defaults
1517
+ hpxml.ceiling_fans.each do |ceiling_fan|
1518
+ ceiling_fan.quantity = nil
1519
+ ceiling_fan.efficiency = nil
1520
+ end
1521
+ XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1522
+ hpxml_default = _test_measure()
1523
+ _test_default_ceiling_fan_values(hpxml_default, true, 4, 70.4)
770
1524
  end
771
1525
 
772
1526
  def test_pools
@@ -775,50 +1529,56 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
775
1529
  pool = hpxml.pools[0]
776
1530
  pool.heater_load_units = HPXML::UnitsKwhPerYear
777
1531
  pool.heater_load_value = 1000
778
- pool.pump_kwh_per_year = 3000
1532
+ pool.heater_usage_multiplier = 1.4
779
1533
  pool.heater_weekday_fractions = ConstantDaySchedule
780
1534
  pool.heater_weekend_fractions = ConstantDaySchedule
781
1535
  pool.heater_monthly_multipliers = ConstantMonthSchedule
1536
+ pool.pump_kwh_per_year = 3000
1537
+ pool.pump_usage_multiplier = 1.3
782
1538
  pool.pump_weekday_fractions = ConstantDaySchedule
783
1539
  pool.pump_weekend_fractions = ConstantDaySchedule
784
1540
  pool.pump_monthly_multipliers = ConstantMonthSchedule
785
1541
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
786
1542
  hpxml_default = _test_measure()
787
- _test_default_pool_heater_values(hpxml_default, HPXML::UnitsKwhPerYear, 1000, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
788
- _test_default_pool_pump_values(hpxml_default, 3000, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1543
+ _test_default_pool_heater_values(hpxml_default, false, HPXML::UnitsKwhPerYear, 1000, 1.4, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1544
+ _test_default_pool_pump_values(hpxml_default, false, 3000, 1.3, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
789
1545
 
790
1546
  # Test defaults
791
1547
  pool = hpxml.pools[0]
792
1548
  pool.heater_load_units = nil
793
1549
  pool.heater_load_value = nil
794
- pool.pump_kwh_per_year = nil
1550
+ pool.heater_usage_multiplier = nil
795
1551
  pool.heater_weekday_fractions = nil
796
1552
  pool.heater_weekend_fractions = nil
797
1553
  pool.heater_monthly_multipliers = nil
1554
+ pool.pump_kwh_per_year = nil
1555
+ pool.pump_usage_multiplier = nil
798
1556
  pool.pump_weekday_fractions = nil
799
1557
  pool.pump_weekend_fractions = nil
800
1558
  pool.pump_monthly_multipliers = nil
801
1559
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
802
1560
  hpxml_default = _test_measure()
803
- _test_default_pool_heater_values(hpxml_default, HPXML::UnitsThermPerYear, 236, '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003', '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003', '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154')
804
- _test_default_pool_pump_values(hpxml_default, 2496, '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003', '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003', '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154')
1561
+ _test_default_pool_heater_values(hpxml_default, true, HPXML::UnitsThermPerYear, 236, 1.0, '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003', '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003', '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154')
1562
+ _test_default_pool_pump_values(hpxml_default, true, 2496, 1.0, '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003', '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003', '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154')
805
1563
 
806
1564
  # Test defaults 2
807
1565
  hpxml = _create_hpxml('base-misc-loads-large-uncommon2.xml')
808
1566
  pool = hpxml.pools[0]
809
1567
  pool.heater_load_units = nil
810
1568
  pool.heater_load_value = nil
811
- pool.pump_kwh_per_year = nil
1569
+ pool.heater_usage_multiplier = nil
812
1570
  pool.heater_weekday_fractions = nil
813
1571
  pool.heater_weekend_fractions = nil
814
1572
  pool.heater_monthly_multipliers = nil
1573
+ pool.pump_kwh_per_year = nil
1574
+ pool.pump_usage_multiplier = nil
815
1575
  pool.pump_weekday_fractions = nil
816
1576
  pool.pump_weekend_fractions = nil
817
1577
  pool.pump_monthly_multipliers = nil
818
1578
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
819
1579
  hpxml_default = _test_measure()
820
- _test_default_pool_heater_values(hpxml_default, nil, nil, nil, nil, nil)
821
- _test_default_pool_pump_values(hpxml_default, 2496, '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003', '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003', '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154')
1580
+ _test_default_pool_heater_values(hpxml_default, true, nil, nil, nil, nil, nil, nil)
1581
+ _test_default_pool_pump_values(hpxml_default, true, 2496, 1.0, '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003', '0.003, 0.003, 0.003, 0.004, 0.008, 0.015, 0.026, 0.044, 0.084, 0.121, 0.127, 0.121, 0.120, 0.090, 0.075, 0.061, 0.037, 0.023, 0.013, 0.008, 0.004, 0.003, 0.003, 0.003', '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154')
822
1582
  end
823
1583
 
824
1584
  def test_hot_tubs
@@ -827,50 +1587,56 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
827
1587
  hot_tub = hpxml.hot_tubs[0]
828
1588
  hot_tub.heater_load_units = HPXML::UnitsThermPerYear
829
1589
  hot_tub.heater_load_value = 1000
830
- hot_tub.pump_kwh_per_year = 3000
1590
+ hot_tub.heater_usage_multiplier = 0.8
831
1591
  hot_tub.heater_weekday_fractions = ConstantDaySchedule
832
1592
  hot_tub.heater_weekend_fractions = ConstantDaySchedule
833
1593
  hot_tub.heater_monthly_multipliers = ConstantMonthSchedule
1594
+ hot_tub.pump_kwh_per_year = 3000
1595
+ hot_tub.pump_usage_multiplier = 0.7
834
1596
  hot_tub.pump_weekday_fractions = ConstantDaySchedule
835
1597
  hot_tub.pump_weekend_fractions = ConstantDaySchedule
836
1598
  hot_tub.pump_monthly_multipliers = ConstantMonthSchedule
837
1599
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
838
1600
  hpxml_default = _test_measure()
839
- _test_default_hot_tub_heater_values(hpxml_default, HPXML::UnitsThermPerYear, 1000, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
840
- _test_default_hot_tub_pump_values(hpxml_default, 3000, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1601
+ _test_default_hot_tub_heater_values(hpxml_default, false, HPXML::UnitsThermPerYear, 1000, 0.8, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1602
+ _test_default_hot_tub_pump_values(hpxml_default, false, 3000, 0.7, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
841
1603
 
842
1604
  # Test defaults
843
1605
  hot_tub = hpxml.hot_tubs[0]
844
1606
  hot_tub.heater_load_units = nil
845
1607
  hot_tub.heater_load_value = nil
846
- hot_tub.pump_kwh_per_year = nil
1608
+ hot_tub.heater_usage_multiplier = nil
847
1609
  hot_tub.heater_weekday_fractions = nil
848
1610
  hot_tub.heater_weekend_fractions = nil
849
1611
  hot_tub.heater_monthly_multipliers = nil
1612
+ hot_tub.pump_kwh_per_year = nil
1613
+ hot_tub.pump_usage_multiplier = nil
850
1614
  hot_tub.pump_weekday_fractions = nil
851
1615
  hot_tub.pump_weekend_fractions = nil
852
1616
  hot_tub.pump_monthly_multipliers = nil
853
1617
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
854
1618
  hpxml_default = _test_measure()
855
- _test_default_hot_tub_heater_values(hpxml_default, HPXML::UnitsKwhPerYear, 1125, '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837')
856
- _test_default_hot_tub_pump_values(hpxml_default, 1111, '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.921, 0.928, 0.921, 0.915, 0.921, 1.160, 1.158, 1.158, 1.160, 0.921, 0.915, 0.921')
1619
+ _test_default_hot_tub_heater_values(hpxml_default, true, HPXML::UnitsKwhPerYear, 1125, 1.0, '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837')
1620
+ _test_default_hot_tub_pump_values(hpxml_default, true, 1111, 1.0, '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.921, 0.928, 0.921, 0.915, 0.921, 1.160, 1.158, 1.158, 1.160, 0.921, 0.915, 0.921')
857
1621
 
858
1622
  # Test defaults 2
859
1623
  hpxml = _create_hpxml('base-misc-loads-large-uncommon2.xml')
860
1624
  hot_tub = hpxml.hot_tubs[0]
861
1625
  hot_tub.heater_load_units = nil
862
1626
  hot_tub.heater_load_value = nil
863
- hot_tub.pump_kwh_per_year = nil
1627
+ hot_tub.heater_usage_multiplier = nil
864
1628
  hot_tub.heater_weekday_fractions = nil
865
1629
  hot_tub.heater_weekend_fractions = nil
866
1630
  hot_tub.heater_monthly_multipliers = nil
1631
+ hot_tub.pump_kwh_per_year = nil
1632
+ hot_tub.pump_usage_multiplier = nil
867
1633
  hot_tub.pump_weekday_fractions = nil
868
1634
  hot_tub.pump_weekend_fractions = nil
869
1635
  hot_tub.pump_monthly_multipliers = nil
870
1636
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
871
1637
  hpxml_default = _test_measure()
872
- _test_default_hot_tub_heater_values(hpxml_default, HPXML::UnitsKwhPerYear, 225, '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837')
873
- _test_default_hot_tub_pump_values(hpxml_default, 1111, '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.921, 0.928, 0.921, 0.915, 0.921, 1.160, 1.158, 1.158, 1.160, 0.921, 0.915, 0.921')
1638
+ _test_default_hot_tub_heater_values(hpxml_default, true, HPXML::UnitsKwhPerYear, 225, 1.0, '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837')
1639
+ _test_default_hot_tub_pump_values(hpxml_default, true, 1111, 1.0, '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.024, 0.029, 0.024, 0.029, 0.047, 0.067, 0.057, 0.024, 0.024, 0.019, 0.015, 0.014, 0.014, 0.014, 0.024, 0.058, 0.126, 0.122, 0.068, 0.061, 0.051, 0.043, 0.024, 0.024', '0.921, 0.928, 0.921, 0.915, 0.921, 1.160, 1.158, 1.158, 1.160, 0.921, 0.915, 0.921')
874
1640
  end
875
1641
 
876
1642
  def test_plug_loads
@@ -878,59 +1644,59 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
878
1644
  hpxml = _create_hpxml('base-misc-loads-large-uncommon.xml')
879
1645
  tv_pl = hpxml.plug_loads.select { |pl| pl.plug_load_type == HPXML::PlugLoadTypeTelevision }[0]
880
1646
  tv_pl.kWh_per_year = 1000
1647
+ tv_pl.usage_multiplier = 1.1
881
1648
  tv_pl.frac_sensible = 0.6
882
1649
  tv_pl.frac_latent = 0.3
883
- tv_pl.location = HPXML::LocationExterior
884
1650
  tv_pl.weekday_fractions = ConstantDaySchedule
885
1651
  tv_pl.weekend_fractions = ConstantDaySchedule
886
1652
  tv_pl.monthly_multipliers = ConstantMonthSchedule
887
1653
  other_pl = hpxml.plug_loads.select { |pl| pl.plug_load_type == HPXML::PlugLoadTypeOther }[0]
888
1654
  other_pl.kWh_per_year = 2000
1655
+ other_pl.usage_multiplier = 1.2
889
1656
  other_pl.frac_sensible = 0.5
890
1657
  other_pl.frac_latent = 0.4
891
- other_pl.location = HPXML::LocationExterior
892
1658
  other_pl.weekday_fractions = ConstantDaySchedule
893
1659
  other_pl.weekend_fractions = ConstantDaySchedule
894
1660
  other_pl.monthly_multipliers = ConstantMonthSchedule
895
1661
  veh_pl = hpxml.plug_loads.select { |pl| pl.plug_load_type == HPXML::PlugLoadTypeElectricVehicleCharging }[0]
896
1662
  veh_pl.kWh_per_year = 4000
1663
+ veh_pl.usage_multiplier = 1.3
897
1664
  veh_pl.frac_sensible = 0.4
898
1665
  veh_pl.frac_latent = 0.5
899
- veh_pl.location = HPXML::LocationInterior
900
1666
  veh_pl.weekday_fractions = ConstantDaySchedule
901
1667
  veh_pl.weekend_fractions = ConstantDaySchedule
902
1668
  veh_pl.monthly_multipliers = ConstantMonthSchedule
903
1669
  wellpump_pl = hpxml.plug_loads.select { |pl| pl.plug_load_type == HPXML::PlugLoadTypeWellPump }[0]
904
1670
  wellpump_pl.kWh_per_year = 3000
1671
+ wellpump_pl.usage_multiplier = 1.4
905
1672
  wellpump_pl.frac_sensible = 0.3
906
1673
  wellpump_pl.frac_latent = 0.6
907
- wellpump_pl.location = HPXML::LocationInterior
908
1674
  wellpump_pl.weekday_fractions = ConstantDaySchedule
909
1675
  wellpump_pl.weekend_fractions = ConstantDaySchedule
910
1676
  wellpump_pl.monthly_multipliers = ConstantMonthSchedule
911
1677
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
912
1678
  hpxml_default = _test_measure()
913
- _test_default_plug_load_values(hpxml_default, HPXML::PlugLoadTypeTelevision, 1000, 0.6, 0.3, HPXML::LocationExterior, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
914
- _test_default_plug_load_values(hpxml_default, HPXML::PlugLoadTypeOther, 2000, 0.5, 0.4, HPXML::LocationExterior, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
915
- _test_default_plug_load_values(hpxml_default, HPXML::PlugLoadTypeElectricVehicleCharging, 4000, 0.4, 0.5, HPXML::LocationInterior, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
916
- _test_default_plug_load_values(hpxml_default, HPXML::PlugLoadTypeWellPump, 3000, 0.3, 0.6, HPXML::LocationInterior, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1679
+ _test_default_plug_load_values(hpxml_default, false, HPXML::PlugLoadTypeTelevision, 1000, 0.6, 0.3, 1.1, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1680
+ _test_default_plug_load_values(hpxml_default, false, HPXML::PlugLoadTypeOther, 2000, 0.5, 0.4, 1.2, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1681
+ _test_default_plug_load_values(hpxml_default, false, HPXML::PlugLoadTypeElectricVehicleCharging, 4000, 0.4, 0.5, 1.3, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1682
+ _test_default_plug_load_values(hpxml_default, false, HPXML::PlugLoadTypeWellPump, 3000, 0.3, 0.6, 1.4, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
917
1683
 
918
1684
  # Test defaults
919
1685
  hpxml.plug_loads.each do |plug_load|
920
1686
  plug_load.kWh_per_year = nil
1687
+ plug_load.usage_multiplier = nil
921
1688
  plug_load.frac_sensible = nil
922
1689
  plug_load.frac_latent = nil
923
- plug_load.location = nil
924
1690
  plug_load.weekday_fractions = nil
925
1691
  plug_load.weekend_fractions = nil
926
1692
  plug_load.monthly_multipliers = nil
927
1693
  end
928
1694
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
929
1695
  hpxml_default = _test_measure()
930
- _test_default_plug_load_values(hpxml_default, HPXML::PlugLoadTypeTelevision, 620, 1.0, 0.0, HPXML::LocationInterior, '0.037, 0.018, 0.009, 0.007, 0.011, 0.018, 0.029, 0.040, 0.049, 0.058, 0.065, 0.072, 0.076, 0.086, 0.091, 0.102, 0.127, 0.156, 0.210, 0.294, 0.363, 0.344, 0.208, 0.090', '0.044, 0.022, 0.012, 0.008, 0.011, 0.014, 0.024, 0.043, 0.071, 0.094, 0.112, 0.123, 0.132, 0.156, 0.178, 0.196, 0.206, 0.213, 0.251, 0.330, 0.388, 0.358, 0.226, 0.103', '1.137, 1.129, 0.961, 0.969, 0.961, 0.993, 0.996, 0.96, 0.993, 0.867, 0.86, 1.137')
931
- _test_default_plug_load_values(hpxml_default, HPXML::PlugLoadTypeOther, 2457, 0.855, 0.045, HPXML::LocationInterior, '0.035, 0.033, 0.032, 0.031, 0.032, 0.033, 0.037, 0.042, 0.043, 0.043, 0.043, 0.044, 0.045, 0.045, 0.044, 0.046, 0.048, 0.052, 0.053, 0.05, 0.047, 0.045, 0.04, 0.036', '0.035, 0.033, 0.032, 0.031, 0.032, 0.033, 0.037, 0.042, 0.043, 0.043, 0.043, 0.044, 0.045, 0.045, 0.044, 0.046, 0.048, 0.052, 0.053, 0.05, 0.047, 0.045, 0.04, 0.036', '1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248')
932
- _test_default_plug_load_values(hpxml_default, HPXML::PlugLoadTypeElectricVehicleCharging, 1667, 0.0, 0.0, HPXML::LocationExterior, '0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042', '0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042', '1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1')
933
- _test_default_plug_load_values(hpxml_default, HPXML::PlugLoadTypeWellPump, 441, 0.0, 0.0, HPXML::LocationExterior, '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065', '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065', '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154')
1696
+ _test_default_plug_load_values(hpxml_default, true, HPXML::PlugLoadTypeTelevision, 620, 1.0, 0.0, 1.0, '0.037, 0.018, 0.009, 0.007, 0.011, 0.018, 0.029, 0.040, 0.049, 0.058, 0.065, 0.072, 0.076, 0.086, 0.091, 0.102, 0.127, 0.156, 0.210, 0.294, 0.363, 0.344, 0.208, 0.090', '0.044, 0.022, 0.012, 0.008, 0.011, 0.014, 0.024, 0.043, 0.071, 0.094, 0.112, 0.123, 0.132, 0.156, 0.178, 0.196, 0.206, 0.213, 0.251, 0.330, 0.388, 0.358, 0.226, 0.103', '1.137, 1.129, 0.961, 0.969, 0.961, 0.993, 0.996, 0.96, 0.993, 0.867, 0.86, 1.137')
1697
+ _test_default_plug_load_values(hpxml_default, true, HPXML::PlugLoadTypeOther, 2457, 0.855, 0.045, 1.0, '0.035, 0.033, 0.032, 0.031, 0.032, 0.033, 0.037, 0.042, 0.043, 0.043, 0.043, 0.044, 0.045, 0.045, 0.044, 0.046, 0.048, 0.052, 0.053, 0.05, 0.047, 0.045, 0.04, 0.036', '0.035, 0.033, 0.032, 0.031, 0.032, 0.033, 0.037, 0.042, 0.043, 0.043, 0.043, 0.044, 0.045, 0.045, 0.044, 0.046, 0.048, 0.052, 0.053, 0.05, 0.047, 0.045, 0.04, 0.036', '1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248')
1698
+ _test_default_plug_load_values(hpxml_default, true, HPXML::PlugLoadTypeElectricVehicleCharging, 1667, 0.0, 0.0, 1.0, '0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042', '0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042, 0.042', '1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1')
1699
+ _test_default_plug_load_values(hpxml_default, true, HPXML::PlugLoadTypeWellPump, 441, 0.0, 0.0, 1.0, '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065', '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065', '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154')
934
1700
  end
935
1701
 
936
1702
  def test_fuel_loads
@@ -938,445 +1704,49 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
938
1704
  hpxml = _create_hpxml('base-misc-loads-large-uncommon.xml')
939
1705
  gg_fl = hpxml.fuel_loads.select { |fl| fl.fuel_load_type == HPXML::FuelLoadTypeGrill }[0]
940
1706
  gg_fl.therm_per_year = 1000
1707
+ gg_fl.usage_multiplier = 0.9
941
1708
  gg_fl.frac_sensible = 0.6
942
1709
  gg_fl.frac_latent = 0.3
943
- gg_fl.location = HPXML::LocationInterior
944
1710
  gg_fl.weekday_fractions = ConstantDaySchedule
945
1711
  gg_fl.weekend_fractions = ConstantDaySchedule
946
1712
  gg_fl.monthly_multipliers = ConstantMonthSchedule
947
1713
  gl_fl = hpxml.fuel_loads.select { |fl| fl.fuel_load_type == HPXML::FuelLoadTypeLighting }[0]
948
1714
  gl_fl.therm_per_year = 2000
1715
+ gl_fl.usage_multiplier = 0.8
949
1716
  gl_fl.frac_sensible = 0.5
950
1717
  gl_fl.frac_latent = 0.4
951
- gl_fl.location = HPXML::LocationInterior
952
1718
  gl_fl.weekday_fractions = ConstantDaySchedule
953
1719
  gl_fl.weekend_fractions = ConstantDaySchedule
954
1720
  gl_fl.monthly_multipliers = ConstantMonthSchedule
955
1721
  gf_fl = hpxml.fuel_loads.select { |fl| fl.fuel_load_type == HPXML::FuelLoadTypeFireplace }[0]
956
1722
  gf_fl.therm_per_year = 3000
1723
+ gf_fl.usage_multiplier = 0.7
957
1724
  gf_fl.frac_sensible = 0.4
958
1725
  gf_fl.frac_latent = 0.5
959
- gf_fl.location = HPXML::LocationExterior
960
1726
  gf_fl.weekday_fractions = ConstantDaySchedule
961
1727
  gf_fl.weekend_fractions = ConstantDaySchedule
962
1728
  gf_fl.monthly_multipliers = ConstantMonthSchedule
963
1729
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
964
1730
  hpxml_default = _test_measure()
965
- _test_default_fuel_load_values(hpxml_default, HPXML::FuelLoadTypeGrill, 1000, 0.6, 0.3, HPXML::LocationInterior, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
966
- _test_default_fuel_load_values(hpxml_default, HPXML::FuelLoadTypeLighting, 2000, 0.5, 0.4, HPXML::LocationInterior, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
967
- _test_default_fuel_load_values(hpxml_default, HPXML::FuelLoadTypeFireplace, 3000, 0.4, 0.5, HPXML::LocationExterior, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1731
+ _test_default_fuel_load_values(hpxml_default, false, HPXML::FuelLoadTypeGrill, 1000, 0.6, 0.3, 0.9, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1732
+ _test_default_fuel_load_values(hpxml_default, false, HPXML::FuelLoadTypeLighting, 2000, 0.5, 0.4, 0.8, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1733
+ _test_default_fuel_load_values(hpxml_default, false, HPXML::FuelLoadTypeFireplace, 3000, 0.4, 0.5, 0.7, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
968
1734
 
969
1735
  # Test defaults
970
1736
  hpxml.fuel_loads.each do |fuel_load|
971
1737
  fuel_load.therm_per_year = nil
1738
+ fuel_load.usage_multiplier = nil
972
1739
  fuel_load.frac_sensible = nil
973
1740
  fuel_load.frac_latent = nil
974
- fuel_load.location = nil
975
1741
  fuel_load.weekday_fractions = nil
976
1742
  fuel_load.weekend_fractions = nil
977
1743
  fuel_load.monthly_multipliers = nil
978
1744
  end
979
1745
  XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
980
1746
  hpxml_default = _test_measure()
981
- _test_default_fuel_load_values(hpxml_default, HPXML::FuelLoadTypeGrill, 33, 0.0, 0.0, HPXML::LocationExterior, '0.004, 0.001, 0.001, 0.002, 0.007, 0.012, 0.029, 0.046, 0.044, 0.041, 0.044, 0.046, 0.042, 0.038, 0.049, 0.059, 0.110, 0.161, 0.115, 0.070, 0.044, 0.019, 0.013, 0.007', '0.004, 0.001, 0.001, 0.002, 0.007, 0.012, 0.029, 0.046, 0.044, 0.041, 0.044, 0.046, 0.042, 0.038, 0.049, 0.059, 0.110, 0.161, 0.115, 0.070, 0.044, 0.019, 0.013, 0.007', '1.097, 1.097, 0.991, 0.987, 0.991, 0.890, 0.896, 0.896, 0.890, 1.085, 1.085, 1.097')
982
- _test_default_fuel_load_values(hpxml_default, HPXML::FuelLoadTypeLighting, 20, 0.0, 0.0, HPXML::LocationExterior, '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065', '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065', '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154')
983
- _test_default_fuel_load_values(hpxml_default, HPXML::FuelLoadTypeFireplace, 67, 0.5, 0.1, HPXML::LocationInterior, '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065', '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065', '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154')
984
- end
985
-
986
- def test_clothes_washers
987
- # Test inputs not overridden by defaults
988
- hpxml = _create_hpxml('base.xml')
989
- hpxml.building_construction.residential_facility_type = HPXML::ResidentialTypeSFA
990
- hpxml.water_heating_systems[0].is_shared_system = true
991
- hpxml.water_heating_systems[0].number_of_units_served = 6
992
- hpxml.water_heating_systems[0].fraction_dhw_load_served = 0
993
- hpxml.clothes_washers[0].location = HPXML::LocationBasementConditioned
994
- hpxml.clothes_washers[0].is_shared_appliance = true
995
- hpxml.clothes_washers[0].usage_multiplier = 1.5
996
- hpxml.clothes_washers[0].water_heating_system_idref = hpxml.water_heating_systems[0].id
997
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
998
- hpxml_default = _test_measure()
999
- _test_default_clothes_washer_values(hpxml_default, true, HPXML::LocationBasementConditioned, 1.21, 380.0, 0.12, 1.09, 27.0, 3.2, 6.0, 1.5)
1000
-
1001
- # Test defaults
1002
- hpxml.clothes_washers[0].is_shared_appliance = nil
1003
- hpxml.clothes_washers[0].location = nil
1004
- hpxml.clothes_washers[0].integrated_modified_energy_factor = nil
1005
- hpxml.clothes_washers[0].rated_annual_kwh = nil
1006
- hpxml.clothes_washers[0].label_electric_rate = nil
1007
- hpxml.clothes_washers[0].label_gas_rate = nil
1008
- hpxml.clothes_washers[0].label_annual_gas_cost = nil
1009
- hpxml.clothes_washers[0].capacity = nil
1010
- hpxml.clothes_washers[0].label_usage = nil
1011
- hpxml.clothes_washers[0].usage_multiplier = nil
1012
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1013
- hpxml_default = _test_measure()
1014
- _test_default_clothes_washer_values(hpxml_default, false, HPXML::LocationLivingSpace, 1.0, 400.0, 0.12, 1.09, 27.0, 3.0, 6.0, 1.0)
1015
-
1016
- # Test defaults before 301-2019 Addendum A
1017
- hpxml = _create_hpxml('base.xml')
1018
- hpxml.header.eri_calculation_version = '2019'
1019
- hpxml.clothes_washers[0].is_shared_appliance = nil
1020
- hpxml.clothes_washers[0].location = nil
1021
- hpxml.clothes_washers[0].integrated_modified_energy_factor = nil
1022
- hpxml.clothes_washers[0].rated_annual_kwh = nil
1023
- hpxml.clothes_washers[0].label_electric_rate = nil
1024
- hpxml.clothes_washers[0].label_gas_rate = nil
1025
- hpxml.clothes_washers[0].label_annual_gas_cost = nil
1026
- hpxml.clothes_washers[0].capacity = nil
1027
- hpxml.clothes_washers[0].label_usage = nil
1028
- hpxml.clothes_washers[0].usage_multiplier = nil
1029
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1030
- hpxml_default = _test_measure()
1031
- _test_default_clothes_washer_values(hpxml_default, false, HPXML::LocationLivingSpace, 0.331, 704.0, 0.08, 0.58, 23.0, 2.874, 6.0, 1.0)
1032
- end
1033
-
1034
- def test_clothes_dryers
1035
- # Test inputs not overridden by defaults
1036
- hpxml = _create_hpxml('base.xml')
1037
- hpxml.building_construction.residential_facility_type = HPXML::ResidentialTypeSFA
1038
- hpxml.water_heating_systems[0].is_shared_system = true
1039
- hpxml.water_heating_systems[0].number_of_units_served = 6
1040
- hpxml.water_heating_systems[0].fraction_dhw_load_served = 0
1041
- hpxml.clothes_dryers[0].location = HPXML::LocationBasementConditioned
1042
- hpxml.clothes_dryers[0].is_shared_appliance = true
1043
- hpxml.clothes_dryers[0].control_type = HPXML::ClothesDryerControlTypeMoisture
1044
- hpxml.clothes_dryers[0].combined_energy_factor = 3.33
1045
- hpxml.clothes_dryers[0].usage_multiplier = 1.1
1046
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1047
- hpxml_default = _test_measure()
1048
- _test_default_clothes_dryer_values(hpxml_default, true, HPXML::LocationBasementConditioned, HPXML::ClothesDryerControlTypeMoisture, 3.33, 1.1)
1049
-
1050
- # Test defaults w/ electric clothes dryer
1051
- hpxml.clothes_dryers[0].location = nil
1052
- hpxml.clothes_dryers[0].is_shared_appliance = false
1053
- hpxml.clothes_dryers[0].control_type = nil
1054
- hpxml.clothes_dryers[0].combined_energy_factor = nil
1055
- hpxml.clothes_dryers[0].usage_multiplier = nil
1056
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1057
- hpxml_default = _test_measure()
1058
- _test_default_clothes_dryer_values(hpxml_default, false, HPXML::LocationLivingSpace, HPXML::ClothesDryerControlTypeTimer, 3.01, 1.0)
1059
-
1060
- # Test defaults w/ gas clothes dryer
1061
- hpxml.clothes_dryers[0].fuel_type = HPXML::FuelTypeNaturalGas
1062
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1063
- hpxml_default = _test_measure()
1064
- _test_default_clothes_dryer_values(hpxml_default, false, HPXML::LocationLivingSpace, HPXML::ClothesDryerControlTypeTimer, 3.01, 1.0)
1065
-
1066
- # Test defaults w/ electric clothes dryer before 301-2019 Addendum A
1067
- hpxml.header.eri_calculation_version = '2019'
1068
- hpxml.clothes_dryers[0].fuel_type = HPXML::FuelTypeElectricity
1069
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1070
- hpxml_default = _test_measure()
1071
- _test_default_clothes_dryer_values(hpxml_default, false, HPXML::LocationLivingSpace, HPXML::ClothesDryerControlTypeTimer, 2.62, 1.0)
1072
-
1073
- # Test defaults w/ gas clothes dryer before 301-2019 Addendum A
1074
- hpxml.clothes_dryers[0].fuel_type = HPXML::FuelTypeNaturalGas
1075
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1076
- hpxml_default = _test_measure()
1077
- _test_default_clothes_dryer_values(hpxml_default, false, HPXML::LocationLivingSpace, HPXML::ClothesDryerControlTypeTimer, 2.32, 1.0)
1078
- end
1079
-
1080
- def test_dishwashers
1081
- # Test inputs not overridden by defaults
1082
- hpxml = _create_hpxml('base.xml')
1083
- hpxml.building_construction.residential_facility_type = HPXML::ResidentialTypeSFA
1084
- hpxml.water_heating_systems[0].is_shared_system = true
1085
- hpxml.water_heating_systems[0].number_of_units_served = 6
1086
- hpxml.water_heating_systems[0].fraction_dhw_load_served = 0
1087
- hpxml.dishwashers[0].location = HPXML::LocationBasementConditioned
1088
- hpxml.dishwashers[0].is_shared_appliance = true
1089
- hpxml.dishwashers[0].usage_multiplier = 1.3
1090
- hpxml.dishwashers[0].water_heating_system_idref = hpxml.water_heating_systems[0].id
1091
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1092
- hpxml_default = _test_measure()
1093
- _test_default_dishwasher_values(hpxml_default, true, HPXML::LocationBasementConditioned, 307.0, 0.12, 1.09, 22.32, 4.0, 12, 1.3)
1094
-
1095
- # Test defaults
1096
- hpxml.dishwashers[0].is_shared_appliance = nil
1097
- hpxml.dishwashers[0].location = nil
1098
- hpxml.dishwashers[0].rated_annual_kwh = nil
1099
- hpxml.dishwashers[0].label_electric_rate = nil
1100
- hpxml.dishwashers[0].label_gas_rate = nil
1101
- hpxml.dishwashers[0].label_annual_gas_cost = nil
1102
- hpxml.dishwashers[0].label_usage = nil
1103
- hpxml.dishwashers[0].place_setting_capacity = nil
1104
- hpxml.dishwashers[0].usage_multiplier = nil
1105
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1106
- hpxml_default = _test_measure()
1107
- _test_default_dishwasher_values(hpxml_default, false, HPXML::LocationLivingSpace, 467.0, 0.12, 1.09, 33.12, 4.0, 12, 1.0)
1108
-
1109
- # Test defaults before 301-2019 Addendum A
1110
- hpxml.header.eri_calculation_version = '2019'
1111
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1112
- hpxml_default = _test_measure()
1113
- _test_default_dishwasher_values(hpxml_default, false, HPXML::LocationLivingSpace, 467.0, 0.12, 1.09, 33.12, 4.0, 12, 1.0)
1114
- end
1115
-
1116
- def test_refrigerators
1117
- # Test inputs not overridden by defaults
1118
- hpxml = _create_hpxml('base.xml')
1119
- hpxml.refrigerators[0].location = HPXML::LocationBasementConditioned
1120
- hpxml.refrigerators[0].usage_multiplier = 1.2
1121
- hpxml.refrigerators[0].weekday_fractions = ConstantDaySchedule
1122
- hpxml.refrigerators[0].weekend_fractions = ConstantDaySchedule
1123
- hpxml.refrigerators[0].monthly_multipliers = ConstantMonthSchedule
1124
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1125
- hpxml_default = _test_measure()
1126
- _test_default_refrigerator_values(hpxml_default, HPXML::LocationBasementConditioned, 650.0, 1.2, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1127
-
1128
- # Test defaults
1129
- hpxml.refrigerators[0].location = nil
1130
- hpxml.refrigerators[0].rated_annual_kwh = nil
1131
- hpxml.refrigerators[0].usage_multiplier = nil
1132
- hpxml.refrigerators[0].weekday_fractions = nil
1133
- hpxml.refrigerators[0].weekend_fractions = nil
1134
- hpxml.refrigerators[0].monthly_multipliers = nil
1135
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1136
- hpxml_default = _test_measure()
1137
- _test_default_refrigerator_values(hpxml_default, HPXML::LocationLivingSpace, 691.0, 1.0, '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837')
1138
-
1139
- # Test defaults w/ refrigerator in 5-bedroom house
1140
- hpxml.building_construction.number_of_bedrooms = 5
1141
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1142
- hpxml_default = _test_measure()
1143
- _test_default_refrigerator_values(hpxml_default, HPXML::LocationLivingSpace, 727.0, 1.0, '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837')
1144
-
1145
- # Test defaults before 301-2019 Addendum A
1146
- hpxml.header.eri_calculation_version = '2019'
1147
- hpxml.building_construction.number_of_bedrooms = 3
1148
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1149
- hpxml_default = _test_measure()
1150
- _test_default_refrigerator_values(hpxml_default, HPXML::LocationLivingSpace, 691.0, 1.0, '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837')
1151
- end
1152
-
1153
- def test_cooking_ranges
1154
- # Test inputs not overridden by defaults
1155
- hpxml = _create_hpxml('base.xml')
1156
- hpxml.cooking_ranges[0].location = HPXML::LocationBasementConditioned
1157
- hpxml.cooking_ranges[0].is_induction = true
1158
- hpxml.cooking_ranges[0].usage_multiplier = 1.1
1159
- hpxml.cooking_ranges[0].weekday_fractions = ConstantDaySchedule
1160
- hpxml.cooking_ranges[0].weekend_fractions = ConstantDaySchedule
1161
- hpxml.cooking_ranges[0].monthly_multipliers = ConstantMonthSchedule
1162
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1163
- hpxml_default = _test_measure()
1164
- _test_default_cooking_range_values(hpxml_default, HPXML::LocationBasementConditioned, true, 1.1, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1165
-
1166
- # Test defaults
1167
- hpxml.cooking_ranges[0].location = nil
1168
- hpxml.cooking_ranges[0].is_induction = nil
1169
- hpxml.cooking_ranges[0].usage_multiplier = nil
1170
- hpxml.cooking_ranges[0].weekday_fractions = nil
1171
- hpxml.cooking_ranges[0].weekend_fractions = nil
1172
- hpxml.cooking_ranges[0].monthly_multipliers = nil
1173
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1174
- hpxml_default = _test_measure()
1175
- _test_default_cooking_range_values(hpxml_default, HPXML::LocationLivingSpace, false, 1.0, '0.007, 0.007, 0.004, 0.004, 0.007, 0.011, 0.025, 0.042, 0.046, 0.048, 0.042, 0.050, 0.057, 0.046, 0.057, 0.044, 0.092, 0.150, 0.117, 0.060, 0.035, 0.025, 0.016, 0.011', '0.007, 0.007, 0.004, 0.004, 0.007, 0.011, 0.025, 0.042, 0.046, 0.048, 0.042, 0.050, 0.057, 0.046, 0.057, 0.044, 0.092, 0.150, 0.117, 0.060, 0.035, 0.025, 0.016, 0.011', '1.097, 1.097, 0.991, 0.987, 0.991, 0.890, 0.896, 0.896, 0.890, 1.085, 1.085, 1.097')
1176
-
1177
- # Test defaults before 301-2019 Addendum A
1178
- hpxml.header.eri_calculation_version = '2019'
1179
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1180
- hpxml_default = _test_measure()
1181
- _test_default_cooking_range_values(hpxml_default, HPXML::LocationLivingSpace, false, 1.0, '0.007, 0.007, 0.004, 0.004, 0.007, 0.011, 0.025, 0.042, 0.046, 0.048, 0.042, 0.050, 0.057, 0.046, 0.057, 0.044, 0.092, 0.150, 0.117, 0.060, 0.035, 0.025, 0.016, 0.011', '0.007, 0.007, 0.004, 0.004, 0.007, 0.011, 0.025, 0.042, 0.046, 0.048, 0.042, 0.050, 0.057, 0.046, 0.057, 0.044, 0.092, 0.150, 0.117, 0.060, 0.035, 0.025, 0.016, 0.011', '1.097, 1.097, 0.991, 0.987, 0.991, 0.890, 0.896, 0.896, 0.890, 1.085, 1.085, 1.097')
1182
- end
1183
-
1184
- def test_ovens
1185
- # Test inputs not overridden by defaults
1186
- hpxml = _create_hpxml('base.xml')
1187
- hpxml.ovens[0].is_convection = true
1188
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1189
- hpxml_default = _test_measure()
1190
- _test_default_oven_values(hpxml_default, true)
1191
-
1192
- # Test defaults
1193
- hpxml.ovens[0].is_convection = nil
1194
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1195
- hpxml_default = _test_measure()
1196
- _test_default_oven_values(hpxml_default, false)
1197
-
1198
- # Test defaults before 301-2019 Addendum A
1199
- hpxml.header.eri_calculation_version = '2019'
1200
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1201
- hpxml_default = _test_measure()
1202
- _test_default_oven_values(hpxml_default, false)
1203
- end
1204
-
1205
- def test_extra_refrigerators
1206
- # Test inputs not overridden by defaults
1207
- hpxml = _create_hpxml('base-misc-loads-large-uncommon.xml')
1208
- hpxml.refrigerators.each do |refrigerator|
1209
- refrigerator.location = HPXML::LocationBasementConditioned
1210
- refrigerator.rated_annual_kwh = 333.0
1211
- refrigerator.usage_multiplier = 1.5
1212
- refrigerator.weekday_fractions = ConstantDaySchedule
1213
- refrigerator.weekend_fractions = ConstantDaySchedule
1214
- refrigerator.monthly_multipliers = ConstantMonthSchedule
1215
- end
1216
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1217
- hpxml_default = _test_measure()
1218
- _test_default_extra_refrigerators_values(hpxml_default, HPXML::LocationBasementConditioned, 333.0, 1.5, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1219
-
1220
- # Test defaults
1221
- hpxml.refrigerators.each do |refrigerator|
1222
- refrigerator.location = nil
1223
- refrigerator.rated_annual_kwh = nil
1224
- refrigerator.usage_multiplier = nil
1225
- refrigerator.weekday_fractions = nil
1226
- refrigerator.weekend_fractions = nil
1227
- refrigerator.monthly_multipliers = nil
1228
- end
1229
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1230
- hpxml_default = _test_measure()
1231
- _test_default_extra_refrigerators_values(hpxml_default, HPXML::LocationGarage, 244.0, 1.0, '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837')
1232
- end
1233
-
1234
- def test_freezers
1235
- # Test inputs not overridden by defaults
1236
- hpxml = _create_hpxml('base-misc-loads-large-uncommon.xml')
1237
- hpxml.freezers.each do |freezer|
1238
- freezer.location = HPXML::LocationBasementConditioned
1239
- freezer.rated_annual_kwh = 333.0
1240
- freezer.usage_multiplier = 1.5
1241
- freezer.weekday_fractions = ConstantDaySchedule
1242
- freezer.weekend_fractions = ConstantDaySchedule
1243
- freezer.monthly_multipliers = ConstantMonthSchedule
1244
- end
1245
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1246
- hpxml_default = _test_measure()
1247
- _test_default_freezers_values(hpxml_default, HPXML::LocationBasementConditioned, 333.0, 1.5, ConstantDaySchedule, ConstantDaySchedule, ConstantMonthSchedule)
1248
-
1249
- # Test defaults
1250
- hpxml.freezers.each do |freezer|
1251
- freezer.location = nil
1252
- freezer.rated_annual_kwh = nil
1253
- freezer.usage_multiplier = nil
1254
- freezer.weekday_fractions = nil
1255
- freezer.weekend_fractions = nil
1256
- freezer.monthly_multipliers = nil
1257
- end
1258
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1259
- hpxml_default = _test_measure()
1260
- _test_default_freezers_values(hpxml_default, HPXML::LocationGarage, 320.0, 1.0, '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.040, 0.039, 0.038, 0.037, 0.036, 0.036, 0.038, 0.040, 0.041, 0.041, 0.040, 0.040, 0.042, 0.042, 0.042, 0.041, 0.044, 0.048, 0.050, 0.048, 0.047, 0.046, 0.044, 0.041', '0.837, 0.835, 1.084, 1.084, 1.084, 1.096, 1.096, 1.096, 1.096, 0.931, 0.925, 0.837')
1261
- end
1262
-
1263
- def test_lighting
1264
- # Test inputs not overridden by defaults
1265
- hpxml = _create_hpxml('base.xml')
1266
- hpxml.lighting.interior_usage_multiplier = 2.0
1267
- hpxml.lighting.garage_usage_multiplier = 2.0
1268
- hpxml.lighting.exterior_usage_multiplier = 2.0
1269
- hpxml.lighting.interior_weekday_fractions = ConstantDaySchedule
1270
- hpxml.lighting.interior_weekend_fractions = ConstantDaySchedule
1271
- hpxml.lighting.interior_monthly_multipliers = ConstantMonthSchedule
1272
- hpxml.lighting.exterior_weekday_fractions = ConstantDaySchedule
1273
- hpxml.lighting.exterior_weekend_fractions = ConstantDaySchedule
1274
- hpxml.lighting.exterior_monthly_multipliers = ConstantMonthSchedule
1275
- hpxml.lighting.garage_weekday_fractions = ConstantDaySchedule
1276
- hpxml.lighting.garage_weekend_fractions = ConstantDaySchedule
1277
- hpxml.lighting.garage_monthly_multipliers = ConstantMonthSchedule
1278
- hpxml.lighting.holiday_exists = true
1279
- hpxml.lighting.holiday_kwh_per_day = 0.7
1280
- hpxml.lighting.holiday_period_begin_month = 11
1281
- hpxml.lighting.holiday_period_begin_day_of_month = 19
1282
- hpxml.lighting.holiday_period_end_month = 12
1283
- hpxml.lighting.holiday_period_end_day_of_month = 31
1284
- hpxml.lighting.holiday_weekday_fractions = ConstantDaySchedule
1285
- hpxml.lighting.holiday_weekend_fractions = ConstantDaySchedule
1286
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1287
- hpxml_default = _test_measure()
1288
- _test_default_lighting_values(hpxml_default, 2.0, 2.0, 2.0,
1289
- { int_wk_sch: ConstantDaySchedule,
1290
- int_wknd_sch: ConstantDaySchedule,
1291
- int_month_mult: ConstantMonthSchedule,
1292
- ext_wk_sch: ConstantDaySchedule,
1293
- ext_wknd_sch: ConstantDaySchedule,
1294
- ext_month_mult: ConstantMonthSchedule,
1295
- grg_wk_sch: ConstantDaySchedule,
1296
- grg_wknd_sch: ConstantDaySchedule,
1297
- grg_month_mult: ConstantMonthSchedule,
1298
- hol_kwh_per_day: 0.7,
1299
- hol_begin_month: 11,
1300
- hol_begin_day_of_month: 19,
1301
- hol_end_month: 12,
1302
- hol_end_day_of_month: 31,
1303
- hol_wk_sch: ConstantDaySchedule,
1304
- hol_wknd_sch: ConstantDaySchedule })
1305
-
1306
- # Test defaults
1307
- hpxml.lighting.interior_usage_multiplier = nil
1308
- hpxml.lighting.garage_usage_multiplier = nil
1309
- hpxml.lighting.exterior_usage_multiplier = nil
1310
- hpxml.lighting.interior_weekday_fractions = nil
1311
- hpxml.lighting.interior_weekend_fractions = nil
1312
- hpxml.lighting.interior_monthly_multipliers = nil
1313
- hpxml.lighting.exterior_weekday_fractions = nil
1314
- hpxml.lighting.exterior_weekend_fractions = nil
1315
- hpxml.lighting.exterior_monthly_multipliers = nil
1316
- hpxml.lighting.garage_weekday_fractions = nil
1317
- hpxml.lighting.garage_weekend_fractions = nil
1318
- hpxml.lighting.garage_monthly_multipliers = nil
1319
- hpxml.lighting.holiday_exists = nil
1320
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1321
- hpxml_default = _test_measure()
1322
- _test_default_lighting_values(hpxml_default, 1.0, 1.0, 1.0,
1323
- { ext_wk_sch: '0.046, 0.046, 0.046, 0.046, 0.046, 0.037, 0.035, 0.034, 0.033, 0.028, 0.022, 0.015, 0.012, 0.011, 0.011, 0.012, 0.019, 0.037, 0.049, 0.065, 0.091, 0.105, 0.091, 0.063',
1324
- ext_wknd_sch: '0.046, 0.046, 0.045, 0.045, 0.046, 0.045, 0.044, 0.041, 0.036, 0.03, 0.024, 0.016, 0.012, 0.011, 0.011, 0.012, 0.019, 0.038, 0.048, 0.06, 0.083, 0.098, 0.085, 0.059',
1325
- ext_month_mult: '1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248' })
1326
-
1327
- # Test defaults w/ garage
1328
- hpxml = _create_hpxml('base-enclosure-garage.xml')
1329
- hpxml.lighting.interior_usage_multiplier = nil
1330
- hpxml.lighting.garage_usage_multiplier = nil
1331
- hpxml.lighting.exterior_usage_multiplier = nil
1332
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1333
- hpxml_default = _test_measure()
1334
- _test_default_lighting_values(hpxml_default, 1.0, 1.0, 1.0,
1335
- { ext_wk_sch: '0.046, 0.046, 0.046, 0.046, 0.046, 0.037, 0.035, 0.034, 0.033, 0.028, 0.022, 0.015, 0.012, 0.011, 0.011, 0.012, 0.019, 0.037, 0.049, 0.065, 0.091, 0.105, 0.091, 0.063',
1336
- ext_wknd_sch: '0.046, 0.046, 0.045, 0.045, 0.046, 0.045, 0.044, 0.041, 0.036, 0.03, 0.024, 0.016, 0.012, 0.011, 0.011, 0.012, 0.019, 0.038, 0.048, 0.06, 0.083, 0.098, 0.085, 0.059',
1337
- ext_month_mult: '1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248',
1338
- grg_wk_sch: '0.046, 0.046, 0.046, 0.046, 0.046, 0.037, 0.035, 0.034, 0.033, 0.028, 0.022, 0.015, 0.012, 0.011, 0.011, 0.012, 0.019, 0.037, 0.049, 0.065, 0.091, 0.105, 0.091, 0.063',
1339
- grg_wknd_sch: '0.046, 0.046, 0.045, 0.045, 0.046, 0.045, 0.044, 0.041, 0.036, 0.03, 0.024, 0.016, 0.012, 0.011, 0.011, 0.012, 0.019, 0.038, 0.048, 0.06, 0.083, 0.098, 0.085, 0.059',
1340
- grg_month_mult: '1.248, 1.257, 0.993, 0.989, 0.993, 0.827, 0.821, 0.821, 0.827, 0.99, 0.987, 1.248' })
1341
- end
1342
-
1343
- def test_pv_systems
1344
- # Test inputs not overridden by defaults
1345
- hpxml = _create_hpxml('base-pv.xml')
1346
- hpxml.building_construction.residential_facility_type = HPXML::ResidentialTypeSFA
1347
- hpxml.pv_systems.each do |pv|
1348
- pv.is_shared_system = true
1349
- pv.number_of_bedrooms_served = 20
1350
- pv.inverter_efficiency = 0.90
1351
- pv.system_losses_fraction = 0.20
1352
- end
1353
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1354
- hpxml_default = _test_measure()
1355
- expected_interver_efficiency = [0.90, 0.90]
1356
- expected_system_loss_frac = [0.20, 0.20]
1357
- _test_default_pv_system_values(hpxml_default, expected_interver_efficiency, expected_system_loss_frac, true)
1358
-
1359
- # Test defaults w/o year modules manufactured
1360
- hpxml.pv_systems.each do |pv|
1361
- pv.is_shared_system = nil
1362
- pv.inverter_efficiency = nil
1363
- pv.system_losses_fraction = nil
1364
- end
1365
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1366
- hpxml_default = _test_measure()
1367
- expected_interver_efficiency = [0.96, 0.96]
1368
- expected_system_loss_frac = [0.14, 0.14]
1369
- _test_default_pv_system_values(hpxml_default, expected_interver_efficiency, expected_system_loss_frac, false)
1370
-
1371
- # Test defaults w/ year modules manufactured
1372
- hpxml.pv_systems.each do |pv|
1373
- pv.year_modules_manufactured = 2010
1374
- end
1375
- XMLHelper.write_file(hpxml.to_oga, @tmp_hpxml_path)
1376
- hpxml_default = _test_measure()
1377
- expected_interver_efficiency = [0.96, 0.96]
1378
- expected_system_loss_frac = [0.182, 0.182]
1379
- _test_default_pv_system_values(hpxml_default, expected_interver_efficiency, expected_system_loss_frac, false)
1747
+ _test_default_fuel_load_values(hpxml_default, true, HPXML::FuelLoadTypeGrill, 33, 0.0, 0.0, 1.0, '0.004, 0.001, 0.001, 0.002, 0.007, 0.012, 0.029, 0.046, 0.044, 0.041, 0.044, 0.046, 0.042, 0.038, 0.049, 0.059, 0.110, 0.161, 0.115, 0.070, 0.044, 0.019, 0.013, 0.007', '0.004, 0.001, 0.001, 0.002, 0.007, 0.012, 0.029, 0.046, 0.044, 0.041, 0.044, 0.046, 0.042, 0.038, 0.049, 0.059, 0.110, 0.161, 0.115, 0.070, 0.044, 0.019, 0.013, 0.007', '1.097, 1.097, 0.991, 0.987, 0.991, 0.890, 0.896, 0.896, 0.890, 1.085, 1.085, 1.097')
1748
+ _test_default_fuel_load_values(hpxml_default, true, HPXML::FuelLoadTypeLighting, 20, 0.0, 0.0, 1.0, '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065', '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065', '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154')
1749
+ _test_default_fuel_load_values(hpxml_default, true, HPXML::FuelLoadTypeFireplace, 67, 0.5, 0.1, 1.0, '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065', '0.044, 0.023, 0.019, 0.015, 0.016, 0.018, 0.026, 0.033, 0.033, 0.032, 0.033, 0.033, 0.032, 0.032, 0.032, 0.033, 0.045, 0.057, 0.066, 0.076, 0.081, 0.086, 0.075, 0.065', '1.154, 1.161, 1.013, 1.010, 1.013, 0.888, 0.883, 0.883, 0.888, 0.978, 0.974, 1.154')
1380
1750
  end
1381
1751
 
1382
1752
  def _test_measure()
@@ -1414,515 +1784,1054 @@ class HPXMLtoOpenStudioDefaultsTest < MiniTest::Test
1414
1784
  return hpxml_default
1415
1785
  end
1416
1786
 
1417
- def _test_default_header_values(hpxml, tstep, sim_begin_month, sim_begin_day, sim_end_month, sim_end_day, sim_calendar_year,
1418
- dst_enabled, dst_begin_month, dst_begin_day_of_month, dst_end_month, dst_end_day_of_month,
1787
+ def _test_default_header_values(hpxml, isdefaulted, tstep, sim_begin_month, sim_begin_day, sim_end_month, sim_end_day, sim_calendar_year,
1788
+ dst_enabled, dst_begin_month, dst_begin_day, dst_end_month, dst_end_day,
1419
1789
  use_max_load_for_heat_pumps, allow_increased_fixed_capacities)
1420
1790
  assert_equal(tstep, hpxml.header.timestep)
1791
+ assert_equal(isdefaulted, hpxml.header.timestep_isdefaulted)
1792
+
1421
1793
  assert_equal(sim_begin_month, hpxml.header.sim_begin_month)
1422
- assert_equal(sim_begin_day, hpxml.header.sim_begin_day_of_month)
1794
+ assert_equal(isdefaulted, hpxml.header.sim_begin_month_isdefaulted)
1795
+
1796
+ assert_equal(sim_begin_day, hpxml.header.sim_begin_day)
1797
+ assert_equal(isdefaulted, hpxml.header.sim_begin_day_isdefaulted)
1798
+
1423
1799
  assert_equal(sim_end_month, hpxml.header.sim_end_month)
1424
- assert_equal(sim_end_day, hpxml.header.sim_end_day_of_month)
1800
+ assert_equal(isdefaulted, hpxml.header.sim_end_month_isdefaulted)
1801
+
1802
+ assert_equal(sim_end_day, hpxml.header.sim_end_day)
1803
+ assert_equal(isdefaulted, hpxml.header.sim_end_day_isdefaulted)
1804
+
1425
1805
  assert_equal(sim_calendar_year, hpxml.header.sim_calendar_year)
1806
+ assert_equal(isdefaulted, hpxml.header.sim_calendar_year_isdefaulted)
1807
+
1426
1808
  assert_equal(dst_enabled, hpxml.header.dst_enabled)
1809
+ assert_equal(isdefaulted, hpxml.header.dst_enabled_isdefaulted)
1810
+
1427
1811
  assert_equal(dst_begin_month, hpxml.header.dst_begin_month)
1428
- assert_equal(dst_begin_day_of_month, hpxml.header.dst_begin_day_of_month)
1812
+ assert_equal(isdefaulted, hpxml.header.dst_begin_month_isdefaulted)
1813
+
1814
+ assert_equal(dst_begin_day, hpxml.header.dst_begin_day)
1815
+ assert_equal(isdefaulted, hpxml.header.dst_begin_day_isdefaulted)
1816
+
1429
1817
  assert_equal(dst_end_month, hpxml.header.dst_end_month)
1430
- assert_equal(dst_end_day_of_month, hpxml.header.dst_end_day_of_month)
1818
+ assert_equal(isdefaulted, hpxml.header.dst_end_month_isdefaulted)
1819
+
1820
+ assert_equal(dst_end_day, hpxml.header.dst_end_day)
1821
+ assert_equal(isdefaulted, hpxml.header.dst_end_day_isdefaulted)
1822
+
1431
1823
  assert_equal(use_max_load_for_heat_pumps, hpxml.header.use_max_load_for_heat_pumps)
1824
+ assert_equal(isdefaulted, hpxml.header.use_max_load_for_heat_pumps_isdefaulted)
1825
+
1432
1826
  assert_equal(allow_increased_fixed_capacities, hpxml.header.allow_increased_fixed_capacities)
1827
+ assert_equal(isdefaulted, hpxml.header.allow_increased_fixed_capacities_isdefaulted)
1433
1828
  end
1434
1829
 
1435
- def _test_default_site_values(hpxml, site_type, shelter_coefficient)
1830
+ def _test_default_site_values(hpxml, isdefaulted, site_type, shelter_coefficient)
1436
1831
  assert_equal(site_type, hpxml.site.site_type)
1832
+ assert_equal(isdefaulted, hpxml.site.site_type_isdefaulted)
1833
+
1437
1834
  assert_equal(shelter_coefficient, hpxml.site.shelter_coefficient)
1835
+ assert_equal(isdefaulted, hpxml.site.shelter_coefficient_isdefaulted)
1438
1836
  end
1439
1837
 
1440
- def _test_default_occupancy_values(hpxml, num_occupants)
1838
+ def _test_default_occupancy_values(hpxml, isdefaulted, num_occupants)
1441
1839
  assert_equal(num_occupants, hpxml.building_occupancy.number_of_residents)
1840
+ assert_equal(isdefaulted, hpxml.building_occupancy.number_of_residents_isdefaulted)
1841
+ end
1842
+
1843
+ def _test_default_building_construction_values(hpxml, isdefaulted, building_volume, average_ceiling_height, has_flue_or_chimney, n_bathrooms)
1844
+ assert_equal(building_volume, hpxml.building_construction.conditioned_building_volume)
1845
+ assert_equal(average_ceiling_height, hpxml.building_construction.average_ceiling_height)
1846
+ if isdefaulted
1847
+ assert_equal(isdefaulted, hpxml.building_construction.conditioned_building_volume_isdefaulted || hpxml.building_construction.average_ceiling_height_isdefaulted)
1848
+ else
1849
+ assert_equal(isdefaulted, hpxml.building_construction.conditioned_building_volume_isdefaulted)
1850
+ assert_equal(isdefaulted, hpxml.building_construction.average_ceiling_height_isdefaulted)
1851
+ end
1852
+
1853
+ assert_equal(has_flue_or_chimney, hpxml.building_construction.has_flue_or_chimney)
1854
+ assert_equal(isdefaulted, hpxml.building_construction.has_flue_or_chimney_isdefaulted)
1855
+
1856
+ assert_equal(n_bathrooms, hpxml.building_construction.number_of_bathrooms)
1857
+ assert_equal(isdefaulted, hpxml.building_construction.number_of_bathrooms_isdefaulted)
1858
+ end
1859
+
1860
+ def _test_default_infiltration_values(hpxml, isdefaulted, volume)
1861
+ air_infiltration_measurement = hpxml.air_infiltration_measurements[0]
1862
+
1863
+ assert_equal(volume, air_infiltration_measurement.infiltration_volume)
1864
+ assert_equal(isdefaulted, air_infiltration_measurement.infiltration_volume_isdefaulted)
1865
+ end
1866
+
1867
+ def _test_default_attic_values(hpxml, isdefaulted, sla)
1868
+ attic = hpxml.attics[0]
1869
+
1870
+ assert_equal(sla, attic.vented_attic_sla)
1871
+ assert_equal(isdefaulted, attic.vented_attic_sla_isdefaulted)
1872
+ end
1873
+
1874
+ def _test_default_foundation_values(hpxml, isdefaulted, sla)
1875
+ foundation = hpxml.foundations[0]
1876
+
1877
+ assert_equal(sla, foundation.vented_crawlspace_sla)
1878
+ assert_equal(isdefaulted, foundation.vented_crawlspace_sla_isdefaulted)
1879
+ end
1880
+
1881
+ def _test_default_roof_values(hpxml, isdefaulted, roof_type, solar_absorptance, roof_color, emittance, radiant_barrier)
1882
+ roof = hpxml.roofs[0]
1883
+
1884
+ assert_equal(roof_type, roof.roof_type)
1885
+ assert_equal(isdefaulted, roof.roof_type_isdefaulted)
1886
+
1887
+ assert_equal(solar_absorptance, roof.solar_absorptance)
1888
+ assert_equal(roof_color, roof.roof_color)
1889
+ if isdefaulted
1890
+ assert_equal(isdefaulted, roof.solar_absorptance_isdefaulted || roof.roof_color_isdefaulted)
1891
+ else
1892
+ assert_equal(isdefaulted, roof.solar_absorptance_isdefaulted)
1893
+ assert_equal(isdefaulted, roof.roof_color_isdefaulted)
1894
+ end
1895
+
1896
+ assert_equal(emittance, roof.emittance)
1897
+ assert_equal(isdefaulted, roof.emittance_isdefaulted)
1898
+
1899
+ assert_equal(radiant_barrier, roof.radiant_barrier)
1900
+ assert_equal(isdefaulted, roof.radiant_barrier_isdefaulted)
1901
+ end
1902
+
1903
+ def _test_default_rim_joist_values(hpxml, isdefaulted, siding, solar_absorptance, color, emittance)
1904
+ rim_joist = hpxml.rim_joists[0]
1905
+
1906
+ assert_equal(siding, rim_joist.siding)
1907
+ assert_equal(isdefaulted, rim_joist.siding_isdefaulted)
1908
+
1909
+ assert_equal(solar_absorptance, rim_joist.solar_absorptance)
1910
+ assert_equal(color, rim_joist.color)
1911
+ if isdefaulted
1912
+ assert_equal(isdefaulted, rim_joist.solar_absorptance_isdefaulted || rim_joist.color_isdefaulted)
1913
+ else
1914
+ assert_equal(isdefaulted, rim_joist.solar_absorptance_isdefaulted)
1915
+ assert_equal(isdefaulted, rim_joist.color_isdefaulted)
1916
+ end
1917
+
1918
+ assert_equal(emittance, rim_joist.emittance)
1919
+ assert_equal(isdefaulted, rim_joist.emittance_isdefaulted)
1920
+ end
1921
+
1922
+ def _test_default_wall_values(hpxml, isdefaulted, siding, solar_absorptance, color, emittance)
1923
+ wall = hpxml.walls[0]
1924
+
1925
+ assert_equal(siding, wall.siding)
1926
+ assert_equal(isdefaulted, wall.siding_isdefaulted)
1927
+
1928
+ assert_equal(solar_absorptance, wall.solar_absorptance)
1929
+ assert_equal(color, wall.color)
1930
+ if isdefaulted
1931
+ assert_equal(isdefaulted, wall.solar_absorptance_isdefaulted || wall.color_isdefaulted)
1932
+ else
1933
+ assert_equal(isdefaulted, wall.solar_absorptance_isdefaulted)
1934
+ assert_equal(isdefaulted, wall.color_isdefaulted)
1935
+ end
1936
+
1937
+ assert_equal(emittance, wall.emittance)
1938
+ assert_equal(isdefaulted, wall.emittance_isdefaulted)
1939
+ end
1940
+
1941
+ def _test_default_foundation_wall_values(hpxml, isdefaulted, thickness)
1942
+ foundation_wall = hpxml.foundation_walls[0]
1943
+
1944
+ assert_equal(thickness, foundation_wall.thickness)
1945
+ assert_equal(isdefaulted, foundation_wall.thickness_isdefaulted)
1946
+ end
1947
+
1948
+ def _test_default_slab_values(hpxml, isdefaulted, thickness, carpet_r_value, carpet_fraction)
1949
+ slab = hpxml.slabs[0]
1950
+
1951
+ assert_equal(thickness, slab.thickness)
1952
+ assert_equal(isdefaulted, slab.thickness_isdefaulted)
1953
+
1954
+ assert_equal(carpet_r_value, slab.carpet_r_value)
1955
+ assert_equal(isdefaulted, slab.carpet_r_value_isdefaulted)
1956
+
1957
+ assert_equal(carpet_fraction, slab.carpet_fraction)
1958
+ assert_equal(isdefaulted, slab.carpet_fraction_isdefaulted)
1959
+ end
1960
+
1961
+ def _test_default_window_values(hpxml, isdefaulted, summer_shade_coeffs, winter_shade_coeffs, fraction_operable)
1962
+ assert_equal(summer_shade_coeffs.size, hpxml.windows.size)
1963
+ hpxml.windows.each_with_index do |window, idx|
1964
+ assert_equal(summer_shade_coeffs[idx], window.interior_shading_factor_summer)
1965
+ assert_equal(isdefaulted, window.interior_shading_factor_summer_isdefaulted)
1966
+
1967
+ assert_equal(winter_shade_coeffs[idx], window.interior_shading_factor_winter)
1968
+ assert_equal(isdefaulted, window.interior_shading_factor_winter_isdefaulted)
1969
+
1970
+ assert_equal(fraction_operable[idx], window.fraction_operable)
1971
+ assert_equal(isdefaulted, window.fraction_operable_isdefaulted)
1972
+ end
1973
+ end
1974
+
1975
+ def _test_default_skylight_values(hpxml, isdefaulted, summer_shade_coeffs, winter_shade_coeffs)
1976
+ assert_equal(summer_shade_coeffs.size, hpxml.skylights.size)
1977
+ hpxml.skylights.each_with_index do |skylight, idx|
1978
+ assert_equal(summer_shade_coeffs[idx], skylight.interior_shading_factor_summer)
1979
+ assert_equal(isdefaulted, skylight.interior_shading_factor_summer_isdefaulted)
1980
+
1981
+ assert_equal(winter_shade_coeffs[idx], skylight.interior_shading_factor_winter)
1982
+ assert_equal(isdefaulted, skylight.interior_shading_factor_winter_isdefaulted)
1983
+ end
1442
1984
  end
1443
1985
 
1444
- def _test_default_air_conditioner_values(hpxml, shr, compressor_type)
1986
+ def _test_default_central_air_conditioner_values(hpxml, isdefaulted, shr, compressor_type, fan_watts_per_cfm)
1445
1987
  cooling_system = hpxml.cooling_systems[0]
1988
+
1446
1989
  assert_equal(shr, cooling_system.cooling_shr)
1990
+ assert_equal(isdefaulted, cooling_system.cooling_shr_isdefaulted)
1991
+
1447
1992
  assert_equal(compressor_type, cooling_system.compressor_type)
1993
+ assert_equal(isdefaulted, cooling_system.compressor_type_isdefaulted)
1994
+
1995
+ assert_equal(fan_watts_per_cfm, cooling_system.fan_watts_per_cfm)
1996
+ assert_equal(isdefaulted, cooling_system.fan_watts_per_cfm_isdefaulted)
1997
+ end
1998
+
1999
+ def _test_default_room_air_conditioner_values(hpxml, isdefaulted, shr)
2000
+ cooling_system = hpxml.cooling_systems[0]
2001
+
2002
+ assert_equal(shr, cooling_system.cooling_shr)
2003
+ assert_equal(isdefaulted, cooling_system.cooling_shr_isdefaulted)
2004
+ end
2005
+
2006
+ def _test_default_mini_split_air_conditioner_values(hpxml, isdefaulted, shr, fan_watts_per_cfm)
2007
+ cooling_system = hpxml.cooling_systems[0]
2008
+
2009
+ assert_equal(shr, cooling_system.cooling_shr)
2010
+ assert_equal(isdefaulted, cooling_system.cooling_shr_isdefaulted)
2011
+
2012
+ assert_equal(fan_watts_per_cfm, cooling_system.fan_watts_per_cfm)
2013
+ assert_equal(isdefaulted, cooling_system.fan_watts_per_cfm_isdefaulted)
2014
+ end
2015
+
2016
+ def _test_default_furnace_values(hpxml, isdefaulted, fan_watts_per_cfm)
2017
+ heating_system = hpxml.heating_systems[0]
2018
+
2019
+ assert_equal(fan_watts_per_cfm, heating_system.fan_watts_per_cfm)
2020
+ assert_equal(isdefaulted, heating_system.fan_watts_per_cfm_isdefaulted)
2021
+ end
2022
+
2023
+ def _test_default_wall_furnace_values(hpxml, isdefaulted, fan_watts)
2024
+ heating_system = hpxml.heating_systems[0]
2025
+
2026
+ assert_equal(fan_watts, heating_system.fan_watts)
2027
+ assert_equal(isdefaulted, heating_system.fan_watts_isdefaulted)
2028
+ end
2029
+
2030
+ def _test_default_floor_furnace_values(hpxml, isdefaulted, fan_watts)
2031
+ heating_system = hpxml.heating_systems[0]
2032
+
2033
+ assert_equal(fan_watts, heating_system.fan_watts)
2034
+ assert_equal(isdefaulted, heating_system.fan_watts_isdefaulted)
2035
+ end
2036
+
2037
+ def _test_default_stove_values(hpxml, isdefaulted, fan_watts)
2038
+ heating_system = hpxml.heating_systems[0]
2039
+
2040
+ assert_equal(fan_watts, heating_system.fan_watts)
2041
+ assert_equal(isdefaulted, heating_system.fan_watts_isdefaulted)
2042
+ end
2043
+
2044
+ def _test_default_portable_heater_values(hpxml, isdefaulted, fan_watts)
2045
+ heating_system = hpxml.heating_systems[0]
2046
+
2047
+ assert_equal(fan_watts, heating_system.fan_watts)
2048
+ assert_equal(isdefaulted, heating_system.fan_watts_isdefaulted)
2049
+ end
2050
+
2051
+ def _test_default_fixed_heater_values(hpxml, isdefaulted, fan_watts)
2052
+ heating_system = hpxml.heating_systems[0]
2053
+
2054
+ assert_equal(fan_watts, heating_system.fan_watts)
2055
+ assert_equal(isdefaulted, heating_system.fan_watts_isdefaulted)
2056
+ end
2057
+
2058
+ def _test_default_fireplace_values(hpxml, isdefaulted, fan_watts)
2059
+ heating_system = hpxml.heating_systems[0]
2060
+
2061
+ assert_equal(fan_watts, heating_system.fan_watts)
2062
+ assert_equal(isdefaulted, heating_system.fan_watts_isdefaulted)
2063
+ end
2064
+
2065
+ def _test_default_boiler_values(hpxml, isdefaulted, eae)
2066
+ heating_system = hpxml.heating_systems[0]
2067
+
2068
+ assert_equal(eae, heating_system.electric_auxiliary_energy)
2069
+ assert_equal(isdefaulted, heating_system.electric_auxiliary_energy_isdefaulted)
2070
+ end
2071
+
2072
+ def _test_default_air_to_air_heat_pump_values(hpxml, isdefaulted, shr, compressor_type, fan_watts_per_cfm)
2073
+ heat_pump = hpxml.heat_pumps[0]
2074
+
2075
+ assert_equal(shr, heat_pump.cooling_shr)
2076
+ assert_equal(isdefaulted, heat_pump.cooling_shr_isdefaulted)
2077
+
2078
+ assert_equal(compressor_type, heat_pump.compressor_type)
2079
+ assert_equal(isdefaulted, heat_pump.compressor_type_isdefaulted)
2080
+
2081
+ assert_equal(fan_watts_per_cfm, heat_pump.fan_watts_per_cfm)
2082
+ assert_equal(isdefaulted, heat_pump.fan_watts_per_cfm_isdefaulted)
2083
+ end
2084
+
2085
+ def _test_default_mini_split_heat_pump_values(hpxml, isdefaulted, shr, fan_watts_per_cfm)
2086
+ heat_pump = hpxml.heat_pumps[0]
2087
+
2088
+ assert_equal(shr, heat_pump.cooling_shr)
2089
+ assert_equal(isdefaulted, heat_pump.cooling_shr_isdefaulted)
2090
+
2091
+ assert_equal(fan_watts_per_cfm, heat_pump.fan_watts_per_cfm)
2092
+ assert_equal(isdefaulted, heat_pump.fan_watts_per_cfm_isdefaulted)
2093
+ end
2094
+
2095
+ def _test_default_ground_to_air_heat_pump_values(hpxml, isdefaulted, pump_watts_per_ton, fan_watts_per_cfm)
2096
+ heat_pump = hpxml.heat_pumps[0]
2097
+
2098
+ assert_equal(pump_watts_per_ton, heat_pump.pump_watts_per_ton)
2099
+ assert_equal(isdefaulted, heat_pump.pump_watts_per_ton_isdefaulted)
2100
+
2101
+ assert_equal(fan_watts_per_cfm, heat_pump.fan_watts_per_cfm)
2102
+ assert_equal(isdefaulted, heat_pump.fan_watts_per_cfm_isdefaulted)
2103
+ end
2104
+
2105
+ def _test_default_hvac_control_values(hpxml, isdefaulted, htg_setback_start_hr, clg_setup_start_hr)
2106
+ hvac_control = hpxml.hvac_controls[0]
2107
+
2108
+ assert_equal(htg_setback_start_hr, hvac_control.heating_setback_start_hour)
2109
+ assert_equal(isdefaulted, hvac_control.heating_setback_start_hour_isdefaulted)
2110
+
2111
+ assert_equal(clg_setup_start_hr, hvac_control.cooling_setup_start_hour)
2112
+ assert_equal(isdefaulted, hvac_control.cooling_setup_start_hour_isdefaulted)
2113
+ end
2114
+
2115
+ def _test_default_duct_values(hpxml, isdefaulted, supply_locations, return_locations, supply_areas, return_areas, n_return_registers)
2116
+ supply_duct_idx = 0
2117
+ return_duct_idx = 0
2118
+ hpxml.hvac_distributions.each do |hvac_distribution|
2119
+ next unless [HPXML::HVACDistributionTypeAir, HPXML::HVACDistributionTypeHydronicAndAir].include? hvac_distribution.distribution_system_type
2120
+
2121
+ assert_equal(n_return_registers, hvac_distribution.number_of_return_registers)
2122
+ assert_equal(isdefaulted, hvac_distribution.number_of_return_registers_isdefaulted)
2123
+
2124
+ hvac_distribution.ducts.each do |duct|
2125
+ if duct.duct_type == HPXML::DuctTypeSupply
2126
+ assert_equal(supply_locations[supply_duct_idx], duct.duct_location)
2127
+ assert_equal(isdefaulted, duct.duct_location_isdefaulted)
2128
+
2129
+ assert_in_epsilon(supply_areas[supply_duct_idx], duct.duct_surface_area, 0.01)
2130
+ assert_equal(isdefaulted, duct.duct_surface_area_isdefaulted)
2131
+
2132
+ supply_duct_idx += 1
2133
+ elsif duct.duct_type == HPXML::DuctTypeReturn
2134
+ assert_equal(return_locations[return_duct_idx], duct.duct_location)
2135
+ assert_equal(isdefaulted, duct.duct_location_isdefaulted)
2136
+
2137
+ assert_in_epsilon(return_areas[return_duct_idx], duct.duct_surface_area, 0.01)
2138
+ assert_equal(isdefaulted, duct.duct_surface_area_isdefaulted)
2139
+
2140
+ return_duct_idx += 1
2141
+ end
2142
+ end
2143
+ end
2144
+ end
2145
+
2146
+ def _test_default_mech_vent_values(hpxml, isdefaulted, is_shared_system, hours_in_operation)
2147
+ vent_fan = hpxml.ventilation_fans.select { |f| f.used_for_whole_building_ventilation }[0]
2148
+
2149
+ assert_equal(is_shared_system, vent_fan.is_shared_system)
2150
+ assert_equal(isdefaulted, vent_fan.is_shared_system_isdefaulted)
2151
+
2152
+ assert_equal(hours_in_operation, vent_fan.hours_in_operation)
2153
+ assert_equal(isdefaulted, vent_fan.hours_in_operation_isdefaulted)
2154
+ end
2155
+
2156
+ def _test_default_kitchen_fan_values(hpxml, isdefaulted, quantity, rated_flow_rate, hours_in_operation, fan_power, start_hour)
2157
+ kitchen_fan = hpxml.ventilation_fans.select { |f| f.used_for_local_ventilation && f.fan_location == HPXML::LocationKitchen }[0]
2158
+
2159
+ assert_equal(quantity, kitchen_fan.quantity)
2160
+ assert_equal(isdefaulted, kitchen_fan.quantity_isdefaulted)
2161
+
2162
+ assert_equal(rated_flow_rate, kitchen_fan.rated_flow_rate)
2163
+ assert_equal(isdefaulted, kitchen_fan.rated_flow_rate_isdefaulted)
2164
+
2165
+ assert_equal(hours_in_operation, kitchen_fan.hours_in_operation)
2166
+ assert_equal(isdefaulted, kitchen_fan.hours_in_operation_isdefaulted)
2167
+
2168
+ assert_equal(fan_power, kitchen_fan.fan_power)
2169
+ assert_equal(isdefaulted, kitchen_fan.fan_power_isdefaulted)
2170
+
2171
+ assert_equal(start_hour, kitchen_fan.start_hour)
2172
+ assert_equal(isdefaulted, kitchen_fan.start_hour_isdefaulted)
1448
2173
  end
1449
2174
 
1450
- def _test_default_boiler_values(hpxml, eae)
1451
- heating_system = hpxml.heating_systems[0]
1452
- assert_equal(eae, heating_system.electric_auxiliary_energy)
2175
+ def _test_default_bath_fan_values(hpxml, isdefaulted, quantity, rated_flow_rate, hours_in_operation, fan_power, start_hour)
2176
+ bath_fan = hpxml.ventilation_fans.select { |f| f.used_for_local_ventilation && f.fan_location == HPXML::LocationBath }[0]
2177
+
2178
+ assert_equal(quantity, bath_fan.quantity)
2179
+ assert_equal(isdefaulted, bath_fan.quantity_isdefaulted)
2180
+
2181
+ assert_equal(rated_flow_rate, bath_fan.rated_flow_rate)
2182
+ assert_equal(isdefaulted, bath_fan.rated_flow_rate_isdefaulted)
2183
+
2184
+ assert_equal(hours_in_operation, bath_fan.hours_in_operation)
2185
+ assert_equal(isdefaulted, bath_fan.hours_in_operation_isdefaulted)
2186
+
2187
+ assert_equal(fan_power, bath_fan.fan_power)
2188
+ assert_equal(isdefaulted, bath_fan.fan_power_isdefaulted)
2189
+
2190
+ assert_equal(start_hour, bath_fan.start_hour)
2191
+ assert_equal(isdefaulted, bath_fan.start_hour_isdefaulted)
1453
2192
  end
1454
2193
 
1455
- def _test_default_gshp_values(hpxml, pump_w_per_ton, fan_w_per_cfm)
1456
- heat_pump = hpxml.heat_pumps[0]
1457
- assert_equal(pump_w_per_ton, heat_pump.pump_watts_per_ton)
1458
- assert_equal(fan_w_per_cfm, heat_pump.fan_watts_per_cfm)
1459
- end
2194
+ def _test_default_storage_water_heater_values(hpxml, isdefaulted, *expected_wh_values)
2195
+ storage_water_heaters = hpxml.water_heating_systems.select { |w| w.water_heater_type == HPXML::WaterHeaterTypeStorage }
2196
+ assert_equal(expected_wh_values.size, storage_water_heaters.size)
2197
+ storage_water_heaters.each_with_index do |wh_system, idx|
2198
+ is_shared, heating_capacity, tank_volume, recovery_efficiency, location = expected_wh_values[idx]
1460
2199
 
1461
- def _test_default_duct_values(hpxml, supply_locations, return_locations, supply_areas, return_areas, n_return_registers)
1462
- supply_duct_idx = 0
1463
- return_duct_idx = 0
1464
- hpxml.hvac_distributions.each do |hvac_distribution|
1465
- next unless [HPXML::HVACDistributionTypeAir, HPXML::HVACDistributionTypeHydronicAndAir].include? hvac_distribution.distribution_system_type
2200
+ assert_equal(is_shared, wh_system.is_shared_system)
2201
+ assert_equal(isdefaulted, wh_system.is_shared_system_isdefaulted)
1466
2202
 
1467
- assert_equal(n_return_registers, hvac_distribution.number_of_return_registers)
1468
- hvac_distribution.ducts.each do |duct|
1469
- if duct.duct_type == HPXML::DuctTypeSupply
1470
- assert_equal(supply_locations[supply_duct_idx], duct.duct_location)
1471
- assert_in_epsilon(supply_areas[supply_duct_idx], duct.duct_surface_area, 0.01)
1472
- supply_duct_idx += 1
1473
- elsif duct.duct_type == HPXML::DuctTypeReturn
1474
- assert_equal(return_locations[return_duct_idx], duct.duct_location)
1475
- assert_in_epsilon(return_areas[return_duct_idx], duct.duct_surface_area, 0.01)
1476
- return_duct_idx += 1
1477
- end
1478
- end
2203
+ assert_in_epsilon(heating_capacity, wh_system.heating_capacity, 0.01)
2204
+ assert_equal(isdefaulted, wh_system.heating_capacity_isdefaulted)
2205
+
2206
+ assert_equal(tank_volume, wh_system.tank_volume)
2207
+ assert_equal(isdefaulted, wh_system.tank_volume_isdefaulted)
2208
+
2209
+ assert_in_epsilon(recovery_efficiency, wh_system.recovery_efficiency, 0.01)
2210
+ assert_equal(isdefaulted, wh_system.recovery_efficiency_isdefaulted)
2211
+
2212
+ assert_equal(location, wh_system.location)
2213
+ assert_equal(isdefaulted, wh_system.location_isdefaulted)
1479
2214
  end
1480
2215
  end
1481
2216
 
1482
- def _test_default_pv_system_values(hpxml, interver_efficiency, system_loss_frac, is_shared_system)
1483
- assert_equal(interver_efficiency.size, hpxml.pv_systems.size)
1484
- hpxml.pv_systems.each_with_index do |pv, idx|
1485
- assert_equal(is_shared_system, pv.is_shared_system)
1486
- assert_equal(interver_efficiency[idx], pv.inverter_efficiency)
1487
- assert_in_epsilon(system_loss_frac[idx], pv.system_losses_fraction, 0.01)
2217
+ def _test_default_tankless_water_heater_values(hpxml, isdefaulted, *expected_wh_values)
2218
+ tankless_water_heaters = hpxml.water_heating_systems.select { |w| w.water_heater_type == HPXML::WaterHeaterTypeTankless }
2219
+ assert_equal(expected_wh_values.size, tankless_water_heaters.size)
2220
+ tankless_water_heaters.each_with_index do |wh_system, idx|
2221
+ performance_adjustment, = expected_wh_values[idx]
2222
+
2223
+ assert_equal(performance_adjustment, wh_system.performance_adjustment)
2224
+ assert_equal(isdefaulted, wh_system.performance_adjustment_isdefaulted)
1488
2225
  end
1489
2226
  end
1490
2227
 
1491
- def _test_default_building_construction_values(hpxml, building_volume, has_flue_or_chimney, n_bathrooms)
1492
- assert_equal(building_volume, hpxml.building_construction.conditioned_building_volume)
1493
- assert_equal(has_flue_or_chimney, hpxml.building_construction.has_flue_or_chimney)
1494
- assert_equal(n_bathrooms, hpxml.building_construction.number_of_bathrooms)
1495
- end
2228
+ def _test_default_standard_distribution_values(hpxml, isdefaulted, piping_length, pipe_r_value)
2229
+ hot_water_distribution = hpxml.hot_water_distributions[0]
1496
2230
 
1497
- def _test_default_attic_values(hpxml, sla)
1498
- attic = hpxml.attics[0]
1499
- assert_equal(sla, attic.vented_attic_sla)
1500
- end
2231
+ assert_in_epsilon(piping_length, hot_water_distribution.standard_piping_length, 0.01)
2232
+ assert_equal(isdefaulted, hot_water_distribution.standard_piping_length_isdefaulted)
1501
2233
 
1502
- def _test_default_foundation_values(hpxml, sla)
1503
- foundation = hpxml.foundations[0]
1504
- assert_equal(sla, foundation.vented_crawlspace_sla)
2234
+ assert_equal(pipe_r_value, hot_water_distribution.pipe_r_value)
2235
+ assert_equal(isdefaulted, hot_water_distribution.pipe_r_value_isdefaulted)
1505
2236
  end
1506
2237
 
1507
- def _test_default_infiltration_values(hpxml, volume)
1508
- air_infiltration_measurement = hpxml.air_infiltration_measurements[0]
1509
- assert_equal(volume, air_infiltration_measurement.infiltration_volume)
2238
+ def _test_default_recirc_distribution_values(hpxml, isdefaulted, piping_length, branch_piping_length, pump_power, pipe_r_value)
2239
+ hot_water_distribution = hpxml.hot_water_distributions[0]
2240
+
2241
+ assert_in_epsilon(piping_length, hot_water_distribution.recirculation_piping_length, 0.01)
2242
+ assert_equal(isdefaulted, hot_water_distribution.recirculation_piping_length_isdefaulted)
2243
+
2244
+ assert_in_epsilon(branch_piping_length, hot_water_distribution.recirculation_branch_piping_length, 0.01)
2245
+ assert_equal(isdefaulted, hot_water_distribution.recirculation_branch_piping_length_isdefaulted)
2246
+
2247
+ assert_in_epsilon(pump_power, hot_water_distribution.recirculation_pump_power, 0.01)
2248
+ assert_equal(isdefaulted, hot_water_distribution.recirculation_pump_power_isdefaulted)
2249
+
2250
+ assert_equal(pipe_r_value, hot_water_distribution.pipe_r_value)
2251
+ assert_equal(isdefaulted, hot_water_distribution.pipe_r_value_isdefaulted)
1510
2252
  end
1511
2253
 
1512
- def _test_default_roof_values(hpxml, roof_type, solar_absorptance, roof_color)
1513
- roof = hpxml.roofs[0]
1514
- assert_equal(roof_type, roof.roof_type)
1515
- assert_equal(solar_absorptance, roof.solar_absorptance)
1516
- assert_equal(roof_color, roof.roof_color)
2254
+ def _test_default_shared_recirc_distribution_values(hpxml, isdefaulted, pump_power)
2255
+ hot_water_distribution = hpxml.hot_water_distributions[0]
2256
+
2257
+ assert_in_epsilon(pump_power, hot_water_distribution.shared_recirculation_pump_power, 0.01)
2258
+ assert_equal(isdefaulted, hot_water_distribution.shared_recirculation_pump_power_isdefaulted)
1517
2259
  end
1518
2260
 
1519
- def _test_default_wall_values(hpxml, siding, solar_absorptance, color)
1520
- wall = hpxml.walls[0]
1521
- assert_equal(siding, wall.siding)
1522
- assert_equal(solar_absorptance, wall.solar_absorptance)
1523
- assert_equal(color, wall.color)
2261
+ def _test_default_water_fixture_values(hpxml, isdefaulted, usage_multiplier)
2262
+ assert_equal(usage_multiplier, hpxml.water_heating.water_fixtures_usage_multiplier)
2263
+ assert_equal(isdefaulted, hpxml.water_heating.water_fixtures_usage_multiplier_isdefaulted)
1524
2264
  end
1525
2265
 
1526
- def _test_default_rim_joist_values(hpxml, siding, solar_absorptance, color)
1527
- rim_joist = hpxml.rim_joists[0]
1528
- assert_equal(siding, rim_joist.siding)
1529
- assert_equal(solar_absorptance, rim_joist.solar_absorptance)
1530
- assert_equal(color, rim_joist.color)
2266
+ def _test_default_solar_thermal_values(hpxml, isdefaulted, storage_volume)
2267
+ solar_thermal_system = hpxml.solar_thermal_systems[0]
2268
+
2269
+ assert_equal(storage_volume, solar_thermal_system.storage_volume)
2270
+ assert_equal(isdefaulted, solar_thermal_system.storage_volume_isdefaulted)
1531
2271
  end
1532
2272
 
1533
- def _test_default_window_values(hpxml, summer_shade_coeffs, winter_shade_coeffs, fraction_operable)
1534
- assert_equal(summer_shade_coeffs.size, hpxml.windows.size)
1535
- hpxml.windows.each_with_index do |window, idx|
1536
- assert_equal(summer_shade_coeffs[idx], window.interior_shading_factor_summer)
1537
- assert_equal(winter_shade_coeffs[idx], window.interior_shading_factor_winter)
1538
- assert_equal(fraction_operable[idx], window.fraction_operable)
2273
+ def _test_default_pv_system_values(hpxml, isdefaulted, interver_efficiency, system_loss_frac, is_shared_system, location, tracking, module_type)
2274
+ hpxml.pv_systems.each_with_index do |pv, idx|
2275
+ assert_equal(is_shared_system, pv.is_shared_system)
2276
+ assert_equal(isdefaulted, pv.is_shared_system_isdefaulted)
2277
+
2278
+ assert_equal(interver_efficiency, pv.inverter_efficiency)
2279
+ assert_equal(isdefaulted, pv.inverter_efficiency_isdefaulted)
2280
+
2281
+ assert_in_epsilon(system_loss_frac, pv.system_losses_fraction, 0.01)
2282
+ assert_equal(isdefaulted, pv.system_losses_fraction_isdefaulted)
2283
+
2284
+ assert_equal(location, pv.location)
2285
+ assert_equal(isdefaulted, pv.location_isdefaulted)
2286
+
2287
+ assert_equal(tracking, pv.tracking)
2288
+ assert_equal(isdefaulted, pv.tracking_isdefaulted)
2289
+
2290
+ assert_equal(module_type, pv.module_type)
2291
+ assert_equal(isdefaulted, pv.module_type_isdefaulted)
1539
2292
  end
1540
2293
  end
1541
2294
 
1542
- def _test_default_skylight_values(hpxml, summer_shade_coeffs, winter_shade_coeffs)
1543
- assert_equal(summer_shade_coeffs.size, hpxml.skylights.size)
1544
- hpxml.skylights.each_with_index do |skylight, idx|
1545
- assert_equal(summer_shade_coeffs[idx], skylight.interior_shading_factor_summer)
1546
- assert_equal(winter_shade_coeffs[idx], skylight.interior_shading_factor_winter)
2295
+ def _test_default_generator_values(hpxml, isdefaulted, is_shared_system)
2296
+ hpxml.generators.each_with_index do |generator, idx|
2297
+ assert_equal(is_shared_system, generator.is_shared_system)
2298
+ assert_equal(isdefaulted, generator.is_shared_system_isdefaulted)
1547
2299
  end
1548
2300
  end
1549
2301
 
1550
- def _test_default_clothes_washer_values(hpxml, is_shared, location, imef, rated_annual_kwh, label_electric_rate, label_gas_rate, label_annual_gas_cost, capacity, label_usage, usage_multiplier)
2302
+ def _test_default_clothes_washer_values(hpxml, isdefaulted, is_shared, location, imef, rated_annual_kwh, label_electric_rate, label_gas_rate, label_annual_gas_cost, capacity, label_usage, usage_multiplier)
1551
2303
  clothes_washer = hpxml.clothes_washers[0]
2304
+
1552
2305
  assert_equal(is_shared, clothes_washer.is_shared_appliance)
2306
+ assert_equal(isdefaulted, clothes_washer.is_shared_appliance_isdefaulted)
2307
+
1553
2308
  assert_equal(location, clothes_washer.location)
2309
+ assert_equal(isdefaulted, clothes_washer.location_isdefaulted)
2310
+
1554
2311
  assert_equal(imef, clothes_washer.integrated_modified_energy_factor)
2312
+ assert_equal(isdefaulted, clothes_washer.integrated_modified_energy_factor_isdefaulted)
2313
+
1555
2314
  assert_equal(rated_annual_kwh, clothes_washer.rated_annual_kwh)
2315
+ assert_equal(isdefaulted, clothes_washer.rated_annual_kwh_isdefaulted)
2316
+
1556
2317
  assert_equal(label_electric_rate, clothes_washer.label_electric_rate)
2318
+ assert_equal(isdefaulted, clothes_washer.label_electric_rate_isdefaulted)
2319
+
1557
2320
  assert_equal(label_gas_rate, clothes_washer.label_gas_rate)
2321
+ assert_equal(isdefaulted, clothes_washer.label_gas_rate_isdefaulted)
2322
+
1558
2323
  assert_equal(label_annual_gas_cost, clothes_washer.label_annual_gas_cost)
2324
+ assert_equal(isdefaulted, clothes_washer.label_annual_gas_cost_isdefaulted)
2325
+
1559
2326
  assert_equal(capacity, clothes_washer.capacity)
2327
+ assert_equal(isdefaulted, clothes_washer.capacity_isdefaulted)
2328
+
1560
2329
  assert_equal(label_usage, clothes_washer.label_usage)
2330
+ assert_equal(isdefaulted, clothes_washer.label_usage_isdefaulted)
2331
+
1561
2332
  assert_equal(usage_multiplier, clothes_washer.usage_multiplier)
2333
+ assert_equal(isdefaulted, clothes_washer.usage_multiplier_isdefaulted)
1562
2334
  end
1563
2335
 
1564
- def _test_default_clothes_dryer_values(hpxml, is_shared, location, control_type, cef, usage_multiplier)
2336
+ def _test_default_clothes_dryer_values(hpxml, isdefaulted, is_shared, location, control_type, cef, usage_multiplier)
1565
2337
  clothes_dryer = hpxml.clothes_dryers[0]
2338
+
1566
2339
  assert_equal(is_shared, clothes_dryer.is_shared_appliance)
2340
+ assert_equal(isdefaulted, clothes_dryer.is_shared_appliance_isdefaulted)
2341
+
1567
2342
  assert_equal(location, clothes_dryer.location)
2343
+ assert_equal(isdefaulted, clothes_dryer.location_isdefaulted)
2344
+
1568
2345
  assert_equal(control_type, clothes_dryer.control_type)
2346
+ assert_equal(isdefaulted, clothes_dryer.control_type_isdefaulted)
2347
+
1569
2348
  assert_equal(cef, clothes_dryer.combined_energy_factor)
2349
+ assert_equal(isdefaulted, clothes_dryer.combined_energy_factor_isdefaulted)
2350
+
1570
2351
  assert_equal(usage_multiplier, clothes_dryer.usage_multiplier)
2352
+ assert_equal(isdefaulted, clothes_dryer.usage_multiplier_isdefaulted)
2353
+ end
2354
+
2355
+ def _test_default_clothes_dryer_exhaust_values(hpxml, isdefaulted, is_vented, vented_flow_rate)
2356
+ clothes_dryer = hpxml.clothes_dryers[0]
2357
+
2358
+ assert_equal(is_vented, clothes_dryer.is_vented)
2359
+ assert_equal(isdefaulted, clothes_dryer.is_vented_isdefaulted)
2360
+
2361
+ if vented_flow_rate.nil?
2362
+ assert_nil(clothes_dryer.vented_flow_rate)
2363
+ else
2364
+ assert_equal(vented_flow_rate, clothes_dryer.vented_flow_rate)
2365
+ assert_equal(isdefaulted, clothes_dryer.vented_flow_rate_isdefaulted)
2366
+ end
1571
2367
  end
1572
2368
 
1573
- def _test_default_dishwasher_values(hpxml, is_shared, location, rated_annual_kwh, label_electric_rate, label_gas_rate, label_annual_gas_cost, label_usage, place_setting_capacity, usage_multiplier)
2369
+ def _test_default_dishwasher_values(hpxml, isdefaulted, is_shared, location, rated_annual_kwh, label_electric_rate, label_gas_rate, label_annual_gas_cost, label_usage, place_setting_capacity, usage_multiplier)
1574
2370
  dishwasher = hpxml.dishwashers[0]
2371
+
1575
2372
  assert_equal(is_shared, dishwasher.is_shared_appliance)
2373
+ assert_equal(isdefaulted, dishwasher.is_shared_appliance_isdefaulted)
2374
+
1576
2375
  assert_equal(location, dishwasher.location)
2376
+ assert_equal(isdefaulted, dishwasher.location_isdefaulted)
2377
+
1577
2378
  assert_equal(rated_annual_kwh, dishwasher.rated_annual_kwh)
2379
+ assert_equal(isdefaulted, dishwasher.rated_annual_kwh_isdefaulted)
2380
+
1578
2381
  assert_equal(label_electric_rate, dishwasher.label_electric_rate)
2382
+ assert_equal(isdefaulted, dishwasher.label_electric_rate_isdefaulted)
2383
+
1579
2384
  assert_equal(label_gas_rate, dishwasher.label_gas_rate)
2385
+ assert_equal(isdefaulted, dishwasher.label_gas_rate_isdefaulted)
2386
+
1580
2387
  assert_equal(label_annual_gas_cost, dishwasher.label_annual_gas_cost)
2388
+ assert_equal(isdefaulted, dishwasher.label_annual_gas_cost_isdefaulted)
2389
+
1581
2390
  assert_equal(label_usage, dishwasher.label_usage)
2391
+ assert_equal(isdefaulted, dishwasher.label_usage_isdefaulted)
2392
+
1582
2393
  assert_equal(place_setting_capacity, dishwasher.place_setting_capacity)
2394
+ assert_equal(isdefaulted, dishwasher.place_setting_capacity_isdefaulted)
2395
+
1583
2396
  assert_equal(usage_multiplier, dishwasher.usage_multiplier)
2397
+ assert_equal(isdefaulted, dishwasher.usage_multiplier_isdefaulted)
1584
2398
  end
1585
2399
 
1586
- def _test_default_refrigerator_values(hpxml, location, rated_annual_kwh, usage_multiplier, weekday_sch, weekend_sch, monthly_mults)
2400
+ def _test_default_refrigerator_values(hpxml, isdefaulted, location, rated_annual_kwh, usage_multiplier, weekday_sch, weekend_sch, monthly_mults)
1587
2401
  hpxml.refrigerators.each do |refrigerator|
1588
2402
  next unless refrigerator.primary_indicator
1589
2403
 
1590
2404
  assert_equal(location, refrigerator.location)
2405
+ assert_equal(isdefaulted, refrigerator.location_isdefaulted)
2406
+
1591
2407
  assert_equal(rated_annual_kwh, refrigerator.rated_annual_kwh)
2408
+ assert_equal(isdefaulted, refrigerator.rated_annual_kwh_isdefaulted)
2409
+
1592
2410
  assert_equal(usage_multiplier, refrigerator.usage_multiplier)
2411
+ assert_equal(isdefaulted, refrigerator.usage_multiplier_isdefaulted)
2412
+
1593
2413
  if weekday_sch.nil?
1594
2414
  assert_nil(refrigerator.weekday_fractions)
1595
2415
  else
1596
2416
  assert_equal(weekday_sch, refrigerator.weekday_fractions)
2417
+ assert_equal(isdefaulted, refrigerator.weekday_fractions_isdefaulted)
1597
2418
  end
2419
+
1598
2420
  if weekend_sch.nil?
1599
2421
  assert_nil(refrigerator.weekend_fractions)
1600
2422
  else
1601
2423
  assert_equal(weekend_sch, refrigerator.weekend_fractions)
2424
+ assert_equal(isdefaulted, refrigerator.weekend_fractions_isdefaulted)
1602
2425
  end
2426
+
1603
2427
  if monthly_mults.nil?
1604
2428
  assert_nil(refrigerator.monthly_multipliers)
1605
2429
  else
1606
2430
  assert_equal(monthly_mults, refrigerator.monthly_multipliers)
2431
+ assert_equal(isdefaulted, refrigerator.monthly_multipliers_isdefaulted)
1607
2432
  end
1608
2433
  end
1609
2434
  end
1610
2435
 
1611
- def _test_default_extra_refrigerators_values(hpxml, location, rated_annual_kwh, usage_multiplier, weekday_sch, weekend_sch, monthly_mults)
2436
+ def _test_default_extra_refrigerators_values(hpxml, isdefaulted, location, rated_annual_kwh, usage_multiplier, weekday_sch, weekend_sch, monthly_mults)
1612
2437
  hpxml.refrigerators.each do |refrigerator|
1613
2438
  next if refrigerator.primary_indicator
1614
2439
 
1615
2440
  assert_equal(location, refrigerator.location)
2441
+ assert_equal(isdefaulted, refrigerator.location_isdefaulted)
2442
+
1616
2443
  assert_in_epsilon(rated_annual_kwh, refrigerator.rated_annual_kwh, 0.01)
2444
+ assert_equal(isdefaulted, refrigerator.rated_annual_kwh_isdefaulted)
2445
+
1617
2446
  assert_equal(usage_multiplier, refrigerator.usage_multiplier)
2447
+ assert_equal(isdefaulted, refrigerator.usage_multiplier_isdefaulted)
2448
+
1618
2449
  if weekday_sch.nil?
1619
2450
  assert_nil(refrigerator.weekday_fractions)
1620
2451
  else
1621
2452
  assert_equal(weekday_sch, refrigerator.weekday_fractions)
2453
+ assert_equal(isdefaulted, refrigerator.weekday_fractions_isdefaulted)
1622
2454
  end
2455
+
1623
2456
  if weekend_sch.nil?
1624
2457
  assert_nil(refrigerator.weekend_fractions)
1625
2458
  else
1626
2459
  assert_equal(weekend_sch, refrigerator.weekend_fractions)
2460
+ assert_equal(isdefaulted, refrigerator.weekend_fractions_isdefaulted)
1627
2461
  end
2462
+
1628
2463
  if monthly_mults.nil?
1629
2464
  assert_nil(refrigerator.monthly_multipliers)
1630
2465
  else
1631
2466
  assert_equal(monthly_mults, refrigerator.monthly_multipliers)
2467
+ assert_equal(isdefaulted, refrigerator.monthly_multipliers_isdefaulted)
1632
2468
  end
1633
2469
  end
1634
2470
  end
1635
2471
 
1636
- def _test_default_freezers_values(hpxml, location, rated_annual_kwh, usage_multiplier, weekday_sch, weekend_sch, monthly_mults)
2472
+ def _test_default_freezers_values(hpxml, isdefaulted, location, rated_annual_kwh, usage_multiplier, weekday_sch, weekend_sch, monthly_mults)
1637
2473
  hpxml.freezers.each do |freezer|
1638
2474
  assert_equal(location, freezer.location)
2475
+ assert_equal(isdefaulted, freezer.location_isdefaulted)
2476
+
1639
2477
  assert_in_epsilon(rated_annual_kwh, freezer.rated_annual_kwh, 0.01)
2478
+ assert_equal(isdefaulted, freezer.rated_annual_kwh_isdefaulted)
2479
+
1640
2480
  assert_equal(usage_multiplier, freezer.usage_multiplier)
2481
+ assert_equal(isdefaulted, freezer.usage_multiplier_isdefaulted)
2482
+
1641
2483
  if weekday_sch.nil?
1642
2484
  assert_nil(freezer.weekday_fractions)
1643
2485
  else
1644
2486
  assert_equal(weekday_sch, freezer.weekday_fractions)
2487
+ assert_equal(isdefaulted, freezer.weekday_fractions_isdefaulted)
1645
2488
  end
2489
+
1646
2490
  if weekend_sch.nil?
1647
2491
  assert_nil(freezer.weekend_fractions)
1648
2492
  else
1649
2493
  assert_equal(weekend_sch, freezer.weekend_fractions)
2494
+ assert_equal(isdefaulted, freezer.weekend_fractions_isdefaulted)
1650
2495
  end
2496
+
1651
2497
  if monthly_mults.nil?
1652
2498
  assert_nil(freezer.monthly_multipliers)
1653
2499
  else
1654
2500
  assert_equal(monthly_mults, freezer.monthly_multipliers)
2501
+ assert_equal(isdefaulted, freezer.monthly_multipliers_isdefaulted)
1655
2502
  end
1656
2503
  end
1657
2504
  end
1658
2505
 
1659
- def _test_default_cooking_range_values(hpxml, location, is_induction, usage_multiplier, weekday_sch, weekend_sch, monthly_mults)
2506
+ def _test_default_cooking_range_values(hpxml, isdefaulted, location, is_induction, usage_multiplier, weekday_sch, weekend_sch, monthly_mults)
1660
2507
  cooking_range = hpxml.cooking_ranges[0]
2508
+
1661
2509
  assert_equal(location, cooking_range.location)
2510
+ assert_equal(isdefaulted, cooking_range.location_isdefaulted)
2511
+
1662
2512
  assert_equal(is_induction, cooking_range.is_induction)
2513
+ assert_equal(isdefaulted, cooking_range.is_induction_isdefaulted)
2514
+
1663
2515
  assert_equal(usage_multiplier, cooking_range.usage_multiplier)
2516
+ assert_equal(isdefaulted, cooking_range.usage_multiplier_isdefaulted)
2517
+
1664
2518
  if weekday_sch.nil?
1665
2519
  assert_nil(cooking_range.weekday_fractions)
1666
2520
  else
1667
2521
  assert_equal(weekday_sch, cooking_range.weekday_fractions)
2522
+ assert_equal(isdefaulted, cooking_range.weekday_fractions_isdefaulted)
1668
2523
  end
2524
+
1669
2525
  if weekend_sch.nil?
1670
2526
  assert_nil(cooking_range.weekend_fractions)
1671
2527
  else
1672
2528
  assert_equal(weekend_sch, cooking_range.weekend_fractions)
2529
+ assert_equal(isdefaulted, cooking_range.weekend_fractions_isdefaulted)
1673
2530
  end
2531
+
1674
2532
  if monthly_mults.nil?
1675
2533
  assert_nil(cooking_range.monthly_multipliers)
1676
2534
  else
1677
2535
  assert_equal(monthly_mults, cooking_range.monthly_multipliers)
2536
+ assert_equal(isdefaulted, cooking_range.monthly_multipliers_isdefaulted)
1678
2537
  end
1679
2538
  end
1680
2539
 
1681
- def _test_default_oven_values(hpxml, is_convection)
2540
+ def _test_default_oven_values(hpxml, isdefaulted, is_convection)
1682
2541
  oven = hpxml.ovens[0]
2542
+
1683
2543
  assert_equal(is_convection, oven.is_convection)
2544
+ assert_equal(isdefaulted, oven.is_convection_isdefaulted)
1684
2545
  end
1685
2546
 
1686
- def _test_default_lighting_values(hpxml, interior_usage_multiplier, garage_usage_multiplier, exterior_usage_multiplier, schedules = {})
2547
+ def _test_default_lighting_values(hpxml, isdefaulted, interior_usage_multiplier, garage_usage_multiplier, exterior_usage_multiplier, schedules = {})
1687
2548
  assert_equal(interior_usage_multiplier, hpxml.lighting.interior_usage_multiplier)
2549
+ assert_equal(isdefaulted, hpxml.lighting.interior_usage_multiplier_isdefaulted)
2550
+
1688
2551
  assert_equal(garage_usage_multiplier, hpxml.lighting.garage_usage_multiplier)
2552
+ assert_equal(isdefaulted, hpxml.lighting.garage_usage_multiplier_isdefaulted)
2553
+
1689
2554
  assert_equal(exterior_usage_multiplier, hpxml.lighting.exterior_usage_multiplier)
2555
+ assert_equal(isdefaulted, hpxml.lighting.exterior_usage_multiplier_isdefaulted)
2556
+
1690
2557
  if not schedules[:grg_wk_sch].nil?
1691
2558
  assert_equal(schedules[:grg_wk_sch], hpxml.lighting.garage_weekday_fractions)
2559
+ assert_equal(isdefaulted, hpxml.lighting.garage_weekday_fractions_isdefaulted)
1692
2560
  else
1693
2561
  assert_nil(hpxml.lighting.garage_weekday_fractions)
1694
2562
  end
2563
+
1695
2564
  if not schedules[:grg_wknd_sch].nil?
1696
2565
  assert_equal(schedules[:grg_wknd_sch], hpxml.lighting.garage_weekend_fractions)
2566
+ assert_equal(isdefaulted, hpxml.lighting.garage_weekend_fractions_isdefaulted)
1697
2567
  else
1698
2568
  assert_nil(hpxml.lighting.garage_weekend_fractions)
1699
2569
  end
2570
+
1700
2571
  if not schedules[:grg_month_mult].nil?
1701
2572
  assert_equal(schedules[:grg_month_mult], hpxml.lighting.garage_monthly_multipliers)
2573
+ assert_equal(isdefaulted, hpxml.lighting.garage_monthly_multipliers_isdefaulted)
1702
2574
  else
1703
2575
  assert_nil(hpxml.lighting.garage_monthly_multipliers)
1704
2576
  end
2577
+
1705
2578
  if not schedules[:ext_wk_sch].nil?
1706
2579
  assert_equal(schedules[:ext_wk_sch], hpxml.lighting.exterior_weekday_fractions)
2580
+ assert_equal(isdefaulted, hpxml.lighting.exterior_weekday_fractions_isdefaulted)
1707
2581
  else
1708
2582
  assert_nil(hpxml.lighting.exterior_weekday_fractions)
1709
2583
  end
2584
+
1710
2585
  if not schedules[:ext_wknd_sch].nil?
1711
2586
  assert_equal(schedules[:ext_wknd_sch], hpxml.lighting.exterior_weekend_fractions)
2587
+ assert_equal(isdefaulted, hpxml.lighting.exterior_weekend_fractions_isdefaulted)
1712
2588
  else
1713
2589
  assert_nil(hpxml.lighting.exterior_weekday_fractions)
1714
2590
  end
2591
+
1715
2592
  if not schedules[:ext_month_mult].nil?
1716
2593
  assert_equal(schedules[:ext_month_mult], hpxml.lighting.exterior_monthly_multipliers)
2594
+ assert_equal(isdefaulted, hpxml.lighting.exterior_monthly_multipliers_isdefaulted)
1717
2595
  else
1718
2596
  assert_nil(hpxml.lighting.exterior_monthly_multipliers)
1719
2597
  end
2598
+
1720
2599
  if not schedules[:hol_kwh_per_day].nil?
1721
2600
  assert_equal(schedules[:hol_kwh_per_day], hpxml.lighting.holiday_kwh_per_day)
2601
+ assert_equal(isdefaulted, hpxml.lighting.holiday_kwh_per_day_isdefaulted)
1722
2602
  else
1723
2603
  assert_nil(hpxml.lighting.holiday_kwh_per_day)
1724
2604
  end
2605
+
1725
2606
  if not schedules[:hol_begin_month].nil?
1726
2607
  assert_equal(schedules[:hol_begin_month], hpxml.lighting.holiday_period_begin_month)
2608
+ assert_equal(isdefaulted, hpxml.lighting.holiday_period_begin_month_isdefaulted)
1727
2609
  else
1728
2610
  assert_nil(hpxml.lighting.holiday_period_begin_month)
1729
2611
  end
1730
- if not schedules[:hol_begin_day_of_month].nil?
1731
- assert_equal(schedules[:hol_begin_day_of_month], hpxml.lighting.holiday_period_begin_day_of_month)
2612
+
2613
+ if not schedules[:hol_begin_day].nil?
2614
+ assert_equal(schedules[:hol_begin_day], hpxml.lighting.holiday_period_begin_day)
2615
+ assert_equal(isdefaulted, hpxml.lighting.holiday_period_begin_day_isdefaulted)
1732
2616
  else
1733
- assert_nil(hpxml.lighting.holiday_period_begin_day_of_month)
2617
+ assert_nil(hpxml.lighting.holiday_period_begin_day)
1734
2618
  end
2619
+
1735
2620
  if not schedules[:hol_end_month].nil?
1736
2621
  assert_equal(schedules[:hol_end_month], hpxml.lighting.holiday_period_end_month)
2622
+ assert_equal(isdefaulted, hpxml.lighting.holiday_period_end_month_isdefaulted)
1737
2623
  else
1738
2624
  assert_nil(hpxml.lighting.holiday_period_end_month)
1739
2625
  end
1740
- if not schedules[:hol_end_day_of_month].nil?
1741
- assert_equal(schedules[:hol_end_day_of_month], hpxml.lighting.holiday_period_end_day_of_month)
2626
+
2627
+ if not schedules[:hol_end_day].nil?
2628
+ assert_equal(schedules[:hol_end_day], hpxml.lighting.holiday_period_end_day)
2629
+ assert_equal(isdefaulted, hpxml.lighting.holiday_period_end_day_isdefaulted)
1742
2630
  else
1743
- assert_nil(hpxml.lighting.holiday_period_end_day_of_month)
2631
+ assert_nil(hpxml.lighting.holiday_period_end_day)
1744
2632
  end
2633
+
1745
2634
  if not schedules[:hol_wk_sch].nil?
1746
2635
  assert_equal(schedules[:hol_wk_sch], hpxml.lighting.holiday_weekday_fractions)
2636
+ assert_equal(isdefaulted, hpxml.lighting.holiday_weekday_fractions_isdefaulted)
1747
2637
  else
1748
2638
  assert_nil(hpxml.lighting.holiday_weekday_fractions)
1749
2639
  end
2640
+
1750
2641
  if not schedules[:hol_wknd_sch].nil?
1751
2642
  assert_equal(schedules[:hol_wknd_sch], hpxml.lighting.holiday_weekend_fractions)
2643
+ assert_equal(isdefaulted, hpxml.lighting.holiday_weekend_fractions_isdefaulted)
1752
2644
  else
1753
2645
  assert_nil(hpxml.lighting.holiday_weekend_fractions)
1754
2646
  end
1755
2647
  end
1756
2648
 
1757
- def _test_default_standard_distribution_values(hpxml, piping_length)
1758
- hot_water_distribution = hpxml.hot_water_distributions[0]
1759
- assert_in_epsilon(piping_length, hot_water_distribution.standard_piping_length, 0.01)
1760
- end
1761
-
1762
- def _test_default_recirc_distribution_values(hpxml, piping_length, branch_piping_length, pump_power)
1763
- hot_water_distribution = hpxml.hot_water_distributions[0]
1764
- assert_in_epsilon(piping_length, hot_water_distribution.recirculation_piping_length, 0.01)
1765
- assert_in_epsilon(branch_piping_length, hot_water_distribution.recirculation_branch_piping_length, 0.01)
1766
- assert_in_epsilon(pump_power, hot_water_distribution.recirculation_pump_power, 0.01)
1767
- end
1768
-
1769
- def _test_default_shared_recirc_distribution_values(hpxml, pump_power)
1770
- hot_water_distribution = hpxml.hot_water_distributions[0]
1771
- assert_in_epsilon(pump_power, hot_water_distribution.shared_recirculation_pump_power, 0.01)
1772
- end
1773
-
1774
- def _test_default_water_fixture_values(hpxml, usage_multiplier)
1775
- assert_equal(usage_multiplier, hpxml.water_heating.water_fixtures_usage_multiplier)
1776
- end
1777
-
1778
- def _test_default_solar_thermal_values(hpxml, storage_volume)
1779
- assert_in_epsilon(storage_volume, hpxml.solar_thermal_systems[0].storage_volume)
1780
- end
1781
-
1782
- def _test_default_mech_vent_values(hpxml, is_shared_system)
1783
- vent_fan = hpxml.ventilation_fans.select { |f| f.used_for_whole_building_ventilation }[0]
1784
- assert_equal(is_shared_system, vent_fan.is_shared_system)
1785
- end
1786
-
1787
- def _test_default_kitchen_fan_values(hpxml, quantity, rated_flow_rate, hours_in_operation, fan_power, start_hour)
1788
- kitchen_fan = hpxml.ventilation_fans.select { |f| f.used_for_local_ventilation && f.fan_location == HPXML::LocationKitchen }[0]
1789
- assert_equal(quantity, kitchen_fan.quantity)
1790
- assert_equal(rated_flow_rate, kitchen_fan.rated_flow_rate)
1791
- assert_equal(hours_in_operation, kitchen_fan.hours_in_operation)
1792
- assert_equal(fan_power, kitchen_fan.fan_power)
1793
- assert_equal(start_hour, kitchen_fan.start_hour)
1794
- end
1795
-
1796
- def _test_default_bath_fan_values(hpxml, quantity, rated_flow_rate, hours_in_operation, fan_power, start_hour)
1797
- bath_fan = hpxml.ventilation_fans.select { |f| f.used_for_local_ventilation && f.fan_location == HPXML::LocationBath }[0]
1798
- assert_equal(quantity, bath_fan.quantity)
1799
- assert_equal(rated_flow_rate, bath_fan.rated_flow_rate)
1800
- assert_equal(hours_in_operation, bath_fan.hours_in_operation)
1801
- assert_equal(fan_power, bath_fan.fan_power)
1802
- assert_equal(start_hour, bath_fan.start_hour)
1803
- end
2649
+ def _test_default_ceiling_fan_values(hpxml, isdefaulted, quantity, efficiency)
2650
+ ceiling_fan = hpxml.ceiling_fans[0]
1804
2651
 
1805
- def _test_default_clothes_dryer_exhaust_values(hpxml, is_vented, vented_flow_rate)
1806
- clothes_dryer = hpxml.clothes_dryers[0]
1807
- assert_equal(is_vented, clothes_dryer.is_vented)
1808
- if vented_flow_rate.nil?
1809
- assert_nil(clothes_dryer.vented_flow_rate)
1810
- else
1811
- assert_equal(vented_flow_rate, clothes_dryer.vented_flow_rate)
1812
- end
1813
- end
2652
+ assert_equal(quantity, ceiling_fan.quantity)
2653
+ assert_equal(isdefaulted, ceiling_fan.quantity_isdefaulted)
1814
2654
 
1815
- def _test_default_ceiling_fan_values(hpxml, quantity, efficiency)
1816
- assert_equal(quantity, hpxml.ceiling_fans[0].quantity)
1817
- assert_in_epsilon(efficiency, hpxml.ceiling_fans[0].efficiency, 0.01)
2655
+ assert_in_epsilon(efficiency, ceiling_fan.efficiency, 0.01)
2656
+ assert_equal(isdefaulted, ceiling_fan.efficiency_isdefaulted)
1818
2657
  end
1819
2658
 
1820
- def _test_default_pool_heater_values(hpxml, load_units, load_value, weekday_sch, weekend_sch, monthly_mults)
2659
+ def _test_default_pool_heater_values(hpxml, isdefaulted, load_units, load_value, usage_multiplier, weekday_sch, weekend_sch, monthly_mults)
1821
2660
  pool = hpxml.pools[0]
2661
+
1822
2662
  if load_units.nil?
1823
2663
  assert_nil(pool.heater_load_units)
1824
2664
  else
1825
2665
  assert_equal(load_units, pool.heater_load_units)
1826
2666
  end
2667
+
1827
2668
  if load_value.nil?
1828
2669
  assert_nil(pool.heater_load_value)
1829
2670
  else
1830
- assert_in_epsilon(load_value, pool.heater_load_value.to_f, 0.01)
2671
+ assert_in_epsilon(load_value, pool.heater_load_value, 0.01)
2672
+ assert_equal(isdefaulted, pool.heater_load_value_isdefaulted)
1831
2673
  end
2674
+
2675
+ if usage_multiplier.nil?
2676
+ assert_nil(pool.heater_usage_multiplier)
2677
+ else
2678
+ assert_equal(usage_multiplier, pool.heater_usage_multiplier)
2679
+ assert_equal(isdefaulted, pool.heater_usage_multiplier_isdefaulted)
2680
+ end
2681
+
1832
2682
  if weekday_sch.nil?
1833
2683
  assert_nil(pool.heater_weekday_fractions)
1834
2684
  else
1835
2685
  assert_equal(weekday_sch, pool.heater_weekday_fractions)
2686
+ assert_equal(isdefaulted, pool.heater_weekday_fractions_isdefaulted)
1836
2687
  end
2688
+
1837
2689
  if weekend_sch.nil?
1838
2690
  assert_nil(pool.heater_weekend_fractions)
1839
2691
  else
1840
2692
  assert_equal(weekend_sch, pool.heater_weekend_fractions)
2693
+ assert_equal(isdefaulted, pool.heater_weekend_fractions_isdefaulted)
1841
2694
  end
2695
+
1842
2696
  if monthly_mults.nil?
1843
2697
  assert_nil(pool.heater_monthly_multipliers)
1844
2698
  else
1845
2699
  assert_equal(monthly_mults, pool.heater_monthly_multipliers)
2700
+ assert_equal(isdefaulted, pool.heater_monthly_multipliers_isdefaulted)
1846
2701
  end
1847
2702
  end
1848
2703
 
1849
- def _test_default_pool_pump_values(hpxml, kWh_per_year, weekday_sch, weekend_sch, monthly_mults)
2704
+ def _test_default_pool_pump_values(hpxml, isdefaulted, kWh_per_year, usage_multiplier, weekday_sch, weekend_sch, monthly_mults)
1850
2705
  pool = hpxml.pools[0]
2706
+
1851
2707
  assert_in_epsilon(kWh_per_year, pool.pump_kwh_per_year, 0.01)
2708
+ assert_equal(isdefaulted, pool.pump_kwh_per_year_isdefaulted)
2709
+
2710
+ assert_equal(usage_multiplier, pool.pump_usage_multiplier)
2711
+ assert_equal(isdefaulted, pool.pump_usage_multiplier_isdefaulted)
2712
+
1852
2713
  assert_equal(weekday_sch, pool.pump_weekday_fractions)
2714
+ assert_equal(isdefaulted, pool.pump_weekday_fractions_isdefaulted)
2715
+
1853
2716
  assert_equal(weekend_sch, pool.pump_weekend_fractions)
2717
+ assert_equal(isdefaulted, pool.pump_weekend_fractions_isdefaulted)
2718
+
1854
2719
  assert_equal(monthly_mults, pool.pump_monthly_multipliers)
2720
+ assert_equal(isdefaulted, pool.pump_monthly_multipliers_isdefaulted)
1855
2721
  end
1856
2722
 
1857
- def _test_default_hot_tub_heater_values(hpxml, load_units, load_value, weekday_sch, weekend_sch, monthly_mults)
2723
+ def _test_default_hot_tub_heater_values(hpxml, isdefaulted, load_units, load_value, usage_multiplier, weekday_sch, weekend_sch, monthly_mults)
1858
2724
  hot_tub = hpxml.hot_tubs[0]
2725
+
1859
2726
  if load_units.nil?
1860
2727
  assert_nil(hot_tub.heater_load_units)
1861
2728
  else
1862
2729
  assert_equal(load_units, hot_tub.heater_load_units)
1863
2730
  end
2731
+
1864
2732
  if load_value.nil?
1865
2733
  assert_nil(hot_tub.heater_load_value)
1866
2734
  else
1867
- assert_in_epsilon(load_value, hot_tub.heater_load_value.to_f, 0.01)
2735
+ assert_in_epsilon(load_value, hot_tub.heater_load_value, 0.01)
2736
+ assert_equal(isdefaulted, hot_tub.heater_load_value_isdefaulted)
2737
+ end
2738
+
2739
+ if usage_multiplier.nil?
2740
+ assert_nil(hot_tub.heater_usage_multiplier)
2741
+ else
2742
+ assert_equal(usage_multiplier, hot_tub.heater_usage_multiplier)
2743
+ assert_equal(isdefaulted, hot_tub.heater_usage_multiplier_isdefaulted)
1868
2744
  end
2745
+
1869
2746
  if weekday_sch.nil?
1870
2747
  assert_nil(hot_tub.heater_weekday_fractions)
1871
2748
  else
1872
2749
  assert_equal(weekday_sch, hot_tub.heater_weekday_fractions)
2750
+ assert_equal(isdefaulted, hot_tub.heater_weekday_fractions_isdefaulted)
1873
2751
  end
2752
+
1874
2753
  if weekend_sch.nil?
1875
2754
  assert_nil(hot_tub.heater_weekend_fractions)
1876
2755
  else
1877
2756
  assert_equal(weekend_sch, hot_tub.heater_weekend_fractions)
2757
+ assert_equal(isdefaulted, hot_tub.heater_weekend_fractions_isdefaulted)
1878
2758
  end
2759
+
1879
2760
  if monthly_mults.nil?
1880
2761
  assert_nil(hot_tub.heater_monthly_multipliers)
1881
2762
  else
1882
2763
  assert_equal(monthly_mults, hot_tub.heater_monthly_multipliers)
2764
+ assert_equal(isdefaulted, hot_tub.heater_monthly_multipliers_isdefaulted)
1883
2765
  end
1884
2766
  end
1885
2767
 
1886
- def _test_default_hot_tub_pump_values(hpxml, kWh_per_year, weekday_sch, weekend_sch, monthly_mults)
2768
+ def _test_default_hot_tub_pump_values(hpxml, isdefaulted, kWh_per_year, usage_multiplier, weekday_sch, weekend_sch, monthly_mults)
1887
2769
  hot_tub = hpxml.hot_tubs[0]
2770
+
1888
2771
  assert_in_epsilon(kWh_per_year, hot_tub.pump_kwh_per_year, 0.01)
2772
+ assert_equal(isdefaulted, hot_tub.pump_kwh_per_year_isdefaulted)
2773
+
2774
+ assert_equal(usage_multiplier, hot_tub.pump_usage_multiplier)
2775
+ assert_equal(isdefaulted, hot_tub.pump_usage_multiplier_isdefaulted)
2776
+
1889
2777
  assert_equal(weekday_sch, hot_tub.pump_weekday_fractions)
2778
+ assert_equal(isdefaulted, hot_tub.pump_weekday_fractions_isdefaulted)
2779
+
1890
2780
  assert_equal(weekend_sch, hot_tub.pump_weekend_fractions)
2781
+ assert_equal(isdefaulted, hot_tub.pump_weekend_fractions_isdefaulted)
2782
+
1891
2783
  assert_equal(monthly_mults, hot_tub.pump_monthly_multipliers)
2784
+ assert_equal(isdefaulted, hot_tub.pump_monthly_multipliers_isdefaulted)
1892
2785
  end
1893
2786
 
1894
- def _test_default_plug_load_values(hpxml, load_type, kWh_per_year, frac_sensible, frac_latent, location, weekday_sch, weekend_sch, monthly_mults)
2787
+ def _test_default_plug_load_values(hpxml, isdefaulted, load_type, kWh_per_year, frac_sensible, frac_latent, usage_multiplier, weekday_sch, weekend_sch, monthly_mults)
1895
2788
  pl = hpxml.plug_loads.select { |pl| pl.plug_load_type == load_type }[0]
2789
+
1896
2790
  assert_in_epsilon(kWh_per_year, pl.kWh_per_year, 0.01)
2791
+ assert_equal(isdefaulted, pl.kWh_per_year_isdefaulted)
2792
+
2793
+ assert_equal(usage_multiplier, pl.usage_multiplier)
2794
+ assert_equal(isdefaulted, pl.usage_multiplier_isdefaulted)
2795
+
1897
2796
  assert_in_epsilon(frac_sensible, pl.frac_sensible, 0.01)
2797
+ assert_equal(isdefaulted, pl.frac_sensible_isdefaulted)
2798
+
1898
2799
  assert_in_epsilon(frac_latent, pl.frac_latent, 0.01)
1899
- assert_equal(location, pl.location)
2800
+ assert_equal(isdefaulted, pl.frac_latent_isdefaulted)
2801
+
1900
2802
  assert_equal(weekday_sch, pl.weekday_fractions)
2803
+ assert_equal(isdefaulted, pl.weekday_fractions_isdefaulted)
2804
+
1901
2805
  assert_equal(weekend_sch, pl.weekend_fractions)
2806
+ assert_equal(isdefaulted, pl.weekend_fractions_isdefaulted)
2807
+
1902
2808
  assert_equal(monthly_mults, pl.monthly_multipliers)
2809
+ assert_equal(isdefaulted, pl.monthly_multipliers_isdefaulted)
1903
2810
  end
1904
2811
 
1905
- def _test_default_fuel_load_values(hpxml, load_type, therm_per_year, frac_sensible, frac_latent, location, weekday_sch, weekend_sch, monthly_mults)
2812
+ def _test_default_fuel_load_values(hpxml, isdefaulted, load_type, therm_per_year, frac_sensible, frac_latent, usage_multiplier, weekday_sch, weekend_sch, monthly_mults)
1906
2813
  fl = hpxml.fuel_loads.select { |fl| fl.fuel_load_type == load_type }[0]
2814
+
1907
2815
  assert_in_epsilon(therm_per_year, fl.therm_per_year, 0.01)
2816
+ assert_equal(isdefaulted, fl.therm_per_year_isdefaulted)
2817
+
2818
+ assert_equal(usage_multiplier, fl.usage_multiplier)
2819
+ assert_equal(isdefaulted, fl.usage_multiplier_isdefaulted)
2820
+
1908
2821
  assert_in_epsilon(frac_sensible, fl.frac_sensible, 0.01)
2822
+ assert_equal(isdefaulted, fl.frac_sensible_isdefaulted)
2823
+
1909
2824
  assert_in_epsilon(frac_latent, fl.frac_latent, 0.01)
1910
- assert_equal(location, fl.location)
2825
+ assert_equal(isdefaulted, fl.frac_latent_isdefaulted)
2826
+
1911
2827
  assert_equal(weekday_sch, fl.weekday_fractions)
2828
+ assert_equal(isdefaulted, fl.weekday_fractions_isdefaulted)
2829
+
1912
2830
  assert_equal(weekend_sch, fl.weekend_fractions)
1913
- assert_equal(monthly_mults, fl.monthly_multipliers)
1914
- end
2831
+ assert_equal(isdefaulted, fl.weekend_fractions_isdefaulted)
1915
2832
 
1916
- def _test_default_water_heater_values(hpxml, *expected_wh_values)
1917
- storage_water_heaters = hpxml.water_heating_systems.select { |w| w.water_heater_type == HPXML::WaterHeaterTypeStorage }
1918
- assert_equal(expected_wh_values.size, storage_water_heaters.size)
1919
- storage_water_heaters.each_with_index do |wh_system, idx|
1920
- is_shared, heating_capacity, tank_volume, recovery_efficiency = expected_wh_values[idx]
1921
- assert_equal(is_shared, wh_system.is_shared_system)
1922
- assert_in_epsilon(heating_capacity, wh_system.heating_capacity, 0.01)
1923
- assert_equal(tank_volume, wh_system.tank_volume)
1924
- assert_in_epsilon(recovery_efficiency, wh_system.recovery_efficiency, 0.01)
1925
- end
2833
+ assert_equal(monthly_mults, fl.monthly_multipliers)
2834
+ assert_equal(isdefaulted, fl.monthly_multipliers_isdefaulted)
1926
2835
  end
1927
2836
 
1928
2837
  def _create_hpxml(hpxml_name)