openstudio-standards 0.2.12.rc4 → 0.2.13.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (541) hide show
  1. checksums.yaml +4 -4
  2. data/data/geometry/ASHRAE90120162019HighriseApartment.json +1042 -0
  3. data/data/geometry/ASHRAE90120162019Hospital.json +199 -0
  4. data/data/geometry/ASHRAE90120162019LargeHotel.json +73 -0
  5. data/data/geometry/ASHRAE90120162019LargeOffice.json +109 -0
  6. data/data/geometry/ASHRAE90120162019SecondarySchool.json +205 -0
  7. data/data/geometry/ASHRAECourthouse.json +112 -0
  8. data/data/geometry/ASHRAECourthouse.osm +26470 -0
  9. data/data/geometry/ASHRAELargeHotel.osm +11 -1
  10. data/data/geometry/ASHRAELargeOffice.json +4 -0
  11. data/data/geometry/ASHRAESmallDataCenter.json +1 -1
  12. data/data/standards/OpenStudio_Standards-ashrae_90_1(space_types).xlsx +0 -0
  13. data/data/standards/OpenStudio_Standards-ashrae_90_1-ALL-comstock(space_types).xlsx +0 -0
  14. data/data/standards/OpenStudio_Standards-ashrae_90_1.xlsx +0 -0
  15. data/data/standards/exclude_list.csv +19 -0
  16. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.boilers.json +49 -0
  17. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.chillers.json +293 -0
  18. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.construction_properties.json +25426 -0
  19. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.construction_sets.json +1600 -0
  20. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.economizers.json +564 -0
  21. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.elevators.json +349 -0
  22. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.ext_ltg.json +164 -0
  23. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.ground_temperatures.json +10663 -0
  24. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.heat_pumps.json +508 -0
  25. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.heat_pumps_heating.json +156 -0
  26. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.heat_rejection.json +44 -0
  27. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.motors.json +184 -0
  28. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.prototype_inputs.json +3094 -0
  29. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.ref_cases.json +829 -0
  30. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.ref_lnup.json +562 -0
  31. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_compressors.json +52 -0
  32. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_condenser.json +220 -0
  33. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_system.json +156 -0
  34. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.refrigeration_walkins.json +1316 -0
  35. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.spc_typ.json +21446 -0
  36. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.unitary_acs.json +554 -0
  37. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.water_heaters.json +68 -0
  38. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.water_source_heat_pumps.json +28 -0
  39. data/data/standards/export/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.water_source_heat_pumps_heating.json +12 -0
  40. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.boilers.json +49 -0
  41. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.chillers.json +293 -0
  42. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.construction_properties.json +12487 -0
  43. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.construction_sets.json +1600 -0
  44. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.economizers.json +564 -0
  45. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.elevators.json +349 -0
  46. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.ext_ltg.json +164 -0
  47. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.ground_temperatures.json +10663 -0
  48. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.heat_pumps.json +466 -0
  49. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.heat_pumps_heating.json +137 -0
  50. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.heat_rejection.json +44 -0
  51. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.motors.json +184 -0
  52. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.prototype_inputs.json +3094 -0
  53. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.ref_cases.json +829 -0
  54. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.ref_lnup.json +562 -0
  55. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_compressors.json +52 -0
  56. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_condenser.json +220 -0
  57. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_system.json +156 -0
  58. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.refrigeration_walkins.json +1316 -0
  59. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.spc_typ.json +21380 -0
  60. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.unitary_acs.json +554 -0
  61. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.water_heaters.json +68 -0
  62. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.water_source_heat_pumps.json +28 -0
  63. data/data/standards/export/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.water_source_heat_pumps_heating.json +12 -0
  64. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.boilers.json +49 -0
  65. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.chillers.json +395 -0
  66. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.construction_properties.json +12487 -0
  67. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.construction_sets.json +1600 -0
  68. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.economizers.json +592 -0
  69. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.elevators.json +349 -0
  70. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.energy_recovery.json +550 -0
  71. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.ext_ltg.json +164 -0
  72. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.ground_temperatures.json +10663 -0
  73. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.heat_pumps.json +466 -0
  74. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.heat_pumps_heating.json +137 -0
  75. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.heat_rejection.json +44 -0
  76. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.motors.json +238 -0
  77. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.prototype_inputs.json +3094 -0
  78. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.ref_cases.json +829 -0
  79. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.ref_lnup.json +562 -0
  80. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_compressors.json +52 -0
  81. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_condenser.json +220 -0
  82. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_system.json +156 -0
  83. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.refrigeration_walkins.json +1316 -0
  84. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.spc_typ.json +21548 -0
  85. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.unitary_acs.json +554 -0
  86. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.water_heaters.json +68 -0
  87. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.water_source_heat_pumps.json +28 -0
  88. data/data/standards/export/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.water_source_heat_pumps_heating.json +12 -0
  89. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.boilers.json +64 -0
  90. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.chillers.json +871 -0
  91. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.construction_properties.json +12487 -0
  92. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.construction_sets.json +1600 -0
  93. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.economizers.json +592 -0
  94. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.elevators.json +349 -0
  95. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.energy_recovery.json +1096 -0
  96. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.ext_ltg.json +164 -0
  97. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.ground_temperatures.json +10663 -0
  98. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.heat_pumps.json +886 -0
  99. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.heat_pumps_heating.json +194 -0
  100. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.heat_rejection.json +44 -0
  101. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.motors.json +247 -0
  102. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.prototype_inputs.json +3094 -0
  103. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.ref_cases.json +829 -0
  104. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.ref_lnup.json +562 -0
  105. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_compressors.json +52 -0
  106. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_condenser.json +220 -0
  107. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_system.json +156 -0
  108. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.refrigeration_walkins.json +1316 -0
  109. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.spc_typ.json +22079 -0
  110. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.unitary_acs.json +994 -0
  111. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.water_heaters.json +68 -0
  112. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.water_source_heat_pumps.json +28 -0
  113. data/data/standards/export/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.water_source_heat_pumps_heating.json +12 -0
  114. data/data/standards/manage_OpenStudio_Standards.rb +87 -37
  115. data/data/standards/metadata_units_OpenStudio_Standards-ashrae_90_1-ALL-comstockspace_types.csv +236 -0
  116. data/data/standards/metadata_units_OpenStudio_Standards-ashrae_90_1.csv +622 -0
  117. data/data/standards/metadata_units_OpenStudio_Standards-ashrae_90_1space_types.csv +191 -0
  118. data/data/standards/openstudio_standards_duplicates_log.csv +17 -0
  119. data/data/standards/test_performance_expected_dd_results.csv +1971 -1171
  120. data/lib/openstudio-standards.rb +76 -18
  121. data/lib/openstudio-standards/btap/btap.model.rb +1 -1
  122. data/lib/openstudio-standards/btap/economics.rb +14 -11
  123. data/lib/openstudio-standards/btap/envelope.rb +185 -257
  124. data/lib/openstudio-standards/btap/fileio.rb +1 -0
  125. data/lib/openstudio-standards/btap/geometry.rb +21 -1
  126. data/lib/openstudio-standards/btap/measures.rb +12 -11
  127. data/lib/openstudio-standards/btap/schedules.rb +3 -12
  128. data/lib/openstudio-standards/hvac_sizing/Siz.AirLoopHVACUnitaryHeatPumpAirToAirMultiSpeed.rb +178 -0
  129. data/lib/openstudio-standards/hvac_sizing/Siz.CoilCoolingDXMultiSpeed.rb +8 -8
  130. data/lib/openstudio-standards/hvac_sizing/Siz.Model.rb +3 -0
  131. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.PumpVariableSpeed.rb +28 -0
  132. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.FanVariableVolume.rb +0 -1
  133. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.PumpVariableSpeed.rb +28 -0
  134. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.Model.rb +53 -2
  135. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.PumpVariableSpeed.rb +29 -0
  136. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.Model.rb +157 -2
  137. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.PumpVariableSpeed.rb +29 -0
  138. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +24 -0
  139. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.FanConstantVolume.rb +32 -0
  140. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.FanOnOff.rb +33 -0
  141. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.FanVariableVolume.rb +32 -0
  142. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.elevators.rb +25 -0
  143. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Model.rb +366 -0
  144. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.PumpVariableSpeed.rb +144 -0
  145. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.hvac_systems.rb +11 -0
  146. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +24 -0
  147. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.FanConstantVolume.rb +32 -0
  148. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.FanOnOff.rb +33 -0
  149. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.FanVariableVolume.rb +32 -0
  150. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.elevators.rb +25 -0
  151. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Model.rb +367 -0
  152. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.PumpVariableSpeed.rb +144 -0
  153. data/lib/openstudio-standards/prototypes/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.hvac_systems.rb +11 -0
  154. data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.AirTerminalSingleDuctVAVReheat.rb +0 -1
  155. data/lib/openstudio-standards/prototypes/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.AirTerminalSingleDuctVAVReheat.rb +0 -1
  156. data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.HeatExchangerAirToAirSensibleAndLatent.rb +1 -1
  157. data/lib/openstudio-standards/prototypes/ashrae_90_1/nrel_nze_ready_2017/nrel_zne_ready_2017.Model.rb +1 -1
  158. data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.HeatExchangerAirToAirSensibleAndLatent.rb +1 -1
  159. data/lib/openstudio-standards/prototypes/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.Model.rb +1 -1
  160. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.College.rb +3 -3
  161. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Courthouse.rb +74 -0
  162. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.FullServiceRestaurant.rb +46 -30
  163. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.HighRiseApartment.rb +23 -8
  164. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Hospital.rb +26 -15
  165. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Laboratory.rb +8 -11
  166. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeDataCenterHighITE.rb +54 -60
  167. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeDataCenterLowITE.rb +56 -60
  168. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeHotel.rb +38 -12
  169. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeOffice.rb +218 -134
  170. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.LargeOfficeDetailed.rb +6 -2
  171. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MediumOffice.rb +230 -134
  172. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MediumOfficeDetailed.rb +60 -62
  173. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.MidriseApartment.rb +25 -15
  174. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Outpatient.rb +34 -22
  175. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.PrimarySchool.rb +31 -7
  176. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.QuickServiceRestaurant.rb +43 -28
  177. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.RetailStandalone.rb +48 -38
  178. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.RetailStripmall.rb +9 -5
  179. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SecondarySchool.rb +575 -345
  180. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallDataCenterHighITE.rb +13 -19
  181. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallDataCenterLowITE.rb +13 -17
  182. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallHotel.rb +9 -5
  183. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallOffice.rb +79 -51
  184. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SmallOfficeDetailed.rb +60 -60
  185. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SuperMarket.rb +2 -4
  186. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.SuperTallBuilding.rb +133 -120
  187. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.TallBuilding.rb +124 -112
  188. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Warehouse.rb +138 -66
  189. data/lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb +7275 -199
  190. data/lib/openstudio-standards/prototypes/common/objects/Prototype.AirConditionerVariableRefrigerantFlow.rb +35 -35
  191. data/lib/openstudio-standards/prototypes/common/objects/Prototype.BoilerHotWater.rb +2 -2
  192. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CentralAirSourceHeatPump.rb +2 -2
  193. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingDXSingleSpeed.rb +3 -3
  194. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingDXTwoSpeed.rb +1 -1
  195. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWater.rb +2 -2
  196. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilCoolingWaterToAirHeatPumpEquationFit.rb +2 -2
  197. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingDXSingleSpeed.rb +1 -1
  198. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingElectric.rb +2 -2
  199. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWater.rb +2 -2
  200. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoilHeatingWaterToAirHeatPumpEquationFit.rb +2 -2
  201. data/lib/openstudio-standards/prototypes/common/objects/Prototype.CoolingTower.rb +1 -1
  202. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Fan.rb +4 -3
  203. data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanConstantVolume.rb +7 -8
  204. data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanOnOff.rb +7 -8
  205. data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanVariableVolume.rb +13 -14
  206. data/lib/openstudio-standards/prototypes/common/objects/Prototype.FanZoneExhaust.rb +7 -5
  207. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.elevators.rb +4 -1
  208. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.exterior_lights.rb +0 -1
  209. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.hvac.rb +25 -14
  210. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb +474 -89
  211. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.swh.rb +35 -33
  212. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Pump.rb +3 -0
  213. data/lib/openstudio-standards/prototypes/common/objects/Prototype.PumpVariableSpeed.rb +72 -0
  214. data/lib/openstudio-standards/prototypes/common/objects/Prototype.ServiceWaterHeating.rb +120 -120
  215. data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +142 -154
  216. data/lib/openstudio-standards/prototypes/common/objects/Prototype.radiant_system_controls.rb +9 -3
  217. data/lib/openstudio-standards/prototypes/common/objects/Prototype.refrigeration.rb +11 -5
  218. data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +26 -14
  219. data/lib/openstudio-standards/prototypes/common/prototype_metaprogramming.rb +270 -247
  220. data/lib/openstudio-standards/prototypes/deer/deer.Model.rb +1 -1
  221. data/lib/openstudio-standards/refs/references.rb +5 -2
  222. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +70 -51
  223. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctVAVReheat.rb +0 -1
  224. data/lib/openstudio-standards/standards/Standards.BoilerHotWater.rb +0 -1
  225. data/lib/openstudio-standards/standards/Standards.BuildingStory.rb +1 -0
  226. data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +2 -4
  227. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXMultiSpeed.rb +91 -2
  228. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXSingleSpeed.rb +4 -5
  229. data/lib/openstudio-standards/standards/Standards.CoilCoolingDXTwoSpeed.rb +0 -1
  230. data/lib/openstudio-standards/standards/Standards.CoilCoolingWaterToAirHeatPumpEquationFit.rb +1 -1
  231. data/lib/openstudio-standards/standards/Standards.CoilDX.rb +30 -9
  232. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXMultiSpeed.rb +2 -1
  233. data/lib/openstudio-standards/standards/Standards.CoilHeatingDXSingleSpeed.rb +3 -1
  234. data/lib/openstudio-standards/standards/Standards.CoilHeatingGas.rb +0 -3
  235. data/lib/openstudio-standards/standards/Standards.CoilHeatingGasMultiStage.rb +37 -1
  236. data/lib/openstudio-standards/standards/Standards.CoilHeatingWaterToAirHeatPumpEquationFit.rb +1 -3
  237. data/lib/openstudio-standards/standards/Standards.Construction.rb +124 -118
  238. data/lib/openstudio-standards/standards/Standards.CoolingTower.rb +0 -1
  239. data/lib/openstudio-standards/standards/Standards.CoolingTowerSingleSpeed.rb +0 -1
  240. data/lib/openstudio-standards/standards/Standards.CoolingTowerTwoSpeed.rb +0 -1
  241. data/lib/openstudio-standards/standards/Standards.CoolingTowerVariableSpeed.rb +0 -1
  242. data/lib/openstudio-standards/standards/Standards.Fan.rb +0 -1
  243. data/lib/openstudio-standards/standards/Standards.FanConstantVolume.rb +0 -1
  244. data/lib/openstudio-standards/standards/Standards.FanOnOff.rb +0 -1
  245. data/lib/openstudio-standards/standards/Standards.FanVariableVolume.rb +2 -4
  246. data/lib/openstudio-standards/standards/Standards.FanZoneExhaust.rb +0 -1
  247. data/lib/openstudio-standards/standards/Standards.FluidCooler.rb +10 -3
  248. data/lib/openstudio-standards/standards/Standards.HeaderedPumpsConstantSpeed.rb +0 -1
  249. data/lib/openstudio-standards/standards/Standards.HeaderedPumpsVariableSpeed.rb +0 -1
  250. data/lib/openstudio-standards/standards/Standards.Model.rb +305 -247
  251. data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +2 -0
  252. data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +11 -9
  253. data/lib/openstudio-standards/standards/Standards.Pump.rb +0 -1
  254. data/lib/openstudio-standards/standards/Standards.PumpConstantSpeed.rb +0 -1
  255. data/lib/openstudio-standards/standards/Standards.PumpVariableSpeed.rb +0 -1
  256. data/lib/openstudio-standards/standards/Standards.ScheduleCompact.rb +0 -1
  257. data/lib/openstudio-standards/standards/Standards.ScheduleConstant.rb +0 -1
  258. data/lib/openstudio-standards/standards/Standards.ScheduleRuleset.rb +103 -121
  259. data/lib/openstudio-standards/standards/Standards.Space.rb +42 -35
  260. data/lib/openstudio-standards/standards/Standards.SpaceType.rb +9 -17
  261. data/lib/openstudio-standards/standards/Standards.SubSurface.rb +25 -27
  262. data/lib/openstudio-standards/standards/Standards.Surface.rb +97 -52
  263. data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +76 -25
  264. data/lib/openstudio-standards/standards/Standards.WaterHeaterMixed.rb +6 -7
  265. data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +85 -7
  266. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1.Standards.FanVariableVolume.rb +0 -1
  267. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.AirLoopHVAC.rb +10 -2
  268. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.Model.rb +2 -2
  269. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/comstock_ashrae_90_1_2004/data/ashrae_90_1.schedules.json +63 -99
  270. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/comstock_ashrae_90_1_2004/data/comstock_ashrae_90_1_2004.ext_ltg.json +7 -7
  271. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.construction_properties.json +2420 -0
  272. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.economizers.json +32 -0
  273. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.heat_rejection.json +9 -0
  274. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.prototype_inputs.json +70 -40
  275. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.spc_typ.json +105 -40
  276. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/data/ashrae_90_1_2004.unitary_acs.json +15 -15
  277. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/ashrae_90_1_2007.AirLoopHVAC.rb +5 -1
  278. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/comstock_ashrae_90_1_2007/data/ashrae_90_1.schedules.json +63 -99
  279. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/comstock_ashrae_90_1_2007/data/comstock_ashrae_90_1_2007.ext_ltg.json +7 -7
  280. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.construction_properties.json +1460 -0
  281. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.economizers.json +32 -0
  282. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.heat_rejection.json +9 -0
  283. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.prototype_inputs.json +123 -39
  284. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.spc_typ.json +104 -17
  285. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/data/ashrae_90_1_2007.unitary_acs.json +15 -15
  286. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.AirLoopHVAC.rb +32 -15
  287. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/ashrae_90_1_2010.Space.rb +1 -1
  288. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/comstock_ashrae_90_1_2010/data/ashrae_90_1.schedules.json +63 -99
  289. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/comstock_ashrae_90_1_2010/data/comstock_ashrae_90_1_2010.ext_ltg.json +7 -7
  290. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.construction_properties.json +1460 -0
  291. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.economizers.json +64 -0
  292. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.energy_recovery.json +52 -0
  293. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.heat_rejection.json +9 -0
  294. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.prototype_inputs.json +123 -39
  295. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.spc_typ.json +112 -25
  296. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/data/ashrae_90_1_2010.unitary_acs.json +5 -5
  297. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.AirLoopHVAC.rb +37 -14
  298. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/ashrae_90_1_2013.WaterHeaterMixed.rb +1 -1
  299. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/comstock_ashrae_90_1_2013/data/ashrae_90_1.schedules.json +63 -99
  300. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/comstock_ashrae_90_1_2013/data/comstock_ashrae_90_1_2013.ext_ltg.json +7 -7
  301. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.boilers.json +1 -1
  302. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.chillers.json +2 -2
  303. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.construction_properties.json +1460 -0
  304. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.economizers.json +64 -0
  305. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.energy_recovery.json +104 -0
  306. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.heat_rejection.json +9 -0
  307. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.prototype_inputs.json +125 -41
  308. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.spc_typ.json +172 -55
  309. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.unitary_acs.json +15 -15
  310. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.water_heaters.json +4 -4
  311. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/data/ashrae_90_1_2013.water_source_heat_pumps_heating.json +1 -1
  312. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirLoopHVAC.rb +456 -0
  313. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.AirTerminalSingleDuctVAVReheat.rb +24 -0
  314. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.CoolingTower.rb +19 -0
  315. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.CoolingTowerSingleSpeed.rb +5 -0
  316. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.CoolingTowerTwoSpeed.rb +5 -0
  317. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.CoolingTowerVariableSpeed.rb +16 -0
  318. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.FanVariableVolume.rb +37 -0
  319. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.Space.rb +189 -0
  320. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.ThermalZone.rb +57 -0
  321. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.ZoneHVACComponent.rb +22 -0
  322. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/ashrae_90_1_2016.rb +16 -0
  323. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.boilers.json +68 -0
  324. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.chillers.json +490 -0
  325. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.construction_properties.json +21244 -0
  326. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.construction_sets.json +2111 -0
  327. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.economizers.json +676 -0
  328. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.elevators.json +372 -0
  329. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.energy_recovery.json +1096 -0
  330. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.ext_ltg.json +169 -0
  331. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.heat_pumps.json +532 -0
  332. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.heat_pumps_heating.json +164 -0
  333. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.heat_rejection.json +49 -0
  334. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.motors.json +274 -0
  335. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.prototype_inputs.json +3094 -0
  336. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.ref_cases.json +854 -0
  337. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.ref_lnup.json +562 -0
  338. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.refrigeration_compressors.json +58 -0
  339. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.refrigeration_condenser.json +238 -0
  340. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.refrigeration_system.json +12 -0
  341. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.refrigeration_walkins.json +1316 -0
  342. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.spc_typ.json +23067 -0
  343. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.unitary_acs.json +648 -0
  344. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.water_heaters.json +72 -0
  345. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.water_source_heat_pumps.json +31 -0
  346. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/data/ashrae_90_1_2016.water_source_heat_pumps_heating.json +13 -0
  347. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +456 -0
  348. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirTerminalSingleDuctVAVReheat.rb +24 -0
  349. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoolingTower.rb +19 -0
  350. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoolingTowerSingleSpeed.rb +5 -0
  351. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoolingTowerTwoSpeed.rb +5 -0
  352. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.CoolingTowerVariableSpeed.rb +16 -0
  353. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.FanVariableVolume.rb +37 -0
  354. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.Space.rb +189 -0
  355. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.ThermalZone.rb +57 -0
  356. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.ZoneHVACComponent.rb +22 -0
  357. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.rb +16 -0
  358. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.boilers.json +68 -0
  359. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.chillers.json +490 -0
  360. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.construction_properties.json +21244 -0
  361. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.construction_sets.json +2111 -0
  362. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.economizers.json +676 -0
  363. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.elevators.json +372 -0
  364. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.energy_recovery.json +1096 -0
  365. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.ext_ltg.json +169 -0
  366. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.heat_pumps.json +664 -0
  367. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.heat_pumps_heating.json +204 -0
  368. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.heat_rejection.json +49 -0
  369. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.motors.json +274 -0
  370. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.prototype_inputs.json +3094 -0
  371. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.ref_cases.json +854 -0
  372. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.ref_lnup.json +562 -0
  373. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.refrigeration_compressors.json +58 -0
  374. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.refrigeration_condenser.json +238 -0
  375. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.refrigeration_system.json +12 -0
  376. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.refrigeration_walkins.json +1316 -0
  377. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.spc_typ.json +23067 -0
  378. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.unitary_acs.json +671 -0
  379. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.water_heaters.json +72 -0
  380. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.water_source_heat_pumps.json +31 -0
  381. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/data/ashrae_90_1_2019.water_source_heat_pumps_heating.json +13 -0
  382. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.constructions.json +1662 -332
  383. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.fans.json +1 -1
  384. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.materials.json +4994 -234
  385. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.schedules.json +1743 -161
  386. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/comstock_doe_ref_1980_2004/data/ashrae_90_1.schedules.json +63 -99
  387. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/comstock_doe_ref_1980_2004/data/comstock_doe_ref_1980_2004.ext_ltg.json +11 -11
  388. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.heat_rejection.json +9 -0
  389. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.prototype_inputs.json +8 -8
  390. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/data/doe_ref_1980_2004.spc_typ.json +5967 -2727
  391. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/doe_ref_1980_2004.Model.rb +4 -4
  392. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/comstock_doe_ref_pre_1980/data/ashrae_90_1.schedules.json +63 -99
  393. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/comstock_doe_ref_pre_1980/data/comstock_doe_ref_pre_1980.ext_ltg.json +10 -10
  394. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.heat_rejection.json +9 -0
  395. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.prototype_inputs.json +7 -7
  396. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/data/doe_ref_pre_1980.spc_typ.json +5920 -2700
  397. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/doe_ref_pre_1980.Model.rb +4 -4
  398. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/data/nrel_zne_ready_2017.heat_rejection.json +9 -0
  399. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/data/nrel_zne_ready_2017.spc_typ.json +2011 -1112
  400. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.AirLoopHVAC.rb +0 -1
  401. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.Model.rb +4 -4
  402. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.PlantLoop.rb +1 -1
  403. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.ZoneHVACComponent.rb +1 -1
  404. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/data/ze_aedg_multifamily.heat_rejection.json +9 -0
  405. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/data/ze_aedg_multifamily.spc_typ.json +1946 -1106
  406. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/data/ze_aedg_multifamily.water_heaters.json +2 -2
  407. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.AirLoopHVAC.rb +3 -6
  408. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.Model.rb +4 -4
  409. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.PlantLoop.rb +1 -1
  410. data/lib/openstudio-standards/standards/ashrae_90_1/ze_aedg_multifamily/ze_aedg_multifamily.ZoneHVACComponent.rb +1 -1
  411. data/lib/openstudio-standards/standards/cbes/cbes.Model.rb +1 -3
  412. data/lib/openstudio-standards/standards/cbes/cbes.rb +1 -1
  413. data/lib/openstudio-standards/standards/deer/deer.AirLoopHVAC.rb +8 -13
  414. data/lib/openstudio-standards/standards/deer/deer.Model.rb +2 -2
  415. data/lib/openstudio-standards/standards/deer/deer.PlanarSurface.rb +2 -0
  416. data/lib/openstudio-standards/standards/deer/deer.Space.rb +1 -1
  417. data/lib/openstudio-standards/standards/deer/deer_2011/deer_2011.rb +0 -1
  418. data/lib/openstudio-standards/standards/deer/deer_2014/deer_2014.Space.rb +0 -1
  419. data/lib/openstudio-standards/standards/deer/deer_2014/deer_2014.rb +0 -1
  420. data/lib/openstudio-standards/standards/deer/deer_2015/deer_2015.Space.rb +0 -1
  421. data/lib/openstudio-standards/standards/deer/deer_2017/deer_2017.Space.rb +0 -1
  422. data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.AirLoopHVAC.rb +1 -1
  423. data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.FanVariableVolume.rb +1 -1
  424. data/lib/openstudio-standards/standards/deer/deer_2020/deer_2020.Space.rb +0 -1
  425. data/lib/openstudio-standards/standards/deer/deer_2025/deer_2025.AirLoopHVAC.rb +1 -1
  426. data/lib/openstudio-standards/standards/deer/deer_2025/deer_2025.FanVariableVolume.rb +1 -1
  427. data/lib/openstudio-standards/standards/deer/deer_2025/deer_2025.Space.rb +0 -1
  428. data/lib/openstudio-standards/standards/deer/deer_2030/deer_2030.AirLoopHVAC.rb +1 -1
  429. data/lib/openstudio-standards/standards/deer/deer_2030/deer_2030.FanVariableVolume.rb +1 -1
  430. data/lib/openstudio-standards/standards/deer/deer_2030/deer_2030.Space.rb +0 -1
  431. data/lib/openstudio-standards/standards/deer/deer_2035/deer_2035.AirLoopHVAC.rb +1 -1
  432. data/lib/openstudio-standards/standards/deer/deer_2035/deer_2035.FanVariableVolume.rb +1 -1
  433. data/lib/openstudio-standards/standards/deer/deer_2035/deer_2035.Space.rb +0 -1
  434. data/lib/openstudio-standards/standards/deer/deer_2040/deer_2040.AirLoopHVAC.rb +1 -1
  435. data/lib/openstudio-standards/standards/deer/deer_2040/deer_2040.FanVariableVolume.rb +1 -1
  436. data/lib/openstudio-standards/standards/deer/deer_2040/deer_2040.Space.rb +0 -1
  437. data/lib/openstudio-standards/standards/deer/deer_2045/deer_2045.AirLoopHVAC.rb +1 -1
  438. data/lib/openstudio-standards/standards/deer/deer_2045/deer_2045.FanVariableVolume.rb +1 -1
  439. data/lib/openstudio-standards/standards/deer/deer_2045/deer_2045.Space.rb +0 -1
  440. data/lib/openstudio-standards/standards/deer/deer_2050/deer_2050.AirLoopHVAC.rb +1 -1
  441. data/lib/openstudio-standards/standards/deer/deer_2050/deer_2050.FanVariableVolume.rb +1 -1
  442. data/lib/openstudio-standards/standards/deer/deer_2050/deer_2050.Space.rb +0 -1
  443. data/lib/openstudio-standards/standards/deer/deer_2055/deer_2055.AirLoopHVAC.rb +1 -1
  444. data/lib/openstudio-standards/standards/deer/deer_2055/deer_2055.FanVariableVolume.rb +1 -1
  445. data/lib/openstudio-standards/standards/deer/deer_2055/deer_2055.Space.rb +0 -1
  446. data/lib/openstudio-standards/standards/deer/deer_2060/deer_2060.AirLoopHVAC.rb +1 -1
  447. data/lib/openstudio-standards/standards/deer/deer_2060/deer_2060.FanVariableVolume.rb +1 -1
  448. data/lib/openstudio-standards/standards/deer/deer_2060/deer_2060.Space.rb +0 -1
  449. data/lib/openstudio-standards/standards/deer/deer_2065/deer_2065.AirLoopHVAC.rb +1 -1
  450. data/lib/openstudio-standards/standards/deer/deer_2065/deer_2065.FanVariableVolume.rb +1 -1
  451. data/lib/openstudio-standards/standards/deer/deer_2065/deer_2065.Space.rb +0 -1
  452. data/lib/openstudio-standards/standards/deer/deer_2070/deer_2070.AirLoopHVAC.rb +1 -1
  453. data/lib/openstudio-standards/standards/deer/deer_2070/deer_2070.FanVariableVolume.rb +1 -1
  454. data/lib/openstudio-standards/standards/deer/deer_2070/deer_2070.Space.rb +0 -1
  455. data/lib/openstudio-standards/standards/deer/deer_2075/deer_2075.AirLoopHVAC.rb +1 -1
  456. data/lib/openstudio-standards/standards/deer/deer_2075/deer_2075.FanVariableVolume.rb +1 -1
  457. data/lib/openstudio-standards/standards/deer/deer_2075/deer_2075.Space.rb +0 -1
  458. data/lib/openstudio-standards/standards/icc_iecc/icc_iecc_2015/icc_iecc_2015.rb +0 -1
  459. data/lib/openstudio-standards/standards/necb/BTAP1980TO2010/btap_1980to2010.rb +2 -18
  460. data/lib/openstudio-standards/standards/necb/BTAP1980TO2010/data/space_types.json +1677 -1005
  461. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/btap_pre1980.rb +87 -15
  462. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/building_envelope.rb +31 -19
  463. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/data/curves.json +75 -0
  464. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/data/heat_pumps.json +16 -16
  465. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/data/space_types.json +1677 -1005
  466. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_3_and_8_single_speed.rb +16 -2
  467. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_4.rb +15 -0
  468. data/lib/openstudio-standards/standards/necb/BTAPPRE1980/hvac_system_6.rb +14 -0
  469. data/lib/openstudio-standards/standards/necb/ECMS/data/boiler_set.json +29 -0
  470. data/lib/openstudio-standards/standards/necb/ECMS/data/curves.json +913 -0
  471. data/lib/openstudio-standards/standards/necb/ECMS/data/equip_eff_lim.json +52 -0
  472. data/lib/openstudio-standards/standards/necb/ECMS/data/erv.json +109 -0
  473. data/lib/openstudio-standards/standards/necb/ECMS/data/furnace_set.json +23 -0
  474. data/lib/openstudio-standards/standards/necb/ECMS/data/heat_pumps.json +803 -0
  475. data/lib/openstudio-standards/standards/necb/ECMS/data/heat_pumps_heating.json +787 -0
  476. data/lib/openstudio-standards/standards/necb/ECMS/data/pv.json +112 -0
  477. data/lib/openstudio-standards/standards/necb/ECMS/data/shw_set.json +29 -0
  478. data/lib/openstudio-standards/standards/necb/ECMS/data/unitary_acs.json +50 -0
  479. data/lib/openstudio-standards/standards/necb/ECMS/ecms.rb +100 -0
  480. data/lib/openstudio-standards/standards/necb/ECMS/erv.rb +33 -0
  481. data/lib/openstudio-standards/standards/necb/ECMS/hvac_systems.rb +1729 -0
  482. data/lib/openstudio-standards/standards/necb/ECMS/nv.rb +189 -0
  483. data/lib/openstudio-standards/standards/necb/ECMS/pv_ground.rb +104 -0
  484. data/lib/openstudio-standards/standards/necb/NECB2011/autozone.rb +68 -33
  485. data/lib/openstudio-standards/standards/necb/NECB2011/beps_compliance_path.rb +24 -13
  486. data/lib/openstudio-standards/standards/necb/NECB2011/building_envelope.rb +110 -99
  487. data/lib/openstudio-standards/standards/necb/NECB2011/data/constants.json +24 -24
  488. data/lib/openstudio-standards/standards/necb/NECB2011/data/curves.json +50 -0
  489. data/lib/openstudio-standards/standards/necb/NECB2011/data/erv.json +31 -0
  490. data/lib/openstudio-standards/standards/necb/NECB2011/data/geometry/LowriseApartment.osm +39278 -0
  491. data/lib/openstudio-standards/standards/necb/NECB2011/data/led_lighting_data.json +2028 -0
  492. data/lib/openstudio-standards/standards/necb/NECB2011/data/space_types.json +1745 -1297
  493. data/lib/openstudio-standards/standards/necb/NECB2011/daylighting_control.md +70 -0
  494. data/lib/openstudio-standards/standards/necb/NECB2011/demand_controlled_ventilation.md +46 -0
  495. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_multi_speed.rb +69 -107
  496. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_1_single_speed.rb +41 -2
  497. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_2_and_5.rb +15 -0
  498. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +139 -141
  499. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +38 -2
  500. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +13 -0
  501. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +12 -0
  502. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +492 -240
  503. data/lib/openstudio-standards/standards/necb/NECB2011/led_lighting.md +51 -0
  504. data/lib/openstudio-standards/standards/necb/NECB2011/lighting.rb +75 -9
  505. data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +1229 -37
  506. data/lib/openstudio-standards/standards/necb/NECB2011/nv.md +74 -0
  507. data/lib/openstudio-standards/standards/necb/NECB2011/pv_ground.md +44 -0
  508. data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/necb_qaqc.rb +11 -3
  509. data/lib/openstudio-standards/standards/necb/NECB2011/qaqc/qaqc_resources/neb_end_use_prices.csv +39 -84
  510. data/lib/openstudio-standards/standards/necb/NECB2011/service_water_heating.rb +1 -1
  511. data/lib/openstudio-standards/standards/necb/NECB2015/data/led_lighting_data.json +2883 -0
  512. data/lib/openstudio-standards/standards/necb/NECB2015/data/space_types.json +2554 -1916
  513. data/lib/openstudio-standards/standards/necb/NECB2015/necb_2015.rb +32 -1
  514. data/lib/openstudio-standards/standards/necb/NECB2017/data/led_lighting_data.json +2883 -0
  515. data/lib/openstudio-standards/standards/necb/NECB2017/data/space_types.json +2554 -1916
  516. data/lib/openstudio-standards/standards/necb/NECB2017/necb_2017.rb +29 -0
  517. data/lib/openstudio-standards/standards/oeesc/oeesc_2014/oeesc_2014.rb +0 -1
  518. data/lib/openstudio-standards/standards/standard.rb +6 -5
  519. data/lib/openstudio-standards/utilities/Add_template_field_to_json.rb +3 -3
  520. data/lib/openstudio-standards/utilities/convert_surfaces_to_adiabatic_necb_8426.rb +54 -54
  521. data/lib/openstudio-standards/utilities/generate_prototype_database.rb +2 -2
  522. data/lib/openstudio-standards/utilities/generate_space_types.rb +3 -3
  523. data/lib/openstudio-standards/utilities/logging.rb +7 -7
  524. data/lib/openstudio-standards/utilities/necb_to_epw_map.rb +14 -14
  525. data/lib/openstudio-standards/utilities/os_sim_extract.rb +25 -25
  526. data/lib/openstudio-standards/utilities/rename_surfaces.rb +10 -13
  527. data/lib/openstudio-standards/utilities/round_surf_coords.rb +18 -20
  528. data/lib/openstudio-standards/utilities/sched_create.rb +39 -41
  529. data/lib/openstudio-standards/utilities/set_mult_to_adiabatic.rb +31 -31
  530. data/lib/openstudio-standards/utilities/simulation.rb +13 -21
  531. data/lib/openstudio-standards/utilities/speacetype_map_converter.rb +10 -11
  532. data/lib/openstudio-standards/utilities/sqlfile.rb +6 -8
  533. data/lib/openstudio-standards/utilities/template_measure/measure.rb +108 -0
  534. data/lib/openstudio-standards/utilities/template_measure/measure.xml +162 -0
  535. data/lib/openstudio-standards/utilities/template_measure/resources/BTAPMeasureHelper.rb +448 -0
  536. data/lib/openstudio-standards/utilities/template_measure/tests/test.rb +160 -0
  537. data/lib/openstudio-standards/utilities/weatherData1_xlsx_to_json.rb +23 -26
  538. data/lib/openstudio-standards/version.rb +1 -1
  539. data/lib/openstudio-standards/weather/Weather.Model.rb +112 -87
  540. data/lib/openstudio-standards/weather/Weather.stat_file.rb +17 -17
  541. metadata +236 -2
