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,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>create_and_assign_thermal_zones_for_unassigned_spaces</name>
5
5
  <uid>ddaa752e-5d40-49b2-88de-62e71697e614</uid>
6
- <version_id>2919064c-9885-49ca-ae6c-7ce35c1f5dce</version_id>
7
- <version_modified>20230602T160043Z</version_modified>
6
+ <version_id>cc26141b-d045-4dd4-8d78-3658da38f44a</version_id>
7
+ <version_modified>2024-11-16T23:56:35Z</version_modified>
8
8
  <xml_checksum>2AF3A68E</xml_checksum>
9
9
  <class_name>CreateAndAssignThermalZonesForUnassignedSpaces</class_name>
10
10
  <display_name>Create and Assign Thermal Zones for Unassigned Spaces</display_name>
@@ -40,10 +40,10 @@
40
40
  </attributes>
41
41
  <files>
42
42
  <file>
43
- <filename>example_model.osm</filename>
44
- <filetype>osm</filetype>
45
- <usage_type>test</usage_type>
46
- <checksum>53D14E69</checksum>
43
+ <filename>LICENSE.md</filename>
44
+ <filetype>md</filetype>
45
+ <usage_type>license</usage_type>
46
+ <checksum>8696A072</checksum>
47
47
  </file>
48
48
  <file>
49
49
  <filename>README.md</filename>
@@ -68,17 +68,17 @@
68
68
  <usage_type>script</usage_type>
69
69
  <checksum>525749C3</checksum>
70
70
  </file>
71
- <file>
72
- <filename>LICENSE.md</filename>
73
- <filetype>md</filetype>
74
- <usage_type>license</usage_type>
75
- <checksum>BFFB1AA6</checksum>
76
- </file>
77
71
  <file>
78
72
  <filename>create_and_assign_thermal_zones_for_unassigned_spaces_test.rb</filename>
79
73
  <filetype>rb</filetype>
80
74
  <usage_type>test</usage_type>
81
75
  <checksum>8D3FBCAF</checksum>
82
76
  </file>
77
+ <file>
78
+ <filename>example_model.osm</filename>
79
+ <filetype>osm</filetype>
80
+ <usage_type>test</usage_type>
81
+ <checksum>53D14E69</checksum>
82
+ </file>
83
83
  </files>
84
84
  </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
 
@@ -350,7 +350,7 @@ Number of units argument not currently used by this measure
350
350
  **Required:** true,
351
351
  **Model Dependent:** false
352
352
 
353
- **Choice Display Names** ["SecondarySchool", "PrimarySchool", "SmallOffice", "MediumOffice", "LargeOffice", "SmallHotel", "LargeHotel", "Warehouse", "RetailStandalone", "RetailStripmall", "QuickServiceRestaurant", "FullServiceRestaurant", "MidriseApartment", "HighriseApartment", "Hospital", "Outpatient", "SuperMarket", "Laboratory", "LargeDataCenterLowITE", "LargeDataCenterHighITE", "SmallDataCenterLowITE", "SmallDataCenterHighITE", "Courthouse", "College", "Asm", "DMo", "ECC", "EPr", "ERC", "ESe", "EUn", "GHs", "Gro", "Hsp", "Htl", "MBT", "MFm", "MLI", "Mtl", "Nrs", "OfL", "OfS", "RFF", "RSD", "Rt3", "RtL", "RtS", "SCn", "SFm", "SUn", "WRf"]
353
+ **Choice Display Names** ["SecondarySchool", "PrimarySchool", "SmallOffice", "MediumOffice", "LargeOffice", "SmallHotel", "LargeHotel", "Warehouse", "RetailStandalone", "RetailStripmall", "QuickServiceRestaurant", "FullServiceRestaurant", "MidriseApartment", "HighriseApartment", "Hospital", "Outpatient", "SuperMarket", "Laboratory", "LargeDataCenterLowITE", "LargeDataCenterHighITE", "SmallDataCenterLowITE", "SmallDataCenterHighITE", "Courthouse", "College"]
354
354
 
