urbanopt-cli 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (712) hide show
  1. checksums.yaml +4 -4
  2. data/.github/release.yml +24 -0
  3. data/.github/workflows/nightly_ci_build.yml +39 -29
  4. data/.gitignore +1 -0
  5. data/CHANGELOG.md +17 -0
  6. data/CMakeLists.txt +7 -7
  7. data/FindOpenStudioSDK.cmake +8 -8
  8. data/LICENSE.md +8 -35
  9. data/README.md +25 -10
  10. data/example_files/Gemfile +9 -9
  11. data/example_files/example_project_combined.json +6 -2
  12. data/example_files/example_project_with_ghe.json +859 -0
  13. data/example_files/mappers/Baseline.rb +39 -415
  14. data/example_files/mappers/ChilledWaterStorage.rb +1 -1
  15. data/example_files/mappers/CreateBar.rb +1 -1
  16. data/example_files/mappers/EvCharging.rb +1 -1
  17. data/example_files/mappers/FlexibleHotWater.rb +1 -1
  18. data/example_files/mappers/Floorspace.rb +1 -1
  19. data/example_files/mappers/HighEfficiency.rb +1 -1
  20. data/example_files/mappers/HighEfficiencyCreateBar.rb +1 -1
  21. data/example_files/mappers/HighEfficiencyFloorspace.rb +1 -1
  22. data/example_files/mappers/PeakHoursMelsShedding.rb +1 -1
  23. data/example_files/mappers/PeakHoursThermostatAdjust.rb +1 -1
  24. data/example_files/mappers/ThermalStorage.rb +1 -1
  25. data/example_files/mappers/base_workflow.osw +11 -4
  26. data/example_files/mappers/residential/template/util.rb +138 -0
  27. data/example_files/mappers/residential/util.rb +276 -0
  28. data/example_files/measures/BuildResidentialModel/measure.rb +118 -230
  29. data/example_files/measures/BuildResidentialModel/measure.xml +344 -233
  30. data/example_files/measures/BuildResidentialModel/resources/geometry.rb +7 -2
  31. data/example_files/measures/BuildResidentialModel/resources/unit_conversions.rb +5 -0
  32. data/example_files/measures/BuildResidentialModel/resources/util.rb +5 -0
  33. data/example_files/measures/BuildResidentialModel/tests/test_build_residential_model.rb +344 -0
  34. data/example_files/measures/BuildResidentialModel/tests/xml_building/17/feature1.xml +2112 -0
  35. data/example_files/measures/BuildResidentialModel/tests/xml_building/17/feature2.xml +2112 -0
  36. data/example_files/osm_building/7.osm +0 -2
  37. data/example_files/osm_building/8.osm +0 -2
  38. data/example_files/osm_building/9.osm +0 -2
  39. data/example_files/python_deps/dependencies.json +4 -3
  40. data/example_files/resources/hpxml-measures/.gitattributes +3 -0
  41. data/example_files/resources/hpxml-measures/.github/pull_request_template.md +2 -2
  42. data/example_files/resources/hpxml-measures/.github/workflows/add_to_project.yml +17 -0
  43. data/example_files/resources/hpxml-measures/.github/workflows/config.yml +37 -8
  44. data/example_files/resources/hpxml-measures/.gitignore +1 -0
  45. data/example_files/resources/hpxml-measures/.readthedocs.yml +6 -2
  46. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/README.md +5596 -0
  47. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/README.md.erb +41 -0
  48. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/measure.rb +1324 -1035
  49. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/measure.xml +325 -236
  50. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/resources/geometry.rb +119 -152
  51. data/example_files/resources/hpxml-measures/BuildResidentialHPXML/tests/{build_residential_hpxml_test.rb → test_build_residential_hpxml.rb} +225 -107
  52. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/README.md +96 -0
  53. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/README.md.erb +41 -0
  54. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/measure.rb +73 -31
  55. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/measure.xml +60 -40
  56. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/resources/README.md +48 -23
  57. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/resources/constants.rb +5 -0
  58. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/resources/schedules.rb +6 -12
  59. data/example_files/resources/hpxml-measures/BuildResidentialScheduleFile/tests/{build_residential_schedule_file_test.rb → test_build_residential_schedule_file.rb} +162 -35
  60. data/example_files/resources/hpxml-measures/Changelog.md +57 -1
  61. data/example_files/resources/hpxml-measures/Gemfile +1 -1
  62. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/README.md +83 -0
  63. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/README.md.erb +41 -0
  64. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/measure.rb +1081 -878
  65. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/measure.xml +258 -204
  66. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/airflow.rb +205 -178
  67. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/battery.rb +43 -18
  68. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/constants.rb +37 -112
  69. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/constructions.rb +34 -73
  70. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/data/Xing_okstate_0664D_13659_Table_A-3.csv +4165 -0
  71. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/data/unavailable_periods.csv +2 -2
  72. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/energyplus.rb +5 -1
  73. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/generator.rb +13 -7
  74. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/geometry.rb +95 -42
  75. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hotwater_appliances.rb +132 -108
  76. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hpxml.rb +1695 -1267
  77. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hpxml_defaults.rb +668 -589
  78. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hpxml_schema/HPXML.xsd +304 -553
  79. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hpxml_schematron/EPvalidator.xml +197 -112
  80. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hvac.rb +1140 -1745
  81. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/hvac_sizing.rb +412 -325
  82. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/lighting.rb +56 -48
  83. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/location.rb +49 -38
  84. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/materials.rb +5 -0
  85. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/meta_measure.rb +17 -1
  86. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/minitest_helper.rb +5 -0
  87. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/misc_loads.rb +94 -78
  88. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/output.rb +60 -2
  89. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/psychrometrics.rb +6 -1
  90. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/pv.rb +11 -5
  91. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedule_files/occupancy-non-stochastic.csv +1 -1
  92. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic-30-mins.csv +52561 -0
  93. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic_2.csv +8761 -0
  94. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic_3.csv +8761 -0
  95. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic_4.csv +8761 -0
  96. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic_5.csv +8761 -0
  97. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedule_files/occupancy-stochastic_6.csv +8761 -0
  98. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/schedules.rb +129 -137
  99. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/simcontrols.rb +12 -21
  100. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/unit_conversions.rb +5 -0
  101. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/util.rb +7 -2
  102. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/utility_bills.rb +6 -1
  103. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/version.rb +7 -2
  104. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/waterheater.rb +179 -144
  105. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/weather.rb +129 -71
  106. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/xmlhelper.rb +5 -0
  107. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/resources/xmlvalidator.rb +23 -6
  108. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_airflow.rb +129 -118
  109. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_battery.rb +25 -20
  110. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_defaults.rb +2282 -2239
  111. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_enclosure.rb +395 -204
  112. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_generator.rb +12 -7
  113. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_hotwater_appliance.rb +56 -51
  114. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_hvac.rb +369 -230
  115. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_hvac_sizing.rb +371 -191
  116. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_lighting.rb +27 -20
  117. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_location.rb +55 -5
  118. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_miscloads.rb +35 -30
  119. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_pv.rb +13 -8
  120. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_schedules.rb +107 -93
  121. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_simcontrols.rb +11 -6
  122. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_validation.rb +757 -573
  123. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_water_heater.rb +77 -72
  124. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/test_weather.rb +36 -6
  125. data/example_files/resources/hpxml-measures/HPXMLtoOpenStudio/tests/util.rb +5 -0
  126. data/example_files/resources/hpxml-measures/README.md +2 -0
  127. data/example_files/resources/hpxml-measures/Rakefile +10 -3
  128. data/example_files/resources/hpxml-measures/ReportSimulationOutput/README.md +787 -0
  129. data/example_files/resources/hpxml-measures/ReportSimulationOutput/README.md.erb +41 -0
  130. data/example_files/resources/hpxml-measures/ReportSimulationOutput/measure.rb +730 -418
  131. data/example_files/resources/hpxml-measures/ReportSimulationOutput/measure.xml +1215 -9
  132. data/example_files/resources/hpxml-measures/ReportSimulationOutput/tests/{output_report_test.rb → test_report_sim_output.rb} +130 -299
  133. data/example_files/resources/hpxml-measures/ReportUtilityBills/README.md +87 -0
  134. data/example_files/resources/hpxml-measures/ReportUtilityBills/README.md.erb +41 -0
  135. data/example_files/resources/hpxml-measures/ReportUtilityBills/measure.rb +261 -89
  136. data/example_files/resources/hpxml-measures/ReportUtilityBills/measure.xml +179 -94
  137. data/example_files/resources/hpxml-measures/ReportUtilityBills/resources/simple_rates/Average_retail_price_of_electricity.csv +68 -68
  138. data/example_files/resources/hpxml-measures/ReportUtilityBills/resources/simple_rates/NG_PRI_SUM_A_EPG0_PRS_DMCF_A.csv +3 -2
  139. data/example_files/resources/hpxml-measures/ReportUtilityBills/resources/simple_rates/PET_PRI_WFR_A_EPD2F_PRS_DPGAL_W.csv +713 -685
  140. data/example_files/resources/hpxml-measures/ReportUtilityBills/resources/simple_rates/PET_PRI_WFR_A_EPLLPA_PRS_DPGAL_W.csv +716 -688
  141. data/example_files/resources/hpxml-measures/ReportUtilityBills/resources/simple_rates/README.md +5 -2
  142. data/example_files/resources/hpxml-measures/ReportUtilityBills/resources/util.rb +18 -9
  143. data/example_files/resources/hpxml-measures/ReportUtilityBills/tests/test_report_utility_bills.rb +1308 -0
  144. data/example_files/resources/hpxml-measures/docs/requirements.txt +5 -0
  145. data/example_files/resources/hpxml-measures/docs/source/conf.py +1 -2
  146. data/example_files/resources/hpxml-measures/docs/source/intro.rst +3 -20
  147. data/example_files/resources/hpxml-measures/docs/source/usage_instructions.rst +1 -1
  148. data/example_files/resources/hpxml-measures/docs/source/workflow_inputs.rst +917 -564
  149. data/example_files/resources/hpxml-measures/docs/source/workflow_outputs.rst +79 -42
  150. data/example_files/resources/hpxml-measures/tasks.rb +2305 -2055
  151. data/example_files/resources/hpxml-measures/workflow/hpxml_inputs.json +270 -587
  152. data/example_files/resources/hpxml-measures/workflow/real_homes/house001.xml +559 -557
  153. data/example_files/resources/hpxml-measures/workflow/real_homes/house002.xml +522 -520
  154. data/example_files/resources/hpxml-measures/workflow/real_homes/house003.xml +534 -532
  155. data/example_files/resources/hpxml-measures/workflow/real_homes/house004.xml +547 -545
  156. data/example_files/resources/hpxml-measures/workflow/real_homes/house005.xml +546 -544
  157. data/example_files/resources/hpxml-measures/workflow/real_homes/house006.xml +603 -623
  158. data/example_files/resources/hpxml-measures/workflow/real_homes/house007.xml +613 -633
  159. data/example_files/resources/hpxml-measures/workflow/real_homes/house008.xml +699 -721
  160. data/example_files/resources/hpxml-measures/workflow/real_homes/house009.xml +662 -661
  161. data/example_files/resources/hpxml-measures/workflow/real_homes/house010.xml +657 -677
  162. data/example_files/resources/hpxml-measures/workflow/real_homes/house011.xml +470 -467
  163. data/example_files/resources/hpxml-measures/workflow/real_homes/house012.xml +441 -438
  164. data/example_files/resources/hpxml-measures/workflow/real_homes/house013.xml +468 -465
  165. data/example_files/resources/hpxml-measures/workflow/real_homes/house014.xml +469 -466
  166. data/example_files/resources/hpxml-measures/workflow/real_homes/house015.xml +468 -465
  167. data/example_files/resources/hpxml-measures/workflow/real_homes/house016.xml +717 -714
  168. data/example_files/resources/hpxml-measures/workflow/real_homes/house017.xml +647 -645
  169. data/example_files/resources/hpxml-measures/workflow/real_homes/house018.xml +569 -566
  170. data/example_files/resources/hpxml-measures/workflow/real_homes/house019.xml +602 -599
  171. data/example_files/resources/hpxml-measures/workflow/real_homes/house020.xml +630 -627
  172. data/example_files/resources/hpxml-measures/workflow/real_homes/house021.xml +776 -774
  173. data/example_files/resources/hpxml-measures/workflow/real_homes/house022.xml +670 -667
  174. data/example_files/resources/hpxml-measures/workflow/real_homes/house023.xml +632 -629
  175. data/example_files/resources/hpxml-measures/workflow/real_homes/house024.xml +731 -729
  176. data/example_files/resources/hpxml-measures/workflow/real_homes/house025.xml +672 -669
  177. data/example_files/resources/hpxml-measures/workflow/real_homes/house026.xml +667 -644
  178. data/example_files/resources/hpxml-measures/workflow/real_homes/house027.xml +646 -644
  179. data/example_files/resources/hpxml-measures/workflow/real_homes/house028.xml +690 -688
  180. data/example_files/resources/hpxml-measures/workflow/real_homes/house029.xml +701 -699
  181. data/example_files/resources/hpxml-measures/workflow/real_homes/house030.xml +637 -615
  182. data/example_files/resources/hpxml-measures/workflow/real_homes/house031.xml +690 -688
  183. data/example_files/resources/hpxml-measures/workflow/real_homes/house032.xml +557 -554
  184. data/example_files/resources/hpxml-measures/workflow/real_homes/house033.xml +534 -531
  185. data/example_files/resources/hpxml-measures/workflow/real_homes/house034.xml +636 -635
  186. data/example_files/resources/hpxml-measures/workflow/real_homes/house035.xml +616 -613
  187. data/example_files/resources/hpxml-measures/workflow/real_homes/house036.xml +601 -598
  188. data/example_files/resources/hpxml-measures/workflow/real_homes/house037.xml +581 -578
  189. data/example_files/resources/hpxml-measures/workflow/real_homes/house038.xml +624 -622
  190. data/example_files/resources/hpxml-measures/workflow/real_homes/house039.xml +584 -582
  191. data/example_files/resources/hpxml-measures/workflow/real_homes/house040.xml +631 -629
  192. data/example_files/resources/hpxml-measures/workflow/real_homes/house041.xml +922 -921
  193. data/example_files/resources/hpxml-measures/workflow/real_homes/house042.xml +855 -853
  194. data/example_files/resources/hpxml-measures/workflow/real_homes/house043.xml +739 -737
  195. data/example_files/resources/hpxml-measures/workflow/real_homes/house044.xml +798 -796
  196. data/example_files/resources/hpxml-measures/workflow/real_homes/house045.xml +696 -694
  197. data/example_files/resources/hpxml-measures/workflow/real_homes/house046.xml +487 -483
  198. data/example_files/resources/hpxml-measures/workflow/real_homes/house047.xml +443 -440
  199. data/example_files/resources/hpxml-measures/workflow/real_homes/house048.xml +688 -686
  200. data/example_files/resources/hpxml-measures/workflow/real_homes/house049.xml +722 -720
  201. data/example_files/resources/hpxml-measures/workflow/real_homes/house050.xml +619 -617
  202. data/example_files/resources/hpxml-measures/workflow/run_simulation.rb +13 -20
  203. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-coal.xml +9 -9
  204. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-dehumidifier-ief-portable.xml +11 -12
  205. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-dehumidifier-ief-whole-home.xml +11 -12
  206. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-dehumidifier-multiple.xml +12 -13
  207. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-dehumidifier.xml +11 -12
  208. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-gas.xml +9 -9
  209. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-modified.xml +9 -9
  210. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-none.xml +4 -4
  211. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-oil.xml +9 -9
  212. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-propane.xml +9 -9
  213. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-wood.xml +9 -9
  214. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-cathedral.xml +11 -11
  215. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-conditioned.xml +10 -10
  216. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-flat.xml +9 -9
  217. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-radiant-barrier.xml +10 -11
  218. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-unvented-insulated-roof.xml +9 -9
  219. data/example_files/resources/hpxml-measures/workflow/sample_files/base-atticroof-vented.xml +8 -8
  220. data/example_files/resources/hpxml-measures/workflow/sample_files/base-battery-scheduled.xml +571 -569
  221. data/example_files/resources/hpxml-measures/workflow/sample_files/base-battery.xml +9 -9
  222. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-adjacent-to-multifamily-buffer-space.xml → base-bldgtype-mf-unit-adjacent-to-multifamily-buffer-space.xml} +5 -5
  223. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-adjacent-to-multiple.xml → base-bldgtype-mf-unit-adjacent-to-multiple.xml} +17 -17
  224. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-adjacent-to-non-freezing-space.xml → base-bldgtype-mf-unit-adjacent-to-non-freezing-space.xml} +5 -5
  225. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-adjacent-to-other-heated-space.xml → base-bldgtype-mf-unit-adjacent-to-other-heated-space.xml} +5 -5
  226. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-adjacent-to-other-housing-unit.xml → base-bldgtype-mf-unit-adjacent-to-other-housing-unit.xml} +5 -5
  227. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-infil-compartmentalization-test.xml → base-bldgtype-mf-unit-infil-compartmentalization-test.xml} +461 -461
  228. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-residents-1.xml → base-bldgtype-mf-unit-residents-1.xml} +453 -453
  229. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-chiller-baseboard.xml → base-bldgtype-mf-unit-shared-boiler-chiller-baseboard.xml} +11 -11
  230. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-chiller-fan-coil-ducted.xml → base-bldgtype-mf-unit-shared-boiler-chiller-fan-coil-ducted.xml} +11 -11
  231. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-chiller-fan-coil.xml → base-bldgtype-mf-unit-shared-boiler-chiller-fan-coil.xml} +11 -11
  232. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-chiller-water-loop-heat-pump.xml → base-bldgtype-mf-unit-shared-boiler-chiller-water-loop-heat-pump.xml} +11 -11
  233. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-cooling-tower-water-loop-heat-pump.xml → base-bldgtype-mf-unit-shared-boiler-cooling-tower-water-loop-heat-pump.xml} +11 -11
  234. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-only-baseboard.xml → base-bldgtype-mf-unit-shared-boiler-only-baseboard.xml} +11 -11
  235. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-only-fan-coil-ducted.xml → base-bldgtype-mf-unit-shared-boiler-only-fan-coil-ducted.xml} +11 -11
  236. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-only-fan-coil-eae.xml → base-bldgtype-mf-unit-shared-boiler-only-fan-coil-eae.xml} +11 -11
  237. data/example_files/resources/hpxml-measures/workflow/sample_files/base-bldgtype-mf-unit-shared-boiler-only-fan-coil-fireplace-elec.xml +433 -0
  238. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-only-fan-coil.xml → base-bldgtype-mf-unit-shared-boiler-only-fan-coil.xml} +11 -11
  239. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-boiler-only-water-loop-heat-pump.xml → base-bldgtype-mf-unit-shared-boiler-only-water-loop-heat-pump.xml} +11 -11
  240. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-chiller-only-baseboard.xml → base-bldgtype-mf-unit-shared-chiller-only-baseboard.xml} +11 -11
  241. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-chiller-only-fan-coil-ducted.xml → base-bldgtype-mf-unit-shared-chiller-only-fan-coil-ducted.xml} +11 -11
  242. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-chiller-only-fan-coil.xml → base-bldgtype-mf-unit-shared-chiller-only-fan-coil.xml} +11 -11
  243. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-chiller-only-water-loop-heat-pump.xml → base-bldgtype-mf-unit-shared-chiller-only-water-loop-heat-pump.xml} +11 -11
  244. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-cooling-tower-only-water-loop-heat-pump.xml → base-bldgtype-mf-unit-shared-cooling-tower-only-water-loop-heat-pump.xml} +11 -11
  245. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-generator.xml → base-bldgtype-mf-unit-shared-generator.xml} +13 -13
  246. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-ground-loop-ground-to-air-heat-pump.xml → base-bldgtype-mf-unit-shared-ground-loop-ground-to-air-heat-pump.xml} +13 -13
  247. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-laundry-room-multiple-water-heaters.xml → base-bldgtype-mf-unit-shared-laundry-room-multiple-water-heaters.xml} +480 -480
  248. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-laundry-room.xml → base-bldgtype-mf-unit-shared-laundry-room.xml} +10 -10
  249. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-mechvent-multiple.xml → base-bldgtype-mf-unit-shared-mechvent-multiple.xml} +15 -15
  250. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-mechvent-preconditioning.xml → base-bldgtype-mf-unit-shared-mechvent-preconditioning.xml} +13 -13
  251. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-mechvent.xml → base-bldgtype-mf-unit-shared-mechvent.xml} +13 -13
  252. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-pv.xml → base-bldgtype-mf-unit-shared-pv.xml} +13 -13
  253. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-water-heater-recirc.xml → base-bldgtype-mf-unit-shared-water-heater-recirc.xml} +13 -13
  254. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily-shared-water-heater.xml → base-bldgtype-mf-unit-shared-water-heater.xml} +13 -13
  255. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-multifamily.xml → base-bldgtype-mf-unit.xml} +13 -13
  256. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-attached-2stories.xml → base-bldgtype-sfa-unit-2stories.xml} +610 -610
  257. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-attached-atticroof-cathedral.xml → base-bldgtype-sfa-unit-atticroof-cathedral.xml} +558 -558
  258. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-attached-infil-compartmentalization-test.xml → base-bldgtype-sfa-unit-infil-compartmentalization-test.xml} +610 -610
  259. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-bldgtype-attached.xml → base-bldgtype-sfa-unit.xml} +610 -610
  260. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-combi-tankless-outside.xml +8 -8
  261. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-combi-tankless.xml +9 -9
  262. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater-2-speed.xml +9 -9
  263. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater-gshp.xml +9 -9
  264. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater-hpwh.xml +9 -9
  265. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater-tankless.xml +9 -9
  266. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater-var-speed.xml +9 -9
  267. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-desuperheater.xml +9 -9
  268. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-dwhr.xml +9 -9
  269. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect-detailed-setpoints.xml +507 -505
  270. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect-dse.xml +9 -9
  271. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect-outside.xml +8 -8
  272. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect-standbyloss.xml +9 -9
  273. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect-with-solar-fraction.xml +9 -9
  274. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-indirect.xml +9 -9
  275. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-jacket-electric.xml +9 -9
  276. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-jacket-gas.xml +9 -9
  277. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-jacket-hpwh.xml +9 -9
  278. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-jacket-indirect.xml +9 -9
  279. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-low-flow-fixtures.xml +12 -10
  280. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-multiple.xml +14 -14
  281. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-none.xml +5 -5
  282. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-recirc-demand.xml +9 -9
  283. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-recirc-manual.xml +9 -9
  284. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-recirc-nocontrol.xml +9 -9
  285. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-recirc-temperature.xml +9 -9
  286. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-recirc-timer.xml +9 -9
  287. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-direct-evacuated-tube.xml +9 -9
  288. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-direct-flat-plate.xml +9 -9
  289. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-direct-ics.xml +9 -9
  290. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-fraction.xml +9 -9
  291. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-indirect-flat-plate.xml +9 -9
  292. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-solar-thermosyphon-flat-plate.xml +9 -9
  293. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-coal.xml +9 -9
  294. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-detailed-setpoints.xml +12 -10
  295. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-elec-uef.xml +9 -9
  296. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-gas-outside.xml +8 -8
  297. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-gas-uef-fhr.xml +9 -9
  298. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-gas-uef.xml +9 -9
  299. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-gas.xml +9 -9
  300. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump-detailed-schedules.xml +13 -11
  301. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump-operating-mode-heat-pump-only.xml +9 -9
  302. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump-outside.xml +8 -8
  303. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump-uef.xml +9 -9
  304. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump-with-solar-fraction.xml +9 -9
  305. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump-with-solar.xml +9 -9
  306. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-heat-pump.xml +9 -9
  307. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-model-type-stratified-detailed-occupancy-stochastic.xml +12 -10
  308. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-model-type-stratified.xml +9 -9
  309. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-oil.xml +9 -9
  310. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tank-wood.xml +9 -9
  311. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-detailed-setpoints.xml +12 -10
  312. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-electric-outside.xml +8 -8
  313. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-electric-uef.xml +9 -9
  314. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-electric.xml +9 -9
  315. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-gas-uef.xml +9 -9
  316. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-gas-with-solar-fraction.xml +9 -9
  317. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-gas-with-solar.xml +9 -9
  318. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-gas.xml +9 -9
  319. data/example_files/resources/hpxml-measures/workflow/sample_files/base-dhw-tankless-propane.xml +9 -9
  320. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-2stories-garage.xml +13 -14
  321. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-2stories.xml +11 -11
  322. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-beds-1.xml +9 -9
  323. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-beds-2.xml +9 -9
  324. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-beds-4.xml +9 -9
  325. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-beds-5.xml +9 -9
  326. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-ceilingtypes.xml +576 -576
  327. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-floortypes.xml +519 -519
  328. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-garage.xml +4 -5
  329. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-ach-house-pressure.xml +9 -9
  330. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-cfm-house-pressure.xml +9 -9
  331. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-cfm50.xml +9 -9
  332. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-ela.xml +548 -548
  333. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-flue.xml +9 -9
  334. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-natural-ach.xml +9 -9
  335. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-infil-natural-cfm.xml +551 -551
  336. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-orientations.xml +9 -9
  337. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-overhangs.xml +9 -9
  338. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-rooftypes.xml +9 -9
  339. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-skylights-physical-properties.xml +9 -9
  340. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-skylights-shading.xml +9 -9
  341. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-skylights-storms.xml +9 -9
  342. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-skylights.xml +9 -9
  343. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-split-level.xml +10 -11
  344. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-thermal-mass.xml +9 -9
  345. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-walltypes.xml +19 -19
  346. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-windows-natural-ventilation-availability.xml +555 -553
  347. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-windows-none.xml +9 -9
  348. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-windows-physical-properties.xml +9 -9
  349. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-windows-shading-seasons.xml +560 -558
  350. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-windows-shading.xml +9 -9
  351. data/example_files/resources/hpxml-measures/workflow/sample_files/base-enclosure-windows-storms.xml +9 -9
  352. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-ambient.xml +10 -10
  353. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-basement-garage.xml +10 -11
  354. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-belly-wing-no-skirt.xml +496 -0
  355. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-belly-wing-skirt.xml +496 -0
  356. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-complex.xml +18 -18
  357. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-schedules-simple-power-outage-natvent-unavailable.xml → base-foundation-conditioned-basement-slab-insulation-full.xml} +552 -564
  358. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-conditioned-basement-slab-insulation.xml +9 -9
  359. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-conditioned-basement-wall-insulation.xml +555 -555
  360. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-conditioned-crawlspace.xml +8 -8
  361. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-multiple.xml +5 -5
  362. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-slab.xml +10 -11
  363. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-unconditioned-basement-above-grade.xml +4 -4
  364. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-unconditioned-basement-assembly-r.xml +4 -4
  365. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-unconditioned-basement-wall-insulation.xml +4 -4
  366. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-unconditioned-basement.xml +4 -4
  367. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-unvented-crawlspace.xml +9 -9
  368. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-vented-crawlspace-above-grade.xml +558 -0
  369. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-vented-crawlspace.xml +9 -9
  370. data/example_files/resources/hpxml-measures/workflow/sample_files/base-foundation-walkout-basement.xml +15 -15
  371. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-1-speed-cooling-only.xml +9 -9
  372. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-1-speed-heating-capacity-17f.xml +552 -552
  373. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-1-speed-heating-only.xml +9 -9
  374. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-1-speed-lockout-temperatures.xml +562 -562
  375. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-1-speed-seer2-hspf2.xml +557 -557
  376. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-1-speed.xml +9 -9
  377. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-2-speed.xml +9 -9
  378. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-var-speed-backup-boiler-hvac-seasons.xml +586 -586
  379. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-var-speed-backup-boiler-switchover-temperature.xml +9 -9
  380. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-var-speed-backup-boiler.xml +9 -9
  381. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-var-speed-backup-furnace.xml +9 -9
  382. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-air-to-air-heat-pump-var-speed-sizing-methodology-acca.xml → base-hvac-air-to-air-heat-pump-var-speed-detailed-performance-other-temperatures.xml} +89 -13
  383. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-air-to-air-heat-pump-var-speed-sizing-methodology-hers.xml → base-hvac-air-to-air-heat-pump-var-speed-detailed-performance.xml} +107 -13
  384. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-air-to-air-heat-pump-var-speed.xml +9 -9
  385. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-sizing-controls.xml +567 -565
  386. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize.xml +9 -9
  387. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-coal-only.xml +9 -9
  388. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-elec-only.xml +9 -9
  389. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-gas-central-ac-1-speed.xml +9 -9
  390. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-gas-only-pilot.xml +512 -512
  391. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-gas-only.xml +9 -9
  392. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-oil-only.xml +9 -9
  393. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-propane-only.xml +9 -9
  394. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-boiler-wood-only.xml +9 -9
  395. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-central-ac-only-1-speed-seer2.xml +536 -536
  396. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-central-ac-only-1-speed.xml +9 -9
  397. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-central-ac-only-2-speed.xml +9 -9
  398. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-central-ac-only-var-speed.xml → base-hvac-central-ac-only-var-speed-detailed-performance.xml} +49 -10
  399. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-central-ac-only-var-speed.xml +9 -9
  400. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-central-ac-plus-air-to-air-heat-pump-heating.xml +9 -9
  401. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dse.xml +9 -9
  402. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dual-fuel-air-to-air-heat-pump-1-speed-lockout-temperatures.xml +559 -559
  403. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dual-fuel-air-to-air-heat-pump-1-speed.xml +9 -9
  404. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dual-fuel-air-to-air-heat-pump-2-speed.xml +9 -9
  405. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dual-fuel-air-to-air-heat-pump-var-speed.xml +9 -9
  406. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-dual-fuel-mini-split-heat-pump-ducted.xml +9 -9
  407. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ducts-area-fractions.xml +11 -12
  408. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ducts-area-multipliers.xml +558 -558
  409. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ducts-buried.xml +554 -554
  410. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-furnace-gas-room-ac.xml → base-hvac-ducts-defaults.xml} +28 -14
  411. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ducts-effective-rvalue.xml +552 -552
  412. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ducts-leakage-cfm50.xml +9 -9
  413. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ducts-leakage-percent.xml +9 -9
  414. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-elec-resistance-only.xml +9 -9
  415. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-evap-cooler-furnace-gas.xml +9 -9
  416. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-evap-cooler-only-ducted.xml +9 -9
  417. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-evap-cooler-only.xml +9 -9
  418. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-fireplace-wood-only.xml +9 -9
  419. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-floor-furnace-propane-only.xml +15 -10
  420. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-coal-only.xml +9 -9
  421. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-elec-central-ac-1-speed.xml +9 -9
  422. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-elec-only.xml +9 -9
  423. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-central-ac-2-speed.xml +9 -9
  424. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-central-ac-var-speed.xml +9 -9
  425. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-only-detailed-setpoints.xml +12 -10
  426. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-only-pilot.xml +541 -541
  427. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-only.xml +9 -9
  428. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-gas-room-ac.xml +9 -9
  429. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-oil-only.xml +9 -9
  430. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-propane-only.xml +9 -9
  431. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-wood-only.xml +9 -9
  432. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-furnace-x3-dse.xml +9 -9
  433. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ground-to-air-heat-pump-cooling-only.xml +9 -9
  434. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ground-to-air-heat-pump-heating-only.xml +9 -9
  435. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ground-to-air-heat-pump.xml +9 -9
  436. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-air-to-air-heat-pump-1-speed.xml +9 -9
  437. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-air-to-air-heat-pump-2-speed.xml +9 -9
  438. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-air-to-air-heat-pump-1-speed-autosized-backup.xml → base-hvac-install-quality-air-to-air-heat-pump-var-speed-detailed-performance.xml} +650 -556
  439. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-air-to-air-heat-pump-var-speed.xml +9 -9
  440. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-furnace-gas-central-ac-1-speed.xml +9 -9
  441. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-furnace-gas-central-ac-2-speed.xml +9 -9
  442. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-furnace-gas-central-ac-var-speed.xml +9 -9
  443. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-furnace-gas-only.xml +9 -9
  444. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-ground-to-air-heat-pump.xml +9 -9
  445. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-mini-split-air-conditioner-only-ducted.xml +9 -9
  446. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-install-quality-mini-split-heat-pump-ducted.xml +9 -9
  447. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-air-conditioner-only-ducted.xml +9 -9
  448. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-mini-split-air-conditioner-only-ducted.xml → base-hvac-mini-split-air-conditioner-only-ductless-detailed-performance.xml} +50 -49
  449. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-air-conditioner-only-ductless.xml +9 -9
  450. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ducted-cooling-only.xml +9 -9
  451. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-mini-split-heat-pump-ducted-sizing-methodology-maxload.xml → base-hvac-mini-split-heat-pump-ducted-detailed-performance.xml} +109 -14
  452. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ducted-heating-only.xml +9 -9
  453. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ducted.xml +9 -9
  454. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ductless-backup-baseboard.xml +524 -524
  455. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-dual-fuel-mini-split-heat-pump-ducted-backup-hardsized.xml → base-hvac-mini-split-heat-pump-ductless-backup-furnace-ducts-defaults.xml} +560 -552
  456. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ductless-backup-furnace.xml +563 -563
  457. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ductless-backup-stove.xml +9 -9
  458. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-autosize-dual-fuel-mini-split-heat-pump-ducted.xml → base-hvac-mini-split-heat-pump-ductless-detailed-performance.xml} +108 -60
  459. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ductless-heating-capacity-17f.xml +505 -505
  460. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-mini-split-heat-pump-ductless.xml +9 -9
  461. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-multiple.xml +9 -9
  462. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-none.xml +10 -11
  463. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ptac-with-heating-electricity.xml +9 -9
  464. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ptac-with-heating-natural-gas.xml +504 -504
  465. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-ptac.xml +9 -9
  466. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-pthp-heating-capacity-17f.xml +512 -512
  467. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-pthp.xml +9 -9
  468. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-room-ac-only-33percent.xml +9 -9
  469. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-room-ac-only-ceer.xml +9 -9
  470. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-room-ac-only-detailed-setpoints.xml +12 -10
  471. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-room-ac-only.xml +9 -9
  472. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-room-ac-with-heating.xml +504 -504
  473. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-room-ac-with-reverse-cycle.xml +517 -517
  474. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-seasons.xml +9 -9
  475. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-setpoints-daily-schedules.xml +9 -9
  476. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-setpoints-daily-setbacks.xml +9 -9
  477. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-setpoints.xml +9 -9
  478. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-fixed-heater-gas-only.xml → base-hvac-space-heater-gas-only.xml} +10 -10
  479. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-stove-oil-only.xml +9 -9
  480. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-stove-wood-pellets-only.xml +9 -9
  481. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-undersized.xml +9 -9
  482. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-wall-furnace-elec-only.xml +9 -9
  483. data/example_files/resources/hpxml-measures/workflow/sample_files/base-lighting-ceiling-fans.xml +9 -9
  484. data/example_files/resources/hpxml-measures/workflow/sample_files/base-lighting-holiday.xml +9 -9
  485. data/example_files/resources/hpxml-measures/workflow/sample_files/base-lighting-kwh-per-year.xml +531 -528
  486. data/example_files/resources/hpxml-measures/workflow/sample_files/base-lighting-mixed.xml +536 -536
  487. data/example_files/resources/hpxml-measures/workflow/sample_files/base-lighting-none-ceiling-fans.xml +515 -515
  488. data/example_files/resources/hpxml-measures/workflow/sample_files/base-lighting-none.xml +9 -9
  489. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-AMY-2012.xml +9 -9
  490. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-baltimore-md.xml +9 -9
  491. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-capetown-zaf.xml +9 -9
  492. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-dallas-tx.xml +10 -11
  493. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-duluth-mn.xml +4 -4
  494. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-helena-mt.xml +9 -9
  495. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-honolulu-hi.xml +10 -11
  496. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-miami-fl.xml +10 -11
  497. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-phoenix-az.xml +10 -11
  498. data/example_files/resources/hpxml-measures/workflow/sample_files/base-location-portland-or.xml +9 -9
  499. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-balanced.xml +9 -9
  500. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-bath-kitchen-fans.xml +9 -9
  501. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-cfis-airflow-fraction-zero.xml +9 -9
  502. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-cfis-dse.xml +9 -9
  503. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-cfis-evap-cooler-only-ducted.xml +9 -9
  504. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-cfis-supplemental-fan-exhaust.xml +576 -576
  505. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-cfis-supplemental-fan-supply.xml +576 -576
  506. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-cfis.xml +9 -9
  507. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-erv-atre-asre.xml +9 -9
  508. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-erv.xml +9 -9
  509. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-exhaust-rated-flow-rate.xml +9 -9
  510. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-exhaust.xml +9 -9
  511. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-hrv-asre.xml +9 -9
  512. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-hrv.xml +9 -9
  513. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-multiple.xml +9 -9
  514. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-supply.xml +9 -9
  515. data/example_files/resources/hpxml-measures/workflow/sample_files/base-mechvent-whole-house-fan.xml +9 -9
  516. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-additional-properties.xml +21 -19
  517. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-bills-pv-detailed-only.xml +605 -605
  518. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-bills-pv-mixed.xml +587 -587
  519. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-bills-pv.xml +9 -9
  520. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-bills.xml +9 -9
  521. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-defaults.xml +3 -3
  522. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-emissions.xml +9 -9
  523. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-generators-battery-scheduled.xml +587 -585
  524. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-generators-battery.xml +584 -584
  525. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-generators.xml +9 -9
  526. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-ground-conductivity.xml +555 -555
  527. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-loads-large-uncommon.xml +26 -26
  528. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-loads-large-uncommon2.xml +26 -26
  529. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-loads-none.xml +9 -9
  530. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-neighbor-shading-bldgtype-multifamily.xml +508 -508
  531. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-neighbor-shading.xml +9 -9
  532. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-shielding-of-home.xml +9 -9
  533. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-schedules-simple-power-outage-natvent-available.xml → base-misc-unit-multiplier.xml} +553 -564
  534. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-usage-multiplier.xml +26 -26
  535. data/example_files/resources/hpxml-measures/workflow/sample_files/base-multiple-mf-units.xml +2755 -0
  536. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-multiple-buildings.xml → base-multiple-sfd-buildings.xml} +31 -22
  537. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-battery-ah.xml +9 -9
  538. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-battery-garage.xml +4 -5
  539. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-battery-round-trip-efficiency.xml +597 -597
  540. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-battery-scheduled.xml +599 -597
  541. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-battery.xml +9 -9
  542. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-generators-battery-scheduled.xml +615 -613
  543. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-generators-battery.xml +612 -612
  544. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv-generators.xml +596 -596
  545. data/example_files/resources/hpxml-measures/workflow/sample_files/base-pv.xml +9 -9
  546. data/example_files/resources/hpxml-measures/workflow/sample_files/base-residents-0-runperiod-1-month.xml +559 -559
  547. data/example_files/resources/hpxml-measures/workflow/sample_files/base-residents-0.xml +555 -555
  548. data/example_files/resources/hpxml-measures/workflow/sample_files/base-residents-1-misc-loads-large-uncommon.xml +616 -616
  549. data/example_files/resources/hpxml-measures/workflow/sample_files/base-residents-1-misc-loads-large-uncommon2.xml +616 -616
  550. data/example_files/resources/hpxml-measures/workflow/sample_files/base-residents-1.xml +547 -547
  551. data/example_files/resources/hpxml-measures/workflow/sample_files/base-residents-5.xml +515 -515
  552. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-all-10-mins.xml +14 -12
  553. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-hvac-crankcase-heater-40w.xml → base-schedules-detailed-mixed-timesteps-power-outage.xml} +565 -555
  554. data/example_files/resources/hpxml-measures/workflow/sample_files/{base-schedules-detailed-occupancy-stochastic-vacancy-year-round.xml → base-schedules-detailed-mixed-timesteps.xml} +554 -563
  555. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-occupancy-stochastic-10-mins.xml +12 -10
  556. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-occupancy-stochastic-power-outage.xml +566 -564
  557. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-occupancy-stochastic-vacancy.xml +12 -10
  558. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-occupancy-stochastic.xml +12 -10
  559. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-setpoints-daily-schedules.xml +12 -10
  560. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-setpoints-daily-setbacks.xml +12 -10
  561. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-detailed-setpoints.xml +12 -10
  562. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-simple-power-outage.xml +619 -619
  563. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-simple-vacancy.xml +618 -618
  564. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-simple.xml +9 -9
  565. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-calendar-year-custom.xml +9 -9
  566. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-daylight-saving-custom.xml +9 -9
  567. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-daylight-saving-disabled.xml +9 -9
  568. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-runperiod-1-month.xml +9 -9
  569. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-temperature-capacitance-multiplier.xml +553 -553
  570. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-timestep-10-mins-occupancy-stochastic-10-mins.xml +12 -10
  571. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-timestep-10-mins-occupancy-stochastic-60-mins.xml +12 -10
  572. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-timestep-10-mins.xml +9 -9
  573. data/example_files/resources/hpxml-measures/workflow/sample_files/base-simcontrol-timestep-30-mins.xml +552 -552
  574. data/example_files/resources/hpxml-measures/workflow/sample_files/base.xml +9 -9
  575. data/example_files/resources/hpxml-measures/workflow/template-build-and-run-hpxml-with-stochastic-occupancy.osw +2 -0
  576. data/example_files/resources/hpxml-measures/workflow/template-run-hpxml-with-stochastic-occupancy-subset.osw +2 -0
  577. data/example_files/resources/hpxml-measures/workflow/template-run-hpxml-with-stochastic-occupancy.osw +2 -0
  578. data/example_files/resources/hpxml-measures/workflow/template-run-hpxml.osw +4 -1
  579. data/example_files/resources/hpxml-measures/workflow/tests/ACCA_Examples/Long_Residence.xml +385 -385
  580. data/example_files/resources/hpxml-measures/workflow/tests/ACCA_Examples/Vatilo_Residence.xml +378 -380
  581. data/example_files/resources/hpxml-measures/workflow/tests/ACCA_Examples/Victor_Residence.xml +369 -369
  582. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L100AC.xml +7 -7
  583. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L100AL.xml +7 -7
  584. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L110AC.xml +7 -7
  585. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L110AL.xml +7 -7
  586. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L120AC.xml +7 -7
  587. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L120AL.xml +7 -7
  588. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L130AC.xml +7 -7
  589. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L130AL.xml +7 -7
  590. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L140AC.xml +7 -7
  591. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L140AL.xml +7 -7
  592. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L150AC.xml +7 -7
  593. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L150AL.xml +7 -7
  594. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L155AC.xml +7 -7
  595. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L155AL.xml +7 -7
  596. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L160AC.xml +7 -7
  597. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L160AL.xml +7 -7
  598. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L170AC.xml +7 -7
  599. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L170AL.xml +7 -7
  600. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L200AC.xml +7 -7
  601. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L200AL.xml +7 -7
  602. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L202AC.xml +7 -7
  603. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L202AL.xml +7 -7
  604. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L302XC.xml +7 -8
  605. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L304XC.xml +7 -8
  606. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L322XC.xml +6 -6
  607. data/example_files/resources/hpxml-measures/workflow/tests/ASHRAE_Standard_140/L324XC.xml +6 -6
  608. data/example_files/resources/hpxml-measures/workflow/tests/base_results/results_sizing.csv +363 -0
  609. data/example_files/resources/hpxml-measures/workflow/tests/base_results/results_workflow_simulations1.csv +281 -0
  610. data/example_files/resources/hpxml-measures/workflow/tests/base_results/results_workflow_simulations1_bills.csv +281 -0
  611. data/example_files/resources/hpxml-measures/workflow/tests/base_results/results_workflow_simulations2.csv +141 -0
  612. data/example_files/resources/hpxml-measures/workflow/tests/base_results/results_workflow_simulations2_bills.csv +141 -0
  613. data/example_files/resources/hpxml-measures/workflow/tests/compare.py +12 -6
  614. data/example_files/resources/hpxml-measures/workflow/tests/util.rb +1141 -0
  615. data/example_files/weather/USA_CO_Denver.Intl.AP.725650_TMY3.ddy +536 -0
  616. data/example_files/weather/USA_CO_Denver.Intl.AP.725650_TMY3.epw +8768 -0
  617. data/example_files/weather/USA_CO_Denver.Intl.AP.725650_TMY3.stat +554 -0
  618. data/example_files/weather/USA_FL_MacDill.AFB.747880_TMY3.ddy +536 -0
  619. data/example_files/weather/USA_FL_MacDill.AFB.747880_TMY3.epw +8768 -0
  620. data/example_files/weather/USA_FL_MacDill.AFB.747880_TMY3.stat +553 -0
  621. data/example_files/weather/USA_GA_Atlanta-Hartsfield-Jackson.Intl.AP.722190_TMY3-cache.csv +35 -0
  622. data/example_files/weather/USA_GA_Atlanta-Hartsfield-Jackson.Intl.AP.722190_TMY3.ddy +536 -0
  623. data/example_files/weather/USA_GA_Atlanta-Hartsfield-Jackson.Intl.AP.722190_TMY3.epw +8768 -0
  624. data/example_files/weather/USA_GA_Atlanta-Hartsfield-Jackson.Intl.AP.722190_TMY3.stat +553 -0
  625. data/example_files/weather/USA_NY_Buffalo-Greater.Buffalo.Intl.AP.725280_TMY3-cache.csv +35 -0
  626. data/example_files/xml_building/17/README.md +4 -2
  627. data/example_files/xml_building/17/feature.xml +2112 -0
  628. data/lib/uo_cli/version.rb +1 -1
  629. data/lib/uo_cli.rb +110 -17
  630. data/uo_cli.gemspec +6 -8
  631. metadata +130 -177
  632. data/Jenkinsfile +0 -10
  633. data/example_files/base_workflow_res.osw +0 -276
  634. data/example_files/resources/hpxml-measures/ReportUtilityBills/tests/utility_bills_test.rb +0 -1226
  635. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-oil-location-miami-fl.xml +0 -551
  636. data/example_files/resources/hpxml-measures/workflow/sample_files/base-appliances-propane-location-portland-or.xml +0 -551
  637. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-1-speed-cooling-only.xml +0 -544
  638. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-1-speed-heating-only.xml +0 -550
  639. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-1-speed-sizing-methodology-acca.xml +0 -552
  640. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-1-speed-sizing-methodology-hers.xml +0 -552
  641. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-1-speed-sizing-methodology-maxload-miami-fl.xml +0 -552
  642. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-1-speed-sizing-methodology-maxload.xml +0 -552
  643. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-2-speed-sizing-methodology-acca.xml +0 -552
  644. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-2-speed-sizing-methodology-hers.xml +0 -552
  645. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-2-speed-sizing-methodology-maxload.xml +0 -552
  646. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-var-speed-backup-boiler.xml +0 -569
  647. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-var-speed-backup-furnace.xml +0 -599
  648. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-air-to-air-heat-pump-var-speed-sizing-methodology-maxload.xml +0 -552
  649. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-boiler-elec-only.xml +0 -506
  650. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-boiler-gas-central-ac-1-speed.xml +0 -560
  651. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-boiler-gas-only.xml +0 -507
  652. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-central-ac-only-1-speed.xml +0 -536
  653. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-central-ac-only-2-speed.xml +0 -536
  654. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-central-ac-plus-air-to-air-heat-pump-heating.xml +0 -565
  655. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-dual-fuel-air-to-air-heat-pump-1-speed-sizing-methodology-acca.xml +0 -553
  656. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-dual-fuel-air-to-air-heat-pump-1-speed-sizing-methodology-hers.xml +0 -553
  657. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-dual-fuel-air-to-air-heat-pump-1-speed-sizing-methodology-maxload.xml +0 -553
  658. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-elec-resistance-only.xml +0 -497
  659. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-evap-cooler-furnace-gas.xml +0 -544
  660. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-floor-furnace-propane-only.xml +0 -500
  661. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-furnace-elec-only.xml +0 -536
  662. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-furnace-gas-central-ac-2-speed.xml +0 -551
  663. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-furnace-gas-central-ac-var-speed.xml +0 -551
  664. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-furnace-gas-only.xml +0 -536
  665. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-ground-to-air-heat-pump-cooling-only.xml +0 -546
  666. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-ground-to-air-heat-pump-heating-only.xml +0 -552
  667. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-ground-to-air-heat-pump-sizing-methodology-acca.xml +0 -554
  668. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-ground-to-air-heat-pump-sizing-methodology-hers.xml +0 -554
  669. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-ground-to-air-heat-pump-sizing-methodology-maxload.xml +0 -554
  670. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-mini-split-heat-pump-ducted-cooling-only.xml +0 -543
  671. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-mini-split-heat-pump-ducted-heating-only.xml +0 -549
  672. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-mini-split-heat-pump-ducted-sizing-methodology-acca.xml +0 -551
  673. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-mini-split-heat-pump-ducted-sizing-methodology-hers.xml +0 -551
  674. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-mini-split-heat-pump-ductless-backup-baseboard.xml +0 -519
  675. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-mini-split-heat-pump-ductless-backup-stove.xml +0 -522
  676. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-ptac-with-heating.xml +0 -503
  677. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-ptac.xml +0 -496
  678. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-pthp-sizing-methodology-acca.xml +0 -518
  679. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-pthp-sizing-methodology-hers.xml +0 -518
  680. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-pthp-sizing-methodology-maxload.xml +0 -518
  681. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-room-ac-only.xml +0 -496
  682. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-room-ac-with-heating.xml +0 -503
  683. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-room-ac-with-reverse-cycle-sizing-methodology-acca.xml +0 -518
  684. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-room-ac-with-reverse-cycle-sizing-methodology-hers.xml +0 -518
  685. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-room-ac-with-reverse-cycle-sizing-methodology-maxload.xml +0 -518
  686. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-stove-oil-only.xml +0 -500
  687. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-autosize-wall-furnace-elec-only.xml +0 -500
  688. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-floor-furnace-propane-only-pilot-light.xml +0 -506
  689. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-portable-heater-gas-only.xml +0 -501
  690. data/example_files/resources/hpxml-measures/workflow/sample_files/base-hvac-undersized-allow-increased-fixed-capacities.xml +0 -556
  691. data/example_files/resources/hpxml-measures/workflow/sample_files/base-misc-bills-none.xml +0 -548
  692. data/example_files/resources/hpxml-measures/workflow/sample_files/base-schedules-simple-vacancy-year-round.xml +0 -619
  693. data/example_files/resources/hpxml-measures/workflow/tests/base_results/results.csv +0 -475
  694. data/example_files/resources/hpxml-measures/workflow/tests/base_results/results_bills.csv +0 -475
  695. data/example_files/resources/hpxml-measures/workflow/tests/hpxml_translator_test.rb +0 -1313
  696. data/example_files/resources/measure-info.json +0 -26
  697. data/example_files/resources/meta_measure.rb +0 -301
  698. data/example_files/xml_building/17/unit 1.xml +0 -580
  699. data/example_files/xml_building/17/unit 2.xml +0 -553
  700. data/example_files/xml_building/17/unit 3.xml +0 -553
  701. data/example_files/xml_building/17/unit 4.xml +0 -580
  702. /data/example_files/{residential → mappers/residential/template/iecc}/clothes_dryer.tsv +0 -0
  703. /data/example_files/{residential → mappers/residential/template/iecc}/clothes_washer.tsv +0 -0
  704. /data/example_files/{residential → mappers/residential/template/iecc}/cooling_system.tsv +0 -0
  705. /data/example_files/{residential → mappers/residential/template/iecc}/dishwasher.tsv +0 -0
  706. /data/example_files/{residential → mappers/residential/template/iecc}/enclosure.tsv +0 -0
  707. /data/example_files/{residential → mappers/residential/template/iecc}/heat_pump.tsv +0 -0
  708. /data/example_files/{residential → mappers/residential/template/iecc}/heating_system.tsv +0 -0
  709. /data/example_files/{residential → mappers/residential/template/iecc}/mechanical_ventilation.tsv +0 -0
  710. /data/example_files/{residential → mappers/residential/template/iecc}/refrigerator.tsv +0 -0
  711. /data/example_files/{residential → mappers/residential/template/iecc}/water_heater.tsv +0 -0
  712. /data/example_files/resources/hpxml-measures/ReportUtilityBills/tests/{JacksonElectricMemberCorp-ResidentialSeniorCitizenLowIncomeAssistance.json → Detailed Rate.json} +0 -0
