openstudio-common-measures 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +44 -0
  3. data/Rakefile +3 -0
  4. data/lib/measures/ChangeBuildingLocation/measure.xml +11 -11
  5. data/lib/measures/ExportScheduleCSV/measure.rb +1 -1
  6. data/lib/measures/ExportScheduleCSV/measure.xml +16 -15
  7. data/lib/measures/ImportEnvelopeAndInternalLoadsFromIdf/measure.xml +7 -6
  8. data/lib/measures/MeterFlodPlot/measure.rb +1 -1
  9. data/lib/measures/MeterFlodPlot/measure.xml +16 -15
  10. data/lib/measures/ReportModelChanges/measure.xml +2 -2
  11. data/lib/measures/RunPeriodMultiple/measure.xml +12 -11
  12. data/lib/measures/ServerDirectoryCleanup/README.md +97 -3
  13. data/lib/measures/ServerDirectoryCleanup/measure.rb +1 -1
  14. data/lib/measures/ServerDirectoryCleanup/measure.xml +10 -59
  15. data/lib/measures/UnmetLoadHoursTroubleshooting/README.md +9 -3
  16. data/lib/measures/UnmetLoadHoursTroubleshooting/measure.rb +1 -1
  17. data/lib/measures/UnmetLoadHoursTroubleshooting/measure.xml +66 -17
  18. data/lib/measures/VentilationQAQC/README.md +9 -3
  19. data/lib/measures/VentilationQAQC/measure.rb +52 -45
  20. data/lib/measures/VentilationQAQC/measure.xml +25 -30
  21. data/lib/measures/ZoneReport/README.md +2 -2
  22. data/lib/measures/ZoneReport/measure.rb +1 -1
  23. data/lib/measures/ZoneReport/measure.xml +10 -11
  24. data/lib/measures/add_ems_to_control_ev_charging/LICENSE.MD.txt +15 -0
  25. data/lib/measures/{AddDaylightSensors → add_ems_to_control_ev_charging}/LICENSE.md +0 -0
  26. data/lib/measures/add_ems_to_control_ev_charging/ReadMe.MD +29 -0
  27. data/lib/measures/add_ems_to_control_ev_charging/measure.rb +288 -0
  28. data/lib/measures/add_ems_to_control_ev_charging/measure.xml +87 -0
  29. data/lib/measures/add_ev_load/LICENSE.MD.txt +15 -0
  30. data/lib/measures/{EnableDemandControlledVentilation → add_ev_load}/LICENSE.md +0 -0
  31. data/lib/measures/add_ev_load/ReadMe.MD +34 -0
  32. data/lib/measures/add_ev_load/measure.rb +328 -0
  33. data/lib/measures/add_ev_load/measure.xml +153 -0
  34. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/PSN_BuildingKey.csv +104 -0
  35. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/PSN_BuildingKey_v2.csv +104 -0
  36. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow1_flex1.csv +96 -0
  37. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow1_flex2.csv +96 -0
  38. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow1_flex3.csv +96 -0
  39. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow2_flex1.csv +96 -0
  40. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow2_flex2.csv +96 -0
  41. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow2_flex3.csv +96 -0
  42. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow3_flex1.csv +96 -0
  43. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow3_flex2.csv +96 -0
  44. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow3_flex3.csv +96 -0
  45. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow1_flex1.csv +96 -0
  46. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow1_flex2.csv +96 -0
  47. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow1_flex3.csv +96 -0
  48. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow2_flex1.csv +96 -0
  49. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow2_flex2.csv +96 -0
  50. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow2_flex3.csv +96 -0
  51. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow3_flex1.csv +96 -0
  52. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow3_flex2.csv +96 -0
  53. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow3_flex3.csv +96 -0
  54. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow1_flex1.csv +96 -0
  55. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow1_flex2.csv +96 -0
  56. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow1_flex3.csv +96 -0
  57. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow2_flex1.csv +96 -0
  58. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow2_flex2.csv +96 -0
  59. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow2_flex3.csv +96 -0
  60. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow3_flex1.csv +96 -0
  61. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow3_flex2.csv +96 -0
  62. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow3_flex3.csv +96 -0
  63. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/fast_charge_15min_Saturday.csv +96 -0
  64. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/fast_charge_15min_Sunday.csv +96 -0
  65. data/lib/measures/add_ev_load/resources/EV_Load_Profiles/fast_charge_15min_Weekday.csv +96 -0
  66. data/lib/measures/envelope_and_internal_load_breakdown/README.md +4 -3
  67. data/lib/measures/envelope_and_internal_load_breakdown/measure.rb +7 -4
  68. data/lib/measures/envelope_and_internal_load_breakdown/measure.xml +16 -17
  69. data/lib/measures/envelope_and_internal_load_breakdown/resources/report.html.erb +1 -0
  70. data/lib/measures/example_report/README.md +27 -5
  71. data/lib/measures/example_report/measure.rb +7 -4
  72. data/lib/measures/example_report/measure.xml +16 -29
  73. data/lib/measures/example_report/resources/report.html.erb +1 -0
  74. data/lib/measures/gem_env_report/measure.xml +1 -1
  75. data/lib/measures/generic_qaqc/README.md +187 -5
  76. data/lib/measures/generic_qaqc/measure.rb +1 -1
  77. data/lib/measures/generic_qaqc/measure.xml +15 -85
  78. data/lib/measures/generic_qaqc/resources/report.html.erb +1 -0
  79. data/lib/measures/hvac_psychrometric_chart/README.md +11 -5
  80. data/lib/measures/hvac_psychrometric_chart/measure.rb +1 -1
  81. data/lib/measures/hvac_psychrometric_chart/measure.xml +13 -18
  82. data/lib/measures/hvac_psychrometric_chart/resources/report.html.erb +1 -0
  83. data/lib/measures/inject_idf_objects/measure.xml +25 -24
  84. data/lib/measures/openstudio_results/README.md +195 -5
  85. data/lib/measures/openstudio_results/measure.rb +2 -2
  86. data/lib/measures/openstudio_results/measure.xml +30 -154
  87. data/lib/measures/openstudio_results/resources/report.html.erb +1 -0
  88. data/lib/measures/set_run_period/measure.xml +2 -2
  89. data/lib/measures/{EnableEconomizerControl → view_data}/LICENSE.md +0 -0
  90. data/lib/measures/view_data/README.md +64 -0
  91. data/lib/measures/{AddDaylightSensors → view_data}/README.md.erb +0 -0
  92. data/lib/measures/view_data/measure.rb +454 -0
  93. data/lib/measures/view_data/measure.xml +159 -0
  94. data/lib/measures/view_data/resources/report.html.in +2881 -0
  95. data/lib/measures/view_data/resources/va3c.rb +1021 -0
  96. data/lib/measures/{ImproveFanBeltEfficiency → view_model}/LICENSE.md +0 -0
  97. data/lib/measures/view_model/README.md +26 -0
  98. data/lib/measures/{EnableDemandControlledVentilation → view_model}/README.md.erb +0 -0
  99. data/lib/measures/view_model/measure.rb +146 -0
  100. data/lib/measures/view_model/measure.xml +98 -0
  101. data/lib/measures/view_model/resources/report.html.in +2881 -0
  102. data/lib/measures/view_model/resources/va3c.rb +1021 -0
  103. data/lib/openstudio/common_measures/version.rb +1 -1
  104. data/openstudio-common-measures.gemspec +1 -1
  105. metadata +61 -71
  106. data/lib/measures/AddDaylightSensors/README.md +0 -136
  107. data/lib/measures/AddDaylightSensors/measure.rb +0 -521
  108. data/lib/measures/AddDaylightSensors/measure.xml +0 -233
  109. data/lib/measures/EnableDemandControlledVentilation/README.md +0 -32
  110. data/lib/measures/EnableDemandControlledVentilation/measure.rb +0 -154
  111. data/lib/measures/EnableDemandControlledVentilation/measure.xml +0 -99
  112. data/lib/measures/EnableEconomizerControl/README.md +0 -48
  113. data/lib/measures/EnableEconomizerControl/README.md.erb +0 -42
  114. data/lib/measures/EnableEconomizerControl/measure.rb +0 -172
  115. data/lib/measures/EnableEconomizerControl/measure.xml +0 -124
  116. data/lib/measures/ImproveFanBeltEfficiency/README.md +0 -104
  117. data/lib/measures/ImproveFanBeltEfficiency/README.md.erb +0 -42
  118. data/lib/measures/ImproveFanBeltEfficiency/measure.rb +0 -366
  119. data/lib/measures/ImproveFanBeltEfficiency/measure.xml +0 -185
  120. data/lib/measures/ImproveMotorEfficiency/LICENSE.md +0 -27
  121. data/lib/measures/ImproveMotorEfficiency/README.md +0 -104
  122. data/lib/measures/ImproveMotorEfficiency/README.md.erb +0 -42
  123. data/lib/measures/ImproveMotorEfficiency/measure.rb +0 -365
  124. data/lib/measures/ImproveMotorEfficiency/measure.xml +0 -182
  125. data/lib/measures/IncreaseInsulationRValueForExteriorWalls/LICENSE.md +0 -27
  126. data/lib/measures/IncreaseInsulationRValueForExteriorWalls/README.md +0 -64
  127. data/lib/measures/IncreaseInsulationRValueForExteriorWalls/README.md.erb +0 -42
  128. data/lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.rb +0 -422
  129. data/lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.xml +0 -150
  130. data/lib/measures/IncreaseInsulationRValueForRoofs/LICENSE.md +0 -27
  131. data/lib/measures/IncreaseInsulationRValueForRoofs/README.md +0 -64
  132. data/lib/measures/IncreaseInsulationRValueForRoofs/README.md.erb +0 -42
  133. data/lib/measures/IncreaseInsulationRValueForRoofs/measure.rb +0 -422
  134. data/lib/measures/IncreaseInsulationRValueForRoofs/measure.xml +0 -143
  135. data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/LICENSE.md +0 -27
  136. data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/README.md +0 -97
  137. data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/README.md.erb +0 -42
  138. data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.rb +0 -450
  139. data/lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.xml +0 -186
  140. data/lib/measures/ReduceLightingLoadsByPercentage/LICENSE.md +0 -27
  141. data/lib/measures/ReduceLightingLoadsByPercentage/README.md +0 -96
  142. data/lib/measures/ReduceLightingLoadsByPercentage/README.md.erb +0 -42
  143. data/lib/measures/ReduceLightingLoadsByPercentage/measure.rb +0 -513
  144. data/lib/measures/ReduceLightingLoadsByPercentage/measure.xml +0 -191
  145. data/lib/measures/ReduceSpaceInfiltrationByPercentage/LICENSE.md +0 -27
  146. data/lib/measures/ReduceSpaceInfiltrationByPercentage/README.md +0 -104
  147. data/lib/measures/ReduceSpaceInfiltrationByPercentage/README.md.erb +0 -42
  148. data/lib/measures/ReduceSpaceInfiltrationByPercentage/measure.rb +0 -349
  149. data/lib/measures/ReduceSpaceInfiltrationByPercentage/measure.xml +0 -181
  150. data/lib/measures/ReduceVentilationByPercentage/LICENSE.md +0 -27
  151. data/lib/measures/ReduceVentilationByPercentage/README.md +0 -40
  152. data/lib/measures/ReduceVentilationByPercentage/README.md.erb +0 -42
  153. data/lib/measures/ReduceVentilationByPercentage/measure.rb +0 -291
  154. data/lib/measures/ReduceVentilationByPercentage/measure.xml +0 -96
  155. data/lib/measures/VentilationQAQC/ExampleModel.osm +0 -28468
  156. data/lib/measures/create_variable_speed_rtu/LICENSE.md +0 -27
  157. data/lib/measures/create_variable_speed_rtu/README.md +0 -120
  158. data/lib/measures/create_variable_speed_rtu/README.md.erb +0 -42
  159. data/lib/measures/create_variable_speed_rtu/measure.rb +0 -539
  160. data/lib/measures/create_variable_speed_rtu/measure.xml +0 -207
  161. data/lib/measures/radiant_slab_with_doas/LICENSE.md +0 -27
  162. data/lib/measures/radiant_slab_with_doas/README.md +0 -156
  163. data/lib/measures/radiant_slab_with_doas/README.md.erb +0 -42
  164. data/lib/measures/radiant_slab_with_doas/measure.rb +0 -403
  165. data/lib/measures/radiant_slab_with_doas/measure.xml +0 -345
