openstudio-model-articulation 0.8.0 → 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +9 -0
  3. data/Gemfile +12 -5
  4. data/Jenkinsfile +1 -1
  5. data/README.md +2 -0
  6. data/lib/measures/SimplifyGeometryToSlicedBar/measure.rb +32 -37
  7. data/lib/measures/SimplifyGeometryToSlicedBar/measure.xml +34 -80
  8. data/lib/measures/SimplifyGeometryToSlicedBar/resources/os_lib_cofee.rb +10 -9
  9. data/lib/measures/SpaceTypeAndConstructionSetWizard/measure.rb +10 -13
  10. data/lib/measures/SpaceTypeAndConstructionSetWizard/measure.xml +28 -28
  11. data/lib/measures/blended_space_type_from_floor_area_ratios/measure.rb +31 -14
  12. data/lib/measures/blended_space_type_from_floor_area_ratios/measure.xml +36 -36
  13. data/lib/measures/blended_space_type_from_model/measure.rb +12 -5
  14. data/lib/measures/blended_space_type_from_model/measure.xml +47 -47
  15. data/lib/measures/create_DOE_prototype_building/measure.rb +1 -1
  16. data/lib/measures/create_DOE_prototype_building/measure.xml +19 -875
  17. data/lib/measures/create_bar_from_building_type_ratios/README.md +2 -13
  18. data/lib/measures/create_bar_from_building_type_ratios/measure.rb +122 -30
  19. data/lib/measures/create_bar_from_building_type_ratios/measure.xml +108 -349
  20. data/lib/measures/create_bar_from_deer_building_type_ratios/README.md +21 -1
  21. data/lib/measures/create_bar_from_deer_building_type_ratios/measure.rb +120 -18
  22. data/lib/measures/create_bar_from_deer_building_type_ratios/measure.xml +94 -32
  23. data/lib/measures/create_bar_from_doe_building_type_ratios/measure.rb +127 -18
  24. data/lib/measures/create_bar_from_doe_building_type_ratios/measure.xml +48 -26
  25. data/lib/measures/create_bar_from_model/measure.rb +17 -18
  26. data/lib/measures/create_bar_from_model/measure.xml +41 -41
  27. data/lib/measures/create_bar_from_space_type_ratios/README.md +1 -1
  28. data/lib/measures/create_bar_from_space_type_ratios/measure.rb +94 -14
  29. data/lib/measures/create_bar_from_space_type_ratios/measure.xml +104 -63
  30. data/lib/measures/create_baseline_building/measure.xml +33 -33
  31. data/lib/measures/create_deer_prototype_building/measure.xml +15 -15
  32. data/lib/measures/create_parametric_schedules/measure.rb +17 -20
  33. data/lib/measures/create_parametric_schedules/measure.xml +15 -15
  34. data/lib/measures/create_typical_building_from_model/README.md +16 -16
  35. data/lib/measures/create_typical_building_from_model/measure.rb +84 -18
  36. data/lib/measures/create_typical_building_from_model/measure.xml +159 -211
  37. data/lib/measures/create_typical_deer_building_from_model/README.md +38 -5
  38. data/lib/measures/create_typical_deer_building_from_model/measure.rb +84 -12
  39. data/lib/measures/create_typical_deer_building_from_model/measure.xml +165 -65
  40. data/lib/measures/create_typical_doe_building_from_model/README.md +17 -4
  41. data/lib/measures/create_typical_doe_building_from_model/measure.rb +84 -12
  42. data/lib/measures/create_typical_doe_building_from_model/measure.xml +125 -65
  43. data/lib/measures/deer_space_type_and_construction_set_wizard/measure.rb +13 -16
  44. data/lib/measures/deer_space_type_and_construction_set_wizard/measure.xml +72 -29
  45. data/lib/measures/make_shading_surfaces_based_on_zone_multipliers/measure.rb +4 -4
  46. data/lib/measures/make_shading_surfaces_based_on_zone_multipliers/measure.xml +21 -21
  47. data/lib/measures/merge_spaces_from_external_file/measure.rb +4 -4
  48. data/lib/measures/merge_spaces_from_external_file/measure.xml +34 -34
  49. data/lib/measures/radiant_slab_with_doas/README.md +0 -8
  50. data/lib/measures/radiant_slab_with_doas/measure.rb +2 -11
  51. data/lib/measures/radiant_slab_with_doas/measure.xml +31 -40
  52. data/lib/measures/replace_geometry_by_story/measure.rb +6 -10
  53. data/lib/measures/replace_geometry_by_story/measure.xml +19 -19
  54. data/lib/measures/set_nist_infiltration_correlations/measure.rb +34 -25
  55. data/lib/measures/set_nist_infiltration_correlations/measure.xml +38 -38
  56. data/lib/openstudio/model_articulation/version.rb +1 -1
  57. data/openstudio-model-articulation.gemspec +11 -4
  58. metadata +69 -16
  59. data/lib/measures/SimplifyGeometryToSlicedBar/resources/os_lib_geometry.rb +0 -1174
  60. data/lib/measures/SimplifyGeometryToSlicedBar/resources/os_lib_helper_methods.rb +0 -367
  61. data/lib/measures/create_typical_building_from_model/resources/Model.hvac.rb +0 -608