@@ -1,3 +1,8 @@
1
+ # *********************************************************************************
2
+ # URBANopt (tm), Copyright (c) Alliance for Sustainable Energy, LLC.
3
+ # See also https://github.com/urbanopt/urbanopt-cli/blob/develop/LICENSE.md
4
+ # *********************************************************************************
5
+
1
6
  # frozen_string_literal: true
2
7
 
3
8
  require_relative '../resources/minitest_helper'
@@ -9,7 +14,7 @@ require 'csv'
9
14
  require_relative '../resources/xmlhelper.rb'
10
15
  require_relative '../resources/xmlvalidator.rb'
11
16
 
12
- class HPXMLtoOpenStudioValidationTest < MiniTest::Test
17
+ class HPXMLtoOpenStudioValidationTest < Minitest::Test
13
18
  def setup
14
19
  OpenStudio::Logger.instance.standardOutLogger.setLogLevel(OpenStudio::Fatal)
15
20
 
@@ -76,8 +81,8 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
76
81
  'clothes-dryer-location' => ['A location is specified as "garage" but no surfaces were found adjacent to this space type.'],
77
82
  'clothes-washer-location' => ['A location is specified as "garage" but no surfaces were found adjacent to this space type.'],
78
83
  'cooking-range-location' => ['A location is specified as "garage" but no surfaces were found adjacent to this space type.'],