@@ -35,6 +35,6 @@
35
35
 
36
36
  module OpenStudio
37
37
  module CommonMeasures
38
- VERSION = '0.2.0'.freeze
38
+ VERSION = '0.2.1'.freeze
39
39
  end
40
40
  end
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.required_ruby_version = '~> 2.5.0'
30
30
 
31
31
  spec.add_dependency 'bundler', '~> 2.1'
32
- spec.add_dependency 'openstudio-extension', '~> 0.2.2'
32
+ spec.add_dependency 'openstudio-extension', '~> 0.2.3'
33
33
  spec.add_dependency 'openstudio-standards', '~> 0.2.11'
34
34
 
35
35
  spec.add_development_dependency 'rake', '~> 13.0'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openstudio-common-measures
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Goldwasser
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-05-12 00:00:00.000000000 Z
12
+ date: 2020-10-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -31,14 +31,14 @@ dependencies:
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: 0.2.2
34
+ version: 0.2.3
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: 0.2.2
41
+ version: 0.2.3
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: openstudio-standards
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -141,11 +141,6 @@ files:
141
141
  - lib/measures/AddCostperAreatoUnusedConstruction/README.md.erb
142
142
  - lib/measures/AddCostperAreatoUnusedConstruction/measure.rb
143
143
  - lib/measures/AddCostperAreatoUnusedConstruction/measure.xml
