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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile +12 -5
- data/Jenkinsfile +1 -1
- data/README.md +2 -0
- data/lib/measures/SimplifyGeometryToSlicedBar/measure.rb +32 -37
- data/lib/measures/SimplifyGeometryToSlicedBar/measure.xml +34 -80
- data/lib/measures/SimplifyGeometryToSlicedBar/resources/os_lib_cofee.rb +10 -9
- data/lib/measures/SpaceTypeAndConstructionSetWizard/measure.rb +10 -13
- data/lib/measures/SpaceTypeAndConstructionSetWizard/measure.xml +28 -28
- data/lib/measures/blended_space_type_from_floor_area_ratios/measure.rb +31 -14
- data/lib/measures/blended_space_type_from_floor_area_ratios/measure.xml +36 -36
- data/lib/measures/blended_space_type_from_model/measure.rb +12 -5
- data/lib/measures/blended_space_type_from_model/measure.xml +47 -47
- data/lib/measures/create_DOE_prototype_building/measure.rb +1 -1
- data/lib/measures/create_DOE_prototype_building/measure.xml +19 -875
- data/lib/measures/create_bar_from_building_type_ratios/README.md +2 -13
- data/lib/measures/create_bar_from_building_type_ratios/measure.rb +122 -30
- data/lib/measures/create_bar_from_building_type_ratios/measure.xml +108 -349
- data/lib/measures/create_bar_from_deer_building_type_ratios/README.md +21 -1
- data/lib/measures/create_bar_from_deer_building_type_ratios/measure.rb +120 -18
- data/lib/measures/create_bar_from_deer_building_type_ratios/measure.xml +94 -32
- data/lib/measures/create_bar_from_doe_building_type_ratios/measure.rb +127 -18
- data/lib/measures/create_bar_from_doe_building_type_ratios/measure.xml +48 -26
- data/lib/measures/create_bar_from_model/measure.rb +17 -18
- data/lib/measures/create_bar_from_model/measure.xml +41 -41
- data/lib/measures/create_bar_from_space_type_ratios/README.md +1 -1
- data/lib/measures/create_bar_from_space_type_ratios/measure.rb +94 -14
- data/lib/measures/create_bar_from_space_type_ratios/measure.xml +104 -63
- data/lib/measures/create_baseline_building/measure.xml +33 -33
- data/lib/measures/create_deer_prototype_building/measure.xml +15 -15
- data/lib/measures/create_parametric_schedules/measure.rb +17 -20
- data/lib/measures/create_parametric_schedules/measure.xml +15 -15
- data/lib/measures/create_typical_building_from_model/README.md +16 -16
- data/lib/measures/create_typical_building_from_model/measure.rb +84 -18
- data/lib/measures/create_typical_building_from_model/measure.xml +159 -211
- data/lib/measures/create_typical_deer_building_from_model/README.md +38 -5
- data/lib/measures/create_typical_deer_building_from_model/measure.rb +84 -12
- data/lib/measures/create_typical_deer_building_from_model/measure.xml +165 -65
- data/lib/measures/create_typical_doe_building_from_model/README.md +17 -4
- data/lib/measures/create_typical_doe_building_from_model/measure.rb +84 -12
- data/lib/measures/create_typical_doe_building_from_model/measure.xml +125 -65
- data/lib/measures/deer_space_type_and_construction_set_wizard/measure.rb +13 -16
- data/lib/measures/deer_space_type_and_construction_set_wizard/measure.xml +72 -29
- data/lib/measures/make_shading_surfaces_based_on_zone_multipliers/measure.rb +4 -4
- data/lib/measures/make_shading_surfaces_based_on_zone_multipliers/measure.xml +21 -21
- data/lib/measures/merge_spaces_from_external_file/measure.rb +4 -4
- data/lib/measures/merge_spaces_from_external_file/measure.xml +34 -34
- data/lib/measures/radiant_slab_with_doas/README.md +0 -8
- data/lib/measures/radiant_slab_with_doas/measure.rb +2 -11
- data/lib/measures/radiant_slab_with_doas/measure.xml +31 -40
- data/lib/measures/replace_geometry_by_story/measure.rb +6 -10
- data/lib/measures/replace_geometry_by_story/measure.xml +19 -19
- data/lib/measures/set_nist_infiltration_correlations/measure.rb +34 -25
- data/lib/measures/set_nist_infiltration_correlations/measure.xml +38 -38
- data/lib/openstudio/model_articulation/version.rb +1 -1
- data/openstudio-model-articulation.gemspec +11 -4
- metadata +69 -16
- data/lib/measures/SimplifyGeometryToSlicedBar/resources/os_lib_geometry.rb +0 -1174
- data/lib/measures/SimplifyGeometryToSlicedBar/resources/os_lib_helper_methods.rb +0 -367
- data/lib/measures/create_typical_building_from_model/resources/Model.hvac.rb +0 -608
@@ -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"
|
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", "
|
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',
|
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(
|
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
|
-
|
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
|