@@ -24,10 +24,12 @@ class Standard
24
24
  def planar_surface_apply_standard_construction(planar_surface, climate_zone, previous_construction_map = {})
25
25
  # Skip surfaces not in a space
26
26
  return previous_construction_map if planar_surface.space.empty?
27
+
27
28
  space = planar_surface.space.get
28
29
 
29
30
  # Skip surfaces that don't have a construction
30
31
  return previous_construction_map if planar_surface.construction.empty?
32
+
31
33
  construction = planar_surface.construction.get
32
34
 
33
35
  # Determine if residential or nonresidential
@@ -601,7 +601,7 @@ class Standard
601
601
  OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.PlantLoop', "For #{plant_loop.name} capacity of DistrictHeating #{dist_htg.name} is not available, total heating capacity of plant loop will be incorrect when applying standard.")
602
602
  end
603
603
  end
604
- end # End loop on plant_loop.supplyComponents
604
+ end
605
605
 
606
606
  total_heating_capacity_kbtu_per_hr = OpenStudio.convert(total_heating_capacity_w, 'W', 'kBtu/hr').get
607
607
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.PlantLoop', "For #{plant_loop.name}, heating capacity is #{total_heating_capacity_kbtu_per_hr.round} kBtu/hr.")
@@ -1303,7 +1303,8 @@ class Standard
1303
1303
  primary_fuels << component.heaterFuelType
