openstudio-model-articulation 0.9.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (130) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -3
  3. data/Gemfile +12 -5
  4. data/Jenkinsfile +1 -1
  5. data/LICENSE.md +1 -1
  6. data/README.md +2 -0
  7. data/lib/measures/AssignConstructionSetToBuilding/LICENSE.md +1 -1
  8. data/lib/measures/AssignConstructionSetToBuilding/measure.xml +21 -21
  9. data/lib/measures/AssignSpaceTypeBySpaceName/LICENSE.md +1 -1
  10. data/lib/measures/AssignSpaceTypeBySpaceName/measure.xml +37 -37
  11. data/lib/measures/AssignSpaceTypeToBuilding/LICENSE.md +1 -1
  12. data/lib/measures/AssignSpaceTypeToBuilding/measure.xml +21 -21
  13. data/lib/measures/AssignSpacesToStories/LICENSE.md +1 -1
  14. data/lib/measures/AssignSpacesToStories/measure.xml +17 -17
  15. data/lib/measures/BarAspectRatioStudy/LICENSE.md +1 -1
  16. data/lib/measures/BarAspectRatioStudy/measure.xml +11 -11
  17. data/lib/measures/CleanupSpaceOrigins/LICENSE.md +1 -1
  18. data/lib/measures/CleanupSpaceOrigins/measure.xml +17 -17
  19. data/lib/measures/FindAndReplaceObjectNames/LICENSE.md +1 -1
  20. data/lib/measures/FindAndReplaceObjectNames/measure.xml +17 -17
  21. data/lib/measures/InjectOsmGeometryIntoAnExternalIdf/LICENSE.md +1 -1
  22. data/lib/measures/InjectOsmGeometryIntoAnExternalIdf/measure.xml +54 -54
  23. data/lib/measures/RemoveHardAssignedConstructions/LICENSE.md +1 -1
  24. data/lib/measures/RemoveHardAssignedConstructions/measure.xml +17 -17
  25. data/lib/measures/RenameSpaceSurfacesBasedonParentSpaceandOrientation/LICENSE.md +1 -1
  26. data/lib/measures/RenameSpaceSurfacesBasedonParentSpaceandOrientation/measure.xml +40 -40
  27. data/lib/measures/RotateBuilding/LICENSE.md +1 -1
  28. data/lib/measures/RotateBuilding/measure.xml +19 -19
  29. data/lib/measures/SetExtWallToGroundBoundaryConditionByStory/LICENSE.md +1 -1
  30. data/lib/measures/SetExtWallToGroundBoundaryConditionByStory/measure.xml +21 -21
  31. data/lib/measures/SetInteriorWallsAndFloorsToAdiabatic/LICENSE.md +1 -1
  32. data/lib/measures/SetInteriorWallsAndFloorsToAdiabatic/measure.xml +17 -17
  33. data/lib/measures/SetInteriorWallsToSelectedConstruction/LICENSE.md +1 -1
  34. data/lib/measures/SetInteriorWallsToSelectedConstruction/measure.xml +17 -17
  35. data/lib/measures/SetWindowToWallRatioByFacade/LICENSE.md +1 -1
  36. data/lib/measures/SetWindowToWallRatioByFacade/measure.xml +46 -46
  37. data/lib/measures/SimplifyGeometryToSlicedBar/LICENSE.md +1 -1
  38. data/lib/measures/SimplifyGeometryToSlicedBar/measure.rb +32 -37
  39. data/lib/measures/SimplifyGeometryToSlicedBar/measure.xml +34 -80
  40. data/lib/measures/SimplifyGeometryToSlicedBar/resources/os_lib_cofee.rb +10 -9
  41. data/lib/measures/SpaceTypeAndConstructionSetWizard/LICENSE.md +1 -1
  42. data/lib/measures/SpaceTypeAndConstructionSetWizard/measure.rb +10 -13
  43. data/lib/measures/SpaceTypeAndConstructionSetWizard/measure.xml +28 -28
  44. data/lib/measures/SurfaceMatching/LICENSE.md +1 -1
  45. data/lib/measures/SurfaceMatching/measure.xml +17 -17
  46. data/lib/measures/add_empd_material_properties/LICENSE.md +1 -1
  47. data/lib/measures/add_empd_material_properties/measure.xml +27 -27
  48. data/lib/measures/blended_space_type_from_floor_area_ratios/LICENSE.md +1 -1
  49. data/lib/measures/blended_space_type_from_floor_area_ratios/measure.rb +31 -14
  50. data/lib/measures/blended_space_type_from_floor_area_ratios/measure.xml +36 -36
  51. data/lib/measures/blended_space_type_from_model/LICENSE.md +1 -1
  52. data/lib/measures/blended_space_type_from_model/measure.rb +12 -5
  53. data/lib/measures/blended_space_type_from_model/measure.xml +47 -47
  54. data/lib/measures/clone_building_from_external_model/LICENSE.md +1 -1
  55. data/lib/measures/clone_building_from_external_model/measure.xml +23 -23
  56. data/lib/measures/create_DOE_prototype_building/LICENSE.md +1 -1
  57. data/lib/measures/create_DOE_prototype_building/measure.rb +1 -1
  58. data/lib/measures/create_DOE_prototype_building/measure.xml +19 -875
  59. data/lib/measures/create_and_assign_thermal_zones_for_unassigned_spaces/LICENSE.md +1 -1
  60. data/lib/measures/create_and_assign_thermal_zones_for_unassigned_spaces/measure.xml +13 -13
  61. data/lib/measures/create_bar_from_building_type_ratios/LICENSE.md +1 -1
  62. data/lib/measures/create_bar_from_building_type_ratios/README.md +2 -13
  63. data/lib/measures/create_bar_from_building_type_ratios/measure.rb +122 -30
  64. data/lib/measures/create_bar_from_building_type_ratios/measure.xml +108 -349
  65. data/lib/measures/create_bar_from_deer_building_type_ratios/LICENSE.md +1 -1
  66. data/lib/measures/create_bar_from_deer_building_type_ratios/README.md +21 -1
  67. data/lib/measures/create_bar_from_deer_building_type_ratios/measure.rb +120 -18
  68. data/lib/measures/create_bar_from_deer_building_type_ratios/measure.xml +94 -32
  69. data/lib/measures/create_bar_from_doe_building_type_ratios/LICENSE.md +1 -1
  70. data/lib/measures/create_bar_from_doe_building_type_ratios/measure.rb +127 -18
  71. data/lib/measures/create_bar_from_doe_building_type_ratios/measure.xml +48 -26
  72. data/lib/measures/create_bar_from_model/LICENSE.md +1 -1
  73. data/lib/measures/create_bar_from_model/measure.rb +17 -18
  74. data/lib/measures/create_bar_from_model/measure.xml +41 -41
  75. data/lib/measures/create_bar_from_space_type_ratios/LICENSE.md +1 -1
  76. data/lib/measures/create_bar_from_space_type_ratios/README.md +1 -1
  77. data/lib/measures/create_bar_from_space_type_ratios/measure.rb +94 -14
  78. data/lib/measures/create_bar_from_space_type_ratios/measure.xml +104 -63
  79. data/lib/measures/create_baseline_building/LICENSE.md +1 -1
  80. data/lib/measures/create_baseline_building/measure.xml +35 -35
  81. data/lib/measures/create_deer_prototype_building/LICENSE.md +1 -1
  82. data/lib/measures/create_deer_prototype_building/measure.xml +17 -17
  83. data/lib/measures/create_parametric_schedules/LICENSE.md +1 -1
  84. data/lib/measures/create_parametric_schedules/measure.rb +17 -20
  85. data/lib/measures/create_parametric_schedules/measure.xml +15 -15
  86. data/lib/measures/create_typical_building_from_model/LICENSE.md +1 -1
  87. data/lib/measures/create_typical_building_from_model/README.md +16 -16
  88. data/lib/measures/create_typical_building_from_model/measure.rb +84 -18
  89. data/lib/measures/create_typical_building_from_model/measure.xml +159 -211
  90. data/lib/measures/create_typical_deer_building_from_model/LICENSE.md +1 -1
  91. data/lib/measures/create_typical_deer_building_from_model/README.md +38 -5
  92. data/lib/measures/create_typical_deer_building_from_model/measure.rb +84 -12
  93. data/lib/measures/create_typical_deer_building_from_model/measure.xml +165 -65
  94. data/lib/measures/create_typical_doe_building_from_model/LICENSE.md +1 -1
  95. data/lib/measures/create_typical_doe_building_from_model/README.md +17 -4
  96. data/lib/measures/create_typical_doe_building_from_model/measure.rb +84 -12
  97. data/lib/measures/create_typical_doe_building_from_model/measure.xml +125 -65
  98. data/lib/measures/deer_space_type_and_construction_set_wizard/LICENSE.md +1 -1
  99. data/lib/measures/deer_space_type_and_construction_set_wizard/measure.rb +13 -16
  100. data/lib/measures/deer_space_type_and_construction_set_wizard/measure.xml +72 -29
  101. data/lib/measures/find_and_replace_in_all_thermal_zone_names/LICENSE.md +1 -1
  102. data/lib/measures/find_and_replace_in_all_thermal_zone_names/measure.xml +17 -17
  103. data/lib/measures/make_shading_surfaces_based_on_zone_multipliers/LICENSE.md +1 -1
  104. data/lib/measures/make_shading_surfaces_based_on_zone_multipliers/measure.rb +4 -4
  105. data/lib/measures/make_shading_surfaces_based_on_zone_multipliers/measure.xml +21 -21
  106. data/lib/measures/merge_floorspace_js_with_model/LICENSE.md +1 -1
  107. data/lib/measures/merge_floorspace_js_with_model/measure.xml +29 -29
  108. data/lib/measures/merge_spaces_from_external_file/LICENSE.md +1 -1
  109. data/lib/measures/merge_spaces_from_external_file/measure.rb +4 -4
  110. data/lib/measures/merge_spaces_from_external_file/measure.xml +34 -34
  111. data/lib/measures/radiance_measure/LICENSE.md +1 -1
  112. data/lib/measures/radiance_measure/measure.rb +3 -3
  113. data/lib/measures/radiance_measure/measure.xml +29 -29
  114. data/lib/measures/radiant_slab_with_doas/LICENSE.md +1 -1
  115. data/lib/measures/radiant_slab_with_doas/measure.rb +2 -2
  116. data/lib/measures/radiant_slab_with_doas/measure.xml +5 -5
  117. data/lib/measures/replace_geometry_by_story/LICENSE.md +1 -1
  118. data/lib/measures/replace_geometry_by_story/measure.rb +6 -10
  119. data/lib/measures/replace_geometry_by_story/measure.xml +19 -19
  120. data/lib/measures/scale_geometry/LICENSE.md +1 -1
  121. data/lib/measures/scale_geometry/measure.xml +11 -11
  122. data/lib/measures/set_nist_infiltration_correlations/LICENSE.md +7 -21
  123. data/lib/measures/set_nist_infiltration_correlations/measure.rb +2 -32
  124. data/lib/measures/set_nist_infiltration_correlations/measure.xml +5 -5
  125. data/lib/openstudio/model_articulation/version.rb +1 -1
  126. data/openstudio-model-articulation.gemspec +10 -4
  127. metadata +55 -16
  128. data/lib/measures/SimplifyGeometryToSlicedBar/resources/os_lib_geometry.rb +0 -1174
  129. data/lib/measures/SimplifyGeometryToSlicedBar/resources/os_lib_helper_methods.rb +0 -367
  130. data/lib/measures/create_typical_building_from_model/resources/Model.hvac.rb +0 -608