355
355
 
356
356
  ### Building Type C Fraction of Building Floor Area
@@ -471,7 +471,7 @@ Set Building Rotation off of North (positive value is clockwise). Rotation appli
471
471
  **Required:** true,
472
472
  **Model Dependent:** false
473
473
 
474
- **Choice Display Names** ["DOE Ref Pre-1980", "DOE Ref 1980-2004", "90.1-2004", "90.1-2007", "90.1-2010", "90.1-2013", "90.1-2016", "90.1-2019", "ComStock DOE Ref Pre-1980", "ComStock DOE Ref 1980-2004", "ComStock 90.1-2004", "ComStock 90.1-2007", "ComStock 90.1-2010", "ComStock 90.1-2013", "ComStock 90.1-2016", "ComStock 90.1-2019", "NREL ZNE Ready 2017", "DEER Pre-1975", "DEER 1985", "DEER 1996", "DEER 2003", "DEER 2007", "DEER 2011", "DEER 2014", "DEER 2015", "DEER 2017", "DEER 2020", "DEER 2025", "DEER 2030", "DEER 2035", "DEER 2040", "DEER 2045", "DEER 2050", "DEER 2055", "DEER 2060", "DEER 2065", "DEER 2070", "DEER 2075"]
474
+ **Choice Display Names** ["DOE Ref Pre-1980", "DOE Ref 1980-2004", "90.1-2004", "90.1-2007", "90.1-2010", "90.1-2013", "90.1-2016", "90.1-2019", "ComStock DOE Ref Pre-1980", "ComStock DOE Ref 1980-2004", "ComStock 90.1-2004", "ComStock 90.1-2007", "ComStock 90.1-2010", "ComStock 90.1-2013", "ComStock 90.1-2016", "ComStock 90.1-2019", "DEER Pre-1975", "DEER 1985", "DEER 1996", "DEER 2003", "DEER 2007", "DEER 2011", "DEER 2014", "DEER 2015", "DEER 2017", "DEER 2020", "ComStock DEER Pre-1975", "ComStock DEER 1985", "ComStock DEER 1996", "ComStock DEER 2003", "ComStock DEER 2007", "ComStock DEER 2011", "ComStock DEER 2014", "ComStock DEER 2015", "ComStock DEER 2017", "ComStock DEER 2020"]
475
475
 
476
476
 
477
477
  ### Ratio of North/South Facade Length Relative to East/West Facade Length
@@ -644,17 +644,6 @@ When true this will look for arguments or registerValues in upstream measures th
644
644
  **Model Dependent:** false
645
645
 
646
646
 
647
- ### Climate Zone
648
- Climate Zone argument is not used by this measure
649
- **Name:** climate_zone,
650
- **Type:** Choice,
651
- **Units:** ,
652
- **Required:** true,
653
- **Model Dependent:** false
654
-
655
- **Choice Display Names** ["Lookup From Stat File", "ASHRAE 169-2013-1A", "ASHRAE 169-2013-1B", "ASHRAE 169-2013-2A", "ASHRAE 169-2013-2B", "ASHRAE 169-2013-3A", "ASHRAE 169-2013-3B", "ASHRAE 169-2013-3C", "ASHRAE 169-2013-4A", "ASHRAE 169-2013-4B", "ASHRAE 169-2013-4C", "ASHRAE 169-2013-5A", "ASHRAE 169-2013-5B", "ASHRAE 169-2013-5C", "ASHRAE 169-2013-6A", "ASHRAE 169-2013-6B", "ASHRAE 169-2013-7A", "ASHRAE 169-2013-8A", "CEC T24-CEC1", "CEC T24-CEC2", "CEC T24-CEC3", "CEC T24-CEC4", "CEC T24-CEC5", "CEC T24-CEC6", "CEC T24-CEC7", "CEC T24-CEC8", "CEC T24-CEC9", "CEC T24-CEC10", "CEC T24-CEC11", "CEC T24-CEC12", "CEC T24-CEC13", "CEC T24-CEC14", "CEC T24-CEC15", "CEC T24-CEC16"]
656
-
657
-
658
647
 