144
- - lib/measures/AddDaylightSensors/LICENSE.md
145
- - lib/measures/AddDaylightSensors/README.md
146
- - lib/measures/AddDaylightSensors/README.md.erb
147
- - lib/measures/AddDaylightSensors/measure.rb
148
- - lib/measures/AddDaylightSensors/measure.xml
149
144
  - lib/measures/AddExteriorLights/LICENSE.md
150
145
  - lib/measures/AddExteriorLights/README.md
151
146
  - lib/measures/AddExteriorLights/README.md.erb
@@ -188,16 +183,6 @@ files:
188
183
  - lib/measures/ChangeBuildingLocation/measure.xml
189
184
  - lib/measures/ChangeBuildingLocation/resources/epw.rb
190
185
  - lib/measures/ChangeBuildingLocation/resources/stat_file.rb
191
- - lib/measures/EnableDemandControlledVentilation/LICENSE.md
192
- - lib/measures/EnableDemandControlledVentilation/README.md
193
- - lib/measures/EnableDemandControlledVentilation/README.md.erb
194
- - lib/measures/EnableDemandControlledVentilation/measure.rb
195
- - lib/measures/EnableDemandControlledVentilation/measure.xml
196
- - lib/measures/EnableEconomizerControl/LICENSE.md
197
- - lib/measures/EnableEconomizerControl/README.md
198
- - lib/measures/EnableEconomizerControl/README.md.erb
199
- - lib/measures/EnableEconomizerControl/measure.rb
200
- - lib/measures/EnableEconomizerControl/measure.xml
201
186
  - lib/measures/EnableIdealAirLoadsForAllZones/LICENSE.md
202
187
  - lib/measures/EnableIdealAirLoadsForAllZones/README.md
203
188
  - lib/measures/EnableIdealAirLoadsForAllZones/README.md.erb
@@ -213,31 +198,11 @@ files:
213
198
  - lib/measures/ImportEnvelopeAndInternalLoadsFromIdf/README.md.erb
214
199
  - lib/measures/ImportEnvelopeAndInternalLoadsFromIdf/measure.rb
215
200
  - lib/measures/ImportEnvelopeAndInternalLoadsFromIdf/measure.xml
216
- - lib/measures/ImproveFanBeltEfficiency/LICENSE.md
217
- - lib/measures/ImproveFanBeltEfficiency/README.md
218
- - lib/measures/ImproveFanBeltEfficiency/README.md.erb
219
- - lib/measures/ImproveFanBeltEfficiency/measure.rb
220
- - lib/measures/ImproveFanBeltEfficiency/measure.xml
221
- - lib/measures/ImproveMotorEfficiency/LICENSE.md
222
- - lib/measures/ImproveMotorEfficiency/README.md
223
- - lib/measures/ImproveMotorEfficiency/README.md.erb
224
- - lib/measures/ImproveMotorEfficiency/measure.rb
225
- - lib/measures/ImproveMotorEfficiency/measure.xml
226
- - lib/measures/IncreaseInsulationRValueForExteriorWalls/LICENSE.md
227
- - lib/measures/IncreaseInsulationRValueForExteriorWalls/README.md
228
- - lib/measures/IncreaseInsulationRValueForExteriorWalls/README.md.erb
229
- - lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.rb
230
- - lib/measures/IncreaseInsulationRValueForExteriorWalls/measure.xml
231
201
  - lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/LICENSE.md
232
202
  - lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/README.md
233
203
  - lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/README.md.erb
234
204
  - lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/measure.rb
235
205
  - lib/measures/IncreaseInsulationRValueForExteriorWallsByPercentage/measure.xml
236
- - lib/measures/IncreaseInsulationRValueForRoofs/LICENSE.md
237
- - lib/measures/IncreaseInsulationRValueForRoofs/README.md
238
- - lib/measures/IncreaseInsulationRValueForRoofs/README.md.erb
239
- - lib/measures/IncreaseInsulationRValueForRoofs/measure.rb
240
- - lib/measures/IncreaseInsulationRValueForRoofs/measure.xml
241
206
  - lib/measures/IncreaseInsulationRValueForRoofsByPercentage/LICENSE.md
242
207
  - lib/measures/IncreaseInsulationRValueForRoofsByPercentage/README.md
243
208
  - lib/measures/IncreaseInsulationRValueForRoofsByPercentage/README.md.erb
@@ -264,26 +229,6 @@ files:
264
229
  - lib/measures/PredictedMeanVote/README.md.erb
265
230
  - lib/measures/PredictedMeanVote/measure.rb
266
231
  - lib/measures/PredictedMeanVote/measure.xml
267
- - lib/measures/ReduceElectricEquipmentLoadsByPercentage/LICENSE.md
268
- - lib/measures/ReduceElectricEquipmentLoadsByPercentage/README.md
269
- - lib/measures/ReduceElectricEquipmentLoadsByPercentage/README.md.erb
270
- - lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.rb
271
- - lib/measures/ReduceElectricEquipmentLoadsByPercentage/measure.xml
272
- - lib/measures/ReduceLightingLoadsByPercentage/LICENSE.md
273
- - lib/measures/ReduceLightingLoadsByPercentage/README.md
274
- - lib/measures/ReduceLightingLoadsByPercentage/README.md.erb
275
- - lib/measures/ReduceLightingLoadsByPercentage/measure.rb
276
- - lib/measures/ReduceLightingLoadsByPercentage/measure.xml
277
- - lib/measures/ReduceSpaceInfiltrationByPercentage/LICENSE.md
278
- - lib/measures/ReduceSpaceInfiltrationByPercentage/README.md
279
- - lib/measures/ReduceSpaceInfiltrationByPercentage/README.md.erb
280
- - lib/measures/ReduceSpaceInfiltrationByPercentage/measure.rb
281
- - lib/measures/ReduceSpaceInfiltrationByPercentage/measure.xml
282
- - lib/measures/ReduceVentilationByPercentage/LICENSE.md
283
- - lib/measures/ReduceVentilationByPercentage/README.md
284
- - lib/measures/ReduceVentilationByPercentage/README.md.erb
285
- - lib/measures/ReduceVentilationByPercentage/measure.rb
286
- - lib/measures/ReduceVentilationByPercentage/measure.xml
287
232
  - lib/measures/RemoveInternalLoadsDirectlyAssignedToSpaces/LICENSE.md
288
233
  - lib/measures/RemoveInternalLoadsDirectlyAssignedToSpaces/README.md
289
234
  - lib/measures/RemoveInternalLoadsDirectlyAssignedToSpaces/README.md.erb
@@ -390,7 +335,6 @@ files:
390
335
  - lib/measures/UnmetLoadHoursTroubleshooting/measure.rb
391
336
  - lib/measures/UnmetLoadHoursTroubleshooting/measure.xml
392
337
  - lib/measures/UnmetLoadHoursTroubleshooting/resources/report.html.in
393
- - lib/measures/VentilationQAQC/ExampleModel.osm
394
338
  - lib/measures/VentilationQAQC/LICENSE.md
395
339
  - lib/measures/VentilationQAQC/README.md
396
340
  - lib/measures/VentilationQAQC/README.md.erb