@@ -1,10 +1,10 @@
1
1
  <?xml version="1.0"?>
2
2
  <measure>
3
- <schema_version>3.0</schema_version>
3
+ <schema_version>3.1</schema_version>
4
4
  <name>set_interior_walls_and_floors_to_adiabatic</name>
5
5
  <uid>78cbde97-d7c4-425f-ab74-5053a681cc4b</uid>
6
- <version_id>fd9711e4-f378-4c10-b0dd-783201fc47ce</version_id>
7
- <version_modified>20230602T160045Z</version_modified>
6
+ <version_id>b53d69f3-2881-49b1-a6e9-1343d3422144</version_id>
7
+ <version_modified>2024-11-16T23:56:36Z</version_modified>
8
8
  <xml_checksum>1E963D9C</xml_checksum>
9
9
  <class_name>SetInteriorWallsAndFloorsToAdiabatic</class_name>
10
10
  <display_name>SetInteriorWallsAndFloorsToAdiabatic</display_name>
@@ -38,16 +38,10 @@
38
38
  </attributes>
39
39
  <files>
40
40
  <file>
41
- <filename>EnvelopeAndLoadTestModel_01.osm</filename>
42
- <filetype>osm</filetype>
43
- <usage_type>test</usage_type>
44
- <checksum>10AA8866</checksum>
45
- </file>
46
- <file>
47
- <filename>README.md.erb</filename>
48
- <filetype>erb</filetype>
49
- <usage_type>readmeerb</usage_type>
50
- <checksum>703C9964</checksum>
41
+ <filename>LICENSE.md</filename>
42
+ <filetype>md</filetype>
43
+ <usage_type>license</usage_type>
44
+ <checksum>8696A072</checksum>
51
45
  </file>