659
648
 
660
649
 
@@ -8,20 +8,8 @@
8
8
 
9
9
  require 'openstudio-standards'
10
10
 
11
- # load OpenStudio measure libraries fro m openstudio-extension gem
12
- require 'openstudio-extension'
13
- require 'openstudio/extension/core/os_lib_helper_methods'
14
- require 'openstudio/extension/core/os_lib_geometry'
15
- require 'openstudio/extension/core/os_lib_model_generation'
16
- require 'openstudio/extension/core/os_lib_model_simplification'
17
-
18
11
  # start the measure
19
12
  class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
20
- # resource file modules
21
- include OsLib_HelperMethods
22
- include OsLib_Geometry
23
- include OsLib_ModelGeneration
24
- include OsLib_ModelSimplification
25
13
 
26
14
  # human readable name
27
15
  def name
@@ -43,12 +31,82 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
43
31
  return 'Envelope.Form'
44
32
  end
45
33
 
34
+ # remove existing non resource objects from the model
35
+ # technically thermostats and building stories are resources but still want to remove them.
36
+ def remove_non_resource_objects(runner, model, options = nil)
37
+ if options.nil?
38
+ options = {}
39
+ options[:remove_building_stories] = true
40
+ options[:remove_thermostats] = true
41
+ options[:remove_air_loops] = true
42
+ options[:remove_non_swh_plant_loops] = true
43
+
44
+ # leave these in by default unless requsted when method called
45
+ options[:remove_swh_plant_loops] = false
46
+ options[:remove_exterior_lights] = false
47
+ options[:remove_site_shading] = false
48
+ end
49
+
50
+ num_model_objects = model.objects.size
51
+
52
+ # remove non-resource objects not removed by removing the building
53
+ if options[:remove_building_stories] then model.getBuildingStorys.each(&:remove) end
54
+ if options[:remove_thermostats] then model.getThermostats.each(&:remove) end
55
+ if options[:remove_air_loops] then model.getAirLoopHVACs.each(&:remove) end
56
+ if options[:remove_exterior_lights] then model.getFacility.exteriorLights.each(&:remove) end
57
+ if options[:remove_site_shading] then model.getSite.shadingSurfaceGroups.each(&:remove) end
58
+
59
+ # see if plant loop is swh or not and take proper action (booter loop doesn't have water use equipment)
60
+ model.getPlantLoops.each do |plant_loop|
61
+ is_swh_loop = false
62
+ plant_loop.supplyComponents.each do |component|
63
+ if component.to_WaterHeaterMixed.is_initialized
64
+ is_swh_loop = true
65
+ next
66
+ end
67
+ end
68
+
69
+ if is_swh_loop
70
+ if options[:remove_swh_plant_loops] then plant_loop.remove end
71
+ else
72
+ if options[:remove_non_swh_plant_loops] then plant_loop.remove end
73
+ end
74
+ end
75
+
76
+ # remove water use connections (may be removed when loop is removed)
77
+ if options[:remove_swh_plant_loops] then model.getWaterConnectionss.each(&:remove) end
78
+ if options[:remove_swh_plant_loops] then model.getWaterUseEquipments.each(&:remove) end
79
+
80
+ # remove building but reset fields on new building object.
81
+ building_fields = []
82
+ building = model.getBuilding
83
+ num_fields = building.numFields
84
+ num_fields.times.each do |i|
85
+ building_fields << building.getString(i).get
86
+ end
87
+ # removes spaces, space's child objects, thermal zones, zone equipment, non site surfaces, building stories and water use connections.
88
+ model.getBuilding.remove
89
+ building = model.getBuilding
90
+ num_fields.times.each do |i|
91
+ next if i == 0 # don't try and set handle
92
+ building_fields << building.setString(i, building_fields[i])
93
+ end
94
+
95
+ # other than optionally site shading and exterior lights not messing with site characteristics
96
+
97
+ if num_model_objects - model.objects.size > 0
98
+ runner.registerInfo("Removed #{num_model_objects - model.objects.size} non resource objects from the model.")
99
+ end
100
+
101
+ return true
102
+ end
103
+
46
104
  # define the arguments that the user will input