79
- 'dehumidifier-fraction-served' => ['Expected sum(FractionDehumidificationLoadServed) to be less than or equal to 1 [context: /HPXML/Building/BuildingDetails]'],
80
- 'dhw-frac-load-served' => ['Expected sum(FractionDHWLoadServed) to be 1 [context: /HPXML/Building/BuildingDetails]'],
84
+ 'dehumidifier-fraction-served' => ['Expected sum(FractionDehumidificationLoadServed) to be less than or equal to 1 [context: /HPXML/Building/BuildingDetails, id: "MyBuilding"]'],
85
+ 'dhw-frac-load-served' => ['Expected sum(FractionDHWLoadServed) to be 1 [context: /HPXML/Building/BuildingDetails, id: "MyBuilding"]'],
81
86
  'dhw-invalid-ef-tank' => ['Expected EnergyFactor to be less than 1 [context: /HPXML/Building/BuildingDetails/Systems/WaterHeating/WaterHeatingSystem[WaterHeaterType="storage water heater"], id: "WaterHeatingSystem1"]'],
82
87
  'dhw-invalid-uef-tank-heat-pump' => ['Expected UniformEnergyFactor to be greater than 1 [context: /HPXML/Building/BuildingDetails/Systems/WaterHeating/WaterHeatingSystem[WaterHeaterType="heat pump water heater"], id: "WaterHeatingSystem1"]'],
83
88
  'dishwasher-location' => ['A location is specified as "garage" but no surfaces were found adjacent to this space type.'],
@@ -85,22 +90,22 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
85
90
  'duct-leakage-cfm50' => ['Expected Value to be greater than or equal to 0 [context: /HPXML/Building/BuildingDetails/Systems/HVAC/HVACDistribution/DistributionSystemType/AirDistribution/DuctLeakageMeasurement/DuctLeakage[Units="CFM25" or Units="CFM50"], id: "HVACDistribution1"]'],
86
91
  'duct-leakage-percent' => ['Expected Value to be less than 1 [context: /HPXML/Building/BuildingDetails/Systems/HVAC/HVACDistribution/DistributionSystemType/AirDistribution/DuctLeakageMeasurement/DuctLeakage[Units="Percent"], id: "HVACDistribution1"]'],
87
92
  'duct-location' => ['A location is specified as "garage" but no surfaces were found adjacent to this space type.'],
88
- 'duct-location-unconditioned-space' => ["Expected DuctLocation to be 'living space' or 'basement - conditioned' or 'basement - unconditioned' or 'crawlspace - vented' or 'crawlspace - unvented' or 'crawlspace - conditioned' or 'attic - vented' or 'attic - unvented' or 'garage' or 'exterior wall' or 'under slab' or 'roof deck' or 'outside' or 'other housing unit' or 'other heated space' or 'other multifamily buffer space' or 'other non-freezing space' [context: /HPXML/Building/BuildingDetails/Systems/HVAC/HVACDistribution/DistributionSystemType/AirDistribution/Ducts, id: \"Ducts1\"]",
89
- "Expected DuctLocation to be 'living space' or 'basement - conditioned' or 'basement - unconditioned' or 'crawlspace - vented' or 'crawlspace - unvented' or 'crawlspace - conditioned' or 'attic - vented' or 'attic - unvented' or 'garage' or 'exterior wall' or 'under slab' or 'roof deck' or 'outside' or 'other housing unit' or 'other heated space' or 'other multifamily buffer space' or 'other non-freezing space' [context: /HPXML/Building/BuildingDetails/Systems/HVAC/HVACDistribution/DistributionSystemType/AirDistribution/Ducts, id: \"Ducts2\"]"],
93
+ 'duct-location-unconditioned-space' => ["Expected DuctLocation to be 'conditioned space' or 'basement - conditioned' or 'basement - unconditioned' or 'crawlspace - vented' or 'crawlspace - unvented' or 'crawlspace - conditioned' or 'attic - vented' or 'attic - unvented' or 'garage' or 'exterior wall' or 'under slab' or 'roof deck' or 'outside' or 'other housing unit' or 'other heated space' or 'other multifamily buffer space' or 'other non-freezing space' or 'manufactured home belly' [context: /HPXML/Building/BuildingDetails/Systems/HVAC/HVACDistribution/DistributionSystemType/AirDistribution/Ducts, id: \"Ducts1\"]",
94
+ "Expected DuctLocation to be 'conditioned space' or 'basement - conditioned' or 'basement - unconditioned' or 'crawlspace - vented' or 'crawlspace - unvented' or 'crawlspace - conditioned' or 'attic - vented' or 'attic - unvented' or 'garage' or 'exterior wall' or 'under slab' or 'roof deck' or 'outside' or 'other housing unit' or 'other heated space' or 'other multifamily buffer space' or 'other non-freezing space' or 'manufactured home belly' [context: /HPXML/Building/BuildingDetails/Systems/HVAC/HVACDistribution/DistributionSystemType/AirDistribution/Ducts, id: \"Ducts2\"]"],
90
95
  'emissions-electricity-schedule' => ['Expected NumberofHeaderRows to be greater than or equal to 0',
91
96
  'Expected ColumnNumber to be greater than or equal to 1'],
92
- 'enclosure-attic-missing-roof' => ['There must be at least one roof adjacent to "attic - unvented". [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="attic - unvented" or ExteriorAdjacentTo="attic - unvented"]]]'],
93
- 'enclosure-basement-missing-exterior-foundation-wall' => ['There must be at least one exterior foundation wall adjacent to "basement - unconditioned". [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="basement - unconditioned" or ExteriorAdjacentTo="basement - unconditioned"]]]'],
94
- 'enclosure-basement-missing-slab' => ['There must be at least one slab adjacent to "basement - unconditioned". [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="basement - unconditioned" or ExteriorAdjacentTo="basement - unconditioned"]]]'],
95
- 'enclosure-floor-area-exceeds-cfa' => ['Expected ConditionedFloorArea to be greater than or equal to the sum of conditioned slab/floor areas. [context: /HPXML/Building/BuildingDetails/BuildingSummary/BuildingConstruction]'],
96
- 'enclosure-floor-area-exceeds-cfa2' => ['Expected ConditionedFloorArea to be greater than or equal to the sum of conditioned slab/floor areas. [context: /HPXML/Building/BuildingDetails/BuildingSummary/BuildingConstruction]'],
97
- 'enclosure-garage-missing-exterior-wall' => ['There must be at least one exterior wall/foundation wall adjacent to "garage". [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="garage" or ExteriorAdjacentTo="garage"]]]'],
98
- 'enclosure-garage-missing-roof-ceiling' => ['There must be at least one roof/ceiling adjacent to "garage". [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="garage" or ExteriorAdjacentTo="garage"]]]'],
99
- 'enclosure-garage-missing-slab' => ['There must be at least one slab adjacent to "garage". [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="garage" or ExteriorAdjacentTo="garage"]]]'],
100
- 'enclosure-living-missing-ceiling-roof' => ['There must be at least one ceiling/roof adjacent to conditioned space. [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="living space"]]]',
101
- 'There must be at least one floor adjacent to "attic - unvented". [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="attic - unvented" or ExteriorAdjacentTo="attic - unvented"]]]'],
102
- 'enclosure-living-missing-exterior-wall' => ['There must be at least one exterior wall adjacent to conditioned space. [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="living space"]]]'],
103
- 'enclosure-living-missing-floor-slab' => ['There must be at least one floor/slab adjacent to conditioned space. [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="living space"]]]'],
97
+ 'enclosure-attic-missing-roof' => ['There must be at least one roof adjacent to "attic - unvented". [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="attic - unvented" or ExteriorAdjacentTo="attic - unvented"]], id: "MyBuilding"]'],
98
+ 'enclosure-basement-missing-exterior-foundation-wall' => ['There must be at least one exterior wall or foundation wall adjacent to "basement - unconditioned". [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="basement - unconditioned" or ExteriorAdjacentTo="basement - unconditioned"]], id: "MyBuilding"]'],
99
+ 'enclosure-basement-missing-slab' => ['There must be at least one slab adjacent to "basement - unconditioned". [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="basement - unconditioned" or ExteriorAdjacentTo="basement - unconditioned"]], id: "MyBuilding"]'],
100
+ 'enclosure-floor-area-exceeds-cfa' => ['Expected ConditionedFloorArea to be greater than or equal to the sum of conditioned slab/floor areas. [context: /HPXML/Building/BuildingDetails/BuildingSummary/BuildingConstruction, id: "MyBuilding"]'],
101
+ 'enclosure-floor-area-exceeds-cfa2' => ['Expected ConditionedFloorArea to be greater than or equal to the sum of conditioned slab/floor areas. [context: /HPXML/Building/BuildingDetails/BuildingSummary/BuildingConstruction, id: "MyBuilding"]'],
102
+ 'enclosure-garage-missing-exterior-wall' => ['There must be at least one exterior wall or foundation wall adjacent to "garage". [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="garage" or ExteriorAdjacentTo="garage"]], id: "MyBuilding"]'],
103
+ 'enclosure-garage-missing-roof-ceiling' => ['There must be at least one roof or ceiling adjacent to "garage". [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="garage" or ExteriorAdjacentTo="garage"]], id: "MyBuilding"]'],
104
+ 'enclosure-garage-missing-slab' => ['There must be at least one slab adjacent to "garage". [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="garage" or ExteriorAdjacentTo="garage"]], id: "MyBuilding"]'],
105
+ 'enclosure-conditioned-missing-ceiling-roof' => ['There must be at least one ceiling or roof adjacent to conditioned space. [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="conditioned space"]], id: "MyBuilding"]',
106
+ 'There must be at least one floor adjacent to "attic - unvented". [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="attic - unvented" or ExteriorAdjacentTo="attic - unvented"]], id: "MyBuilding"]'],
107
+ 'enclosure-conditioned-missing-exterior-wall' => ['There must be at least one exterior wall adjacent to conditioned space. [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="conditioned space"]], id: "MyBuilding"]'],
108
+ 'enclosure-conditioned-missing-floor-slab' => ['There must be at least one floor or slab adjacent to conditioned space. [context: /HPXML/Building/BuildingDetails/Enclosure[*/*[InteriorAdjacentTo="conditioned space"]], id: "MyBuilding"]'],
104
109
  'frac-sensible-fuel-load' => ['Expected extension/FracSensible to be greater than or equal to 0 [context: /HPXML/Building/BuildingDetails/MiscLoads/FuelLoad[FuelLoadType="grill" or FuelLoadType="lighting" or FuelLoadType="fireplace"], id: "FuelLoad1"]'],
105
110
  'frac-sensible-plug-load' => ['Expected extension/FracSensible to be greater than or equal to 0 [context: /HPXML/Building/BuildingDetails/MiscLoads/PlugLoad[PlugLoadType="other" or PlugLoadType="TV other" or PlugLoadType="electric vehicle charging" or PlugLoadType="well pump"], id: "PlugLoad1"]'],
106
111
  'frac-total-fuel-load' => ['Expected sum of extension/FracSensible and extension/FracLatent to be less than or equal to 1 [context: /HPXML/Building/BuildingDetails/MiscLoads/FuelLoad[FuelLoadType="grill" or FuelLoadType="lighting" or FuelLoadType="fireplace"], id: "FuelLoad1"]'],
@@ -109,14 +114,18 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
109
114
  'generator-number-of-bedrooms-served' => ['Expected NumberofBedroomsServed to be greater than ../../../../BuildingSummary/BuildingConstruction/NumberofBedrooms [context: /HPXML/Building/BuildingDetails/Systems/extension/Generators/Generator[IsSharedSystem="true"], id: "Generator1"]'],
110
115
  'generator-output-greater-than-consumption' => ['Expected AnnualConsumptionkBtu to be greater than AnnualOutputkWh*3412 [context: /HPXML/Building/BuildingDetails/Systems/extension/Generators/Generator, id: "Generator1"]'],
111
116
  'heat-pump-capacity-17f' => ['Expected HeatingCapacity17F to be less than or equal to HeatingCapacity'],
112
- 'heat-pump-lockout-temperatures' => ['Expected CompressorLockoutTemperature to be less than BackupHeatingLockoutTemperature'],
113
- 'heat-pump-multiple-backup-systems' => ['Expected 0 or 1 element(s) for xpath: HeatPump/BackupSystem [context: /HPXML/Building/BuildingDetails]'],
117
+ 'heat-pump-lockout-temperatures' => ['Expected CompressorLockoutTemperature to be less than or equal to BackupHeatingLockoutTemperature'],
118
+ 'heat-pump-multiple-backup-systems' => ['Expected 0 or 1 element(s) for xpath: HeatPump/BackupSystem [context: /HPXML/Building/BuildingDetails, id: "MyBuilding"]'],
119
+ 'hvac-detailed-performance-not-variable-speed' => ['Expected 1 element(s) for xpath: ../CompressorType[text()="variable speed"]',
120
+ 'Expected 1 element(s) for xpath: ../CompressorType[text()="variable speed"]'],
114
121
  'hvac-distribution-return-duct-leakage-missing' => ['Expected 1 element(s) for xpath: DuctLeakageMeasurement[DuctType="return"]/DuctLeakage[(Units="CFM25" or Units="CFM50" or Units="Percent") and TotalOrToOutside="to outside"] [context: /HPXML/Building/BuildingDetails/Systems/HVAC/HVACDistribution/DistributionSystemType/AirDistribution[AirDistributionType[text()="regular velocity" or text()="gravity"]], id: "HVACDistribution1"]'],
115
- 'hvac-frac-load-served' => ['Expected sum(FractionHeatLoadServed) to be less than or equal to 1 [context: /HPXML/Building/BuildingDetails]',
116
- 'Expected sum(FractionCoolLoadServed) to be less than or equal to 1 [context: /HPXML/Building/BuildingDetails]'],
122
+ 'hvac-frac-load-served' => ['Expected sum(FractionHeatLoadServed) to be less than or equal to 1 [context: /HPXML/Building/BuildingDetails, id: "MyBuilding"]',
123
+ 'Expected sum(FractionCoolLoadServed) to be less than or equal to 1 [context: /HPXML/Building/BuildingDetails, id: "MyBuilding"]'],
117
124
  'hvac-location-heating-system' => ['A location is specified as "basement - unconditioned" but no surfaces were found adjacent to this space type.'],
118
125
  'hvac-location-cooling-system' => ['A location is specified as "basement - unconditioned" but no surfaces were found adjacent to this space type.'],
119
126
  'hvac-location-heat-pump' => ['A location is specified as "basement - unconditioned" but no surfaces were found adjacent to this space type.'],
127
+ 'hvac-msac-not-var-speed' => ["Expected CompressorType to be 'variable speed'"],
128
+ 'hvac-mshp-not-var-speed' => ["Expected CompressorType to be 'variable speed'"],
120
129
  'hvac-sizing-humidity-setpoint' => ['Expected ManualJInputs/HumiditySetpoint to be less than 1'],
121
130
  'hvac-negative-crankcase-heater-watts' => ['Expected extension/CrankcaseHeaterPowerWatts to be greater than or equal to 0.0.'],
122
131
  'incomplete-integrated-heating' => ['Expected 1 element(s) for xpath: IntegratedHeatingSystemFractionHeatLoadServed'],
@@ -175,7 +184,7 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
175
184
  'invalid-natvent-availability' => ['Expected extension/NaturalVentilationAvailabilityDaysperWeek to be less than or equal to 7'],
176
185
  'invalid-natvent-availability2' => ['Expected extension/NaturalVentilationAvailabilityDaysperWeek to be greater than or equal to 0'],
177
186
  'invalid-number-of-bedrooms-served' => ['Expected extension/NumberofBedroomsServed to be greater than ../../../BuildingSummary/BuildingConstruction/NumberofBedrooms [context: /HPXML/Building/BuildingDetails/Systems/Photovoltaics/PVSystem[IsSharedSystem="true"], id: "PVSystem1"]'],
178
- 'invalid-number-of-conditioned-floors' => ['Expected NumberofConditionedFloors to be greater than or equal to NumberofConditionedFloorsAboveGrade [context: /HPXML/Building/BuildingDetails/BuildingSummary/BuildingConstruction]'],
187
+ 'invalid-number-of-conditioned-floors' => ['Expected NumberofConditionedFloors to be greater than or equal to NumberofConditionedFloorsAboveGrade [context: /HPXML/Building/BuildingDetails/BuildingSummary/BuildingConstruction, id: "MyBuilding"]'],
179
188
  'invalid-number-of-units-served' => ['Expected NumberofUnitsServed to be greater than 1 [context: /HPXML/Building/BuildingDetails/Systems/WaterHeating/WaterHeatingSystem[IsSharedSystem="true"], id: "WaterHeatingSystem1"]'],
180
189
  'invalid-pilot-light-heating-system' => ['Expected 1 element(s) for xpath: ../../HeatingSystemFuel[text()!="electricity"]'],
181
190
  'invalid-shared-vent-in-unit-flowrate' => ['Expected RatedFlowRate to be greater than extension/InUnitFlowRate [context: /HPXML/Building/BuildingDetails/Systems/MechanicalVentilation/VentilationFans/VentilationFan[UsedForWholeBuildingVentilation="true" and IsSharedSystem="true"], id: "VentilationFan1"]'],
@@ -186,13 +195,22 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
186
195
  'invalid-ventilation-recovery' => ['Expected 0 element(s) for xpath: TotalRecoveryEfficiency | AdjustedTotalRecoveryEfficiency',
187
196
  'Expected 0 element(s) for xpath: SensibleRecoveryEfficiency | AdjustedSensibleRecoveryEfficiency'],
188
197
  'invalid-window-height' => ['Expected DistanceToBottomOfWindow to be greater than DistanceToTopOfWindow [context: /HPXML/Building/BuildingDetails/Enclosure/Windows/Window/Overhangs[number(Depth) > 0], id: "Window2"]'],
189
- 'lighting-fractions' => ['Expected sum(LightingGroup/FractionofUnitsInLocation) for Location="interior" to be less than or equal to 1 [context: /HPXML/Building/BuildingDetails/Lighting]'],
198
+ 'lighting-fractions' => ['Expected sum(LightingGroup/FractionofUnitsInLocation) for Location="interior" to be less than or equal to 1 [context: /HPXML/Building/BuildingDetails/Lighting, id: "MyBuilding"]'],
199
+ 'manufactured-home-reference-duct' => ['There are references to "manufactured home belly" or "manufactured home underbelly" but ResidentialFacilityType is not "manufactured home".',
200
+ 'A location is specified as "manufactured home belly" but no surfaces were found adjacent to the "manufactured home underbelly" space type.'],
201
+ 'manufactured-home-reference-water-heater' => ['There are references to "manufactured home belly" or "manufactured home underbelly" but ResidentialFacilityType is not "manufactured home".',
202
+ 'A location is specified as "manufactured home belly" but no surfaces were found adjacent to the "manufactured home underbelly" space type.',
203
+ "Expected Location to be 'conditioned space' or 'basement - unconditioned' or 'basement - conditioned' or 'attic - unvented' or 'attic - vented' or 'garage' or 'crawlspace - unvented' or 'crawlspace - vented' or 'crawlspace - conditioned' or 'other exterior' or 'other housing unit' or 'other heated space' or 'other multifamily buffer space' or 'other non-freezing space'"],
204
+ 'manufactured-home-reference-floor' => ['There are references to "manufactured home belly" or "manufactured home underbelly" but ResidentialFacilityType is not "manufactured home".',
205
+ 'There must be at least one ceiling adjacent to "crawlspace - vented".'],
206
+ 'missing-capacity-detailed-performance' => ['Expected 1 element(s) for xpath: ../CoolingCapacity',
207
+ 'Expected 1 element(s) for xpath: ../HeatingCapacity'],
190
208
  'missing-cfis-supplemental-fan' => ['Expected 1 element(s) for xpath: SupplementalFan'],
191
209
  'missing-distribution-cfa-served' => ['Expected 1 element(s) for xpath: ../../../ConditionedFloorAreaServed [context: /HPXML/Building/BuildingDetails/Systems/HVAC/HVACDistribution/DistributionSystemType/AirDistribution/Ducts[not(DuctSurfaceArea)], id: "Ducts2"]'],
192
210
  'missing-duct-area' => ['Expected 1 or more element(s) for xpath: FractionDuctArea | DuctSurfaceArea [context: /HPXML/Building/BuildingDetails/Systems/HVAC/HVACDistribution/DistributionSystemType/AirDistribution/Ducts[DuctLocation], id: "Ducts2"]'],
193
211
  'missing-duct-location' => ['Expected 0 element(s) for xpath: FractionDuctArea | DuctSurfaceArea [context: /HPXML/Building/BuildingDetails/Systems/HVAC/HVACDistribution/DistributionSystemType/AirDistribution/Ducts[not(DuctLocation)], id: "Ducts2"]'],
194
- 'missing-elements' => ['Expected 1 element(s) for xpath: NumberofConditionedFloors [context: /HPXML/Building/BuildingDetails/BuildingSummary/BuildingConstruction]',
195
- 'Expected 1 element(s) for xpath: ConditionedFloorArea [context: /HPXML/Building/BuildingDetails/BuildingSummary/BuildingConstruction]'],
212
+ 'missing-elements' => ['Expected 1 element(s) for xpath: NumberofConditionedFloors [context: /HPXML/Building/BuildingDetails/BuildingSummary/BuildingConstruction, id: "MyBuilding"]',
213
+ 'Expected 1 element(s) for xpath: ConditionedFloorArea [context: /HPXML/Building/BuildingDetails/BuildingSummary/BuildingConstruction, id: "MyBuilding"]'],
196
214
  'multifamily-reference-appliance' => ['There are references to "other housing unit" but ResidentialFacilityType is not "single-family attached" or "apartment unit".'],
