openstudio-standards 0.2.16 → 0.2.17.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (181) hide show
  1. checksums.yaml +4 -4
  2. data/data/standards/manage_OpenStudio_Standards.rb +31 -4
  3. data/lib/openstudio-standards/btap/geometry.rb +1 -1
  4. data/lib/openstudio-standards/hvac_sizing/Siz.HeatingCoolingFuels.rb +354 -2
  5. data/lib/openstudio-standards/hvac_sizing/Siz.ThermalZone.rb +79 -0
  6. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.College.rb +1 -1
  7. data/lib/openstudio-standards/prototypes/common/buildings/Prototype.Laboratory.rb +1 -1
  8. data/lib/openstudio-standards/prototypes/common/do_not_edit_metaclasses.rb +3313 -0
  9. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Fan.rb +12 -0
  10. data/lib/openstudio-standards/prototypes/common/objects/Prototype.Model.rb +3 -4
  11. data/lib/openstudio-standards/prototypes/common/objects/Prototype.SizingSystem.rb +1 -1
  12. data/lib/openstudio-standards/prototypes/common/objects/Prototype.hvac_systems.rb +167 -93
  13. data/lib/openstudio-standards/prototypes/common/objects/Prototype.utilities.rb +2 -4
  14. data/lib/openstudio-standards/prototypes/common/prototype_metaprogramming.rb +1 -0
  15. data/lib/openstudio-standards/refs/references.rb +3 -0
  16. data/lib/openstudio-standards/standards/Standards.AirLoopHVAC.rb +279 -6
  17. data/lib/openstudio-standards/standards/Standards.AirTerminalSingleDuctParallelPIUReheat.rb +50 -2
  18. data/lib/openstudio-standards/standards/Standards.ChillerElectricEIR.rb +4 -0
  19. data/lib/openstudio-standards/standards/Standards.CoilCoolingWaterToAirHeatPumpEquationFit.rb +0 -1
  20. data/lib/openstudio-standards/standards/Standards.Construction.rb +185 -3
  21. data/lib/openstudio-standards/standards/Standards.Fan.rb +14 -6
  22. data/lib/openstudio-standards/standards/Standards.HeatExchangerSensLat.rb +1 -0
  23. data/lib/openstudio-standards/standards/Standards.Model.rb +1751 -383
  24. data/lib/openstudio-standards/standards/Standards.PlanarSurface.rb +130 -9
  25. data/lib/openstudio-standards/standards/Standards.PlantLoop.rb +50 -3
  26. data/lib/openstudio-standards/standards/Standards.ScheduleCompact.rb +44 -0
  27. data/lib/openstudio-standards/standards/Standards.ScheduleConstant.rb +27 -0
  28. data/lib/openstudio-standards/standards/Standards.ScheduleRuleset.rb +543 -0
  29. data/lib/openstudio-standards/standards/Standards.Space.rb +665 -15
  30. data/lib/openstudio-standards/standards/Standards.SpaceType.rb +141 -4
  31. data/lib/openstudio-standards/standards/Standards.SubSurface.rb +2 -1
  32. data/lib/openstudio-standards/standards/Standards.Surface.rb +117 -0
  33. data/lib/openstudio-standards/standards/Standards.ThermalZone.rb +197 -49
  34. data/lib/openstudio-standards/standards/Standards.ZoneHVACComponent.rb +41 -0
  35. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/ashrae_90_1_2004.Model.rb +6 -8
  36. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/comstock_ashrae_90_1_2004/data/ashrae_90_1.schedules.json +45 -45
  37. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2004/comstock_ashrae_90_1_2004/data/comstock_ashrae_90_1_2004.spc_typ.json +7 -7
  38. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/comstock_ashrae_90_1_2007/data/ashrae_90_1.schedules.json +45 -45
  39. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2007/comstock_ashrae_90_1_2007/data/comstock_ashrae_90_1_2007.spc_typ.json +7 -7
  40. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/comstock_ashrae_90_1_2010/data/ashrae_90_1.schedules.json +45 -45
  41. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2010/comstock_ashrae_90_1_2010/data/comstock_ashrae_90_1_2010.spc_typ.json +9 -9
  42. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/comstock_ashrae_90_1_2013/data/ashrae_90_1.schedules.json +45 -45
  43. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2013/comstock_ashrae_90_1_2013/data/comstock_ashrae_90_1_2013.spc_typ.json +4 -4
  44. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/comstock_ashrae_90_1_2016/data/ashrae_90_1.schedules.json +45 -45
  45. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2016/comstock_ashrae_90_1_2016/data/comstock_ashrae_90_1_2016.spc_typ.json +5 -5
  46. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/ashrae_90_1_2019.AirLoopHVAC.rb +5 -5
  47. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/comstock_ashrae_90_1_2019/data/ashrae_90_1.schedules.json +45 -45
  48. data/lib/openstudio-standards/standards/ashrae_90_1/ashrae_90_1_2019/comstock_ashrae_90_1_2019/data/comstock_ashrae_90_1_2019.spc_typ.json +5 -5
  49. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.constructions.json +2 -2
  50. data/lib/openstudio-standards/standards/ashrae_90_1/data/ashrae_90_1.fans.json +12 -0
  51. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/comstock_doe_ref_1980_2004/data/ashrae_90_1.schedules.json +45 -45
  52. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_1980_2004/comstock_doe_ref_1980_2004/data/comstock_doe_ref_1980_2004.spc_typ.json +10 -10
  53. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/comstock_doe_ref_pre_1980/data/ashrae_90_1.schedules.json +45 -45
  54. data/lib/openstudio-standards/standards/ashrae_90_1/doe_ref_pre_1980/comstock_doe_ref_pre_1980/data/comstock_doe_ref_pre_1980.spc_typ.json +10 -10
  55. data/lib/openstudio-standards/standards/ashrae_90_1/nrel_zne_ready_2017/nrel_zne_ready_2017.AirLoopHVAC.rb +1 -0
  56. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirLoopHVAC.rb +792 -0
  57. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirTerminalSingleDuctParallelPIUReheat.rb +10 -0
  58. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.AirTerminalSingleDuctVAVReheat.rb +31 -0
  59. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.BoilerHotWater.rb +91 -0
  60. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ChillerElectricEIR.rb +84 -0
  61. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXSingleSpeed.rb +145 -0
  62. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilCoolingDXTwoSpeed.rb +106 -0
  63. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilDX.rb +71 -0
  64. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingDXSingleSpeed.rb +194 -0
  65. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoilHeatingGas.rb +120 -0
  66. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoolingTower.rb +110 -0
  67. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.CoolingTowerVariableSpeed.rb +5 -0
  68. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Fan.rb +73 -0
  69. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanConstantVolume.rb +5 -0
  70. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanOnOff.rb +5 -0
  71. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanVariableVolume.rb +24 -0
  72. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.FanZoneExhaust.rb +5 -0
  73. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.HeatExchangerSensLat.rb +55 -0
  74. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Model.rb +3045 -0
  75. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlanarSurface.rb +187 -0
  76. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.PlantLoop.rb +450 -0
  77. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Space.rb +106 -0
  78. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.SpaceType.rb +666 -0
  79. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.Surface.rb +54 -0
  80. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ThermalZone.rb +168 -0
  81. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.ZoneHVACComponent.rb +132 -0
  82. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm.rb +239 -0
  83. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.Model.rb +176 -0
  84. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/ashrae_90_1_prm_2019.rb +25 -0
  85. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.boilers.json +52 -0
  86. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.chillers.json +112 -0
  87. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.climate_zone_sets.json +210 -0
  88. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.construction_properties.json +10384 -0
  89. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.construction_sets.json +133 -0
  90. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.furnaces.json +43 -0
  91. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.heat_pumps.json +119 -0
  92. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.heat_pumps_heating.json +130 -0
  93. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.heat_rejection.json +13 -0
  94. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.lpd_space_type.json +568 -0
  95. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.motors.json +264 -0
  96. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_baseline_hvac.json +439 -0
  97. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_constructions.json +685 -0
  98. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_economizers.json +213 -0
  99. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_ext_ltg.json +32 -0
  100. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_heat_type.json +136 -0
  101. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_hvac_bldg_type.json +32 -0
  102. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_interior_lighting.json +1837 -0
  103. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_swh_bldg_type.json +184 -0
  104. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.prm_wwr_bldg_type.json +84 -0
  105. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.unitary_acs.json +148 -0
  106. data/lib/openstudio-standards/standards/ashrae_90_1_prm/ashrae_90_1_prm_2019/data/ashrae_90_1_prm_2019.water_heaters.json +157 -0
  107. data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.climate_zone_sets.json +210 -0
  108. data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.curves.json +18329 -0
  109. data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.fans.json +340 -0
  110. data/lib/openstudio-standards/standards/ashrae_90_1_prm/data/ashrae_90_1_prm.materials.json +49924 -0
  111. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/baseline_building_rotation_exception.md +44 -0
  112. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/check_pump_power_and_control.md +71 -0
  113. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/dcv.md +68 -0
  114. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/dcv_implementation.png +0 -0
  115. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/elevators.md +14 -0
  116. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/exhaust_air_energy_recovery.md +36 -0
  117. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/f_c_factors.md +19 -0
  118. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/fan_power_credits.md +15 -0
  119. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/preheat_coil.md +59 -0
  120. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/pump_power_control.md +46 -0
  121. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/return_air_type.md +31 -0
  122. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_baseline_wwr.md +191 -0
  123. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_hw_and_chw_supply_water_temp_reset_control.md +24 -0
  124. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_num_boilers_chillers_towers.md +49 -0
  125. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_plug_load_measures.md +80 -0
  126. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/set_space_lpd.md +73 -0
  127. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/unenclosed_and_unconditioned_spaces.md +11 -0
  128. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/unmet_load_hours.md +20 -0
  129. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/vav_parallel_piu_terminals_fan_control.md +23 -0
  130. data/lib/openstudio-standards/standards/ashrae_90_1_prm/docs/vav_terminals_min_flow_setpoint.md +21 -0
  131. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_airloop_hvac.csv +1 -0
  132. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_airloop_hvac_doas.csv +1 -0
  133. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_building.csv +1 -0
  134. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_design_specification_outdoor_air.csv +1 -0
  135. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_electric_equipment.csv +1 -0
  136. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_exterior_lights.csv +1 -0
  137. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_gas_equipment.csv +1 -0
  138. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_lights.csv +1 -0
  139. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_space.csv +1 -0
  140. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_spacetype.csv +1 -0
  141. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_thermal_zone.csv +1 -0
  142. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_wateruse_connections.csv +1 -0
  143. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_wateruse_equipment.csv +1 -0
  144. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_wateruse_equipment_definition.csv +1 -0
  145. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_zone_hvac.csv +1 -0
  146. data/lib/openstudio-standards/standards/ashrae_90_1_prm/userdata_csv/userdata_zone_infiltration.csv +1 -0
  147. data/lib/openstudio-standards/standards/cbes/data/cbes.fans.json +12 -0
  148. data/lib/openstudio-standards/standards/deer/data/deer.fans.json +12 -0
  149. data/lib/openstudio-standards/standards/necb/ECMS/data/heat_pumps.json +1 -1
  150. data/lib/openstudio-standards/standards/necb/ECMS/data/heat_pumps_heating.json +1 -1
  151. data/lib/openstudio-standards/standards/necb/ECMS/data/unitary_acs.json +24 -11
  152. data/lib/openstudio-standards/standards/necb/ECMS/erv.rb +13 -15
  153. data/lib/openstudio-standards/standards/necb/NECB2011/data/province_map.json +17 -0
  154. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_multi_speed.rb +1 -1
  155. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_3_and_8_single_speed.rb +1 -1
  156. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_4.rb +2 -2
  157. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_system_6.rb +6 -5
  158. data/lib/openstudio-standards/standards/necb/NECB2011/hvac_systems.rb +3 -2
  159. data/lib/openstudio-standards/standards/necb/NECB2011/necb_2011.rb +2 -3
  160. data/lib/openstudio-standards/standards/necb/NECB2020/data/chillers.json +2 -2
  161. data/lib/openstudio-standards/standards/necb/NECB2020/data/space_types.json +33 -924
  162. data/lib/openstudio-standards/standards/necb/NECB2020/data/unitary_acs.json +15 -15
  163. data/lib/openstudio-standards/standards/necb/common/btap_data.rb +135 -29
  164. data/lib/openstudio-standards/standards/necb/common/btap_datapoint.rb +16 -4
  165. data/lib/openstudio-standards/standards/necb/common/neb_end_use_prices.csv +40 -42
  166. data/lib/openstudio-standards/standards/necb/common/necb_reference_runs.csv +1 -1
  167. data/lib/openstudio-standards/standards/necb/common/space_type_upgrade_map.json +89 -89
  168. data/lib/openstudio-standards/utilities/array.rb +11 -0
  169. data/lib/openstudio-standards/utilities/logging.rb +48 -0
  170. data/lib/openstudio-standards/utilities/object_info.rb +20 -0
  171. data/lib/openstudio-standards/utilities/schedule_translator.rb +348 -0
  172. data/lib/openstudio-standards/utilities/sqlfile.rb +68 -0
  173. data/lib/openstudio-standards/version.rb +2 -2
  174. data/lib/openstudio-standards/weather/Weather.Model.rb +42 -55
  175. data/lib/openstudio-standards/weather/Weather.stat_file.rb +1 -1
  176. data/lib/openstudio-standards.rb +35 -1
  177. metadata +111 -6
  178. data/data/standards/OpenStudio_Standards-ashrae_90_1.xlsx +0 -0
  179. data/data/standards/OpenStudio_Standards-ashrae_90_1_28Jan2022.xlsx +0 -0
  180. data/data/standards/OpenStudio_Standards-ashrae_90_1_28_Jan2022_2.xlsx +0 -0
  181. data/data/standards/openstudio_standards_duplicates_log.csv +0 -143
@@ -13239,6 +13239,3319 @@ end
13239
13239
  return lookup_name
13240
13240
  end
13241
13241
 