47
105
  def arguments(model)
48
106
  args = OpenStudio::Measure::OSArgumentVector.new
49
107
 
50
108
  # Make an argument for the bldg_type_a
51
- bldg_type_a = OpenStudio::Measure::OSArgument.makeChoiceArgument('bldg_type_a', get_building_types, true)
109
+ bldg_type_a = OpenStudio::Measure::OSArgument.makeChoiceArgument('bldg_type_a', OpenstudioStandards::CreateTypical.get_building_types, true)
52
110
  bldg_type_a.setDisplayName('Primary Building Type')
53
111
  bldg_type_a.setDefaultValue('SmallOffice')
54
112
  args << bldg_type_a
@@ -61,7 +119,7 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
61
119
  args << bldg_type_a_num_units
62
120
 
63
121
  # Make an argument for the bldg_type_b
64
- bldg_type_b = OpenStudio::Measure::OSArgument.makeChoiceArgument('bldg_type_b', get_building_types, true)
122
+ bldg_type_b = OpenStudio::Measure::OSArgument.makeChoiceArgument('bldg_type_b', OpenstudioStandards::CreateTypical.get_building_types, true)
65
123
  bldg_type_b.setDisplayName('Building Type B')
66
124
  bldg_type_b.setDefaultValue('SmallOffice')
67
125
  args << bldg_type_b
@@ -70,6 +128,8 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
70
128
  bldg_type_b_fract_bldg_area = OpenStudio::Measure::OSArgument.makeDoubleArgument('bldg_type_b_fract_bldg_area', true)
71
129
  bldg_type_b_fract_bldg_area.setDisplayName('Building Type B Fraction of Building Floor Area')
72
130
  bldg_type_b_fract_bldg_area.setDefaultValue(0.0)
131
+ bldg_type_b_fract_bldg_area.setMinValue(0.0)
132
+ bldg_type_b_fract_bldg_area.setMaxValue(1.0)
73
133
  args << bldg_type_b_fract_bldg_area
74
134
 
75
135
  # Make argument for bldg_type_b_num_units
@@ -80,7 +140,7 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
80
140
  args << bldg_type_b_num_units
81
141
 
82
142
  # Make an argument for the bldg_type_c
83
- bldg_type_c = OpenStudio::Measure::OSArgument.makeChoiceArgument('bldg_type_c', get_building_types, true)
143
+ bldg_type_c = OpenStudio::Measure::OSArgument.makeChoiceArgument('bldg_type_c', OpenstudioStandards::CreateTypical.get_doe_building_types, true)
84
144
  bldg_type_c.setDisplayName('Building Type C')
85
145
  bldg_type_c.setDefaultValue('SmallOffice')
86
146
  args << bldg_type_c
@@ -89,6 +149,8 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
89
149
  bldg_type_c_fract_bldg_area = OpenStudio::Measure::OSArgument.makeDoubleArgument('bldg_type_c_fract_bldg_area', true)
90
150
  bldg_type_c_fract_bldg_area.setDisplayName('Building Type C Fraction of Building Floor Area')
91
151
  bldg_type_c_fract_bldg_area.setDefaultValue(0.0)
152
+ bldg_type_c_fract_bldg_area.setMinValue(0.0)
153
+ bldg_type_c_fract_bldg_area.setMaxValue(1.0)
92
154
  args << bldg_type_c_fract_bldg_area
93
155
 
94
156
  # Make argument for bldg_type_c_num_units
@@ -99,7 +161,7 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
99
161
  args << bldg_type_c_num_units
100
162
 
101
163
  # Make an argument for the bldg_type_d
102
- bldg_type_d = OpenStudio::Measure::OSArgument.makeChoiceArgument('bldg_type_d', get_building_types, true)
164
+ bldg_type_d = OpenStudio::Measure::OSArgument.makeChoiceArgument('bldg_type_d', OpenstudioStandards::CreateTypical.get_building_types, true)
103
165
  bldg_type_d.setDisplayName('Building Type D')