@@ -92,6 +92,26 @@ This is generally meant to run on an empty model, but it does not actively delet
92
92
 
93
93
  - DEER 2020<br/>
94
94
 
95
+ - ComStock DEER Pre-1975<br/>
96
+
97
+ - ComStock DEER 1985<br/>
98
+
99
+ - ComStock DEER 1996<br/>
100
+
101
+ - ComStock DEER 2003<br/>
102
+
103
+ - ComStock DEER 2007<br/>
104
+
105
+ - ComStock DEER 2011<br/>
106
+
107
+ - ComStock DEER 2014<br/>
108
+
109
+ - ComStock DEER 2015<br/>
110
+
111
+ - ComStock DEER 2017<br/>
112
+
113
+ - ComStock DEER 2020<br/>
114
+
95
115
 
96
116
 
97
117
 
@@ -551,7 +571,7 @@ Set Building Rotation off of North (positive value is clockwise). Rotation appli
551
571
  **Required:** true,
552
572
  **Model Dependent:** false
553
573
 
554
- **Choice Display Names** ["DEER Pre-1975", "DEER 1985", "DEER 1996", "DEER 2003", "DEER 2007", "DEER 2011", "DEER 2014", "DEER 2015", "DEER 2017", "DEER 2020"]
574
+ **Choice Display Names** ["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"]
555
575
 
556
576
 
557
577
  ### Ratio of North/South Facade Length Relative to East/West Facade Length
@@ -8,20 +8,8 @@
8
8
 
9
9
  require 'openstudio-standards'
10
10
 
11
- # load OpenStudio measure libraries from 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 CreateBarFromDEERBuildingTypeRatios < 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,18 +31,88 @@ class CreateBarFromDEERBuildingTypeRatios < 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_deer_building_types, true)
109
+ bldg_type_a = OpenStudio::Measure::OSArgument.makeChoiceArgument('bldg_type_a', OpenstudioStandards::CreateTypical.get_deer_building_types, true)
52
110
  bldg_type_a.setDisplayName('Primary Building Type')
53
111
  bldg_type_a.setDefaultValue('OfS')
54
112
  args << bldg_type_a
55
113
 
56
114
  # Make an argument for the bldg_type_b
57
- bldg_type_b = OpenStudio::Measure::OSArgument.makeChoiceArgument('bldg_type_b', get_deer_building_types, true)
115
+ bldg_type_b = OpenStudio::Measure::OSArgument.makeChoiceArgument('bldg_type_b', OpenstudioStandards::CreateTypical.get_deer_building_types, true)
58
116
  bldg_type_b.setDisplayName('Building Type B')
59
117
  bldg_type_b.setDefaultValue('OfS')
60
118
  args << bldg_type_b
@@ -63,10 +121,12 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
63
121
  bldg_type_b_fract_bldg_area = OpenStudio::Measure::OSArgument.makeDoubleArgument('bldg_type_b_fract_bldg_area', true)
64
122
  bldg_type_b_fract_bldg_area.setDisplayName('Building Type B Fraction of Building Floor Area')
65
123
  bldg_type_b_fract_bldg_area.setDefaultValue(0.0)
124
+ bldg_type_b_fract_bldg_area.setMinValue(0.0)
125
+ bldg_type_b_fract_bldg_area.setMaxValue(1.0)
66
126
  args << bldg_type_b_fract_bldg_area
67
127
 
68
128
  # Make an argument for the bldg_type_c
