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
@@ -0,0 +1,1308 @@
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
+
6
+ # frozen_string_literal: true
7
+
8
+ require 'oga'
9
+ require_relative '../../HPXMLtoOpenStudio/resources/utility_bills'
10
+ require_relative '../../HPXMLtoOpenStudio/resources/constants'
11
+ require_relative '../../HPXMLtoOpenStudio/resources/energyplus'
12
+ require_relative '../../HPXMLtoOpenStudio/resources/hpxml'
13
+ require_relative '../../HPXMLtoOpenStudio/resources/hpxml_defaults'
14
+ require_relative '../../HPXMLtoOpenStudio/resources/minitest_helper'
15
+ require_relative '../../HPXMLtoOpenStudio/resources/schedules'
16
+ require_relative '../../HPXMLtoOpenStudio/resources/unit_conversions'
17
+ require_relative '../../HPXMLtoOpenStudio/resources/xmlhelper'
18
+ require_relative '../../HPXMLtoOpenStudio/resources/version'
19
+ require_relative '../resources/util.rb'
20
+ require 'openstudio'
21
+ require 'openstudio/measure/ShowRunnerOutput'
22
+ require_relative '../measure.rb'
23
+ require 'csv'
24
+
25
+ class ReportUtilityBillsTest < Minitest::Test
26
+ # BEopt 2.9.0.0:
27
+ # - Standard, New Construction, Single-Family Detached
28
+ # - 600 sq ft (30 x 20)
29
+ # - EPW Location: USA_CO_Denver.Intl.AP.725650_TMY3.epw
30
+ # - Cooking Range: Propane
31
+ # - Water Heater: Oil Standard
32
+ # - PV System: None, 1.0 kW, 10.0 kW
33
+ # - Timestep: 60 min
34
+ # - User-Specified rates:
35
+ # - Electricity: 0.1195179675994109 USD/kWh
36
+ # - Natural Gas: 0.7734017611590879 USD/therm
37
+ # - Fuel Oil: 3.495346153846154 USD/gal
38
+ # - Propane: 2.4532692307692305 USD/gal
39
+ # - Sample Tiered Rate
40
+ # - Tier 1: 150 Max kWh
41
+ # - Tier 2: 300 Max kWh
42
+ # - Sample Tiered Time-of-Use Rate
43
+ # - Tier 1: 150 Max kWh (Period 1 and 2)
44
+ # - Tier 2: 300 Max kWh (Period 2)
45
+ # - All other options left at default values
46
+ # Then retrieve 1.csv from output folder
47
+
48
+ def setup
49
+ @args_hash = {}
50
+
51
+ # From BEopt Output screen (Utility Bills USD/yr)
52
+ @expected_bills = {
53
+ 'Test: Electricity: Fixed (USD)' => 96,
54
+ 'Test: Electricity: Energy (USD)' => 632,
55
+ 'Test: Electricity: PV Credit (USD)' => 0,
56
+ 'Test: Natural Gas: Fixed (USD)' => 96,
57
+ 'Test: Natural Gas: Energy (USD)' => 149,
58
+ 'Test: Fuel Oil: Fixed (USD)' => 0,
59
+ 'Test: Fuel Oil: Energy (USD)' => 462,
60
+ 'Test: Propane: Fixed (USD)' => 0,
61
+ 'Test: Propane: Energy (USD)' => 76,
62
+ 'Test: Coal: Fixed (USD)' => 0,
63
+ 'Test: Coal: Energy (USD)' => 0,
64
+ 'Test: Wood Cord: Fixed (USD)' => 0,
65
+ 'Test: Wood Cord: Energy (USD)' => 0,
66
+ 'Test: Wood Pellets: Fixed (USD)' => 0,
67
+ 'Test: Wood Pellets: Energy (USD)' => 0
68
+ }
69
+
70
+ @measure = ReportUtilityBills.new
71
+ @hpxml_path = File.join(File.dirname(__FILE__), '../../workflow/sample_files/base-pv.xml')
72
+ @hpxml = HPXML.new(hpxml_path: @hpxml_path)
73
+ @hpxml_bldg = @hpxml.buildings[0]
74
+
75
+ @hpxml_header = @hpxml.header
76
+ @hpxml_header.utility_bill_scenarios.clear
77
+ @hpxml_header.utility_bill_scenarios.add(name: 'Test',
78
+ elec_fixed_charge: 8.0,
79
+ elec_marginal_rate: 0.1195179675994109,
80
+ natural_gas_fixed_charge: 8.0,
81
+ natural_gas_marginal_rate: 0.7734017611590879,
82
+ propane_marginal_rate: 2.4532692307692305,
83
+ fuel_oil_marginal_rate: 3.495346153846154)
84
+
85
+ # Check for presence of fuels once
86
+ has_fuel = @hpxml_bldg.has_fuels(Constants.FossilFuels, @hpxml.to_doc)
87
+ HPXMLDefaults.apply_header(@hpxml_header, nil)
88
+ HPXMLDefaults.apply_utility_bill_scenarios(nil, @hpxml_header, @hpxml_bldg, has_fuel)
89
+
90
+ @root_path = File.absolute_path(File.join(File.dirname(__FILE__), '..', '..'))
91
+ @sample_files_path = File.join(@root_path, 'workflow', 'sample_files')
92
+ @tmp_hpxml_path = File.join(@sample_files_path, 'tmp.xml')
93
+ @bills_csv = File.join(File.dirname(__FILE__), 'results_bills.csv')
94
+ @bills_monthly_csv = File.join(File.dirname(__FILE__), 'results_bills_monthly.csv')
95
+
96
+ @fuels_pv_none_simple = _load_timeseries(0, false)
97
+ @fuels_pv_1kw_simple = _load_timeseries(1, false)
98
+ @fuels_pv_10kw_simple = _load_timeseries(10, false)
99
+ @fuels_pv_none_detailed = _load_timeseries(0, true)
100
+ @fuels_pv_1kw_detailed = _load_timeseries(1, true)
101
+ @fuels_pv_10kw_detailed = _load_timeseries(10, true)
102
+
103
+ @monthly_data = []
104
+ end
105
+
106
+ def teardown
107
+ File.delete(@tmp_hpxml_path) if File.exist? @tmp_hpxml_path
108
+ File.delete(@bills_csv) if File.exist? @bills_csv
109
+ File.delete(@bills_monthly_csv) if File.exist? @bills_monthly_csv
110
+ end
111
+
112
+ # Simple (non-JSON) Calculations
113
+
114
+ def test_simple_pv_none
115
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
116
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_none_simple, @hpxml_header, [], utility_bill_scenario)
117
+ expected_bills = _get_expected_bills(@expected_bills)
118
+ _check_bills(expected_bills, actual_bills)
119
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
120
+ end
121
+
122
+ def test_simple_pv_1kW_net_metering_user_excess_rate
123
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
124
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
125
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_simple, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
126
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -177
127
+ expected_bills = _get_expected_bills(@expected_bills)
128
+ _check_bills(expected_bills, actual_bills)
129
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
130
+ end
131
+
132
+ def test_simple_pv_10kW_net_metering_user_excess_rate
133
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
134
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
135
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_simple, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
136
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -920
137
+ expected_bills = _get_expected_bills(@expected_bills)
138
+ _check_bills(expected_bills, actual_bills)
139
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
140
+ end
141
+
142
+ def test_simple_pv_10kW_net_metering_retail_excess_rate
143
+ @hpxml_header.utility_bill_scenarios[-1].pv_net_metering_annual_excess_sellback_rate_type = HPXML::PVAnnualExcessSellbackRateTypeRetailElectricityCost
144
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
145
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
146
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_simple, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
147
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -1777
148
+ expected_bills = _get_expected_bills(@expected_bills)
149
+ _check_bills(expected_bills, actual_bills)
150
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
151
+ end
152
+
153
+ def test_simple_pv_10kW_net_metering_zero_excess_rate
154
+ @hpxml_header.utility_bill_scenarios[-1].pv_net_metering_annual_excess_sellback_rate = 0.0
155
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
156
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
157
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_simple, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
158
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -632
159
+ expected_bills = _get_expected_bills(@expected_bills)
160
+ _check_bills(expected_bills, actual_bills)
161
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
162
+ end
163
+
164
+ def test_simple_pv_1kW_feed_in_tariff
165
+ @hpxml_header.utility_bill_scenarios[-1].pv_compensation_type = HPXML::PVCompensationTypeFeedInTariff
166
+ @hpxml_header.utility_bill_scenarios[-1].pv_feed_in_tariff_rate = 0.12
167
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
168
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
169
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_simple, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
170
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -178
171
+ expected_bills = _get_expected_bills(@expected_bills)
172
+ _check_bills(expected_bills, actual_bills)
173
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
174
+ end
175
+
176
+ def test_simple_pv_10kW_feed_in_tariff
177
+ @hpxml_header.utility_bill_scenarios[-1].pv_compensation_type = HPXML::PVCompensationTypeFeedInTariff
178
+ @hpxml_header.utility_bill_scenarios[-1].pv_feed_in_tariff_rate = 0.12
179
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
180
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
181
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_simple, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
182
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -1785
183
+ expected_bills = _get_expected_bills(@expected_bills)
184
+ _check_bills(expected_bills, actual_bills)
185
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
186
+ end
187
+
188
+ def test_workflow_wood_cord
189
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
190
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-furnace-wood-only.xml'))
191
+ hpxml.header.utility_bill_scenarios.add(name: 'Test 1', wood_marginal_rate: 0.015)
192
+ hpxml.header.utility_bill_scenarios.add(name: 'Test 2', wood_marginal_rate: 0.03)
193
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
194
+ actual_bills, actual_monthly_bills = _test_measure()
195
+ expected_val = actual_bills['Test 1: Wood Cord: Total (USD)']
196
+ assert_in_delta(expected_val * 2, actual_bills['Test 2: Wood Cord: Total (USD)'], 1)
197
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
198
+ end
199
+
200
+ def test_workflow_wood_pellets
201
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
202
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-stove-wood-pellets-only.xml'))
203
+ hpxml.header.utility_bill_scenarios.add(name: 'Test 1', wood_pellets_marginal_rate: 0.02)
204
+ hpxml.header.utility_bill_scenarios.add(name: 'Test 2', wood_pellets_marginal_rate: 0.01)
205
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
206
+ actual_bills, actual_monthly_bills = _test_measure()
207
+ expected_val = actual_bills['Test 1: Wood Pellets: Total (USD)']
208
+ assert_in_delta(expected_val / 2, actual_bills['Test 2: Wood Pellets: Total (USD)'], 1)
209
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
210
+ end
211
+
212
+ def test_workflow_coal
213
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
214
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-furnace-coal-only.xml'))
215
+ hpxml.header.utility_bill_scenarios.add(name: 'Test 1', coal_marginal_rate: 0.05)
216
+ hpxml.header.utility_bill_scenarios.add(name: 'Test 2', coal_marginal_rate: 0.1)
217
+ hpxml.header.utility_bill_scenarios.add(name: 'Test 3', coal_marginal_rate: 0.025)
218
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
219
+ actual_bills, actual_monthly_bills = _test_measure()
220
+ expected_val = actual_bills['Test 1: Coal: Total (USD)']
221
+ assert_in_delta(expected_val * 2, actual_bills['Test 2: Coal: Total (USD)'], 1)
222
+ assert_in_delta(expected_val / 2, actual_bills['Test 3: Coal: Total (USD)'], 1)
223
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
224
+ end
225
+
226
+ def test_workflow_leap_year
227
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
228
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-location-AMY-2012.xml'))
229
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
230
+ actual_bills, actual_monthly_bills = _test_measure()
231
+ assert_operator(actual_bills['Bills: Total (USD)'], :>, 0)
232
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
233
+ end
234
+
235
+ def test_workflow_semi_annual_run_period
236
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
237
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-simcontrol-runperiod-1-month.xml'))
238
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
239
+ actual_bills, actual_monthly_bills = _test_measure()
240
+ assert_operator(actual_bills['Bills: Total (USD)'], :>, 0)
241
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
242
+ end
243
+
244
+ def test_workflow_no_bill_scenarios
245
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
246
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
247
+ hpxml.header.utility_bill_scenarios.clear
248
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
249
+ actual_bills, _actual_monthly_bills = _test_measure(hpxml: hpxml)
250
+ assert_nil(actual_bills)
251
+ end
252
+
253
+ def test_workflow_detailed_calculations
254
+ # Detailed Rate.json was renamed from Jackson Electric Member Corp - A Residential Service Senior Citizen Low Income Assistance (Effective 2017-01-01).json
255
+ # See https://github.com/NREL/OpenStudio-HPXML/issues/1444
256
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
257
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
258
+ hpxml.header.utility_bill_scenarios.add(name: 'Test 1', elec_tariff_filepath: '../../ReportUtilityBills/tests/Detailed Rate.json')
259
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
260
+ actual_bills, actual_monthly_bills = _test_measure()
261
+ assert_operator(actual_bills['Test 1: Total (USD)'], :>, 0)
262
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
263
+ end
264
+
265
+ def test_workflow_detailed_calculations_all_electric
266
+ # Detailed Rate.json was renamed from Jackson Electric Member Corp - A Residential Service Senior Citizen Low Income Assistance (Effective 2017-01-01).json
267
+ # See https://github.com/NREL/OpenStudio-HPXML/issues/1444
268
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
269
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-air-to-air-heat-pump-1-speed.xml'))
270
+ hpxml.header.utility_bill_scenarios.add(name: 'Test 1', elec_tariff_filepath: '../../ReportUtilityBills/tests/Detailed Rate.json')
271
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
272
+ actual_bills, actual_monthly_bills = _test_measure()
273
+ assert_operator(actual_bills['Test 1: Total (USD)'], :>, 0)
274
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
275
+ end
276
+
277
+ def test_auto_marginal_rate
278
+ fuel_types = [HPXML::FuelTypeElectricity, HPXML::FuelTypeNaturalGas, HPXML::FuelTypeOil, HPXML::FuelTypePropane]
279
+
280
+ # Check that we can successfully look up "auto" rates for every state
281
+ # and every fuel type.
282
+ Constants.StateCodesMap.keys.each do |state_code|
283
+ fuel_types.each do |fuel_type|
284
+ flatratebuy, _ = UtilityBills.get_rates_from_eia_data(nil, state_code, fuel_type, 0)
285
+ refute_nil(flatratebuy)
286
+ end
287
+ end
288
+
289
+ # Check that we can successfully look up "auto" rates for the US too.
290
+ fuel_types.each do |fuel_type|
291
+ flatratebuy, _ = UtilityBills.get_rates_from_eia_data(nil, 'US', fuel_type, 0)
292
+ refute_nil(flatratebuy)
293
+ end
294
+
295
+ # Check that any other state code is gracefully handled (no error)
296
+ fuel_types.each do |fuel_type|
297
+ UtilityBills.get_rates_from_eia_data(nil, 'XX', fuel_type, 0)
298
+ end
299
+ end
300
+
301
+ def test_warning_region
302
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
303
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-appliances-oil.xml'))
304
+ hpxml.buildings[0].state_code = 'FL'
305
+ hpxml.buildings[0].climate_and_risk_zones.weather_station_epw_filepath = 'USA_FL_Miami.Intl.AP.722020_TMY3.epw'
306
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
307
+ expected_warnings = ['Could not find state average fuel oil rate based on Florida; using region (PADD 1C) average.']
308
+ actual_bills, _actual_monthly_bills = _test_measure(expected_warnings: expected_warnings)
309
+ assert_nil(actual_bills)
310
+ end
311
+
312
+ def test_warning_national
313
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
314
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-appliances-propane.xml'))
315
+ hpxml.buildings[0].state_code = 'OR'
316
+ hpxml.buildings[0].climate_and_risk_zones.weather_station_epw_filepath = 'USA_OR_Portland.Intl.AP.726980_TMY3.epw'
317
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
318
+ expected_warnings = ['Could not find state average propane rate based on Oregon; using national average.']
319
+ actual_bills, _actual_monthly_bills = _test_measure(expected_warnings: expected_warnings)
320
+ assert_nil(actual_bills)
321
+ end
322
+
323
+ def test_warning_dse
324
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
325
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-hvac-dse.xml'))
326
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
327
+ expected_warnings = ['DSE is not currently supported when calculating utility bills.']
328
+ actual_bills, _actual_monthly_bills = _test_measure(expected_warnings: expected_warnings)
329
+ assert_nil(actual_bills)
330
+ end
331
+
332
+ def test_warning_no_rates
333
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
334
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-location-capetown-zaf.xml'))
335
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
336
+ expected_warnings = ['Could not find a marginal Electricity rate.', 'Could not find a marginal Natural Gas rate.']
337
+ actual_bills, _actual_monthly_bills = _test_measure(expected_warnings: expected_warnings)
338
+ assert_nil(actual_bills)
339
+ end
340
+
341
+ def test_warning_invalid_fixed_charge_units
342
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
343
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
344
+ hpxml.header.utility_bill_scenarios.add(name: 'Test 1', elec_tariff_filepath: '../../ReportUtilityBills/tests/Invalid Fixed Charge Units.json')
345
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
346
+ expected_warnings = ['Fixed charge units must be $/month.']
347
+ actual_bills, _actual_monthly_bills = _test_measure(expected_warnings: expected_warnings)
348
+ assert_nil(actual_bills)
349
+ end
350
+
351
+ def test_warning_invalid_min_charge_units
352
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
353
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
354
+ hpxml.header.utility_bill_scenarios.add(name: 'Test 1', elec_tariff_filepath: '../../ReportUtilityBills/tests/Invalid Min Charge Units.json')
355
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
356
+ expected_warnings = ['Min charge units must be either $/month or $/year.']
357
+ actual_bills, _actual_monthly_bills = _test_measure(expected_warnings: expected_warnings)
358
+ assert_nil(actual_bills)
359
+ end
360
+
361
+ def test_warning_demand_charges
362
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
363
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
364
+ hpxml.header.utility_bill_scenarios.add(name: 'Test 1', elec_tariff_filepath: '../../ReportUtilityBills/tests/Contains Demand Charges.json')
365
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
366
+ expected_warnings = ['Demand charges are not currently supported when calculating detailed utility bills.']
367
+ actual_bills, _actual_monthly_bills = _test_measure(expected_warnings: expected_warnings)
368
+ assert_nil(actual_bills)
369
+ end
370
+
371
+ def test_warning_missing_required_fields
372
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
373
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base.xml'))
374
+ hpxml.header.utility_bill_scenarios.add(name: 'Test 1', elec_tariff_filepath: '../../ReportUtilityBills/tests/Missing Required Fields.json')
375
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
376
+ expected_warnings = ['Tariff file must contain energyweekdayschedule, energyweekendschedule, and energyratestructure fields.']
377
+ actual_bills, _actual_monthly_bills = _test_measure(expected_warnings: expected_warnings)
378
+ assert_nil(actual_bills)
379
+ end
380
+
381
+ def test_warning_detailed_rates_unit_multipliers
382
+ @args_hash['hpxml_path'] = File.absolute_path(@tmp_hpxml_path)
383
+ hpxml = HPXML.new(hpxml_path: File.join(@sample_files_path, 'base-misc-unit-multiplier.xml'))
384
+ hpxml.header.utility_bill_scenarios.add(name: 'Test 1', elec_tariff_filepath: '../../ReportUtilityBills/resources/detailed_rates/Sample Tiered Rate.json')
385
+ XMLHelper.write_file(hpxml.to_doc, @tmp_hpxml_path)
386
+ expected_warnings = ['Cannot currently calculate utility bills based on detailed electric rates for an HPXML with unit multipliers or multiple Building elements.']
387
+ actual_bills, _actual_monthly_bills = _test_measure(expected_warnings: expected_warnings)
388
+ assert_nil(actual_bills)
389
+ end
390
+
391
+ def test_monthly_prorate
392
+ # Test begin_month == end_month
393
+ header = HPXML::Header.new(nil)
394
+ header.sim_begin_month = 3
395
+ header.sim_begin_day = 5
396
+ header.sim_end_month = 3
397
+ header.sim_end_day = 20
398
+ header.sim_calendar_year = 2002
399
+ assert_equal(0.0, CalculateUtilityBill.calculate_monthly_prorate(header, 2))
400
+ assert_equal((20 - 5 + 1) / 31.0, CalculateUtilityBill.calculate_monthly_prorate(header, 3))
401
+ assert_equal(0.0, CalculateUtilityBill.calculate_monthly_prorate(header, 4))
402
+
403
+ # Test begin_month != end_month
404
+ header = HPXML::Header.new(nil)
405
+ header.sim_begin_month = 2
406
+ header.sim_begin_day = 10
407
+ header.sim_end_month = 4
408
+ header.sim_end_day = 10
409
+ header.sim_calendar_year = 2002
410
+ assert_equal(0.0, CalculateUtilityBill.calculate_monthly_prorate(header, 1))
411
+ assert_equal((28 - 10 + 1) / 28.0, CalculateUtilityBill.calculate_monthly_prorate(header, 2))
412
+ assert_equal(1.0, CalculateUtilityBill.calculate_monthly_prorate(header, 3))
413
+ assert_equal(10 / 30.0, CalculateUtilityBill.calculate_monthly_prorate(header, 4))
414
+ assert_equal(0.0, CalculateUtilityBill.calculate_monthly_prorate(header, 5))
415
+ end
416
+
417
+ # Detailed (JSON) Calculations
418
+
419
+ # Flat (Same as simple tests above)
420
+
421
+ def test_detailed_flat_pv_none
422
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate.json'
423
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
424
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_none_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
425
+ expected_bills = _get_expected_bills(@expected_bills)
426
+ _check_bills(expected_bills, actual_bills)
427
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
428
+ end
429
+
430
+ def test_detailed_flat_pv_1kW_net_metering_user_excess_rate
431
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate.json'
432
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
433
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
434
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
435
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -177
436
+ expected_bills = _get_expected_bills(@expected_bills)
437
+ _check_bills(expected_bills, actual_bills)
438
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
439
+ end
440
+
441
+ def test_detailed_flat_pv_10kW_net_metering_user_excess_rate
442
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate.json'
443
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
444
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
445
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
446
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -920
447
+ expected_bills = _get_expected_bills(@expected_bills)
448
+ _check_bills(expected_bills, actual_bills)
449
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
450
+ end
451
+
452
+ def test_detailed_flat_pv_10kW_net_metering_retail_excess_rate
453
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate.json'
454
+ @hpxml_header.utility_bill_scenarios[-1].pv_net_metering_annual_excess_sellback_rate_type = HPXML::PVAnnualExcessSellbackRateTypeRetailElectricityCost
455
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
456
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
457
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
458
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -1777
459
+ expected_bills = _get_expected_bills(@expected_bills)
460
+ _check_bills(expected_bills, actual_bills)
461
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
462
+ end
463
+
464
+ def test_detailed_flat_pv_10kW_net_metering_zero_excess_rate
465
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate.json'
466
+ @hpxml_header.utility_bill_scenarios[-1].pv_net_metering_annual_excess_sellback_rate = 0.0
467
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
468
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
469
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
470
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -632
471
+ expected_bills = _get_expected_bills(@expected_bills)
472
+ _check_bills(expected_bills, actual_bills)
473
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
474
+ end
475
+
476
+ def test_detailed_flat_pv_1kW_feed_in_tariff
477
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate.json'
478
+ @hpxml_header.utility_bill_scenarios[-1].pv_compensation_type = HPXML::PVCompensationTypeFeedInTariff
479
+ @hpxml_header.utility_bill_scenarios[-1].pv_feed_in_tariff_rate = 0.12
480
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
481
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
482
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
483
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -178
484
+ expected_bills = _get_expected_bills(@expected_bills)
485
+ _check_bills(expected_bills, actual_bills)
486
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
487
+ end
488
+
489
+ def test_detailed_flat_pv_10kW_feed_in_tariff
490
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate.json'
491
+ @hpxml_header.utility_bill_scenarios[-1].pv_compensation_type = HPXML::PVCompensationTypeFeedInTariff
492
+ @hpxml_header.utility_bill_scenarios[-1].pv_feed_in_tariff_rate = 0.12
493
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
494
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
495
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
496
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -1785
497
+ expected_bills = _get_expected_bills(@expected_bills)
498
+ _check_bills(expected_bills, actual_bills)
499
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
500
+ end
501
+
502
+ # Tiered
503
+
504
+ def test_detailed_tiered_pv_none
505
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Tiered Rate.json'
506
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
507
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_none_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
508
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
509
+ @expected_bills['Test: Electricity: Energy (USD)'] = 580
510
+ expected_bills = _get_expected_bills(@expected_bills)
511
+ _check_bills(expected_bills, actual_bills)
512
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
513
+ end
514
+
515
+ def test_detailed_tiered_pv_1kW_net_metering_user_excess_rate
516
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Tiered Rate.json'
517
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
518
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
519
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
520
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
521
+ @expected_bills['Test: Electricity: Energy (USD)'] = 580
522
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -190
523
+ expected_bills = _get_expected_bills(@expected_bills)
524
+ _check_bills(expected_bills, actual_bills)
525
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
526
+ end
527
+
528
+ def test_detailed_tiered_pv_10kW_net_metering_user_excess_rate
529
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Tiered Rate.json'
530
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
531
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
532
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
533
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
534
+ @expected_bills['Test: Electricity: Energy (USD)'] = 580
535
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -867
536
+ expected_bills = _get_expected_bills(@expected_bills)
537
+ _check_bills(expected_bills, actual_bills)
538
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
539
+ end
540
+
541
+ def test_detailed_tiered_pv_10kW_net_metering_retail_excess_rate
542
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Tiered Rate.json'
543
+ @hpxml_header.utility_bill_scenarios[-1].pv_net_metering_annual_excess_sellback_rate_type = HPXML::PVAnnualExcessSellbackRateTypeRetailElectricityCost
544
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
545
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
546
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
547
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
548
+ @expected_bills['Test: Electricity: Energy (USD)'] = 580
549
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -1443
550
+ expected_bills = _get_expected_bills(@expected_bills)
551
+ _check_bills(expected_bills, actual_bills)
552
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
553
+ end
554
+
555
+ def test_detailed_tiered_pv_10kW_net_metering_zero_excess_rate
556
+ @hpxml_header.utility_bill_scenarios[-1].pv_net_metering_annual_excess_sellback_rate = 0.0
557
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Tiered Rate.json'
558
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
559
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
560
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
561
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
562
+ @expected_bills['Test: Electricity: Energy (USD)'] = 580
563
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -580
564
+ expected_bills = _get_expected_bills(@expected_bills)
565
+ _check_bills(expected_bills, actual_bills)
566
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
567
+ end
568
+
569
+ def test_detailed_tiered_pv_1kW_feed_in_tariff
570
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Tiered Rate.json'
571
+ @hpxml_header.utility_bill_scenarios[-1].pv_compensation_type = HPXML::PVCompensationTypeFeedInTariff
572
+ @hpxml_header.utility_bill_scenarios[-1].pv_feed_in_tariff_rate = 0.12
573
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
574
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
575
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
576
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
577
+ @expected_bills['Test: Electricity: Energy (USD)'] = 580
578
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -178
579
+ expected_bills = _get_expected_bills(@expected_bills)
580
+ _check_bills(expected_bills, actual_bills)
581
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
582
+ end
583
+
584
+ def test_detailed_tiered_pv_10kW_feed_in_tariff
585
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Tiered Rate.json'
586
+ @hpxml_header.utility_bill_scenarios[-1].pv_compensation_type = HPXML::PVCompensationTypeFeedInTariff
587
+ @hpxml_header.utility_bill_scenarios[-1].pv_feed_in_tariff_rate = 0.12
588
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
589
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
590
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
591
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
592
+ @expected_bills['Test: Electricity: Energy (USD)'] = 580
593
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -1785
594
+ expected_bills = _get_expected_bills(@expected_bills)
595
+ _check_bills(expected_bills, actual_bills)
596
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
597
+ end
598
+
599
+ # Time-of-Use
600
+
601
+ def test_detailed_tou_pv_none
602
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Time-of-Use Rate.json'
603
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
604
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_none_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
605
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
606
+ @expected_bills['Test: Electricity: Energy (USD)'] = 393
607
+ expected_bills = _get_expected_bills(@expected_bills)
608
+ _check_bills(expected_bills, actual_bills)
609
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
610
+ end
611
+
612
+ def test_detailed_tou_pv_1kW_net_metering_user_excess_rate
613
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Time-of-Use Rate.json'
614
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
615
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
616
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
617
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
618
+ @expected_bills['Test: Electricity: Energy (USD)'] = 393
619
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -112
620
+ expected_bills = _get_expected_bills(@expected_bills)
621
+ _check_bills(expected_bills, actual_bills)
622
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
623
+ end
624
+
625
+ def test_detailed_tou_pv_10kW_net_metering_user_excess_rate
626
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Time-of-Use Rate.json'
627
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
628
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
629
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
630
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
631
+ @expected_bills['Test: Electricity: Energy (USD)'] = 393
632
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -681
633
+ expected_bills = _get_expected_bills(@expected_bills)
634
+ _check_bills(expected_bills, actual_bills)
635
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
636
+ end
637
+
638
+ def test_detailed_tou_pv_10kW_net_metering_retail_excess_rate
639
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Time-of-Use Rate.json'
640
+ @hpxml_header.utility_bill_scenarios[-1].pv_net_metering_annual_excess_sellback_rate_type = HPXML::PVAnnualExcessSellbackRateTypeRetailElectricityCost
641
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
642
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
643
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
644
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
645
+ @expected_bills['Test: Electricity: Energy (USD)'] = 393
646
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -1127
647
+ expected_bills = _get_expected_bills(@expected_bills)
648
+ _check_bills(expected_bills, actual_bills)
649
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
650
+ end
651
+
652
+ def test_detailed_tou_pv_10kW_net_metering_zero_excess_rate
653
+ @hpxml_header.utility_bill_scenarios[-1].pv_net_metering_annual_excess_sellback_rate = 0.0
654
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Time-of-Use Rate.json'
655
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
656
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
657
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
658
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
659
+ @expected_bills['Test: Electricity: Energy (USD)'] = 393
660
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -393
661
+ expected_bills = _get_expected_bills(@expected_bills)
662
+ _check_bills(expected_bills, actual_bills)
663
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
664
+ end
665
+
666
+ def test_detailed_tou_pv_1kW_feed_in_tariff
667
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Time-of-Use Rate.json'
668
+ @hpxml_header.utility_bill_scenarios[-1].pv_compensation_type = HPXML::PVCompensationTypeFeedInTariff
669
+ @hpxml_header.utility_bill_scenarios[-1].pv_feed_in_tariff_rate = 0.12
670
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
671
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
672
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
673
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
674
+ @expected_bills['Test: Electricity: Energy (USD)'] = 393
675
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -178
676
+ expected_bills = _get_expected_bills(@expected_bills)
677
+ _check_bills(expected_bills, actual_bills)
678
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
679
+ end
680
+
681
+ def test_detailed_tou_pv_10kW_feed_in_tariff
682
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Time-of-Use Rate.json'
683
+ @hpxml_header.utility_bill_scenarios[-1].pv_compensation_type = HPXML::PVCompensationTypeFeedInTariff
684
+ @hpxml_header.utility_bill_scenarios[-1].pv_feed_in_tariff_rate = 0.12
685
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
686
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
687
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
688
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
689
+ @expected_bills['Test: Electricity: Energy (USD)'] = 393
690
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -1785
691
+ expected_bills = _get_expected_bills(@expected_bills)
692
+ _check_bills(expected_bills, actual_bills)
693
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
694
+ end
695
+
696
+ # Tiered and Time-of-Use
697
+
698
+ def test_detailed_tiered_tou_pv_none
699
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Tiered Time-of-Use Rate.json'
700
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
701
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_none_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
702
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
703
+ @expected_bills['Test: Electricity: Energy (USD)'] = 377
704
+ expected_bills = _get_expected_bills(@expected_bills)
705
+ _check_bills(expected_bills, actual_bills)
706
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
707
+ end
708
+
709
+ def test_detailed_tiered_tou_pv_1kW_net_metering_user_excess_rate
710
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Tiered Time-of-Use Rate.json'
711
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
712
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
713
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
714
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
715
+ @expected_bills['Test: Electricity: Energy (USD)'] = 377
716
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -108
717
+ expected_bills = _get_expected_bills(@expected_bills)
718
+ _check_bills(expected_bills, actual_bills)
719
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
720
+ end
721
+
722
+ def test_detailed_tiered_tou_pv_10kW_net_metering_user_excess_rate
723
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Tiered Time-of-Use Rate.json'
724
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
725
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
726
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
727
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
728
+ @expected_bills['Test: Electricity: Energy (USD)'] = 377
729
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -665
730
+ expected_bills = _get_expected_bills(@expected_bills)
731
+ _check_bills(expected_bills, actual_bills)
732
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
733
+ end
734
+
735
+ def test_detailed_tiered_tou_pv_10kW_net_metering_retail_excess_rate
736
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Tiered Time-of-Use Rate.json'
737
+ @hpxml_header.utility_bill_scenarios[-1].pv_net_metering_annual_excess_sellback_rate_type = HPXML::PVAnnualExcessSellbackRateTypeRetailElectricityCost
738
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
739
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
740
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
741
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
742
+ @expected_bills['Test: Electricity: Energy (USD)'] = 377
743
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -1000
744
+ expected_bills = _get_expected_bills(@expected_bills)
745
+ _check_bills(expected_bills, actual_bills)
746
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
747
+ end
748
+
749
+ def test_detailed_tiered_tou_pv_10kW_net_metering_zero_excess_rate
750
+ @hpxml_header.utility_bill_scenarios[-1].pv_net_metering_annual_excess_sellback_rate = 0.0
751
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Tiered Time-of-Use Rate.json'
752
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
753
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
754
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
755
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
756
+ @expected_bills['Test: Electricity: Energy (USD)'] = 377
757
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -377
758
+ expected_bills = _get_expected_bills(@expected_bills)
759
+ _check_bills(expected_bills, actual_bills)
760
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
761
+ end
762
+
763
+ def test_detailed_tiered_tou_pv_1kW_feed_in_tariff
764
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Tiered Time-of-Use Rate.json'
765
+ @hpxml_header.utility_bill_scenarios[-1].pv_compensation_type = HPXML::PVCompensationTypeFeedInTariff
766
+ @hpxml_header.utility_bill_scenarios[-1].pv_feed_in_tariff_rate = 0.12
767
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
768
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
769
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
770
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
771
+ @expected_bills['Test: Electricity: Energy (USD)'] = 377
772
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -178
773
+ expected_bills = _get_expected_bills(@expected_bills)
774
+ _check_bills(expected_bills, actual_bills)
775
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
776
+ end
777
+
778
+ def test_detailed_tiered_tou_pv_10kW_feed_in_tariff
779
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Tiered Time-of-Use Rate.json'
780
+ @hpxml_header.utility_bill_scenarios[-1].pv_compensation_type = HPXML::PVCompensationTypeFeedInTariff
781
+ @hpxml_header.utility_bill_scenarios[-1].pv_feed_in_tariff_rate = 0.12
782
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
783
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
784
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
785
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
786
+ @expected_bills['Test: Electricity: Energy (USD)'] = 377
787
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -1785
788
+ expected_bills = _get_expected_bills(@expected_bills)
789
+ _check_bills(expected_bills, actual_bills)
790
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
791
+ end
792
+
793
+ # Real-time Pricing
794
+
795
+ def test_detailed_rtp_pv_none
796
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Real-Time Pricing Rate.json'
797
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
798
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_none_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
799
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
800
+ @expected_bills['Test: Electricity: Energy (USD)'] = 354
801
+ expected_bills = _get_expected_bills(@expected_bills)
802
+ _check_bills(expected_bills, actual_bills)
803
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
804
+ end
805
+
806
+ def test_detailed_rtp_pv_1kW_net_metering_user_excess_rate
807
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Real-Time Pricing Rate.json'
808
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
809
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
810
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
811
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
812
+ @expected_bills['Test: Electricity: Energy (USD)'] = 354
813
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -106
814
+ expected_bills = _get_expected_bills(@expected_bills)
815
+ _check_bills(expected_bills, actual_bills)
816
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
817
+ end
818
+
819
+ def test_detailed_rtp_pv_10kW_net_metering_user_excess_rate
820
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Real-Time Pricing Rate.json'
821
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
822
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
823
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
824
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
825
+ @expected_bills['Test: Electricity: Energy (USD)'] = 354
826
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -641
827
+ expected_bills = _get_expected_bills(@expected_bills)
828
+ _check_bills(expected_bills, actual_bills)
829
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
830
+ end
831
+
832
+ def test_detailed_rtp_pv_10kW_net_metering_retail_excess_rate
833
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Real-Time Pricing Rate.json'
834
+ @hpxml_header.utility_bill_scenarios[-1].pv_net_metering_annual_excess_sellback_rate_type = HPXML::PVAnnualExcessSellbackRateTypeRetailElectricityCost
835
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
836
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
837
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
838
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
839
+ @expected_bills['Test: Electricity: Energy (USD)'] = 354
840
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -1060
841
+ expected_bills = _get_expected_bills(@expected_bills)
842
+ _check_bills(expected_bills, actual_bills)
843
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
844
+ end
845
+
846
+ def test_detailed_rtp_pv_10kW_net_metering_zero_excess_rate
847
+ @hpxml_header.utility_bill_scenarios[-1].pv_net_metering_annual_excess_sellback_rate = 0.0
848
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Real-Time Pricing Rate.json'
849
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
850
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
851
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
852
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
853
+ @expected_bills['Test: Electricity: Energy (USD)'] = 354
854
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -354
855
+ expected_bills = _get_expected_bills(@expected_bills)
856
+ _check_bills(expected_bills, actual_bills)
857
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
858
+ end
859
+
860
+ def test_detailed_rtp_pv_1kW_feed_in_tariff
861
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Real-Time Pricing Rate.json'
862
+ @hpxml_header.utility_bill_scenarios[-1].pv_compensation_type = HPXML::PVCompensationTypeFeedInTariff
863
+ @hpxml_header.utility_bill_scenarios[-1].pv_feed_in_tariff_rate = 0.12
864
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
865
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
866
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
867
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
868
+ @expected_bills['Test: Electricity: Energy (USD)'] = 354
869
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -178
870
+ expected_bills = _get_expected_bills(@expected_bills)
871
+ _check_bills(expected_bills, actual_bills)
872
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
873
+ end
874
+
875
+ def test_detailed_rtp_pv_10kW_feed_in_tariff
876
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Real-Time Pricing Rate.json'
877
+ @hpxml_header.utility_bill_scenarios[-1].pv_compensation_type = HPXML::PVCompensationTypeFeedInTariff
878
+ @hpxml_header.utility_bill_scenarios[-1].pv_feed_in_tariff_rate = 0.12
879
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
880
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
881
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
882
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 108
883
+ @expected_bills['Test: Electricity: Energy (USD)'] = 354
884
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -1785
885
+ expected_bills = _get_expected_bills(@expected_bills)
886
+ _check_bills(expected_bills, actual_bills)
887
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
888
+ end
889
+
890
+ # Extra Fees & Charges
891
+
892
+ def test_simple_pv_1kW_grid_fee_dollars_per_kW
893
+ @hpxml_header.utility_bill_scenarios[-1].pv_monthly_grid_connection_fee_dollars_per_kw = 2.50
894
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
895
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
896
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_simple, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
897
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 126
898
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -177
899
+ expected_bills = _get_expected_bills(@expected_bills)
900
+ _check_bills(expected_bills, actual_bills)
901
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
902
+ end
903
+
904
+ def test_simple_pv_1kW_grid_fee_dollars
905
+ @hpxml_header.utility_bill_scenarios[-1].pv_monthly_grid_connection_fee_dollars = 7.50
906
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
907
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
908
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_simple, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
909
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 186
910
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -177
911
+ expected_bills = _get_expected_bills(@expected_bills)
912
+ _check_bills(expected_bills, actual_bills)
913
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
914
+ end
915
+
916
+ def test_detailed_pv_1kW_grid_fee_dollars_per_kW
917
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate.json'
918
+ @hpxml_header.utility_bill_scenarios[-1].pv_monthly_grid_connection_fee_dollars_per_kw = 2.50
919
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
920
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
921
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
922
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 126
923
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -177
924
+ expected_bills = _get_expected_bills(@expected_bills)
925
+ _check_bills(expected_bills, actual_bills)
926
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
927
+ end
928
+
929
+ def test_detailed_pv_1kW_grid_fee_dollars
930
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate.json'
931
+ @hpxml_header.utility_bill_scenarios[-1].pv_monthly_grid_connection_fee_dollars = 7.50
932
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
933
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
934
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
935
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 186
936
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -177
937
+ expected_bills = _get_expected_bills(@expected_bills)
938
+ _check_bills(expected_bills, actual_bills)
939
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
940
+ end
941
+
942
+ def test_detailed_pv_none_min_monthly_charge
943
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate Min Monthly Charge.json'
944
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
945
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_none_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
946
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 96
947
+ @expected_bills['Test: Electricity: Energy (USD)'] = 632
948
+ expected_bills = _get_expected_bills(@expected_bills)
949
+ _check_bills(expected_bills, actual_bills)
950
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
951
+ end
952
+
953
+ def test_detailed_pv_none_min_annual_charge
954
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate Min Annual Charge.json'
955
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
956
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_none_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
957
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 96
958
+ @expected_bills['Test: Electricity: Energy (USD)'] = 632
959
+ expected_bills = _get_expected_bills(@expected_bills)
960
+ _check_bills(expected_bills, actual_bills)
961
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
962
+ end
963
+
964
+ def test_detailed_pv_1kW_net_metering_user_excess_rate_min_monthly_charge
965
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate Min Monthly Charge.json'
966
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
967
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
968
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
969
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 96
970
+ @expected_bills['Test: Electricity: Energy (USD)'] = 632
971
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -177
972
+ expected_bills = _get_expected_bills(@expected_bills)
973
+ _check_bills(expected_bills, actual_bills)
974
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
975
+ end
976
+
977
+ def test_detailed_pv_1kW_net_metering_user_excess_rate_min_annual_charge
978
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate Min Annual Charge.json'
979
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
980
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
981
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
982
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 96
983
+ @expected_bills['Test: Electricity: Energy (USD)'] = 632
984
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -177
985
+ expected_bills = _get_expected_bills(@expected_bills)
986
+ _check_bills(expected_bills, actual_bills)
987
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
988
+ end
989
+
990
+ def test_detailed_pv_10kW_net_metering_user_excess_rate_min_monthly_charge
991
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate Min Monthly Charge.json'
992
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
993
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
994
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
995
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 180
996
+ @expected_bills['Test: Electricity: Energy (USD)'] = 632
997
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -920
998
+ expected_bills = _get_expected_bills(@expected_bills)
999
+ _check_bills(expected_bills, actual_bills)
1000
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
1001
+ end
1002
+
1003
+ def test_detailed_pv_10kW_net_metering_user_excess_rate_min_annual_charge
1004
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate Min Annual Charge.json'
1005
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
1006
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
1007
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
1008
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 200
1009
+ @expected_bills['Test: Electricity: Energy (USD)'] = 632
1010
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -920
1011
+ expected_bills = _get_expected_bills(@expected_bills)
1012
+ _check_bills(expected_bills, actual_bills)
1013
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
1014
+ end
1015
+
1016
+ def test_detailed_pv_10kW_net_metering_retail_excess_rate_min_monthly_charge
1017
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate Min Monthly Charge.json'
1018
+ @hpxml_header.utility_bill_scenarios[-1].pv_net_metering_annual_excess_sellback_rate_type = HPXML::PVAnnualExcessSellbackRateTypeRetailElectricityCost
1019
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
1020
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
1021
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
1022
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 180
1023
+ @expected_bills['Test: Electricity: Energy (USD)'] = 632
1024
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -1777
1025
+ expected_bills = _get_expected_bills(@expected_bills)
1026
+ _check_bills(expected_bills, actual_bills)
1027
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
1028
+ end
1029
+
1030
+ def test_detailed_pv_10kW_net_metering_retail_excess_rate_min_annual_charge
1031
+ @hpxml_header.utility_bill_scenarios[-1].elec_tariff_filepath = '../../ReportUtilityBills/resources/detailed_rates/Sample Flat Rate Min Annual Charge.json'
1032
+ @hpxml_header.utility_bill_scenarios[-1].pv_net_metering_annual_excess_sellback_rate_type = HPXML::PVAnnualExcessSellbackRateTypeRetailElectricityCost
1033
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 10000.0 / @hpxml_bldg.pv_systems.size }
1034
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
1035
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_10kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
1036
+ @expected_bills['Test: Electricity: Fixed (USD)'] = 200
1037
+ @expected_bills['Test: Electricity: Energy (USD)'] = 632
1038
+ @expected_bills['Test: Electricity: PV Credit (USD)'] = -1777
1039
+ expected_bills = _get_expected_bills(@expected_bills)
1040
+ _check_bills(expected_bills, actual_bills)
1041
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
1042
+ end
1043
+
1044
+ def test_downloaded_utility_rates
1045
+ require 'rubygems/package'
1046
+ require 'zip'
1047
+ require 'tempfile'
1048
+
1049
+ @hpxml_bldg.pv_systems.each { |pv_system| pv_system.max_power_output = 1000.0 / @hpxml_bldg.pv_systems.size }
1050
+ utility_bill_scenario = @hpxml_header.utility_bill_scenarios[0]
1051
+ Zip.on_exists_proc = true
1052
+ Zip::File.open(File.join(File.dirname(__FILE__), '../resources/detailed_rates/openei_rates.zip')) do |zip_file|
1053
+ zip_file.each_with_index do |entry, i|
1054
+ break if i >= 1000 # No need to run *every* file, that will take a while
1055
+ next unless entry.file?
1056
+
1057
+ tmpdir = Dir.tmpdir
1058
+ tmpfile = Tempfile.new(['rate', '.json'], tmpdir)
1059
+ tmp_path = tmpfile.path.to_s
1060
+
1061
+ File.open(tmp_path, 'wb') do |f|
1062
+ f.print entry.get_input_stream.read
1063
+
1064
+ utility_bill_scenario.elec_tariff_filepath = tmp_path
1065
+ File.delete(@bills_csv) if File.exist? @bills_csv
1066
+ File.delete(@bills_monthly_csv) if File.exist? @bills_monthly_csv
1067
+ actual_bills, actual_monthly_bills = _bill_calcs(@fuels_pv_1kw_detailed, @hpxml_header, @hpxml.buildings, utility_bill_scenario)
1068
+ if !File.exist?(@bills_csv)
1069
+ flunk "#{entry.name} was not successful."
1070
+ end
1071
+ if entry.name.include? 'North Slope Borough Power Light - Aged or Handicappedseniors over 60'
1072
+ # No cost if < 600 kWh/month, which is the case for PV_None.csv
1073
+ assert_equal(0, actual_bills['Test: Electricity: Total (USD)'])
1074
+ else
1075
+ assert_operator(actual_bills['Test: Electricity: Total (USD)'], :>, 0)
1076
+ end
1077
+ _check_monthly_bills(actual_bills, actual_monthly_bills)
1078
+ end
1079
+ end
1080
+ end
1081
+ end
1082
+
1083
+ def _get_expected_bills(expected_bills)
1084
+ expected_bills['Test: Electricity: Total (USD)'] = expected_bills['Test: Electricity: Fixed (USD)'] + expected_bills['Test: Electricity: Energy (USD)'] + expected_bills['Test: Electricity: PV Credit (USD)']
1085
+ expected_bills['Test: Natural Gas: Total (USD)'] = expected_bills['Test: Natural Gas: Fixed (USD)'] + expected_bills['Test: Natural Gas: Energy (USD)']
1086
+ expected_bills['Test: Fuel Oil: Total (USD)'] = expected_bills['Test: Fuel Oil: Fixed (USD)'] + expected_bills['Test: Fuel Oil: Energy (USD)']
1087
+ expected_bills['Test: Propane: Total (USD)'] = expected_bills['Test: Propane: Fixed (USD)'] + expected_bills['Test: Propane: Energy (USD)']
1088
+ expected_bills['Test: Coal: Total (USD)'] = expected_bills['Test: Coal: Fixed (USD)'] + expected_bills['Test: Coal: Energy (USD)']
1089
+ expected_bills['Test: Wood Cord: Total (USD)'] = expected_bills['Test: Wood Cord: Fixed (USD)'] + expected_bills['Test: Wood Cord: Energy (USD)']
1090
+ expected_bills['Test: Wood Pellets: Total (USD)'] = expected_bills['Test: Wood Pellets: Fixed (USD)'] + expected_bills['Test: Wood Pellets: Energy (USD)']
1091
+ expected_bills['Test: Total (USD)'] = expected_bills['Test: Electricity: Total (USD)'] + expected_bills['Test: Natural Gas: Total (USD)'] + expected_bills['Test: Fuel Oil: Total (USD)'] + expected_bills['Test: Propane: Total (USD)'] + expected_bills['Test: Wood Cord: Total (USD)'] + expected_bills['Test: Wood Pellets: Total (USD)'] + expected_bills['Test: Coal: Total (USD)']
1092
+ return expected_bills
1093
+ end
1094
+
1095
+ def _check_bills(expected_bills, actual_bills)
1096
+ bills = expected_bills.keys | actual_bills.keys
1097
+ bills.each do |bill|
1098
+ assert(expected_bills.keys.include?(bill))
1099
+ if expected_bills[bill] != 0
1100
+ assert(actual_bills.keys.include?(bill))
1101
+ assert_in_delta(expected_bills[bill], actual_bills[bill], 1) # within a dollar
1102
+ end
1103
+ end
1104
+ end
1105
+
1106
+ def _check_monthly_bills(actual_bills, actual_monthly_bills)
1107
+ # Check sum of monthly equal to annual
1108
+ actual_bills.keys.each do |bill|
1109
+ assert(actual_monthly_bills.keys.include?(bill))
1110
+ assert_in_delta(actual_bills[bill], actual_monthly_bills[bill].sum, 0.1) # within 10 cents
1111
+ end
1112
+ end
1113
+
1114
+ def _load_timeseries(pv_size_kw, use_hourly_electricity)
1115
+ fuels = @measure.setup_fuel_outputs()
1116
+ columns = CSV.read(File.join(File.dirname(__FILE__), 'data.csv')).transpose
1117
+ columns.each do |col|
1118
+ col_name = col[0]
1119
+ next if col_name == 'Date/Time'
1120
+
1121
+ values = col[1..-1].map { |v| Float(v) }
1122
+
1123
+ if col_name == 'Electricity [kWh]'
1124
+ fuels[[FT::Elec, false]].timeseries = values
1125
+ elsif col_name == 'Gas [therm]'
1126
+ fuels[[FT::Gas, false]].timeseries = values
1127
+ elsif col_name == 'Propane [gal]'
1128
+ fuels[[FT::Propane, false]].timeseries = values
1129
+ elsif col_name == 'Oil [gal]'
1130
+ fuels[[FT::Oil, false]].timeseries = values
1131
+ elsif col_name == "PV_#{pv_size_kw}kW [kWh]"
1132
+ fuels[[FT::Elec, true]].timeseries = values
1133
+ end
1134
+ end
1135
+
1136
+ fuels.values.each do |fuel|
1137
+ fuel.timeseries = [0] * fuels[[FT::Elec, false]].timeseries.size if fuel.timeseries.empty?
1138
+ end
1139
+
1140
+ # Convert hourly data to monthly data as appropriate
1141
+ num_days_in_month = Constants.NumDaysInMonths(2002) # Arbitrary non-leap year
1142
+ fuels.each do |(fuel_type, _is_production), fuel|
1143
+ next unless fuel_type != FT::Elec || (fuel_type == FT::Elec && !use_hourly_electricity)
1144
+
1145
+ ts_data = fuel.timeseries.dup
1146
+ fuel.timeseries = []
1147
+ start_day = 0
1148
+ num_days_in_month.each do |num_days|
1149
+ fuel.timeseries << ts_data[start_day * 24..(start_day + num_days) * 24 - 1].sum
1150
+ start_day += num_days
1151
+ end
1152
+ end
1153
+
1154
+ return fuels
1155
+ end
1156
+
1157
+ def _bill_calcs(fuels, header, hpxml_buildings, utility_bill_scenario)
1158
+ runner = OpenStudio::Measure::OSRunner.new(OpenStudio::WorkflowJSON.new)
1159
+ args = { output_format: 'csv', include_annual_bills: true, include_monthly_bills: true }
1160
+
1161
+ utility_rates, utility_bills = @measure.setup_utility_outputs()
1162
+ monthly_fee = @measure.get_monthly_fee(utility_bill_scenario, hpxml_buildings)
1163
+ @measure.get_utility_rates(@hpxml_path, fuels, utility_rates, utility_bill_scenario, monthly_fee)
1164
+ @measure.get_utility_bills(fuels, utility_rates, utility_bills, utility_bill_scenario, header)
1165
+
1166
+ # Annual
1167
+ output_path = File.join(File.dirname(__FILE__), "results_bills.#{args[:output_format]}")
1168
+ @measure.report_runperiod_output_results(runner, args, utility_bills, output_path, utility_bill_scenario.name)
1169
+
1170
+ # Check written values exist and are registered
1171
+ assert(File.exist?(@bills_csv))
1172
+ actual_bills = _get_actual_bills(@bills_csv)
1173
+
1174
+ _check_for_runner_registered_values(runner, nil, actual_bills)
1175
+
1176
+ # Monthly
1177
+ timestamps = (1..12).to_a
1178
+ monthly_data = []
1179
+ monthly_output_path = File.join(File.dirname(__FILE__), "results_bills_monthly.#{args[:output_format]}")
1180
+ @measure.get_monthly_output_results(args, utility_bills, utility_bill_scenario.name, monthly_data, header)
1181
+ @measure.report_monthly_output_results(runner, args, timestamps, monthly_data, monthly_output_path)
1182
+
1183
+ # Check written values exist
1184
+ assert(File.exist?(@bills_monthly_csv))
1185
+ actual_monthly_bills = _get_actual_monthly_bills(@bills_monthly_csv)
1186
+
1187
+ return actual_bills, actual_monthly_bills
1188
+ end
1189
+
1190
+ def _test_measure(hpxml: nil, expected_errors: [], expected_warnings: [])
1191
+ # Run measure via OSW
1192
+ require 'json'
1193
+ template_osw = File.join(File.dirname(__FILE__), '..', '..', 'workflow', 'template-run-hpxml.osw')
1194
+ workflow = OpenStudio::WorkflowJSON.new(template_osw)
1195
+ json = JSON.parse(workflow.to_s)
1196
+
1197
+ # Update measure args
1198
+ steps = OpenStudio::WorkflowStepVector.new
1199
+ found_args = []
1200
+ json['steps'].each do |json_step|
1201
+ step = OpenStudio::MeasureStep.new(json_step['measure_dir_name'])
1202
+ json_step['arguments'].each do |json_arg_name, json_arg_val|
1203
+ if @args_hash.keys.include? json_arg_name
1204
+ # Override value
1205
+ found_args << json_arg_name
1206
+ json_arg_val = @args_hash[json_arg_name]
1207
+ end
1208
+ step.setArgument(json_arg_name, json_arg_val)
1209
+ end
1210
+ steps.push(step)
1211
+ end
1212
+ workflow.setWorkflowSteps(steps)
1213
+ osw_path = File.join(File.dirname(template_osw), 'test.osw')
1214
+ workflow.saveAs(osw_path)
1215
+ assert_equal(@args_hash.size, found_args.size)
1216
+
1217
+ # Run OSW
1218
+ command = "#{OpenStudio.getOpenStudioCLI} run -w #{osw_path}"
1219
+ success = system(command)
1220
+ assert(success)
1221
+
1222
+ # Cleanup
1223
+ File.delete(osw_path)
1224
+
1225
+ bills_csv = File.join(File.dirname(template_osw), 'run', 'results_bills.csv')
1226
+ bills_monthly_csv = File.join(File.dirname(template_osw), 'run', 'results_bills_monthly.csv')
1227
+
1228
+ # Check warnings/errors
1229
+ log_lines = File.readlines(File.join(File.dirname(template_osw), 'run', 'run.log')).map(&:strip)
1230
+ expected_errors.each do |expected_error|
1231
+ assert(log_lines.any? { |line| line.include?(' ERROR]') && line.include?(expected_error) })
1232
+ end
1233
+ expected_warnings.each do |expected_warning|
1234
+ assert(log_lines.any? { |line| line.include?(' WARN]') && line.include?(expected_warning) })
1235
+ end
1236
+
1237
+ if !hpxml.nil?
1238
+ return if hpxml.header.utility_bill_scenarios.empty?
1239
+ elsif (not expected_errors.empty?) || (not expected_warnings.empty?)
1240
+ return
1241
+ end
1242
+
1243
+ # Check written values exist and are registered
1244
+ assert(File.exist?(bills_csv))
1245
+ actual_bills = _get_actual_bills(bills_csv)
1246
+
1247
+ _check_for_runner_registered_values(nil, File.join(File.dirname(bills_csv), 'results.json'), actual_bills)
1248
+
1249
+ assert(File.exist?(bills_monthly_csv))
1250
+ actual_monthly_bills = _get_actual_monthly_bills(bills_monthly_csv)
1251
+
1252
+ return actual_bills, actual_monthly_bills
1253
+ end
1254
+
1255
+ def _get_actual_bills(bills_csv)
1256
+ actual_bills = {}
1257
+ File.readlines(bills_csv).each do |line|
1258
+ next if line.strip.empty?
1259
+
1260
+ key, value = line.split(',').map { |x| x.strip }
1261
+ actual_bills[key] = Float(value)
1262
+ end
1263
+
1264
+ return actual_bills
1265
+ end
1266
+
1267
+ def _get_actual_monthly_bills(bills_monthly_csv)
1268
+ lines = File.readlines(bills_monthly_csv)
1269
+ cols = lines[0].strip.split(',')
1270
+ units = lines[1].strip.split(',')[1]
1271
+
1272
+ actual_monthly_bills = {}
1273
+ cols.each do |col|
1274
+ col += " (#{units})"
1275
+ actual_monthly_bills[col] = []
1276
+ end
1277
+
1278
+ lines[2..-1].each do |row|
1279
+ row.strip.split(',').each_with_index do |v, i|
1280
+ col = cols[i] + " (#{units})"
1281
+ actual_monthly_bills[col] << Float(v) if !col.include?('Time')
1282
+ end
1283
+ end
1284
+ actual_monthly_bills.delete('Time' + " (#{units})")
1285
+
1286
+ return actual_monthly_bills
1287
+ end
1288
+
1289
+ def _check_for_runner_registered_values(runner, results_json, actual_bills)
1290
+ if !runner.nil?
1291
+ runner_bills = {}
1292
+ runner.result.stepValues.each do |step_value|
1293
+ runner_bills[step_value.name] = get_value_from_workflow_step_value(step_value)
1294
+ end
1295
+ elsif !results_json.nil?
1296
+ require 'json'
1297
+ runner_bills = JSON.parse(File.read(results_json))
1298
+ runner_bills = runner_bills['ReportUtilityBills']
1299
+ end
1300
+
1301
+ actual_bills.each do |name, value|
1302
+ name = OpenStudio::toUnderscoreCase(name).chomp('_')
1303
+
1304
+ assert_includes(runner_bills.keys, name)
1305
+ assert_equal(value, runner_bills[name])
1306
+ end
1307
+ end
1308
+ end