197
215
  'multifamily-reference-duct' => ['There are references to "other multifamily buffer space" but ResidentialFacilityType is not "single-family attached" or "apartment unit".'],
198
216
  'multifamily-reference-surface' => ['There are references to "other heated space" but ResidentialFacilityType is not "single-family attached" or "apartment unit".'],
@@ -200,271 +218,280 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
200
218
  'refrigerator-location' => ['A location is specified as "garage" but no surfaces were found adjacent to this space type.'],
201
219
  'solar-fraction-one' => ['Expected SolarFraction to be less than 1 [context: /HPXML/Building/BuildingDetails/Systems/SolarThermal/SolarThermalSystem, id: "SolarThermalSystem1"]'],
202
220
  'water-heater-location' => ['A location is specified as "crawlspace - vented" but no surfaces were found adjacent to this space type.'],
203
- 'water-heater-location-other' => ["Expected Location to be 'living space' or 'basement - unconditioned' or 'basement - conditioned' or 'attic - unvented' or 'attic - vented' or 'garage' or 'crawlspace - unvented' or 'crawlspace - vented' or 'crawlspace - conditioned' or 'other exterior' or 'other housing unit' or 'other heated space' or 'other multifamily buffer space' or 'other non-freezing space' [context: /HPXML/Building/BuildingDetails/Systems/WaterHeating/WaterHeatingSystem, id: \"WaterHeatingSystem1\"]"],
221
+ 'water-heater-location-other' => ["Expected Location to be 'conditioned space' or 'basement - unconditioned' or 'basement - conditioned' or 'attic - unvented' or 'attic - vented' or 'garage' or 'crawlspace - unvented' or 'crawlspace - vented' or 'crawlspace - conditioned' or 'other exterior' or 'other housing unit' or 'other heated space' or 'other multifamily buffer space' or 'other non-freezing space'"],
204
222
  'water-heater-recovery-efficiency' => ['Expected RecoveryEfficiency to be greater than EnergyFactor'] }
205
223
 
206
224
  all_expected_errors.each_with_index do |(error_case, expected_errors), i|
207
225
  puts "[#{i + 1}/#{all_expected_errors.size}] Testing #{error_case}..."
208
226
  # Create HPXML object
209
227
  if ['boiler-invalid-afue'].include? error_case
210
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-boiler-oil-only.xml'))
211
- hpxml.heating_systems[0].heating_efficiency_afue *= 100.0
228
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-boiler-oil-only.xml')
229
+ hpxml_bldg.heating_systems[0].heating_efficiency_afue *= 100.0
212
230
  elsif ['clothes-dryer-location'].include? error_case
213
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
214
- hpxml.clothes_dryers[0].location = HPXML::LocationGarage
231
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
232
+ hpxml_bldg.clothes_dryers[0].location = HPXML::LocationGarage
215
233
  elsif ['clothes-washer-location'].include? error_case
216
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
217
- hpxml.clothes_washers[0].location = HPXML::LocationGarage
234
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
235
+ hpxml_bldg.clothes_washers[0].location = HPXML::LocationGarage
218
236
  elsif ['cooking-range-location'].include? error_case
219
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
220
- hpxml.cooking_ranges[0].location = HPXML::LocationGarage
237
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
238
+ hpxml_bldg.cooking_ranges[0].location = HPXML::LocationGarage
221
239
  elsif ['dehumidifier-fraction-served'].include? error_case
222
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-appliances-dehumidifier-multiple.xml'))
223
- hpxml.dehumidifiers[-1].fraction_served = 0.6
240
+ hpxml, hpxml_bldg = _create_hpxml('base-appliances-dehumidifier-multiple.xml')
241
+ hpxml_bldg.dehumidifiers[-1].fraction_served = 0.6
224
242
  elsif ['dhw-frac-load-served'].include? error_case
225
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-dhw-multiple.xml'))
226
- hpxml.water_heating_systems[0].fraction_dhw_load_served = 0.35
243
+ hpxml, hpxml_bldg = _create_hpxml('base-dhw-multiple.xml')
244
+ hpxml_bldg.water_heating_systems[0].fraction_dhw_load_served = 0.35
227
245
  elsif ['dhw-invalid-ef-tank'].include? error_case
228
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
229
- hpxml.water_heating_systems[0].energy_factor = 1.0
246
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
247
+ hpxml_bldg.water_heating_systems[0].energy_factor = 1.0
230
248
  elsif ['dhw-invalid-uef-tank-heat-pump'].include? error_case
231
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-dhw-tank-heat-pump-uef.xml'))
232
- hpxml.water_heating_systems[0].uniform_energy_factor = 1.0
249
+ hpxml, hpxml_bldg = _create_hpxml('base-dhw-tank-heat-pump-uef.xml')
250
+ hpxml_bldg.water_heating_systems[0].uniform_energy_factor = 1.0
233
251
  elsif ['dishwasher-location'].include? error_case
234
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
235
- hpxml.dishwashers[0].location = HPXML::LocationGarage
252
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
253
+ hpxml_bldg.dishwashers[0].location = HPXML::LocationGarage
236
254
  elsif ['duct-leakage-cfm25'].include? error_case
237
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
238
- hpxml.hvac_distributions[0].duct_leakage_measurements[0].duct_leakage_value = -2
239
- hpxml.hvac_distributions[0].duct_leakage_measurements[1].duct_leakage_value = -2
255
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
256
+ hpxml_bldg.hvac_distributions[0].duct_leakage_measurements[0].duct_leakage_value = -2
257
+ hpxml_bldg.hvac_distributions[0].duct_leakage_measurements[1].duct_leakage_value = -2
240
258
  elsif ['duct-leakage-cfm50'].include? error_case
241
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-ducts-leakage-cfm50.xml'))
242
- hpxml.hvac_distributions[0].duct_leakage_measurements[0].duct_leakage_value = -2
243
- hpxml.hvac_distributions[0].duct_leakage_measurements[1].duct_leakage_value = -2
259
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-ducts-leakage-cfm50.xml')
260
+ hpxml_bldg.hvac_distributions[0].duct_leakage_measurements[0].duct_leakage_value = -2
261
+ hpxml_bldg.hvac_distributions[0].duct_leakage_measurements[1].duct_leakage_value = -2
244
262
  elsif ['duct-leakage-percent'].include? error_case
245
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
246
- hpxml.hvac_distributions[0].duct_leakage_measurements[0].duct_leakage_units = HPXML::UnitsPercent
247
- hpxml.hvac_distributions[0].duct_leakage_measurements[1].duct_leakage_units = HPXML::UnitsPercent
263
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
264
+ hpxml_bldg.hvac_distributions[0].duct_leakage_measurements[0].duct_leakage_units = HPXML::UnitsPercent
265
+ hpxml_bldg.hvac_distributions[0].duct_leakage_measurements[1].duct_leakage_units = HPXML::UnitsPercent
248
266
  elsif ['duct-location'].include? error_case
249
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
250
- hpxml.hvac_distributions[0].ducts[0].duct_location = HPXML::LocationGarage
251
- hpxml.hvac_distributions[0].ducts[1].duct_location = HPXML::LocationGarage
267
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
268
+ hpxml_bldg.hvac_distributions[0].ducts[0].duct_location = HPXML::LocationGarage
269
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_location = HPXML::LocationGarage
252
270
  elsif ['duct-location-unconditioned-space'].include? error_case
253
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
254
- hpxml.hvac_distributions[0].ducts[0].duct_location = HPXML::LocationUnconditionedSpace
255
- hpxml.hvac_distributions[0].ducts[1].duct_location = HPXML::LocationUnconditionedSpace
271
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
272
+ hpxml_bldg.hvac_distributions[0].ducts[0].duct_location = HPXML::LocationUnconditionedSpace
273
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_location = HPXML::LocationUnconditionedSpace
256
274
  elsif ['emissions-electricity-schedule'].include? error_case
257
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-misc-emissions.xml'))
275
+ hpxml, hpxml_bldg = _create_hpxml('base-misc-emissions.xml')
258
276
  hpxml.header.emissions_scenarios[0].elec_schedule_number_of_header_rows = -1
259
277
  hpxml.header.emissions_scenarios[0].elec_schedule_column_number = 0
260
278
  elsif ['enclosure-attic-missing-roof'].include? error_case
261
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
262
- hpxml.roofs.reverse_each do |roof|
279
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
280
+ hpxml_bldg.roofs.reverse_each do |roof|
263
281
  roof.delete
264
282
  end
265
283
  elsif ['enclosure-basement-missing-exterior-foundation-wall'].include? error_case
266
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-foundation-unconditioned-basement.xml'))
267
- hpxml.foundation_walls.reverse_each do |foundation_wall|
284
+ hpxml, hpxml_bldg = _create_hpxml('base-foundation-unconditioned-basement.xml')
285
+ hpxml_bldg.foundation_walls.reverse_each do |foundation_wall|
268
286
  foundation_wall.delete
269
287
  end
270
288
  elsif ['enclosure-basement-missing-slab'].include? error_case
271
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-foundation-unconditioned-basement.xml'))
272
- hpxml.slabs.reverse_each do |slab|
289
+ hpxml, hpxml_bldg = _create_hpxml('base-foundation-unconditioned-basement.xml')
290
+ hpxml_bldg.slabs.reverse_each do |slab|
273
291
  slab.delete
274
292
  end
275
293
  elsif ['enclosure-floor-area-exceeds-cfa'].include? error_case
276
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
277
- hpxml.building_construction.conditioned_floor_area = 1348.8
294
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
295
+ hpxml_bldg.building_construction.conditioned_floor_area = 1348.8
278
296
  elsif ['enclosure-floor-area-exceeds-cfa2'].include? error_case
279
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-bldgtype-multifamily.xml'))
280
- hpxml.building_construction.conditioned_floor_area = 898.8
297
+ hpxml, hpxml_bldg = _create_hpxml('base-bldgtype-mf-unit.xml')
298
+ hpxml_bldg.building_construction.conditioned_floor_area = 898.8
281
299
  elsif ['enclosure-garage-missing-exterior-wall'].include? error_case