@@ -403,6 +347,48 @@ files:
403
347
  - lib/measures/ZoneReport/measure.rb
404
348
  - lib/measures/ZoneReport/measure.xml
405
349
  - lib/measures/ZoneReport/resources/report.html.in
350
+ - lib/measures/add_ems_to_control_ev_charging/LICENSE.MD.txt
351
+ - lib/measures/add_ems_to_control_ev_charging/LICENSE.md
352
+ - lib/measures/add_ems_to_control_ev_charging/ReadMe.MD
353
+ - lib/measures/add_ems_to_control_ev_charging/measure.rb
354
+ - lib/measures/add_ems_to_control_ev_charging/measure.xml
355
+ - lib/measures/add_ev_load/LICENSE.MD.txt
356
+ - lib/measures/add_ev_load/LICENSE.md
357
+ - lib/measures/add_ev_load/ReadMe.MD
358
+ - lib/measures/add_ev_load/measure.rb
359
+ - lib/measures/add_ev_load/measure.xml
360
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/PSN_BuildingKey.csv
361
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/PSN_BuildingKey_v2.csv
362
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow1_flex1.csv
363
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow1_flex2.csv
364
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow1_flex3.csv
365
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow2_flex1.csv
366
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow2_flex2.csv
367
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow2_flex3.csv
368
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow3_flex1.csv
369
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow3_flex2.csv
370
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg1_dow3_flex3.csv
371
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow1_flex1.csv
372
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow1_flex2.csv
373
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow1_flex3.csv
374
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow2_flex1.csv
375
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow2_flex2.csv
376
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow2_flex3.csv
377
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow3_flex1.csv
378
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow3_flex2.csv
379
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg2_dow3_flex3.csv
380
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow1_flex1.csv
381
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow1_flex2.csv
382
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow1_flex3.csv
383
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow2_flex1.csv
384
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow2_flex2.csv
385
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow2_flex3.csv
386
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow3_flex1.csv
387
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow3_flex2.csv
388
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/chg3_dow3_flex3.csv
389
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/fast_charge_15min_Saturday.csv
390
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/fast_charge_15min_Sunday.csv
391
+ - lib/measures/add_ev_load/resources/EV_Load_Profiles/fast_charge_15min_Weekday.csv
406
392
  - lib/measures/add_rooftop_pv/LICENSE.md
407
393
  - lib/measures/add_rooftop_pv/README.md
408
394
  - lib/measures/add_rooftop_pv/README.md.erb
@@ -429,11 +415,6 @@ files:
429
415
  - lib/measures/air_wall_zone_mixing/docs/timeseries_results.png
430
416
  - lib/measures/air_wall_zone_mixing/measure.rb
431
417
  - lib/measures/air_wall_zone_mixing/measure.xml
432
- - lib/measures/create_variable_speed_rtu/LICENSE.md
433
- - lib/measures/create_variable_speed_rtu/README.md
434
- - lib/measures/create_variable_speed_rtu/README.md.erb
435
- - lib/measures/create_variable_speed_rtu/measure.rb
436
- - lib/measures/create_variable_speed_rtu/measure.xml
437
418
  - lib/measures/envelope_and_internal_load_breakdown/LICENSE.md
438
419
  - lib/measures/envelope_and_internal_load_breakdown/README.md
439
420
  - lib/measures/envelope_and_internal_load_breakdown/README.md.erb
@@ -645,11 +626,6 @@ files:
645
626
  - lib/measures/openstudio_results/resources/os_lib_reporting.rb
646
627
  - lib/measures/openstudio_results/resources/os_lib_schedules.rb
647
628
  - lib/measures/openstudio_results/resources/report.html.erb
648
- - lib/measures/radiant_slab_with_doas/LICENSE.md
649
- - lib/measures/radiant_slab_with_doas/README.md
650
- - lib/measures/radiant_slab_with_doas/README.md.erb
651
- - lib/measures/radiant_slab_with_doas/measure.rb
652
- - lib/measures/radiant_slab_with_doas/measure.xml
653
629
  - lib/measures/remove_orphan_objects_and_unused_resources/LICENSE.md
654
630
  - lib/measures/remove_orphan_objects_and_unused_resources/README.md
655
631
  - lib/measures/remove_orphan_objects_and_unused_resources/README.md.erb
@@ -705,6 +681,20 @@ files:
705
681
  - lib/measures/tariff_selection_time_and_date_dependant/README.md.erb
706
682
  - lib/measures/tariff_selection_time_and_date_dependant/measure.rb
707
683
  - lib/measures/tariff_selection_time_and_date_dependant/measure.xml
684
+ - lib/measures/view_data/LICENSE.md
685
+ - lib/measures/view_data/README.md
686
+ - lib/measures/view_data/README.md.erb
687
+ - lib/measures/view_data/measure.rb
688
+ - lib/measures/view_data/measure.xml
689
+ - lib/measures/view_data/resources/report.html.in
690
+ - lib/measures/view_data/resources/va3c.rb
691
+ - lib/measures/view_model/LICENSE.md
692
+ - lib/measures/view_model/README.md
693
+ - lib/measures/view_model/README.md.erb
694
+ - lib/measures/view_model/measure.rb
695
+ - lib/measures/view_model/measure.xml
696
+ - lib/measures/view_model/resources/report.html.in
697
+ - lib/measures/view_model/resources/va3c.rb
708
698
  - lib/openstudio-common-measures.rb
709
699
  - lib/openstudio/common_measures.rb
710
700
  - lib/openstudio/common_measures/extension.rb
@@ -715,7 +705,7 @@ licenses: []
715
705
  metadata:
716
706
  bug_tracker_uri: https://github.com/NREL/openstudio-common-measures-gem/issues
717
707
  changelog_uri: https://github.com/NREL/openstudio-common-measures-gem/blob/develop/CHANGELOG.md
718
- source_code_uri: https://github.com/NREL/openstudio-common-measures-gem/tree/v0.2.0
708
+ source_code_uri: https://github.com/NREL/openstudio-common-measures-gem/tree/v0.2.1
719
709
  post_install_message:
720
710
  rdoc_options: []
721
711
  require_paths:
@@ -1,136 +0,0 @@
1
-
2
-
3
- ###### (Automatically generated documentation)
4
-
5
- # Add Daylight Sensor at the Center of Spaces with a Specified Space Type Assigned
6
-
7
- ## Description
8
- This measure will add daylighting controls to spaces that that have space types assigned with names containing the string in the argument. You can also add a cost per space for sensors added to the model.
9
-
10
- ## Modeler Description
11
- Make an array of the spaces that meet the criteria. Locate the sensor x and y values by averaging the min and max X and Y values from floor surfaces in the space. If a space already has a daylighting control, do not add a new one and leave the original in place. Warn the user if the space isn't assigned to a thermal zone, or if the space doesn't have any translucent surfaces. Note that the cost is added to the space not the sensor. If the sensor is removed at a later date, the cost will remain.
12
-
13
- ## Measure Type
14
- ModelMeasure
15
-
16
- ## Taxonomy
17
-
18
-
19
- ## Arguments
20
-
21
-
22
- ### Add Daylight Sensors to Spaces of This Space Type
23
-
24
- **Name:** space_type,
25
- **Type:** Choice,
26
- **Units:** ,
27
- **Required:** true,
28
- **Model Dependent:** false
29
-
30
- ### Daylighting Setpoint
31
-
32
- **Name:** setpoint,
33
- **Type:** Double,
34
- **Units:** fc,
35
- **Required:** true,
36
- **Model Dependent:** false
37
-
38
- ### Daylighting Control Type
39
-
40
- **Name:** control_type,
41
- **Type:** Choice,
42
- **Units:** ,
43
- **Required:** true,
44
- **Model Dependent:** false
45
-
46
- ### Daylighting Minimum Input Power Fraction
47
- min = 0 max = 0.6
48
- **Name:** min_power_fraction,
49
- **Type:** Double,
50
- **Units:** ,
51
- **Required:** true,
52
- **Model Dependent:** false
53
-
54
- ### Daylighting Minimum Light Output Fraction
55
- min = 0 max = 0.6
56
- **Name:** min_light_fraction,
57
- **Type:** Double,
58
- **Units:** ,
59
- **Required:** true,
60
- **Model Dependent:** false
61
-
62
- ### Fraction of zone controlled by daylight sensors
63
-
64
- **Name:** fraction_zone_controlled,
65
- **Type:** Double,
66
- **Units:** ,
67
- **Required:** true,
68
- **Model Dependent:** false
69
-
70
- ### Sensor Height
71
-
72
- **Name:** height,
73
- **Type:** Double,
74
- **Units:** inches,
75
- **Required:** true,
76
- **Model Dependent:** false
77
-
78
- ### Material and Installation Costs per Space for Daylight Sensor
79
-
80
- **Name:** material_cost,
81
- **Type:** Double,
82
- **Units:** $,
83
- **Required:** true,
84
- **Model Dependent:** false
85
-
86
- ### Demolition Costs per Space for Daylight Sensor
87
-
88
- **Name:** demolition_cost,
89
- **Type:** Double,
90
- **Units:** $,
91
- **Required:** true,
92
- **Model Dependent:** false
93
-
94
- ### Years Until Costs Start
95
-
96
- **Name:** years_until_costs_start,
97
- **Type:** Integer,
98
- **Units:** whole years,
99
- **Required:** true,
100
- **Model Dependent:** false
101
-
102
- ### Demolition Costs Occur During Initial Construction
103
-
104
- **Name:** demo_cost_initial_const,
105
- **Type:** Boolean,
106
- **Units:** ,
107
- **Required:** true,
108
- **Model Dependent:** false
109
-
110
- ### Expected Life
111
-
112
- **Name:** expected_life,
113
- **Type:** Integer,
114
- **Units:** whole years,
115
- **Required:** true,
116
- **Model Dependent:** false
117
-
118
- ### O & M Costs per Space for Daylight Sensor
119
-
120
- **Name:** om_cost,
121
- **Type:** Double,
122
- **Units:** $,
123
- **Required:** true,
124
- **Model Dependent:** false
125
-
126
- ### O & M Frequency
127
-
128
- **Name:** om_frequency,
129
- **Type:** Integer,
130
- **Units:** whole years,
131
- **Required:** true,
132
- **Model Dependent:** false
133
-
134
-
135
-
136
-
@@ -1,521 +0,0 @@
1
- # *******************************************************************************
2
- # OpenStudio(R), Copyright (c) 2008-2020, Alliance for Sustainable Energy, LLC.
3
- # All rights reserved.
4
- # Redistribution and use in source and binary forms, with or without
5
- # modification, are permitted provided that the following conditions are met:
6
- #
7
- # (1) Redistributions of source code must retain the above copyright notice,
8
- # this list of conditions and the following disclaimer.
9
- #
10
- # (2) Redistributions in binary form must reproduce the above copyright notice,
11
- # this list of conditions and the following disclaimer in the documentation
12
- # and/or other materials provided with the distribution.
13
- #
14
- # (3) Neither the name of the copyright holder nor the names of any contributors
15
- # may be used to endorse or promote products derived from this software without
16
- # specific prior written permission from the respective party.
17
- #
18
- # (4) Other than as required in clauses (1) and (2), distributions in any form
19
- # of modifications or other derivative works may not use the "OpenStudio"
20
- # trademark, "OS", "os", or any other confusingly similar designation without
21
- # specific prior written permission from Alliance for Sustainable Energy, LLC.
22
- #
23
- # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
24
- # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
25
- # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
26
- # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
27
- # UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
28
- # THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
29
- # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
30
- # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31
- # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
32
- # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
33
- # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34
- # *******************************************************************************
35
-
36
- # start the measure
37
- class AddDaylightSensors < OpenStudio::Measure::ModelMeasure
38
- # define the name that a user will see
39
- def name
40
- return 'Add Daylight Sensor at the Center of Spaces with a Specified Space Type Assigned'
41
- end
42
-
43
- # human readable description
44
- def description
45
- return 'This measure will add daylighting controls to spaces that that have space types assigned with names containing the string in the argument. You can also add a cost per space for sensors added to the model.'
46
- end
47
-
48
- # human readable description of modeling approach
49
- def modeler_description
50
- return "Make an array of the spaces that meet the criteria. Locate the sensor x and y values by averaging the min and max X and Y values from floor surfaces in the space. If a space already has a daylighting control, do not add a new one and leave the original in place. Warn the user if the space isn't assigned to a thermal zone, or if the space doesn't have any translucent surfaces. Note that the cost is added to the space not the sensor. If the sensor is removed at a later date, the cost will remain."
51
- end
52
-
53
- # define the arguments that the user will input
54
- def arguments(model)
55
- args = OpenStudio::Measure::OSArgumentVector.new
56
-
57
- # make a choice argument for model objects
58
- space_type_handles = OpenStudio::StringVector.new
59
- space_type_display_names = OpenStudio::StringVector.new
60
-
61
- # putting model object and names into hash
62
- space_type_args = model.getSpaceTypes
63
- space_type_args_hash = {}
64
- space_type_args.each do |space_type_arg|
65
- space_type_args_hash[space_type_arg.name.to_s] = space_type_arg
66
- end
67
-
68
- # looping through sorted hash of model objects
69
- space_type_args_hash.sort.map do |key, value|
70
- # only include if space type is used in the model
71
- if !value.spaces.empty?
72
- space_type_handles << value.handle.to_s
73
- space_type_display_names << key
74
- end
75
- end
76
-
77
- # make a choice argument for space type
78
- space_type = OpenStudio::Measure::OSArgument.makeChoiceArgument('space_type', space_type_handles, space_type_display_names, true)
79
- space_type.setDisplayName('Add Daylight Sensors to Spaces of This Space Type')
80
- args << space_type
81
-
82
- # make an argument for setpoint
83
- setpoint = OpenStudio::Measure::OSArgument.makeDoubleArgument('setpoint', true)
84
- setpoint.setDisplayName('Daylighting Setpoint')
85
- setpoint.setUnits('fc')
86
- setpoint.setDefaultValue(45.0)
87
- args << setpoint
88
-
89
- # make an argument for control_type
90
- chs = OpenStudio::StringVector.new
91
- chs << 'None'
92
- chs << 'Continuous'
93
- chs << 'Stepped'
94
- chs << 'Continuous/Off'
95
- control_type = OpenStudio::Measure::OSArgument.makeChoiceArgument('control_type', chs)
96
- control_type.setDisplayName('Daylighting Control Type')
97
- control_type.setDefaultValue('Continuous/Off')
98
- args << control_type
99
-
100
- # make an argument for min_power_fraction
101
- min_power_fraction = OpenStudio::Measure::OSArgument.makeDoubleArgument('min_power_fraction', true)
102
- min_power_fraction.setDisplayName('Daylighting Minimum Input Power Fraction')
103
- min_power_fraction.setDescription('min = 0 max = 0.6')
104
- min_power_fraction.setDefaultValue(0.3)
105
- args << min_power_fraction
106
-
107
- # make an argument for min_light_fraction
108
- min_light_fraction = OpenStudio::Measure::OSArgument.makeDoubleArgument('min_light_fraction', true)
109
- min_light_fraction.setDisplayName('Daylighting Minimum Light Output Fraction')
110
- min_light_fraction.setDescription('min = 0 max = 0.6')
111
- min_light_fraction.setDefaultValue(0.2)
112
- args << min_light_fraction
113
-
114
- # make an argument for fraction_zone_controlled
115
- fraction_zone_controlled = OpenStudio::Measure::OSArgument.makeDoubleArgument('fraction_zone_controlled', true)
116
- fraction_zone_controlled.setDisplayName('Fraction of zone controlled by daylight sensors')
117
- fraction_zone_controlled.setDefaultValue(1.0)
118
- args << fraction_zone_controlled
119
-
120
- # make an argument for height
121
- height = OpenStudio::Measure::OSArgument.makeDoubleArgument('height', true)
122
- height.setDisplayName('Sensor Height')
123
- height.setUnits('inches')
124
- height.setDefaultValue(30.0)
125
- args << height
126
-
127
- # make an argument for material and installation cost
128
- material_cost = OpenStudio::Measure::OSArgument.makeDoubleArgument('material_cost', true)
129
- material_cost.setDisplayName('Material and Installation Costs per Space for Daylight Sensor')
130
- material_cost.setUnits('$')
131
- material_cost.setDefaultValue(0.0)
132
- args << material_cost
133
-
134
- # make an argument for demolition cost
135
- demolition_cost = OpenStudio::Measure::OSArgument.makeDoubleArgument('demolition_cost', true)
136
- demolition_cost.setDisplayName('Demolition Costs per Space for Daylight Sensor')
137
- demolition_cost.setUnits('$')
138
- demolition_cost.setDefaultValue(0.0)
139
- args << demolition_cost
140
-
141
- # make an argument for duration in years until costs start
142
- years_until_costs_start = OpenStudio::Measure::OSArgument.makeIntegerArgument('years_until_costs_start', true)
143
- years_until_costs_start.setDisplayName('Years Until Costs Start')
144
- years_until_costs_start.setUnits('whole years')
145
- years_until_costs_start.setDefaultValue(0)
146
- args << years_until_costs_start
147
-
148
- # make an argument to determine if demolition costs should be included in initial construction
149
- demo_cost_initial_const = OpenStudio::Measure::OSArgument.makeBoolArgument('demo_cost_initial_const', true)
150
- demo_cost_initial_const.setDisplayName('Demolition Costs Occur During Initial Construction')
151
- demo_cost_initial_const.setDefaultValue(false)
152
- args << demo_cost_initial_const
153
-
154
- # make an argument for expected life
155
- expected_life = OpenStudio::Measure::OSArgument.makeIntegerArgument('expected_life', true)
156
- expected_life.setDisplayName('Expected Life')
157
- expected_life.setUnits('whole years')
158
- expected_life.setDefaultValue(20)
159
- args << expected_life
160
-
161
- # make an argument for o&m cost
162
- om_cost = OpenStudio::Measure::OSArgument.makeDoubleArgument('om_cost', true)
163
- om_cost.setDisplayName('O & M Costs per Space for Daylight Sensor')
164
- om_cost.setUnits('$')
165
- om_cost.setDefaultValue(0.0)
166
- args << om_cost
167
-
168
- # make an argument for o&m frequency
169
- om_frequency = OpenStudio::Measure::OSArgument.makeIntegerArgument('om_frequency', true)
170
- om_frequency.setDisplayName('O & M Frequency')
171
- om_frequency.setUnits('whole years')
172
- om_frequency.setDefaultValue(1)
173
- args << om_frequency
174
-
175
- return args
176
- end
177
-
178
- # define what happens when the measure is run
179
- def run(model, runner, user_arguments)
180
- super(model, runner, user_arguments)
181
-
182
- # use the built-in error checking
183
- if !runner.validateUserArguments(arguments(model), user_arguments)
184
- return false
185
- end
186
-
187
- # assign the user inputs to variables
188
- space_type = runner.getOptionalWorkspaceObjectChoiceValue('space_type', user_arguments, model)
189
- setpoint = runner.getDoubleArgumentValue('setpoint', user_arguments)
190
- control_type = runner.getStringArgumentValue('control_type', user_arguments)
191
- min_power_fraction = runner.getDoubleArgumentValue('min_power_fraction', user_arguments)
192
- min_light_fraction = runner.getDoubleArgumentValue('min_light_fraction', user_arguments)
193
- fraction_zone_controlled = runner.getDoubleArgumentValue('fraction_zone_controlled', user_arguments)
194
- height = runner.getDoubleArgumentValue('height', user_arguments)
195
- material_cost = runner.getDoubleArgumentValue('material_cost', user_arguments)
196
- demolition_cost = runner.getDoubleArgumentValue('demolition_cost', user_arguments)
197
- years_until_costs_start = runner.getIntegerArgumentValue('years_until_costs_start', user_arguments)
198
- demo_cost_initial_const = runner.getBoolArgumentValue('demo_cost_initial_const', user_arguments)
199
- expected_life = runner.getIntegerArgumentValue('expected_life', user_arguments)
200
- om_cost = runner.getDoubleArgumentValue('om_cost', user_arguments)
201
- om_frequency = runner.getIntegerArgumentValue('om_frequency', user_arguments)
202
-
203
- # check the space_type for reasonableness
204
- if space_type.empty?
205
- handle = runner.getStringArgumentValue('space_type', user_arguments)
206
- if handle.empty?
207
- runner.registerError('No SpaceType was chosen.')
208
- else
209
- runner.registerError("The selected space type with handle '#{handle}' was not found in the model. It may have been removed by another measure.")
210
- end
211
- return false
212
- else
213
- if !space_type.get.to_SpaceType.empty?
214
- space_type = space_type.get.to_SpaceType.get
215
- else
216
- runner.registerError('Script Error - argument not showing up as space type.')
217
- return false
218
- end
219
- end
220
-
221
- # check the setpoint for reasonableness
222
- if (setpoint < 0) || (setpoint > 9999) # dfg need input on good value
223
- runner.registerError("A setpoint of #{setpoint} foot-candles is outside the measure limit.")
224
- return false
225
- elsif setpoint > 999
226
- runner.registerWarning("A setpoint of #{setpoint} foot-candles is abnormally high.") # dfg need input on good value
227
- end
228
-
229
- # check the min_power_fraction for reasonableness
230
- if (min_power_fraction < 0.0) || (min_power_fraction > 0.6)
231
- runner.registerError("The requested minimum input power fraction of #{min_power_fraction} for continuous dimming control is outside the acceptable range of 0 to 0.6.")
232
- return false
233
- end
234
-
235
- # check the min_light_fraction for reasonableness
236
- if (min_light_fraction < 0.0) || (min_light_fraction > 0.6)
237
- runner.registerError("The requested minimum light output fraction of #{min_light_fraction} for continuous dimming control is outside the acceptable range of 0 to 0.6.")
238
- return false
239
- end
240
-
241
- # check the height for reasonableness
242
- if (height < -360) || (height > 360) # neg ok because space origin may not be floor
243
- runner.registerError("A setpoint of #{height} inches is outside the measure limit.")
244
- return false
245
- elsif height > 72
246
- runner.registerWarning("A setpoint of #{height} inches is abnormally high.")
247
- elseif height < 0
248
- runner.registerWarning('Typically the sensor height should be a positive number, however if your space origin is above the floor then a negative sensor height may be approriate.')
249
- end
250
-
251
- # set flags to use later
252
- costs_requested = false
253
- warning_cost_assign_to_space = false
254
-
255
- # check costs for reasonableness
256
- if material_cost.abs + demolition_cost.abs + om_cost.abs == 0
257
- runner.registerInfo('No costs were requested for Daylight Sensors.')
258
- else
259
- costs_requested = true
260
- end
261
-
262
- # check lifecycle arguments for reasonableness
263
- if (years_until_costs_start < 0) && (years_until_costs_start > expected_life)
264
- runner.registerError('Years until costs start should be a non-negative integer less than Expected Life.')
265
- end
266
- if (expected_life < 1) && (expected_life > 100)
267
- runner.registerError('Choose an integer greater than 0 and less than or equal to 100 for Expected Life.')
268
- end
269
- if om_frequency < 1
270
- runner.registerError('Choose an integer greater than 0 for O & M Frequency.')
271
- end
272
-
273
- # short def to make numbers pretty (converts 4125001.25641 to 4,125,001.26 or 4,125,001). The definition be called through this measure
274
- def neat_numbers(number, roundto = 2) # round to 0 or 2)
275
- if roundto == 2
276
- number = format '%.2f', number
277
- else
278
- number = number.round
279
- end
280
- # regex to add commas
281
- number.to_s.reverse.gsub(/([0-9]{3}(?=([0-9])))/, '\\1,').reverse
282
- end
283
-
284
- # helper that loops through lifecycle costs getting total costs under "Construction" or "Salvage" category and add to counter if occurs during year 0
285
- def get_total_costs_for_objects(objects)
286
- counter = 0
287
- objects.each do |object|
288
- object_LCCs = object.lifeCycleCosts
289
- object_LCCs.each do |object_LCC|
290
- if (object_LCC.category == 'Construction') || (object_LCC.category == 'Salvage')
291
- if object_LCC.yearsFromStart == 0
292
- counter += object_LCC.totalCost
293
- end
294
- end
295
- end
296
- end
297
- return counter
298
- end
299
-
300
- # unit conversion from IP units to SI units
301
- setpoint_si = OpenStudio.convert(setpoint, 'fc', 'lux').get
302
- height_si = OpenStudio.convert(height, 'in', 'm').get
303
-
304
- # variable to tally the area to which the overall measure is applied
305
- area = 0
306
- # variables to aggregate the number of sensors installed and the area affected
307
- sensor_count = 0
308
- sensor_area = 0
309
- spaces_using_space_type = space_type.spaces
310
- # array with subset of spaces
311
- spaces_using_space_type_in_zones_without_sensors = []
312
- affected_zones = []
313
- affected_zone_names = []
314
- # hash to hold sensor objects
315
- new_sensor_objects = {}
316
-
317
- # reporting initial condition of model
318
- starting_spaces = model.getSpaces
319
- runner.registerInitialCondition("#{spaces_using_space_type.size} spaces are assigned to space type '#{space_type.name}'.")
320
-
321
- # get starting costs for spaces
322
- yr0_capital_totalCosts = -1 * get_total_costs_for_objects(spaces_using_space_type)
323
-
324
- # test that there is no sensor already in the space, and that zone object doesn't already have sensors assigned.
325
- spaces_using_space_type.each do |space_using_space_type|
326
- if space_using_space_type.daylightingControls.empty?
327
- space_zone = space_using_space_type.thermalZone
328
- if !space_zone.empty?
329
- space_zone = space_zone.get
330
- if space_zone.primaryDaylightingControl.empty? && space_zone.secondaryDaylightingControl.empty?
331
- spaces_using_space_type_in_zones_without_sensors << space_using_space_type
332
- elsif
333
- runner.registerWarning("Thermal zone '#{space_zone.name}' which includes space '#{space_using_space_type.name}' already had a daylighting sensor. No sensor was added to space '#{space_using_space_type.name}'.")
334
- end
335
- else
336
- runner.registerWarning("Space '#{space_using_space_type.name}' is not associated with a thermal zone. It won't be part of the EnergyPlus simulation.")
337
- end
338
- else
339
- runner.registerWarning("Space '#{space_using_space_type.name}' already has a daylighting sensor. No sensor was added.")
340
- end
341
- end
342
-
343
- # loop through all spaces,
344
- # and add a daylighting sensor with dimming to each
345
- space_count = 0
346
- spaces_using_space_type_in_zones_without_sensors.each do |space|
347
- space_count += 1
348
- area += space.floorArea
349
-
350
- # eliminate spaces that don't have exterior natural lighting
351
- has_ext_nat_light = false
352
- space.surfaces.each do |surface|
353
- next if surface.outsideBoundaryCondition != 'Outdoors'
354
- surface.subSurfaces.each do |sub_surface|
355
- next if sub_surface.subSurfaceType == 'Door'
356
- next if sub_surface.subSurfaceType == 'OverheadDoor'
357
- has_ext_nat_light = true
358
- end
359
- end
360
- if has_ext_nat_light == false
361
- runner.registerWarning("Space '#{space.name}' has no exterior natural lighting. No sensor will be added.")
362
- next
363
- end
364
-
365
- # find floors
366
- floors = []
367
- space.surfaces.each do |surface|
368
- next if surface.surfaceType != 'Floor'
369
- floors << surface
370
- end
371
-
372
- # this method only works for flat (non-inclined) floors
373
- boundingBox = OpenStudio::BoundingBox.new
374
- floors.each do |floor|
375
- boundingBox.addPoints(floor.vertices)
376
- end
377
- xmin = boundingBox.minX.get
378
- ymin = boundingBox.minY.get
379
- zmin = boundingBox.minZ.get
380
- xmax = boundingBox.maxX.get
381
- ymax = boundingBox.maxY.get
382
-
383
- # create a new sensor and put at the center of the space
384
- sensor = OpenStudio::Model::DaylightingControl.new(model)
385
- sensor.setName("#{space.name} daylighting control")
386
- x_pos = (xmin + xmax) / 2
387
- y_pos = (ymin + ymax) / 2
388
- z_pos = zmin + height_si # put it 1 meter above the floor
389
- new_point = OpenStudio::Point3d.new(x_pos, y_pos, z_pos)
390
- sensor.setPosition(new_point)
391
- sensor.setIlluminanceSetpoint(setpoint_si)
392
- sensor.setLightingControlType(control_type)
393
- sensor.setMinimumInputPowerFractionforContinuousDimmingControl(min_power_fraction)
394
- sensor.setMinimumLightOutputFractionforContinuousDimmingControl(min_light_fraction)
395
- sensor.setSpace(space)
396
- puts sensor
397
-
398
- # add lifeCycleCost objects if there is a non-zero value in one of the cost arguments
399
- if costs_requested == true
400
-
401
- starting_lcc_counter = space.lifeCycleCosts.size
402
-
403
- # adding new cost items
404
- lcc_mat = OpenStudio::Model::LifeCycleCost.createLifeCycleCost("LCC_Mat - #{sensor.name}", space, material_cost, 'CostPerEach', 'Construction', expected_life, years_until_costs_start)
405
- if demo_cost_initial_const
406
- lcc_demo = OpenStudio::Model::LifeCycleCost.createLifeCycleCost("LCC_Demo - #{sensor.name}", space, demolition_cost, 'CostPerEach', 'Salvage', expected_life, years_until_costs_start)
407
- else
408
- lcc_demo = OpenStudio::Model::LifeCycleCost.createLifeCycleCost("LCC_Demo - #{sensor.name}", space, demolition_cost, 'CostPerEach', 'Salvage', expected_life, years_until_costs_start + expected_life)
409
- end
410
- lcc_om = OpenStudio::Model::LifeCycleCost.createLifeCycleCost("LCC_OM - #{sensor.name}", space, om_cost, 'CostPerEach', 'Maintenance', om_frequency, 0)
411
-
412
- if space.lifeCycleCosts.size - starting_lcc_counter == 3
413
- if !warning_cost_assign_to_space
414
- runner.registerInfo('Cost for daylight sensors was added to spaces. The cost will remain in the model unless the space is removed. Removing only the sensor will not remove the cost.')
415
- warning_cost_assign_to_space = true
416
- end
417
- else
418
- runner.registerWarning("The measure did not function as expected. #{space.lifeCycleCosts.size - starting_lcc_counter} LifeCycleCost objects were made, 3 were expected.")
419
- end
420
-
421
- end
422
-
423
- # push unique zones to array for use later in measure
424
- temp_zone = space.thermalZone.get
425
- if affected_zone_names.include?(temp_zone.name.to_s) == false
426
- affected_zones << temp_zone
427
- affected_zone_names << temp_zone.name.to_s
428
- end
429
-
430
- # push sensor object into hash with space name
431
- new_sensor_objects[space.name.to_s] = sensor
432
-
433
- # add floor area to the daylighting area tally
434
- sensor_area += space.floorArea
435
-
436
- # add to sensor count for reporting
437
- sensor_count += 1
438
- end
439
-
440
- if (sensor_count == 0) && (costs_requested == false)
441
- runner.registerAsNotApplicable("No spaces that currently don't have sensor required a new sensor, and no lifecycle costs objects were requested.")
442
- return true
443
- end
444
-
445
- # loop through thermal Zones for spaces with daylighting controls added
446
- affected_zones.each do |zone|
447
- zone_spaces = zone.spaces
448
- zone_spaces_with_new_sensors = []
449
- zone_spaces.each do |zone_space|
450
- if !zone_space.daylightingControls.empty? && (zone_space.spaceType.get == space_type)
451
- zone_spaces_with_new_sensors << zone_space
452
- end
453
- end
454
-
455
- if !zone_spaces_with_new_sensors.empty?
456
- # need to identify the two largest spaces
457
- primary_area = 0
458
- secondary_area = 0
459
- primary_space = nil
460
- secondary_space = nil
461
- three_or_more_sensors = false
462
-
463
- # dfg temp - need to add another if statement so only get spaces with sensors
464
- zone_spaces_with_new_sensors.each do |zone_space|
465
- zone_space_area = zone_space.floorArea
466
- if zone_space_area > primary_area
467
- primary_area = zone_space_area
468
- primary_space = zone_space
469
- elsif zone_space_area > secondary_area
470
- secondary_area = zone_space_area
471
- secondary_space = zone_space
472
- else
473
- # setup flag to warn user that more than 2 sensors can't be added to a space
474
- three_or_more_sensors = true
475
- end
476
- end
477
-
478
- if primary_space
479
- # setup primary sensor
480
- sensor_primary = new_sensor_objects[primary_space.name.to_s]
481
- zone.setPrimaryDaylightingControl(sensor_primary)
482
- zone.setFractionofZoneControlledbyPrimaryDaylightingControl(fraction_zone_controlled * primary_area / (primary_area + secondary_area))
483
- end
484
-
485
- if secondary_space
486
- # setup secondary sensor
487
- sensor_secondary = new_sensor_objects[secondary_space.name.to_s]
488
- zone.setSecondaryDaylightingControl(sensor_secondary)
489
- zone.setFractionofZoneControlledbySecondaryDaylightingControl(fraction_zone_controlled * secondary_area / (primary_area + secondary_area))
490
- end
491
-
492
- # warn that additional sensors were not used
493
- if three_or_more_sensors == true
494
- runner.registerWarning("Thermal zone '#{zone.name}' had more than two spaces with sensors. Only two sensors were associated with the thermal zone.")
495
- end
496
-
497
- end
498
- end
499
-
500
- # setup OpenStudio units that we will need
501
- unit_area_ip = OpenStudio.createUnit('ft^2').get
502
- unit_area_si = OpenStudio.createUnit('m^2').get
503
-
504
- # define starting units
505
- area_si = OpenStudio::Quantity.new(sensor_area, unit_area_si)
506
-
507
- # unit conversion from IP units to SI units
508
- area_ip = OpenStudio.convert(area_si, unit_area_ip).get
509
-
510
- # get final costs for spaces
511
- yr0_capital_totalCosts = get_total_costs_for_objects(spaces_using_space_type)
512
-
513
- # reporting final condition of model
514
- runner.registerFinalCondition("Added daylighting controls to #{sensor_count} spaces, covering #{area_ip}. Initial year costs associated with the daylighting controls is $#{neat_numbers(yr0_capital_totalCosts, 0)}.")
515
-
516
- return true
517
- end
518
- end
519
-
520
- # this allows the measure to be used by the application
521
- AddDaylightSensors.new.registerWithApplication