52
46
  <file>
53
47
  <filename>README.md</filename>
@@ -56,10 +50,10 @@
56
50
  <checksum>26905DFE</checksum>
57
51
  </file>
58
52
  <file>
59
- <filename>LICENSE.md</filename>
60
- <filetype>md</filetype>
61
- <usage_type>license</usage_type>
62
- <checksum>BFFB1AA6</checksum>
53
+ <filename>README.md.erb</filename>
54
+ <filetype>erb</filetype>
55
+ <usage_type>readmeerb</usage_type>
56
+ <checksum>703C9964</checksum>
63
57
  </file>
64
58
  <file>
65
59
  <version>
@@ -72,6 +66,12 @@
72
66
  <usage_type>script</usage_type>
73
67
  <checksum>219E804C</checksum>
74
68
  </file>
69
+ <file>
70
+ <filename>EnvelopeAndLoadTestModel_01.osm</filename>
71
+ <filetype>osm</filetype>
72
+ <usage_type>test</usage_type>
73
+ <checksum>10AA8866</checksum>
74
+ </file>
75
75
  <file>
76
76
  <filename>SetInteriorWallsAndFloorsToSelectedConstruction_Test.rb</filename>
77
77
  <filetype>rb</filetype>
@@ -1,4 +1,4 @@
1
- OpenStudio(R), Copyright (c) 2008, 2023 Alliance for Sustainable Energy, LLC.
1
+ OpenStudio(R), Copyright (c) 2008, 2024 Alliance for Sustainable Energy, LLC.
2
2
 
3
3
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
4
 
@@ -1,10 +1,10 @@
1
1
  <?xml version="1.0"?>
2
2
  <measure>
3
- <schema_version>3.0</schema_version>
3
+ <schema_version>3.1</schema_version>
4
4
  <name>set_interior_walls_to_selected_construction</name>
5
5
  <uid>e3d59d0d-1ce8-4cb2-ae59-001f0fa2ac46</uid>
6
- <version_id>81540d5d-a4e1-4d79-83ca-431d7fb2dc3f</version_id>
7
- <version_modified>20230602T160041Z</version_modified>
6
+ <version_id>a7ee14a2-8c0d-422e-be6f-bf124bd0d3f4</version_id>
7
+ <version_modified>2024-11-16T23:56:33Z</version_modified>
8
8
  <xml_checksum>1E963D9C</xml_checksum>
9
9
  <class_name>SetInteriorWallsToSelectedConstruction</class_name>
10
10
  <display_name>SetInteriorWallsToSelectedConstruction</display_name>
@@ -38,16 +38,10 @@
38
38
  </attributes>
39
39
  <files>
40
40
  <file>
41
- <filename>EnvelopeAndLoadTestModel_01.osm</filename>
42
- <filetype>osm</filetype>
43
- <usage_type>test</usage_type>
44
- <checksum>10AA8866</checksum>
45
- </file>
46
- <file>
47
- <filename>README.md.erb</filename>
48
- <filetype>erb</filetype>
49
- <usage_type>readmeerb</usage_type>
50
- <checksum>703C9964</checksum>
41
+ <filename>LICENSE.md</filename>
42
+ <filetype>md</filetype>
43
+ <usage_type>license</usage_type>
44
+ <checksum>8696A072</checksum>
51
45
  </file>
52
46
  <file>
53
47
  <filename>README.md</filename>
@@ -56,10 +50,10 @@
56
50
  <checksum>C8974F9D</checksum>
57
51
  </file>
58
52
  <file>
59
- <filename>LICENSE.md</filename>
60
- <filetype>md</filetype>
61
- <usage_type>license</usage_type>
62
- <checksum>BFFB1AA6</checksum>
53
+ <filename>README.md.erb</filename>
54
+ <filetype>erb</filetype>
55
+ <usage_type>readmeerb</usage_type>
56
+ <checksum>703C9964</checksum>
63
57
  </file>
64
58
  <file>
65
59
  <version>
@@ -72,6 +66,12 @@
72
66
  <usage_type>script</usage_type>