69
- bldg_type_c = OpenStudio::Measure::OSArgument.makeChoiceArgument('bldg_type_c', get_deer_building_types, true)
129
+ bldg_type_c = OpenStudio::Measure::OSArgument.makeChoiceArgument('bldg_type_c', OpenstudioStandards::CreateTypical.get_deer_building_types, true)
70
130
  bldg_type_c.setDisplayName('Building Type C')
71
131
  bldg_type_c.setDefaultValue('OfS')
72
132
  args << bldg_type_c
@@ -75,10 +135,12 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
75
135
  bldg_type_c_fract_bldg_area = OpenStudio::Measure::OSArgument.makeDoubleArgument('bldg_type_c_fract_bldg_area', true)
76
136
  bldg_type_c_fract_bldg_area.setDisplayName('Building Type C Fraction of Building Floor Area')
77
137
  bldg_type_c_fract_bldg_area.setDefaultValue(0.0)
138
+ bldg_type_c_fract_bldg_area.setMinValue(0.0)
139
+ bldg_type_c_fract_bldg_area.setMaxValue(1.0)
78
140
  args << bldg_type_c_fract_bldg_area
79
141
 
80
142
  # Make an argument for the bldg_type_d
81
- bldg_type_d = OpenStudio::Measure::OSArgument.makeChoiceArgument('bldg_type_d', get_deer_building_types, true)
143
+ bldg_type_d = OpenStudio::Measure::OSArgument.makeChoiceArgument('bldg_type_d', OpenstudioStandards::CreateTypical.get_deer_building_types, true)
82
144
  bldg_type_d.setDisplayName('Building Type D')
83
145
  bldg_type_d.setDefaultValue('OfS')
84
146
  args << bldg_type_d
@@ -87,6 +149,8 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
87
149
  bldg_type_d_fract_bldg_area = OpenStudio::Measure::OSArgument.makeDoubleArgument('bldg_type_d_fract_bldg_area', true)
88
150
  bldg_type_d_fract_bldg_area.setDisplayName('Building Type D Fraction of Building Floor Area')
89
151
  bldg_type_d_fract_bldg_area.setDefaultValue(0.0)
152
+ bldg_type_d_fract_bldg_area.setMinValue(0.0)
153
+ bldg_type_d_fract_bldg_area.setMaxValue(1.0)
90
154
  args << bldg_type_d_fract_bldg_area
91
155
 
92
156
  # Make argument for total_bldg_floor_area
@@ -94,6 +158,7 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
94
158
  total_bldg_floor_area.setDisplayName('Total Building Floor Area')
95
159
  total_bldg_floor_area.setUnits('ft^2')
96
160
  total_bldg_floor_area.setDefaultValue(10000.0)
161
+ total_bldg_floor_area.setMinValue(0.0)
97
162
  args << total_bldg_floor_area
98
163
 
99
164
  # Make argument for single_floor_area
@@ -102,6 +167,7 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
102
167
  single_floor_area.setDescription('Non-zero value will fix the single floor area, overriding a user entry for Total Building Floor Area')
103
168
  single_floor_area.setUnits('ft^2')
104
169
  single_floor_area.setDefaultValue(0.0)
170
+ single_floor_area.setMinValue(0.0)
105
171
  args << single_floor_area
106
172
 
107
173
  # Make argument for floor_height
@@ -110,6 +176,7 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
110
176
  floor_height.setDescription('Selecting a typical floor height of 0 will trigger a smart building type default.')
111
177
  floor_height.setUnits('ft')
112
178
  floor_height.setDefaultValue(0.0)
179
+ floor_height.setMinValue(0.0)
113
180
  args << floor_height
114
181
 
115
182
  # add argument to enable/disable multi custom space height bar
@@ -123,12 +190,14 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
123
190
  num_stories_above_grade = OpenStudio::Measure::OSArgument.makeDoubleArgument('num_stories_above_grade', true)
124
191
  num_stories_above_grade.setDisplayName('Number of Stories Above Grade')
125
192
  num_stories_above_grade.setDefaultValue(1.0)
193
+ num_stories_above_grade.setMinValue(1.0)
126
194
  args << num_stories_above_grade
127
195
 
128
196
  # Make argument for num_stories_below_grade
129
197
  num_stories_below_grade = OpenStudio::Measure::OSArgument.makeIntegerArgument('num_stories_below_grade', true)