1304
1304
  # And in this case we'll reuse this object
1305
1305
  combination_system = false
1306
- end # @Todo: not sure about whether it should be an elsif or not
1306
+ end
1307
+ # @TODO: not sure about whether it should be an elsif or not
1307
1308
  # Check the plant loop connection on the source side
1308
1309
  if component.secondaryPlantLoop.is_initialized
1309
1310
  source_plant_loop = component.secondaryPlantLoop.get
@@ -1325,7 +1326,8 @@ class Standard
1325
1326
  primary_fuels << component.heaterFuelType
1326
1327
  # And in this case we'll reuse this object
1327
1328
  combination_system = false
1328
- end # @Todo: not sure about whether it should be an elsif or not
1329
+ end
1330
+ # @TODO: not sure about whether it should be an elsif or not
1329
1331
  # Check the plant loop connection on the source side
1330
1332
  if component.secondaryPlantLoop.is_initialized
1331
1333
  source_plant_loop = component.secondaryPlantLoop.get
@@ -1363,22 +1365,22 @@ class Standard
1363
1365
  # end
1364
1366
 
1365
1367
  return fuels.uniq.sort, combination_system, storage_capacity, total_heating_capacity
1366
- end # end classify_swh_system_type
1368
+ end
1367
1369
 
1368
1370
  # This method calculates the capacity of a plant loop by multiplying the temp difference across the loop, the maximum flow rate,