13242
+ # daylighting adjustments specific to the prototype model
13243
+ #
13244
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
13245
+ # @param building_type [string] the building type
13246
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
13247
+ # @param prototype_input [Hash] hash of prototype inputs
13248
+ # @return [Bool] returns true if successful, false if not
13249
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
13250
+ return true
13251
+ end
13252
+ end
13253
+
13254
+ class ASHRAE901PRM2019_Prototype < ASHRAE901PRM2019
13255
+ attr_reader :instvarbuilding_type
13256
+ def initialize
13257
+ super()
13258
+ end
13259
+ end
13260
+
13261
+ # This class represents a prototypical ASHRAE901PRM2019 FullServiceRestaurant.
13262
+ class ASHRAE901PRM2019FullServiceRestaurant < ASHRAE901PRM2019
13263
+ @@building_type = "FullServiceRestaurant"
13264
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
13265
+ attr_accessor :prototype_database
13266
+ attr_accessor :prototype_input
13267
+ attr_accessor :lookup_building_type
13268
+ attr_accessor :space_type_map
13269
+ attr_accessor :geometry_file
13270
+ attr_accessor :building_story_map
13271
+ attr_accessor :system_to_space_map
13272
+ def initialize
13273
+ super()
13274
+ @instvarbuilding_type = @@building_type
13275
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
13276
+ if @prototype_input.nil?
13277
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
13278
+ raise("Could not find prototype inputs for ASHRAE901PRM2019FullServiceRestaurant, cannot create model.")
13279
+ return false
13280
+ end
13281
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
13282
+ #ideally we should map the data required to a instance variable.
13283
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
13284
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
13285
+ @system_to_space_map = load_hvac_map(hvac_map_file)
13286
+ self.set_variables()
13287
+ end
13288
+ # This method is used to extend the class with building-type-specific
13289
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
13290
+ # has its own set of methods that change things which are not
13291
+ # common across all prototype buildings, even within a given Standard.
13292
+ def set_variables()
13293
+ # Will be overwritten in class reopen file.
13294
+ # add all building methods for now.
13295
+ self.extend(FullServiceRestaurant) unless @template == 'NECB 2011'
13296
+ end
13297
+ # Returns the mapping between the names of the spaces
13298
+ # in the geometry .osm file and the space types
13299
+ # available for this particular Standard.
13300
+ def define_space_type_map(building_type, climate_zone)
13301
+ return @space_type_map
13302
+ end
13303
+ # Returns the mapping between the names of the spaces
13304
+ # in the geometry .osm file and the HVAC system that will
13305
+ # be applied to those spaces.
13306
+ def define_hvac_system_map(building_type, climate_zone)
13307
+ return @system_to_space_map
13308
+ end
13309
+ # Returns the mapping between the names of the spaces
13310
+ # in the geometry .osm file and the building story
13311
+ # that they are located on.
13312
+ def define_building_story_map(building_type, climate_zone)
13313
+ return @building_story_map
13314
+ end
13315
+ # Does nothing unless implmented by the specific standard
13316
+ def model_modify_oa_controller(model)
13317
+ end
13318
+ # Does nothing unless implmented by the specific standard
13319
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
13320
+ end
13321
+
13322
+ # update exhuast fan efficiency
13323
+ #
13324
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
13325
+ # @return [Bool] returns true if successful, false if not
13326
+ def model_update_exhaust_fan_efficiency(model)
13327
+ return true
13328
+ end
13329
+
13330
+ # Does nothing unless implmented by the specific standard
13331
+ def model_update_fan_efficiency(model)
13332
+ end
13333
+ # Get the name of the building type used in lookups
13334
+ #
13335
+ # @param building_type [String] the building type
13336
+ # @return [String] returns the lookup name as a string
13337
+ # @todo Unify the lookup names and eliminate this method
13338
+ def model_get_lookup_name(building_type)
13339
+ lookup_name = building_type
13340
+ case building_type
13341
+ when 'SmallOffice'
13342
+ lookup_name = 'Office'
13343
+ when 'MediumOffice'
13344
+ lookup_name = 'Office'
13345
+ when 'LargeOffice'
13346
+ lookup_name = 'Office'
13347
+ when 'SmallOfficeDetailed'
13348
+ lookup_name = 'Office'
13349
+ when 'MediumOfficeDetailed'
13350
+ lookup_name = 'Office'
13351
+ when 'LargeOfficeDetailed'
13352
+ lookup_name = 'Office'
13353
+ when 'RetailStandalone'
13354
+ lookup_name = 'Retail'
13355
+ when 'RetailStripmall'
13356
+ lookup_name = 'StripMall'
13357
+ when 'Office'
13358
+ lookup_name = 'Office'
13359
+ end
13360
+ return lookup_name
13361
+ end
13362
+
13363
+ # daylighting adjustments specific to the prototype model
13364
+ #
13365
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
13366
+ # @param building_type [string] the building type
13367
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
13368
+ # @param prototype_input [Hash] hash of prototype inputs
13369
+ # @return [Bool] returns true if successful, false if not
13370
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
13371
+ return true
13372
+ end
13373
+ end
13374
+
13375
+ # This class represents a prototypical ASHRAE901PRM2019 Hospital.
13376
+ class ASHRAE901PRM2019Hospital < ASHRAE901PRM2019
13377
+ @@building_type = "Hospital"
13378
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
13379
+ attr_accessor :prototype_database
13380
+ attr_accessor :prototype_input
13381
+ attr_accessor :lookup_building_type
13382
+ attr_accessor :space_type_map
13383
+ attr_accessor :geometry_file
13384
+ attr_accessor :building_story_map
13385
+ attr_accessor :system_to_space_map
13386
+ def initialize
13387
+ super()
13388
+ @instvarbuilding_type = @@building_type
13389
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
13390
+ if @prototype_input.nil?
13391
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
13392
+ raise("Could not find prototype inputs for ASHRAE901PRM2019Hospital, cannot create model.")
13393
+ return false
13394
+ end
13395
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
13396
+ #ideally we should map the data required to a instance variable.
13397
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
13398
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
13399
+ @system_to_space_map = load_hvac_map(hvac_map_file)
13400
+ self.set_variables()
13401
+ end
13402
+ # This method is used to extend the class with building-type-specific
13403
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
13404
+ # has its own set of methods that change things which are not
13405
+ # common across all prototype buildings, even within a given Standard.
13406
+ def set_variables()
13407
+ # Will be overwritten in class reopen file.
13408
+ # add all building methods for now.
13409
+ self.extend(Hospital) unless @template == 'NECB 2011'
13410
+ end
13411
+ # Returns the mapping between the names of the spaces
13412
+ # in the geometry .osm file and the space types
13413
+ # available for this particular Standard.
13414
+ def define_space_type_map(building_type, climate_zone)
13415
+ return @space_type_map
13416
+ end
13417
+ # Returns the mapping between the names of the spaces
13418
+ # in the geometry .osm file and the HVAC system that will
13419
+ # be applied to those spaces.
13420
+ def define_hvac_system_map(building_type, climate_zone)
13421
+ return @system_to_space_map
13422
+ end
13423
+ # Returns the mapping between the names of the spaces
13424
+ # in the geometry .osm file and the building story
13425
+ # that they are located on.
13426
+ def define_building_story_map(building_type, climate_zone)
13427
+ return @building_story_map
13428
+ end
13429
+ # Does nothing unless implmented by the specific standard
13430
+ def model_modify_oa_controller(model)
13431
+ end
13432
+ # Does nothing unless implmented by the specific standard
13433
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
13434
+ end
13435
+
13436
+ # update exhuast fan efficiency
13437
+ #
13438
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
13439
+ # @return [Bool] returns true if successful, false if not
13440
+ def model_update_exhaust_fan_efficiency(model)
13441
+ return true
13442
+ end
13443
+
13444
+ # Does nothing unless implmented by the specific standard
13445
+ def model_update_fan_efficiency(model)
13446
+ end
13447
+ # Get the name of the building type used in lookups
13448
+ #
13449
+ # @param building_type [String] the building type
13450
+ # @return [String] returns the lookup name as a string
13451
+ # @todo Unify the lookup names and eliminate this method
13452
+ def model_get_lookup_name(building_type)
13453
+ lookup_name = building_type
13454
+ case building_type
13455
+ when 'SmallOffice'
13456
+ lookup_name = 'Office'
13457
+ when 'MediumOffice'
13458
+ lookup_name = 'Office'
13459
+ when 'LargeOffice'
13460
+ lookup_name = 'Office'
13461
+ when 'SmallOfficeDetailed'
13462
+ lookup_name = 'Office'
13463
+ when 'MediumOfficeDetailed'
13464
+ lookup_name = 'Office'
13465
+ when 'LargeOfficeDetailed'
13466
+ lookup_name = 'Office'
13467
+ when 'RetailStandalone'
13468
+ lookup_name = 'Retail'
13469
+ when 'RetailStripmall'
13470
+ lookup_name = 'StripMall'
13471
+ when 'Office'
13472
+ lookup_name = 'Office'
13473
+ end
13474
+ return lookup_name
13475
+ end
13476
+
13477
+ # daylighting adjustments specific to the prototype model
13478
+ #
13479
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
13480
+ # @param building_type [string] the building type
13481
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
13482
+ # @param prototype_input [Hash] hash of prototype inputs
13483
+ # @return [Bool] returns true if successful, false if not
13484
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
13485
+ return true
13486
+ end
13487
+ end
13488
+
13489
+ # This class represents a prototypical ASHRAE901PRM2019 HighriseApartment.
13490
+ class ASHRAE901PRM2019HighriseApartment < ASHRAE901PRM2019
13491
+ @@building_type = "HighriseApartment"
13492
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
13493
+ attr_accessor :prototype_database
13494
+ attr_accessor :prototype_input
13495
+ attr_accessor :lookup_building_type
13496
+ attr_accessor :space_type_map
13497
+ attr_accessor :geometry_file
13498
+ attr_accessor :building_story_map
13499
+ attr_accessor :system_to_space_map
13500
+ def initialize
13501
+ super()
13502
+ @instvarbuilding_type = @@building_type
13503
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
13504
+ if @prototype_input.nil?
13505
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
13506
+ raise("Could not find prototype inputs for ASHRAE901PRM2019HighriseApartment, cannot create model.")
13507
+ return false
13508
+ end
13509
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
13510
+ #ideally we should map the data required to a instance variable.
13511
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
13512
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
13513
+ @system_to_space_map = load_hvac_map(hvac_map_file)
13514
+ self.set_variables()
13515
+ end
13516
+ # This method is used to extend the class with building-type-specific
13517
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
13518
+ # has its own set of methods that change things which are not
13519
+ # common across all prototype buildings, even within a given Standard.
13520
+ def set_variables()
13521
+ # Will be overwritten in class reopen file.
13522
+ # add all building methods for now.
13523
+ self.extend(HighriseApartment) unless @template == 'NECB 2011'
13524
+ end
13525
+ # Returns the mapping between the names of the spaces
13526
+ # in the geometry .osm file and the space types
13527
+ # available for this particular Standard.
13528
+ def define_space_type_map(building_type, climate_zone)
13529
+ return @space_type_map
13530
+ end
13531
+ # Returns the mapping between the names of the spaces
13532
+ # in the geometry .osm file and the HVAC system that will
13533
+ # be applied to those spaces.
13534
+ def define_hvac_system_map(building_type, climate_zone)
13535
+ return @system_to_space_map
13536
+ end
13537
+ # Returns the mapping between the names of the spaces
13538
+ # in the geometry .osm file and the building story
13539
+ # that they are located on.
13540
+ def define_building_story_map(building_type, climate_zone)
13541
+ return @building_story_map
13542
+ end
13543
+ # Does nothing unless implmented by the specific standard
13544
+ def model_modify_oa_controller(model)
13545
+ end
13546
+ # Does nothing unless implmented by the specific standard
13547
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
13548
+ end
13549
+
13550
+ # update exhuast fan efficiency
13551
+ #
13552
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
13553
+ # @return [Bool] returns true if successful, false if not
13554
+ def model_update_exhaust_fan_efficiency(model)
13555
+ return true
13556
+ end
13557
+
13558
+ # Does nothing unless implmented by the specific standard
13559
+ def model_update_fan_efficiency(model)
13560
+ end
13561
+ # Get the name of the building type used in lookups
13562
+ #
13563
+ # @param building_type [String] the building type
13564
+ # @return [String] returns the lookup name as a string
13565
+ # @todo Unify the lookup names and eliminate this method
13566
+ def model_get_lookup_name(building_type)
13567
+ lookup_name = building_type
13568
+ case building_type
13569
+ when 'SmallOffice'
13570
+ lookup_name = 'Office'
13571
+ when 'MediumOffice'
13572
+ lookup_name = 'Office'
13573
+ when 'LargeOffice'
13574
+ lookup_name = 'Office'
13575
+ when 'SmallOfficeDetailed'
13576
+ lookup_name = 'Office'
13577
+ when 'MediumOfficeDetailed'
13578
+ lookup_name = 'Office'
13579
+ when 'LargeOfficeDetailed'
13580
+ lookup_name = 'Office'
13581
+ when 'RetailStandalone'
13582
+ lookup_name = 'Retail'
13583
+ when 'RetailStripmall'
13584
+ lookup_name = 'StripMall'
13585
+ when 'Office'
13586
+ lookup_name = 'Office'
13587
+ end
13588
+ return lookup_name
13589
+ end
13590
+
13591
+ # daylighting adjustments specific to the prototype model
13592
+ #
13593
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
13594
+ # @param building_type [string] the building type
13595
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
13596
+ # @param prototype_input [Hash] hash of prototype inputs
13597
+ # @return [Bool] returns true if successful, false if not
13598
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
13599
+ return true
13600
+ end
13601
+ end
13602
+
13603
+ # This class represents a prototypical ASHRAE901PRM2019 LargeHotel.
13604
+ class ASHRAE901PRM2019LargeHotel < ASHRAE901PRM2019
13605
+ @@building_type = "LargeHotel"
13606
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
13607
+ attr_accessor :prototype_database
13608
+ attr_accessor :prototype_input
13609
+ attr_accessor :lookup_building_type
13610
+ attr_accessor :space_type_map
13611
+ attr_accessor :geometry_file
13612
+ attr_accessor :building_story_map
13613
+ attr_accessor :system_to_space_map
13614
+ def initialize
13615
+ super()
13616
+ @instvarbuilding_type = @@building_type
13617
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
13618
+ if @prototype_input.nil?
13619
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
13620
+ raise("Could not find prototype inputs for ASHRAE901PRM2019LargeHotel, cannot create model.")
13621
+ return false
13622
+ end
13623
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
13624
+ #ideally we should map the data required to a instance variable.
13625
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
13626
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
13627
+ @system_to_space_map = load_hvac_map(hvac_map_file)
13628
+ self.set_variables()
13629
+ end
13630
+ # This method is used to extend the class with building-type-specific
13631
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
13632
+ # has its own set of methods that change things which are not
13633
+ # common across all prototype buildings, even within a given Standard.
13634
+ def set_variables()
13635
+ # Will be overwritten in class reopen file.
13636
+ # add all building methods for now.
13637
+ self.extend(LargeHotel) unless @template == 'NECB 2011'
13638
+ end
13639
+ # Returns the mapping between the names of the spaces
13640
+ # in the geometry .osm file and the space types
13641
+ # available for this particular Standard.
13642
+ def define_space_type_map(building_type, climate_zone)
13643
+ return @space_type_map
13644
+ end
13645
+ # Returns the mapping between the names of the spaces
13646
+ # in the geometry .osm file and the HVAC system that will
13647
+ # be applied to those spaces.
13648
+ def define_hvac_system_map(building_type, climate_zone)
13649
+ return @system_to_space_map
13650
+ end
13651
+ # Returns the mapping between the names of the spaces
13652
+ # in the geometry .osm file and the building story
13653
+ # that they are located on.
13654
+ def define_building_story_map(building_type, climate_zone)
13655
+ return @building_story_map
13656
+ end
13657
+ # Does nothing unless implmented by the specific standard
13658
+ def model_modify_oa_controller(model)
13659
+ end
13660
+ # Does nothing unless implmented by the specific standard
13661
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
13662
+ end
13663
+
13664
+ # update exhuast fan efficiency
13665
+ #
13666
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
13667
+ # @return [Bool] returns true if successful, false if not
13668
+ def model_update_exhaust_fan_efficiency(model)
13669
+ return true
13670
+ end
13671
+
13672
+ # Does nothing unless implmented by the specific standard
13673
+ def model_update_fan_efficiency(model)
13674
+ end
13675
+ # Get the name of the building type used in lookups
13676
+ #
13677
+ # @param building_type [String] the building type
13678
+ # @return [String] returns the lookup name as a string
13679
+ # @todo Unify the lookup names and eliminate this method
13680
+ def model_get_lookup_name(building_type)
13681
+ lookup_name = building_type
13682
+ case building_type
13683
+ when 'SmallOffice'
13684
+ lookup_name = 'Office'
13685
+ when 'MediumOffice'
13686
+ lookup_name = 'Office'
13687
+ when 'LargeOffice'
13688
+ lookup_name = 'Office'
13689
+ when 'SmallOfficeDetailed'
13690
+ lookup_name = 'Office'
13691
+ when 'MediumOfficeDetailed'
13692
+ lookup_name = 'Office'
13693
+ when 'LargeOfficeDetailed'
13694
+ lookup_name = 'Office'
13695
+ when 'RetailStandalone'
13696
+ lookup_name = 'Retail'
13697
+ when 'RetailStripmall'
13698
+ lookup_name = 'StripMall'
13699
+ when 'Office'
13700
+ lookup_name = 'Office'
13701
+ end
13702
+ return lookup_name
13703
+ end
13704
+
13705
+ # daylighting adjustments specific to the prototype model
13706
+ #
13707
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
13708
+ # @param building_type [string] the building type
13709
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
13710
+ # @param prototype_input [Hash] hash of prototype inputs
13711
+ # @return [Bool] returns true if successful, false if not
13712
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
13713
+ return true
13714
+ end
13715
+ end
13716
+
13717
+ # This class represents a prototypical ASHRAE901PRM2019 LargeOffice.
13718
+ class ASHRAE901PRM2019LargeOffice < ASHRAE901PRM2019
13719
+ @@building_type = "LargeOffice"
13720
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
13721
+ attr_accessor :prototype_database
13722
+ attr_accessor :prototype_input
13723
+ attr_accessor :lookup_building_type
13724
+ attr_accessor :space_type_map
13725
+ attr_accessor :geometry_file
13726
+ attr_accessor :building_story_map
13727
+ attr_accessor :system_to_space_map
13728
+ def initialize
13729
+ super()
13730
+ @instvarbuilding_type = @@building_type
13731
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
13732
+ if @prototype_input.nil?
13733
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
13734
+ raise("Could not find prototype inputs for ASHRAE901PRM2019LargeOffice, cannot create model.")
13735
+ return false
13736
+ end
13737
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
13738
+ #ideally we should map the data required to a instance variable.
13739
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
13740
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
13741
+ @system_to_space_map = load_hvac_map(hvac_map_file)
13742
+ self.set_variables()
13743
+ end
13744
+ # This method is used to extend the class with building-type-specific
13745
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
13746
+ # has its own set of methods that change things which are not
13747
+ # common across all prototype buildings, even within a given Standard.
13748
+ def set_variables()
13749
+ # Will be overwritten in class reopen file.
13750
+ # add all building methods for now.
13751
+ self.extend(LargeOffice) unless @template == 'NECB 2011'
13752
+ end
13753
+ # Returns the mapping between the names of the spaces
13754
+ # in the geometry .osm file and the space types
13755
+ # available for this particular Standard.
13756
+ def define_space_type_map(building_type, climate_zone)
13757
+ return @space_type_map
13758
+ end
13759
+ # Returns the mapping between the names of the spaces
13760
+ # in the geometry .osm file and the HVAC system that will
13761
+ # be applied to those spaces.
13762
+ def define_hvac_system_map(building_type, climate_zone)
13763
+ return @system_to_space_map
13764
+ end
13765
+ # Returns the mapping between the names of the spaces
13766
+ # in the geometry .osm file and the building story
13767
+ # that they are located on.
13768
+ def define_building_story_map(building_type, climate_zone)
13769
+ return @building_story_map
13770
+ end
13771
+ # Does nothing unless implmented by the specific standard
13772
+ def model_modify_oa_controller(model)
13773
+ end
13774
+ # Does nothing unless implmented by the specific standard
13775
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
13776
+ end
13777
+
13778
+ # update exhuast fan efficiency
13779
+ #
13780
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
13781
+ # @return [Bool] returns true if successful, false if not
13782
+ def model_update_exhaust_fan_efficiency(model)
13783
+ return true
13784
+ end
13785
+
13786
+ # Does nothing unless implmented by the specific standard
13787
+ def model_update_fan_efficiency(model)
13788
+ end
13789
+ # Get the name of the building type used in lookups
13790
+ #
13791
+ # @param building_type [String] the building type
13792
+ # @return [String] returns the lookup name as a string
13793
+ # @todo Unify the lookup names and eliminate this method
13794
+ def model_get_lookup_name(building_type)
13795
+ lookup_name = building_type
13796
+ case building_type
13797
+ when 'SmallOffice'
13798
+ lookup_name = 'Office'
13799
+ when 'MediumOffice'
13800
+ lookup_name = 'Office'
13801
+ when 'LargeOffice'
13802
+ lookup_name = 'Office'
13803
+ when 'SmallOfficeDetailed'
13804
+ lookup_name = 'Office'
13805
+ when 'MediumOfficeDetailed'
13806
+ lookup_name = 'Office'
13807
+ when 'LargeOfficeDetailed'
13808
+ lookup_name = 'Office'
13809
+ when 'RetailStandalone'
13810
+ lookup_name = 'Retail'
13811
+ when 'RetailStripmall'
13812
+ lookup_name = 'StripMall'
13813
+ when 'Office'
13814
+ lookup_name = 'Office'
13815
+ end
13816
+ return lookup_name
13817
+ end
13818
+
13819
+ # daylighting adjustments specific to the prototype model
13820
+ #
13821
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
13822
+ # @param building_type [string] the building type
13823
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
13824
+ # @param prototype_input [Hash] hash of prototype inputs
13825
+ # @return [Bool] returns true if successful, false if not
13826
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
13827
+ return true
13828
+ end
13829
+ end
13830
+
13831
+ # This class represents a prototypical ASHRAE901PRM2019 MediumOffice.
13832
+ class ASHRAE901PRM2019MediumOffice < ASHRAE901PRM2019
13833
+ @@building_type = "MediumOffice"
13834
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
13835
+ attr_accessor :prototype_database
13836
+ attr_accessor :prototype_input
13837
+ attr_accessor :lookup_building_type
13838
+ attr_accessor :space_type_map
13839
+ attr_accessor :geometry_file
13840
+ attr_accessor :building_story_map
13841
+ attr_accessor :system_to_space_map
13842
+ def initialize
13843
+ super()
13844
+ @instvarbuilding_type = @@building_type
13845
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
13846
+ if @prototype_input.nil?
13847
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
13848
+ raise("Could not find prototype inputs for ASHRAE901PRM2019MediumOffice, cannot create model.")
13849
+ return false
13850
+ end
13851
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
13852
+ #ideally we should map the data required to a instance variable.
13853
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
13854
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
13855
+ @system_to_space_map = load_hvac_map(hvac_map_file)
13856
+ self.set_variables()
13857
+ end
13858
+ # This method is used to extend the class with building-type-specific
13859
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
13860
+ # has its own set of methods that change things which are not
13861
+ # common across all prototype buildings, even within a given Standard.
13862
+ def set_variables()
13863
+ # Will be overwritten in class reopen file.
13864
+ # add all building methods for now.
13865
+ self.extend(MediumOffice) unless @template == 'NECB 2011'
13866
+ end
13867
+ # Returns the mapping between the names of the spaces
13868
+ # in the geometry .osm file and the space types
13869
+ # available for this particular Standard.
13870
+ def define_space_type_map(building_type, climate_zone)
13871
+ return @space_type_map
13872
+ end
13873
+ # Returns the mapping between the names of the spaces
13874
+ # in the geometry .osm file and the HVAC system that will
13875
+ # be applied to those spaces.
13876
+ def define_hvac_system_map(building_type, climate_zone)
13877
+ return @system_to_space_map
13878
+ end
13879
+ # Returns the mapping between the names of the spaces
13880
+ # in the geometry .osm file and the building story
13881
+ # that they are located on.
13882
+ def define_building_story_map(building_type, climate_zone)
13883
+ return @building_story_map
13884
+ end
13885
+ # Does nothing unless implmented by the specific standard
13886
+ def model_modify_oa_controller(model)
13887
+ end
13888
+ # Does nothing unless implmented by the specific standard
13889
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
13890
+ end
13891
+
13892
+ # update exhuast fan efficiency
13893
+ #
13894
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
13895
+ # @return [Bool] returns true if successful, false if not
13896
+ def model_update_exhaust_fan_efficiency(model)
13897
+ return true
13898
+ end
13899
+
13900
+ # Does nothing unless implmented by the specific standard
13901
+ def model_update_fan_efficiency(model)
13902
+ end
13903
+ # Get the name of the building type used in lookups
13904
+ #
13905
+ # @param building_type [String] the building type
13906
+ # @return [String] returns the lookup name as a string
13907
+ # @todo Unify the lookup names and eliminate this method
13908
+ def model_get_lookup_name(building_type)
13909
+ lookup_name = building_type
13910
+ case building_type
13911
+ when 'SmallOffice'
13912
+ lookup_name = 'Office'
13913
+ when 'MediumOffice'
13914
+ lookup_name = 'Office'
13915
+ when 'LargeOffice'
13916
+ lookup_name = 'Office'
13917
+ when 'SmallOfficeDetailed'
13918
+ lookup_name = 'Office'
13919
+ when 'MediumOfficeDetailed'
13920
+ lookup_name = 'Office'
13921
+ when 'LargeOfficeDetailed'
13922
+ lookup_name = 'Office'
13923
+ when 'RetailStandalone'
13924
+ lookup_name = 'Retail'
13925
+ when 'RetailStripmall'
13926
+ lookup_name = 'StripMall'
13927
+ when 'Office'
13928
+ lookup_name = 'Office'
13929
+ end
13930
+ return lookup_name
13931
+ end
13932
+
13933
+ # daylighting adjustments specific to the prototype model
13934
+ #
13935
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
13936
+ # @param building_type [string] the building type
13937
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
13938
+ # @param prototype_input [Hash] hash of prototype inputs
13939
+ # @return [Bool] returns true if successful, false if not
13940
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
13941
+ return true
13942
+ end
13943
+ end
13944
+
13945
+ # This class represents a prototypical ASHRAE901PRM2019 MidriseApartment.
13946
+ class ASHRAE901PRM2019MidriseApartment < ASHRAE901PRM2019
13947
+ @@building_type = "MidriseApartment"
13948
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
13949
+ attr_accessor :prototype_database
13950
+ attr_accessor :prototype_input
13951
+ attr_accessor :lookup_building_type
13952
+ attr_accessor :space_type_map
13953
+ attr_accessor :geometry_file
13954
+ attr_accessor :building_story_map
13955
+ attr_accessor :system_to_space_map
13956
+ def initialize
13957
+ super()
13958
+ @instvarbuilding_type = @@building_type
13959
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
13960
+ if @prototype_input.nil?
13961
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
13962
+ raise("Could not find prototype inputs for ASHRAE901PRM2019MidriseApartment, cannot create model.")
13963
+ return false
13964
+ end
13965
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
13966
+ #ideally we should map the data required to a instance variable.
13967
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
13968
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
13969
+ @system_to_space_map = load_hvac_map(hvac_map_file)
13970
+ self.set_variables()
13971
+ end
13972
+ # This method is used to extend the class with building-type-specific
13973
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
13974
+ # has its own set of methods that change things which are not
13975
+ # common across all prototype buildings, even within a given Standard.
13976
+ def set_variables()
13977
+ # Will be overwritten in class reopen file.
13978
+ # add all building methods for now.
13979
+ self.extend(MidriseApartment) unless @template == 'NECB 2011'
13980
+ end
13981
+ # Returns the mapping between the names of the spaces
13982
+ # in the geometry .osm file and the space types
13983
+ # available for this particular Standard.
13984
+ def define_space_type_map(building_type, climate_zone)
13985
+ return @space_type_map
13986
+ end
13987
+ # Returns the mapping between the names of the spaces
13988
+ # in the geometry .osm file and the HVAC system that will
13989
+ # be applied to those spaces.
13990
+ def define_hvac_system_map(building_type, climate_zone)
13991
+ return @system_to_space_map
13992
+ end
13993
+ # Returns the mapping between the names of the spaces
13994
+ # in the geometry .osm file and the building story
13995
+ # that they are located on.
13996
+ def define_building_story_map(building_type, climate_zone)
13997
+ return @building_story_map
13998
+ end
13999
+ # Does nothing unless implmented by the specific standard
14000
+ def model_modify_oa_controller(model)
14001
+ end
14002
+ # Does nothing unless implmented by the specific standard
14003
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
14004
+ end
14005
+
14006
+ # update exhuast fan efficiency
14007
+ #
14008
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14009
+ # @return [Bool] returns true if successful, false if not
14010
+ def model_update_exhaust_fan_efficiency(model)
14011
+ return true
14012
+ end
14013
+
14014
+ # Does nothing unless implmented by the specific standard
14015
+ def model_update_fan_efficiency(model)
14016
+ end
14017
+ # Get the name of the building type used in lookups
14018
+ #
14019
+ # @param building_type [String] the building type
14020
+ # @return [String] returns the lookup name as a string
14021
+ # @todo Unify the lookup names and eliminate this method
14022
+ def model_get_lookup_name(building_type)
14023
+ lookup_name = building_type
14024
+ case building_type
14025
+ when 'SmallOffice'
14026
+ lookup_name = 'Office'
14027
+ when 'MediumOffice'
14028
+ lookup_name = 'Office'
14029
+ when 'LargeOffice'
14030
+ lookup_name = 'Office'
14031
+ when 'SmallOfficeDetailed'
14032
+ lookup_name = 'Office'
14033
+ when 'MediumOfficeDetailed'
14034
+ lookup_name = 'Office'
14035
+ when 'LargeOfficeDetailed'
14036
+ lookup_name = 'Office'
14037
+ when 'RetailStandalone'
14038
+ lookup_name = 'Retail'
14039
+ when 'RetailStripmall'
14040
+ lookup_name = 'StripMall'
14041
+ when 'Office'
14042
+ lookup_name = 'Office'
14043
+ end
14044
+ return lookup_name
14045
+ end
14046
+
14047
+ # daylighting adjustments specific to the prototype model
14048
+ #
14049
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14050
+ # @param building_type [string] the building type
14051
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
14052
+ # @param prototype_input [Hash] hash of prototype inputs
14053
+ # @return [Bool] returns true if successful, false if not
14054
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
14055
+ return true
14056
+ end
14057
+ end
14058
+
14059
+ # This class represents a prototypical ASHRAE901PRM2019 Outpatient.
14060
+ class ASHRAE901PRM2019Outpatient < ASHRAE901PRM2019
14061
+ @@building_type = "Outpatient"
14062
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
14063
+ attr_accessor :prototype_database
14064
+ attr_accessor :prototype_input
14065
+ attr_accessor :lookup_building_type
14066
+ attr_accessor :space_type_map
14067
+ attr_accessor :geometry_file
14068
+ attr_accessor :building_story_map
14069
+ attr_accessor :system_to_space_map
14070
+ def initialize
14071
+ super()
14072
+ @instvarbuilding_type = @@building_type
14073
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
14074
+ if @prototype_input.nil?
14075
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
14076
+ raise("Could not find prototype inputs for ASHRAE901PRM2019Outpatient, cannot create model.")
14077
+ return false
14078
+ end
14079
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
14080
+ #ideally we should map the data required to a instance variable.
14081
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
14082
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
14083
+ @system_to_space_map = load_hvac_map(hvac_map_file)
14084
+ self.set_variables()
14085
+ end
14086
+ # This method is used to extend the class with building-type-specific
14087
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
14088
+ # has its own set of methods that change things which are not
14089
+ # common across all prototype buildings, even within a given Standard.
14090
+ def set_variables()
14091
+ # Will be overwritten in class reopen file.
14092
+ # add all building methods for now.
14093
+ self.extend(Outpatient) unless @template == 'NECB 2011'
14094
+ end
14095
+ # Returns the mapping between the names of the spaces
14096
+ # in the geometry .osm file and the space types
14097
+ # available for this particular Standard.
14098
+ def define_space_type_map(building_type, climate_zone)
14099
+ return @space_type_map
14100
+ end
14101
+ # Returns the mapping between the names of the spaces
14102
+ # in the geometry .osm file and the HVAC system that will
14103
+ # be applied to those spaces.
14104
+ def define_hvac_system_map(building_type, climate_zone)
14105
+ return @system_to_space_map
14106
+ end
14107
+ # Returns the mapping between the names of the spaces
14108
+ # in the geometry .osm file and the building story
14109
+ # that they are located on.
14110
+ def define_building_story_map(building_type, climate_zone)
14111
+ return @building_story_map
14112
+ end
14113
+ # Does nothing unless implmented by the specific standard
14114
+ def model_modify_oa_controller(model)
14115
+ end
14116
+ # Does nothing unless implmented by the specific standard
14117
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
14118
+ end
14119
+
14120
+ # update exhuast fan efficiency
14121
+ #
14122
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14123
+ # @return [Bool] returns true if successful, false if not
14124
+ def model_update_exhaust_fan_efficiency(model)
14125
+ return true
14126
+ end
14127
+
14128
+ # Does nothing unless implmented by the specific standard
14129
+ def model_update_fan_efficiency(model)
14130
+ end
14131
+ # Get the name of the building type used in lookups
14132
+ #
14133
+ # @param building_type [String] the building type
14134
+ # @return [String] returns the lookup name as a string
14135
+ # @todo Unify the lookup names and eliminate this method
14136
+ def model_get_lookup_name(building_type)
14137
+ lookup_name = building_type
14138
+ case building_type
14139
+ when 'SmallOffice'
14140
+ lookup_name = 'Office'
14141
+ when 'MediumOffice'
14142
+ lookup_name = 'Office'
14143
+ when 'LargeOffice'
14144
+ lookup_name = 'Office'
14145
+ when 'SmallOfficeDetailed'
14146
+ lookup_name = 'Office'
14147
+ when 'MediumOfficeDetailed'
14148
+ lookup_name = 'Office'
14149
+ when 'LargeOfficeDetailed'
14150
+ lookup_name = 'Office'
14151
+ when 'RetailStandalone'
14152
+ lookup_name = 'Retail'
14153
+ when 'RetailStripmall'
14154
+ lookup_name = 'StripMall'
14155
+ when 'Office'
14156
+ lookup_name = 'Office'
14157
+ end
14158
+ return lookup_name
14159
+ end
14160
+
14161
+ # daylighting adjustments specific to the prototype model
14162
+ #
14163
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14164
+ # @param building_type [string] the building type
14165
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
14166
+ # @param prototype_input [Hash] hash of prototype inputs
14167
+ # @return [Bool] returns true if successful, false if not
14168
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
14169
+ return true
14170
+ end
14171
+ end
14172
+
14173
+ # This class represents a prototypical ASHRAE901PRM2019 PrimarySchool.
14174
+ class ASHRAE901PRM2019PrimarySchool < ASHRAE901PRM2019
14175
+ @@building_type = "PrimarySchool"
14176
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
14177
+ attr_accessor :prototype_database
14178
+ attr_accessor :prototype_input
14179
+ attr_accessor :lookup_building_type
14180
+ attr_accessor :space_type_map
14181
+ attr_accessor :geometry_file
14182
+ attr_accessor :building_story_map
14183
+ attr_accessor :system_to_space_map
14184
+ def initialize
14185
+ super()
14186
+ @instvarbuilding_type = @@building_type
14187
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
14188
+ if @prototype_input.nil?
14189
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
14190
+ raise("Could not find prototype inputs for ASHRAE901PRM2019PrimarySchool, cannot create model.")
14191
+ return false
14192
+ end
14193
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
14194
+ #ideally we should map the data required to a instance variable.
14195
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
14196
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
14197
+ @system_to_space_map = load_hvac_map(hvac_map_file)
14198
+ self.set_variables()
14199
+ end
14200
+ # This method is used to extend the class with building-type-specific
14201
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
14202
+ # has its own set of methods that change things which are not
14203
+ # common across all prototype buildings, even within a given Standard.
14204
+ def set_variables()
14205
+ # Will be overwritten in class reopen file.
14206
+ # add all building methods for now.
14207
+ self.extend(PrimarySchool) unless @template == 'NECB 2011'
14208
+ end
14209
+ # Returns the mapping between the names of the spaces
14210
+ # in the geometry .osm file and the space types
14211
+ # available for this particular Standard.
14212
+ def define_space_type_map(building_type, climate_zone)
14213
+ return @space_type_map
14214
+ end
14215
+ # Returns the mapping between the names of the spaces
14216
+ # in the geometry .osm file and the HVAC system that will
14217
+ # be applied to those spaces.
14218
+ def define_hvac_system_map(building_type, climate_zone)
14219
+ return @system_to_space_map
14220
+ end
14221
+ # Returns the mapping between the names of the spaces
14222
+ # in the geometry .osm file and the building story
14223
+ # that they are located on.
14224
+ def define_building_story_map(building_type, climate_zone)
14225
+ return @building_story_map
14226
+ end
14227
+ # Does nothing unless implmented by the specific standard
14228
+ def model_modify_oa_controller(model)
14229
+ end
14230
+ # Does nothing unless implmented by the specific standard
14231
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
14232
+ end
14233
+
14234
+ # update exhuast fan efficiency
14235
+ #
14236
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14237
+ # @return [Bool] returns true if successful, false if not
14238
+ def model_update_exhaust_fan_efficiency(model)
14239
+ return true
14240
+ end
14241
+
14242
+ # Does nothing unless implmented by the specific standard
14243
+ def model_update_fan_efficiency(model)
14244
+ end
14245
+ # Get the name of the building type used in lookups
14246
+ #
14247
+ # @param building_type [String] the building type
14248
+ # @return [String] returns the lookup name as a string
14249
+ # @todo Unify the lookup names and eliminate this method
14250
+ def model_get_lookup_name(building_type)
14251
+ lookup_name = building_type
14252
+ case building_type
14253
+ when 'SmallOffice'
14254
+ lookup_name = 'Office'
14255
+ when 'MediumOffice'
14256
+ lookup_name = 'Office'
14257
+ when 'LargeOffice'
14258
+ lookup_name = 'Office'
14259
+ when 'SmallOfficeDetailed'
14260
+ lookup_name = 'Office'
14261
+ when 'MediumOfficeDetailed'
14262
+ lookup_name = 'Office'
14263
+ when 'LargeOfficeDetailed'
14264
+ lookup_name = 'Office'
14265
+ when 'RetailStandalone'
14266
+ lookup_name = 'Retail'
14267
+ when 'RetailStripmall'
14268
+ lookup_name = 'StripMall'
14269
+ when 'Office'
14270
+ lookup_name = 'Office'
14271
+ end
14272
+ return lookup_name
14273
+ end
14274
+
14275
+ # daylighting adjustments specific to the prototype model
14276
+ #
14277
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14278
+ # @param building_type [string] the building type
14279
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
14280
+ # @param prototype_input [Hash] hash of prototype inputs
14281
+ # @return [Bool] returns true if successful, false if not
14282
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
14283
+ return true
14284
+ end
14285
+ end
14286
+
14287
+ # This class represents a prototypical ASHRAE901PRM2019 QuickServiceRestaurant.
14288
+ class ASHRAE901PRM2019QuickServiceRestaurant < ASHRAE901PRM2019
14289
+ @@building_type = "QuickServiceRestaurant"
14290
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
14291
+ attr_accessor :prototype_database
14292
+ attr_accessor :prototype_input
14293
+ attr_accessor :lookup_building_type
14294
+ attr_accessor :space_type_map
14295
+ attr_accessor :geometry_file
14296
+ attr_accessor :building_story_map
14297
+ attr_accessor :system_to_space_map
14298
+ def initialize
14299
+ super()
14300
+ @instvarbuilding_type = @@building_type
14301
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
14302
+ if @prototype_input.nil?
14303
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
14304
+ raise("Could not find prototype inputs for ASHRAE901PRM2019QuickServiceRestaurant, cannot create model.")
14305
+ return false
14306
+ end
14307
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
14308
+ #ideally we should map the data required to a instance variable.
14309
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
14310
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
14311
+ @system_to_space_map = load_hvac_map(hvac_map_file)
14312
+ self.set_variables()
14313
+ end
14314
+ # This method is used to extend the class with building-type-specific
14315
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
14316
+ # has its own set of methods that change things which are not
14317
+ # common across all prototype buildings, even within a given Standard.
14318
+ def set_variables()
14319
+ # Will be overwritten in class reopen file.
14320
+ # add all building methods for now.
14321
+ self.extend(QuickServiceRestaurant) unless @template == 'NECB 2011'
14322
+ end
14323
+ # Returns the mapping between the names of the spaces
14324
+ # in the geometry .osm file and the space types
14325
+ # available for this particular Standard.
14326
+ def define_space_type_map(building_type, climate_zone)
14327
+ return @space_type_map
14328
+ end
14329
+ # Returns the mapping between the names of the spaces
14330
+ # in the geometry .osm file and the HVAC system that will
14331
+ # be applied to those spaces.
14332
+ def define_hvac_system_map(building_type, climate_zone)
14333
+ return @system_to_space_map
14334
+ end
14335
+ # Returns the mapping between the names of the spaces
14336
+ # in the geometry .osm file and the building story
14337
+ # that they are located on.
14338
+ def define_building_story_map(building_type, climate_zone)
14339
+ return @building_story_map
14340
+ end
14341
+ # Does nothing unless implmented by the specific standard
14342
+ def model_modify_oa_controller(model)
14343
+ end
14344
+ # Does nothing unless implmented by the specific standard
14345
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
14346
+ end
14347
+
14348
+ # update exhuast fan efficiency
14349
+ #
14350
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14351
+ # @return [Bool] returns true if successful, false if not
14352
+ def model_update_exhaust_fan_efficiency(model)
14353
+ return true
14354
+ end
14355
+
14356
+ # Does nothing unless implmented by the specific standard
14357
+ def model_update_fan_efficiency(model)
14358
+ end
14359
+ # Get the name of the building type used in lookups
14360
+ #
14361
+ # @param building_type [String] the building type
14362
+ # @return [String] returns the lookup name as a string
14363
+ # @todo Unify the lookup names and eliminate this method
14364
+ def model_get_lookup_name(building_type)
14365
+ lookup_name = building_type
14366
+ case building_type
14367
+ when 'SmallOffice'
14368
+ lookup_name = 'Office'
14369
+ when 'MediumOffice'
14370
+ lookup_name = 'Office'
14371
+ when 'LargeOffice'
14372
+ lookup_name = 'Office'
14373
+ when 'SmallOfficeDetailed'
14374
+ lookup_name = 'Office'
14375
+ when 'MediumOfficeDetailed'
14376
+ lookup_name = 'Office'
14377
+ when 'LargeOfficeDetailed'
14378
+ lookup_name = 'Office'
14379
+ when 'RetailStandalone'
14380
+ lookup_name = 'Retail'
14381
+ when 'RetailStripmall'
14382
+ lookup_name = 'StripMall'
14383
+ when 'Office'
14384
+ lookup_name = 'Office'
14385
+ end
14386
+ return lookup_name
14387
+ end
14388
+
14389
+ # daylighting adjustments specific to the prototype model
14390
+ #
14391
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14392
+ # @param building_type [string] the building type
14393
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
14394
+ # @param prototype_input [Hash] hash of prototype inputs
14395
+ # @return [Bool] returns true if successful, false if not
14396
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
14397
+ return true
14398
+ end
14399
+ end
14400
+
14401
+ # This class represents a prototypical ASHRAE901PRM2019 RetailStandalone.
14402
+ class ASHRAE901PRM2019RetailStandalone < ASHRAE901PRM2019
14403
+ @@building_type = "RetailStandalone"
14404
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
14405
+ attr_accessor :prototype_database
14406
+ attr_accessor :prototype_input
14407
+ attr_accessor :lookup_building_type
14408
+ attr_accessor :space_type_map
14409
+ attr_accessor :geometry_file
14410
+ attr_accessor :building_story_map
14411
+ attr_accessor :system_to_space_map
14412
+ def initialize
14413
+ super()
14414
+ @instvarbuilding_type = @@building_type
14415
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
14416
+ if @prototype_input.nil?
14417
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
14418
+ raise("Could not find prototype inputs for ASHRAE901PRM2019RetailStandalone, cannot create model.")
14419
+ return false
14420
+ end
14421
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
14422
+ #ideally we should map the data required to a instance variable.
14423
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
14424
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
14425
+ @system_to_space_map = load_hvac_map(hvac_map_file)
14426
+ self.set_variables()
14427
+ end
14428
+ # This method is used to extend the class with building-type-specific
14429
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
14430
+ # has its own set of methods that change things which are not
14431
+ # common across all prototype buildings, even within a given Standard.
14432
+ def set_variables()
14433
+ # Will be overwritten in class reopen file.
14434
+ # add all building methods for now.
14435
+ self.extend(RetailStandalone) unless @template == 'NECB 2011'
14436
+ end
14437
+ # Returns the mapping between the names of the spaces
14438
+ # in the geometry .osm file and the space types
14439
+ # available for this particular Standard.
14440
+ def define_space_type_map(building_type, climate_zone)
14441
+ return @space_type_map
14442
+ end
14443
+ # Returns the mapping between the names of the spaces
14444
+ # in the geometry .osm file and the HVAC system that will
14445
+ # be applied to those spaces.
14446
+ def define_hvac_system_map(building_type, climate_zone)
14447
+ return @system_to_space_map
14448
+ end
14449
+ # Returns the mapping between the names of the spaces
14450
+ # in the geometry .osm file and the building story
14451
+ # that they are located on.
14452
+ def define_building_story_map(building_type, climate_zone)
14453
+ return @building_story_map
14454
+ end
14455
+ # Does nothing unless implmented by the specific standard
14456
+ def model_modify_oa_controller(model)
14457
+ end
14458
+ # Does nothing unless implmented by the specific standard
14459
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
14460
+ end
14461
+
14462
+ # update exhuast fan efficiency
14463
+ #
14464
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14465
+ # @return [Bool] returns true if successful, false if not
14466
+ def model_update_exhaust_fan_efficiency(model)
14467
+ return true
14468
+ end
14469
+
14470
+ # Does nothing unless implmented by the specific standard
14471
+ def model_update_fan_efficiency(model)
14472
+ end
14473
+ # Get the name of the building type used in lookups
14474
+ #
14475
+ # @param building_type [String] the building type
14476
+ # @return [String] returns the lookup name as a string
14477
+ # @todo Unify the lookup names and eliminate this method
14478
+ def model_get_lookup_name(building_type)
14479
+ lookup_name = building_type
14480
+ case building_type
14481
+ when 'SmallOffice'
14482
+ lookup_name = 'Office'
14483
+ when 'MediumOffice'
14484
+ lookup_name = 'Office'
14485
+ when 'LargeOffice'
14486
+ lookup_name = 'Office'
14487
+ when 'SmallOfficeDetailed'
14488
+ lookup_name = 'Office'
14489
+ when 'MediumOfficeDetailed'
14490
+ lookup_name = 'Office'
14491
+ when 'LargeOfficeDetailed'
14492
+ lookup_name = 'Office'
14493
+ when 'RetailStandalone'
14494
+ lookup_name = 'Retail'
14495
+ when 'RetailStripmall'
14496
+ lookup_name = 'StripMall'
14497
+ when 'Office'
14498
+ lookup_name = 'Office'
14499
+ end
14500
+ return lookup_name
14501
+ end
14502
+
14503
+ # daylighting adjustments specific to the prototype model
14504
+ #
14505
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14506
+ # @param building_type [string] the building type
14507
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
14508
+ # @param prototype_input [Hash] hash of prototype inputs
14509
+ # @return [Bool] returns true if successful, false if not
14510
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
14511
+ return true
14512
+ end
14513
+ end
14514
+
14515
+ # This class represents a prototypical ASHRAE901PRM2019 SecondarySchool.
14516
+ class ASHRAE901PRM2019SecondarySchool < ASHRAE901PRM2019
14517
+ @@building_type = "SecondarySchool"
14518
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
14519
+ attr_accessor :prototype_database
14520
+ attr_accessor :prototype_input
14521
+ attr_accessor :lookup_building_type
14522
+ attr_accessor :space_type_map
14523
+ attr_accessor :geometry_file
14524
+ attr_accessor :building_story_map
14525
+ attr_accessor :system_to_space_map
14526
+ def initialize
14527
+ super()
14528
+ @instvarbuilding_type = @@building_type
14529
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
14530
+ if @prototype_input.nil?
14531
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
14532
+ raise("Could not find prototype inputs for ASHRAE901PRM2019SecondarySchool, cannot create model.")
14533
+ return false
14534
+ end
14535
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
14536
+ #ideally we should map the data required to a instance variable.
14537
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
14538
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
14539
+ @system_to_space_map = load_hvac_map(hvac_map_file)
14540
+ self.set_variables()
14541
+ end
14542
+ # This method is used to extend the class with building-type-specific
14543
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
14544
+ # has its own set of methods that change things which are not
14545
+ # common across all prototype buildings, even within a given Standard.
14546
+ def set_variables()
14547
+ # Will be overwritten in class reopen file.
14548
+ # add all building methods for now.
14549
+ self.extend(SecondarySchool) unless @template == 'NECB 2011'
14550
+ end
14551
+ # Returns the mapping between the names of the spaces
14552
+ # in the geometry .osm file and the space types
14553
+ # available for this particular Standard.
14554
+ def define_space_type_map(building_type, climate_zone)
14555
+ return @space_type_map
14556
+ end
14557
+ # Returns the mapping between the names of the spaces
14558
+ # in the geometry .osm file and the HVAC system that will
14559
+ # be applied to those spaces.
14560
+ def define_hvac_system_map(building_type, climate_zone)
14561
+ return @system_to_space_map
14562
+ end
14563
+ # Returns the mapping between the names of the spaces
14564
+ # in the geometry .osm file and the building story
14565
+ # that they are located on.
14566
+ def define_building_story_map(building_type, climate_zone)
14567
+ return @building_story_map
14568
+ end
14569
+ # Does nothing unless implmented by the specific standard
14570
+ def model_modify_oa_controller(model)
14571
+ end
14572
+ # Does nothing unless implmented by the specific standard
14573
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
14574
+ end
14575
+
14576
+ # update exhuast fan efficiency
14577
+ #
14578
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14579
+ # @return [Bool] returns true if successful, false if not
14580
+ def model_update_exhaust_fan_efficiency(model)
14581
+ return true
14582
+ end
14583
+
14584
+ # Does nothing unless implmented by the specific standard
14585
+ def model_update_fan_efficiency(model)
14586
+ end
14587
+ # Get the name of the building type used in lookups
14588
+ #
14589
+ # @param building_type [String] the building type
14590
+ # @return [String] returns the lookup name as a string
14591
+ # @todo Unify the lookup names and eliminate this method
14592
+ def model_get_lookup_name(building_type)
14593
+ lookup_name = building_type
14594
+ case building_type
14595
+ when 'SmallOffice'
14596
+ lookup_name = 'Office'
14597
+ when 'MediumOffice'
14598
+ lookup_name = 'Office'
14599
+ when 'LargeOffice'
14600
+ lookup_name = 'Office'
14601
+ when 'SmallOfficeDetailed'
14602
+ lookup_name = 'Office'
14603
+ when 'MediumOfficeDetailed'
14604
+ lookup_name = 'Office'
14605
+ when 'LargeOfficeDetailed'
14606
+ lookup_name = 'Office'
14607
+ when 'RetailStandalone'
14608
+ lookup_name = 'Retail'
14609
+ when 'RetailStripmall'
14610
+ lookup_name = 'StripMall'
14611
+ when 'Office'
14612
+ lookup_name = 'Office'
14613
+ end
14614
+ return lookup_name
14615
+ end
14616
+
14617
+ # daylighting adjustments specific to the prototype model
14618
+ #
14619
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14620
+ # @param building_type [string] the building type
14621
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
14622
+ # @param prototype_input [Hash] hash of prototype inputs
14623
+ # @return [Bool] returns true if successful, false if not
14624
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
14625
+ return true
14626
+ end
14627
+ end
14628
+
14629
+ # This class represents a prototypical ASHRAE901PRM2019 SmallHotel.
14630
+ class ASHRAE901PRM2019SmallHotel < ASHRAE901PRM2019
14631
+ @@building_type = "SmallHotel"
14632
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
14633
+ attr_accessor :prototype_database
14634
+ attr_accessor :prototype_input
14635
+ attr_accessor :lookup_building_type
14636
+ attr_accessor :space_type_map
14637
+ attr_accessor :geometry_file
14638
+ attr_accessor :building_story_map
14639
+ attr_accessor :system_to_space_map
14640
+ def initialize
14641
+ super()
14642
+ @instvarbuilding_type = @@building_type
14643
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
14644
+ if @prototype_input.nil?
14645
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
14646
+ raise("Could not find prototype inputs for ASHRAE901PRM2019SmallHotel, cannot create model.")
14647
+ return false
14648
+ end
14649
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
14650
+ #ideally we should map the data required to a instance variable.
14651
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
14652
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
14653
+ @system_to_space_map = load_hvac_map(hvac_map_file)
14654
+ self.set_variables()
14655
+ end
14656
+ # This method is used to extend the class with building-type-specific
14657
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
14658
+ # has its own set of methods that change things which are not
14659
+ # common across all prototype buildings, even within a given Standard.
14660
+ def set_variables()
14661
+ # Will be overwritten in class reopen file.
14662
+ # add all building methods for now.
14663
+ self.extend(SmallHotel) unless @template == 'NECB 2011'
14664
+ end
14665
+ # Returns the mapping between the names of the spaces
14666
+ # in the geometry .osm file and the space types
14667
+ # available for this particular Standard.
14668
+ def define_space_type_map(building_type, climate_zone)
14669
+ return @space_type_map
14670
+ end
14671
+ # Returns the mapping between the names of the spaces
14672
+ # in the geometry .osm file and the HVAC system that will
14673
+ # be applied to those spaces.
14674
+ def define_hvac_system_map(building_type, climate_zone)
14675
+ return @system_to_space_map
14676
+ end
14677
+ # Returns the mapping between the names of the spaces
14678
+ # in the geometry .osm file and the building story
14679
+ # that they are located on.
14680
+ def define_building_story_map(building_type, climate_zone)
14681
+ return @building_story_map
14682
+ end
14683
+ # Does nothing unless implmented by the specific standard
14684
+ def model_modify_oa_controller(model)
14685
+ end
14686
+ # Does nothing unless implmented by the specific standard
14687
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
14688
+ end
14689
+
14690
+ # update exhuast fan efficiency
14691
+ #
14692
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14693
+ # @return [Bool] returns true if successful, false if not
14694
+ def model_update_exhaust_fan_efficiency(model)
14695
+ return true
14696
+ end
14697
+
14698
+ # Does nothing unless implmented by the specific standard
14699
+ def model_update_fan_efficiency(model)
14700
+ end
14701
+ # Get the name of the building type used in lookups
14702
+ #
14703
+ # @param building_type [String] the building type
14704
+ # @return [String] returns the lookup name as a string
14705
+ # @todo Unify the lookup names and eliminate this method
14706
+ def model_get_lookup_name(building_type)
14707
+ lookup_name = building_type
14708
+ case building_type
14709
+ when 'SmallOffice'
14710
+ lookup_name = 'Office'
14711
+ when 'MediumOffice'
14712
+ lookup_name = 'Office'
14713
+ when 'LargeOffice'
14714
+ lookup_name = 'Office'
14715
+ when 'SmallOfficeDetailed'
14716
+ lookup_name = 'Office'
14717
+ when 'MediumOfficeDetailed'
14718
+ lookup_name = 'Office'
14719
+ when 'LargeOfficeDetailed'
14720
+ lookup_name = 'Office'
14721
+ when 'RetailStandalone'
14722
+ lookup_name = 'Retail'
14723
+ when 'RetailStripmall'
14724
+ lookup_name = 'StripMall'
14725
+ when 'Office'
14726
+ lookup_name = 'Office'
14727
+ end
14728
+ return lookup_name
14729
+ end
14730
+
14731
+ # daylighting adjustments specific to the prototype model
14732
+ #
14733
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14734
+ # @param building_type [string] the building type
14735
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
14736
+ # @param prototype_input [Hash] hash of prototype inputs
14737
+ # @return [Bool] returns true if successful, false if not
14738
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
14739
+ return true
14740
+ end
14741
+ end
14742
+
14743
+ # This class represents a prototypical ASHRAE901PRM2019 SmallOffice.
14744
+ class ASHRAE901PRM2019SmallOffice < ASHRAE901PRM2019
14745
+ @@building_type = "SmallOffice"
14746
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
14747
+ attr_accessor :prototype_database
14748
+ attr_accessor :prototype_input
14749
+ attr_accessor :lookup_building_type
14750
+ attr_accessor :space_type_map
14751
+ attr_accessor :geometry_file
14752
+ attr_accessor :building_story_map
14753
+ attr_accessor :system_to_space_map
14754
+ def initialize
14755
+ super()
14756
+ @instvarbuilding_type = @@building_type
14757
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
14758
+ if @prototype_input.nil?
14759
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
14760
+ raise("Could not find prototype inputs for ASHRAE901PRM2019SmallOffice, cannot create model.")
14761
+ return false
14762
+ end
14763
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
14764
+ #ideally we should map the data required to a instance variable.
14765
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
14766
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
14767
+ @system_to_space_map = load_hvac_map(hvac_map_file)
14768
+ self.set_variables()
14769
+ end
14770
+ # This method is used to extend the class with building-type-specific
14771
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
14772
+ # has its own set of methods that change things which are not
14773
+ # common across all prototype buildings, even within a given Standard.
14774
+ def set_variables()
14775
+ # Will be overwritten in class reopen file.
14776
+ # add all building methods for now.
14777
+ self.extend(SmallOffice) unless @template == 'NECB 2011'
14778
+ end
14779
+ # Returns the mapping between the names of the spaces
14780
+ # in the geometry .osm file and the space types
14781
+ # available for this particular Standard.
14782
+ def define_space_type_map(building_type, climate_zone)
14783
+ return @space_type_map
14784
+ end
14785
+ # Returns the mapping between the names of the spaces
14786
+ # in the geometry .osm file and the HVAC system that will
14787
+ # be applied to those spaces.
14788
+ def define_hvac_system_map(building_type, climate_zone)
14789
+ return @system_to_space_map
14790
+ end
14791
+ # Returns the mapping between the names of the spaces
14792
+ # in the geometry .osm file and the building story
14793
+ # that they are located on.
14794
+ def define_building_story_map(building_type, climate_zone)
14795
+ return @building_story_map
14796
+ end
14797
+ # Does nothing unless implmented by the specific standard
14798
+ def model_modify_oa_controller(model)
14799
+ end
14800
+ # Does nothing unless implmented by the specific standard
14801
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
14802
+ end
14803
+
14804
+ # update exhuast fan efficiency
14805
+ #
14806
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14807
+ # @return [Bool] returns true if successful, false if not
14808
+ def model_update_exhaust_fan_efficiency(model)
14809
+ return true
14810
+ end
14811
+
14812
+ # Does nothing unless implmented by the specific standard
14813
+ def model_update_fan_efficiency(model)
14814
+ end
14815
+ # Get the name of the building type used in lookups
14816
+ #
14817
+ # @param building_type [String] the building type
14818
+ # @return [String] returns the lookup name as a string
14819
+ # @todo Unify the lookup names and eliminate this method
14820
+ def model_get_lookup_name(building_type)
14821
+ lookup_name = building_type
14822
+ case building_type
14823
+ when 'SmallOffice'
14824
+ lookup_name = 'Office'
14825
+ when 'MediumOffice'
14826
+ lookup_name = 'Office'
14827
+ when 'LargeOffice'
14828
+ lookup_name = 'Office'
14829
+ when 'SmallOfficeDetailed'
14830
+ lookup_name = 'Office'
14831
+ when 'MediumOfficeDetailed'
14832
+ lookup_name = 'Office'
14833
+ when 'LargeOfficeDetailed'
14834
+ lookup_name = 'Office'
14835
+ when 'RetailStandalone'
14836
+ lookup_name = 'Retail'
14837
+ when 'RetailStripmall'
14838
+ lookup_name = 'StripMall'
14839
+ when 'Office'
14840
+ lookup_name = 'Office'
14841
+ end
14842
+ return lookup_name
14843
+ end
14844
+
14845
+ # daylighting adjustments specific to the prototype model
14846
+ #
14847
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14848
+ # @param building_type [string] the building type
14849
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
14850
+ # @param prototype_input [Hash] hash of prototype inputs
14851
+ # @return [Bool] returns true if successful, false if not
14852
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
14853
+ return true
14854
+ end
14855
+ end
14856
+
14857
+ # This class represents a prototypical ASHRAE901PRM2019 RetailStripmall.
14858
+ class ASHRAE901PRM2019RetailStripmall < ASHRAE901PRM2019
14859
+ @@building_type = "RetailStripmall"
14860
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
14861
+ attr_accessor :prototype_database
14862
+ attr_accessor :prototype_input
14863
+ attr_accessor :lookup_building_type
14864
+ attr_accessor :space_type_map
14865
+ attr_accessor :geometry_file
14866
+ attr_accessor :building_story_map
14867
+ attr_accessor :system_to_space_map
14868
+ def initialize
14869
+ super()
14870
+ @instvarbuilding_type = @@building_type
14871
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
14872
+ if @prototype_input.nil?
14873
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
14874
+ raise("Could not find prototype inputs for ASHRAE901PRM2019RetailStripmall, cannot create model.")
14875
+ return false
14876
+ end
14877
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
14878
+ #ideally we should map the data required to a instance variable.
14879
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
14880
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
14881
+ @system_to_space_map = load_hvac_map(hvac_map_file)
14882
+ self.set_variables()
14883
+ end
14884
+ # This method is used to extend the class with building-type-specific
14885
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
14886
+ # has its own set of methods that change things which are not
14887
+ # common across all prototype buildings, even within a given Standard.
14888
+ def set_variables()
14889
+ # Will be overwritten in class reopen file.
14890
+ # add all building methods for now.
14891
+ self.extend(RetailStripmall) unless @template == 'NECB 2011'
14892
+ end
14893
+ # Returns the mapping between the names of the spaces
14894
+ # in the geometry .osm file and the space types
14895
+ # available for this particular Standard.
14896
+ def define_space_type_map(building_type, climate_zone)
14897
+ return @space_type_map
14898
+ end
14899
+ # Returns the mapping between the names of the spaces
14900
+ # in the geometry .osm file and the HVAC system that will
14901
+ # be applied to those spaces.
14902
+ def define_hvac_system_map(building_type, climate_zone)
14903
+ return @system_to_space_map
14904
+ end
14905
+ # Returns the mapping between the names of the spaces
14906
+ # in the geometry .osm file and the building story
14907
+ # that they are located on.
14908
+ def define_building_story_map(building_type, climate_zone)
14909
+ return @building_story_map
14910
+ end
14911
+ # Does nothing unless implmented by the specific standard
14912
+ def model_modify_oa_controller(model)
14913
+ end
14914
+ # Does nothing unless implmented by the specific standard
14915
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
14916
+ end
14917
+
14918
+ # update exhuast fan efficiency
14919
+ #
14920
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14921
+ # @return [Bool] returns true if successful, false if not
14922
+ def model_update_exhaust_fan_efficiency(model)
14923
+ return true
14924
+ end
14925
+
14926
+ # Does nothing unless implmented by the specific standard
14927
+ def model_update_fan_efficiency(model)
14928
+ end
14929
+ # Get the name of the building type used in lookups
14930
+ #
14931
+ # @param building_type [String] the building type
14932
+ # @return [String] returns the lookup name as a string
14933
+ # @todo Unify the lookup names and eliminate this method
14934
+ def model_get_lookup_name(building_type)
14935
+ lookup_name = building_type
14936
+ case building_type
14937
+ when 'SmallOffice'
14938
+ lookup_name = 'Office'
14939
+ when 'MediumOffice'
14940
+ lookup_name = 'Office'
14941
+ when 'LargeOffice'
14942
+ lookup_name = 'Office'
14943
+ when 'SmallOfficeDetailed'
14944
+ lookup_name = 'Office'
14945
+ when 'MediumOfficeDetailed'
14946
+ lookup_name = 'Office'
14947
+ when 'LargeOfficeDetailed'
14948
+ lookup_name = 'Office'
14949
+ when 'RetailStandalone'
14950
+ lookup_name = 'Retail'
14951
+ when 'RetailStripmall'
14952
+ lookup_name = 'StripMall'
14953
+ when 'Office'
14954
+ lookup_name = 'Office'
14955
+ end
14956
+ return lookup_name
14957
+ end
14958
+
14959
+ # daylighting adjustments specific to the prototype model
14960
+ #
14961
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
14962
+ # @param building_type [string] the building type
14963
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
14964
+ # @param prototype_input [Hash] hash of prototype inputs
14965
+ # @return [Bool] returns true if successful, false if not
14966
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
14967
+ return true
14968
+ end
14969
+ end
14970
+
14971
+ # This class represents a prototypical ASHRAE901PRM2019 Warehouse.
14972
+ class ASHRAE901PRM2019Warehouse < ASHRAE901PRM2019
14973
+ @@building_type = "Warehouse"
14974
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
14975
+ attr_accessor :prototype_database
14976
+ attr_accessor :prototype_input
14977
+ attr_accessor :lookup_building_type
14978
+ attr_accessor :space_type_map
14979
+ attr_accessor :geometry_file
14980
+ attr_accessor :building_story_map
14981
+ attr_accessor :system_to_space_map
14982
+ def initialize
14983
+ super()
14984
+ @instvarbuilding_type = @@building_type
14985
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
14986
+ if @prototype_input.nil?
14987
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
14988
+ raise("Could not find prototype inputs for ASHRAE901PRM2019Warehouse, cannot create model.")
14989
+ return false
14990
+ end
14991
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
14992
+ #ideally we should map the data required to a instance variable.
14993
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
14994
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
14995
+ @system_to_space_map = load_hvac_map(hvac_map_file)
14996
+ self.set_variables()
14997
+ end
14998
+ # This method is used to extend the class with building-type-specific
14999
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
15000
+ # has its own set of methods that change things which are not
15001
+ # common across all prototype buildings, even within a given Standard.
15002
+ def set_variables()
15003
+ # Will be overwritten in class reopen file.
15004
+ # add all building methods for now.
15005
+ self.extend(Warehouse) unless @template == 'NECB 2011'
15006
+ end
15007
+ # Returns the mapping between the names of the spaces
15008
+ # in the geometry .osm file and the space types
15009
+ # available for this particular Standard.
15010
+ def define_space_type_map(building_type, climate_zone)
15011
+ return @space_type_map
15012
+ end
15013
+ # Returns the mapping between the names of the spaces
15014
+ # in the geometry .osm file and the HVAC system that will
15015
+ # be applied to those spaces.
15016
+ def define_hvac_system_map(building_type, climate_zone)
15017
+ return @system_to_space_map
15018
+ end
15019
+ # Returns the mapping between the names of the spaces
15020
+ # in the geometry .osm file and the building story
15021
+ # that they are located on.
15022
+ def define_building_story_map(building_type, climate_zone)
15023
+ return @building_story_map
15024
+ end
15025
+ # Does nothing unless implmented by the specific standard
15026
+ def model_modify_oa_controller(model)
15027
+ end
15028
+ # Does nothing unless implmented by the specific standard
15029
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
15030
+ end
15031
+
15032
+ # update exhuast fan efficiency
15033
+ #
15034
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15035
+ # @return [Bool] returns true if successful, false if not
15036
+ def model_update_exhaust_fan_efficiency(model)
15037
+ return true
15038
+ end
15039
+
15040
+ # Does nothing unless implmented by the specific standard
15041
+ def model_update_fan_efficiency(model)
15042
+ end
15043
+ # Get the name of the building type used in lookups
15044
+ #
15045
+ # @param building_type [String] the building type
15046
+ # @return [String] returns the lookup name as a string
15047
+ # @todo Unify the lookup names and eliminate this method
15048
+ def model_get_lookup_name(building_type)
15049
+ lookup_name = building_type
15050
+ case building_type
15051
+ when 'SmallOffice'
15052
+ lookup_name = 'Office'
15053
+ when 'MediumOffice'
15054
+ lookup_name = 'Office'
15055
+ when 'LargeOffice'
15056
+ lookup_name = 'Office'
15057
+ when 'SmallOfficeDetailed'
15058
+ lookup_name = 'Office'
15059
+ when 'MediumOfficeDetailed'
15060
+ lookup_name = 'Office'
15061
+ when 'LargeOfficeDetailed'
15062
+ lookup_name = 'Office'
15063
+ when 'RetailStandalone'
15064
+ lookup_name = 'Retail'
15065
+ when 'RetailStripmall'
15066
+ lookup_name = 'StripMall'
15067
+ when 'Office'
15068
+ lookup_name = 'Office'
15069
+ end
15070
+ return lookup_name
15071
+ end
15072
+
15073
+ # daylighting adjustments specific to the prototype model
15074
+ #
15075
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15076
+ # @param building_type [string] the building type
15077
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
15078
+ # @param prototype_input [Hash] hash of prototype inputs
15079
+ # @return [Bool] returns true if successful, false if not
15080
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
15081
+ return true
15082
+ end
15083
+ end
15084
+
15085
+ # This class represents a prototypical ASHRAE901PRM2019 SuperMarket.
15086
+ class ASHRAE901PRM2019SuperMarket < ASHRAE901PRM2019
15087
+ @@building_type = "SuperMarket"
15088
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
15089
+ attr_accessor :prototype_database
15090
+ attr_accessor :prototype_input
15091
+ attr_accessor :lookup_building_type
15092
+ attr_accessor :space_type_map
15093
+ attr_accessor :geometry_file
15094
+ attr_accessor :building_story_map
15095
+ attr_accessor :system_to_space_map
15096
+ def initialize
15097
+ super()
15098
+ @instvarbuilding_type = @@building_type
15099
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
15100
+ if @prototype_input.nil?
15101
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
15102
+ raise("Could not find prototype inputs for ASHRAE901PRM2019SuperMarket, cannot create model.")
15103
+ return false
15104
+ end
15105
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
15106
+ #ideally we should map the data required to a instance variable.
15107
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
15108
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
15109
+ @system_to_space_map = load_hvac_map(hvac_map_file)
15110
+ self.set_variables()
15111
+ end
15112
+ # This method is used to extend the class with building-type-specific
15113
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
15114
+ # has its own set of methods that change things which are not
15115
+ # common across all prototype buildings, even within a given Standard.
15116
+ def set_variables()
15117
+ # Will be overwritten in class reopen file.
15118
+ # add all building methods for now.
15119
+ self.extend(SuperMarket) unless @template == 'NECB 2011'
15120
+ end
15121
+ # Returns the mapping between the names of the spaces
15122
+ # in the geometry .osm file and the space types
15123
+ # available for this particular Standard.
15124
+ def define_space_type_map(building_type, climate_zone)
15125
+ return @space_type_map
15126
+ end
15127
+ # Returns the mapping between the names of the spaces
15128
+ # in the geometry .osm file and the HVAC system that will
15129
+ # be applied to those spaces.
15130
+ def define_hvac_system_map(building_type, climate_zone)
15131
+ return @system_to_space_map
15132
+ end
15133
+ # Returns the mapping between the names of the spaces
15134
+ # in the geometry .osm file and the building story
15135
+ # that they are located on.
15136
+ def define_building_story_map(building_type, climate_zone)
15137
+ return @building_story_map
15138
+ end
15139
+ # Does nothing unless implmented by the specific standard
15140
+ def model_modify_oa_controller(model)
15141
+ end
15142
+ # Does nothing unless implmented by the specific standard
15143
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
15144
+ end
15145
+
15146
+ # update exhuast fan efficiency
15147
+ #
15148
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15149
+ # @return [Bool] returns true if successful, false if not
15150
+ def model_update_exhaust_fan_efficiency(model)
15151
+ return true
15152
+ end
15153
+
15154
+ # Does nothing unless implmented by the specific standard
15155
+ def model_update_fan_efficiency(model)
15156
+ end
15157
+ # Get the name of the building type used in lookups
15158
+ #
15159
+ # @param building_type [String] the building type
15160
+ # @return [String] returns the lookup name as a string
15161
+ # @todo Unify the lookup names and eliminate this method
15162
+ def model_get_lookup_name(building_type)
15163
+ lookup_name = building_type
15164
+ case building_type
15165
+ when 'SmallOffice'
15166
+ lookup_name = 'Office'
15167
+ when 'MediumOffice'
15168
+ lookup_name = 'Office'
15169
+ when 'LargeOffice'
15170
+ lookup_name = 'Office'
15171
+ when 'SmallOfficeDetailed'
15172
+ lookup_name = 'Office'
15173
+ when 'MediumOfficeDetailed'
15174
+ lookup_name = 'Office'
15175
+ when 'LargeOfficeDetailed'
15176
+ lookup_name = 'Office'
15177
+ when 'RetailStandalone'
15178
+ lookup_name = 'Retail'
15179
+ when 'RetailStripmall'
15180
+ lookup_name = 'StripMall'
15181
+ when 'Office'
15182
+ lookup_name = 'Office'
15183
+ end
15184
+ return lookup_name
15185
+ end
15186
+
15187
+ # daylighting adjustments specific to the prototype model
15188
+ #
15189
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15190
+ # @param building_type [string] the building type
15191
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
15192
+ # @param prototype_input [Hash] hash of prototype inputs
15193
+ # @return [Bool] returns true if successful, false if not
15194
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
15195
+ return true
15196
+ end
15197
+ end
15198
+
15199
+ # This class represents a prototypical ASHRAE901PRM2019 SmallDataCenterLowITE.
15200
+ class ASHRAE901PRM2019SmallDataCenterLowITE < ASHRAE901PRM2019
15201
+ @@building_type = "SmallDataCenterLowITE"
15202
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
15203
+ attr_accessor :prototype_database
15204
+ attr_accessor :prototype_input
15205
+ attr_accessor :lookup_building_type
15206
+ attr_accessor :space_type_map
15207
+ attr_accessor :geometry_file
15208
+ attr_accessor :building_story_map
15209
+ attr_accessor :system_to_space_map
15210
+ def initialize
15211
+ super()
15212
+ @instvarbuilding_type = @@building_type
15213
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
15214
+ if @prototype_input.nil?
15215
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
15216
+ raise("Could not find prototype inputs for ASHRAE901PRM2019SmallDataCenterLowITE, cannot create model.")
15217
+ return false
15218
+ end
15219
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
15220
+ #ideally we should map the data required to a instance variable.
15221
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
15222
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
15223
+ @system_to_space_map = load_hvac_map(hvac_map_file)
15224
+ self.set_variables()
15225
+ end
15226
+ # This method is used to extend the class with building-type-specific
15227
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
15228
+ # has its own set of methods that change things which are not
15229
+ # common across all prototype buildings, even within a given Standard.
15230
+ def set_variables()
15231
+ # Will be overwritten in class reopen file.
15232
+ # add all building methods for now.
15233
+ self.extend(SmallDataCenterLowITE) unless @template == 'NECB 2011'
15234
+ end
15235
+ # Returns the mapping between the names of the spaces
15236
+ # in the geometry .osm file and the space types
15237
+ # available for this particular Standard.
15238
+ def define_space_type_map(building_type, climate_zone)
15239
+ return @space_type_map
15240
+ end
15241
+ # Returns the mapping between the names of the spaces
15242
+ # in the geometry .osm file and the HVAC system that will
15243
+ # be applied to those spaces.
15244
+ def define_hvac_system_map(building_type, climate_zone)
15245
+ return @system_to_space_map
15246
+ end
15247
+ # Returns the mapping between the names of the spaces
15248
+ # in the geometry .osm file and the building story
15249
+ # that they are located on.
15250
+ def define_building_story_map(building_type, climate_zone)
15251
+ return @building_story_map
15252
+ end
15253
+ # Does nothing unless implmented by the specific standard
15254
+ def model_modify_oa_controller(model)
15255
+ end
15256
+ # Does nothing unless implmented by the specific standard
15257
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
15258
+ end
15259
+
15260
+ # update exhuast fan efficiency
15261
+ #
15262
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15263
+ # @return [Bool] returns true if successful, false if not
15264
+ def model_update_exhaust_fan_efficiency(model)
15265
+ return true
15266
+ end
15267
+
15268
+ # Does nothing unless implmented by the specific standard
15269
+ def model_update_fan_efficiency(model)
15270
+ end
15271
+ # Get the name of the building type used in lookups
15272
+ #
15273
+ # @param building_type [String] the building type
15274
+ # @return [String] returns the lookup name as a string
15275
+ # @todo Unify the lookup names and eliminate this method
15276
+ def model_get_lookup_name(building_type)
15277
+ lookup_name = building_type
15278
+ case building_type
15279
+ when 'SmallOffice'
15280
+ lookup_name = 'Office'
15281
+ when 'MediumOffice'
15282
+ lookup_name = 'Office'
15283
+ when 'LargeOffice'
15284
+ lookup_name = 'Office'
15285
+ when 'SmallOfficeDetailed'
15286
+ lookup_name = 'Office'
15287
+ when 'MediumOfficeDetailed'
15288
+ lookup_name = 'Office'
15289
+ when 'LargeOfficeDetailed'
15290
+ lookup_name = 'Office'
15291
+ when 'RetailStandalone'
15292
+ lookup_name = 'Retail'
15293
+ when 'RetailStripmall'
15294
+ lookup_name = 'StripMall'
15295
+ when 'Office'
15296
+ lookup_name = 'Office'
15297
+ end
15298
+ return lookup_name
15299
+ end
15300
+
15301
+ # daylighting adjustments specific to the prototype model
15302
+ #
15303
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15304
+ # @param building_type [string] the building type
15305
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
15306
+ # @param prototype_input [Hash] hash of prototype inputs
15307
+ # @return [Bool] returns true if successful, false if not
15308
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
15309
+ return true
15310
+ end
15311
+ end
15312
+
15313
+ # This class represents a prototypical ASHRAE901PRM2019 SmallDataCenterHighITE.
15314
+ class ASHRAE901PRM2019SmallDataCenterHighITE < ASHRAE901PRM2019
15315
+ @@building_type = "SmallDataCenterHighITE"
15316
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
15317
+ attr_accessor :prototype_database
15318
+ attr_accessor :prototype_input
15319
+ attr_accessor :lookup_building_type
15320
+ attr_accessor :space_type_map
15321
+ attr_accessor :geometry_file
15322
+ attr_accessor :building_story_map
15323
+ attr_accessor :system_to_space_map
15324
+ def initialize
15325
+ super()
15326
+ @instvarbuilding_type = @@building_type
15327
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
15328
+ if @prototype_input.nil?
15329
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
15330
+ raise("Could not find prototype inputs for ASHRAE901PRM2019SmallDataCenterHighITE, cannot create model.")
15331
+ return false
15332
+ end
15333
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
15334
+ #ideally we should map the data required to a instance variable.
15335
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
15336
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
15337
+ @system_to_space_map = load_hvac_map(hvac_map_file)
15338
+ self.set_variables()
15339
+ end
15340
+ # This method is used to extend the class with building-type-specific
15341
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
15342
+ # has its own set of methods that change things which are not
15343
+ # common across all prototype buildings, even within a given Standard.
15344
+ def set_variables()
15345
+ # Will be overwritten in class reopen file.
15346
+ # add all building methods for now.
15347
+ self.extend(SmallDataCenterHighITE) unless @template == 'NECB 2011'
15348
+ end
15349
+ # Returns the mapping between the names of the spaces
15350
+ # in the geometry .osm file and the space types
15351
+ # available for this particular Standard.
15352
+ def define_space_type_map(building_type, climate_zone)
15353
+ return @space_type_map
15354
+ end
15355
+ # Returns the mapping between the names of the spaces
15356
+ # in the geometry .osm file and the HVAC system that will
15357
+ # be applied to those spaces.
15358
+ def define_hvac_system_map(building_type, climate_zone)
15359
+ return @system_to_space_map
15360
+ end
15361
+ # Returns the mapping between the names of the spaces
15362
+ # in the geometry .osm file and the building story
15363
+ # that they are located on.
15364
+ def define_building_story_map(building_type, climate_zone)
15365
+ return @building_story_map
15366
+ end
15367
+ # Does nothing unless implmented by the specific standard
15368
+ def model_modify_oa_controller(model)
15369
+ end
15370
+ # Does nothing unless implmented by the specific standard
15371
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
15372
+ end
15373
+
15374
+ # update exhuast fan efficiency
15375
+ #
15376
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15377
+ # @return [Bool] returns true if successful, false if not
15378
+ def model_update_exhaust_fan_efficiency(model)
15379
+ return true
15380
+ end
15381
+
15382
+ # Does nothing unless implmented by the specific standard
15383
+ def model_update_fan_efficiency(model)
15384
+ end
15385
+ # Get the name of the building type used in lookups
15386
+ #
15387
+ # @param building_type [String] the building type
15388
+ # @return [String] returns the lookup name as a string
15389
+ # @todo Unify the lookup names and eliminate this method
15390
+ def model_get_lookup_name(building_type)
15391
+ lookup_name = building_type
15392
+ case building_type
15393
+ when 'SmallOffice'
15394
+ lookup_name = 'Office'
15395
+ when 'MediumOffice'
15396
+ lookup_name = 'Office'
15397
+ when 'LargeOffice'
15398
+ lookup_name = 'Office'
15399
+ when 'SmallOfficeDetailed'
15400
+ lookup_name = 'Office'
15401
+ when 'MediumOfficeDetailed'
15402
+ lookup_name = 'Office'
15403
+ when 'LargeOfficeDetailed'
15404
+ lookup_name = 'Office'
15405
+ when 'RetailStandalone'
15406
+ lookup_name = 'Retail'
15407
+ when 'RetailStripmall'
15408
+ lookup_name = 'StripMall'
15409
+ when 'Office'
15410
+ lookup_name = 'Office'
15411
+ end
15412
+ return lookup_name
15413
+ end
15414
+
15415
+ # daylighting adjustments specific to the prototype model
15416
+ #
15417
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15418
+ # @param building_type [string] the building type
15419
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
15420
+ # @param prototype_input [Hash] hash of prototype inputs
15421
+ # @return [Bool] returns true if successful, false if not
15422
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
15423
+ return true
15424
+ end
15425
+ end
15426
+
15427
+ # This class represents a prototypical ASHRAE901PRM2019 LargeDataCenterLowITE.
15428
+ class ASHRAE901PRM2019LargeDataCenterLowITE < ASHRAE901PRM2019
15429
+ @@building_type = "LargeDataCenterLowITE"
15430
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
15431
+ attr_accessor :prototype_database
15432
+ attr_accessor :prototype_input
15433
+ attr_accessor :lookup_building_type
15434
+ attr_accessor :space_type_map
15435
+ attr_accessor :geometry_file
15436
+ attr_accessor :building_story_map
15437
+ attr_accessor :system_to_space_map
15438
+ def initialize
15439
+ super()
15440
+ @instvarbuilding_type = @@building_type
15441
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
15442
+ if @prototype_input.nil?
15443
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
15444
+ raise("Could not find prototype inputs for ASHRAE901PRM2019LargeDataCenterLowITE, cannot create model.")
15445
+ return false
15446
+ end
15447
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
15448
+ #ideally we should map the data required to a instance variable.
15449
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
15450
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
15451
+ @system_to_space_map = load_hvac_map(hvac_map_file)
15452
+ self.set_variables()
15453
+ end
15454
+ # This method is used to extend the class with building-type-specific
15455
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
15456
+ # has its own set of methods that change things which are not
15457
+ # common across all prototype buildings, even within a given Standard.
15458
+ def set_variables()
15459
+ # Will be overwritten in class reopen file.
15460
+ # add all building methods for now.
15461
+ self.extend(LargeDataCenterLowITE) unless @template == 'NECB 2011'
15462
+ end
15463
+ # Returns the mapping between the names of the spaces
15464
+ # in the geometry .osm file and the space types
15465
+ # available for this particular Standard.
15466
+ def define_space_type_map(building_type, climate_zone)
15467
+ return @space_type_map
15468
+ end
15469
+ # Returns the mapping between the names of the spaces
15470
+ # in the geometry .osm file and the HVAC system that will
15471
+ # be applied to those spaces.
15472
+ def define_hvac_system_map(building_type, climate_zone)
15473
+ return @system_to_space_map
15474
+ end
15475
+ # Returns the mapping between the names of the spaces
15476
+ # in the geometry .osm file and the building story
15477
+ # that they are located on.
15478
+ def define_building_story_map(building_type, climate_zone)
15479
+ return @building_story_map
15480
+ end
15481
+ # Does nothing unless implmented by the specific standard
15482
+ def model_modify_oa_controller(model)
15483
+ end
15484
+ # Does nothing unless implmented by the specific standard
15485
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
15486
+ end
15487
+
15488
+ # update exhuast fan efficiency
15489
+ #
15490
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15491
+ # @return [Bool] returns true if successful, false if not
15492
+ def model_update_exhaust_fan_efficiency(model)
15493
+ return true
15494
+ end
15495
+
15496
+ # Does nothing unless implmented by the specific standard
15497
+ def model_update_fan_efficiency(model)
15498
+ end
15499
+ # Get the name of the building type used in lookups
15500
+ #
15501
+ # @param building_type [String] the building type
15502
+ # @return [String] returns the lookup name as a string
15503
+ # @todo Unify the lookup names and eliminate this method
15504
+ def model_get_lookup_name(building_type)
15505
+ lookup_name = building_type
15506
+ case building_type
15507
+ when 'SmallOffice'
15508
+ lookup_name = 'Office'
15509
+ when 'MediumOffice'
15510
+ lookup_name = 'Office'
15511
+ when 'LargeOffice'
15512
+ lookup_name = 'Office'
15513
+ when 'SmallOfficeDetailed'
15514
+ lookup_name = 'Office'
15515
+ when 'MediumOfficeDetailed'
15516
+ lookup_name = 'Office'
15517
+ when 'LargeOfficeDetailed'
15518
+ lookup_name = 'Office'
15519
+ when 'RetailStandalone'
15520
+ lookup_name = 'Retail'
15521
+ when 'RetailStripmall'
15522
+ lookup_name = 'StripMall'
15523
+ when 'Office'
15524
+ lookup_name = 'Office'
15525
+ end
15526
+ return lookup_name
15527
+ end
15528
+
15529
+ # daylighting adjustments specific to the prototype model
15530
+ #
15531
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15532
+ # @param building_type [string] the building type
15533
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
15534
+ # @param prototype_input [Hash] hash of prototype inputs
15535
+ # @return [Bool] returns true if successful, false if not
15536
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
15537
+ return true
15538
+ end
15539
+ end
15540
+
15541
+ # This class represents a prototypical ASHRAE901PRM2019 LargeDataCenterHighITE.
15542
+ class ASHRAE901PRM2019LargeDataCenterHighITE < ASHRAE901PRM2019
15543
+ @@building_type = "LargeDataCenterHighITE"
15544
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
15545
+ attr_accessor :prototype_database
15546
+ attr_accessor :prototype_input
15547
+ attr_accessor :lookup_building_type
15548
+ attr_accessor :space_type_map
15549
+ attr_accessor :geometry_file
15550
+ attr_accessor :building_story_map
15551
+ attr_accessor :system_to_space_map
15552
+ def initialize
15553
+ super()
15554
+ @instvarbuilding_type = @@building_type
15555
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
15556
+ if @prototype_input.nil?
15557
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
15558
+ raise("Could not find prototype inputs for ASHRAE901PRM2019LargeDataCenterHighITE, cannot create model.")
15559
+ return false
15560
+ end
15561
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
15562
+ #ideally we should map the data required to a instance variable.
15563
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
15564
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
15565
+ @system_to_space_map = load_hvac_map(hvac_map_file)
15566
+ self.set_variables()
15567
+ end
15568
+ # This method is used to extend the class with building-type-specific
15569
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
15570
+ # has its own set of methods that change things which are not
15571
+ # common across all prototype buildings, even within a given Standard.
15572
+ def set_variables()
15573
+ # Will be overwritten in class reopen file.
15574
+ # add all building methods for now.
15575
+ self.extend(LargeDataCenterHighITE) unless @template == 'NECB 2011'
15576
+ end
15577
+ # Returns the mapping between the names of the spaces
15578
+ # in the geometry .osm file and the space types
15579
+ # available for this particular Standard.
15580
+ def define_space_type_map(building_type, climate_zone)
15581
+ return @space_type_map
15582
+ end
15583
+ # Returns the mapping between the names of the spaces
15584
+ # in the geometry .osm file and the HVAC system that will
15585
+ # be applied to those spaces.
15586
+ def define_hvac_system_map(building_type, climate_zone)
15587
+ return @system_to_space_map
15588
+ end
15589
+ # Returns the mapping between the names of the spaces
15590
+ # in the geometry .osm file and the building story
15591
+ # that they are located on.
15592
+ def define_building_story_map(building_type, climate_zone)
15593
+ return @building_story_map
15594
+ end
15595
+ # Does nothing unless implmented by the specific standard
15596
+ def model_modify_oa_controller(model)
15597
+ end
15598
+ # Does nothing unless implmented by the specific standard
15599
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
15600
+ end
15601
+
15602
+ # update exhuast fan efficiency
15603
+ #
15604
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15605
+ # @return [Bool] returns true if successful, false if not
15606
+ def model_update_exhaust_fan_efficiency(model)
15607
+ return true
15608
+ end
15609
+
15610
+ # Does nothing unless implmented by the specific standard
15611
+ def model_update_fan_efficiency(model)
15612
+ end
15613
+ # Get the name of the building type used in lookups
15614
+ #
15615
+ # @param building_type [String] the building type
15616
+ # @return [String] returns the lookup name as a string
15617
+ # @todo Unify the lookup names and eliminate this method
15618
+ def model_get_lookup_name(building_type)
15619
+ lookup_name = building_type
15620
+ case building_type
15621
+ when 'SmallOffice'
15622
+ lookup_name = 'Office'
15623
+ when 'MediumOffice'
15624
+ lookup_name = 'Office'
15625
+ when 'LargeOffice'
15626
+ lookup_name = 'Office'
15627
+ when 'SmallOfficeDetailed'
15628
+ lookup_name = 'Office'
15629
+ when 'MediumOfficeDetailed'
15630
+ lookup_name = 'Office'
15631
+ when 'LargeOfficeDetailed'
15632
+ lookup_name = 'Office'
15633
+ when 'RetailStandalone'
15634
+ lookup_name = 'Retail'
15635
+ when 'RetailStripmall'
15636
+ lookup_name = 'StripMall'
15637
+ when 'Office'
15638
+ lookup_name = 'Office'
15639
+ end
15640
+ return lookup_name
15641
+ end
15642
+
15643
+ # daylighting adjustments specific to the prototype model
15644
+ #
15645
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15646
+ # @param building_type [string] the building type
15647
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
15648
+ # @param prototype_input [Hash] hash of prototype inputs
15649
+ # @return [Bool] returns true if successful, false if not
15650
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
15651
+ return true
15652
+ end
15653
+ end
15654
+
15655
+ # This class represents a prototypical ASHRAE901PRM2019 SmallOfficeDetailed.
15656
+ class ASHRAE901PRM2019SmallOfficeDetailed < ASHRAE901PRM2019
15657
+ @@building_type = "SmallOfficeDetailed"
15658
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
15659
+ attr_accessor :prototype_database
15660
+ attr_accessor :prototype_input
15661
+ attr_accessor :lookup_building_type
15662
+ attr_accessor :space_type_map
15663
+ attr_accessor :geometry_file
15664
+ attr_accessor :building_story_map
15665
+ attr_accessor :system_to_space_map
15666
+ def initialize
15667
+ super()
15668
+ @instvarbuilding_type = @@building_type
15669
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
15670
+ if @prototype_input.nil?
15671
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
15672
+ raise("Could not find prototype inputs for ASHRAE901PRM2019SmallOfficeDetailed, cannot create model.")
15673
+ return false
15674
+ end
15675
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
15676
+ #ideally we should map the data required to a instance variable.
15677
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
15678
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
15679
+ @system_to_space_map = load_hvac_map(hvac_map_file)
15680
+ self.set_variables()
15681
+ end
15682
+ # This method is used to extend the class with building-type-specific
15683
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
15684
+ # has its own set of methods that change things which are not
15685
+ # common across all prototype buildings, even within a given Standard.
15686
+ def set_variables()
15687
+ # Will be overwritten in class reopen file.
15688
+ # add all building methods for now.
15689
+ self.extend(SmallOfficeDetailed) unless @template == 'NECB 2011'
15690
+ end
15691
+ # Returns the mapping between the names of the spaces
15692
+ # in the geometry .osm file and the space types
15693
+ # available for this particular Standard.
15694
+ def define_space_type_map(building_type, climate_zone)
15695
+ return @space_type_map
15696
+ end
15697
+ # Returns the mapping between the names of the spaces
15698
+ # in the geometry .osm file and the HVAC system that will
15699
+ # be applied to those spaces.
15700
+ def define_hvac_system_map(building_type, climate_zone)
15701
+ return @system_to_space_map
15702
+ end
15703
+ # Returns the mapping between the names of the spaces
15704
+ # in the geometry .osm file and the building story
15705
+ # that they are located on.
15706
+ def define_building_story_map(building_type, climate_zone)
15707
+ return @building_story_map
15708
+ end
15709
+ # Does nothing unless implmented by the specific standard
15710
+ def model_modify_oa_controller(model)
15711
+ end
15712
+ # Does nothing unless implmented by the specific standard
15713
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
15714
+ end
15715
+
15716
+ # update exhuast fan efficiency
15717
+ #
15718
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15719
+ # @return [Bool] returns true if successful, false if not
15720
+ def model_update_exhaust_fan_efficiency(model)
15721
+ return true
15722
+ end
15723
+
15724
+ # Does nothing unless implmented by the specific standard
15725
+ def model_update_fan_efficiency(model)
15726
+ end
15727
+ # Get the name of the building type used in lookups
15728
+ #
15729
+ # @param building_type [String] the building type
15730
+ # @return [String] returns the lookup name as a string
15731
+ # @todo Unify the lookup names and eliminate this method
15732
+ def model_get_lookup_name(building_type)
15733
+ lookup_name = building_type
15734
+ case building_type
15735
+ when 'SmallOffice'
15736
+ lookup_name = 'Office'
15737
+ when 'MediumOffice'
15738
+ lookup_name = 'Office'
15739
+ when 'LargeOffice'
15740
+ lookup_name = 'Office'
15741
+ when 'SmallOfficeDetailed'
15742
+ lookup_name = 'Office'
15743
+ when 'MediumOfficeDetailed'
15744
+ lookup_name = 'Office'
15745
+ when 'LargeOfficeDetailed'
15746
+ lookup_name = 'Office'
15747
+ when 'RetailStandalone'
15748
+ lookup_name = 'Retail'
15749
+ when 'RetailStripmall'
15750
+ lookup_name = 'StripMall'
15751
+ when 'Office'
15752
+ lookup_name = 'Office'
15753
+ end
15754
+ return lookup_name
15755
+ end
15756
+
15757
+ # daylighting adjustments specific to the prototype model
15758
+ #
15759
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15760
+ # @param building_type [string] the building type
15761
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
15762
+ # @param prototype_input [Hash] hash of prototype inputs
15763
+ # @return [Bool] returns true if successful, false if not
15764
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
15765
+ return true
15766
+ end
15767
+ end
15768
+
15769
+ # This class represents a prototypical ASHRAE901PRM2019 MediumOfficeDetailed.
15770
+ class ASHRAE901PRM2019MediumOfficeDetailed < ASHRAE901PRM2019
15771
+ @@building_type = "MediumOfficeDetailed"
15772
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
15773
+ attr_accessor :prototype_database
15774
+ attr_accessor :prototype_input
15775
+ attr_accessor :lookup_building_type
15776
+ attr_accessor :space_type_map
15777
+ attr_accessor :geometry_file
15778
+ attr_accessor :building_story_map
15779
+ attr_accessor :system_to_space_map
15780
+ def initialize
15781
+ super()
15782
+ @instvarbuilding_type = @@building_type
15783
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
15784
+ if @prototype_input.nil?
15785
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
15786
+ raise("Could not find prototype inputs for ASHRAE901PRM2019MediumOfficeDetailed, cannot create model.")
15787
+ return false
15788
+ end
15789
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
15790
+ #ideally we should map the data required to a instance variable.
15791
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
15792
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
15793
+ @system_to_space_map = load_hvac_map(hvac_map_file)
15794
+ self.set_variables()
15795
+ end
15796
+ # This method is used to extend the class with building-type-specific
15797
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
15798
+ # has its own set of methods that change things which are not
15799
+ # common across all prototype buildings, even within a given Standard.
15800
+ def set_variables()
15801
+ # Will be overwritten in class reopen file.
15802
+ # add all building methods for now.
15803
+ self.extend(MediumOfficeDetailed) unless @template == 'NECB 2011'
15804
+ end
15805
+ # Returns the mapping between the names of the spaces
15806
+ # in the geometry .osm file and the space types
15807
+ # available for this particular Standard.
15808
+ def define_space_type_map(building_type, climate_zone)
15809
+ return @space_type_map
15810
+ end
15811
+ # Returns the mapping between the names of the spaces
15812
+ # in the geometry .osm file and the HVAC system that will
15813
+ # be applied to those spaces.
15814
+ def define_hvac_system_map(building_type, climate_zone)
15815
+ return @system_to_space_map
15816
+ end
15817
+ # Returns the mapping between the names of the spaces
15818
+ # in the geometry .osm file and the building story
15819
+ # that they are located on.
15820
+ def define_building_story_map(building_type, climate_zone)
15821
+ return @building_story_map
15822
+ end
15823
+ # Does nothing unless implmented by the specific standard
15824
+ def model_modify_oa_controller(model)
15825
+ end
15826
+ # Does nothing unless implmented by the specific standard
15827
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
15828
+ end
15829
+
15830
+ # update exhuast fan efficiency
15831
+ #
15832
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15833
+ # @return [Bool] returns true if successful, false if not
15834
+ def model_update_exhaust_fan_efficiency(model)
15835
+ return true
15836
+ end
15837
+
15838
+ # Does nothing unless implmented by the specific standard
15839
+ def model_update_fan_efficiency(model)
15840
+ end
15841
+ # Get the name of the building type used in lookups
15842
+ #
15843
+ # @param building_type [String] the building type
15844
+ # @return [String] returns the lookup name as a string
15845
+ # @todo Unify the lookup names and eliminate this method
15846
+ def model_get_lookup_name(building_type)
15847
+ lookup_name = building_type
15848
+ case building_type
15849
+ when 'SmallOffice'
15850
+ lookup_name = 'Office'
15851
+ when 'MediumOffice'
15852
+ lookup_name = 'Office'
15853
+ when 'LargeOffice'
15854
+ lookup_name = 'Office'
15855
+ when 'SmallOfficeDetailed'
15856
+ lookup_name = 'Office'
15857
+ when 'MediumOfficeDetailed'
15858
+ lookup_name = 'Office'
15859
+ when 'LargeOfficeDetailed'
15860
+ lookup_name = 'Office'
15861
+ when 'RetailStandalone'
15862
+ lookup_name = 'Retail'
15863
+ when 'RetailStripmall'
15864
+ lookup_name = 'StripMall'
15865
+ when 'Office'
15866
+ lookup_name = 'Office'
15867
+ end
15868
+ return lookup_name
15869
+ end
15870
+
15871
+ # daylighting adjustments specific to the prototype model
15872
+ #
15873
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15874
+ # @param building_type [string] the building type
15875
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
15876
+ # @param prototype_input [Hash] hash of prototype inputs
15877
+ # @return [Bool] returns true if successful, false if not
15878
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
15879
+ return true
15880
+ end
15881
+ end
15882
+
15883
+ # This class represents a prototypical ASHRAE901PRM2019 LargeOfficeDetailed.
15884
+ class ASHRAE901PRM2019LargeOfficeDetailed < ASHRAE901PRM2019
15885
+ @@building_type = "LargeOfficeDetailed"
15886
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
15887
+ attr_accessor :prototype_database
15888
+ attr_accessor :prototype_input
15889
+ attr_accessor :lookup_building_type
15890
+ attr_accessor :space_type_map
15891
+ attr_accessor :geometry_file
15892
+ attr_accessor :building_story_map
15893
+ attr_accessor :system_to_space_map
15894
+ def initialize
15895
+ super()
15896
+ @instvarbuilding_type = @@building_type
15897
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
15898
+ if @prototype_input.nil?
15899
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
15900
+ raise("Could not find prototype inputs for ASHRAE901PRM2019LargeOfficeDetailed, cannot create model.")
15901
+ return false
15902
+ end
15903
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
15904
+ #ideally we should map the data required to a instance variable.
15905
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
15906
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
15907
+ @system_to_space_map = load_hvac_map(hvac_map_file)
15908
+ self.set_variables()
15909
+ end
15910
+ # This method is used to extend the class with building-type-specific
15911
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
15912
+ # has its own set of methods that change things which are not
15913
+ # common across all prototype buildings, even within a given Standard.
15914
+ def set_variables()
15915
+ # Will be overwritten in class reopen file.
15916
+ # add all building methods for now.
15917
+ self.extend(LargeOfficeDetailed) unless @template == 'NECB 2011'
15918
+ end
15919
+ # Returns the mapping between the names of the spaces
15920
+ # in the geometry .osm file and the space types
15921
+ # available for this particular Standard.
15922
+ def define_space_type_map(building_type, climate_zone)
15923
+ return @space_type_map
15924
+ end
15925
+ # Returns the mapping between the names of the spaces
15926
+ # in the geometry .osm file and the HVAC system that will
15927
+ # be applied to those spaces.
15928
+ def define_hvac_system_map(building_type, climate_zone)
15929
+ return @system_to_space_map
15930
+ end
15931
+ # Returns the mapping between the names of the spaces
15932
+ # in the geometry .osm file and the building story
15933
+ # that they are located on.
15934
+ def define_building_story_map(building_type, climate_zone)
15935
+ return @building_story_map
15936
+ end
15937
+ # Does nothing unless implmented by the specific standard
15938
+ def model_modify_oa_controller(model)
15939
+ end
15940
+ # Does nothing unless implmented by the specific standard
15941
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
15942
+ end
15943
+
15944
+ # update exhuast fan efficiency
15945
+ #
15946
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15947
+ # @return [Bool] returns true if successful, false if not
15948
+ def model_update_exhaust_fan_efficiency(model)
15949
+ return true
15950
+ end
15951
+
15952
+ # Does nothing unless implmented by the specific standard
15953
+ def model_update_fan_efficiency(model)
15954
+ end
15955
+ # Get the name of the building type used in lookups
15956
+ #
15957
+ # @param building_type [String] the building type
15958
+ # @return [String] returns the lookup name as a string
15959
+ # @todo Unify the lookup names and eliminate this method
15960
+ def model_get_lookup_name(building_type)
15961
+ lookup_name = building_type
15962
+ case building_type
15963
+ when 'SmallOffice'
15964
+ lookup_name = 'Office'
15965
+ when 'MediumOffice'
15966
+ lookup_name = 'Office'
15967
+ when 'LargeOffice'
15968
+ lookup_name = 'Office'
15969
+ when 'SmallOfficeDetailed'
15970
+ lookup_name = 'Office'
15971
+ when 'MediumOfficeDetailed'
15972
+ lookup_name = 'Office'
15973
+ when 'LargeOfficeDetailed'
15974
+ lookup_name = 'Office'
15975
+ when 'RetailStandalone'
15976
+ lookup_name = 'Retail'
15977
+ when 'RetailStripmall'
15978
+ lookup_name = 'StripMall'
15979
+ when 'Office'
15980
+ lookup_name = 'Office'
15981
+ end
15982
+ return lookup_name
15983
+ end
15984
+
15985
+ # daylighting adjustments specific to the prototype model
15986
+ #
15987
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
15988
+ # @param building_type [string] the building type
15989
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
15990
+ # @param prototype_input [Hash] hash of prototype inputs
15991
+ # @return [Bool] returns true if successful, false if not
15992
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
15993
+ return true
15994
+ end
15995
+ end
15996
+
15997
+ # This class represents a prototypical ASHRAE901PRM2019 Laboratory.
15998
+ class ASHRAE901PRM2019Laboratory < ASHRAE901PRM2019
15999
+ @@building_type = "Laboratory"
16000
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
16001
+ attr_accessor :prototype_database
16002
+ attr_accessor :prototype_input
16003
+ attr_accessor :lookup_building_type
16004
+ attr_accessor :space_type_map
16005
+ attr_accessor :geometry_file
16006
+ attr_accessor :building_story_map
16007
+ attr_accessor :system_to_space_map
16008
+ def initialize
16009
+ super()
16010
+ @instvarbuilding_type = @@building_type
16011
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
16012
+ if @prototype_input.nil?
16013
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
16014
+ raise("Could not find prototype inputs for ASHRAE901PRM2019Laboratory, cannot create model.")
16015
+ return false
16016
+ end
16017
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
16018
+ #ideally we should map the data required to a instance variable.
16019
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
16020
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
16021
+ @system_to_space_map = load_hvac_map(hvac_map_file)
16022
+ self.set_variables()
16023
+ end
16024
+ # This method is used to extend the class with building-type-specific
16025
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
16026
+ # has its own set of methods that change things which are not
16027
+ # common across all prototype buildings, even within a given Standard.
16028
+ def set_variables()
16029
+ # Will be overwritten in class reopen file.
16030
+ # add all building methods for now.
16031
+ self.extend(Laboratory) unless @template == 'NECB 2011'
16032
+ end
16033
+ # Returns the mapping between the names of the spaces
16034
+ # in the geometry .osm file and the space types
16035
+ # available for this particular Standard.
16036
+ def define_space_type_map(building_type, climate_zone)
16037
+ return @space_type_map
16038
+ end
16039
+ # Returns the mapping between the names of the spaces
16040
+ # in the geometry .osm file and the HVAC system that will
16041
+ # be applied to those spaces.
16042
+ def define_hvac_system_map(building_type, climate_zone)
16043
+ return @system_to_space_map
16044
+ end
16045
+ # Returns the mapping between the names of the spaces
16046
+ # in the geometry .osm file and the building story
16047
+ # that they are located on.
16048
+ def define_building_story_map(building_type, climate_zone)
16049
+ return @building_story_map
16050
+ end
16051
+ # Does nothing unless implmented by the specific standard
16052
+ def model_modify_oa_controller(model)
16053
+ end
16054
+ # Does nothing unless implmented by the specific standard
16055
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
16056
+ end
16057
+
16058
+ # update exhuast fan efficiency
16059
+ #
16060
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
16061
+ # @return [Bool] returns true if successful, false if not
16062
+ def model_update_exhaust_fan_efficiency(model)
16063
+ return true
16064
+ end
16065
+
16066
+ # Does nothing unless implmented by the specific standard
16067
+ def model_update_fan_efficiency(model)
16068
+ end
16069
+ # Get the name of the building type used in lookups
16070
+ #
16071
+ # @param building_type [String] the building type
16072
+ # @return [String] returns the lookup name as a string
16073
+ # @todo Unify the lookup names and eliminate this method
16074
+ def model_get_lookup_name(building_type)
16075
+ lookup_name = building_type
16076
+ case building_type
16077
+ when 'SmallOffice'
16078
+ lookup_name = 'Office'
16079
+ when 'MediumOffice'
16080
+ lookup_name = 'Office'
16081
+ when 'LargeOffice'
16082
+ lookup_name = 'Office'
16083
+ when 'SmallOfficeDetailed'
16084
+ lookup_name = 'Office'
16085
+ when 'MediumOfficeDetailed'
16086
+ lookup_name = 'Office'
16087
+ when 'LargeOfficeDetailed'
16088
+ lookup_name = 'Office'
16089
+ when 'RetailStandalone'
16090
+ lookup_name = 'Retail'
16091
+ when 'RetailStripmall'
16092
+ lookup_name = 'StripMall'
16093
+ when 'Office'
16094
+ lookup_name = 'Office'
16095
+ end
16096
+ return lookup_name
16097
+ end
16098
+
16099
+ # daylighting adjustments specific to the prototype model
16100
+ #
16101
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
16102
+ # @param building_type [string] the building type
16103
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
16104
+ # @param prototype_input [Hash] hash of prototype inputs
16105
+ # @return [Bool] returns true if successful, false if not
16106
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
16107
+ return true
16108
+ end
16109
+ end
16110
+
16111
+ # This class represents a prototypical ASHRAE901PRM2019 College.
16112
+ class ASHRAE901PRM2019College < ASHRAE901PRM2019
16113
+ @@building_type = "College"
16114
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
16115
+ attr_accessor :prototype_database
16116
+ attr_accessor :prototype_input
16117
+ attr_accessor :lookup_building_type
16118
+ attr_accessor :space_type_map
16119
+ attr_accessor :geometry_file
16120
+ attr_accessor :building_story_map
16121
+ attr_accessor :system_to_space_map
16122
+ def initialize
16123
+ super()
16124
+ @instvarbuilding_type = @@building_type
16125
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
16126
+ if @prototype_input.nil?
16127
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
16128
+ raise("Could not find prototype inputs for ASHRAE901PRM2019College, cannot create model.")
16129
+ return false
16130
+ end
16131
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
16132
+ #ideally we should map the data required to a instance variable.
16133
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
16134
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
16135
+ @system_to_space_map = load_hvac_map(hvac_map_file)
16136
+ self.set_variables()
16137
+ end
16138
+ # This method is used to extend the class with building-type-specific
16139
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
16140
+ # has its own set of methods that change things which are not
16141
+ # common across all prototype buildings, even within a given Standard.
16142
+ def set_variables()
16143
+ # Will be overwritten in class reopen file.
16144
+ # add all building methods for now.
16145
+ self.extend(College) unless @template == 'NECB 2011'
16146
+ end
16147
+ # Returns the mapping between the names of the spaces
16148
+ # in the geometry .osm file and the space types
16149
+ # available for this particular Standard.
16150
+ def define_space_type_map(building_type, climate_zone)
16151
+ return @space_type_map
16152
+ end
16153
+ # Returns the mapping between the names of the spaces
16154
+ # in the geometry .osm file and the HVAC system that will
16155
+ # be applied to those spaces.
16156
+ def define_hvac_system_map(building_type, climate_zone)
16157
+ return @system_to_space_map
16158
+ end
16159
+ # Returns the mapping between the names of the spaces
16160
+ # in the geometry .osm file and the building story
16161
+ # that they are located on.
16162
+ def define_building_story_map(building_type, climate_zone)
16163
+ return @building_story_map
16164
+ end
16165
+ # Does nothing unless implmented by the specific standard
16166
+ def model_modify_oa_controller(model)
16167
+ end
16168
+ # Does nothing unless implmented by the specific standard
16169
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
16170
+ end
16171
+
16172
+ # update exhuast fan efficiency
16173
+ #
16174
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
16175
+ # @return [Bool] returns true if successful, false if not
16176
+ def model_update_exhaust_fan_efficiency(model)
16177
+ return true
16178
+ end
16179
+
16180
+ # Does nothing unless implmented by the specific standard
16181
+ def model_update_fan_efficiency(model)
16182
+ end
16183
+ # Get the name of the building type used in lookups
16184
+ #
16185
+ # @param building_type [String] the building type
16186
+ # @return [String] returns the lookup name as a string
16187
+ # @todo Unify the lookup names and eliminate this method
16188
+ def model_get_lookup_name(building_type)
16189
+ lookup_name = building_type
16190
+ case building_type
16191
+ when 'SmallOffice'
16192
+ lookup_name = 'Office'
16193
+ when 'MediumOffice'
16194
+ lookup_name = 'Office'
16195
+ when 'LargeOffice'
16196
+ lookup_name = 'Office'
16197
+ when 'SmallOfficeDetailed'
16198
+ lookup_name = 'Office'
16199
+ when 'MediumOfficeDetailed'
16200
+ lookup_name = 'Office'
16201
+ when 'LargeOfficeDetailed'
16202
+ lookup_name = 'Office'
16203
+ when 'RetailStandalone'
16204
+ lookup_name = 'Retail'
16205
+ when 'RetailStripmall'
16206
+ lookup_name = 'StripMall'
16207
+ when 'Office'
16208
+ lookup_name = 'Office'
16209
+ end
16210
+ return lookup_name
16211
+ end
16212
+
16213
+ # daylighting adjustments specific to the prototype model
16214
+ #
16215
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
16216
+ # @param building_type [string] the building type
16217
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
16218
+ # @param prototype_input [Hash] hash of prototype inputs
16219
+ # @return [Bool] returns true if successful, false if not
16220
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
16221
+ return true
16222
+ end
16223
+ end
16224
+
16225
+ # This class represents a prototypical ASHRAE901PRM2019 Courthouse.
16226
+ class ASHRAE901PRM2019Courthouse < ASHRAE901PRM2019
16227
+ @@building_type = "Courthouse"
16228
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
16229
+ attr_accessor :prototype_database
16230
+ attr_accessor :prototype_input
16231
+ attr_accessor :lookup_building_type
16232
+ attr_accessor :space_type_map
16233
+ attr_accessor :geometry_file
16234
+ attr_accessor :building_story_map
16235
+ attr_accessor :system_to_space_map
16236
+ def initialize
16237
+ super()
16238
+ @instvarbuilding_type = @@building_type
16239
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
16240
+ if @prototype_input.nil?
16241
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
16242
+ raise("Could not find prototype inputs for ASHRAE901PRM2019Courthouse, cannot create model.")
16243
+ return false
16244
+ end
16245
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
16246
+ #ideally we should map the data required to a instance variable.
16247
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
16248
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
16249
+ @system_to_space_map = load_hvac_map(hvac_map_file)
16250
+ self.set_variables()
16251
+ end
16252
+ # This method is used to extend the class with building-type-specific
16253
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
16254
+ # has its own set of methods that change things which are not
16255
+ # common across all prototype buildings, even within a given Standard.
16256
+ def set_variables()
16257
+ # Will be overwritten in class reopen file.
16258
+ # add all building methods for now.
16259
+ self.extend(Courthouse) unless @template == 'NECB 2011'
16260
+ end
16261
+ # Returns the mapping between the names of the spaces
16262
+ # in the geometry .osm file and the space types
16263
+ # available for this particular Standard.
16264
+ def define_space_type_map(building_type, climate_zone)
16265
+ return @space_type_map
16266
+ end
16267
+ # Returns the mapping between the names of the spaces
16268
+ # in the geometry .osm file and the HVAC system that will
16269
+ # be applied to those spaces.
16270
+ def define_hvac_system_map(building_type, climate_zone)
16271
+ return @system_to_space_map
16272
+ end
16273
+ # Returns the mapping between the names of the spaces
16274
+ # in the geometry .osm file and the building story
16275
+ # that they are located on.
16276
+ def define_building_story_map(building_type, climate_zone)
16277
+ return @building_story_map
16278
+ end
16279
+ # Does nothing unless implmented by the specific standard
16280
+ def model_modify_oa_controller(model)
16281
+ end
16282
+ # Does nothing unless implmented by the specific standard
16283
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
16284
+ end
16285
+
16286
+ # update exhuast fan efficiency
16287
+ #
16288
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
16289
+ # @return [Bool] returns true if successful, false if not
16290
+ def model_update_exhaust_fan_efficiency(model)
16291
+ return true
16292
+ end
16293
+
16294
+ # Does nothing unless implmented by the specific standard
16295
+ def model_update_fan_efficiency(model)
16296
+ end
16297
+ # Get the name of the building type used in lookups
16298
+ #
16299
+ # @param building_type [String] the building type
16300
+ # @return [String] returns the lookup name as a string
16301
+ # @todo Unify the lookup names and eliminate this method
16302
+ def model_get_lookup_name(building_type)
16303
+ lookup_name = building_type
16304
+ case building_type
16305
+ when 'SmallOffice'
16306
+ lookup_name = 'Office'
16307
+ when 'MediumOffice'
16308
+ lookup_name = 'Office'
16309
+ when 'LargeOffice'
16310
+ lookup_name = 'Office'
16311
+ when 'SmallOfficeDetailed'
16312
+ lookup_name = 'Office'
16313
+ when 'MediumOfficeDetailed'
16314
+ lookup_name = 'Office'
16315
+ when 'LargeOfficeDetailed'
16316
+ lookup_name = 'Office'
16317
+ when 'RetailStandalone'
16318
+ lookup_name = 'Retail'
16319
+ when 'RetailStripmall'
16320
+ lookup_name = 'StripMall'
16321
+ when 'Office'
16322
+ lookup_name = 'Office'
16323
+ end
16324
+ return lookup_name
16325
+ end
16326
+
16327
+ # daylighting adjustments specific to the prototype model
16328
+ #
16329
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
16330
+ # @param building_type [string] the building type
16331
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
16332
+ # @param prototype_input [Hash] hash of prototype inputs
16333
+ # @return [Bool] returns true if successful, false if not
16334
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
16335
+ return true
16336
+ end
16337
+ end
16338
+
16339
+ # This class represents a prototypical ASHRAE901PRM2019 TallBuilding.
16340
+ class ASHRAE901PRM2019TallBuilding < ASHRAE901PRM2019
16341
+ @@building_type = "TallBuilding"
16342
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
16343
+ attr_accessor :prototype_database
16344
+ attr_accessor :prototype_input
16345
+ attr_accessor :lookup_building_type
16346
+ attr_accessor :space_type_map
16347
+ attr_accessor :geometry_file
16348
+ attr_accessor :building_story_map
16349
+ attr_accessor :system_to_space_map
16350
+ def initialize
16351
+ super()
16352
+ @instvarbuilding_type = @@building_type
16353
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
16354
+ if @prototype_input.nil?
16355
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
16356
+ raise("Could not find prototype inputs for ASHRAE901PRM2019TallBuilding, cannot create model.")
16357
+ return false
16358
+ end
16359
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
16360
+ #ideally we should map the data required to a instance variable.
16361
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
16362
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
16363
+ @system_to_space_map = load_hvac_map(hvac_map_file)
16364
+ self.set_variables()
16365
+ end
16366
+ # This method is used to extend the class with building-type-specific
16367
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
16368
+ # has its own set of methods that change things which are not
16369
+ # common across all prototype buildings, even within a given Standard.
16370
+ def set_variables()
16371
+ # Will be overwritten in class reopen file.
16372
+ # add all building methods for now.
16373
+ self.extend(TallBuilding) unless @template == 'NECB 2011'
16374
+ end
16375
+ # Returns the mapping between the names of the spaces
16376
+ # in the geometry .osm file and the space types
16377
+ # available for this particular Standard.
16378
+ def define_space_type_map(building_type, climate_zone)
16379
+ return @space_type_map
16380
+ end
16381
+ # Returns the mapping between the names of the spaces
16382
+ # in the geometry .osm file and the HVAC system that will
16383
+ # be applied to those spaces.
16384
+ def define_hvac_system_map(building_type, climate_zone)
16385
+ return @system_to_space_map
16386
+ end
16387
+ # Returns the mapping between the names of the spaces
16388
+ # in the geometry .osm file and the building story
16389
+ # that they are located on.
16390
+ def define_building_story_map(building_type, climate_zone)
16391
+ return @building_story_map
16392
+ end
16393
+ # Does nothing unless implmented by the specific standard
16394
+ def model_modify_oa_controller(model)
16395
+ end
16396
+ # Does nothing unless implmented by the specific standard
16397
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
16398
+ end
16399
+
16400
+ # update exhuast fan efficiency
16401
+ #
16402
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
16403
+ # @return [Bool] returns true if successful, false if not
16404
+ def model_update_exhaust_fan_efficiency(model)
16405
+ return true
16406
+ end
16407
+
16408
+ # Does nothing unless implmented by the specific standard
16409
+ def model_update_fan_efficiency(model)
16410
+ end
16411
+ # Get the name of the building type used in lookups
16412
+ #
16413
+ # @param building_type [String] the building type
16414
+ # @return [String] returns the lookup name as a string
16415
+ # @todo Unify the lookup names and eliminate this method
16416
+ def model_get_lookup_name(building_type)
16417
+ lookup_name = building_type
16418
+ case building_type
16419
+ when 'SmallOffice'
16420
+ lookup_name = 'Office'
16421
+ when 'MediumOffice'
16422
+ lookup_name = 'Office'
16423
+ when 'LargeOffice'
16424
+ lookup_name = 'Office'
16425
+ when 'SmallOfficeDetailed'
16426
+ lookup_name = 'Office'
16427
+ when 'MediumOfficeDetailed'
16428
+ lookup_name = 'Office'
16429
+ when 'LargeOfficeDetailed'
16430
+ lookup_name = 'Office'
16431
+ when 'RetailStandalone'
16432
+ lookup_name = 'Retail'
16433
+ when 'RetailStripmall'
16434
+ lookup_name = 'StripMall'
16435
+ when 'Office'
16436
+ lookup_name = 'Office'
16437
+ end
16438
+ return lookup_name
16439
+ end
16440
+
16441
+ # daylighting adjustments specific to the prototype model
16442
+ #
16443
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
16444
+ # @param building_type [string] the building type
16445
+ # @param climate_zone [String] ASHRAE climate zone, e.g. 'ASHRAE 169-2013-4A'
16446
+ # @param prototype_input [Hash] hash of prototype inputs
16447
+ # @return [Bool] returns true if successful, false if not
16448
+ def model_custom_daylighting_tweaks(model, building_type, climate_zone, prototype_input)
16449
+ return true
16450
+ end
16451
+ end
16452
+
16453
+ # This class represents a prototypical ASHRAE901PRM2019 SuperTallBuilding.
16454
+ class ASHRAE901PRM2019SuperTallBuilding < ASHRAE901PRM2019
16455
+ @@building_type = "SuperTallBuilding"
16456
+ register_standard ("90.1-PRM-2019_#{@@building_type}")
16457
+ attr_accessor :prototype_database
16458
+ attr_accessor :prototype_input
16459
+ attr_accessor :lookup_building_type
16460
+ attr_accessor :space_type_map
16461
+ attr_accessor :geometry_file
16462
+ attr_accessor :building_story_map
16463
+ attr_accessor :system_to_space_map
16464
+ def initialize
16465
+ super()
16466
+ @instvarbuilding_type = @@building_type
16467
+ @prototype_input = self.standards_lookup_table_first(table_name: 'prototype_inputs',search_criteria: {'template' => @template,'building_type' => @@building_type })
16468
+ if @prototype_input.nil?
16469
+ OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Model', "Could not find prototype inputs for #{{'template' => @template,'building_type' => @@building_type }}, cannot create model.")
16470
+ raise("Could not find prototype inputs for ASHRAE901PRM2019SuperTallBuilding, cannot create model.")
16471
+ return false
16472
+ end
16473
+ @lookup_building_type = self.model_get_lookup_name(@@building_type)
16474
+ #ideally we should map the data required to a instance variable.
16475
+ @geometry_file = 'geometry/' + @prototype_input['geometry_osm']
16476
+ hvac_map_file = 'geometry/' + @prototype_input['hvac_json']
16477
+ @system_to_space_map = load_hvac_map(hvac_map_file)
16478
+ self.set_variables()
16479
+ end
16480
+ # This method is used to extend the class with building-type-specific
16481
+ # methods, as defined in Prototype.SomeBuildingType.rb. Each building type
16482
+ # has its own set of methods that change things which are not
16483
+ # common across all prototype buildings, even within a given Standard.
16484
+ def set_variables()
16485
+ # Will be overwritten in class reopen file.
16486
+ # add all building methods for now.
16487
+ self.extend(SuperTallBuilding) unless @template == 'NECB 2011'
16488
+ end
16489
+ # Returns the mapping between the names of the spaces
16490
+ # in the geometry .osm file and the space types
16491
+ # available for this particular Standard.
16492
+ def define_space_type_map(building_type, climate_zone)
16493
+ return @space_type_map
16494
+ end
16495
+ # Returns the mapping between the names of the spaces
16496
+ # in the geometry .osm file and the HVAC system that will
16497
+ # be applied to those spaces.
16498
+ def define_hvac_system_map(building_type, climate_zone)
16499
+ return @system_to_space_map
16500
+ end
16501
+ # Returns the mapping between the names of the spaces
16502
+ # in the geometry .osm file and the building story
16503
+ # that they are located on.
16504
+ def define_building_story_map(building_type, climate_zone)
16505
+ return @building_story_map
16506
+ end
16507
+ # Does nothing unless implmented by the specific standard
16508
+ def model_modify_oa_controller(model)
16509
+ end
16510
+ # Does nothing unless implmented by the specific standard
16511
+ def model_reset_or_room_vav_minimum_damper(prototype_input, model)
16512
+ end
16513
+
16514
+ # update exhuast fan efficiency
16515
+ #
16516
+ # @param model [OpenStudio::Model::Model] OpenStudio model object
16517
+ # @return [Bool] returns true if successful, false if not
16518
+ def model_update_exhaust_fan_efficiency(model)
16519
+ return true
16520
+ end
16521
+
16522
+ # Does nothing unless implmented by the specific standard
16523
+ def model_update_fan_efficiency(model)
16524
+ end
16525
+ # Get the name of the building type used in lookups
16526
+ #
16527
+ # @param building_type [String] the building type
16528
+ # @return [String] returns the lookup name as a string
16529
+ # @todo Unify the lookup names and eliminate this method
16530
+ def model_get_lookup_name(building_type)
16531
+ lookup_name = building_type
16532
+ case building_type
16533
+ when 'SmallOffice'
16534
+ lookup_name = 'Office'
16535
+ when 'MediumOffice'
16536
+ lookup_name = 'Office'
16537
+ when 'LargeOffice'
16538
+ lookup_name = 'Office'
16539
+ when 'SmallOfficeDetailed'
16540
+ lookup_name = 'Office'
16541
+ when 'MediumOfficeDetailed'
16542
+ lookup_name = 'Office'
16543
+ when 'LargeOfficeDetailed'
16544
+ lookup_name = 'Office'
16545
+ when 'RetailStandalone'
16546
+ lookup_name = 'Retail'
16547
+ when 'RetailStripmall'
16548
+ lookup_name = 'StripMall'
16549
+ when 'Office'
16550
+ lookup_name = 'Office'
16551
+ end
16552
+ return lookup_name
16553
+ end
16554
+
13242
16555
  # daylighting adjustments specific to the prototype model
13243
16556
  #
13244
16557
  # @param model [OpenStudio::Model::Model] OpenStudio model object