130
198
  num_stories_below_grade.setDisplayName('Number of Stories Below Grade')
131
199
  num_stories_below_grade.setDefaultValue(0)
200
+ num_stories_below_grade.setMinValue(0)
132
201
  args << num_stories_below_grade
133
202
 
134
203
  # Make argument for building_rotation
@@ -137,10 +206,11 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
137
206
  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.')
138
207
  building_rotation.setUnits('Degrees')
139
208
  building_rotation.setDefaultValue(0.0)
209
+ building_rotation.setDefaultValue(0.0)
140
210
  args << building_rotation
141
211
 
142
212
  # Make argument for template
143
- template = OpenStudio::Measure::OSArgument.makeChoiceArgument('template', get_deer_templates(false), true)
213
+ template = OpenStudio::Measure::OSArgument.makeChoiceArgument('template', OpenstudioStandards::CreateTypical.get_deer_templates(false), true)
144
214
  template.setDisplayName('Target Standard')
145
215
  template.setDefaultValue('DEER 2017')
146
216
  args << template
@@ -150,6 +220,7 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
150
220
  ns_to_ew_ratio.setDisplayName('Ratio of North/South Facade Length Relative to East/West Facade Length')
151
221
  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.')
152
222
  ns_to_ew_ratio.setDefaultValue(0.0)
223
+ ns_to_ew_ratio.setMinValue(0.0)
153
224
  args << ns_to_ew_ratio
154
225
 
155
226
  # Make argument for perim_mult
@@ -157,6 +228,7 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
157
228
  perim_mult.setDisplayName('Perimeter Multiplier')
158
229
  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.')
159
230
  perim_mult.setDefaultValue(0.0)
231
+ perim_mult.setMinValue(0.0)
160
232
  args << perim_mult
161
233
 
162
234
  # Make argument for bar_width
@@ -165,6 +237,7 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
165
237
  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.')
166
238
  bar_width.setUnits('ft')
167
239
  bar_width.setDefaultValue(0.0)
240
+ bar_width.setMinValue(0.0)
168
241
  args << bar_width
169
242
 
170
243
  # Make argument for bar_sep_dist_mult
@@ -179,6 +252,8 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
179
252
  wwr.setDisplayName('Window to Wall Ratio')
180
253
  wwr.setDescription('Selecting a window to wall ratio of 0 will trigger a smart building type default.')
181
254
  wwr.setDefaultValue(0.0)
255
+ wwr.setMinValue(0.0)
256
+ wwr.setMaxValue(1.0)
182
257
  args << wwr
183
258
 
184
259
  # Make argument for party_wall_fraction
@@ -186,6 +261,8 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
186
261
  party_wall_fraction.setDisplayName('Fraction of Exterior Wall Area with Adjacent Structure')
187
262
  party_wall_fraction.setDescription('This will impact how many above grade exterior walls are modeled with adiabatic boundary condition.')
188
263
  party_wall_fraction.setDefaultValue(0.0)
264
+ party_wall_fraction.setMinValue(0.0)
265
+ party_wall_fraction.setMaxValue(1.0)
189
266
  args << party_wall_fraction
190
267
 
191
268
  # 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
@@ -195,6 +272,7 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
195
272
  party_wall_stories_north.setDisplayName('Number of North facing stories with party wall')
196
273
  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')
197
274
  party_wall_stories_north.setDefaultValue(0)
275
+ party_wall_stories_north.setMinValue(0)
198
276
  args << party_wall_stories_north
199
277
 
200
278
  # Make argument for party_wall_stories_south
@@ -202,6 +280,7 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
202
280
  party_wall_stories_south.setDisplayName('Number of South facing stories with party wall')
203
281
  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')
204
282
  party_wall_stories_south.setDefaultValue(0)
283
+ party_wall_stories_south.setMinValue(0)
205
284
  args << party_wall_stories_south
206
285
 
207
286
  # Make argument for party_wall_stories_east
@@ -209,6 +288,7 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
209
288
  party_wall_stories_east.setDisplayName('Number of East facing stories with party wall')
210
289
  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')
211
290
  party_wall_stories_east.setDefaultValue(0)
291
+ party_wall_stories_east.setMinValue(0)
212
292
  args << party_wall_stories_east
213
293
 
214
294
  # Make argument for party_wall_stories_west
@@ -216,6 +296,7 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
216
296
  party_wall_stories_west.setDisplayName('Number of West facing stories with party wall')