104
166
  bldg_type_d.setDefaultValue('SmallOffice')
105
167
  args << bldg_type_d
@@ -108,6 +170,8 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
108
170
  bldg_type_d_fract_bldg_area = OpenStudio::Measure::OSArgument.makeDoubleArgument('bldg_type_d_fract_bldg_area', true)
109
171
  bldg_type_d_fract_bldg_area.setDisplayName('Building Type D Fraction of Building Floor Area')
110
172
  bldg_type_d_fract_bldg_area.setDefaultValue(0.0)
173
+ bldg_type_d_fract_bldg_area.setMinValue(0.0)
174
+ bldg_type_d_fract_bldg_area.setMaxValue(1.0)
111
175
  args << bldg_type_d_fract_bldg_area
112
176
 
113
177
  # Make argument for bldg_type_d_num_units
@@ -122,6 +186,7 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
122
186
  total_bldg_floor_area.setDisplayName('Total Building Floor Area')
123
187
  total_bldg_floor_area.setUnits('ft^2')
124
188
  total_bldg_floor_area.setDefaultValue(10000.0)
189
+ total_bldg_floor_area.setMinValue(0.0)
125
190
  args << total_bldg_floor_area
126
191
 
127
192
  # Make argument for single_floor_area
@@ -130,6 +195,7 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
130
195
  single_floor_area.setDescription('Non-zero value will fix the single floor area, overriding a user entry for Total Building Floor Area')
131
196
  single_floor_area.setUnits('ft^2')
132
197
  single_floor_area.setDefaultValue(0.0)
198
+ single_floor_area.setMinValue(0.0)
133
199
  args << single_floor_area
134
200
 
135
201
  # Make argument for floor_height
@@ -138,6 +204,7 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
138
204
  floor_height.setDescription('Selecting a typical floor height of 0 will trigger a smart building type default.')
139
205
  floor_height.setUnits('ft')
140
206
  floor_height.setDefaultValue(0.0)
207
+ floor_height.setMinValue(0.0)
141
208
  args << floor_height
142
209
 
143
210
  # add argument to enable/disable multi custom space height bar
@@ -151,12 +218,14 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
151
218
  num_stories_above_grade = OpenStudio::Measure::OSArgument.makeDoubleArgument('num_stories_above_grade', true)
152
219
  num_stories_above_grade.setDisplayName('Number of Stories Above Grade')
153
220
  num_stories_above_grade.setDefaultValue(1.0)
221
+ num_stories_above_grade.setMinValue(1.0)
154
222
  args << num_stories_above_grade
155
223
 
156
224
  # Make argument for num_stories_below_grade
157
225
  num_stories_below_grade = OpenStudio::Measure::OSArgument.makeIntegerArgument('num_stories_below_grade', true)
158
226
  num_stories_below_grade.setDisplayName('Number of Stories Below Grade')
159
227
  num_stories_below_grade.setDefaultValue(0)
228
+ num_stories_below_grade.setMinValue(0)
160
229
  args << num_stories_below_grade
161
230
 
162
231
  # Make argument for building_rotation
@@ -165,10 +234,11 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
165
234
  building_rotation.setDescription('Set Building Rotation off of North (positive value is clockwise). Rotation applied after geometry generation. Values greater than +/- 45 will result in aspect ratio and party wall orientations that do not match cardinal directions of the inputs.')
166
235
  building_rotation.setUnits('Degrees')
167
236
  building_rotation.setDefaultValue(0.0)
237
+ building_rotation.setDefaultValue(0.0)
168
238
  args << building_rotation
169
239
 
170
240
  # Make argument for template
171
- template = OpenStudio::Measure::OSArgument.makeChoiceArgument('template', get_templates(true), true)
241
+ template = OpenStudio::Measure::OSArgument.makeChoiceArgument('template', OpenstudioStandards::CreateTypical.get_templates(false), true)
172
242
  template.setDisplayName('Target Standard')