1369
1371
  # the fluid density, and the fluid heat capacity (currently only works with water). This may be a little more approximate than the
1370
1372
  # heating and cooling capacity methods described above however is not limited to certain types of equipment and can be used for
1371
1373
  # condensing plant loops too.
1372
- def plant_loop_capacity_W_by_maxflow_and_deltaT_forwater (plant_loop)
1374
+ def plant_loop_capacity_W_by_maxflow_and_deltaT_forwater(plant_loop)
1373
1375
  plantloop_maxflowrate = nil
1374
- if plant_loop.fluidType != "Water"
1375
- OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.PlantLoop', "The fluid used in the plant loop named #{plant_loop.name.to_s} is not water. The current version of this method only calculates the capacity of plant loops that use water.")
1376
+ if plant_loop.fluidType != 'Water'
1377
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.PlantLoop', "The fluid used in the plant loop named #{plant_loop.name} is not water. The current version of this method only calculates the capacity of plant loops that use water.")
1376
1378
  end
1377
1379
  plantloop_maxflowrate = plant_loop_find_maximum_loop_flow_rate(plant_loop)
1378
1380
  plantloop_dt = plant_loop.sizingPlant.loopDesignTemperatureDifference.to_f
1379
1381
  # Plant loop capacity = temperature difference across plant loop * maximum plant loop flow rate * density of water (1000 kg/m^3) * see next line