217
297
  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')
218
298
  party_wall_stories_west.setDefaultValue(0)
299
+ party_wall_stories_west.setMinValue(0)
219
300
  args << party_wall_stories_west
220
301
 
221
302
  # make an argument for bottom_story_ground_exposed_floor
@@ -300,8 +381,29 @@ class CreateBarFromDEERBuildingTypeRatios < OpenStudio::Measure::ModelMeasure
300
381
  def run(model, runner, user_arguments)
301
382
  super(model, runner, user_arguments)
302
383
 
384
+ # assign the user inputs to variables
385
+ args = runner.getArgumentValues(arguments(model), user_arguments)
386
+ args = Hash[args.collect{ |k, v| [k.to_sym, v] }]
387
+ if !args then return false end
388
+
389
+ # todo - need to make use of this before pass to standards
390
+ use_upstream_args = args['use_upstream_args']
391
+
392
+ # open channel to log messages
393
+ reset_log
394
+
395
+ # Turn debugging output on/off
396
+ debug = false
397
+
398
+ # remove_non_resource_objects (this was not moved to standards, so added method in measure for now)
399
+ remove_non_resource_objects(runner, model)
400
+
303
401
  # method run from os_lib_model_generation.rb
304
- result = bar_from_building_type_ratios(model, runner, user_arguments)
402
+ result = OpenstudioStandards::Geometry.create_bar_from_building_type_ratios(model, args)
403
+
404
+ # gather log
405
+ log_messages_to_runner(runner, debug)
406
+ reset_log
305
407
 
306
408
  if result == false
307
409
  return false
@@ -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_bar_from_deer_building_type_ratios</name>
5
5
  <uid>aa4a7ecf-5bfd-4c5e-b0ca-e68babbacff1</uid>
6
- <version_id>861d3102-fcd5-4482-a2d1-77afb460b056</version_id>
7
- <version_modified>20230602T160045Z</version_modified>
6
+ <version_id>7eb05aa1-cb58-42b7-963b-a32c4bec23ac</version_id>
7
+ <version_modified>2024-05-20T07:54:33Z</version_modified>
8
8
  <xml_checksum>B31F0C1F</xml_checksum>
9
9
  <class_name>CreateBarFromDEERBuildingTypeRatios</class_name>
10
10
  <display_name>Create Bar From DEER Building Type Ratios</display_name>
@@ -254,6 +254,8 @@
254
254
  <required>true</required>
255
255
  <model_dependent>false</model_dependent>
256
256
  <default_value>0</default_value>
257
+ <min_value>0.000000</min_value>
258
+ <max_value>1.000000</max_value>
257
259
  </argument>
258
260
  <argument>
259
261
  <name>bldg_type_c</name>
@@ -380,6 +382,8 @@
380
382
  <required>true</required>
381
383
  <model_dependent>false</model_dependent>
382
384
  <default_value>0</default_value>
385
+ <min_value>0.000000</min_value>
386
+ <max_value>1.000000</max_value>
383
387
  </argument>
384
388
  <argument>
385
389
  <name>bldg_type_d</name>
@@ -506,6 +510,8 @@
506
510
  <required>true</required>
507
511
  <model_dependent>false</model_dependent>
508
512
  <default_value>0</default_value>
513
+ <min_value>0.000000</min_value>
514
+ <max_value>1.000000</max_value>
509
515
  </argument>
510
516
  <argument>
511
517
  <name>total_bldg_floor_area</name>
@@ -515,6 +521,7 @@
515
521
  <required>true</required>
516
522
  <model_dependent>false</model_dependent>
517
523
  <default_value>10000</default_value>
524
+ <min_value>0.000000</min_value>
518
525
  </argument>
519
526
  <argument>
520
527
  <name>single_floor_area</name>
@@ -525,6 +532,7 @@
525
532
  <required>true</required>
526
533
  <model_dependent>false</model_dependent>
527
534
  <default_value>0</default_value>
535
+ <min_value>0.000000</min_value>
528
536
  </argument>
529
537
  <argument>
530
538
  <name>floor_height</name>
@@ -535,6 +543,7 @@
535
543
  <required>true</required>
536
544
  <model_dependent>false</model_dependent>
537
545
  <default_value>0</default_value>
546
+ <min_value>0.000000</min_value>
538
547
  </argument>
539
548
  <argument>