173
243
  template.setDefaultValue('90.1-2004')
174
244
  args << template
@@ -178,6 +248,7 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
178
248
  ns_to_ew_ratio.setDisplayName('Ratio of North/South Facade Length Relative to East/West Facade Length')
179
249
  ns_to_ew_ratio.setDescription('Selecting an aspect ratio of 0 will trigger a smart building type default. Aspect ratios less than one are not recommended for sliced bar geometry, instead rotate building and use a greater than 1 aspect ratio.')
180
250
  ns_to_ew_ratio.setDefaultValue(0.0)
251
+ ns_to_ew_ratio.setMinValue(0.0)
181
252
  args << ns_to_ew_ratio
182
253
 
183
254
  # Make argument for perim_mult
@@ -185,6 +256,7 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
185
256
  perim_mult.setDisplayName('Perimeter Multiplier')
186
257
  perim_mult.setDescription('Selecting a value of 0 will trigger a smart building type default. This represents a multiplier for the building perimeter relative to the perimeter of a rectangular building that meets the area and aspect ratio inputs. Other than the smart default of 0.0 this argument should have a value of 1.0 or higher and is only applicable Multiple Space Types - Individual Stories Sliced division method.')
187
258
  perim_mult.setDefaultValue(0.0)
259
+ perim_mult.setMinValue(0.0)
188
260
  args << perim_mult
189
261
 
190
262
  # Make argument for bar_width
@@ -193,6 +265,7 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
193
265
  bar_width.setDescription('Non-zero value will fix the building width, overriding user entry for Perimeter Multiplier. NS/EW Aspect Ratio may be limited based on target width.')
194
266
  bar_width.setUnits('ft')
195
267
  bar_width.setDefaultValue(0.0)
268
+ bar_width.setMinValue(0.0)
196
269
  args << bar_width
197
270
 
198
271
  # Make argument for bar_sep_dist_mult
@@ -207,6 +280,8 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
207
280
  wwr.setDisplayName('Window to Wall Ratio')
208
281
  wwr.setDescription('Selecting a window to wall ratio of 0 will trigger a smart building type default.')
209
282
  wwr.setDefaultValue(0.0)
283
+ wwr.setMinValue(0.0)
284
+ wwr.setMaxValue(1.0)
210
285
  args << wwr
211
286
 
212
287
  # Make argument for party_wall_fraction
@@ -214,6 +289,8 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
214
289
  party_wall_fraction.setDisplayName('Fraction of Exterior Wall Area with Adjacent Structure')
215
290
  party_wall_fraction.setDescription('This will impact how many above grade exterior walls are modeled with adiabatic boundary condition.')
216
291
  party_wall_fraction.setDefaultValue(0.0)
292
+ party_wall_fraction.setMinValue(0.0)
293
+ party_wall_fraction.setMaxValue(1.0)
217
294
  args << party_wall_fraction
218
295
 
219
296
  # party_wall_fraction was used where we wanted to represent some party walls but didn't know where they are, it ends up using methods to make whole surfaces adiabiatc by story and orientaiton to try to come close to requested fraction
@@ -223,6 +300,7 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
223
300
  party_wall_stories_north.setDisplayName('Number of North facing stories with party wall')
224
301
  party_wall_stories_north.setDescription('This will impact how many above grade exterior north walls are modeled with adiabatic boundary condition. If this is less than the number of above grade stoes, upper flor will reamin exterior')
225
302
  party_wall_stories_north.setDefaultValue(0)
303
+ party_wall_stories_north.setMinValue(0)
226
304
  args << party_wall_stories_north
227
305
 
228
306
  # Make argument for party_wall_stories_south
@@ -230,6 +308,7 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
230
308
  party_wall_stories_south.setDisplayName('Number of South facing stories with party wall')
231
309
  party_wall_stories_south.setDescription('This will impact how many above grade exterior south walls are modeled with adiabatic boundary condition. If this is less than the number of above grade stoes, upper flor will reamin exterior')