282
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-enclosure-garage.xml'))
283
- hpxml.walls.select { |w|
300
+ hpxml, hpxml_bldg = _create_hpxml('base-enclosure-garage.xml')
301
+ hpxml_bldg.walls.select { |w|
284
302
  w.interior_adjacent_to == HPXML::LocationGarage &&
285
303
  w.exterior_adjacent_to == HPXML::LocationOutside
286
304
  }.reverse_each do |wall|
287
305
  wall.delete
288
306
  end
289
307
  elsif ['enclosure-garage-missing-roof-ceiling'].include? error_case
290
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-enclosure-garage.xml'))
291
- hpxml.floors.select { |w|
308
+ hpxml, hpxml_bldg = _create_hpxml('base-enclosure-garage.xml')
309
+ hpxml_bldg.floors.select { |w|
292
310
  w.interior_adjacent_to == HPXML::LocationGarage &&
293
311
  w.exterior_adjacent_to == HPXML::LocationAtticUnvented
294
312
  }.reverse_each do |floor|
295
313
  floor.delete
296
314
  end
297
315
  elsif ['enclosure-garage-missing-slab'].include? error_case
298
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-enclosure-garage.xml'))
299
- hpxml.slabs.select { |w| w.interior_adjacent_to == HPXML::LocationGarage }.reverse_each do |slab|
316
+ hpxml, hpxml_bldg = _create_hpxml('base-enclosure-garage.xml')
317
+ hpxml_bldg.slabs.select { |w| w.interior_adjacent_to == HPXML::LocationGarage }.reverse_each do |slab|
300
318
  slab.delete
301
319
  end
302
- elsif ['enclosure-living-missing-ceiling-roof'].include? error_case
303
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
304
- hpxml.floors.reverse_each do |floor|
320
+ elsif ['enclosure-conditioned-missing-ceiling-roof'].include? error_case
321
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
322
+ hpxml_bldg.floors.reverse_each do |floor|
305
323
  floor.delete
306
324
  end
307
- elsif ['enclosure-living-missing-exterior-wall'].include? error_case
308
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
309
- hpxml.walls.reverse_each do |wall|
310
- next unless wall.interior_adjacent_to == HPXML::LocationLivingSpace
325
+ elsif ['enclosure-conditioned-missing-exterior-wall'].include? error_case
326
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
327
+ hpxml_bldg.walls.reverse_each do |wall|
328
+ next unless wall.interior_adjacent_to == HPXML::LocationConditionedSpace
311
329
 
312
330
  wall.delete
313
331
  end
314
- elsif ['enclosure-living-missing-floor-slab'].include? error_case
315
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-foundation-slab.xml'))
316
- hpxml.slabs[0].delete
332
+ elsif ['enclosure-conditioned-missing-floor-slab'].include? error_case
333
+ hpxml, hpxml_bldg = _create_hpxml('base-foundation-slab.xml')
334
+ hpxml_bldg.slabs[0].delete
317
335
  elsif ['frac-sensible-fuel-load'].include? error_case
318
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-misc-loads-large-uncommon.xml'))
319
- hpxml.fuel_loads[0].frac_sensible = -0.1
336
+ hpxml, hpxml_bldg = _create_hpxml('base-misc-loads-large-uncommon.xml')
337
+ hpxml_bldg.fuel_loads[0].frac_sensible = -0.1
320
338
  elsif ['frac-sensible-plug-load'].include? error_case
321
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-misc-loads-large-uncommon.xml'))
322
- hpxml.plug_loads[0].frac_sensible = -0.1
339
+ hpxml, hpxml_bldg = _create_hpxml('base-misc-loads-large-uncommon.xml')
340
+ hpxml_bldg.plug_loads[0].frac_sensible = -0.1
323
341
  elsif ['frac-total-fuel-load'].include? error_case
324
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-misc-loads-large-uncommon.xml'))
325
- hpxml.fuel_loads[0].frac_sensible = 0.8
326
- hpxml.fuel_loads[0].frac_latent = 0.3
342
+ hpxml, hpxml_bldg = _create_hpxml('base-misc-loads-large-uncommon.xml')
343
+ hpxml_bldg.fuel_loads[0].frac_sensible = 0.8
344
+ hpxml_bldg.fuel_loads[0].frac_latent = 0.3
327
345
  elsif ['frac-total-plug-load'].include? error_case
328
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-misc-loads-large-uncommon.xml'))
329
- hpxml.plug_loads[1].frac_latent = 0.245
346
+ hpxml, hpxml_bldg = _create_hpxml('base-misc-loads-large-uncommon.xml')
347
+ hpxml_bldg.plug_loads[1].frac_latent = 0.245
330
348
  elsif ['furnace-invalid-afue'].include? error_case
331
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
332
- hpxml.heating_systems[0].heating_efficiency_afue *= 100.0
349
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
350
+ hpxml_bldg.heating_systems[0].heating_efficiency_afue *= 100.0
333
351
  elsif ['generator-number-of-bedrooms-served'].include? error_case
334
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-bldgtype-multifamily-shared-generator.xml'))
335
- hpxml.generators[0].number_of_bedrooms_served = 3
352
+ hpxml, hpxml_bldg = _create_hpxml('base-bldgtype-mf-unit-shared-generator.xml')
353
+ hpxml_bldg.generators[0].number_of_bedrooms_served = 3
336
354
  elsif ['generator-output-greater-than-consumption'].include? error_case
337
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-misc-generators.xml'))
338
- hpxml.generators[0].annual_consumption_kbtu = 1500
355
+ hpxml, hpxml_bldg = _create_hpxml('base-misc-generators.xml')
356
+ hpxml_bldg.generators[0].annual_consumption_kbtu = 1500
339
357
  elsif ['heat-pump-capacity-17f'].include? error_case
340
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-air-to-air-heat-pump-1-speed.xml'))
341
- hpxml.heat_pumps[0].heating_capacity_17F = hpxml.heat_pumps[0].heating_capacity + 1000.0
342
- hpxml.heat_pumps[0].heating_capacity_retention_fraction = nil
343
- hpxml.heat_pumps[0].heating_capacity_retention_temp = nil
358
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-air-to-air-heat-pump-1-speed.xml')
359
+ hpxml_bldg.heat_pumps[0].heating_capacity_17F = hpxml_bldg.heat_pumps[0].heating_capacity + 1000.0
360
+ hpxml_bldg.heat_pumps[0].heating_capacity_retention_fraction = nil
361
+ hpxml_bldg.heat_pumps[0].heating_capacity_retention_temp = nil
344
362
  elsif ['heat-pump-lockout-temperatures'].include? error_case
345
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-air-to-air-heat-pump-1-speed-lockout-temperatures.xml'))
346
- hpxml.heat_pumps[0].compressor_lockout_temp = hpxml.heat_pumps[0].backup_heating_lockout_temp + 1
363
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-air-to-air-heat-pump-1-speed-lockout-temperatures.xml')
364
+ hpxml_bldg.heat_pumps[0].compressor_lockout_temp = hpxml_bldg.heat_pumps[0].backup_heating_lockout_temp + 1
347
365
  elsif ['heat-pump-multiple-backup-systems'].include? error_case
348
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-air-to-air-heat-pump-var-speed-backup-boiler.xml'))
349
- hpxml.heating_systems << hpxml.heating_systems[0].dup
350
- hpxml.heating_systems[-1].id = 'HeatingSystem2'
351
- hpxml.heat_pumps[0].fraction_heat_load_served = 0.5
352
- hpxml.heat_pumps[0].fraction_cool_load_served = 0.5
353
- hpxml.heat_pumps << hpxml.heat_pumps[0].dup
354
- hpxml.heat_pumps[-1].id = 'HeatPump2'
355
- hpxml.heat_pumps[-1].primary_heating_system = false
356
- hpxml.heat_pumps[-1].primary_cooling_system = false
366
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-air-to-air-heat-pump-var-speed-backup-boiler.xml')
367
+ hpxml_bldg.heating_systems << hpxml_bldg.heating_systems[0].dup
368
+ hpxml_bldg.heating_systems[-1].id = 'HeatingSystem2'
369
+ hpxml_bldg.heat_pumps[0].fraction_heat_load_served = 0.5
370
+ hpxml_bldg.heat_pumps[0].fraction_cool_load_served = 0.5
371
+ hpxml_bldg.heat_pumps << hpxml_bldg.heat_pumps[0].dup
372
+ hpxml_bldg.heat_pumps[-1].id = 'HeatPump2'
373
+ hpxml_bldg.heat_pumps[-1].primary_heating_system = false
374
+ hpxml_bldg.heat_pumps[-1].primary_cooling_system = false
375
+ elsif ['hvac-detailed-performance-not-variable-speed'].include? error_case
376
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-air-to-air-heat-pump-var-speed-detailed-performance.xml')
377
+ hpxml_bldg.heat_pumps[0].compressor_type = HPXML::HVACCompressorTypeTwoStage
357
378
  elsif ['hvac-distribution-return-duct-leakage-missing'].include? error_case
358
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-evap-cooler-only-ducted.xml'))
359
- hpxml.hvac_distributions[0].duct_leakage_measurements[-1].delete
379
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-evap-cooler-only-ducted.xml')
380
+ hpxml_bldg.hvac_distributions[0].duct_leakage_measurements[-1].delete
360
381
  elsif ['hvac-frac-load-served'].include? error_case
361
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-multiple.xml'))
362
- hpxml.heating_systems[0].fraction_heat_load_served += 0.1
363
- hpxml.cooling_systems[0].fraction_cool_load_served += 0.2
364
- hpxml.heating_systems[0].primary_system = true
365
- hpxml.cooling_systems[0].primary_system = true
366
- hpxml.heat_pumps[-1].primary_heating_system = false
367
- hpxml.heat_pumps[-1].primary_cooling_system = false
382
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-multiple.xml')
383
+ hpxml_bldg.heating_systems[0].fraction_heat_load_served += 0.1
384
+ hpxml_bldg.cooling_systems[0].fraction_cool_load_served += 0.2
385
+ hpxml_bldg.heating_systems[0].primary_system = true
386
+ hpxml_bldg.cooling_systems[0].primary_system = true
387
+ hpxml_bldg.heat_pumps[-1].primary_heating_system = false
388
+ hpxml_bldg.heat_pumps[-1].primary_cooling_system = false
368
389
  elsif ['hvac-location-heating-system'].include? error_case
369
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-boiler-oil-only.xml'))
370
- hpxml.heating_systems[0].location = HPXML::LocationBasementUnconditioned
390
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-boiler-oil-only.xml')
391
+ hpxml_bldg.heating_systems[0].location = HPXML::LocationBasementUnconditioned
371
392
  elsif ['hvac-location-cooling-system'].include? error_case
372
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-central-ac-only-1-speed.xml'))
373
- hpxml.cooling_systems[0].location = HPXML::LocationBasementUnconditioned
393
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-central-ac-only-1-speed.xml')
394
+ hpxml_bldg.cooling_systems[0].location = HPXML::LocationBasementUnconditioned
374
395
  elsif ['hvac-location-heat-pump'].include? error_case
375
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-air-to-air-heat-pump-1-speed.xml'))
376
- hpxml.heat_pumps[0].location = HPXML::LocationBasementUnconditioned
396
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-air-to-air-heat-pump-1-speed.xml')
397
+ hpxml_bldg.heat_pumps[0].location = HPXML::LocationBasementUnconditioned
398
+ elsif ['hvac-msac-not-var-speed'].include? error_case
399
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-mini-split-air-conditioner-only-ductless.xml')
400
+ hpxml_bldg.cooling_systems[0].compressor_type = HPXML::HVACCompressorTypeTwoStage
401
+ elsif ['hvac-mshp-not-var-speed'].include? error_case
402
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-mini-split-heat-pump-ductless.xml')
403
+ hpxml_bldg.heat_pumps[0].compressor_type = HPXML::HVACCompressorTypeSingleStage
377
404
  elsif ['hvac-sizing-humidity-setpoint'].include? error_case
378
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
379
- hpxml.header.manualj_humidity_setpoint = 50
405
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
406
+ hpxml_bldg.header.manualj_humidity_setpoint = 50
380
407
  elsif ['hvac-negative-crankcase-heater-watts'].include? error_case
381
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
382
- hpxml.cooling_systems[0].crankcase_heater_watts = -10
408
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
409
+ hpxml_bldg.cooling_systems[0].crankcase_heater_watts = -10
383
410
  elsif ['incomplete-integrated-heating'].include? error_case
384
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-ptac-with-heating-electricity.xml'))
385
- hpxml.cooling_systems[0].integrated_heating_system_fraction_heat_load_served = nil
411
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-ptac-with-heating-electricity.xml')
412
+ hpxml_bldg.cooling_systems[0].integrated_heating_system_fraction_heat_load_served = nil
386
413
  elsif ['invalid-airflow-defect-ratio'].include? error_case
387
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-mini-split-heat-pump-ductless.xml'))
388
- hpxml.heat_pumps[0].airflow_defect_ratio = -0.25
414
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-mini-split-heat-pump-ductless.xml')
415
+ hpxml_bldg.heat_pumps[0].airflow_defect_ratio = -0.25
389
416
  elsif ['invalid-assembly-effective-rvalue'].include? error_case
390
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
391
- hpxml.walls[0].insulation_assembly_r_value = 0.0
417
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
418
+ hpxml_bldg.walls[0].insulation_assembly_r_value = 0.0
392
419
  elsif ['invalid-battery-capacities-ah'].include? error_case
393
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-pv-battery-ah.xml'))
394
- hpxml.batteries[0].usable_capacity_ah = hpxml.batteries[0].nominal_capacity_ah
420
+ hpxml, hpxml_bldg = _create_hpxml('base-pv-battery-ah.xml')
421
+ hpxml_bldg.batteries[0].usable_capacity_ah = hpxml_bldg.batteries[0].nominal_capacity_ah
395
422
  elsif ['invalid-battery-capacities-kwh'].include? error_case
396
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-pv-battery.xml'))
397
- hpxml.batteries[0].usable_capacity_kwh = hpxml.batteries[0].nominal_capacity_kwh
423
+ hpxml, hpxml_bldg = _create_hpxml('base-pv-battery.xml')
424
+ hpxml_bldg.batteries[0].usable_capacity_kwh = hpxml_bldg.batteries[0].nominal_capacity_kwh
398
425
  elsif ['invalid-calendar-year-low'].include? error_case
399
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
426
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
400
427
  hpxml.header.sim_calendar_year = 1575
401
428
  elsif ['invalid-calendar-year-high'].include? error_case
402
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
429
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
403
430
  hpxml.header.sim_calendar_year = 20000
404
431
  elsif ['invalid-duct-area-fractions'].include? error_case
405
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-ducts-area-fractions.xml'))
406
- hpxml.hvac_distributions[0].ducts[0].duct_surface_area = nil
407
- hpxml.hvac_distributions[0].ducts[1].duct_surface_area = nil
408
- hpxml.hvac_distributions[0].ducts[2].duct_surface_area = nil
409
- hpxml.hvac_distributions[0].ducts[3].duct_surface_area = nil
410
- hpxml.hvac_distributions[0].ducts[0].duct_fraction_area = 0.65
411
- hpxml.hvac_distributions[0].ducts[1].duct_fraction_area = 0.65
412
- hpxml.hvac_distributions[0].ducts[2].duct_fraction_area = 0.15
413
- hpxml.hvac_distributions[0].ducts[3].duct_fraction_area = 0.15
432
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-ducts-area-fractions.xml')
433
+ hpxml_bldg.hvac_distributions[0].ducts[0].duct_surface_area = nil
434
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_surface_area = nil
435
+ hpxml_bldg.hvac_distributions[0].ducts[2].duct_surface_area = nil
436
+ hpxml_bldg.hvac_distributions[0].ducts[3].duct_surface_area = nil
437
+ hpxml_bldg.hvac_distributions[0].ducts[0].duct_fraction_area = 0.65
438
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_fraction_area = 0.65
439
+ hpxml_bldg.hvac_distributions[0].ducts[2].duct_fraction_area = 0.15
440
+ hpxml_bldg.hvac_distributions[0].ducts[3].duct_fraction_area = 0.15
414
441
  elsif ['invalid-facility-type'].include? error_case
415
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-bldgtype-multifamily-shared-laundry-room.xml'))
416
- hpxml.building_construction.residential_facility_type = HPXML::ResidentialTypeSFD
442
+ hpxml, hpxml_bldg = _create_hpxml('base-bldgtype-mf-unit-shared-laundry-room.xml')
443
+ hpxml_bldg.building_construction.residential_facility_type = HPXML::ResidentialTypeSFD
417
444
  elsif ['invalid-foundation-wall-properties'].include? error_case
418
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-foundation-unconditioned-basement-wall-insulation.xml'))
419
- hpxml.foundation_walls[0].depth_below_grade = 9.0
420
- hpxml.foundation_walls[0].insulation_interior_distance_to_top = 12.0
421
- hpxml.foundation_walls[0].insulation_interior_distance_to_bottom = 10.0
445
+ hpxml, hpxml_bldg = _create_hpxml('base-foundation-unconditioned-basement-wall-insulation.xml')
446
+ hpxml_bldg.foundation_walls[0].depth_below_grade = 9.0
447
+ hpxml_bldg.foundation_walls[0].insulation_interior_distance_to_top = 12.0
448
+ hpxml_bldg.foundation_walls[0].insulation_interior_distance_to_bottom = 10.0
422
449
  elsif ['invalid-ground-conductivity'].include? error_case
423
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
424
- hpxml.site.ground_conductivity = 0.0
450
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
451
+ hpxml_bldg.site.ground_conductivity = 0.0
425
452
  elsif ['invalid-heat-pump-capacity-retention'].include? error_case
426
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-air-to-air-heat-pump-1-speed.xml'))
427
- hpxml.heat_pumps[0].heating_capacity_17F = nil
428
- hpxml.heat_pumps[0].heating_capacity_retention_fraction = 1.5
429
- hpxml.heat_pumps[0].heating_capacity_retention_temp = 30
453
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-air-to-air-heat-pump-1-speed.xml')
454
+ hpxml_bldg.heat_pumps[0].heating_capacity_17F = nil
455
+ hpxml_bldg.heat_pumps[0].heating_capacity_retention_fraction = 1.5
456
+ hpxml_bldg.heat_pumps[0].heating_capacity_retention_temp = 30
430
457
  elsif ['invalid-heat-pump-capacity-retention2'].include? error_case
431
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-air-to-air-heat-pump-1-speed.xml'))
432
- hpxml.heat_pumps[0].heating_capacity_17F = nil
433
- hpxml.heat_pumps[0].heating_capacity_retention_fraction = -1
434
- hpxml.heat_pumps[0].heating_capacity_retention_temp = 5
458
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-air-to-air-heat-pump-1-speed.xml')
459
+ hpxml_bldg.heat_pumps[0].heating_capacity_17F = nil
460
+ hpxml_bldg.heat_pumps[0].heating_capacity_retention_fraction = -1
461
+ hpxml_bldg.heat_pumps[0].heating_capacity_retention_temp = 5
435
462
  elsif ['invalid-hvac-installation-quality'].include? error_case
436
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-air-to-air-heat-pump-1-speed.xml'))
437
- hpxml.heat_pumps[0].airflow_defect_ratio = -99
438
- hpxml.heat_pumps[0].charge_defect_ratio = -99
463
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-air-to-air-heat-pump-1-speed.xml')
464
+ hpxml_bldg.heat_pumps[0].airflow_defect_ratio = -99
465
+ hpxml_bldg.heat_pumps[0].charge_defect_ratio = -99
439
466
  elsif ['invalid-hvac-installation-quality2'].include? error_case
440
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-air-to-air-heat-pump-1-speed.xml'))
441
- hpxml.heat_pumps[0].airflow_defect_ratio = 99
442
- hpxml.heat_pumps[0].charge_defect_ratio = 99
467
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-air-to-air-heat-pump-1-speed.xml')
468
+ hpxml_bldg.heat_pumps[0].airflow_defect_ratio = 99
469
+ hpxml_bldg.heat_pumps[0].charge_defect_ratio = 99
443
470
  elsif ['invalid-id2'].include? error_case
444
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-enclosure-skylights.xml'))
471
+ hpxml, hpxml_bldg = _create_hpxml('base-enclosure-skylights.xml')
445
472
  elsif ['invalid-input-parameters'].include? error_case
446
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
473
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
447
474
  hpxml.header.transaction = 'modify'
448
- hpxml.site.site_type = 'mountain'
449
- hpxml.climate_and_risk_zones.climate_zone_ieccs[0].year = 2020
450
- hpxml.roofs.each do |roof|
475
+ hpxml_bldg.site.site_type = 'mountain'
476
+ hpxml_bldg.climate_and_risk_zones.climate_zone_ieccs[0].year = 2020
477
+ hpxml_bldg.roofs.each do |roof|
451
478
  roof.radiant_barrier_grade = 4
452
479
  end
453
- hpxml.roofs[0].azimuth = 365
454
- hpxml.dishwashers[0].rated_annual_kwh = nil
455
- hpxml.dishwashers[0].energy_factor = 5.1
480
+ hpxml_bldg.roofs[0].azimuth = 365
481
+ hpxml_bldg.dishwashers[0].rated_annual_kwh = nil
482
+ hpxml_bldg.dishwashers[0].energy_factor = 5.1
456
483
  elsif ['invalid-insulation-top'].include? error_case
457
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
458
- hpxml.foundation_walls[0].insulation_interior_distance_to_top = -0.5
484
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
485
+ hpxml_bldg.foundation_walls[0].insulation_interior_distance_to_top = -0.5
459
486
  elsif ['invalid-integrated-heating'].include? error_case
460
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-central-ac-only-1-speed.xml'))
461
- hpxml.cooling_systems[0].integrated_heating_system_fuel = HPXML::FuelTypeElectricity
462
- hpxml.cooling_systems[0].integrated_heating_system_efficiency_percent = 0.98
463
- hpxml.cooling_systems[0].integrated_heating_system_fraction_heat_load_served = 1.0
487
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-central-ac-only-1-speed.xml')
488
+ hpxml_bldg.cooling_systems[0].integrated_heating_system_fuel = HPXML::FuelTypeElectricity
489
+ hpxml_bldg.cooling_systems[0].integrated_heating_system_efficiency_percent = 0.98
490
+ hpxml_bldg.cooling_systems[0].integrated_heating_system_fraction_heat_load_served = 1.0
464
491
  elsif ['invalid-lighting-groups'].include? error_case
465
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-enclosure-garage.xml'))
492
+ hpxml, hpxml_bldg = _create_hpxml('base-enclosure-garage.xml')
466
493
  [HPXML::LocationInterior, HPXML::LocationExterior, HPXML::LocationGarage].each do |ltg_loc|
467
- hpxml.lighting_groups.each do |lg|
494
+ hpxml_bldg.lighting_groups.each do |lg|
468
495
  next unless lg.location == ltg_loc
469
496
 
470
497
  lg.delete
@@ -472,115 +499,133 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
472
499
  end
473
500
  end
474
501
  elsif ['invalid-lighting-groups2'].include? error_case
475
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-enclosure-garage.xml'))
502
+ hpxml, hpxml_bldg = _create_hpxml('base-enclosure-garage.xml')
476
503
  [HPXML::LocationInterior, HPXML::LocationExterior, HPXML::LocationGarage].each do |ltg_loc|
477
- hpxml.lighting_groups.each do |lg|
504
+ hpxml_bldg.lighting_groups.each do |lg|
478
505
  next unless lg.location == ltg_loc
479
506
 
480
- hpxml.lighting_groups << lg.dup
481
- hpxml.lighting_groups[-1].id = "LightingGroup#{hpxml.lighting_groups.size}"
482
- hpxml.lighting_groups[-1].fraction_of_units_in_location = 0.0
507
+ hpxml_bldg.lighting_groups << lg.dup
508
+ hpxml_bldg.lighting_groups[-1].id = "LightingGroup#{hpxml_bldg.lighting_groups.size}"
509
+ hpxml_bldg.lighting_groups[-1].fraction_of_units_in_location = 0.0
483
510
  break
484
511
  end
485
512
  end
486
513
  elsif ['invalid-natvent-availability'].include? error_case
487
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
488
- hpxml.header.natvent_days_per_week = 8
514
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
515
+ hpxml_bldg.header.natvent_days_per_week = 8
489
516
  elsif ['invalid-natvent-availability2'].include? error_case
490
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
491
- hpxml.header.natvent_days_per_week = -1
517
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
518
+ hpxml_bldg.header.natvent_days_per_week = -1
492
519
  elsif ['invalid-number-of-bedrooms-served'].include? error_case
493
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-bldgtype-multifamily-shared-pv.xml'))
494
- hpxml.pv_systems[0].number_of_bedrooms_served = 3
520
+ hpxml, hpxml_bldg = _create_hpxml('base-bldgtype-mf-unit-shared-pv.xml')
521
+ hpxml_bldg.pv_systems[0].number_of_bedrooms_served = 3
495
522
  elsif ['invalid-number-of-conditioned-floors'].include? error_case
496
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
497
- hpxml.building_construction.number_of_conditioned_floors_above_grade = 3
523
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
524
+ hpxml_bldg.building_construction.number_of_conditioned_floors_above_grade = 3
498
525
  elsif ['invalid-number-of-units-served'].include? error_case
499
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-bldgtype-multifamily-shared-water-heater.xml'))
500
- hpxml.water_heating_systems[0].number_of_units_served = 1
526
+ hpxml, hpxml_bldg = _create_hpxml('base-bldgtype-mf-unit-shared-water-heater.xml')
527
+ hpxml_bldg.water_heating_systems[0].number_of_units_served = 1
501
528
  elsif ['invalid-pilot-light-heating-system'].include? error_case
502
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-floor-furnace-propane-only-pilot-light.xml'))
503
- hpxml.heating_systems[0].heating_system_fuel = HPXML::FuelTypeElectricity
529
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-floor-furnace-propane-only.xml')
530
+ hpxml_bldg.heating_systems[0].heating_system_fuel = HPXML::FuelTypeElectricity
504
531
  elsif ['invalid-shared-vent-in-unit-flowrate'].include? error_case
505
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-bldgtype-multifamily-shared-mechvent.xml'))
506
- hpxml.ventilation_fans[0].rated_flow_rate = 80
532
+ hpxml, hpxml_bldg = _create_hpxml('base-bldgtype-mf-unit-shared-mechvent.xml')
533
+ hpxml_bldg.ventilation_fans[0].rated_flow_rate = 80
507
534
  elsif ['invalid-timestep'].include? error_case
508
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
535
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
509
536
  hpxml.header.timestep = 45
510
537
  elsif ['invalid-timezone-utcoffset-low'].include? error_case
511
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
512
- hpxml.header.time_zone_utc_offset = -13
538
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
539
+ hpxml_bldg.time_zone_utc_offset = -13
513
540
  elsif ['invalid-timezone-utcoffset-high'].include? error_case
514
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
515
- hpxml.header.time_zone_utc_offset = 15
541
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
542
+ hpxml_bldg.time_zone_utc_offset = 15
516
543
  elsif ['invalid-ventilation-fan'].include? error_case
517
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-mechvent-exhaust.xml'))
518
- hpxml.ventilation_fans[0].used_for_garage_ventilation = true
544
+ hpxml, hpxml_bldg = _create_hpxml('base-mechvent-exhaust.xml')
545
+ hpxml_bldg.ventilation_fans[0].used_for_garage_ventilation = true
519
546
  elsif ['invalid-ventilation-recovery'].include? error_case
520
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-mechvent-exhaust.xml'))
521
- hpxml.ventilation_fans[0].sensible_recovery_efficiency = 0.72
522
- hpxml.ventilation_fans[0].total_recovery_efficiency = 0.48
547
+ hpxml, hpxml_bldg = _create_hpxml('base-mechvent-exhaust.xml')
548
+ hpxml_bldg.ventilation_fans[0].sensible_recovery_efficiency = 0.72
549
+ hpxml_bldg.ventilation_fans[0].total_recovery_efficiency = 0.48
523
550
  elsif ['invalid-window-height'].include? error_case
524
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-enclosure-overhangs.xml'))
525
- hpxml.windows[1].overhangs_distance_to_bottom_of_window = 1.0
551
+ hpxml, hpxml_bldg = _create_hpxml('base-enclosure-overhangs.xml')
552
+ hpxml_bldg.windows[1].overhangs_distance_to_bottom_of_window = 1.0
526
553
  elsif ['lighting-fractions'].include? error_case
527
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
528
- int_cfl = hpxml.lighting_groups.find { |lg| lg.location == HPXML::LocationInterior && lg.lighting_type == HPXML::LightingTypeCFL }
554
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
555
+ int_cfl = hpxml_bldg.lighting_groups.find { |lg| lg.location == HPXML::LocationInterior && lg.lighting_type == HPXML::LightingTypeCFL }
529
556
  int_cfl.fraction_of_units_in_location = 0.8
557
+ elsif ['manufactured-home-reference-duct'].include? error_case
558
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
559
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_location = HPXML::LocationManufacturedHomeBelly
560
+ elsif ['manufactured-home-reference-water-heater'].include? error_case
561
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
562
+ hpxml_bldg.water_heating_systems[0].location = HPXML::LocationManufacturedHomeBelly
563
+ elsif ['manufactured-home-reference-floor'].include? error_case
564
+ hpxml, hpxml_bldg = _create_hpxml('base-foundation-vented-crawlspace.xml')
565
+ hpxml_bldg.floors.each do |floor|
566
+ if floor.exterior_adjacent_to == HPXML::LocationCrawlspaceVented
567
+ floor.exterior_adjacent_to = HPXML::LocationManufacturedHomeUnderBelly
568
+ break
569
+ end
570
+ end
571
+ elsif ['missing-capacity-detailed-performance'].include? error_case
572
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-mini-split-heat-pump-ductless-detailed-performance.xml')
573
+ hpxml_bldg.heat_pumps[0].cooling_capacity = nil
574
+ hpxml_bldg.heat_pumps[0].heating_capacity = nil
530
575
  elsif ['missing-cfis-supplemental-fan'].include? error_case
531
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-mechvent-cfis.xml'))
532
- hpxml.ventilation_fans[0].cfis_addtl_runtime_operating_mode = HPXML::CFISModeSupplementalFan
576
+ hpxml, hpxml_bldg = _create_hpxml('base-mechvent-cfis.xml')
577
+ hpxml_bldg.ventilation_fans[0].cfis_addtl_runtime_operating_mode = HPXML::CFISModeSupplementalFan
533
578
  elsif ['missing-distribution-cfa-served'].include? error_case
534
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
535
- hpxml.hvac_distributions[0].ducts[1].duct_surface_area = nil
536
- hpxml.hvac_distributions[0].ducts[1].duct_location = nil
579
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
580
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_surface_area = nil
581
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_location = nil
537
582
  elsif ['missing-duct-area'].include? error_case
538
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
539
- hpxml.hvac_distributions[0].conditioned_floor_area_served = hpxml.building_construction.conditioned_floor_area
540
- hpxml.hvac_distributions[0].ducts[1].duct_surface_area = nil
583
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
584
+ hpxml_bldg.hvac_distributions[0].conditioned_floor_area_served = hpxml_bldg.building_construction.conditioned_floor_area
585
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_surface_area = nil
541
586
  elsif ['missing-duct-location'].include? error_case
542
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
543
- hpxml.hvac_distributions[0].ducts[1].duct_location = nil
587
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
588
+ hpxml_bldg.hvac_distributions[0].ducts[1].duct_location = nil
544
589
  elsif ['missing-elements'].include? error_case
545
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
546
- hpxml.building_construction.number_of_conditioned_floors = nil
547
- hpxml.building_construction.conditioned_floor_area = nil
590
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
591
+ hpxml_bldg.building_construction.number_of_conditioned_floors = nil
592
+ hpxml_bldg.building_construction.conditioned_floor_area = nil
548
593
  elsif ['multifamily-reference-appliance'].include? error_case
549
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
550
- hpxml.clothes_washers[0].location = HPXML::LocationOtherHousingUnit
594
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
595
+ hpxml_bldg.clothes_washers[0].location = HPXML::LocationOtherHousingUnit
551
596
  elsif ['multifamily-reference-duct'].include? error_case
552
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
553
- hpxml.hvac_distributions[0].ducts[0].duct_location = HPXML::LocationOtherMultifamilyBufferSpace
597
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
598
+ hpxml_bldg.hvac_distributions[0].ducts[0].duct_location = HPXML::LocationOtherMultifamilyBufferSpace
554
599
  elsif ['multifamily-reference-surface'].include? error_case
555
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
556
- hpxml.floors << hpxml.floors[0].dup
557
- hpxml.floors[1].id = "Floor#{hpxml.floors.size}"
558
- hpxml.floors[1].insulation_id = "FloorInsulation#{hpxml.floors.size}"
559
- hpxml.floors[1].exterior_adjacent_to = HPXML::LocationOtherHeatedSpace
560
- hpxml.floors[1].floor_or_ceiling = HPXML::FloorOrCeilingCeiling
600
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
601
+ hpxml_bldg.floors << hpxml_bldg.floors[0].dup
602
+ hpxml_bldg.floors[1].id = "Floor#{hpxml_bldg.floors.size}"
603
+ hpxml_bldg.floors[1].insulation_id = "FloorInsulation#{hpxml_bldg.floors.size}"
604
+ hpxml_bldg.floors[1].exterior_adjacent_to = HPXML::LocationOtherHeatedSpace
605
+ hpxml_bldg.floors[1].floor_or_ceiling = HPXML::FloorOrCeilingCeiling
561
606
  elsif ['multifamily-reference-water-heater'].include? error_case
562
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
563
- hpxml.water_heating_systems[0].location = HPXML::LocationOtherNonFreezingSpace
607
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
608
+ hpxml_bldg.water_heating_systems[0].location = HPXML::LocationOtherNonFreezingSpace
564
609
  elsif ['refrigerator-location'].include? error_case
565
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
566
- hpxml.refrigerators[0].location = HPXML::LocationGarage
610
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
611
+ hpxml_bldg.refrigerators[0].location = HPXML::LocationGarage
567
612
  elsif ['solar-fraction-one'].include? error_case
568
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-dhw-solar-fraction.xml'))
569
- hpxml.solar_thermal_systems[0].solar_fraction = 1.0
613
+ hpxml, hpxml_bldg = _create_hpxml('base-dhw-solar-fraction.xml')
614
+ hpxml_bldg.solar_thermal_systems[0].solar_fraction = 1.0
570
615
  elsif ['water-heater-location'].include? error_case
571
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
572
- hpxml.water_heating_systems[0].location = HPXML::LocationCrawlspaceVented
616
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
617
+ hpxml_bldg.water_heating_systems[0].location = HPXML::LocationCrawlspaceVented
573
618
  elsif ['water-heater-location-other'].include? error_case
574
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
575
- hpxml.water_heating_systems[0].location = HPXML::LocationUnconditionedSpace
619
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
620
+ hpxml_bldg.water_heating_systems[0].location = HPXML::LocationUnconditionedSpace
576
621
  elsif ['water-heater-recovery-efficiency'].include? error_case
577
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-dhw-tank-gas.xml'))
578
- hpxml.water_heating_systems[0].recovery_efficiency = hpxml.water_heating_systems[0].energy_factor
622
+ hpxml, hpxml_bldg = _create_hpxml('base-dhw-tank-gas.xml')
623
+ hpxml_bldg.water_heating_systems[0].recovery_efficiency = hpxml_bldg.water_heating_systems[0].energy_factor
579
624
  else
580
625
  fail "Unhandled case: #{error_case}."
581
626
  end
582
627
 
583
- hpxml_doc = hpxml.to_oga()
628
+ hpxml_doc = hpxml.to_doc()
584
629
 
585
630
  # Perform additional raw XML manipulation
586
631
  if ['invalid-id2'].include? error_case
@@ -611,6 +656,7 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
611
656
  'dhw-setpoint-low' => ['Hot water setpoint should typically be greater than or equal to 110 deg-F.'],
612
657
  'erv-atre-low' => ['Adjusted total recovery efficiency should typically be at least half of the adjusted sensible recovery efficiency.'],
613
658
  'erv-tre-low' => ['Total recovery efficiency should typically be at least half of the sensible recovery efficiency.'],
659
+ 'fuel-load-type-other' => ["Fuel load type 'other' is not currently handled, the fuel load will not be modeled."],
614
660
  'garage-ventilation' => ['Ventilation fans for the garage are not currently modeled.'],
615
661
  'heat-pump-low-backup-switchover-temp' => ['BackupHeatingSwitchoverTemperature is below 30 deg-F; this may result in significant unmet hours if the heat pump does not have sufficient capacity.'],
616
662
  'heat-pump-low-backup-lockout-temp' => ['BackupHeatingLockoutTemperature is below 30 deg-F; this may result in significant unmet hours if the heat pump does not have sufficient capacity.'],
@@ -659,7 +705,16 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
659
705
  'No exterior lighting specified, the model will not include exterior lighting energy use.',
660
706
  'No garage lighting specified, the model will not include garage lighting energy use.'],
661
707
  'missing-attached-surfaces' => ['ResidentialFacilityType is single-family attached or apartment unit, but no attached surfaces were found. This may result in erroneous results (e.g., for infiltration).'],
708
+ 'plug-load-type-sauna' => ["Plug load type 'sauna' is not currently handled, the plug load will not be modeled."],
709
+ 'plug-load-type-aquarium' => ["Plug load type 'aquarium' is not currently handled, the plug load will not be modeled."],
710
+ 'plug-load-type-water-bed' => ["Plug load type 'water bed' is not currently handled, the plug load will not be modeled."],
711
+ 'plug-load-type-space-heater' => ["Plug load type 'space heater' is not currently handled, the plug load will not be modeled."],
712
+ 'plug-load-type-computer' => ["Plug load type 'computer' is not currently handled, the plug load will not be modeled."],
713
+ 'plug-load-type-tv-crt' => ["Plug load type 'TV CRT' is not currently handled, the plug load will not be modeled."],
714
+ 'plug-load-type-tv-plasma' => ["Plug load type 'TV plasma' is not currently handled, the plug load will not be modeled."],
715
+ 'portable-spa' => ['Portable spa is not currently handled, the portable spa will not be modeled.'],
662
716
  'slab-zero-exposed-perimeter' => ['Slab has zero exposed perimeter, this may indicate an input error.'],
717
+ 'unit-multiplier' => ['NumberofUnits is greater than 1, indicating that the HPXML Building represents multiple dwelling units; simulation outputs will reflect this unit multiplier.'],
663
718
  'wrong-units' => ['Thickness is greater than 12 inches; this may indicate incorrect units.',
664
719
  'Thickness is less than 1 inch; this may indicate incorrect units.',
665
720
  'Depth is greater than 72 feet; this may indicate incorrect units.',
@@ -669,51 +724,54 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
669
724
  puts "[#{i + 1}/#{all_expected_warnings.size}] Testing #{warning_case}..."
670
725
  # Create HPXML object
671
726
  if ['battery-pv-output-power-low'].include? warning_case
672
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-pv-battery.xml'))
673
- hpxml.batteries[0].rated_power_output = 0.1
674
- hpxml.pv_systems[0].max_power_output = 0.1
675
- hpxml.pv_systems[1].max_power_output = 0.1
727
+ hpxml, hpxml_bldg = _create_hpxml('base-pv-battery.xml')
728
+ hpxml_bldg.batteries[0].rated_power_output = 0.1
729
+ hpxml_bldg.pv_systems[0].max_power_output = 0.1
730
+ hpxml_bldg.pv_systems[1].max_power_output = 0.1
676
731
  elsif ['dhw-capacities-low'].include? warning_case
677
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-dhw-multiple.xml'))
678
- hpxml.water_heating_systems.each do |water_heating_system|
732
+ hpxml, hpxml_bldg = _create_hpxml('base-dhw-multiple.xml')
733
+ hpxml_bldg.water_heating_systems.each do |water_heating_system|
679
734
  if [HPXML::WaterHeaterTypeStorage].include? water_heating_system.water_heater_type
680
735
  water_heating_system.heating_capacity = 0.1
681
736
  end
682
737
  end
683
738
  elsif ['dhw-efficiencies-low'].include? warning_case
684
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-dhw-multiple.xml'))
685
- hpxml.water_heating_systems.each do |water_heating_system|
739
+ hpxml, hpxml_bldg = _create_hpxml('base-dhw-multiple.xml')
740
+ hpxml_bldg.water_heating_systems.each do |water_heating_system|
686
741
  if [HPXML::WaterHeaterTypeStorage,
687
742
  HPXML::WaterHeaterTypeTankless].include? water_heating_system.water_heater_type
688
743
  water_heating_system.energy_factor = 0.1
689
744
  end
690
745
  end
691
746
  elsif ['dhw-setpoint-low'].include? warning_case
692
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
693
- hpxml.water_heating_systems[0].temperature = 100
747
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
748
+ hpxml_bldg.water_heating_systems[0].temperature = 100
694
749
  elsif ['erv-atre-low'].include? warning_case
695
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-mechvent-erv-atre-asre.xml'))
696
- hpxml.ventilation_fans[0].total_recovery_efficiency_adjusted = 0.1
750
+ hpxml, hpxml_bldg = _create_hpxml('base-mechvent-erv-atre-asre.xml')
751
+ hpxml_bldg.ventilation_fans[0].total_recovery_efficiency_adjusted = 0.1
752
+ elsif ['fuel-load-type-other'].include? warning_case
753
+ hpxml, hpxml_bldg = _create_hpxml('base-misc-loads-large-uncommon.xml')
754
+ hpxml_bldg.fuel_loads[0].fuel_load_type = HPXML::FuelLoadTypeOther
697
755
  elsif ['erv-tre-low'].include? warning_case
698
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-mechvent-erv.xml'))
699
- hpxml.ventilation_fans[0].total_recovery_efficiency = 0.1
756
+ hpxml, hpxml_bldg = _create_hpxml('base-mechvent-erv.xml')
757
+ hpxml_bldg.ventilation_fans[0].total_recovery_efficiency = 0.1
700
758
  elsif ['garage-ventilation'].include? warning_case
701
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
702
- hpxml.ventilation_fans.add(id: 'VentilationFan1',
703
- used_for_garage_ventilation: true)
759
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
760
+ hpxml_bldg.ventilation_fans.add(id: 'VentilationFan1',
761
+ used_for_garage_ventilation: true)
704
762
  elsif ['heat-pump-low-backup-switchover-temp'].include? warning_case
705
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-dual-fuel-air-to-air-heat-pump-1-speed.xml'))
706
- hpxml.heat_pumps[0].backup_heating_switchover_temp = 25.0
763
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-dual-fuel-air-to-air-heat-pump-1-speed.xml')
764
+ hpxml_bldg.heat_pumps[0].backup_heating_switchover_temp = 25.0
707
765
  elsif ['heat-pump-low-backup-lockout-temp'].include? warning_case
708
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-air-to-air-heat-pump-1-speed-lockout-temperatures.xml'))
709
- hpxml.heat_pumps[0].backup_heating_lockout_temp = 25.0
766
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-air-to-air-heat-pump-1-speed-lockout-temperatures.xml')
767
+ hpxml_bldg.heat_pumps[0].backup_heating_lockout_temp = 25.0
710
768
  elsif ['hvac-dse-low'].include? warning_case
711
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-dse.xml'))
712
- hpxml.hvac_distributions[0].annual_heating_dse = 0.1
713
- hpxml.hvac_distributions[0].annual_cooling_dse = 0.1
769
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-dse.xml')
770
+ hpxml_bldg.hvac_distributions[0].annual_heating_dse = 0.1
771
+ hpxml_bldg.hvac_distributions[0].annual_cooling_dse = 0.1
714
772
  elsif ['hvac-capacities-low'].include? warning_case
715
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-multiple.xml'))
716
- hpxml.hvac_systems.each do |hvac_system|
773
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-multiple.xml')
774
+ hpxml_bldg.hvac_systems.each do |hvac_system|
717
775
  if hvac_system.is_a? HPXML::HeatingSystem
718
776
  hvac_system.heating_capacity = 0.1
719
777
  elsif hvac_system.is_a? HPXML::CoolingSystem
@@ -725,8 +783,8 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
725
783
  end
726
784
  end
727
785
  elsif ['hvac-efficiencies-low'].include? warning_case
728
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-multiple.xml'))
729
- hpxml.hvac_systems.each do |hvac_system|
786
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-multiple.xml')
787
+ hpxml_bldg.hvac_systems.each do |hvac_system|
730
788
  if hvac_system.is_a? HPXML::HeatingSystem
731
789
  if [HPXML::HVACTypeElectricResistance,
732
790
  HPXML::HVACTypeStove].include? hvac_system.heating_system_type
@@ -754,40 +812,67 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
754
812
  end
755
813
  end
756
814
  elsif ['hvac-setpoints-high'].include? warning_case
757
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
758
- hpxml.hvac_controls[0].heating_setpoint_temp = 100
759
- hpxml.hvac_controls[0].cooling_setpoint_temp = 100
815
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
816
+ hpxml_bldg.hvac_controls[0].heating_setpoint_temp = 100
817
+ hpxml_bldg.hvac_controls[0].cooling_setpoint_temp = 100
760
818
  elsif ['hvac-setpoints-low'].include? warning_case
761
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
762
- hpxml.hvac_controls[0].heating_setpoint_temp = 0
763
- hpxml.hvac_controls[0].cooling_setpoint_temp = 0
819
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
820
+ hpxml_bldg.hvac_controls[0].heating_setpoint_temp = 0
821
+ hpxml_bldg.hvac_controls[0].cooling_setpoint_temp = 0
764
822
  elsif ['integrated-heating-efficiency-low'].include? warning_case
765
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-ptac-with-heating-electricity.xml'))
766
- hpxml.cooling_systems[0].integrated_heating_system_efficiency_percent = 0.4
823
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-ptac-with-heating-electricity.xml')
824
+ hpxml_bldg.cooling_systems[0].integrated_heating_system_efficiency_percent = 0.4
767
825
  elsif ['lighting-groups-missing'].include? warning_case
768
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-enclosure-garage.xml'))
769
- hpxml.lighting_groups.reverse_each do |lg|
826
+ hpxml, hpxml_bldg = _create_hpxml('base-enclosure-garage.xml')
827
+ hpxml_bldg.lighting_groups.reverse_each do |lg|
770
828
  lg.delete
771
829
  end
772
830
  elsif ['missing-attached-surfaces'].include? warning_case
773
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
774
- hpxml.building_construction.residential_facility_type = HPXML::ResidentialTypeSFA
775
- hpxml.air_infiltration_measurements[0].infiltration_type = HPXML::InfiltrationTypeUnitExterior
831
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
832
+ hpxml_bldg.building_construction.residential_facility_type = HPXML::ResidentialTypeSFA
833
+ hpxml_bldg.air_infiltration_measurements[0].infiltration_type = HPXML::InfiltrationTypeUnitExterior
834
+ elsif ['plug-load-type-sauna'].include? warning_case
835
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
836
+ hpxml_bldg.plug_loads[0].plug_load_type = HPXML::PlugLoadTypeSauna
837
+ elsif ['plug-load-type-aquarium'].include? warning_case
838
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
839
+ hpxml_bldg.plug_loads[0].plug_load_type = HPXML::PlugLoadTypeAquarium
840
+ elsif ['plug-load-type-water-bed'].include? warning_case
841
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
842
+ hpxml_bldg.plug_loads[0].plug_load_type = HPXML::PlugLoadTypeWaterBed
843
+ elsif ['plug-load-type-space-heater'].include? warning_case
844
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
845
+ hpxml_bldg.plug_loads[0].plug_load_type = HPXML::PlugLoadTypeSpaceHeater
846
+ elsif ['plug-load-type-computer'].include? warning_case
847
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
848
+ hpxml_bldg.plug_loads[0].plug_load_type = HPXML::PlugLoadTypeComputer
849
+ elsif ['plug-load-type-tv-crt'].include? warning_case
850
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
851
+ hpxml_bldg.plug_loads[0].plug_load_type = HPXML::PlugLoadTypeTelevisionCRT
852
+ elsif ['plug-load-type-tv-plasma'].include? warning_case
853
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
854
+ hpxml_bldg.plug_loads[0].plug_load_type = HPXML::PlugLoadTypeTelevisionPlasma
855
+ elsif ['portable-spa'].include? warning_case
856
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
857
+ hpxml_bldg.portable_spas.add(id: 'PorableSpa')
776
858
  elsif ['slab-zero-exposed-perimeter'].include? warning_case
777
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
778
- hpxml.slabs[0].exposed_perimeter = 0
859
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
860
+ hpxml_bldg.slabs[0].exposed_perimeter = 0
861
+ elsif ['unit-multiplier'].include? warning_case
862
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
863
+ hpxml_bldg.building_construction.number_of_units = 5
779
864
  elsif ['wrong-units'].include? warning_case
780
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-enclosure-overhangs.xml'))
781
- hpxml.slabs[0].thickness = 0.5
782
- hpxml.foundation_walls[0].thickness = 72.0
783
- hpxml.windows[0].overhangs_depth = 120.0
784
- hpxml.windows[0].overhangs_distance_to_top_of_window = 24.0
785
- hpxml.windows[0].overhangs_distance_to_bottom_of_window = 48.0
865
+ hpxml, hpxml_bldg = _create_hpxml('base-enclosure-overhangs.xml')
866
+ hpxml_bldg.slabs[0].thickness = 0.5
867
+ hpxml_bldg.foundation_walls[0].thickness = 72.0
868
+ hpxml_bldg.windows[0].overhangs_depth = 120.0
869
+ hpxml_bldg.windows[0].overhangs_distance_to_top_of_window = 24.0
870
+ hpxml_bldg.windows[0].overhangs_distance_to_bottom_of_window = 48.0
786
871
  else
787
872
  fail "Unhandled case: #{warning_case}."
788
873
  end
789
874
 
790
- hpxml_doc = hpxml.to_oga()
875
+ hpxml_doc = hpxml.to_doc()
791
876
 
792
877
  # Test against schematron
793
878
  XMLHelper.write_file(hpxml_doc, @tmp_hpxml_path)
@@ -812,7 +897,12 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
812
897
  'emissions-wrong-filename' => ["Emissions File file path 'invalid-wrong-filename.csv' does not exist."],
813
898
  'emissions-wrong-rows' => ['Emissions File has invalid number of rows'],
814
899
  'heat-pump-backup-system-load-fraction' => ['Heat pump backup system cannot have a fraction heat load served specified.'],
815
- 'heat-pump-switchover-temp-elec-backup' => ['Switchover temperature should not be used for a heat pump with electric backup; use compressor lockout temperature instead.'],
900
+ 'hvac-cooling-detailed-performance-incomplete-pair' => ['Cooling detailed performance data for outdoor temperature = 82.0 is incomplete; there must be exactly one minimum and one maximum capacity datapoint.',
901
+ 'Cooling detailed performance data for outdoor temperature = 81.0 is incomplete; there must be exactly one minimum and one maximum capacity datapoint.'],
902
+ 'hvac-heating-detailed-performance-incomplete-pair' => ['Heating detailed performance data for outdoor temperature = 5.0 is incomplete; there must be exactly one minimum and one maximum capacity datapoint.',
903
+ 'Heating detailed performance data for outdoor temperature = 4.0 is incomplete; there must be exactly one minimum and one maximum capacity datapoint.'],
904
+ 'heat-pump-switchover-temp-elec-backup' => ['Switchover temperature should only be used for a heat pump with fossil fuel backup; use compressor lockout temperature instead.'],
905
+ 'heat-pump-lockout-temps-elec-backup' => ['Similar compressor/backup lockout temperatures should only be used for a heat pump with fossil fuel backup.'],
816
906
  'hvac-distribution-multiple-attached-cooling' => ["Multiple cooling systems found attached to distribution system 'HVACDistribution2'."],
817
907
  'hvac-distribution-multiple-attached-heating' => ["Multiple heating systems found attached to distribution system 'HVACDistribution1'."],
818
908
  'hvac-dse-multiple-attached-cooling' => ["Multiple cooling systems found attached to distribution system 'HVACDistribution1'."],
@@ -872,362 +962,407 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
872
962
  'unattached-shared-dishwasher-dhw-distribution' => ["Attached hot water distribution 'foobar' not found for dishwasher"],
873
963
  'unattached-shared-dishwasher-water-heater' => ["Attached water heating system 'foobar' not found for dishwasher"],
874
964
  'unattached-window' => ["Attached wall 'foobar' not found for window 'Window1'."],
875
- 'unavailable-period-missing-column' => ["Could not find column='foobar' in unavailable_periods.csv."] }
965
+ 'unavailable-period-missing-column' => ["Could not find column='foobar' in unavailable_periods.csv."],
966
+ 'unique-objects-vary-across-units-epw' => ['Weather station EPW filepath has different values across dwelling units.'],
967
+ 'unique-objects-vary-across-units-dst' => ['Unique object (OS:RunPeriodControl:DaylightSavingTime) has different values across dwelling units.'],
968
+ 'unique-objects-vary-across-units-tmains' => ['Unique object (OS:Site:WaterMainsTemperature) has different values across dwelling units.'],
969
+ 'whole-mf-building-batteries' => ['Modeling batteries for whole SFA/MF buildings is not currently supported.'],
970
+ 'whole-mf-building-dehumidifiers-unit-multiplier' => ['NumberofUnits greater than 1 is not supported for dehumidifiers.'],
971
+ 'whole-mf-building-gshps-unit-multiplier' => ['NumberofUnits greater than 1 is not supported for ground-to-air heat pumps.'] }
876
972
 