73
67
  <checksum>8CADC814</checksum>
74
68
  </file>
69
+ <file>
70
+ <filename>EnvelopeAndLoadTestModel_01.osm</filename>
71
+ <filetype>osm</filetype>
72
+ <usage_type>test</usage_type>
73
+ <checksum>10AA8866</checksum>
74
+ </file>
75
75
  <file>
76
76
  <filename>SetInteriorWallstoSelectedConstruction_Test.rb</filename>
77
77
  <filetype>rb</filetype>
@@ -1,4 +1,4 @@
1
- OpenStudio(R), Copyright (c) 2008, 2023 Alliance for Sustainable Energy, LLC.
1
+ OpenStudio(R), Copyright (c) 2008, 2024 Alliance for Sustainable Energy, LLC.
2
2
 
3
3
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
4
 
@@ -1,10 +1,10 @@
1
1
  <?xml version="1.0"?>
2
2
  <measure>
3
- <schema_version>3.0</schema_version>
3
+ <schema_version>3.1</schema_version>
4
4
  <name>set_window_to_wall_ratio_by_facade</name>
5
5
  <uid>c567a0bf-a7d9-4a06-afe9-bf7df79e6bf8</uid>
6
- <version_id>f92b9832-7215-4264-a35c-244e30665282</version_id>
7
- <version_modified>20230602T160042Z</version_modified>
6
+ <version_id>cfcbe959-1852-4cda-9f38-2c3d194eff03</version_id>
7
+ <version_modified>2024-11-16T23:56:34Z</version_modified>
8
8
  <xml_checksum>6DE831F7</xml_checksum>
9
9
  <class_name>SetWindowToWallRatioByFacade</class_name>
10
10
  <display_name>Set Window to Wall Ratio by Facade</display_name>
@@ -192,28 +192,16 @@ The measure doesn?t have any cost or lifecycle arguments, however If lifecycle o
192
192
  </attributes>
193
193
  <files>
194
194
  <file>
195
- <filename>EnvelopeAndLoadTestModel_02_RotatedSpaceAndBuilding.osm</filename>
196
- <filetype>osm</filetype>
197
- <usage_type>test</usage_type>
198
- <checksum>74A6EE8C</checksum>
199
- </file>
200
- <file>
201
- <filename>ReverseTranslatedModel.osm</filename>
202
- <filetype>osm</filetype>
203
- <usage_type>test</usage_type>
204
- <checksum>0B94403D</checksum>
205
- </file>
206
- <file>
207
- <filename>EnvelopeAndLoadTestModel_01.osm</filename>
208
- <filetype>osm</filetype>
209
- <usage_type>test</usage_type>
210
- <checksum>3956B3D1</checksum>
195
+ <filename>LICENSE.md</filename>
196
+ <filetype>md</filetype>
197
+ <usage_type>license</usage_type>
198
+ <checksum>8696A072</checksum>
211
199
  </file>
212
200
  <file>
213
- <filename>Triangles.osm</filename>
214
- <filetype>osm</filetype>
215
- <usage_type>test</usage_type>
216
- <checksum>19169728</checksum>
201
+ <filename>README.md</filename>
202
+ <filetype>md</filetype>
203
+ <usage_type>readme</usage_type>
204
+ <checksum>7FCCDC8E</checksum>
217
205
  </file>
218
206
  <file>
219
207
  <filename>README.md.erb</filename>
@@ -222,22 +210,39 @@ The measure doesn?t have any cost or lifecycle arguments, however If lifecycle o
222
210
  <checksum>232D0477</checksum>
223
211
  </file>
224
212
  <file>
225
- <filename>prototype_sec_sch.osm</filename>
213
+ <version>
214
+ <software_program>OpenStudio</software_program>
215
+ <identifier>2.0.0</identifier>
216
+ <min_compatible>2.0.0</min_compatible>
217
+ </version>
218
+ <filename>measure.rb</filename>
219
+ <filetype>rb</filetype>
220
+ <usage_type>script</usage_type>
221
+ <checksum>339A1F15</checksum>
222
+ </file>
223
+ <file>
224
+ <filename>functions.rb</filename>
225
+ <filetype>rb</filetype>
226
+ <usage_type>resource</usage_type>
227
+ <checksum>B2F878E6</checksum>
228
+ </file>
229
+ <file>
230
+ <filename>EnvelopeAndLoadTestModel_01.osm</filename>
226
231
  <filetype>osm</filetype>
227
232
  <usage_type>test</usage_type>
228
- <checksum>581DA01B</checksum>
233
+ <checksum>3956B3D1</checksum>
229
234
  </file>
230
235
  <file>
231
- <filename>README.md</filename>
232
- <filetype>md</filetype>
233
- <usage_type>readme</usage_type>
234
- <checksum>7FCCDC8E</checksum>
236
+ <filename>EnvelopeAndLoadTestModel_02_RotatedSpaceAndBuilding.osm</filename>
237
+ <filetype>osm</filetype>
238
+ <usage_type>test</usage_type>
239
+ <checksum>74A6EE8C</checksum>
235
240
  </file>
236
241
  <file>
237
- <filename>LICENSE.md</filename>
238
- <filetype>md</filetype>
239
- <usage_type>license</usage_type>
240
- <checksum>BFFB1AA6</checksum>
242
+ <filename>ReverseTranslatedModel.osm</filename>
243
+ <filetype>osm</filetype>
244
+ <usage_type>test</usage_type>
245
+ <checksum>0B94403D</checksum>
241
246
  </file>
242
247
  <file>
243
248
  <filename>SetWindowToWallRatioByFacade_Test.rb</filename>
@@ -246,21 +251,16 @@ The measure doesn?t have any cost or lifecycle arguments, however If lifecycle o
246
251
  <checksum>BA84B8F3</checksum>
247
252
  </file>
248
253
  <file>