1380
1382
  # Heat capacity of water (4180 J/(kg*K))
1381
- plantloop_capacity = plantloop_dt*plantloop_maxflowrate*1000*4180
1383
+ plantloop_capacity = plantloop_dt * plantloop_maxflowrate * 1000.0 * 4180.0
1382
1384
  return plantloop_capacity
1383
1385
  end
1384
- end
1386
+ end
@@ -1,4 +1,3 @@
1
-
2
1
  # A variety of pump calculation methods that are the same regardless of pump type.
3
2
  # These methods are available to PumpConstantSpeed, PumpVariableSpeed
4
3
  module Pump
@@ -1,4 +1,3 @@
1
-
2
1
  class Standard
3
2
  # @!group PumpConstantSpeed
4
3
 
@@ -1,4 +1,3 @@
1
-
2
1
  class Standard
3
2
  # @!group PumpVariableSpeed
4
3
 
@@ -1,4 +1,3 @@
1
-
2
1
  class Standard
3
2
  # @!group ScheduleCompact
4
3
 
@@ -1,4 +1,3 @@
1
-
2
1
  class Standard
3
2
  # @!group ScheduleConstant
4
3
 
@@ -1,4 +1,3 @@
1
-
2
1
  class Standard
3
2
  # @!group ScheduleRuleset
4
3
 
@@ -7,7 +6,6 @@ class Standard
7
6
  # @param [object] daySchedule
8
7
  # @return [Double]
9
8
  def day_schedule_equivalent_full_load_hrs(day_sch)
10
-
11
9
  # Determine the full load hours for just one day
12
10
  daily_flh = 0
13
11
  values = day_sch.values
@@ -281,7 +279,6 @@ class Standard
281
279
  # @param [Object] ScheduleRuleset
282
280
  # @return [Object] ScheduleRuleset
283
281
  def schedule_ruleset_cleanup_profiles(schedule_ruleset)
284
-
285
282
  # set start and end dates
286
283
  year_description = schedule_ruleset.model.yearDescription.get
287
284
  year = year_description.assumedYear
@@ -289,38 +286,38 @@ class Standard
289
286
  year_end_date = OpenStudio::Date.new(OpenStudio::MonthOfYear.new('December'), 31, year)
290
287
 
291
288
  indices_vector = schedule_ruleset.getActiveRuleIndices(year_start_date, year_end_date)
292
- most_frequent_item = indices_vector.uniq.max_by{ |i| indices_vector.count( i ) }
289
+ most_frequent_item = indices_vector.uniq.max_by { |i| indices_vector.count(i) }
293
290
  rule_vector = schedule_ruleset.scheduleRules
294
291
 
295
292
  replace_existing_default = false
296
- if indices_vector.include? -1 and most_frequent_item != -1
293
+ if indices_vector.include? -1 && most_frequent_item != -1
297
294
  # clean up if default isn't most common (e.g. sunday vs. weekday)
298
295
  # if no existing rules cover specific days of week, make new rule from default covering those days of week
299
- possible_days_of_week = ["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"]
296
+ possible_days_of_week = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']
300
297
  used_days_of_week = []
301
298
  rule_vector.each do |rule|
302
- if rule.applyMonday then used_days_of_week << "Monday" end
303
- if rule.applyTuesday then used_days_of_week << "Tuesday" end
304
- if rule.applyWednesday then used_days_of_week << "Wednesday" end
305
- if rule.applyThursday then used_days_of_week << "Thursday" end
306
- if rule.applyFriday then used_days_of_week << "Friday" end
307
- if rule.applySaturday then used_days_of_week << "Saturday" end
308
- if rule.applySunday then used_days_of_week << "Sunday" end
299
+ if rule.applyMonday then used_days_of_week << 'Monday' end
300
+ if rule.applyTuesday then used_days_of_week << 'Tuesday' end
301
+ if rule.applyWednesday then used_days_of_week << 'Wednesday' end
302
+ if rule.applyThursday then used_days_of_week << 'Thursday' end
303
+ if rule.applyFriday then used_days_of_week << 'Friday' end
304
+ if rule.applySaturday then used_days_of_week << 'Saturday' end
305
+ if rule.applySunday then used_days_of_week << 'Sunday' end
309
306
  end
310
307
  if used_days_of_week.uniq.size < possible_days_of_week.size
311
308
  replace_existing_default = true