877
973
  all_expected_errors.each_with_index do |(error_case, expected_errors), i|
878
974
  puts "[#{i + 1}/#{all_expected_errors.size}] Testing #{error_case}..."
975
+ building_id = nil
879
976
  # Create HPXML object
880
977
  if ['battery-bad-values-max-not-one'].include? error_case
881
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-battery-scheduled.xml'))
882
- csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml.header.schedules_filepaths[0]))
978
+ hpxml, hpxml_bldg = _create_hpxml('base-battery-scheduled.xml')
979
+ csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml_bldg.header.schedules_filepaths[0]))
883
980
  csv_data[1][0] = 1.1
884
981
  File.write(@tmp_csv_path, csv_data.map(&:to_csv).join)
885
- hpxml.header.schedules_filepaths = [@tmp_csv_path]
982
+ hpxml_bldg.header.schedules_filepaths = [@tmp_csv_path]
886
983
  elsif ['battery-bad-values-min-not-neg-one'].include? error_case
887
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-battery-scheduled.xml'))
888
- csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml.header.schedules_filepaths[0]))
984
+ hpxml, hpxml_bldg = _create_hpxml('base-battery-scheduled.xml')
985
+ csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml_bldg.header.schedules_filepaths[0]))
889
986
  csv_data[1][0] = -1.1
890
987
  File.write(@tmp_csv_path, csv_data.map(&:to_csv).join)
891
- hpxml.header.schedules_filepaths = [@tmp_csv_path]
988
+ hpxml_bldg.header.schedules_filepaths = [@tmp_csv_path]
892
989
  elsif ['cfis-with-hydronic-distribution'].include? error_case
893
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-boiler-gas-only.xml'))
894
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
895
- fan_type: HPXML::MechVentTypeCFIS,
896
- used_for_whole_building_ventilation: true,
897
- distribution_system_idref: hpxml.hvac_distributions[0].id)
990
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-boiler-gas-only.xml')
991
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
992
+ fan_type: HPXML::MechVentTypeCFIS,
993
+ used_for_whole_building_ventilation: true,
994
+ distribution_system_idref: hpxml_bldg.hvac_distributions[0].id)
898
995
  elsif ['cfis-invalid-supplemental-fan'].include? error_case
899
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-mechvent-cfis-supplemental-fan-exhaust.xml'))
900
- suppl_fan = hpxml.ventilation_fans.find { |f| f.is_cfis_supplemental_fan? }
996
+ hpxml, hpxml_bldg = _create_hpxml('base-mechvent-cfis-supplemental-fan-exhaust.xml')
997
+ suppl_fan = hpxml_bldg.ventilation_fans.find { |f| f.is_cfis_supplemental_fan? }
901
998
  suppl_fan.fan_type = HPXML::MechVentTypeBalanced
902
999
  elsif ['cfis-invalid-supplemental-fan2'].include? error_case
903
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-mechvent-cfis-supplemental-fan-exhaust.xml'))
904
- suppl_fan = hpxml.ventilation_fans.find { |f| f.is_cfis_supplemental_fan? }
1000
+ hpxml, hpxml_bldg = _create_hpxml('base-mechvent-cfis-supplemental-fan-exhaust.xml')
1001
+ suppl_fan = hpxml_bldg.ventilation_fans.find { |f| f.is_cfis_supplemental_fan? }
905
1002
  suppl_fan.used_for_whole_building_ventilation = false
906
1003
  suppl_fan.used_for_garage_ventilation = true
907
1004
  elsif ['cfis-invalid-supplemental-fan3'].include? error_case
908
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-mechvent-cfis-supplemental-fan-exhaust.xml'))
909
- suppl_fan = hpxml.ventilation_fans.find { |f| f.is_cfis_supplemental_fan? }
1005
+ hpxml, hpxml_bldg = _create_hpxml('base-mechvent-cfis-supplemental-fan-exhaust.xml')
1006
+ suppl_fan = hpxml_bldg.ventilation_fans.find { |f| f.is_cfis_supplemental_fan? }
910
1007
  suppl_fan.is_shared_system = true
911
1008
  suppl_fan.fraction_recirculation = 0.0
912
1009
  suppl_fan.in_unit_flow_rate = suppl_fan.tested_flow_rate / 2.0
913
1010
  elsif ['cfis-invalid-supplemental-fan4'].include? error_case
914
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-mechvent-cfis-supplemental-fan-exhaust.xml'))
915
- suppl_fan = hpxml.ventilation_fans.find { |f| f.is_cfis_supplemental_fan? }
1011
+ hpxml, hpxml_bldg = _create_hpxml('base-mechvent-cfis-supplemental-fan-exhaust.xml')
1012
+ suppl_fan = hpxml_bldg.ventilation_fans.find { |f| f.is_cfis_supplemental_fan? }
916
1013
  suppl_fan.hours_in_operation = 12.0
917
1014
  elsif ['dehumidifier-setpoints'].include? error_case
918
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-appliances-dehumidifier-multiple.xml'))
919
- hpxml.dehumidifiers[-1].rh_setpoint = 0.55
1015
+ hpxml, hpxml_bldg = _create_hpxml('base-appliances-dehumidifier-multiple.xml')
1016
+ hpxml_bldg.dehumidifiers[-1].rh_setpoint = 0.55
920
1017
  elsif ['desuperheater-with-detailed-setpoints'].include? error_case
921
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-dhw-tank-detailed-setpoints.xml'))
922
- hpxml.water_heating_systems[0].uses_desuperheater = true
923
- hpxml.water_heating_systems[0].related_hvac_idref = hpxml.cooling_systems[0].id
1018
+ hpxml, hpxml_bldg = _create_hpxml('base-dhw-tank-detailed-setpoints.xml')
1019
+ hpxml_bldg.water_heating_systems[0].uses_desuperheater = true
1020
+ hpxml_bldg.water_heating_systems[0].related_hvac_idref = hpxml_bldg.cooling_systems[0].id
924
1021
  elsif ['duplicate-id'].include? error_case
925
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
926
- hpxml.plug_loads[-1].id = hpxml.plug_loads[0].id
1022
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
1023
+ hpxml_bldg.plug_loads[-1].id = hpxml_bldg.plug_loads[0].id
927
1024
  elsif ['emissions-duplicate-names'].include? error_case
928
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-misc-emissions.xml'))
1025
+ hpxml, _hpxml_bldg = _create_hpxml('base-misc-emissions.xml')
929
1026
  hpxml.header.emissions_scenarios << hpxml.header.emissions_scenarios[0].dup
930
1027
  elsif ['emissions-wrong-columns'].include? error_case
931
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-misc-emissions.xml'))
1028
+ hpxml, _hpxml_bldg = _create_hpxml('base-misc-emissions.xml')
932
1029
  scenario = hpxml.header.emissions_scenarios[1]
933
1030
  csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), scenario.elec_schedule_filepath))
934
1031
  csv_data[10] = [431.0] * (scenario.elec_schedule_column_number - 1)
935
1032
  File.write(@tmp_csv_path, csv_data.map(&:to_csv).join)
936
1033
  hpxml.header.emissions_scenarios[1].elec_schedule_filepath = @tmp_csv_path
937
1034
  elsif ['emissions-wrong-filename'].include? error_case
938
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-misc-emissions.xml'))
1035
+ hpxml, _hpxml_bldg = _create_hpxml('base-misc-emissions.xml')
939
1036
  hpxml.header.emissions_scenarios[1].elec_schedule_filepath = 'invalid-wrong-filename.csv'
940
1037
  elsif ['emissions-wrong-rows'].include? error_case
941
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-misc-emissions.xml'))
1038
+ hpxml, _hpxml_bldg = _create_hpxml('base-misc-emissions.xml')
942
1039
  scenario = hpxml.header.emissions_scenarios[1]
943
1040
  csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), scenario.elec_schedule_filepath))
944
1041
  File.write(@tmp_csv_path, csv_data[0..-2].map(&:to_csv).join)
945
1042
  hpxml.header.emissions_scenarios[1].elec_schedule_filepath = @tmp_csv_path
946
1043
  elsif ['heat-pump-backup-system-load-fraction'].include? error_case
947
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-air-to-air-heat-pump-var-speed-backup-boiler.xml'))
948
- hpxml.heating_systems[0].fraction_heat_load_served = 0.5
949
- hpxml.heat_pumps[0].fraction_heat_load_served = 0.5
1044
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-air-to-air-heat-pump-var-speed-backup-boiler.xml')
1045
+ hpxml_bldg.heating_systems[0].fraction_heat_load_served = 0.5
1046
+ hpxml_bldg.heat_pumps[0].fraction_heat_load_served = 0.5
950
1047
  elsif ['heat-pump-switchover-temp-elec-backup'].include? error_case
951
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-air-to-air-heat-pump-1-speed.xml'))
952
- hpxml.heat_pumps[0].backup_heating_switchover_temp = 35.0
1048
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-air-to-air-heat-pump-1-speed.xml')
1049
+ hpxml_bldg.heat_pumps[0].backup_heating_switchover_temp = 35.0
1050
+ elsif ['hvac-cooling-detailed-performance-incomplete-pair'].include? error_case
1051
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-air-to-air-heat-pump-var-speed-detailed-performance.xml')
1052
+ hpxml_bldg.heat_pumps[0].cooling_detailed_performance_data[-1].outdoor_temperature -= 1.0
1053
+ elsif ['hvac-heating-detailed-performance-incomplete-pair'].include? error_case
1054
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-air-to-air-heat-pump-var-speed-detailed-performance.xml')
1055
+ hpxml_bldg.heat_pumps[0].heating_detailed_performance_data[-1].outdoor_temperature -= 1.0
1056
+ elsif ['heat-pump-lockout-temps-elec-backup'].include? error_case
1057
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-air-to-air-heat-pump-1-speed.xml')
1058
+ hpxml_bldg.heat_pumps[0].compressor_lockout_temp = 35.0
1059
+ hpxml_bldg.heat_pumps[0].backup_heating_lockout_temp = 35.0
953
1060
  elsif ['hvac-invalid-distribution-system-type'].include? error_case
954
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
955
- hpxml.hvac_distributions.add(id: "HVACDistribution#{hpxml.hvac_distributions.size + 1}",
956
- distribution_system_type: HPXML::HVACDistributionTypeHydronic,
957
- hydronic_type: HPXML::HydronicTypeBaseboard)
958
- hpxml.heating_systems[-1].distribution_system_idref = hpxml.hvac_distributions[-1].id
1061
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
1062
+ hpxml_bldg.hvac_distributions.add(id: "HVACDistribution#{hpxml_bldg.hvac_distributions.size + 1}",
1063
+ distribution_system_type: HPXML::HVACDistributionTypeHydronic,
1064
+ hydronic_type: HPXML::HydronicTypeBaseboard)
1065
+ hpxml_bldg.heating_systems[-1].distribution_system_idref = hpxml_bldg.hvac_distributions[-1].id
959
1066
  elsif ['hvac-distribution-multiple-attached-cooling'].include? error_case
960
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-multiple.xml'))
961
- hpxml.heat_pumps[0].distribution_system_idref = 'HVACDistribution2'
1067
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-multiple.xml')
1068
+ hpxml_bldg.heat_pumps[0].distribution_system_idref = 'HVACDistribution2'
962
1069
  elsif ['hvac-distribution-multiple-attached-heating'].include? error_case
