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
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7e1735d66cfff71d49328dedce34e00cddfe145c60f1e856132a97ed316f475
|
4
|
+
data.tar.gz: f7ab4a42c32c9e6a271d698d05783614845faa5cd8266a4e61fb98940785caee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c681fe2091e2bd259d9f045cd42889b8f2e6e782a8faa3076e0e77f58a7bc35750d4cc1f53864645aaa751b2ae2a298e4c8c86a96458486beb3642a856653ce
|
7
|
+
data.tar.gz: 669bdab312cb534c5450fb245347999f9fd27f46c0326feb928a50b9f63fc643fd2190ee315616563ac9e111bae1cd5b2b84c54d7f3a6e9473669d6c4ff1fcc7
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# OpenStudio Model Articulation Gems
|
2
2
|
|
3
|
+
## Version 0.10.0
|
4
|
+
* Support for OpenStudio 3.8 (upgrade to standards gem 0.6.0, extension gem 0.8.0)
|
5
|
+
* Support Ruby 3.2.2
|
6
|
+
|
7
|
+
## Version 0.9.0
|
8
|
+
* Support for OpenStudio 3.7 (upgrade to standards gem 0.5.0, extension gem 0.6.0)
|
9
|
+
* Fixed [#128]( https://github.com/NREL/openstudio-model-articulation-gem/pull/128 ), fix infiltration design day schedule inversion
|
10
|
+
* Fixed [#133]( https://github.com/NREL/openstudio-model-articulation-gem/pull/133 ), remove minimum_operation argument
|
11
|
+
|
3
12
|
## Version 0.8.0
|
4
13
|
* Fixed [#120]( https://github.com/NREL/openstudio-model-articulation-gem/pull/120 ), add set_nist_infiltration_correlations
|
5
14
|
* Fixed [#121]( https://github.com/NREL/openstudio-model-articulation-gem/pull/121 ), added better infiltration area logging
|
data/Gemfile
CHANGED
@@ -11,9 +11,16 @@ gemspec
|
|
11
11
|
# checkout the latest version (develop) from github.
|
12
12
|
allow_local = ENV['FAVOR_LOCAL_GEMS']
|
13
13
|
|
14
|
+
# Delete when these branchesa are merged and released
|
15
|
+
# gem 'openstudio-extension', github: 'NREL/OpenStudio-extension-gem', branch: 'wenyi-bypass-zlib'
|
16
|
+
# gem 'openstudio-standards', github: 'NREL/openstudio-standards', tag: 'v0.6.0.rc2', ref: "1c42110"
|
17
|
+
# gem 'openstudio_measure_tester', :git => 'https://github.com/NREL/OpenStudio-measure-tester-gem.git', :branch => 'wenyi-dependencies-update'
|
18
|
+
# gem 'openstudio-workflow', :git => 'https://github.com/NREL/OpenStudio-workflow-gem.git', :branch => 'develop', ref: "32126e9b9f6"
|
19
|
+
# gem 'bcl', :git => 'https://github.com/wenyikuang/bcl-gem.git', :branch => 'develop'
|
20
|
+
|
14
21
|
# Only uncomment if you need to test a different version of the extension gem
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
22
|
+
if allow_local && File.exist?('../OpenStudio-extension-gem')
|
23
|
+
gem 'openstudio-extension', path: '../OpenStudio-extension-gem'
|
24
|
+
elsif allow_local
|
25
|
+
gem 'openstudio-extension', github: 'NREL/OpenStudio-extension-gem', branch: 'develop'
|
26
|
+
end
|
data/Jenkinsfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
//Jenkins pipelines are stored in shared libaries. Please see: https://github.com/NREL/cbci_jenkins_libs
|
2
2
|
|
3
|
-
@Library('cbci_shared_libs') _
|
3
|
+
@Library('cbci_shared_libs@developExtension') _
|
4
4
|
|
5
5
|
// Build for PR to develop branch only.
|
6
6
|
if ((env.CHANGE_ID) && (env.CHANGE_TARGET) ) { // check if set
|
data/README.md
CHANGED
@@ -51,6 +51,8 @@ bundle exec rake openstudio:test_with_openstudio
|
|
51
51
|
|
52
52
|
|OpenStudio Model Articulation Gem|OpenStudio|Ruby|
|
53
53
|
|:--------------:|:----------:|:--------:|
|
54
|
+
| 0.10.0 | 3.8 | 3.2.2 |
|
55
|
+
| 0.9.0 | 3.7 | 2.7 |
|
54
56
|
| 0.8.0 | 3.6 | 2.7 |
|
55
57
|
| 0.7.0 | 3.5 | 2.7 |
|
56
58
|
| 0.6.0 - 0.6.1 | 3.4 | 2.7 |
|
@@ -12,10 +12,8 @@
|
|
12
12
|
# see the URL below for access to C++ documentation on model objects (click on "model" in the main window to view model objects)
|
13
13
|
# http://openstudio.nrel.gov/sites/openstudio.nrel.gov/files/nv_data/cpp_documentation_it/model/html/namespaces.html
|
14
14
|
|
15
|
-
# load OpenStudio measure libraries from openstudio-
|
16
|
-
require 'openstudio-
|
17
|
-
require 'openstudio/extension/core/os_lib_helper_methods'
|
18
|
-
require 'openstudio/extension/core/os_lib_geometry'
|
15
|
+
# load OpenStudio measure libraries from openstudio-standards gem
|
16
|
+
require 'openstudio-standards'
|
19
17
|
|
20
18
|
# load OpenStudio measure libraries
|
21
19
|
require "#{File.dirname(__FILE__)}/resources/os_lib_cofee"
|
@@ -78,8 +76,8 @@ class SimplifyGeometryToSlicedBar < OpenStudio::Measure::ModelMeasure
|
|
78
76
|
# get total floor area for building
|
79
77
|
building = model.getBuilding
|
80
78
|
totalFloorArea = building.floorArea # TODO: - this doesn't include spaces tagged as not included in floor area. This would include spaces like plenums and attics
|
81
|
-
runner.registerInfo("Initial Floor Area is #{
|
82
|
-
|
79
|
+
runner.registerInfo("Initial Floor Area is #{OpenStudio.toNeatString(OpenStudio.convert(totalFloorArea, 'm^2', 'ft^2').get, 0, true)}.")
|
80
|
+
|
83
81
|
# get get number of floors. Assume that user has properly used story object.
|
84
82
|
numStories = 0
|
85
83
|
stories = model.getBuildingStorys
|
@@ -108,15 +106,15 @@ class SimplifyGeometryToSlicedBar < OpenStudio::Measure::ModelMeasure
|
|
108
106
|
spaceTypes.each do |spaceType|
|
109
107
|
next if spaceType.spaces.empty?
|
110
108
|
|
111
|
-
result =
|
112
|
-
spaceTypeHash[spaceType] = result
|
113
|
-
totalSpaceTypeArea += result
|
109
|
+
result = OpenstudioStandards::Geometry.spaces_get_floor_area(spaceType.spaces)
|
110
|
+
spaceTypeHash[spaceType] = result
|
111
|
+
totalSpaceTypeArea += result
|
114
112
|
end
|
115
113
|
|
116
|
-
runner.registerInfo("Initial Space Type Total Floor Area is #{
|
114
|
+
runner.registerInfo("Initial Space Type Total Floor Area is #{OpenStudio.toNeatString(OpenStudio.convert(totalSpaceTypeArea, 'm^2', 'ft^2').get, 0, true)}.")
|
117
115
|
|
118
116
|
spaceTypeHash.sort_by { |key, value| value }.reverse_each do |k, v|
|
119
|
-
runner.registerInfo("Floor Area for #{k.name} is #{
|
117
|
+
runner.registerInfo("Floor Area for #{k.name} is #{OpenStudio.toNeatString(OpenStudio.convert(v, 'm^2', 'ft^2').get, 0, true)}.")
|
120
118
|
end
|
121
119
|
|
122
120
|
# TODO: - warn if some spaces are not included in floor area (plenum and attic)
|
@@ -127,19 +125,18 @@ class SimplifyGeometryToSlicedBar < OpenStudio::Measure::ModelMeasure
|
|
127
125
|
# todo - this measure wont' touch HVAC systems, consider warning user if model already has HVAC, as it won't be hooked up to anything after this.
|
128
126
|
|
129
127
|
# get wall and window area by facade
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
westWallGross = OsLib_HelperMethods.neatConvertWithUnitDisplay(areaByFacade['westWall'], 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
|
128
|
+
areaByFacade = OpenstudioStandards::Geometry.model_get_exterior_window_and_wall_area_by_orientation(model)
|
129
|
+
northWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['north_wall'], 'm^2', 'ft^2').get, 0, true)
|
130
|
+
southWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['south_wall'], 'm^2', 'ft^2').get, 0, true)
|
131
|
+
eastWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['east_wall'], 'm^2', 'ft^2').get, 0, true)
|
132
|
+
westWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['west_wall'], 'm^2', 'ft^2').get, 0, true)
|
136
133
|
runner.registerInfo("Initial Exterior Wall Breakdown. North: #{northWallGross}, South: #{southWallGross}, East: #{eastWallGross}, West: #{westWallGross}")
|
137
134
|
|
138
135
|
# reporting initial condition of model
|
139
|
-
floorArea_si =
|
140
|
-
floorArea_ip =
|
141
|
-
exteriorArea_si =
|
142
|
-
exteriorArea_ip =
|
136
|
+
floorArea_si = OpenstudioStandards::Geometry.spaces_get_floor_area(model.getSpaces)
|
137
|
+
floorArea_ip = OpenStudio.toNeatString(OpenStudio.convert(floorArea_si, 'm^2', 'ft^2').get, 0, true)
|
138
|
+
exteriorArea_si = OpenstudioStandards::Geometry.spaces_get_exterior_wall_area(model.getSpaces)
|
139
|
+
exteriorArea_ip = OpenStudio.toNeatString(OpenStudio.convert(exteriorArea_si, 'm^2', 'ft^2').get, 0, true)
|
143
140
|
|
144
141
|
runner.registerInitialCondition("The building started with #{floorArea_ip} of floor area, and #{exteriorArea_ip} of exterior wall area.")
|
145
142
|
|
@@ -159,9 +156,9 @@ class SimplifyGeometryToSlicedBar < OpenStudio::Measure::ModelMeasure
|
|
159
156
|
lengthX = xmax - xmin
|
160
157
|
lengthY = ymax - ymin
|
161
158
|
areaBounding = lengthX * lengthY
|
162
|
-
lengthX_display =
|
163
|
-
lengthY_display =
|
164
|
-
areaBounding_display =
|
159
|
+
lengthX_display = OpenStudio.toNeatString(OpenStudio.convert(lengthX, 'm', 'ft').get, 0, true)
|
160
|
+
lengthY_display = OpenStudio.toNeatString(OpenStudio.convert(lengthY, 'm', 'ft').get, 0, true)
|
161
|
+
areaBounding_display = OpenStudio.toNeatString(OpenStudio.convert(areaBounding, 'm^2', 'ft^2').get, 0, true)
|
165
162
|
runner.registerInfo("Bounding box area is #{areaBounding_display}. #{lengthX_display} by #{lengthY_display}.")
|
166
163
|
|
167
164
|
# get target footprint size
|
@@ -187,8 +184,8 @@ class SimplifyGeometryToSlicedBar < OpenStudio::Measure::ModelMeasure
|
|
187
184
|
|
188
185
|
else
|
189
186
|
areaTarget = totalFloorArea / numStories
|
190
|
-
lengthXTarget_Bar1 = (areaByFacade['
|
191
|
-
lengthYTarget_Bar2 = (areaByFacade['
|
187
|
+
lengthXTarget_Bar1 = (areaByFacade['north_wall'] + areaByFacade['south_wall']) / (2 * (zmax - zmin))
|
188
|
+
lengthYTarget_Bar2 = (areaByFacade['east_wall'] + areaByFacade['west_wall']) / (2 * (zmax - zmin))
|
192
189
|
lengthYTarget_Bar1 = areaTarget / (lengthXTarget_Bar1 + lengthYTarget_Bar2)
|
193
190
|
lengthXTarget_Bar2 = lengthYTarget_Bar1
|
194
191
|
|
@@ -243,20 +240,18 @@ class SimplifyGeometryToSlicedBar < OpenStudio::Measure::ModelMeasure
|
|
243
240
|
|
244
241
|
end
|
245
242
|
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
eastWallGross = OsLib_HelperMethods.neatConvertWithUnitDisplay(areaByFacade['eastWall'], 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
|
252
|
-
westWallGross = OsLib_HelperMethods.neatConvertWithUnitDisplay(areaByFacade['westWall'], 'm^2', 'ft^2', 0, unitBefore = false, unitAfter = true, space = true, parentheses = true)
|
243
|
+
areaByFacade = OpenstudioStandards::Geometry.model_get_exterior_window_and_wall_area_by_orientation(model)
|
244
|
+
northWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['north_wall'], 'm^2', 'ft^2').get, 0, true)
|
245
|
+
southWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['south_wall'], 'm^2', 'ft^2').get, 0, true)
|
246
|
+
eastWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['east_wall'], 'm^2', 'ft^2').get, 0, true)
|
247
|
+
westWallGross = OpenStudio.toNeatString(OpenStudio.convert(areaByFacade['west_wall'], 'm^2', 'ft^2').get, 0, true)
|
253
248
|
runner.registerInfo("Final Exterior Wall Breakdown. North: #{northWallGross}, South: #{southWallGross}, East: #{eastWallGross}, West: #{westWallGross}")
|
254
249
|
|
255
250
|
# reporting final condition of model
|
256
|
-
floorArea_si =
|
257
|
-
floorArea_ip =
|
258
|
-
exteriorArea_si =
|
259
|
-
exteriorArea_ip =
|
251
|
+
floorArea_si = OpenstudioStandards::Geometry.spaces_get_floor_area(model.getSpaces)
|
252
|
+
floorArea_ip = OpenStudio.toNeatString(OpenStudio.convert(floorArea_si, 'm^2', 'ft^2').get, 0, true)
|
253
|
+
exteriorArea_si = OpenstudioStandards::Geometry.spaces_get_exterior_wall_area(model.getSpaces)
|
254
|
+
exteriorArea_ip = OpenStudio.toNeatString(OpenStudio.convert(exteriorArea_si, 'm^2', 'ft^2').get, 0, true)
|
260
255
|
|
261
256
|
runner.registerFinalCondition("The building finished with #{floorArea_ip} of floor area, and #{exteriorArea_ip} of exterior wall area.")
|
262
257
|
|
@@ -1,50 +1,16 @@
|
|
1
1
|
<?xml version="1.0"?>
|
2
2
|
<measure>
|
3
|
-
<schema_version>3.
|
3
|
+
<schema_version>3.1</schema_version>
|
4
4
|
<name>simplify_geometry_to_sliced_bar</name>
|
5
5
|
<uid>eb218516-5fa5-47fe-948d-274777c7d592</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>3c5abf7b-a4fb-482a-b075-be91623c8f4f</version_id>
|
7
|
+
<version_modified>2024-05-20T07:54:33Z</version_modified>
|
8
8
|
<xml_checksum>45097B60</xml_checksum>
|
9
9
|
<class_name>SimplifyGeometryToSlicedBar</class_name>
|
10
10
|
<display_name>SimplifyGeometryToSlicedBar</display_name>
|
11
11
|
<description>This is an experimental measure looking at ways to simply the geometry, or to create geometry when you only no percentage of space types number of floors and total area. This technique will match the building floor area but will sacrifice the exterior exposure. So it will produce better results on more boxy buildings than a building with many wings. I may try to come up with solution that also tries to maintain exterior exposure in another version.</description>
|
12
12
|
<modeler_description>I'm going to extract space type area breakdown and number of floors from the source model. I'll also keep track of exterior exposure. I won't directly use exterior exposure but can report the change in this as a kind of confidence metric. I'll then create a bar building using the bounding box aspect ratio, but shrunk to fit the building area. I will slice the building across the shorter axis by space type. The two most prevalent space types will go on the outside of the building. Instead of core and perimeter zoning the building will have a variation with square corners. I will create one zone per space, and will use a zone multiplier for any building more than 3 stories tall.
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
14
|
In a future version I may try to identify similar spaces types and blend them together before slicing, although I expect that will be a separate measure, so it is more modular.</modeler_description>
|
49
15
|
<arguments>
|
50
16
|
<argument>
|
@@ -89,10 +55,10 @@ In a future version I may try to identify similar spaces types and blend them to
|
|
89
55
|
</attributes>
|
90
56
|
<files>
|
91
57
|
<file>
|
92
|
-
<filename>
|
93
|
-
<filetype>
|
94
|
-
<usage_type>
|
95
|
-
<checksum>
|
58
|
+
<filename>LICENSE.md</filename>
|
59
|
+
<filetype>md</filetype>
|
60
|
+
<usage_type>license</usage_type>
|
61
|
+
<checksum>BFFB1AA6</checksum>
|
96
62
|
</file>
|
97
63
|
<file>
|
98
64
|
<filename>README.md</filename>
|
@@ -107,10 +73,27 @@ In a future version I may try to identify similar spaces types and blend them to
|
|
107
73
|
<checksum>703C9964</checksum>
|
108
74
|
</file>
|
109
75
|
<file>
|
110
|
-
<
|
111
|
-
|
76
|
+
<version>
|
77
|
+
<software_program>OpenStudio</software_program>
|
78
|
+
<identifier>2.0.0</identifier>
|
79
|
+
<min_compatible>3.8.0</min_compatible>
|
80
|
+
</version>
|
81
|
+
<filename>measure.rb</filename>
|
82
|
+
<filetype>rb</filetype>
|
83
|
+
<usage_type>script</usage_type>
|
84
|
+
<checksum>1F503C21</checksum>
|
85
|
+
</file>
|
86
|
+
<file>
|
87
|
+
<filename>os_lib_cofee.rb</filename>
|
88
|
+
<filetype>rb</filetype>
|
89
|
+
<usage_type>resource</usage_type>
|
90
|
+
<checksum>2C77E71F</checksum>
|
91
|
+
</file>
|
92
|
+
<file>
|
93
|
+
<filename>SimplifyGeometryToSlicedBar_Test.rb</filename>
|
94
|
+
<filetype>rb</filetype>
|
112
95
|
<usage_type>test</usage_type>
|
113
|
-
<checksum>
|
96
|
+
<checksum>03F6E2E5</checksum>
|
114
97
|
</file>
|
115
98
|
<file>
|
116
99
|
<filename>UShapedHotelExample/files/USA_IL_Chicago-OHare.Intl.AP.725300_TMY3.epw</filename>
|
@@ -125,45 +108,16 @@ In a future version I may try to identify similar spaces types and blend them to
|
|
125
108
|
<checksum>EE6FAF90</checksum>
|
126
109
|
</file>
|
127
110
|
<file>
|
128
|
-
<filename>
|
129
|
-
<filetype>
|
130
|
-
<usage_type>
|
131
|
-
<checksum>
|
132
|
-
</file>
|
133
|
-
<file>
|
134
|
-
<filename>os_lib_helper_methods.rb</filename>
|
135
|
-
<filetype>rb</filetype>
|
136
|
-
<usage_type>resource</usage_type>
|
137
|
-
<checksum>996C5B97</checksum>
|
138
|
-
</file>
|
139
|
-
<file>
|
140
|
-
<filename>os_lib_cofee.rb</filename>
|
141
|
-
<filetype>rb</filetype>
|
142
|
-
<usage_type>resource</usage_type>
|
143
|
-
<checksum>7162FF96</checksum>
|
144
|
-
</file>
|
145
|
-
<file>
|
146
|
-
<version>
|
147
|
-
<software_program>OpenStudio</software_program>
|
148
|
-
<identifier>2.0.0</identifier>
|
149
|
-
<min_compatible>2.8.0</min_compatible>
|
150
|
-
</version>
|
151
|
-
<filename>measure.rb</filename>
|
152
|
-
<filetype>rb</filetype>
|
153
|
-
<usage_type>script</usage_type>
|
154
|
-
<checksum>8D1BD320</checksum>
|
155
|
-
</file>
|
156
|
-
<file>
|
157
|
-
<filename>os_lib_geometry.rb</filename>
|
158
|
-
<filetype>rb</filetype>
|
159
|
-
<usage_type>resource</usage_type>
|
160
|
-
<checksum>788EF0F2</checksum>
|
111
|
+
<filename>UShapedHotelExample/run.db</filename>
|
112
|
+
<filetype>db</filetype>
|
113
|
+
<usage_type>test</usage_type>
|
114
|
+
<checksum>9230B5CD</checksum>
|
161
115
|
</file>
|
162
116
|
<file>
|
163
|
-
<filename>
|
164
|
-
<filetype>
|
117
|
+
<filename>UShapedHotelExample.osm</filename>
|
118
|
+
<filetype>osm</filetype>
|
165
119
|
<usage_type>test</usage_type>
|
166
|
-
<checksum>
|
120
|
+
<checksum>7E96D119</checksum>
|
167
121
|
</file>
|
168
122
|
</files>
|
169
123
|
</measure>
|
@@ -83,9 +83,9 @@ module OsLib_Cofee
|
|
83
83
|
'name' => nil,
|
84
84
|
'spaceType' => k,
|
85
85
|
'story' => story,
|
86
|
-
'
|
87
|
-
'
|
88
|
-
'
|
86
|
+
'make_thermal_zone' => true,
|
87
|
+
'thermal_zone' => nil,
|
88
|
+
'thermal_zone_multiplier' => thermalZoneMultiplier,
|
89
89
|
'floor_to_floor_height' => floor_to_floor_height
|
90
90
|
}
|
91
91
|
|
@@ -117,9 +117,10 @@ module OsLib_Cofee
|
|
117
117
|
perim_polygon_b << OpenStudio::Point3d.new(x + lengthXTarget * (v / totalFloorArea), y + lengthYTarget - perimeterDepth, z)
|
118
118
|
|
119
119
|
# run method to make spaces
|
120
|
-
|
121
|
-
tempSpaceArray <<
|
122
|
-
tempSpaceArray <<
|
120
|
+
# todo - standards methods are not found here
|
121
|
+
tempSpaceArray << OpenstudioStandards::Geometry.create_space_from_polygon(model, perim_origin_a, perim_polygon_a, options) # model, origin, polygon, options
|
122
|
+
tempSpaceArray << OpenstudioStandards::Geometry.create_space_from_polygon(model, core_origin, core_polygon, options) # model, origin, polygon, options
|
123
|
+
tempSpaceArray << OpenstudioStandards::Geometry.create_space_from_polygon(model, perim_origin_b, perim_polygon_b, options) # model, origin, polygon, options
|
123
124
|
|
124
125
|
elsif lengthYTarget > perimeterDepth * 2 # slice into two peremeter zones but no core
|
125
126
|
|
@@ -140,8 +141,8 @@ module OsLib_Cofee
|
|
140
141
|
perim_polygon_b << OpenStudio::Point3d.new(x + lengthXTarget * (v / totalFloorArea), y + lengthYTarget / 2, z)
|
141
142
|
|
142
143
|
# run method to make spaces
|
143
|
-
tempSpaceArray <<
|
144
|
-
tempSpaceArray <<
|
144
|
+
tempSpaceArray << OpenStudioStandards::Geometry.create_space_from_polygon(model, perim_origin_a, perim_polygon_a, options) # model, origin, polygon, options
|
145
|
+
tempSpaceArray << OpenStudioStandards::Geometry.create_space_from_polygon(model, perim_origin_b, perim_polygon_b, options) # model, origin, polygon, options
|
145
146
|
|
146
147
|
else # don't slice into core and perimeter
|
147
148
|
|
@@ -154,7 +155,7 @@ module OsLib_Cofee
|
|
154
155
|
core_polygon << OpenStudio::Point3d.new(x + lengthXTarget * (v / totalFloorArea), y, z)
|
155
156
|
|
156
157
|
# run method to make space
|
157
|
-
tempSpaceArray <<
|
158
|
+
tempSpaceArray << OpenStudioStandards::Geometry.create_space_from_polygon(model, core_origin, core_polygon, options) # model, origin, polygon, options
|
158
159
|
|
159
160
|
end
|
160
161
|
|
@@ -16,15 +16,6 @@
|
|
16
16
|
class SpaceTypeAndConstructionSetWizard < OpenStudio::Measure::ModelMeasure
|
17
17
|
require 'openstudio-standards'
|
18
18
|
|
19
|
-
# load OpenStudio measure libraries from openstudio-extension gem
|
20
|
-
require 'openstudio-extension'
|
21
|
-
require 'openstudio/extension/core/os_lib_helper_methods'
|
22
|
-
require 'openstudio/extension/core/os_lib_model_generation'
|
23
|
-
|
24
|
-
# resource files used by measure
|
25
|
-
include OsLib_HelperMethods
|
26
|
-
include OsLib_ModelGeneration
|
27
|
-
|
28
19
|
# define the name that a user will see, this method may be deprecated as
|
29
20
|
# the display name in PAT comes from the name field in measure.xml
|
30
21
|
def name
|
@@ -46,19 +37,19 @@ class SpaceTypeAndConstructionSetWizard < OpenStudio::Measure::ModelMeasure
|
|
46
37
|
args = OpenStudio::Measure::OSArgumentVector.new
|
47
38
|
|
48
39
|
# Make an argument for the building type
|
49
|
-
building_type = OpenStudio::Measure::OSArgument.makeChoiceArgument('building_type', get_doe_building_types, true)
|
40
|
+
building_type = OpenStudio::Measure::OSArgument.makeChoiceArgument('building_type', OpenstudioStandards::CreateTypical.get_doe_building_types, true)
|
50
41
|
building_type.setDisplayName('Building Type.')
|
51
42
|
building_type.setDefaultValue('SmallOffice')
|
52
43
|
args << building_type
|
53
44
|
|
54
45
|
# Make an argument for the template
|
55
|
-
template = OpenStudio::Measure::OSArgument.makeChoiceArgument('template', get_doe_templates, true)
|
46
|
+
template = OpenStudio::Measure::OSArgument.makeChoiceArgument('template', OpenstudioStandards::CreateTypical.get_doe_templates, true)
|
56
47
|
template.setDisplayName('Template.')
|
57
48
|
template.setDefaultValue('90.1-2010')
|
58
49
|
args << template
|
59
50
|
|
60
51
|
# Make an argument for the climate zone
|
61
|
-
climate_zone = OpenStudio::Measure::OSArgument.makeChoiceArgument('climate_zone', get_doe_climate_zones, true)
|
52
|
+
climate_zone = OpenStudio::Measure::OSArgument.makeChoiceArgument('climate_zone', OpenstudioStandards::CreateTypical.get_doe_climate_zones, true)
|
62
53
|
climate_zone.setDisplayName('Climate Zone.')
|
63
54
|
climate_zone.setDefaultValue('ASHRAE 169-2013-2A')
|
64
55
|
args << climate_zone
|
@@ -88,7 +79,13 @@ class SpaceTypeAndConstructionSetWizard < OpenStudio::Measure::ModelMeasure
|
|
88
79
|
def run(model, runner, user_arguments)
|
89
80
|
super(model, runner, user_arguments)
|
90
81
|
|
91
|
-
|
82
|
+
# assign the user inputs to variables
|
83
|
+
args = runner.getArgumentValues(arguments(model), user_arguments)
|
84
|
+
args = Hash[args.collect{ |k, v| [k.to_s, v] }]
|
85
|
+
if !args then return false end
|
86
|
+
|
87
|
+
# run create_space_types_and_constructions
|
88
|
+
results = OpenstudioStandards::CreateTypical.create_space_types_and_constructions(model, args['building_type'], args['template'], args['climate_zone'])
|
92
89
|
|
93
90
|
if results == false
|
94
91
|
return false
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<?xml version="1.0"?>
|
2
2
|
<measure>
|
3
|
-
<schema_version>3.
|
3
|
+
<schema_version>3.1</schema_version>
|
4
4
|
<name>space_type_and_construction_set_wizard</name>
|
5
5
|
<uid>7c65af63-4316-47c9-b7a5-68d7a019e533</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>
|
6
|
+
<version_id>0cefd43c-95fd-49ff-8d9d-5794f8918316</version_id>
|
7
|
+
<version_modified>2024-05-20T07:54:33Z</version_modified>
|
8
8
|
<xml_checksum>057E8D9D</xml_checksum>
|
9
9
|
<class_name>SpaceTypeAndConstructionSetWizard</class_name>
|
10
10
|
<display_name>Space Type and Construction Set Wizard</display_name>
|
@@ -343,16 +343,16 @@
|
|
343
343
|
</attributes>
|
344
344
|
<files>
|
345
345
|
<file>
|
346
|
-
<filename>
|
347
|
-
<filetype>
|
348
|
-
<usage_type>
|
349
|
-
<checksum>
|
346
|
+
<filename>LICENSE.md</filename>
|
347
|
+
<filetype>md</filetype>
|
348
|
+
<usage_type>license</usage_type>
|
349
|
+
<checksum>BFFB1AA6</checksum>
|
350
350
|
</file>
|
351
351
|
<file>
|
352
|
-
<filename>
|
353
|
-
<filetype>
|
354
|
-
<usage_type>
|
355
|
-
<checksum>
|
352
|
+
<filename>README.md</filename>
|
353
|
+
<filetype>md</filetype>
|
354
|
+
<usage_type>readme</usage_type>
|
355
|
+
<checksum>BF3EEE84</checksum>
|
356
356
|
</file>
|
357
357
|
<file>
|
358
358
|
<filename>README.md.erb</filename>
|
@@ -367,10 +367,15 @@
|
|
367
367
|
<checksum>63D51488</checksum>
|
368
368
|
</file>
|
369
369
|
<file>
|
370
|
-
<
|
371
|
-
|
372
|
-
|
373
|
-
|
370
|
+
<version>
|
371
|
+
<software_program>OpenStudio</software_program>
|
372
|
+
<identifier>2.0.0</identifier>
|
373
|
+
<min_compatible>3.8.0</min_compatible>
|
374
|
+
</version>
|
375
|
+
<filename>measure.rb</filename>
|
376
|
+
<filetype>rb</filetype>
|
377
|
+
<usage_type>script</usage_type>
|
378
|
+
<checksum>D188C607</checksum>
|
374
379
|
</file>
|
375
380
|
<file>
|
376
381
|
<filename>design_doc.txt</filename>
|
@@ -379,10 +384,10 @@
|
|
379
384
|
<checksum>86154A1B</checksum>
|
380
385
|
</file>
|
381
386
|
<file>
|
382
|
-
<filename>
|
383
|
-
<filetype>
|
384
|
-
<usage_type>
|
385
|
-
<checksum>
|
387
|
+
<filename>EmptySeedModel.osm</filename>
|
388
|
+
<filetype>osm</filetype>
|
389
|
+
<usage_type>test</usage_type>
|
390
|
+
<checksum>50769D09</checksum>
|
386
391
|
</file>
|
387
392
|
<file>
|
388
393
|
<filename>SpaceTypeAndConstructionSetWizard_Test.rb</filename>
|
@@ -391,15 +396,10 @@
|
|
391
396
|
<checksum>BC34B520</checksum>
|
392
397
|
</file>
|
393
398
|
<file>
|
394
|
-
<
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
</version>
|
399
|
-
<filename>measure.rb</filename>
|
400
|
-
<filetype>rb</filetype>
|
401
|
-
<usage_type>script</usage_type>
|
402
|
-
<checksum>3292DA74</checksum>
|
399
|
+
<filename>two_story_bar.osm</filename>
|
400
|
+
<filetype>osm</filetype>
|
401
|
+
<usage_type>test</usage_type>
|
402
|
+
<checksum>85FF42E2</checksum>
|
403
403
|
</file>
|
404
404
|
</files>
|
405
405
|
</measure>
|
@@ -8,18 +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_model_generation'
|
15
|
-
require 'openstudio/extension/core/os_lib_model_simplification'
|
16
|
-
|
17
11
|
# start the measure
|
18
12
|
class BlendedSpaceTypeFromFloorAreaRatios < OpenStudio::Measure::ModelMeasure
|
19
|
-
# resource file modules
|
20
|
-
include OsLib_HelperMethods
|
21
|
-
include OsLib_ModelGeneration
|
22
|
-
include OsLib_ModelSimplification
|
23
13
|
|
24
14
|
# human readable name
|
25
15
|
def name
|
@@ -36,6 +26,33 @@ class BlendedSpaceTypeFromFloorAreaRatios < OpenStudio::Measure::ModelMeasure
|
|
36
26
|
return 'To determine default ratio look at the building type, and try to infer template (from building name) and set default ratios saved in the resources folder.'
|
37
27
|
end
|
38
28
|
|
29
|
+
# gather standards info for space type array
|
30
|
+
def getSpaceTypeStandardsInformation(spaceTypeArray)
|
31
|
+
# hash of space types
|
32
|
+
spaceTypeStandardsInfoHash = {}
|
33
|
+
|
34
|
+
spaceTypeArray.each do |spaceType|
|
35
|
+
# get standards building
|
36
|
+
if !spaceType.standardsBuildingType.empty?
|
37
|
+
standardsBuilding = spaceType.standardsBuildingType.get
|
38
|
+
else
|
39
|
+
standardsBuilding = nil
|
40
|
+
end
|
41
|
+
|
42
|
+
# get standards space type
|
43
|
+
if !spaceType.standardsSpaceType.empty?
|
44
|
+
standardsSpaceType = spaceType.standardsSpaceType.get
|
45
|
+
else
|
46
|
+
standardsSpaceType = nil
|
47
|
+
end
|
48
|
+
|
49
|
+
# populate hash
|
50
|
+
spaceTypeStandardsInfoHash[spaceType] = [standardsBuilding, standardsSpaceType]
|
51
|
+
end
|
52
|
+
|
53
|
+
return spaceTypeStandardsInfoHash
|
54
|
+
end
|
55
|
+
|
39
56
|
# define the arguments that the user will input
|
40
57
|
def arguments(model)
|
41
58
|
args = OpenStudio::Measure::OSArgumentVector.new
|
@@ -101,12 +118,12 @@ class BlendedSpaceTypeFromFloorAreaRatios < OpenStudio::Measure::ModelMeasure
|
|
101
118
|
# assume 2013 if can't infer from name
|
102
119
|
template = '90.1-2013'
|
103
120
|
end
|
104
|
-
|
121
|
+
|
105
122
|
# get standards info for existing space types
|
106
|
-
space_type_standards_info_hash =
|
123
|
+
space_type_standards_info_hash = getSpaceTypeStandardsInformation(model.getSpaceTypes)
|
107
124
|
|
108
125
|
# lookup ratios
|
109
|
-
space_type_hash = get_space_types_from_building_type(building_type
|
126
|
+
space_type_hash = OpenstudioStandards::CreateTypical.get_space_types_from_building_type(building_type) #just 1 instead of 4 args
|
110
127
|
if space_type_hash == false
|
111
128
|
default_string = 'Attempt to automatically generate space type ratio string failed, enter manually.'
|
112
129
|
else
|
@@ -174,7 +191,7 @@ class BlendedSpaceTypeFromFloorAreaRatios < OpenStudio::Measure::ModelMeasure
|
|
174
191
|
end
|
175
192
|
|
176
193
|
# run method to create blended space type
|
177
|
-
blended_space_type = blend_space_types_from_floor_area_ratio(
|
194
|
+
blended_space_type = OpenstudioStandards::CreateTypical.blend_space_types_from_floor_area_ratio(model, space_types_to_blend_hash)
|
178
195
|
if blended_space_type.nil?
|
179
196
|
return false
|
180
197
|
end
|