312
- schedule_rule_new = OpenStudio::Model::ScheduleRule.new(schedule_ruleset,schedule_ruleset.defaultDaySchedule)
313
- if !used_days_of_week.include?("Monday") then schedule_rule_new.setApplyMonday(true) end
314
- if !used_days_of_week.include?("Tuesday") then schedule_rule_new.setApplyTuesday(true) end
315
- if !used_days_of_week.include?("Wednesday") then schedule_rule_new.setApplyWednesday(true) end
316
- if !used_days_of_week.include?("Thursday") then schedule_rule_new.setApplyThursday(true) end
317
- if !used_days_of_week.include?("Friday") then schedule_rule_new.setApplyFriday(true) end
318
- if !used_days_of_week.include?("Saturday") then schedule_rule_new.setApplySaturday(true) end
319
- if !used_days_of_week.include?("Sunday") then schedule_rule_new.setApplySunday(true) end
309
+ schedule_rule_new = OpenStudio::Model::ScheduleRule.new(schedule_ruleset, schedule_ruleset.defaultDaySchedule)
310
+ if !used_days_of_week.include?('Monday') then schedule_rule_new.setApplyMonday(true) end
311
+ if !used_days_of_week.include?('Tuesday') then schedule_rule_new.setApplyTuesday(true) end
312
+ if !used_days_of_week.include?('Wednesday') then schedule_rule_new.setApplyWednesday(true) end
313
+ if !used_days_of_week.include?('Thursday') then schedule_rule_new.setApplyThursday(true) end
314
+ if !used_days_of_week.include?('Friday') then schedule_rule_new.setApplyFriday(true) end
315
+ if !used_days_of_week.include?('Saturday') then schedule_rule_new.setApplySaturday(true) end
316
+ if !used_days_of_week.include?('Sunday') then schedule_rule_new.setApplySunday(true) end
320
317
  end
321
318
  end
322
319
 
323
- if !indices_vector.include? -1 or replace_existing_default
320
+ if !indices_vector.include?(-1) || replace_existing_default
324
321
 
325
322
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.ScheduleRuleset', "#{schedule_ruleset.name} does not used the default profile, it will be replaced.")
326
323
 
@@ -333,26 +330,27 @@ class Standard
333
330
  # if doesn't pass then make highest rule the new default to avoid any problems. School may not pass this test, woudl use last rule
334
331
  days_of_week_most_frequent_item = []
335
332
  schedule_rule_most_frequent = rule_vector[most_frequent_item]
336
- if schedule_rule_most_frequent.applyMonday then days_of_week_most_frequent_item << "Monday" end
337
- if schedule_rule_most_frequent.applyTuesday then days_of_week_most_frequent_item << "Tuesday" end
338
- if schedule_rule_most_frequent.applyWednesday then days_of_week_most_frequent_item << "Wednesday" end
339
- if schedule_rule_most_frequent.applyThursday then days_of_week_most_frequent_item << "Thursday" end
340
- if schedule_rule_most_frequent.applyFriday then days_of_week_most_frequent_item << "Friday" end
341
- if schedule_rule_most_frequent.applySaturday then days_of_week_most_frequent_item << "Saturday" end
342
- if schedule_rule_most_frequent.applySunday then days_of_week_most_frequent_item << "Sunday" end
333
+ if schedule_rule_most_frequent.applyMonday then days_of_week_most_frequent_item << 'Monday' end
334
+ if schedule_rule_most_frequent.applyTuesday then days_of_week_most_frequent_item << 'Tuesday' end
335
+ if schedule_rule_most_frequent.applyWednesday then days_of_week_most_frequent_item << 'Wednesday' end
336
+ if schedule_rule_most_frequent.applyThursday then days_of_week_most_frequent_item << 'Thursday' end
337
+ if schedule_rule_most_frequent.applyFriday then days_of_week_most_frequent_item << 'Friday' end
338
+ if schedule_rule_most_frequent.applySaturday then days_of_week_most_frequent_item << 'Saturday' end
339
+ if schedule_rule_most_frequent.applySunday then days_of_week_most_frequent_item << 'Sunday' end
343
340
 
344
341
  # loop through rules
345
342
  conflict_found = false
346
343
  rule_vector.each do |rule|
347
344
  next if rule == schedule_rule_most_frequent
345
+
348
346
  days_of_week_most_frequent_item.each do |day_of_week|
349
- if day_of_week == "Monday" and rule.applyMonday then conflict_found == true end
350
- if day_of_week == "Tuesday" and rule.applyTuesday then conflict_found == true end
351
- if day_of_week == "Wednesday" and rule.applyWednesday then conflict_found == true end
352
- if day_of_week == "Thursday" and rule.applyThursday then conflict_found == true end
353
- if day_of_week == "Friday" and rule.applyFriday then conflict_found == true end
354
- if day_of_week == "Saturday" and rule.applySaturday then conflict_found == true end
355
- if day_of_week == "Sunday" and rule.applySunday then conflict_found == true end
347
+ if (day_of_week == 'Monday') && rule.applyMonday then conflict_found == true end
348
+ if (day_of_week == 'Tuesday') && rule.applyTuesday then conflict_found == true end
349
+ if (day_of_week == 'Wednesday') && rule.applyWednesday then conflict_found == true end
350
+ if (day_of_week == 'Thursday') && rule.applyThursday then conflict_found == true end
351
+ if (day_of_week == 'Friday') && rule.applyFriday then conflict_found == true end
352
+ if (day_of_week == 'Saturday') && rule.applySaturday then conflict_found == true end
353
+ if (day_of_week == 'Sunday') && rule.applySunday then conflict_found == true end
356
354
  end
357
355
  end
358
356
  if conflict_found
@@ -385,8 +383,7 @@ class Standard
385
383
  # @param infer_hoo_for_non_assigned_objects [Bool] # attempt to get hoo for objects like swh with and exterior lighting
386
384
  # @param error_on_out_of_order [Bool] true will error if applying formula creates out of order values
387
385
  # @return schedule
388
- def schedule_apply_parametric_inputs(schedule,ramp_frequency,infer_hoo_for_non_assigned_objects, error_on_out_of_order,parametric_inputs = nil)
389
-
386
+ def schedule_apply_parametric_inputs(schedule, ramp_frequency, infer_hoo_for_non_assigned_objects, error_on_out_of_order, parametric_inputs = nil)
390
387
  # Check if parametric inputs were supplied and generate them if not
391
388
  if parametric_inputs.nil?
392
389
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.ScheduleRuleset', "For #{schedule.name}, no parametric inputs were not supplied so they will be generated now.")
@@ -413,12 +410,12 @@ class Standard
413
410
 
414
411
  # store floor and ceiling value
415
412
  val_flr = nil
416
- if schedule.hasAdditionalProperties && schedule.additionalProperties.hasFeature("param_sch_floor")
417
- val_flr = schedule.additionalProperties.getFeatureAsDouble("param_sch_floor").get
413
+ if schedule.hasAdditionalProperties && schedule.additionalProperties.hasFeature('param_sch_floor')
414
+ val_flr = schedule.additionalProperties.getFeatureAsDouble('param_sch_floor').get
418
415
  end
419
416
  val_clg = nil
420
- if schedule.hasAdditionalProperties && schedule.additionalProperties.hasFeature("param_sch_ceiling")
421
- val_clg = schedule.additionalProperties.getFeatureAsDouble("param_sch_ceiling").get
417
+ if schedule.hasAdditionalProperties && schedule.additionalProperties.hasFeature('param_sch_ceiling')
418
+ val_clg = schedule.additionalProperties.getFeatureAsDouble('param_sch_ceiling').get
422
419
  end
423
420
 
424
421
  # loop through schedule days from highest to lowest priority (with default as lowest priority)
@@ -427,10 +424,10 @@ class Standard
427
424
  schedule.scheduleRules.each do |rule|
428
425
  # remove any use manually generated non parametric rules or any auto-generated rules from prior application of formulas and hoo
429
426
  sch_day = rule.daySchedule
430
- if !sch_day.hasAdditionalProperties or !sch_day.additionalProperties.hasFeature("param_day_tag") or sch_day.additionalProperties.getFeatureAsString("param_day_tag").get == "autogen"
427
+ if !sch_day.hasAdditionalProperties || !sch_day.additionalProperties.hasFeature('param_day_tag') || (sch_day.additionalProperties.getFeatureAsString('param_day_tag').get == 'autogen')
431
428
  sch_day.remove # remove day schedule for this rule
432
429
  rule.remove # remove the rule
433
- elsif !sch_day.additionalProperties.hasFeature("param_day_profile")
430
+ elsif !sch_day.additionalProperties.hasFeature('param_day_profile')
434
431
  OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.ScheduleRuleset', "#{schedule.name} doesn't have a parametric formula for #{rule.name} This profile will not be altered.")
435
432
  next
436
433
  else
@@ -447,8 +444,7 @@ class Standard
447
444
  indices_vector = schedule.getActiveRuleIndices(year_start_date, year_end_date)
448
445
 
449
446
  # process profiles
450
- profiles.each do |sch_day,rule|
451
-
447
+ profiles.each do |sch_day, rule|
452
448
  # for current profile index identify hours of operation index that contains all days
453
449
  if rule.nil?
454
450
  current_rule_index = -1
@@ -459,13 +455,13 @@ class Standard
459
455
  # loop through indices looking of rule in hoo that contains days in the rule
460
456
  hoo_target_index = nil
461
457
  days_used = []
462
- indices_vector.each_with_index do |profile_index,i|
463
- if profile_index == current_rule_index then days_used << i+1 end
458
+ indices_vector.each_with_index do |profile_index, i|
459
+ if profile_index == current_rule_index then days_used << i + 1 end
464
460
  end
465
461
  # find days_used in hoo profiles that contains all days used from this profile
466
462
  hoo_profile_match_hash = {}
467
463
  best_fit_check = {}
468
- hours_of_operation.each do |profile_index,value|
464
+ hours_of_operation.each do |profile_index, value|
469
465
  days_for_rule_not_in_hoo_profile = days_used - value[:days_used]