232
310
  party_wall_stories_south.setDefaultValue(0)
311
+ party_wall_stories_south.setMinValue(0)
233
312
  args << party_wall_stories_south
234
313
 
235
314
  # Make argument for party_wall_stories_east
@@ -237,6 +316,7 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
237
316
  party_wall_stories_east.setDisplayName('Number of East facing stories with party wall')
238
317
  party_wall_stories_east.setDescription('This will impact how many above grade exterior east walls are modeled with adiabatic boundary condition. If this is less than the number of above grade stoes, upper flor will reamin exterior')
239
318
  party_wall_stories_east.setDefaultValue(0)
319
+ party_wall_stories_east.setMinValue(0)
240
320
  args << party_wall_stories_east
241
321
 
242
322
  # Make argument for party_wall_stories_west
@@ -244,6 +324,7 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
244
324
  party_wall_stories_west.setDisplayName('Number of West facing stories with party wall')
245
325
  party_wall_stories_west.setDescription('This will impact how many above grade exterior west walls are modeled with adiabatic boundary condition. If this is less than the number of above grade stoes, upper flor will reamin exterior')
246
326
  party_wall_stories_west.setDefaultValue(0)
327
+ party_wall_stories_west.setMinValue(0)
247
328
  args << party_wall_stories_west
248
329
 
249
330
  # make an argument for bottom_story_ground_exposed_floor
@@ -318,15 +399,6 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
318
399
  use_upstream_args.setDefaultValue(true)
319
400
  args << use_upstream_args
320
401
 
321
- # TODO: - expose perimeter depth as an argument
322
-
323
- # Argument used to make ComStock tsv workflow run correctly
324
- climate_zone = OpenStudio::Measure::OSArgument.makeChoiceArgument('climate_zone', get_climate_zones(false, 'Lookup From Stat File'), true)
325
- climate_zone.setDisplayName('Climate Zone')
326
- climate_zone.setDefaultValue('Lookup From Stat File')
327
- climate_zone.setDescription('Climate Zone argument is not used by this measure')
328
- args << climate_zone
329
-
330
402
  return args
331
403
  end
332
404
 
@@ -334,9 +406,6 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
334
406
  def run(model, runner, user_arguments)
335
407
  super(model, runner, user_arguments)
336
408
 
337
- # require 'openstudio-extension'
338
- # puts OpenStudio::Extension::VERSION
339
-
340
409
  # temporary bypass of openstudio surface intersection to avoid problematic behavior
341
410
  # can be removed after fixes to core OS geometry methods are made. # aka, force argument false
342
411
  orig_val = user_arguments['make_mid_story_surfaces_adiabatic']
@@ -345,9 +414,32 @@ class CreateBarFromBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
345
414
  end
346
415
  user_arguments['make_mid_story_surfaces_adiabatic'].setValue(true)
347
416
 
348
- result = bar_from_building_type_ratios(model, runner, user_arguments)
417
+ # assign the user inputs to variables
418
+ args = runner.getArgumentValues(arguments(model), user_arguments)
419
+ args = Hash[args.collect{ |k, v| [k.to_sym, v] }]
420
+ if !args then return false end
421
+
422
+ # todo - need to make use of this before pass to standards
423
+ use_upstream_args = args['use_upstream_args']
424
+
425
+ # open channel to log messages
426
+ reset_log
427
+
428
+ # Turn debugging output on/off
429
+ debug = false
430
+
431
+ # remove_non_resource_objects (this was not moved to standards, so added method in measure for now)
432
+ remove_non_resource_objects(runner, model)
433
+
434
+ # method run from os_lib_model_generation.rb
435
+ result = OpenstudioStandards::Geometry.create_bar_from_building_type_ratios(model, args)
436
+
437
+ # gather log
438
+ log_messages_to_runner(runner, debug)
439
+ reset_log
349
440
 
350
441
  if result == false
442
+ runner.registerError("Measure did not complete successfully")
351
443
  return false
352
444
  else
353
445
  return true