249
- <version>
250
- <software_program>OpenStudio</software_program>
251
- <identifier>2.0.0</identifier>
252
- <min_compatible>2.0.0</min_compatible>
253
- </version>
254
- <filename>measure.rb</filename>
255
- <filetype>rb</filetype>
256
- <usage_type>script</usage_type>
257
- <checksum>339A1F15</checksum>
254
+ <filename>Triangles.osm</filename>
255
+ <filetype>osm</filetype>
256
+ <usage_type>test</usage_type>
257
+ <checksum>19169728</checksum>
258
258
  </file>
259
259
  <file>
260
- <filename>functions.rb</filename>
261
- <filetype>rb</filetype>
262
- <usage_type>resource</usage_type>
263
- <checksum>B2F878E6</checksum>
260
+ <filename>prototype_sec_sch.osm</filename>
261
+ <filetype>osm</filetype>
262
+ <usage_type>test</usage_type>
263
+ <checksum>581DA01B</checksum>
264
264
  </file>
265
265
  </files>
266
266
  </measure>
@@ -1,4 +1,4 @@
1
- OpenStudio(R), Copyright (c) 2008, 2023 Alliance for Sustainable Energy, LLC.
1
+ OpenStudio(R), Copyright (c) 2008, 2024 Alliance for Sustainable Energy, LLC.
2
2
 
3
3
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
4
 
@@ -12,10 +12,8 @@
12
12
  # see the URL below for access to C++ documentation on model objects (click on "model" in the main window to view model objects)
13
13
  # http://openstudio.nrel.gov/sites/openstudio.nrel.gov/files/nv_data/cpp_documentation_it/model/html/namespaces.html
14
14
 
15
- # load OpenStudio measure libraries from openstudio-extension gem
16
- require 'openstudio-extension'
17
- require 'openstudio/extension/core/os_lib_helper_methods'
18
- require 'openstudio/extension/core/os_lib_geometry'
15
+ # load OpenStudio measure libraries from openstudio-standards gem
16
+ require 'openstudio-standards'
19
17
 
20
18
  # load OpenStudio measure libraries
21
19
  require "#{File.dirname(__FILE__)}/resources/os_lib_cofee"
@@ -78,8 +76,8 @@ class SimplifyGeometryToSlicedBar < OpenStudio::Measure::ModelMeasure
78
76
  # get total floor area for building
79
77
  building = model.getBuilding
80
78
  totalFloorArea = building.floorArea # TODO: - this doesn't include spaces tagged as not included in floor area. This would include spaces like plenums and attics
81
- runner.registerInfo("Initial Floor Area is #{OsLib_HelperMethods.neatConvertWithUnitDisplay(totalFloorArea, 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)}.")
82
-
79
+ runner.registerInfo("Initial Floor Area is #{OpenStudio.toNeatString(OpenStudio.convert(totalFloorArea, 'm^2', 'ft^2').get, 0, true)}.")
80
+
83
81
  # get get number of floors. Assume that user has properly used story object.
84
82
  numStories = 0
85
83
  stories = model.getBuildingStorys
@@ -108,15 +106,15 @@ class SimplifyGeometryToSlicedBar < OpenStudio::Measure::ModelMeasure
108
106
  spaceTypes.each do |spaceType|
109
107
  next if spaceType.spaces.empty?
110
108
 
111
- result = OsLib_HelperMethods.getAreaOfSpacesInArray(model, spaceType.spaces, areaType = 'floorArea')
112
- spaceTypeHash[spaceType] = result['totalArea']
113
- totalSpaceTypeArea += result['totalArea']
109
+ result = OpenstudioStandards::Geometry.spaces_get_floor_area(spaceType.spaces)
110
+ spaceTypeHash[spaceType] = result
111
+ totalSpaceTypeArea += result
114
112
  end
115
113
 
116
- runner.registerInfo("Initial Space Type Total Floor Area is #{OsLib_HelperMethods.neatConvertWithUnitDisplay(totalSpaceTypeArea, 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)}.")
114
+ runner.registerInfo("Initial Space Type Total Floor Area is #{OpenStudio.toNeatString(OpenStudio.convert(totalSpaceTypeArea, 'm^2', 'ft^2').get, 0, true)}.")
117
115
 
118
116
  spaceTypeHash.sort_by { |key, value| value }.reverse_each do |k, v|
119
- runner.registerInfo("Floor Area for #{k.name} is #{OsLib_HelperMethods.neatConvertWithUnitDisplay(v, 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)}.")
117
+ runner.registerInfo("Floor Area for #{k.name} is #{OpenStudio.toNeatString(OpenStudio.convert(v, 'm^2', 'ft^2').get, 0, true)}.")
120
118
  end
121
119
 
122
120
  # TODO: - warn if some spaces are not included in floor area (plenum and attic)
@@ -127,19 +125,18 @@ class SimplifyGeometryToSlicedBar < OpenStudio::Measure::ModelMeasure
127
125
  # todo - this measure wont' touch HVAC systems, consider warning user if model already has HVAC, as it won't be hooked up to anything after this.
128
126
 
129
127
  # get wall and window area by facade
130
- starting_spaces = model.getSpaces
131
- areaByFacade = OsLib_Geometry.getExteriorWindowAndWllAreaByOrientation(model, starting_spaces, options = {})
132
- northWallGross = OsLib_HelperMethods.neatConvertWithUnitDisplay(areaByFacade['northWall'], 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
133
- southWallGross = OsLib_HelperMethods.neatConvertWithUnitDisplay(areaByFacade['southWall'], 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
134
- eastWallGross = OsLib_HelperMethods.neatConvertWithUnitDisplay(areaByFacade['eastWall'], 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
135
- westWallGross = OsLib_HelperMethods.neatConvertWithUnitDisplay(areaByFacade['westWall'], 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
128
+ areaByFacade = OpenstudioStandards::Geometry.model_get_exterior_window_and_wall_area_by_orientation(model)
129
+ northWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['north_wall'], 'm^2', 'ft^2').get, 0, true)
130
+ southWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['south_wall'], 'm^2', 'ft^2').get, 0, true)
131
+ eastWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['east_wall'], 'm^2', 'ft^2').get, 0, true)
132
+ westWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['west_wall'], 'm^2', 'ft^2').get, 0, true)
136
133
  runner.registerInfo("Initial Exterior Wall Breakdown. North: #{northWallGross}, South: #{southWallGross}, East: #{eastWallGross}, West: #{westWallGross}")