470
466
  hoo_profile_match_hash[profile_index] = days_for_rule_not_in_hoo_profile
471
467
  best_fit_check[profile_index] = days_for_rule_not_in_hoo_profile.size
@@ -492,18 +488,17 @@ class Standard
492
488
  # make list of new rules needed as has or array
493
489
  autogen_rules = {}
494
490
  days_to_fill = hoo_profile_match_hash[hoo_target_index]
495
- hours_of_operation.each do |profile_index,value|
491
+ hours_of_operation.each do |profile_index, value|
496
492
  remainder = days_to_fill - value[:days_used]
497
493
  day_for_rule = days_to_fill - remainder
498
494
  if remainder.size < days_to_fill.size
499
- autogen_rules[profile_index] = {:days_to_fill => day_for_rule, :hoo_start => hoo_start, :hoo_end => hoo_end}
495
+ autogen_rules[profile_index] = { days_to_fill: day_for_rule, hoo_start: hoo_start, hoo_end: hoo_end }
500
496
  end
501
497
  days_to_fill = remainder
502
498
  end
503
499
 
504
500
  # loop through new rules to make and process
505
- autogen_rules.each do |autogen_rule,hash|
506
-
501
+ autogen_rules.each do |autogen_rule, hash|
507
502
  # generate new rule
508
503
  sch_rule_autogen = OpenStudio::Model::ScheduleRule.new(schedule)
509
504
  if current_rule_index
@@ -513,13 +508,13 @@ class Standard
513
508
  end
514
509
  current_rule_index = target_index
515
510
  if rule.nil?
516
- sch_rule_autogen.setName("autogen #{schedule.name.to_s} #{target_index}")
511
+ sch_rule_autogen.setName("autogen #{schedule.name} #{target_index}")
517
512
  else
518
- sch_rule_autogen.setName("autogen #{rule.name.to_s} #{target_index}")
513
+ sch_rule_autogen.setName("autogen #{rule.name} #{target_index}")
519
514
  end
520
- schedule.setScheduleRuleIndex(sch_rule_autogen,target_index) # todo - confirm this is higher priority than the non-auto-generated rule
515
+ schedule.setScheduleRuleIndex(sch_rule_autogen, target_index) # TODO: - confirm this is higher priority than the non-auto-generated rule
521
516
  hash[:days_to_fill].each do |day|
522
- date = OpenStudio::Date::fromDayOfYear(day,year)
517
+ date = OpenStudio::Date.fromDayOfYear(day, year)
523
518
  sch_rule_autogen.addSpecificDate(date)
524
519
  end
525
520
  sch_rule_autogen.setApplySunday(true)
@@ -533,13 +528,13 @@ class Standard
533
528
  # match profile from source rule (don't add time/values need a formula to process)
534
529
  sch_day_auto_gen = sch_rule_autogen.daySchedule
535
530
  sch_day_auto_gen.setName("#{sch_rule_autogen.name}_day_sch")
536
- sch_day_auto_gen.additionalProperties.setFeature("param_day_tag","autogen")
537
- val = sch_day.additionalProperties.getFeatureAsString("param_day_profile").get
538
- sch_day_auto_gen.additionalProperties.setFeature("param_day_profile",val)
539
- val = sch_day.additionalProperties.getFeatureAsString("param_day_secondary_logic").get
540
- sch_day_auto_gen.additionalProperties.setFeature("param_day_secondary_logic",val)
541
- val = sch_day.additionalProperties.getFeatureAsString("param_day_secondary_logic_arg_val").get
542
- sch_day_auto_gen.additionalProperties.setFeature("param_day_secondary_logic_arg_val",val)
531
+ sch_day_auto_gen.additionalProperties.setFeature('param_day_tag', 'autogen')
532
+ val = sch_day.additionalProperties.getFeatureAsString('param_day_profile').get
533
+ sch_day_auto_gen.additionalProperties.setFeature('param_day_profile', val)
534
+ val = sch_day.additionalProperties.getFeatureAsString('param_day_secondary_logic').get
535
+ sch_day_auto_gen.additionalProperties.setFeature('param_day_secondary_logic', val)
536
+ val = sch_day.additionalProperties.getFeatureAsString('param_day_secondary_logic_arg_val').get
537
+ sch_day_auto_gen.additionalProperties.setFeature('param_day_secondary_logic_arg_val', val)
543
538
 
544
539
  # get hours of operation for this specific profile
545
540
  hoo_start = hash[:hoo_start]
@@ -547,19 +542,17 @@ class Standard
547
542
 
548
543
  # process new rule
549
544
  process_hrs_of_operation_hash(sch_day_auto_gen, hoo_start, hoo_end, val_flr, val_clg, ramp_frequency, infer_hoo_for_non_assigned_objects, error_on_out_of_order)
550
-
551
545
  end
552
546
 
553
547
  end
554
-
555
548
  end
556
549
 
557
- # todo - create summer and winter design day profiles (make sure scheduleDay objects parametric)
550
+ # TODO: - create summer and winter design day profiles (make sure scheduleDay objects parametric)
558
551
  # todo - should they have their own formula, or should this be hard coded logic by schedule type
559
552
 
560
553
  # check orig vs. updated aeflh
561
554
  final_aeflh = schedule_ruleset_annual_equivalent_full_load_hrs(schedule)
562
- percent_change = ((starting_aeflh - final_aeflh)/starting_aeflh) * 100.0
555
+ percent_change = ((starting_aeflh - final_aeflh) / starting_aeflh) * 100.0
563
556
  if percent_change.abs > 0.05
564
557
  OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.ScheduleRuleset', "For #{schedule.name}, applying parametric schedules made a #{percent_change.round(1)}% change in annual equivalent full load hours. (from #{starting_aeflh.round(2)} to #{final_aeflh.round(2)})")
565
558
  end
@@ -605,8 +598,6 @@ class Standard
605
598
  schedule_day_set_hours_of_operation(rule.daySchedule, sun_start_time, sun_end_time)
606
599
  # OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.ScheduleRuleset', "For #{schedule_ruleset.name}, set Sunday rule operating hours to #{sun_start_time}-#{sun_end_time}.")
607
600
  end
608
- else
609
- # OpenStudio.logFree(OpenStudio::Warn, 'openstudio.standards.ScheduleRuleset', "For #{schedule_ruleset.name}, rule does not apply to any day of the week, will not be modified.")
610
601
  end
611
602
  end
612
603
 
@@ -647,12 +638,11 @@ class Standard
647
638
  # @return schedule_day
648
639
  # @api private
649
640
  def process_hrs_of_operation_hash(sch_day, hoo_start, hoo_end, val_flr, val_clg, ramp_frequency, infer_hoo_for_non_assigned_objects, error_on_out_of_order)
650
-
651
641
  # process hoo and floor/ceiling vars to develop formulas without variables
652
- formula_string = sch_day.additionalProperties.getFeatureAsString("param_day_profile").get
642
+ formula_string = sch_day.additionalProperties.getFeatureAsString('param_day_profile').get
653
643
  formula_hash = {}
654
- formula_string.split("|").each do |time_val_valopt|
655
- a1 = time_val_valopt.to_s.split("~")
644
+ formula_string.split('|').each do |time_val_valopt|
645
+ a1 = time_val_valopt.to_s.split('~')
656
646
  time = a1[0]
657
647
  value_array = a1.drop(1)
658
648
  formula_hash[time] = value_array
@@ -667,18 +657,16 @@ class Standard
667
657
  vac = 24.0 - occ
668
658
  range = val_clg - val_flr
669
659
 
670
-
671
660
  # apply variables and create updated hash with only numbers
672
661
  formula_hash_var_free = {}
673
- formula_hash.each do |time,val_in_out|
674
-
662
+ formula_hash.each do |time, val_in_out|
675
663
  # replace time variables with value
676
- time = time.gsub('hoo_start',hoo_start.to_s)
677
- time = time.gsub('hoo_end',hoo_end.to_s)
678
- time = time.gsub('occ',occ.to_s)
664
+ time = time.gsub('hoo_start', hoo_start.to_s)
665
+ time = time.gsub('hoo_end', hoo_end.to_s)
666
+ time = time.gsub('occ', occ.to_s)
679
667
  # can save special variables like lunch or break using this logic
680
- time = time.gsub('mid',(hoo_start + occ * 0.5).to_s)
681
- time = time.gsub('vac',vac.to_s)
668
+ time = time.gsub('mid', (hoo_start + occ * 0.5).to_s)
669
+ time = time.gsub('vac', vac.to_s)
682
670
  begin
683
671
  time_float = eval(time)
684
672
  if time_float.to_i.to_s == time_float.to_s || time_float.to_f.to_s == time_float.to_s # check to see if numeric
@@ -686,7 +674,7 @@ class Standard
686
674
  else
687
675
  OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.ScheduleRuleset', "Time formula #{time} for #{sch_day.name} is invalid. It can't be converted to a float.")
688
676
  end
689
- rescue SyntaxError => se
677
+ rescue SyntaxError => e
690
678
  OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.ScheduleRuleset', "Time formula #{time} for #{sch_day.name} is invalid. It can't be evaluated.")
691
679
  end
692
680
 
@@ -694,17 +682,17 @@ class Standard
694
682
  val_in_out_float = []
695
683
  val_in_out.each do |val|
696
684
  # replace variables for values