540
549
  <name>custom_height_bar</name>
@@ -562,6 +571,7 @@
562
571
  <required>true</required>
563
572
  <model_dependent>false</model_dependent>
564
573
  <default_value>1</default_value>
574
+ <min_value>1.000000</min_value>
565
575
  </argument>
566
576
  <argument>
567
577
  <name>num_stories_below_grade</name>
@@ -570,6 +580,7 @@
570
580
  <required>true</required>
571
581
  <model_dependent>false</model_dependent>
572
582
  <default_value>0</default_value>
583
+ <min_value>0</min_value>
573
584
  </argument>
574
585
  <argument>
575
586
  <name>building_rotation</name>
@@ -629,6 +640,46 @@
629
640
  <value>DEER 2020</value>
630
641
  <display_name>DEER 2020</display_name>
631
642
  </choice>
643
+ <choice>
644
+ <value>ComStock DEER Pre-1975</value>
645
+ <display_name>ComStock DEER Pre-1975</display_name>
646
+ </choice>
647
+ <choice>
648
+ <value>ComStock DEER 1985</value>
649
+ <display_name>ComStock DEER 1985</display_name>
650
+ </choice>
651
+ <choice>
652
+ <value>ComStock DEER 1996</value>
653
+ <display_name>ComStock DEER 1996</display_name>
654
+ </choice>
655
+ <choice>
656
+ <value>ComStock DEER 2003</value>
657
+ <display_name>ComStock DEER 2003</display_name>
658
+ </choice>
659
+ <choice>
660
+ <value>ComStock DEER 2007</value>
661
+ <display_name>ComStock DEER 2007</display_name>
662
+ </choice>
663
+ <choice>
664
+ <value>ComStock DEER 2011</value>
665
+ <display_name>ComStock DEER 2011</display_name>
666
+ </choice>
667
+ <choice>
668
+ <value>ComStock DEER 2014</value>
669
+ <display_name>ComStock DEER 2014</display_name>
670
+ </choice>
671
+ <choice>
672
+ <value>ComStock DEER 2015</value>
673
+ <display_name>ComStock DEER 2015</display_name>
674
+ </choice>
675
+ <choice>
676
+ <value>ComStock DEER 2017</value>
677
+ <display_name>ComStock DEER 2017</display_name>
678
+ </choice>
679
+ <choice>
680
+ <value>ComStock DEER 2020</value>
681
+ <display_name>ComStock DEER 2020</display_name>
682
+ </choice>
632
683
  </choices>
633
684
  </argument>
634
685
  <argument>
@@ -639,6 +690,7 @@
639
690
  <required>true</required>
640
691
  <model_dependent>false</model_dependent>
641
692
  <default_value>0</default_value>
693
+ <min_value>0.000000</min_value>
642
694
  </argument>
643
695
  <argument>
644
696
  <name>perim_mult</name>
@@ -648,6 +700,7 @@
648
700
  <required>true</required>
649
701
  <model_dependent>false</model_dependent>
650
702
  <default_value>0</default_value>
703
+ <min_value>0.000000</min_value>
651
704
  </argument>
652
705
  <argument>
653
706
  <name>bar_width</name>
@@ -658,6 +711,7 @@
658
711
  <required>true</required>
659
712
  <model_dependent>false</model_dependent>
660
713
  <default_value>0</default_value>
714
+ <min_value>0.000000</min_value>
661
715
  </argument>
662
716
  <argument>
663
717
  <name>bar_sep_dist_mult</name>
@@ -676,6 +730,8 @@
676
730
  <required>true</required>
677
731
  <model_dependent>false</model_dependent>
678
732
  <default_value>0</default_value>
733
+ <min_value>0.000000</min_value>
734
+ <max_value>1.000000</max_value>
679
735
  </argument>
680
736
  <argument>
681
737
  <name>party_wall_fraction</name>
@@ -685,6 +741,8 @@
685
741
  <required>true</required>
686
742
  <model_dependent>false</model_dependent>
687
743
  <default_value>0</default_value>
744
+ <min_value>0.000000</min_value>
745
+ <max_value>1.000000</max_value>
688
746
  </argument>
689
747
  <argument>
690
748
  <name>party_wall_stories_north</name>
@@ -694,6 +752,7 @@
694
752
  <required>true</required>
695
753
  <model_dependent>false</model_dependent>