963
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-multiple.xml'))
964
- hpxml.heat_pumps[0].distribution_system_idref = 'HVACDistribution1'
1070
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-multiple.xml')
1071
+ hpxml_bldg.heat_pumps[0].distribution_system_idref = 'HVACDistribution1'
965
1072
  elsif ['hvac-dse-multiple-attached-cooling'].include? error_case
966
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-dse.xml'))
967
- hpxml.cooling_systems[0].fraction_cool_load_served = 0.5
968
- hpxml.cooling_systems << hpxml.cooling_systems[0].dup
969
- hpxml.cooling_systems[1].id = "CoolingSystem#{hpxml.cooling_systems.size}"
970
- hpxml.cooling_systems[0].primary_system = false
1073
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-dse.xml')
1074
+ hpxml_bldg.cooling_systems[0].fraction_cool_load_served = 0.5
1075
+ hpxml_bldg.cooling_systems << hpxml_bldg.cooling_systems[0].dup
1076
+ hpxml_bldg.cooling_systems[1].id = "CoolingSystem#{hpxml_bldg.cooling_systems.size}"
1077
+ hpxml_bldg.cooling_systems[0].primary_system = false
971
1078
  elsif ['hvac-dse-multiple-attached-heating'].include? error_case
972
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-dse.xml'))
973
- hpxml.heating_systems[0].fraction_heat_load_served = 0.5
974
- hpxml.heating_systems << hpxml.heating_systems[0].dup
975
- hpxml.heating_systems[1].id = "HeatingSystem#{hpxml.heating_systems.size}"
976
- hpxml.heating_systems[0].primary_system = false
1079
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-dse.xml')
1080
+ hpxml_bldg.heating_systems[0].fraction_heat_load_served = 0.5
1081
+ hpxml_bldg.heating_systems << hpxml_bldg.heating_systems[0].dup
1082
+ hpxml_bldg.heating_systems[1].id = "HeatingSystem#{hpxml_bldg.heating_systems.size}"
1083
+ hpxml_bldg.heating_systems[0].primary_system = false
977
1084
  elsif ['hvac-inconsistent-fan-powers'].include? error_case
978
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
979
- hpxml.cooling_systems[0].fan_watts_per_cfm = 0.55
980
- hpxml.heating_systems[0].fan_watts_per_cfm = 0.45
1085
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
1086
+ hpxml_bldg.cooling_systems[0].fan_watts_per_cfm = 0.55
1087
+ hpxml_bldg.heating_systems[0].fan_watts_per_cfm = 0.45
981
1088
  elsif ['hvac-shared-boiler-multiple'].include? error_case
982
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-bldgtype-multifamily-shared-boiler-only-baseboard.xml'))
983
- hpxml.hvac_distributions << hpxml.hvac_distributions[0].dup
984
- hpxml.hvac_distributions[-1].id = "HVACDistribution#{hpxml.hvac_distributions.size}"
985
- hpxml.heating_systems[0].fraction_heat_load_served = 0.5
986
- hpxml.heating_systems[0].primary_system = false
987
- hpxml.heating_systems << hpxml.heating_systems[0].dup
988
- hpxml.heating_systems[1].id = "HeatingSystem#{hpxml.heating_systems.size}"
989
- hpxml.heating_systems[1].distribution_system_idref = hpxml.hvac_distributions[-1].id
990
- hpxml.heating_systems[1].primary_system = true
1089
+ hpxml, hpxml_bldg = _create_hpxml('base-bldgtype-mf-unit-shared-boiler-only-baseboard.xml')
1090
+ hpxml_bldg.hvac_distributions << hpxml_bldg.hvac_distributions[0].dup
1091
+ hpxml_bldg.hvac_distributions[-1].id = "HVACDistribution#{hpxml_bldg.hvac_distributions.size}"
1092
+ hpxml_bldg.heating_systems[0].fraction_heat_load_served = 0.5
1093
+ hpxml_bldg.heating_systems[0].primary_system = false
1094
+ hpxml_bldg.heating_systems << hpxml_bldg.heating_systems[0].dup
1095
+ hpxml_bldg.heating_systems[1].id = "HeatingSystem#{hpxml_bldg.heating_systems.size}"
1096
+ hpxml_bldg.heating_systems[1].distribution_system_idref = hpxml_bldg.hvac_distributions[-1].id
1097
+ hpxml_bldg.heating_systems[1].primary_system = true
991
1098
  elsif ['hvac-shared-chiller-multiple'].include? error_case
992
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-bldgtype-multifamily-shared-chiller-only-baseboard.xml'))
993
- hpxml.hvac_distributions << hpxml.hvac_distributions[0].dup
994
- hpxml.hvac_distributions[-1].id = "HVACDistribution#{hpxml.hvac_distributions.size}"
995
- hpxml.cooling_systems[0].fraction_cool_load_served = 0.5
996
- hpxml.cooling_systems[0].primary_system = false
997
- hpxml.cooling_systems << hpxml.cooling_systems[0].dup
998
- hpxml.cooling_systems[1].id = "CoolingSystem#{hpxml.cooling_systems.size}"
999
- hpxml.cooling_systems[1].distribution_system_idref = hpxml.hvac_distributions[-1].id
1000
- hpxml.cooling_systems[1].primary_system = true
1099
+ hpxml, hpxml_bldg = _create_hpxml('base-bldgtype-mf-unit-shared-chiller-only-baseboard.xml')
1100
+ hpxml_bldg.hvac_distributions << hpxml_bldg.hvac_distributions[0].dup
1101
+ hpxml_bldg.hvac_distributions[-1].id = "HVACDistribution#{hpxml_bldg.hvac_distributions.size}"
1102
+ hpxml_bldg.cooling_systems[0].fraction_cool_load_served = 0.5
1103
+ hpxml_bldg.cooling_systems[0].primary_system = false
1104
+ hpxml_bldg.cooling_systems << hpxml_bldg.cooling_systems[0].dup
1105
+ hpxml_bldg.cooling_systems[1].id = "CoolingSystem#{hpxml_bldg.cooling_systems.size}"
1106
+ hpxml_bldg.cooling_systems[1].distribution_system_idref = hpxml_bldg.hvac_distributions[-1].id
1107
+ hpxml_bldg.cooling_systems[1].primary_system = true
1001
1108
  elsif ['hvac-shared-chiller-negative-seer-eq'].include? error_case
1002
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-bldgtype-multifamily-shared-chiller-only-baseboard.xml'))
1003
- hpxml.cooling_systems[0].shared_loop_watts *= 100.0
1109
+ hpxml, hpxml_bldg = _create_hpxml('base-bldgtype-mf-unit-shared-chiller-only-baseboard.xml')
1110
+ hpxml_bldg.cooling_systems[0].shared_loop_watts *= 100.0
1004
1111
  elsif ['invalid-battery-capacity-units'].include? error_case
1005
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-pv-battery.xml'))
1006
- hpxml.batteries[0].usable_capacity_kwh = nil
1007
- hpxml.batteries[0].usable_capacity_ah = 200.0
1112
+ hpxml, hpxml_bldg = _create_hpxml('base-pv-battery.xml')
1113
+ hpxml_bldg.batteries[0].usable_capacity_kwh = nil
1114
+ hpxml_bldg.batteries[0].usable_capacity_ah = 200.0
1008
1115
  elsif ['invalid-battery-capacity-units2'].include? error_case
1009
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-pv-battery-ah.xml'))
1010
- hpxml.batteries[0].usable_capacity_kwh = 10.0
1011
- hpxml.batteries[0].usable_capacity_ah = nil
1116
+ hpxml, hpxml_bldg = _create_hpxml('base-pv-battery-ah.xml')
1117
+ hpxml_bldg.batteries[0].usable_capacity_kwh = 10.0
1118
+ hpxml_bldg.batteries[0].usable_capacity_ah = nil
1012
1119
  elsif ['invalid-datatype-boolean'].include? error_case
1013
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1120
+ hpxml, _hpxml_bldg = _create_hpxml('base.xml')
1014
1121
  elsif ['invalid-datatype-integer'].include? error_case
1015
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1122
+ hpxml, _hpxml_bldg = _create_hpxml('base.xml')
1016
1123
  elsif ['invalid-datatype-float'].include? error_case
1017
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1124
+ hpxml, _hpxml_bldg = _create_hpxml('base.xml')
1018
1125
  elsif ['invalid-daylight-saving'].include? error_case
1019
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-simcontrol-daylight-saving-custom.xml'))
1020
- hpxml.header.dst_begin_month = 3
1021
- hpxml.header.dst_begin_day = 10
1022
- hpxml.header.dst_end_month = 4
1023
- hpxml.header.dst_end_day = 31
1126
+ hpxml, hpxml_bldg = _create_hpxml('base-simcontrol-daylight-saving-custom.xml')
1127
+ hpxml_bldg.dst_begin_month = 3
1128
+ hpxml_bldg.dst_begin_day = 10
1129
+ hpxml_bldg.dst_end_month = 4
1130
+ hpxml_bldg.dst_end_day = 31
1024
1131
  elsif ['invalid-distribution-cfa-served'].include? error_case
1025
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1026
- hpxml.hvac_distributions[-1].conditioned_floor_area_served = 2701.1
1132
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
1133
+ hpxml_bldg.hvac_distributions[-1].conditioned_floor_area_served = 2701.1
1027
1134
  elsif ['invalid-epw-filepath'].include? error_case
1028
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1029
- hpxml.climate_and_risk_zones.weather_station_epw_filepath = 'foo.epw'
1135
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
1136
+ hpxml_bldg.climate_and_risk_zones.weather_station_epw_filepath = 'foo.epw'
1030
1137
  elsif ['invalid-id'].include? error_case
1031
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-enclosure-skylights.xml'))
1032
- hpxml.skylights[0].id = ''
1138
+ hpxml, hpxml_bldg = _create_hpxml('base-enclosure-skylights.xml')
1139
+ hpxml_bldg.skylights[0].id = ''
1033
1140
  elsif ['invalid-neighbor-shading-azimuth'].include? error_case
1034
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-misc-neighbor-shading.xml'))
1035
- hpxml.neighbor_buildings[0].azimuth = 145
1141
+ hpxml, hpxml_bldg = _create_hpxml('base-misc-neighbor-shading.xml')
1142
+ hpxml_bldg.neighbor_buildings[0].azimuth = 145
1036
1143
  elsif ['invalid-relatedhvac-dhw-indirect'].include? error_case
1037
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-dhw-indirect.xml'))
1038
- hpxml.water_heating_systems[0].related_hvac_idref = 'HeatingSystem_bad'
1144
+ hpxml, hpxml_bldg = _create_hpxml('base-dhw-indirect.xml')
1145
+ hpxml_bldg.water_heating_systems[0].related_hvac_idref = 'HeatingSystem_bad'
1039
1146
  elsif ['invalid-relatedhvac-desuperheater'].include? error_case
1040
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-central-ac-only-1-speed.xml'))
1041
- hpxml.water_heating_systems[0].uses_desuperheater = true
1042
- hpxml.water_heating_systems[0].related_hvac_idref = 'CoolingSystem_bad'
1147
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-central-ac-only-1-speed.xml')
1148
+ hpxml_bldg.water_heating_systems[0].uses_desuperheater = true
1149
+ hpxml_bldg.water_heating_systems[0].related_hvac_idref = 'CoolingSystem_bad'
1043
1150
  elsif ['invalid-runperiod'].include? error_case
1044
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1151
+ hpxml, _hpxml_bldg = _create_hpxml('base.xml')
1045
1152
  hpxml.header.sim_begin_month = 3
1046
1153
  hpxml.header.sim_begin_day = 10
1047
1154
  hpxml.header.sim_end_month = 4
1048
1155
  hpxml.header.sim_end_day = 31
1049
1156
  elsif ['invalid-shading-season'].include? error_case
1050
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1051
- hpxml.header.shading_summer_begin_month = 3
1052
- hpxml.header.shading_summer_begin_day = 10
1053
- hpxml.header.shading_summer_end_month = 4
1054
- hpxml.header.shading_summer_end_day = 31
1157
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
1158
+ hpxml_bldg.header.shading_summer_begin_month = 3
1159
+ hpxml_bldg.header.shading_summer_begin_day = 10
1160
+ hpxml_bldg.header.shading_summer_end_month = 4
1161
+ hpxml_bldg.header.shading_summer_end_day = 31
1055
1162
  elsif ['invalid-unavailable-period'].include? error_case
1056
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1163
+ hpxml, _hpxml_bldg = _create_hpxml('base.xml')
1057
1164
  hpxml.header.unavailable_periods.add(column_name: 'Power Outage',
1058
1165
  begin_month: 3,
1059
1166
  begin_day: 10,
1060
1167
  end_month: 4,
1061
1168
  end_day: 31)
1062
1169
  elsif ['invalid-schema-version'].include? error_case
1063
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1170
+ hpxml, _hpxml_bldg = _create_hpxml('base.xml')
1064
1171
  elsif ['invalid-skylights-physical-properties'].include? error_case
1065
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-enclosure-skylights-physical-properties.xml'))
1066
- hpxml.skylights[1].thermal_break = false
1172
+ hpxml, hpxml_bldg = _create_hpxml('base-enclosure-skylights-physical-properties.xml')
1173
+ hpxml_bldg.skylights[1].thermal_break = false
1067
1174
  elsif ['invalid-windows-physical-properties'].include? error_case
1068
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-enclosure-windows-physical-properties.xml'))
1069
- hpxml.windows[2].thermal_break = false
1175
+ hpxml, hpxml_bldg = _create_hpxml('base-enclosure-windows-physical-properties.xml')
1176
+ hpxml_bldg.windows[2].thermal_break = false
1070
1177
  elsif ['inverter-unequal-efficiencies'].include? error_case
1071
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-pv.xml'))
1072
- hpxml.inverters.add(id: 'Inverter2',
1073
- inverter_efficiency: 0.5)
1074
- hpxml.pv_systems[1].inverter_idref = hpxml.inverters[-1].id
1178
+ hpxml, hpxml_bldg = _create_hpxml('base-pv.xml')
1179
+ hpxml_bldg.inverters.add(id: 'Inverter2',
1180
+ inverter_efficiency: 0.5)
1181
+ hpxml_bldg.pv_systems[1].inverter_idref = hpxml_bldg.inverters[-1].id
1075
1182
  elsif ['leap-year-TMY'].include? error_case
1076
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-simcontrol-calendar-year-custom.xml'))
1183
+ hpxml, _hpxml_bldg = _create_hpxml('base-simcontrol-calendar-year-custom.xml')
1077
1184
  hpxml.header.sim_calendar_year = 2008
1078
1185
  elsif ['net-area-negative-roof'].include? error_case
1079
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-enclosure-skylights.xml'))
1080
- hpxml.skylights[0].area = 4000
1186
+ hpxml, hpxml_bldg = _create_hpxml('base-enclosure-skylights.xml')
1187
+ hpxml_bldg.skylights[0].area = 4000
1081
1188
  elsif ['net-area-negative-wall'].include? error_case
1082
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1083
- hpxml.windows[0].area = 1000
1189
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
1190
+ hpxml_bldg.windows[0].area = 1000
1084
1191
  elsif ['orphaned-hvac-distribution'].include? error_case
1085
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-furnace-gas-room-ac.xml'))
1086
- hpxml.heating_systems[0].delete
1087
- hpxml.hvac_controls[0].heating_setpoint_temp = nil
1192
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-furnace-gas-room-ac.xml')
1193
+ hpxml_bldg.heating_systems[0].delete
1194
+ hpxml_bldg.hvac_controls[0].heating_setpoint_temp = nil
1088
1195
  elsif ['refrigerators-multiple-primary'].include? error_case
1089
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-misc-loads-large-uncommon.xml'))
1090
- hpxml.refrigerators[1].primary_indicator = true
1196
+ hpxml, hpxml_bldg = _create_hpxml('base-misc-loads-large-uncommon.xml')
1197
+ hpxml_bldg.refrigerators[1].primary_indicator = true
1091
1198
  elsif ['refrigerators-no-primary'].include? error_case
1092
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-misc-loads-large-uncommon.xml'))
1093
- hpxml.refrigerators[0].primary_indicator = false
1199
+ hpxml, hpxml_bldg = _create_hpxml('base-misc-loads-large-uncommon.xml')
1200
+ hpxml_bldg.refrigerators[0].primary_indicator = false
1094
1201
  elsif ['repeated-relatedhvac-dhw-indirect'].include? error_case
1095
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-dhw-indirect.xml'))
1096
- hpxml.water_heating_systems[0].fraction_dhw_load_served = 0.5
1097
- hpxml.water_heating_systems << hpxml.water_heating_systems[0].dup
1098
- hpxml.water_heating_systems[1].id = "WaterHeatingSystem#{hpxml.water_heating_systems.size}"
1202
+ hpxml, hpxml_bldg = _create_hpxml('base-dhw-indirect.xml')
1203
+ hpxml_bldg.water_heating_systems[0].fraction_dhw_load_served = 0.5
1204
+ hpxml_bldg.water_heating_systems << hpxml_bldg.water_heating_systems[0].dup
1205
+ hpxml_bldg.water_heating_systems[1].id = "WaterHeatingSystem#{hpxml_bldg.water_heating_systems.size}"
1099
1206
  elsif ['repeated-relatedhvac-desuperheater'].include? error_case
1100
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-central-ac-only-1-speed.xml'))
1101
- hpxml.water_heating_systems[0].fraction_dhw_load_served = 0.5
1102
- hpxml.water_heating_systems[0].uses_desuperheater = true
1103
- hpxml.water_heating_systems[0].related_hvac_idref = 'CoolingSystem1'
1104
- hpxml.water_heating_systems << hpxml.water_heating_systems[0].dup
1105
- hpxml.water_heating_systems[1].id = "WaterHeatingSystem#{hpxml.water_heating_systems.size}"
1207
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-central-ac-only-1-speed.xml')
1208
+ hpxml_bldg.water_heating_systems[0].fraction_dhw_load_served = 0.5
1209
+ hpxml_bldg.water_heating_systems[0].uses_desuperheater = true
1210
+ hpxml_bldg.water_heating_systems[0].related_hvac_idref = 'CoolingSystem1'
1211
+ hpxml_bldg.water_heating_systems << hpxml_bldg.water_heating_systems[0].dup
1212
+ hpxml_bldg.water_heating_systems[1].id = "WaterHeatingSystem#{hpxml_bldg.water_heating_systems.size}"
1106
1213
  elsif ['schedule-detailed-bad-values-max-not-one'].include? error_case
1107
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-schedules-detailed-occupancy-stochastic.xml'))
1108
- csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml.header.schedules_filepaths[0]))
1214
+ hpxml, hpxml_bldg = _create_hpxml('base-schedules-detailed-occupancy-stochastic.xml')
1215
+ csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml_bldg.header.schedules_filepaths[0]))
1109
1216
  csv_data[1][1] = 1.1
1110
1217
  File.write(@tmp_csv_path, csv_data.map(&:to_csv).join)
1111
- hpxml.header.schedules_filepaths = [@tmp_csv_path]
1218
+ hpxml_bldg.header.schedules_filepaths = [@tmp_csv_path]
1112
1219
  elsif ['schedule-detailed-bad-values-negative'].include? error_case
1113
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-schedules-detailed-occupancy-stochastic.xml'))
1114
- csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml.header.schedules_filepaths[0]))
1220
+ hpxml, hpxml_bldg = _create_hpxml('base-schedules-detailed-occupancy-stochastic.xml')
1221
+ csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml_bldg.header.schedules_filepaths[0]))
1115
1222
  csv_data[1][1] = -0.5
1116
1223
  File.write(@tmp_csv_path, csv_data.map(&:to_csv).join)
1117
- hpxml.header.schedules_filepaths = [@tmp_csv_path]
1224
+ hpxml_bldg.header.schedules_filepaths = [@tmp_csv_path]
1118
1225
  elsif ['schedule-detailed-bad-values-non-numeric'].include? error_case
1119
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-schedules-detailed-occupancy-stochastic.xml'))
1120
- csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml.header.schedules_filepaths[0]))
1226
+ hpxml, hpxml_bldg = _create_hpxml('base-schedules-detailed-occupancy-stochastic.xml')
1227
+ csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml_bldg.header.schedules_filepaths[0]))
1121
1228
  csv_data[1][1] = 'NA'
1122
1229
  File.write(@tmp_csv_path, csv_data.map(&:to_csv).join)
1123
- hpxml.header.schedules_filepaths = [@tmp_csv_path]
1230
+ hpxml_bldg.header.schedules_filepaths = [@tmp_csv_path]
1124
1231
  elsif ['schedule-detailed-bad-values-mode-negative'].include? error_case
1125
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-dhw-tank-heat-pump-detailed-schedules.xml'))
1126
- csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml.header.schedules_filepaths[1]))
1232
+ hpxml, hpxml_bldg = _create_hpxml('base-dhw-tank-heat-pump-detailed-schedules.xml')
1233
+ csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml_bldg.header.schedules_filepaths[1]))
1127
1234
  csv_data[1][0] = -0.5
1128
1235
  File.write(@tmp_csv_path, csv_data.map(&:to_csv).join)
1129
- hpxml.header.schedules_filepaths = [@tmp_csv_path]
1236
+ hpxml_bldg.header.schedules_filepaths = [@tmp_csv_path]
1130
1237
  elsif ['schedule-detailed-duplicate-columns'].include? error_case
1131
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-schedules-detailed-occupancy-stochastic.xml'))
1132
- csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml.header.schedules_filepaths[0]))
1238
+ hpxml, hpxml_bldg = _create_hpxml('base-schedules-detailed-occupancy-stochastic.xml')
1239
+ csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml_bldg.header.schedules_filepaths[0]))
1133
1240
  File.write(@tmp_csv_path, csv_data.map(&:to_csv).join)
1134
- hpxml.header.schedules_filepaths = []
1135
- hpxml.header.schedules_filepaths << @tmp_csv_path
1136
- hpxml.header.schedules_filepaths << @tmp_csv_path
1241
+ hpxml_bldg.header.schedules_filepaths = []
1242
+ hpxml_bldg.header.schedules_filepaths << @tmp_csv_path
1243
+ hpxml_bldg.header.schedules_filepaths << @tmp_csv_path
1137
1244
  elsif ['schedule-detailed-wrong-filename'].include? error_case
1138
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1139
- hpxml.header.schedules_filepaths << 'invalid-wrong-filename.csv'
1245
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
1246
+ hpxml_bldg.header.schedules_filepaths << 'invalid-wrong-filename.csv'
1140
1247
  elsif ['schedule-detailed-wrong-rows'].include? error_case
1141
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-schedules-detailed-occupancy-stochastic.xml'))
1142
- csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml.header.schedules_filepaths[0]))
1248
+ hpxml, hpxml_bldg = _create_hpxml('base-schedules-detailed-occupancy-stochastic.xml')
1249
+ csv_data = CSV.read(File.join(File.dirname(hpxml.hpxml_path), hpxml_bldg.header.schedules_filepaths[0]))
1143
1250
  File.write(@tmp_csv_path, csv_data[0..-2].map(&:to_csv).join)
1144
- hpxml.header.schedules_filepaths = [@tmp_csv_path]
1251
+ hpxml_bldg.header.schedules_filepaths = [@tmp_csv_path]
1145
1252
  elsif ['solar-thermal-system-with-combi-tankless'].include? error_case
1146
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-dhw-combi-tankless.xml'))
1147
- hpxml.solar_thermal_systems.add(id: "SolarThermalSystem#{hpxml.solar_thermal_systems.size + 1}",
1148
- system_type: HPXML::SolarThermalSystemType,
1149
- collector_area: 40,
1150
- collector_type: HPXML::SolarThermalTypeSingleGlazing,
1151
- collector_loop_type: HPXML::SolarThermalLoopTypeIndirect,
1152
- collector_azimuth: 180,
1153
- collector_tilt: 20,
1154
- collector_frta: 0.77,
1155
- collector_frul: 0.793,
1156
- water_heating_system_idref: 'WaterHeatingSystem1')
1253
+ hpxml, hpxml_bldg = _create_hpxml('base-dhw-combi-tankless.xml')
1254
+ hpxml_bldg.solar_thermal_systems.add(id: "SolarThermalSystem#{hpxml_bldg.solar_thermal_systems.size + 1}",
1255
+ system_type: HPXML::SolarThermalSystemType,
1256
+ collector_area: 40,
1257
+ collector_type: HPXML::SolarThermalTypeSingleGlazing,
1258
+ collector_loop_type: HPXML::SolarThermalLoopTypeIndirect,
1259
+ collector_azimuth: 180,
1260
+ collector_tilt: 20,
1261
+ collector_frta: 0.77,
1262
+ collector_frul: 0.793,
1263
+ water_heating_system_idref: 'WaterHeatingSystem1')
1157
1264
  elsif ['solar-thermal-system-with-desuperheater'].include? error_case