697
- val = val.gsub('val_flr',val_flr.to_s)
698
- val = val.gsub('val_clg',val_clg.to_s)
699
- val = val.gsub('val_range',range.to_s) # will expect a fractional value and will scale within ceiling and floor
685
+ val = val.gsub('val_flr', val_flr.to_s)
686
+ val = val.gsub('val_clg', val_clg.to_s)
687
+ val = val.gsub('val_range', range.to_s) # will expect a fractional value and will scale within ceiling and floor
700
688
  begin
701
689
  val_float = eval(val)
702
- if val_float.to_i.to_s == val_float.to_s or val_float.to_f.to_s == val_float.to_s # check to see if numeric
690
+ if val_float.to_i.to_s == val_float.to_s || val_float.to_f.to_s == val_float.to_s # check to see if numeric
703
691
  val_float = val_float.to_f
704
692
  else
705
693
  OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.ScheduleRuleset', "Value formula #{val_float} for #{sch_day.name} is invalid. It can't be converted to a float.")
706
694
  end
707
- rescue SyntaxError => se
695
+ rescue SyntaxError => e
708
696
  OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.ScheduleRuleset', "Time formula #{val_float} for #{sch_day.name} is invalid. It can't be evaluated.")
709
697
  end
710
698
  val_in_out_float << val_float
@@ -712,21 +700,20 @@ class Standard
712
700
 
713
701
  # update hash
714
702
  formula_hash_var_free[time_float] = val_in_out_float
715
-
716
703
  end
717
704
 
718
705
  # this is old variable used in loop, just combining for now to avoid refactor, may change this later
719
706
  time_value_pairs = []
720
- formula_hash_var_free.each do |time,val_in_out|
707
+ formula_hash_var_free.each do |time, val_in_out|
721
708
  val_in_out.each do |val|
722
- time_value_pairs << [time,val]
709
+ time_value_pairs << [time, val]
723
710
  end
724
711
  end
725
712
 
726
713
  # re-order so first value is lowest, and last is highest (need to adjust so no negative or > 24 values first)
727
714
  neg_time_hash = {}
728
715
  temp_min_time_hash = {}
729
- time_value_pairs.each_with_index do |pair,i|
716
+ time_value_pairs.each_with_index do |pair, i|
730
717
  # if value 24 add it to 24 so it will go on tail end of profile
731
718
  # case when value is greater than 24 can be left alone for now, will be addressed
732
719
  if pair[0] < 0.0
@@ -744,42 +731,42 @@ class Standard
744
731
  last_time = nil
745
732
  throw_order_warning = false
746
733
  pre_fix_time_value_pairs = time_value_pairs.to_s
747
- time_value_pairs.each_with_index do |time_value_pair,i|
734
+ time_value_pairs.each_with_index do |time_value_pair, i|
748
735
  if last_time.nil?
749
736
  last_time = time_value_pair[0]
750
- elsif time_value_pair[0] < last_time || neg_time_hash.has_key?(i)
737
+ elsif time_value_pair[0] < last_time || neg_time_hash.key?(i)
751
738
 
752
- # todo - it doesn't actually stop here now
739
+ # TODO: - it doesn't actually stop here now
753
740
  if error_on_out_of_order
754
741
  OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.ScheduleRuleset', "Pre-interpolated processed hash for #{sch_day.name} has one or more out of order conflicts: #{pre_fix_time_value_pairs}. Method will stop because Error on Out of Order was set to true.")
755
742
  end
756
743
 
757
- if neg_time_hash.has_key?(i)
744
+ if neg_time_hash.key?(i)
758
745
  orig_current_time = time_value_pair[0]
759
746
  updated_time = 0.0
760
- last_buffer = "NA"
747
+ last_buffer = 'NA'
761
748
  else
762
749
  # pick midpoint and put each time there. e.g. times of (2,7,9,8,11) would be changed to (2,7,8.5,8.5,11)
763
750
  delta = last_time - time_value_pair[0]
764
751
 
765
752
  # determine much space last item can move
766
753
  if i < 2
767
- last_buffer = time_value_pairs[i-1][0] # can move down to 0 without any issues
754
+ last_buffer = time_value_pairs[i - 1][0] # can move down to 0 without any issues
768
755
  else
769
- last_buffer = time_value_pairs[i-1][0] - time_value_pairs[i-2][0]
756
+ last_buffer = time_value_pairs[i - 1][0] - time_value_pairs[i - 2][0]
770
757
  end
771
758
 
772
759
  # center if possible but don't exceed available buffer
773
- updated_time = time_value_pairs[i-1][0] - [delta / 2.0,last_buffer].min
760
+ updated_time = time_value_pairs[i - 1][0] - [delta / 2.0, last_buffer].min
774
761
  end
775
762
 
776
763
  # update values in array
777
764
  orig_current_time = time_value_pair[0]
778
- time_value_pairs[i-1][0] = updated_time
765
+ time_value_pairs[i - 1][0] = updated_time
779
766
  time_value_pairs[i][0] = updated_time
780
767
 
781
768
  # reporting mostly for diagnostic purposes
782
- OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.ScheduleRuleset', "For #{sch_day.name} profile item #{i} time was #{last_time} and item #{i+1} time was #{orig_current_time}. Last buffer is #{last_buffer}. Changing both times to #{updated_time}.")
769
+ OpenStudio.logFree(OpenStudio::Info, 'openstudio.standards.ScheduleRuleset', "For #{sch_day.name} profile item #{i} time was #{last_time} and item #{i + 1} time was #{orig_current_time}. Last buffer is #{last_buffer}. Changing both times to #{updated_time}.")
783
770
 
784
771
  last_time = updated_time
785
772
  throw_order_warning = true
@@ -795,14 +782,13 @@ class Standard
795
782
  end
796
783
 
797
784
  # add interpolated values at ramp_frequency
798
- time_value_pairs.each_with_index do |time_value_pair,i|
799
-
785
+ time_value_pairs.each_with_index do |time_value_pair, i|
800
786
  # store current and next time and value
801
787
  current_time = time_value_pair[0]
802
788
  current_value = time_value_pair[1]
803
- if i+1 < time_value_pairs.size
804
- next_time = time_value_pairs[i+1][0]
805
- next_value = time_value_pairs[i+1][1]
789
+ if i + 1 < time_value_pairs.size
790
+ next_time = time_value_pairs[i + 1][0]
791
+ next_value = time_value_pairs[i + 1][1]
806
792
  else
807
793
  # use time and value of first item
808
794
  next_time = time_value_pairs[0][0] + 24 # need to adjust values for beginning of array
@@ -811,22 +797,21 @@ class Standard
811
797
  step_delta = next_time - current_time
812
798
 
813
799
  # skip if time between values is 0 or less than ramp frequency
814
- next if step_delta <= ramp_frequency
800
+ next if step_delta <= ramp_frequency
815
801
 
816
802
  # skip if next value is same
817
803
  next if current_value == next_value
818
804
 
819
805
  # add interpolated value to array
820
806
  interpolated_time = current_time + ramp_frequency
821
- interpolated_value = next_value*(interpolated_time - current_time)/step_delta + current_value*(next_time - interpolated_time)/step_delta
822
- time_value_pairs.insert(i+1,[interpolated_time,interpolated_value])
823
-
807
+ interpolated_value = next_value * (interpolated_time - current_time) / step_delta + current_value * (next_time - interpolated_time) / step_delta
808
+ time_value_pairs.insert(i + 1, [interpolated_time, interpolated_value])
824
809
  end
825
810
 
826
811
  # remove second instance of time when there are two
827
812
  time_values_used = []
828
813
  items_to_remove = []
829
- time_value_pairs.each_with_index do |time_value_pair,i|
814
+ time_value_pairs.each_with_index do |time_value_pair, i|
830
815
  if time_values_used.include? time_value_pair[0]
831
816
  items_to_remove << i
832
817
  else
@@ -839,7 +824,7 @@ class Standard
839
824
 
840
825
  # if time is > 24 shift to front of array and adjust value
841
826
  rotate_steps = 0
842
- time_value_pairs.reverse.each_with_index do |time_value_pair,i|
827
+ time_value_pairs.reverse.each_with_index do |time_value_pair, i|
843
828
  if time_value_pair[0] > 24
844
829
  rotate_steps -= 1
845
830
  time_value_pair[0] -= 24
@@ -850,27 +835,24 @@ class Standard
850
835
  time_value_pairs.rotate!(rotate_steps)
851
836
 
852
837
  # add a 24 on the end of array that matches the first value
853
- if not time_value_pairs.last[0] == 24.0
854
- time_value_pairs << [24.0,time_value_pairs.first[1]]
838
+ if time_value_pairs.last[0] != 24.0
839
+ time_value_pairs << [24.0, time_value_pairs.first[1]]
855
840
  end
856
841
 
857
842
  # reset scheduleDay values based on interpolated values
858
843
  sch_day.clearValues
859
844
  time_value_pairs.each do |time_val|
860
845
  hour = time_val.first.floor
861
- min = ((time_val.first - hour)*60.0).floor
846
+ min = ((time_val.first - hour) * 60.0).floor
862
847
  os_time = OpenStudio::Time.new(0, hour, min, 0)
863
848
  value = time_val.last
864
- sch_day.addValue(os_time,value)
849
+ sch_day.addValue(os_time, value)
865
850
  end
866
-
867
- # todo - apply secondary logic
851
+ # TODO: apply secondary logic
868
852
 
869
853
  # Tell EnergyPlus to interpolate schedules to timestep so that it doesn't have to be done in this code
870
854
  sch_day.setInterpolatetoTimestep(true)
871
855
 
872
856
  return sch_day
873
-
874
857
  end
875
-
876
858
  end