honeybee-openstudio 2.20.7 → 2.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yaml +12 -1
- data/honeybee-openstudio.gemspec +1 -1
- data/lib/from_openstudio.rb +1 -0
- data/lib/from_openstudio/construction_set.rb +138 -0
- data/lib/from_openstudio/geometry/aperture.rb +7 -5
- data/lib/from_openstudio/geometry/door.rb +10 -8
- data/lib/from_openstudio/geometry/face.rb +7 -5
- data/lib/from_openstudio/geometry/shade.rb +10 -8
- data/lib/from_openstudio/model.rb +18 -1
- data/lib/honeybee/model_object.rb +1 -1
- data/lib/to_openstudio/construction_set.rb +2 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae033ebf6690e76b634a37e62a36316dc34584d011914ae24882bc1bbc600efc
|
4
|
+
data.tar.gz: 60df06fc8ef7b2053c5a0fb8c20fb7d147198775ef8983d6df02201d636ca1b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d66a5e701d672d549164c34c78e007a919f6cd9e1d835635fd6bfec740dcaea73091baa81e09dca54429d4aa1d37ea00f004c0bef13c502eda33c5bd93809e85
|
7
|
+
data.tar.gz: 6b5e2c3b903eebcdf1c12b46a8393cf3e135bc73dc05f8457adc56e17696bfc80fda467898e3c867d63ef273ad1955d2f9f7c100d1dbb7132ad6d2ff259c3a88
|
data/.github/workflows/ci.yaml
CHANGED
@@ -69,4 +69,15 @@ jobs:
|
|
69
69
|
"version" : "'$RELEASE_TAG'"
|
70
70
|
}
|
71
71
|
}' \
|
72
|
-
-u
|
72
|
+
-u ladybugbot:$DEPS_TOKEN
|
73
|
+
- name: Update honeybee-energy
|
74
|
+
if: steps.semantic.outputs.new_release_published == 'true'
|
75
|
+
env:
|
76
|
+
RELEASE_TAG: ${{ steps.semantic.outputs.new_release_version }}
|
77
|
+
DISPATCH_REPO: ladybug-tools/honeybee-energy
|
78
|
+
DEPS_TOKEN: ${{ secrets.DEPS_UPDATING }}
|
79
|
+
run: |
|
80
|
+
curl -X POST https://api.github.com/repos/$DISPATCH_REPO/dispatches \
|
81
|
+
-H "Accept: application/vnd.github.everest-preview+json" \
|
82
|
+
-d '{"event_type": "honeybee_openstudio_gem_release", "client_payload": {"version": "'$RELEASE_TAG'"}}' \
|
83
|
+
-u ladybugbot:$DEPS_TOKEN
|
data/honeybee-openstudio.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'honeybee-openstudio'
|
7
|
-
spec.version = '2.
|
7
|
+
spec.version = '2.21.1'
|
8
8
|
spec.authors = ['Tanushree Charan', 'Dan Macumber', 'Chris Mackey', 'Mostapha Sadeghipour Roudsari']
|
9
9
|
spec.email = ['tanushree.charan@nrel.gov', 'chris@ladybug.tools']
|
10
10
|
|
data/lib/from_openstudio.rb
CHANGED
@@ -35,6 +35,7 @@ require 'honeybee'
|
|
35
35
|
# extend the compound objects that house the other objects
|
36
36
|
require 'from_openstudio/model'
|
37
37
|
require 'from_openstudio/model_object'
|
38
|
+
require 'from_openstudio/construction_set'
|
38
39
|
|
39
40
|
# extend the geometry objects
|
40
41
|
require 'from_openstudio/geometry/aperture'
|
@@ -0,0 +1,138 @@
|
|
1
|
+
# *******************************************************************************
|
2
|
+
# Honeybee OpenStudio Gem, Copyright (c) 2020, Alliance for Sustainable
|
3
|
+
# Energy, LLC, Ladybug Tools LLC and other contributors. All rights reserved.
|
4
|
+
#
|
5
|
+
# Redistribution and use in source and binary forms, with or without
|
6
|
+
# modification, are permitted provided that the following conditions are met:
|
7
|
+
#
|
8
|
+
# (1) Redistributions of source code must retain the above copyright notice,
|
9
|
+
# this list of conditions and the following disclaimer.
|
10
|
+
#
|
11
|
+
# (2) Redistributions in binary form must reproduce the above copyright notice,
|
12
|
+
# this list of conditions and the following disclaimer in the documentation
|
13
|
+
# and/or other materials provided with the distribution.
|
14
|
+
#
|
15
|
+
# (3) Neither the name of the copyright holder nor the names of any contributors
|
16
|
+
# may be used to endorse or promote products derived from this software without
|
17
|
+
# specific prior written permission from the respective party.
|
18
|
+
#
|
19
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) AND ANY CONTRIBUTORS
|
20
|
+
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
|
21
|
+
# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
22
|
+
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S), ANY CONTRIBUTORS, THE
|
23
|
+
# UNITED STATES GOVERNMENT, OR THE UNITED STATES DEPARTMENT OF ENERGY, NOR ANY OF
|
24
|
+
# THEIR EMPLOYEES, BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
25
|
+
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
26
|
+
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
27
|
+
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
28
|
+
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
29
|
+
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
30
|
+
# *******************************************************************************
|
31
|
+
|
32
|
+
require 'honeybee/construction_set'
|
33
|
+
require 'from_openstudio/model_object'
|
34
|
+
|
35
|
+
module Honeybee
|
36
|
+
class ConstructionSetAbridged < ModelObject
|
37
|
+
|
38
|
+
def self.from_construction_set(construction_set)
|
39
|
+
# create an empty hash
|
40
|
+
hash = {}
|
41
|
+
hash[:type] = 'ConstructionSetAbridged'
|
42
|
+
# set hash values from OpenStudio Object
|
43
|
+
hash[:identifier] = construction_set.nameString
|
44
|
+
hash[:wall_set] = {}
|
45
|
+
hash[:floor_set] = {}
|
46
|
+
hash[:aperture_set] = {}
|
47
|
+
hash[:door_set] = {}
|
48
|
+
hash[:roof_ceiling_set] = {}
|
49
|
+
|
50
|
+
# get interior surface constructions
|
51
|
+
unless construction_set.defaultInteriorSurfaceConstructions.empty?
|
52
|
+
int_surf_construction = construction_set.defaultInteriorSurfaceConstructions.get
|
53
|
+
# get interior wall construction
|
54
|
+
unless int_surf_construction.wallConstruction.empty?
|
55
|
+
int_wall_const = int_surf_construction.wallConstruction.get
|
56
|
+
hash[:wall_set][:interior_construction] = int_wall_const.nameString
|
57
|
+
end
|
58
|
+
# get interior floor construction
|
59
|
+
unless int_surf_construction.floorConstruction.empty?
|
60
|
+
int_floor_const = int_surf_construction.floorConstruction.get
|
61
|
+
hash[:floor_set][:interior_construction] = int_floor_const.nameString
|
62
|
+
end
|
63
|
+
# get interior roofceiling construction
|
64
|
+
unless int_surf_construction.roofCeilingConstruction.empty?
|
65
|
+
int_roof_const = int_surf_construction.roofCeilingConstruction.get
|
66
|
+
hash[:roof_ceiling_set][:interior_construction] = int_roof_const.nameString
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# get interior subsurface constructions
|
71
|
+
unless construction_set.defaultInteriorSubSurfaceConstructions.empty?
|
72
|
+
int_subsurf_const = construction_set.defaultInteriorSubSurfaceConstructions.get
|
73
|
+
unless int_subsurf_const.fixedWindowConstruction.empty?
|
74
|
+
int_wind_const = int_subsurf_const.fixedWindowConstruction.get
|
75
|
+
hash[:aperture_set][:window_construction] = int_wind_const.nameString
|
76
|
+
end
|
77
|
+
# get interior door construction
|
78
|
+
unless int_subsurf_const.doorConstruction.empty?
|
79
|
+
int_door_const = int_subsurf_const.doorConstruction.get
|
80
|
+
hash[:door_set][:interior_construction] = int_door_const.nameString
|
81
|
+
end
|
82
|
+
# get interior glass door construction
|
83
|
+
unless int_subsurf_const.glassDoorConstruction.empty?
|
84
|
+
int_glass_door_const = int_subsurf_const.glassDoorConstruction.get
|
85
|
+
hash[:door_set][:interior_glass_construction] = int_glass_door_const.nameString
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# get exterior surface constructions
|
90
|
+
unless construction_set.defaultExteriorSurfaceConstructions.empty?
|
91
|
+
ext_surf_const = construction_set.defaultExteriorSurfaceConstructions.get
|
92
|
+
# get exterior wall construction
|
93
|
+
unless ext_surf_const.wallConstruction.empty?
|
94
|
+
ext_wall_const = ext_surf_const.wallConstruction.get
|
95
|
+
hash[:wall_set][:exterior_construction] = ext_wall_const.nameString
|
96
|
+
end
|
97
|
+
# get exterior floor construction
|
98
|
+
unless ext_surf_const.floorConstruction.empty?
|
99
|
+
ext_floor_const = ext_surf_const.floorConstruction.get
|
100
|
+
hash[:floor_set][:exterior_construction] = ext_floor_const.nameString
|
101
|
+
end
|
102
|
+
# get exterior roofceiling construction
|
103
|
+
unless ext_surf_const.roofCeilingConstruction.empty?
|
104
|
+
ext_roof_const = ext_surf_const.roofCeilingConstruction.get
|
105
|
+
hash[:roof_ceiling_set][:exterior_construction] = ext_roof_const.nameString
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
# get exterior subsurface construction
|
110
|
+
unless construction_set.defaultExteriorSubSurfaceConstructions.empty?
|
111
|
+
ext_subsurf_const = construction_set.defaultExteriorSubSurfaceConstructions.get
|
112
|
+
# get exterior operable window construction
|
113
|
+
unless ext_subsurf_const.operableWindowConstruction.empty?
|
114
|
+
ext_wind_const = ext_subsurf_const.operableWindowConstruction.get
|
115
|
+
hash[:aperture_set][:operable_construction] = ext_wind_const.nameString
|
116
|
+
end
|
117
|
+
# get exterior skylight construction
|
118
|
+
unless ext_subsurf_const.skylightConstruction.empty?
|
119
|
+
ext_skylight_const = ext_subsurf_const.skylightConstruction.get
|
120
|
+
hash[:aperture_set][:skylight_construction] = ext_skylight_const.nameString
|
121
|
+
end
|
122
|
+
# get exterior door construction
|
123
|
+
unless ext_subsurf_const.doorConstruction.empty?
|
124
|
+
ext_door_const = ext_subsurf_const.doorConstruction.get
|
125
|
+
hash[:door_set][:exterior_construction] = ext_door_const.nameString
|
126
|
+
end
|
127
|
+
# get exterior overhead door construction
|
128
|
+
unless ext_subsurf_const.overheadDoorConstruction.empty?
|
129
|
+
ext_ovhd_door_const = ext_subsurf_const.overheadDoorConstruction.get
|
130
|
+
hash[:door_set][:overhead_construction] = ext_ovhd_door_const.nameString
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
hash
|
135
|
+
|
136
|
+
end
|
137
|
+
end # ConstructionSetAbridged
|
138
|
+
end # Honeybee
|
@@ -69,11 +69,13 @@ module Honeybee
|
|
69
69
|
hash = {}
|
70
70
|
hash[:type] = 'ApertureEnergyPropertiesAbridged'
|
71
71
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
72
|
+
unless sub_surface.isConstructionDefaulted
|
73
|
+
construction = sub_surface.construction
|
74
|
+
if !construction.empty?
|
75
|
+
constr_id = construction.get.nameString
|
76
|
+
unless $window_constructions[constr_id].nil?
|
77
|
+
hash[:construction] = constr_id
|
78
|
+
end
|
77
79
|
end
|
78
80
|
end
|
79
81
|
|
@@ -69,16 +69,18 @@ module Honeybee
|
|
69
69
|
hash = {}
|
70
70
|
hash[:type] = 'DoorEnergyPropertiesAbridged'
|
71
71
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
hash[:
|
77
|
-
|
78
|
-
hash[:
|
72
|
+
unless sub_surface.isConstructionDefaulted
|
73
|
+
construction = sub_surface.construction
|
74
|
+
if !construction.empty?
|
75
|
+
constr_id = construction.get.nameString
|
76
|
+
if hash[:is_glass] && !$window_constructions[constr_id].nil?
|
77
|
+
hash[:construction] = constr_id
|
78
|
+
elsif !hash[:is_glass] && !$opaque_constructions[constr_id].nil?
|
79
|
+
hash[:construction] = constr_id
|
80
|
+
end
|
79
81
|
end
|
80
82
|
end
|
81
|
-
|
83
|
+
|
82
84
|
hash
|
83
85
|
end
|
84
86
|
|
@@ -71,11 +71,13 @@ module Honeybee
|
|
71
71
|
hash = {}
|
72
72
|
hash[:type] = 'FaceEnergyPropertiesAbridged'
|
73
73
|
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
74
|
+
unless surface.isConstructionDefaulted
|
75
|
+
construction = surface.construction
|
76
|
+
if !construction.empty?
|
77
|
+
constr_id = construction.get.nameString
|
78
|
+
unless $opaque_constructions[constr_id].nil?
|
79
|
+
hash[:construction] = constr_id
|
80
|
+
end
|
79
81
|
end
|
80
82
|
end
|
81
83
|
|
@@ -59,14 +59,16 @@ module Honeybee
|
|
59
59
|
hash = {}
|
60
60
|
hash[:type] = 'ShadeEnergyPropertiesAbridged'
|
61
61
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
62
|
+
unless shading_surface.isConstructionDefaulted
|
63
|
+
construction = shading_surface.construction
|
64
|
+
if !construction.empty?
|
65
|
+
const_name = construction.get.nameString
|
66
|
+
hash[:construction] = const_name
|
67
|
+
unless $shade_constructions.has_key?(const_name)
|
68
|
+
const_obj = construction.get
|
69
|
+
const = const_obj.to_LayeredConstruction.get
|
70
|
+
$shade_constructions[const_name] = const
|
71
|
+
end
|
70
72
|
end
|
71
73
|
end
|
72
74
|
|
@@ -45,6 +45,7 @@ require 'from_openstudio/construction/air'
|
|
45
45
|
require 'from_openstudio/construction/opaque'
|
46
46
|
require 'from_openstudio/construction/window'
|
47
47
|
require 'from_openstudio/construction/shade'
|
48
|
+
require 'from_openstudio/construction_set'
|
48
49
|
|
49
50
|
require 'openstudio'
|
50
51
|
|
@@ -65,6 +66,7 @@ module Honeybee
|
|
65
66
|
$opaque_constructions = {}
|
66
67
|
$window_constructions = {}
|
67
68
|
$shade_constructions = {}
|
69
|
+
|
68
70
|
hash[:properties] = properties_from_model(openstudio_model)
|
69
71
|
|
70
72
|
rooms = rooms_from_model(openstudio_model)
|
@@ -127,7 +129,9 @@ module Honeybee
|
|
127
129
|
hash[:constructions] = []
|
128
130
|
hash[:constructions] = constructions_from_model(openstudio_model)
|
129
131
|
hash[:materials] = materials_from_model(openstudio_model)
|
130
|
-
|
132
|
+
hash[:construction_sets] = []
|
133
|
+
hash[:construction_sets] = constructionsets_from_model(openstudio_model)
|
134
|
+
|
131
135
|
hash
|
132
136
|
end
|
133
137
|
|
@@ -239,6 +243,19 @@ module Honeybee
|
|
239
243
|
result
|
240
244
|
end
|
241
245
|
|
246
|
+
# Create HB ConstructionSets from OpenStudio Construction Set
|
247
|
+
def self.constructionsets_from_model(openstudio_model)
|
248
|
+
result = []
|
249
|
+
|
250
|
+
openstudio_model.getDefaultConstructionSets.each do |construction_set|
|
251
|
+
if construction_set.nameString != "Default Generic Construction Set"
|
252
|
+
result << ConstructionSetAbridged.from_construction_set(construction_set)
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
result
|
257
|
+
end
|
258
|
+
|
242
259
|
def self.shade_constructions_from_model(shade_constructions)
|
243
260
|
result = []
|
244
261
|
|
@@ -140,6 +140,8 @@ module Honeybee
|
|
140
140
|
@hash[:aperture_set][:window_construction])
|
141
141
|
unless window_ref.empty?
|
142
142
|
window_aperture = window_ref.get
|
143
|
+
#TODO: This looks wrong, it should be set to interior subsurface construction since
|
144
|
+
#window_construction apertures have a surface boundary condition.
|
143
145
|
ext_subsurf_const.setFixedWindowConstruction(window_aperture)
|
144
146
|
end
|
145
147
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: honeybee-openstudio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.21.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tanushree Charan
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: exe
|
13
13
|
cert_chain: []
|
14
|
-
date: 2021-07-
|
14
|
+
date: 2021-07-27 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -171,6 +171,7 @@ files:
|
|
171
171
|
- lib/from_openstudio/construction/opaque.rb
|
172
172
|
- lib/from_openstudio/construction/shade.rb
|
173
173
|
- lib/from_openstudio/construction/window.rb
|
174
|
+
- lib/from_openstudio/construction_set.rb
|
174
175
|
- lib/from_openstudio/geometry/aperture.rb
|
175
176
|
- lib/from_openstudio/geometry/door.rb
|
176
177
|
- lib/from_openstudio/geometry/face.rb
|