1158
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-dhw-desuperheater.xml'))
1159
- hpxml.solar_thermal_systems.add(id: "SolarThermalSystem#{hpxml.solar_thermal_systems.size + 1}",
1160
- system_type: HPXML::SolarThermalSystemType,
1161
- collector_area: 40,
1162
- collector_type: HPXML::SolarThermalTypeSingleGlazing,
1163
- collector_loop_type: HPXML::SolarThermalLoopTypeIndirect,
1164
- collector_azimuth: 180,
1165
- collector_tilt: 20,
1166
- collector_frta: 0.77,
1167
- collector_frul: 0.793,
1168
- water_heating_system_idref: 'WaterHeatingSystem1')
1265
+ hpxml, hpxml_bldg = _create_hpxml('base-dhw-desuperheater.xml')
1266
+ hpxml_bldg.solar_thermal_systems.add(id: "SolarThermalSystem#{hpxml_bldg.solar_thermal_systems.size + 1}",
1267
+ system_type: HPXML::SolarThermalSystemType,
1268
+ collector_area: 40,
1269
+ collector_type: HPXML::SolarThermalTypeSingleGlazing,
1270
+ collector_loop_type: HPXML::SolarThermalLoopTypeIndirect,
1271
+ collector_azimuth: 180,
1272
+ collector_tilt: 20,
1273
+ collector_frta: 0.77,
1274
+ collector_frul: 0.793,
1275
+ water_heating_system_idref: 'WaterHeatingSystem1')
1169
1276
  elsif ['solar-thermal-system-with-dhw-indirect'].include? error_case
1170
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-dhw-combi-tankless.xml'))
1171
- hpxml.solar_thermal_systems.add(id: "SolarThermalSystem#{hpxml.solar_thermal_systems.size + 1}",
1172
- system_type: HPXML::SolarThermalSystemType,
1173
- collector_area: 40,
1174
- collector_type: HPXML::SolarThermalTypeSingleGlazing,
1175
- collector_loop_type: HPXML::SolarThermalLoopTypeIndirect,
1176
- collector_azimuth: 180,
1177
- collector_tilt: 20,
1178
- collector_frta: 0.77,
1179
- collector_frul: 0.793,
1180
- water_heating_system_idref: 'WaterHeatingSystem1')
1277
+ hpxml, hpxml_bldg = _create_hpxml('base-dhw-combi-tankless.xml')
1278
+ hpxml_bldg.solar_thermal_systems.add(id: "SolarThermalSystem#{hpxml_bldg.solar_thermal_systems.size + 1}",
1279
+ system_type: HPXML::SolarThermalSystemType,
1280
+ collector_area: 40,
1281
+ collector_type: HPXML::SolarThermalTypeSingleGlazing,
1282
+ collector_loop_type: HPXML::SolarThermalLoopTypeIndirect,
1283
+ collector_azimuth: 180,
1284
+ collector_tilt: 20,
1285
+ collector_frta: 0.77,
1286
+ collector_frul: 0.793,
1287
+ water_heating_system_idref: 'WaterHeatingSystem1')
1181
1288
  elsif ['storm-windows-unexpected-window-ufactor'].include? error_case
1182
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1183
- hpxml.windows[0].storm_type = 'clear'
1289
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
1290
+ hpxml_bldg.windows[0].storm_type = 'clear'
1184
1291
  elsif ['unattached-cfis'].include? error_case
1185
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1186
- hpxml.ventilation_fans.add(id: "VentilationFan#{hpxml.ventilation_fans.size + 1}",
1187
- fan_type: HPXML::MechVentTypeCFIS,
1188
- used_for_whole_building_ventilation: true,
1189
- distribution_system_idref: hpxml.hvac_distributions[0].id)
1190
- hpxml.ventilation_fans[0].distribution_system_idref = 'foobar'
1292
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
1293
+ hpxml_bldg.ventilation_fans.add(id: "VentilationFan#{hpxml_bldg.ventilation_fans.size + 1}",
1294
+ fan_type: HPXML::MechVentTypeCFIS,
1295
+ used_for_whole_building_ventilation: true,
1296
+ distribution_system_idref: hpxml_bldg.hvac_distributions[0].id)
1297
+ hpxml_bldg.ventilation_fans[0].distribution_system_idref = 'foobar'
1191
1298
  elsif ['unattached-door'].include? error_case
1192
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1193
- hpxml.doors[0].wall_idref = 'foobar'
1299
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
1300
+ hpxml_bldg.doors[0].wall_idref = 'foobar'
1194
1301
  elsif ['unattached-hvac-distribution'].include? error_case
1195
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1196
- hpxml.heating_systems[0].distribution_system_idref = 'foobar'
1302
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
1303
+ hpxml_bldg.heating_systems[0].distribution_system_idref = 'foobar'
1197
1304
  elsif ['unattached-pv-system'].include? error_case
1198
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-pv.xml'))
1199
- hpxml.pv_systems[0].inverter_idref = 'foobar'
1305
+ hpxml, hpxml_bldg = _create_hpxml('base-pv.xml')
1306
+ hpxml_bldg.pv_systems[0].inverter_idref = 'foobar'
1200
1307
  elsif ['unattached-skylight'].include? error_case
1201
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-enclosure-skylights.xml'))
1202
- hpxml.skylights[0].roof_idref = 'foobar'
1308
+ hpxml, hpxml_bldg = _create_hpxml('base-enclosure-skylights.xml')
1309
+ hpxml_bldg.skylights[0].roof_idref = 'foobar'
1203
1310
  elsif ['unattached-solar-thermal-system'].include? error_case
1204
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-dhw-solar-indirect-flat-plate.xml'))
1205
- hpxml.solar_thermal_systems[0].water_heating_system_idref = 'foobar'
1311
+ hpxml, hpxml_bldg = _create_hpxml('base-dhw-solar-indirect-flat-plate.xml')
1312
+ hpxml_bldg.solar_thermal_systems[0].water_heating_system_idref = 'foobar'
1206
1313
  elsif ['unattached-shared-clothes-washer-dhw-distribution'].include? error_case
1207
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-bldgtype-multifamily-shared-laundry-room.xml'))
1208
- hpxml.clothes_washers[0].water_heating_system_idref = nil
1209
- hpxml.clothes_washers[0].hot_water_distribution_idref = 'foobar'
1314
+ hpxml, hpxml_bldg = _create_hpxml('base-bldgtype-mf-unit-shared-laundry-room.xml')
1315
+ hpxml_bldg.clothes_washers[0].water_heating_system_idref = nil
1316
+ hpxml_bldg.clothes_washers[0].hot_water_distribution_idref = 'foobar'
1210
1317
  elsif ['unattached-shared-clothes-washer-water-heater'].include? error_case
1211
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-bldgtype-multifamily-shared-laundry-room.xml'))
1212
- hpxml.clothes_washers[0].water_heating_system_idref = 'foobar'
1318
+ hpxml, hpxml_bldg = _create_hpxml('base-bldgtype-mf-unit-shared-laundry-room.xml')
1319
+ hpxml_bldg.clothes_washers[0].water_heating_system_idref = 'foobar'
1213
1320
  elsif ['unattached-shared-dishwasher-dhw-distribution'].include? error_case
1214
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-bldgtype-multifamily-shared-laundry-room.xml'))
1215
- hpxml.dishwashers[0].water_heating_system_idref = nil
1216
- hpxml.dishwashers[0].hot_water_distribution_idref = 'foobar'
1321
+ hpxml, hpxml_bldg = _create_hpxml('base-bldgtype-mf-unit-shared-laundry-room.xml')
1322
+ hpxml_bldg.dishwashers[0].water_heating_system_idref = nil
1323
+ hpxml_bldg.dishwashers[0].hot_water_distribution_idref = 'foobar'
1217
1324
  elsif ['unattached-shared-dishwasher-water-heater'].include? error_case
1218
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-bldgtype-multifamily-shared-laundry-room.xml'))
1219
- hpxml.dishwashers[0].water_heating_system_idref = 'foobar'
1325
+ hpxml, hpxml_bldg = _create_hpxml('base-bldgtype-mf-unit-shared-laundry-room.xml')
1326
+ hpxml_bldg.dishwashers[0].water_heating_system_idref = 'foobar'
1220
1327
  elsif ['unattached-window'].include? error_case
1221
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1222
- hpxml.windows[0].wall_idref = 'foobar'
1328
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
1329
+ hpxml_bldg.windows[0].wall_idref = 'foobar'
1223
1330
  elsif ['unavailable-period-missing-column'].include? error_case
1224
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-schedules-simple-vacancy.xml'))
1331
+ hpxml, _hpxml_bldg = _create_hpxml('base-schedules-simple-vacancy.xml')
1225
1332
  hpxml.header.unavailable_periods[0].column_name = 'foobar'
1333
+ elsif ['unique-objects-vary-across-units-epw'].include? error_case
1334
+ building_id = 'ALL'
1335
+ hpxml, hpxml_bldg = _create_hpxml('base-multiple-sfd-buildings.xml', building_id: building_id)
1336
+ hpxml_bldg.climate_and_risk_zones.weather_station_epw_filepath = 'USA_AZ_Phoenix-Sky.Harbor.Intl.AP.722780_TMY3.epw'
1337
+ elsif ['unique-objects-vary-across-units-dst'].include? error_case
1338
+ building_id = 'ALL'
1339
+ hpxml, hpxml_bldg = _create_hpxml('base-multiple-sfd-buildings.xml', building_id: building_id)
1340
+ hpxml_bldg.dst_begin_month = 3
1341
+ hpxml_bldg.dst_begin_day = 15
1342
+ hpxml_bldg.dst_end_month = 10
1343
+ hpxml_bldg.dst_end_day = 15
1344
+ elsif ['unique-objects-vary-across-units-tmains'].include? error_case
1345
+ building_id = 'ALL'
1346
+ hpxml, hpxml_bldg = _create_hpxml('base-multiple-sfd-buildings.xml', building_id: building_id)
1347
+ hpxml_bldg.hot_water_distributions[0].dwhr_facilities_connected = HPXML::DWHRFacilitiesConnectedOne
1348
+ hpxml_bldg.hot_water_distributions[0].dwhr_equal_flow = true
1349
+ hpxml_bldg.hot_water_distributions[0].dwhr_efficiency = 0.55
1350
+ elsif ['whole-mf-building-batteries'].include? error_case
1351
+ building_id = 'ALL'
1352
+ hpxml, hpxml_bldg = _create_hpxml('base-multiple-sfd-buildings.xml', building_id: building_id)
1353
+ hpxml_bldg.batteries.add(id: 'Battery1',
1354
+ type: HPXML::BatteryTypeLithiumIon)
1355
+ elsif ['whole-mf-building-dehumidifiers-unit-multiplier'].include? error_case
1356
+ hpxml, hpxml_bldg = _create_hpxml('base-appliances-dehumidifier.xml')
1357
+ hpxml_bldg.building_construction.number_of_units = 2
1358
+ elsif ['whole-mf-building-gshps-unit-multiplier'].include? error_case
1359
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-ground-to-air-heat-pump.xml')
1360
+ hpxml_bldg.building_construction.number_of_units = 2
1226
1361
  else
1227
1362
  fail "Unhandled case: #{error_case}."
1228
1363
  end
1229
1364
 
1230
- hpxml_doc = hpxml.to_oga()
1365
+ hpxml_doc = hpxml.to_doc()
1231
1366
 
1232
1367
  # Perform additional raw XML manipulation
1233
1368
  if ['invalid-datatype-boolean'].include? error_case
@@ -1242,13 +1377,16 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
1242
1377
  end
1243
1378
 
1244
1379
  XMLHelper.write_file(hpxml_doc, @tmp_hpxml_path)
1245
- _test_measure('error', expected_errors)
1380
+ _test_measure('error', expected_errors, building_id: building_id)
1246
1381
  end
1247
1382
  end
1248
1383
 
1249
1384
  def test_ruby_warning_messages
1250
1385
  # Test case => Error message
1251
1386
  all_expected_warnings = { 'cfis-undersized-supplemental-fan' => ["CFIS supplemental fan 'VentilationFan2' is undersized (90.0 cfm) compared to the target hourly ventilation rate (110.0 cfm)."],
1387
+ 'duct-lto-cfm25' => ['Ducts are entirely within conditioned space but there is moderate leakage to the outside. Leakage to the outside is typically zero or near-zero in these situations, consider revising leakage values. Leakage will be modeled as heat lost to the ambient environment.'],
1388
+ 'duct-lto-cfm50' => ['Ducts are entirely within conditioned space but there is moderate leakage to the outside. Leakage to the outside is typically zero or near-zero in these situations, consider revising leakage values. Leakage will be modeled as heat lost to the ambient environment.'],
1389
+ 'duct-lto-percent' => ['Ducts are entirely within conditioned space but there is moderate leakage to the outside. Leakage to the outside is typically zero or near-zero in these situations, consider revising leakage values. Leakage will be modeled as heat lost to the ambient environment.'],
1252
1390
  'hvac-setpoint-adjustments' => ['HVAC setpoints have been automatically adjusted to prevent periods where the heating setpoint is greater than the cooling setpoint.'],
1253
1391
  'hvac-setpoint-adjustments-daily-setbacks' => ['HVAC setpoints have been automatically adjusted to prevent periods where the heating setpoint is greater than the cooling setpoint.'],
1254
1392
  'hvac-setpoint-adjustments-daily-schedules' => ['HVAC setpoints have been automatically adjusted to prevent periods where the heating setpoint is greater than the cooling setpoint.'],
@@ -1314,12 +1452,12 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
1314
1452
  "Both 'pool_heater' schedule file and weekday fractions provided; the latter will be ignored.",
1315
1453
  "Both 'pool_heater' schedule file and weekend fractions provided; the latter will be ignored.",
1316
1454
  "Both 'pool_heater' schedule file and monthly multipliers provided; the latter will be ignored.",
1317
- "Both 'hot_tub_pump' schedule file and weekday fractions provided; the latter will be ignored.",
1318
- "Both 'hot_tub_pump' schedule file and weekend fractions provided; the latter will be ignored.",
1319
- "Both 'hot_tub_pump' schedule file and monthly multipliers provided; the latter will be ignored.",
1320
- "Both 'hot_tub_heater' schedule file and weekday fractions provided; the latter will be ignored.",
1321
- "Both 'hot_tub_heater' schedule file and weekend fractions provided; the latter will be ignored.",
1322
- "Both 'hot_tub_heater' schedule file and monthly multipliers provided; the latter will be ignored."],
1455
+ "Both 'permanent_spa_pump' schedule file and weekday fractions provided; the latter will be ignored.",
1456
+ "Both 'permanent_spa_pump' schedule file and weekend fractions provided; the latter will be ignored.",
1457
+ "Both 'permanent_spa_pump' schedule file and monthly multipliers provided; the latter will be ignored.",
1458
+ "Both 'permanent_spa_heater' schedule file and weekday fractions provided; the latter will be ignored.",
1459
+ "Both 'permanent_spa_heater' schedule file and weekend fractions provided; the latter will be ignored.",
1460
+ "Both 'permanent_spa_heater' schedule file and monthly multipliers provided; the latter will be ignored."],
1323
1461
  'schedule-file-and-setpoints' => ["Both 'heating_setpoint' schedule file and heating setpoint temperature provided; the latter will be ignored.",
1324
1462
  "Both 'cooling_setpoint' schedule file and cooling setpoint temperature provided; the latter will be ignored.",
1325
1463
  "Both 'water_heater_setpoint' schedule file and setpoint temperature provided; the latter will be ignored."],
@@ -1327,44 +1465,78 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
1327
1465
 
1328
1466
  all_expected_warnings.each_with_index do |(warning_case, expected_warnings), i|
1329
1467
  puts "[#{i + 1}/#{all_expected_warnings.size}] Testing #{warning_case}..."
1468
+ building_id = nil
1330
1469
  # Create HPXML object
1331
1470
  if ['cfis-undersized-supplemental-fan'].include? warning_case
1332
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-mechvent-cfis-supplemental-fan-exhaust.xml'))
1333
- suppl_fan = hpxml.ventilation_fans.find { |f| f.is_cfis_supplemental_fan? }
1471
+ hpxml, hpxml_bldg = _create_hpxml('base-mechvent-cfis-supplemental-fan-exhaust.xml')
1472
+ suppl_fan = hpxml_bldg.ventilation_fans.find { |f| f.is_cfis_supplemental_fan? }
1334
1473
  suppl_fan.tested_flow_rate = 90.0
1474
+ elsif ['duct-lto-cfm25'].include? warning_case
1475
+ hpxml, hpxml_bldg = _create_hpxml('base-atticroof-conditioned.xml')
1476
+ hpxml_bldg.hvac_distributions[0].conditioned_floor_area_served = hpxml_bldg.building_construction.conditioned_floor_area
1477
+ hpxml_bldg.hvac_distributions[0].duct_leakage_measurements.each do |dlm|
1478
+ dlm.duct_leakage_units = HPXML::UnitsCFM25
1479
+ dlm.duct_leakage_value = 100.0
1480
+ end
1481
+ hpxml_bldg.hvac_distributions[0].ducts.each do |duct|
1482
+ duct.duct_surface_area = nil
1483
+ duct.duct_location = nil
1484
+ end
1485
+ elsif ['duct-lto-cfm50'].include? warning_case
1486
+ hpxml, hpxml_bldg = _create_hpxml('base-atticroof-conditioned.xml')
1487
+ hpxml_bldg.hvac_distributions[0].conditioned_floor_area_served = hpxml_bldg.building_construction.conditioned_floor_area
1488
+ hpxml_bldg.hvac_distributions[0].duct_leakage_measurements.each do |dlm|
1489
+ dlm.duct_leakage_units = HPXML::UnitsCFM50
1490
+ dlm.duct_leakage_value = 200.0
1491
+ end
1492
+ hpxml_bldg.hvac_distributions[0].ducts.each do |duct|
1493
+ duct.duct_surface_area = nil
1494
+ duct.duct_location = nil
1495
+ end
1496
+ elsif ['duct-lto-percent'].include? warning_case
1497
+ hpxml, hpxml_bldg = _create_hpxml('base-atticroof-conditioned.xml')
1498
+ hpxml_bldg.hvac_distributions[0].conditioned_floor_area_served = hpxml_bldg.building_construction.conditioned_floor_area
1499
+ hpxml_bldg.hvac_distributions[0].duct_leakage_measurements.each do |dlm|
1500
+ dlm.duct_leakage_units = HPXML::UnitsPercent
1501
+ dlm.duct_leakage_value = 0.2
1502
+ end
1503
+ hpxml_bldg.hvac_distributions[0].ducts.each do |duct|
1504
+ duct.duct_surface_area = nil
1505
+ duct.duct_location = nil
1506
+ end
1335
1507
  elsif ['hvac-setpoint-adjustments'].include? warning_case
1336
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1337
- hpxml.hvac_controls[0].heating_setpoint_temp = 76.0
1338
- hpxml.hvac_controls[0].cooling_setpoint_temp = 75.0
1508
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
1509
+ hpxml_bldg.hvac_controls[0].heating_setpoint_temp = 76.0
1510
+ hpxml_bldg.hvac_controls[0].cooling_setpoint_temp = 75.0
1339
1511
  elsif ['hvac-setpoint-adjustments-daily-setbacks'].include? warning_case
1340
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-setpoints-daily-setbacks.xml'))
1341
- hpxml.hvac_controls[0].heating_setback_temp = 76.0
1342
- hpxml.hvac_controls[0].cooling_setpoint_temp = 75.0
1512
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-setpoints-daily-setbacks.xml')
1513
+ hpxml_bldg.hvac_controls[0].heating_setback_temp = 76.0
1514
+ hpxml_bldg.hvac_controls[0].cooling_setpoint_temp = 75.0
1343
1515
  elsif ['hvac-setpoint-adjustments-daily-schedules'].include? warning_case
1344
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-setpoints-daily-schedules.xml'))
1345
- hpxml.hvac_controls[0].weekday_heating_setpoints = '64, 64, 64, 64, 64, 64, 64, 76, 70, 66, 66, 66, 66, 66, 66, 66, 66, 68, 68, 68, 68, 68, 64, 64'
1516
+ hpxml, hpxml_bldg = _create_hpxml('base-hvac-setpoints-daily-schedules.xml')
1517
+ hpxml_bldg.hvac_controls[0].weekday_heating_setpoints = '64, 64, 64, 64, 64, 64, 64, 76, 70, 66, 66, 66, 66, 66, 66, 66, 66, 68, 68, 68, 68, 68, 64, 64'
1346
1518
  elsif ['power-outage'].include? warning_case
1347
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-schedules-simple-power-outage.xml'))
1519
+ hpxml, _hpxml_bldg = _create_hpxml('base-schedules-simple-power-outage.xml')
1348
1520
  elsif ['schedule-file-and-weekday-weekend-multipliers'].include? warning_case
1349
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-misc-loads-large-uncommon.xml'))
1521
+ hpxml, hpxml_bldg = _create_hpxml('base-misc-loads-large-uncommon.xml')
1350
1522
  hpxml.header.utility_bill_scenarios.clear # we don't want the propane warning
1351
- hpxml.header.schedules_filepaths << File.join(File.dirname(__FILE__), '../resources/schedule_files/occupancy-stochastic.csv')
1352
- hpxml.header.schedules_filepaths << File.join(File.dirname(__FILE__), '../resources/schedule_files/occupancy-non-stochastic.csv')
1523
+ hpxml_bldg.header.schedules_filepaths << File.join(File.dirname(__FILE__), '../resources/schedule_files/occupancy-stochastic.csv')
1524
+ hpxml_bldg.header.schedules_filepaths << File.join(File.dirname(__FILE__), '../resources/schedule_files/occupancy-non-stochastic.csv')
1353
1525
  elsif ['schedule-file-and-setpoints'].include? warning_case
1354
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
1355
- hpxml.header.schedules_filepaths << File.join(File.dirname(__FILE__), '../resources/schedule_files/setpoints.csv')
1356
- hpxml.header.schedules_filepaths << File.join(File.dirname(__FILE__), '../resources/schedule_files/water-heater-setpoints.csv')
1526
+ hpxml, hpxml_bldg = _create_hpxml('base.xml')
1527
+ hpxml_bldg.header.schedules_filepaths << File.join(File.dirname(__FILE__), '../resources/schedule_files/setpoints.csv')
1528
+ hpxml_bldg.header.schedules_filepaths << File.join(File.dirname(__FILE__), '../resources/schedule_files/water-heater-setpoints.csv')
1357
1529
  elsif ['schedule-file-and-operating-mode'].include? warning_case
1358
- hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-dhw-tank-heat-pump-operating-mode-heat-pump-only.xml'))
1359
- hpxml.header.schedules_filepaths << File.join(File.dirname(__FILE__), '../resources/schedule_files/water-heater-operating-modes.csv')
1530
+ hpxml, hpxml_bldg = _create_hpxml('base-dhw-tank-heat-pump-operating-mode-heat-pump-only.xml')
1531
+ hpxml_bldg.header.schedules_filepaths << File.join(File.dirname(__FILE__), '../resources/schedule_files/water-heater-operating-modes.csv')
1360
1532
  else
1361
1533
  fail "Unhandled case: #{warning_case}."
1362
1534
  end
1363
1535
 
1364
- hpxml_doc = hpxml.to_oga()
1536
+ hpxml_doc = hpxml.to_doc()
1365
1537
 
1366
1538
  XMLHelper.write_file(hpxml_doc, @tmp_hpxml_path)
1367
- _test_measure('warning', expected_warnings)
1539
+ _test_measure('warning', expected_warnings, building_id: building_id)
1368
1540
  end
1369
1541
  end
1370
1542
 
@@ -1388,7 +1560,7 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
1388
1560
  end
1389
1561
  end
1390
1562
 
1391
- def _test_measure(error_or_warning, expected_errors_or_warnings)
1563
+ def _test_measure(error_or_warning, expected_errors_or_warnings, building_id: nil)
1392
1564
  # create an instance of the measure
1393
1565
  measure = HPXMLtoOpenStudio.new
1394
1566
 
@@ -1400,6 +1572,7 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
1400
1572
  args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
1401
1573
  args_hash['debug'] = true
1402
1574
  args_hash['output_dir'] = File.absolute_path(@tmp_output_path)
1575
+ args_hash['building_id'] = building_id unless building_id.nil?
1403
1576
  arguments = measure.arguments(model)
1404
1577
  argument_map = OpenStudio::Measure.convertOSArgumentVectorToMap(arguments)
1405
1578
 
@@ -1462,4 +1635,15 @@ class HPXMLtoOpenStudioValidationTest < MiniTest::Test
1462
1635
  end
1463
1636
  end
1464
1637
  end
1638
+
1639
+ def _create_hpxml(hpxml_name, building_id: nil)
1640
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, hpxml_name), building_id: building_id)
1641
+ if not hpxml.errors.empty?
1642
+ hpxml.errors.each do |error|
1643
+ puts error
1644
+ end
1645
+ flunk "Did not successfully create HPXML file: #{hpxml_name}"
1646
+ end
1647
+ return hpxml, hpxml.buildings[0]
1648
+ end
1465
1649
  end