137
134
 
138
135
  # reporting initial condition of model
139
- floorArea_si = OsLib_HelperMethods.getAreaOfSpacesInArray(model, starting_spaces, areaType = 'floorArea')['totalArea']
140
- floorArea_ip = OsLib_HelperMethods.neatConvertWithUnitDisplay(floorArea_si, 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
141
- exteriorArea_si = OsLib_HelperMethods.getAreaOfSpacesInArray(model, starting_spaces, areaType = 'exteriorWallArea')['totalArea']
142
- exteriorArea_ip = OsLib_HelperMethods.neatConvertWithUnitDisplay(exteriorArea_si, 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
136
+ floorArea_si = OpenstudioStandards::Geometry.spaces_get_floor_area(model.getSpaces)
137
+ floorArea_ip = OpenStudio.toNeatString(OpenStudio.convert(floorArea_si, 'm^2', 'ft^2').get, 0, true)
138
+ exteriorArea_si = OpenstudioStandards::Geometry.spaces_get_exterior_wall_area(model.getSpaces)
139
+ exteriorArea_ip = OpenStudio.toNeatString(OpenStudio.convert(exteriorArea_si, 'm^2', 'ft^2').get, 0, true)
143
140
 
144
141
  runner.registerInitialCondition("The building started with #{floorArea_ip} of floor area, and #{exteriorArea_ip} of exterior wall area.")
145
142
 
@@ -159,9 +156,9 @@ class SimplifyGeometryToSlicedBar < OpenStudio::Measure::ModelMeasure
159
156
  lengthX = xmax - xmin
160
157
  lengthY = ymax - ymin
161
158
  areaBounding = lengthX * lengthY
162
- lengthX_display = OsLib_HelperMethods.neatConvertWithUnitDisplay(lengthX, 'm', 'ft', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
163
- lengthY_display = OsLib_HelperMethods.neatConvertWithUnitDisplay(lengthY, 'm', 'ft', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
164
- areaBounding_display = OsLib_HelperMethods.neatConvertWithUnitDisplay(areaBounding, 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
159
+ lengthX_display = OpenStudio.toNeatString(OpenStudio.convert(lengthX, 'm', 'ft').get, 0, true)
160
+ lengthY_display = OpenStudio.toNeatString(OpenStudio.convert(lengthY, 'm', 'ft').get, 0, true)
161
+ areaBounding_display = OpenStudio.toNeatString(OpenStudio.convert(areaBounding, 'm^2', 'ft^2').get, 0, true)
165
162
  runner.registerInfo("Bounding box area is #{areaBounding_display}. #{lengthX_display} by #{lengthY_display}.")
166
163
 
167
164
  # get target footprint size
@@ -187,8 +184,8 @@ class SimplifyGeometryToSlicedBar < OpenStudio::Measure::ModelMeasure
187
184
 
188
185
  else
189
186
  areaTarget = totalFloorArea / numStories
190
- lengthXTarget_Bar1 = (areaByFacade['northWall'] + areaByFacade['southWall']) / (2 * (zmax - zmin))
191
- lengthYTarget_Bar2 = (areaByFacade['eastWall'] + areaByFacade['westWall']) / (2 * (zmax - zmin))
187
+ lengthXTarget_Bar1 = (areaByFacade['north_wall'] + areaByFacade['south_wall']) / (2 * (zmax - zmin))
188
+ lengthYTarget_Bar2 = (areaByFacade['east_wall'] + areaByFacade['west_wall']) / (2 * (zmax - zmin))
192
189
  lengthYTarget_Bar1 = areaTarget / (lengthXTarget_Bar1 + lengthYTarget_Bar2)
193
190
  lengthXTarget_Bar2 = lengthYTarget_Bar1
194
191
 
@@ -243,20 +240,18 @@ class SimplifyGeometryToSlicedBar < OpenStudio::Measure::ModelMeasure
243
240
 
244
241
  end
245
242
 
246
- # get wall and window area by facade
247
- finishing_spaces = model.getSpaces
248
- areaByFacade = OsLib_Geometry.getExteriorWindowAndWllAreaByOrientation(model, finishing_spaces, options = {})
249
- northWallGross = OsLib_HelperMethods.neatConvertWithUnitDisplay(areaByFacade['northWall'], 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
250
- southWallGross = OsLib_HelperMethods.neatConvertWithUnitDisplay(areaByFacade['southWall'], 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
251
- eastWallGross = OsLib_HelperMethods.neatConvertWithUnitDisplay(areaByFacade['eastWall'], 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
252
- westWallGross = OsLib_HelperMethods.neatConvertWithUnitDisplay(areaByFacade['westWall'], 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
243
+ areaByFacade = OpenstudioStandards::Geometry.model_get_exterior_window_and_wall_area_by_orientation(model)
244
+ northWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['north_wall'], 'm^2', 'ft^2').get, 0, true)
245
+ southWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['south_wall'], 'm^2', 'ft^2').get, 0, true)
246
+ eastWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['east_wall'], 'm^2', 'ft^2').get, 0, true)
247
+ westWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['west_wall'], 'm^2', 'ft^2').get, 0, true)
253
248
  runner.registerInfo("Final Exterior Wall Breakdown. North: #{northWallGross}, South: #{southWallGross}, East: #{eastWallGross}, West: #{westWallGross}")
254
249
 
255
250
  # reporting final condition of model
256
- floorArea_si = OsLib_HelperMethods.getAreaOfSpacesInArray(model, finishing_spaces, areaType = 'floorArea')['totalArea']
257
- floorArea_ip = OsLib_HelperMethods.neatConvertWithUnitDisplay(floorArea_si, 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
258
- exteriorArea_si = OsLib_HelperMethods.getAreaOfSpacesInArray(model, finishing_spaces, areaType = 'exteriorWallArea')['totalArea']
259
- exteriorArea_ip = OsLib_HelperMethods.neatConvertWithUnitDisplay(exteriorArea_si, 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
251
+ floorArea_si = OpenstudioStandards::Geometry.spaces_get_floor_area(model.getSpaces)
252
+ floorArea_ip = OpenStudio.toNeatString(OpenStudio.convert(floorArea_si, 'm^2', 'ft^2').get, 0, true)
253
+ exteriorArea_si = OpenstudioStandards::Geometry.spaces_get_exterior_wall_area(model.getSpaces)
254
+ exteriorArea_ip = OpenStudio.toNeatString(OpenStudio.convert(exteriorArea_si, 'm^2', 'ft^2').get, 0, true)
260
255
 
261
256
  runner.registerFinalCondition("The building finished with #{floorArea_ip} of floor area, and #{exteriorArea_ip} of exterior wall area.")
262
257
 
@@ -1,50 +1,16 @@
1
1
  <?xml version="1.0"?>
2
2
  <measure>
3
- <schema_version>3.0</schema_version>
3
+ <schema_version>3.1</schema_version>
4
4
  <name>simplify_geometry_to_sliced_bar</name>
5
5
  <uid>eb218516-5fa5-47fe-948d-274777c7d592</uid>
6
- <version_id>f596f08b-a427-4ccf-ad9b-04da056a8665</version_id>
7
- <version_modified>20230602T160044Z</version_modified>
6
+ <version_id>8a8d7207-8cfa-44ff-a45d-5060b03e289c</version_id>
7
+ <version_modified>2024-11-16T23:56:35Z</version_modified>
8
8
  <xml_checksum>45097B60</xml_checksum>
9
9
  <class_name>SimplifyGeometryToSlicedBar</class_name>
10
10
  <display_name>SimplifyGeometryToSlicedBar</display_name>
11
11
  <description>This is an experimental measure looking at ways to simply the geometry, or to create geometry when you only no percentage of space types number of floors and total area. This technique will match the building floor area but will sacrifice the exterior exposure. So it will produce better results on more boxy buildings than a building with many wings. I may try to come up with solution that also tries to maintain exterior exposure in another version.</description>
12
12
  <modeler_description>I'm going to extract space type area breakdown and number of floors from the source model. I'll also keep track of exterior exposure. I won't directly use exterior exposure but can report the change in this as a kind of confidence metric. I'll then create a bar building using the bounding box aspect ratio, but shrunk to fit the building area. I will slice the building across the shorter axis by space type. The two most prevalent space types will go on the outside of the building. Instead of core and perimeter zoning the building will have a variation with square corners. I will create one zone per space, and will use a zone multiplier for any building more than 3 stories tall.
13
13
 
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
14
  In a future version I may try to identify similar spaces types and blend them together before slicing, although I expect that will be a separate measure, so it is more modular.</modeler_description>
49
15
  <arguments>
50
16
  <argument>
@@ -89,10 +55,10 @@ In a future version I may try to identify similar spaces types and blend them to
89
55
  </attributes>
90
56
  <files>
91
57
  <file>
92
- <filename>UShapedHotelExample.osm</filename>
93
- <filetype>osm</filetype>
94
- <usage_type>test</usage_type>
95
- <checksum>7E96D119</checksum>
58
+ <filename>LICENSE.md</filename>
59
+ <filetype>md</filetype>
60
+ <usage_type>license</usage_type>
61
+ <checksum>8696A072</checksum>
96
62
  </file>
97
63
  <file>
98
64
  <filename>README.md</filename>
@@ -107,10 +73,27 @@ In a future version I may try to identify similar spaces types and blend them to
107
73
  <checksum>703C9964</checksum>
108
74
  </file>
109
75
  <file>
110
- <filename>UShapedHotelExample/run.db</filename>
111
- <filetype>db</filetype>
76
+ <version>
77
+ <software_program>OpenStudio</software_program>
78
+ <identifier>2.0.0</identifier>
79
+ <min_compatible>3.8.0</min_compatible>
80
+ </version>
81
+ <filename>measure.rb</filename>
82
+ <filetype>rb</filetype>
83
+ <usage_type>script</usage_type>
84
+ <checksum>1F503C21</checksum>
85
+ </file>
86
+ <file>
87
+ <filename>os_lib_cofee.rb</filename>
88
+ <filetype>rb</filetype>
89
+ <usage_type>resource</usage_type>
90
+ <checksum>2C77E71F</checksum>
91
+ </file>
92
+ <file>
93
+ <filename>SimplifyGeometryToSlicedBar_Test.rb</filename>
94
+ <filetype>rb</filetype>
112
95
  <usage_type>test</usage_type>
113
- <checksum>9230B5CD</checksum>
96
+ <checksum>03F6E2E5</checksum>
114
97
  </file>
115
98
  <file>
116
99
  <filename>UShapedHotelExample/files/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw</filename>
@@ -125,45 +108,16 @@ In a future version I may try to identify similar spaces types and blend them to
125
108
  <checksum>EE6FAF90</checksum>
126
109
  </file>
127
110
  <file>
128
- <filename>LICENSE.md</filename>
129
- <filetype>md</filetype>
130
- <usage_type>license</usage_type>
131
- <checksum>BFFB1AA6</checksum>
132
- </file>
133
- <file>
134
- <filename>os_lib_helper_methods.rb</filename>
135
- <filetype>rb</filetype>
136
- <usage_type>resource</usage_type>
137
- <checksum>996C5B97</checksum>
138
- </file>
139
- <file>
140
- <filename>os_lib_cofee.rb</filename>
141
- <filetype>rb</filetype>
142
- <usage_type>resource</usage_type>
143
- <checksum>7162FF96</checksum>
144
- </file>
145
- <file>
146
- <version>
147
- <software_program>OpenStudio</software_program>
148
- <identifier>2.0.0</identifier>
149
- <min_compatible>2.8.0</min_compatible>
150
- </version>
151
- <filename>measure.rb</filename>
152
- <filetype>rb</filetype>
153
- <usage_type>script</usage_type>
154
- <checksum>8D1BD320</checksum>
155
- </file>
156
- <file>
157
- <filename>os_lib_geometry.rb</filename>
158
- <filetype>rb</filetype>
159
- <usage_type>resource</usage_type>
160
- <checksum>788EF0F2</checksum>
111
+ <filename>UShapedHotelExample/run.db</filename>
112
+ <filetype>db</filetype>
113
+ <usage_type>test</usage_type>
114
+ <checksum>9230B5CD</checksum>
161
115
  </file>
162
116
  <file>
163
- <filename>SimplifyGeometryToSlicedBar_Test.rb</filename>
164
- <filetype>rb</filetype>
117
+ <filename>UShapedHotelExample.osm</filename>
118
+ <filetype>osm</filetype>
165
119
  <usage_type>test</usage_type>
166
- <checksum>03F6E2E5</checksum>
120
+ <checksum>7E96D119</checksum>
167
121
  </file>
168
122
  </files>
169
123
  </measure>
@@ -83,9 +83,9 @@ module OsLib_Cofee
83
83
  'name' => nil,
84
84
  'spaceType' => k,
85
85
  'story' => story,
86
- 'makeThermalZone' => true,
87
- 'thermalZone' => nil,
88
- 'thermalZoneMultiplier' => thermalZoneMultiplier,
86
+ 'make_thermal_zone' => true,
87
+ 'thermal_zone' => nil,
88
+ 'thermal_zone_multiplier' => thermalZoneMultiplier,
89
89
  'floor_to_floor_height' => floor_to_floor_height
90
90
  }
91
91
 
@@ -117,9 +117,10 @@ module OsLib_Cofee
117
117
  perim_polygon_b << OpenStudio::Point3d.new(x + lengthXTarget * (v / totalFloorArea), y + lengthYTarget - perimeterDepth, z)
118
118
 
119
119
  # run method to make spaces
120
- tempSpaceArray << OsLib_Geometry.makeSpaceFromPolygon(model, perim_origin_a, perim_polygon_a, options) # model, origin, polygon, options
121
- tempSpaceArray << OsLib_Geometry.makeSpaceFromPolygon(model, core_origin, core_polygon, options) # model, origin, polygon, options
122
- tempSpaceArray << OsLib_Geometry.makeSpaceFromPolygon(model, perim_origin_b, perim_polygon_b, options) # model, origin, polygon, options
120
+ # todo - standards methods are not found here
121
+ tempSpaceArray << OpenstudioStandards::Geometry.create_space_from_polygon(model, perim_origin_a, perim_polygon_a, options) # model, origin, polygon, options
122
+ tempSpaceArray << OpenstudioStandards::Geometry.create_space_from_polygon(model, core_origin, core_polygon, options) # model, origin, polygon, options
123
+ tempSpaceArray << OpenstudioStandards::Geometry.create_space_from_polygon(model, perim_origin_b, perim_polygon_b, options) # model, origin, polygon, options
123
124
 
124
125
  elsif lengthYTarget > perimeterDepth * 2 # slice into two peremeter zones but no core
125
126
 
@@ -140,8 +141,8 @@ module OsLib_Cofee
140
141
  perim_polygon_b << OpenStudio::Point3d.new(x + lengthXTarget * (v / totalFloorArea), y + lengthYTarget / 2, z)
141
142
 
142
143
  # run method to make spaces
143
- tempSpaceArray << OsLib_Geometry.makeSpaceFromPolygon(model, perim_origin_a, perim_polygon_a, options) # model, origin, polygon, options
144
- tempSpaceArray << OsLib_Geometry.makeSpaceFromPolygon(model, perim_origin_b, perim_polygon_b, options) # model, origin, polygon, options
144
+ tempSpaceArray << OpenStudioStandards::Geometry.create_space_from_polygon(model, perim_origin_a, perim_polygon_a, options) # model, origin, polygon, options
145
+ tempSpaceArray << OpenStudioStandards::Geometry.create_space_from_polygon(model, perim_origin_b, perim_polygon_b, options) # model, origin, polygon, options
145
146
 
146
147
  else # don't slice into core and perimeter
147
148
 
@@ -154,7 +155,7 @@ module OsLib_Cofee
154
155
  core_polygon << OpenStudio::Point3d.new(x + lengthXTarget * (v / totalFloorArea), y, z)
155
156
 
156
157
  # run method to make space
157
- tempSpaceArray << OsLib_Geometry.makeSpaceFromPolygon(model, core_origin, core_polygon, options) # model, origin, polygon, options
158
+ tempSpaceArray << OpenStudioStandards::Geometry.create_space_from_polygon(model, core_origin, core_polygon, options) # model, origin, polygon, options
158
159
 
159
160
  end
160
161
 
@@ -1,4 +1,4 @@
1
- OpenStudio(R), Copyright (c) 2008, 2023 Alliance for Sustainable Energy, LLC.
1
+ OpenStudio(R), Copyright (c) 2008, 2024 Alliance for Sustainable Energy, LLC.
2
2
 
3
3
  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
4
4