696
754
  <default_value>0</default_value>
755
+ <min_value>0</min_value>
697
756
  </argument>
698
757
  <argument>
699
758
  <name>party_wall_stories_south</name>
@@ -703,6 +762,7 @@
703
762
  <required>true</required>
704
763
  <model_dependent>false</model_dependent>
705
764
  <default_value>0</default_value>
765
+ <min_value>0</min_value>
706
766
  </argument>
707
767
  <argument>
708
768
  <name>party_wall_stories_east</name>
@@ -712,6 +772,7 @@
712
772
  <required>true</required>
713
773
  <model_dependent>false</model_dependent>
714
774
  <default_value>0</default_value>
775
+ <min_value>0</min_value>
715
776
  </argument>
716
777
  <argument>
717
778
  <name>party_wall_stories_west</name>
@@ -721,6 +782,7 @@
721
782
  <required>true</required>
722
783
  <model_dependent>false</model_dependent>
723
784
  <default_value>0</default_value>
785
+ <min_value>0</min_value>
724
786
  </argument>
725
787
  <argument>
726
788
  <name>bottom_story_ground_exposed_floor</name>
@@ -917,10 +979,22 @@
917
979
  </attributes>
918
980
  <files>
919
981
  <file>
920
- <filename>example_model.osm</filename>
921
- <filetype>osm</filetype>
922
- <usage_type>test</usage_type>
923
- <checksum>032BCDC9</checksum>
982
+ <filename>LICENSE.md</filename>
983
+ <filetype>md</filetype>
984
+ <usage_type>license</usage_type>
985
+ <checksum>BFFB1AA6</checksum>
986
+ </file>
987
+ <file>
988
+ <filename>README.md</filename>
989
+ <filetype>md</filetype>
990
+ <usage_type>readme</usage_type>
991
+ <checksum>38647660</checksum>
992
+ </file>
993
+ <file>
994
+ <filename>README.md.erb</filename>
995
+ <filetype>erb</filetype>
996
+ <usage_type>readmeerb</usage_type>
997
+ <checksum>8FAE2C4C</checksum>
924
998
  </file>
925
999
  <file>
926
1000
  <filename>ar_05.png</filename>
@@ -1049,22 +1123,15 @@
1049
1123
  <checksum>D1E7B644</checksum>
1050
1124
  </file>
1051
1125
  <file>
1052
- <filename>README.md.erb</filename>
1053
- <filetype>erb</filetype>
1054
- <usage_type>readmeerb</usage_type>
1055
- <checksum>8FAE2C4C</checksum>
1056
- </file>
1057
- <file>
1058
- <filename>README.md</filename>
1059
- <filetype>md</filetype>
1060
- <usage_type>readme</usage_type>
1061
- <checksum>CC366365</checksum>
1062
- </file>
1063
- <file>
1064
- <filename>LICENSE.md</filename>
1065
- <filetype>md</filetype>
1066
- <usage_type>license</usage_type>
1067
- <checksum>BFFB1AA6</checksum>
1126
+ <version>
1127
+ <software_program>OpenStudio</software_program>
1128
+ <identifier>2.0.0</identifier>
1129
+ <min_compatible>3.8.0</min_compatible>
1130
+ </version>
1131
+ <filename>measure.rb</filename>
1132
+ <filetype>rb</filetype>
1133
+ <usage_type>script</usage_type>
1134
+ <checksum>DC57753C</checksum>
1068
1135
  </file>
1069
1136
  <file>
1070
1137
  <filename>create_bar_from_deer_building_type_ratios_test.rb</filename>
@@ -1073,15 +1140,10 @@
1073
1140
  <checksum>D92EB772</checksum>
1074
1141
  </file>
1075
1142
  <file>
1076
- <version>
1077
- <software_program>OpenStudio</software_program>
1078
- <identifier>2.0.0</identifier>
1079
- <min_compatible>3.0.0</min_compatible>
1080
- </version>
1081
- <filename>measure.rb</filename>
1082
- <filetype>rb</filetype>
1083
- <usage_type>script</usage_type>
1084
- <checksum>71B75324</checksum>
1143
+ <filename>example_model.osm</filename>
1144
+ <filetype>osm</filetype>
1145
+ <usage_type>test</usage_type>
1146
+ <checksum>032BCDC9</checksum>
1085
1147
  </file>
1086
1148
  </files>
1087
1149
  </measure>