honeybee-openstudio 2.20.0 → 2.20.4
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 +16 -0
- data/honeybee-openstudio.gemspec +1 -1
- data/lib/files/reopt_assumptions.json +0 -2
- data/lib/from_openstudio.rb +0 -1
- data/lib/from_openstudio/model.rb +1 -16
- data/lib/honeybee/construction_set.rb +1 -1
- data/lib/to_openstudio/construction_set.rb +0 -2
- data/lib/to_openstudio/hvac/template.rb +3 -1
- data/lib/to_openstudio/material/window_blind.rb +24 -0
- metadata +2 -4
- data/.github/workflows/cd.yml +0 -32
- data/lib/from_openstudio/construction_set.rb +0 -141
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82da49031ed053640899cd6e7e07d4b8cdab112705facb122e906c5b5f2c333a
|
4
|
+
data.tar.gz: d43ccc2d031e7ee5b9c780132ab030a821e37471f5780d7ae0900a94b7909450
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 742ca78b6e6fd4fafd8bdcc8dfb5f2ea3b53f49eb99bc1af5d2b502d41d93891d3941cbc188fad644a68a68d42375567cf7473ca8950fad5992a96e4320403b8
|
7
|
+
data.tar.gz: 005e4ae015e7ac691d07c4abab765d32a0593b46c5ed627b5f919911bbfdccbcd4366f5a8f4a8087dbca14f58133a4daa57730c11488ba34265a3866c6292479
|
data/.github/workflows/ci.yaml
CHANGED
@@ -54,3 +54,19 @@ jobs:
|
|
54
54
|
uses: dawidd6/action-publish-gem@v1
|
55
55
|
with:
|
56
56
|
api_key: ${{secrets.RUBYGEMS_API_KEY}}
|
57
|
+
- name: Update lbt-grasshopper
|
58
|
+
if: steps.semantic.outputs.new_release_published == 'true'
|
59
|
+
env:
|
60
|
+
RELEASE_TAG: ${{ steps.semantic.outputs.new_release_version }}
|
61
|
+
DISPATCH_URL: https://api.github.com/repos/ladybug-tools/lbt-grasshopper/dispatches
|
62
|
+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
63
|
+
run: |
|
64
|
+
curl -X POST $DISPATCH_URL \
|
65
|
+
-H "Accept: application/vnd.github.everest-preview+json" \
|
66
|
+
-d '{
|
67
|
+
"event_type": "honeybee_openstudio_gem_release",
|
68
|
+
"client_payload": {
|
69
|
+
"version" : "'$RELEASE_TAG'"
|
70
|
+
}
|
71
|
+
}' \
|
72
|
+
-u ladybugbot:$GH_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.20.
|
7
|
+
spec.version = '2.20.4'
|
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,7 +35,6 @@ 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'
|
39
38
|
|
40
39
|
# extend the geometry objects
|
41
40
|
require 'from_openstudio/geometry/aperture'
|
@@ -45,7 +45,6 @@ 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'
|
49
48
|
|
50
49
|
require 'openstudio'
|
51
50
|
|
@@ -66,7 +65,6 @@ module Honeybee
|
|
66
65
|
$opaque_constructions = {}
|
67
66
|
$window_constructions = {}
|
68
67
|
$shade_constructions = {}
|
69
|
-
|
70
68
|
hash[:properties] = properties_from_model(openstudio_model)
|
71
69
|
|
72
70
|
rooms = rooms_from_model(openstudio_model)
|
@@ -129,9 +127,7 @@ module Honeybee
|
|
129
127
|
hash[:constructions] = []
|
130
128
|
hash[:constructions] = constructions_from_model(openstudio_model)
|
131
129
|
hash[:materials] = materials_from_model(openstudio_model)
|
132
|
-
|
133
|
-
hash[:construction_sets] = constructionsets_from_model(openstudio_model)
|
134
|
-
|
130
|
+
|
135
131
|
hash
|
136
132
|
end
|
137
133
|
|
@@ -243,17 +239,6 @@ module Honeybee
|
|
243
239
|
result
|
244
240
|
end
|
245
241
|
|
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
|
-
result << ConstructionSetAbridged.from_construction_set(construction_set)
|
252
|
-
end
|
253
|
-
|
254
|
-
result
|
255
|
-
end
|
256
|
-
|
257
242
|
def self.shade_constructions_from_model(shade_constructions)
|
258
243
|
result = []
|
259
244
|
|
@@ -140,8 +140,6 @@ 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.
|
145
143
|
ext_subsurf_const.setFixedWindowConstruction(window_aperture)
|
146
144
|
end
|
147
145
|
end
|
@@ -41,7 +41,9 @@ module Honeybee
|
|
41
41
|
ASHRAE_2004: '90.1-2004',
|
42
42
|
ASHRAE_2007: '90.1-2007',
|
43
43
|
ASHRAE_2010: '90.1-2010',
|
44
|
-
ASHRAE_2013: '90.1-2013'
|
44
|
+
ASHRAE_2013: '90.1-2013',
|
45
|
+
ASHRAE_2016: '90.1-2016',
|
46
|
+
ASHRAE_2019: '90.1-2019'
|
45
47
|
}
|
46
48
|
|
47
49
|
def to_openstudio(openstudio_model, room_ids)
|
@@ -160,6 +160,30 @@ module Honeybee
|
|
160
160
|
defaults[:diffuse_visible_reflectance_back][:default])
|
161
161
|
end
|
162
162
|
|
163
|
+
# assign front beam visible transmittance
|
164
|
+
if @hash[:beam_visible_transmittance]
|
165
|
+
os_blind.setSlatBeamVisibleTransmittance(@hash[:beam_visible_transmittance])
|
166
|
+
else
|
167
|
+
os_blind.setSlatBeamVisibleTransmittance(
|
168
|
+
defaults[:beam_visible_transmittance][:default])
|
169
|
+
end
|
170
|
+
|
171
|
+
# assign front beam visible reflectance
|
172
|
+
if @hash[:beam_visible_reflectance]
|
173
|
+
os_blind.setFrontSideSlatBeamVisibleReflectance(@hash[:beam_visible_reflectance])
|
174
|
+
else
|
175
|
+
os_blind.setFrontSideSlatBeamVisibleReflectance(
|
176
|
+
defaults[:beam_visible_reflectance][:default])
|
177
|
+
end
|
178
|
+
|
179
|
+
# assign back beam visible reflectance
|
180
|
+
if @hash[:beam_visible_reflectance_back]
|
181
|
+
os_blind.setBackSideSlatBeamVisibleReflectance(@hash[:beam_visible_reflectance_back])
|
182
|
+
else
|
183
|
+
os_blind.setBackSideSlatBeamVisibleReflectance(
|
184
|
+
defaults[:beam_visible_reflectance_back][:default])
|
185
|
+
end
|
186
|
+
|
163
187
|
# assign infrared transmittance
|
164
188
|
if @hash[:infrared_transmittance]
|
165
189
|
os_blind.setSlatInfraredHemisphericalTransmittance(@hash[:infrared_transmittance])
|
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.20.
|
4
|
+
version: 2.20.4
|
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-20 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -148,7 +148,6 @@ executables: []
|
|
148
148
|
extensions: []
|
149
149
|
extra_rdoc_files: []
|
150
150
|
files:
|
151
|
-
- ".github/workflows/cd.yml"
|
152
151
|
- ".github/workflows/ci.yaml"
|
153
152
|
- ".gitignore"
|
154
153
|
- ".releaserc.json"
|
@@ -172,7 +171,6 @@ files:
|
|
172
171
|
- lib/from_openstudio/construction/opaque.rb
|
173
172
|
- lib/from_openstudio/construction/shade.rb
|
174
173
|
- lib/from_openstudio/construction/window.rb
|
175
|
-
- lib/from_openstudio/construction_set.rb
|
176
174
|
- lib/from_openstudio/geometry/aperture.rb
|
177
175
|
- lib/from_openstudio/geometry/door.rb
|
178
176
|
- lib/from_openstudio/geometry/face.rb
|
data/.github/workflows/cd.yml
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
name: CD
|
2
|
-
|
3
|
-
on:
|
4
|
-
release:
|
5
|
-
types: [published]
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
dispatch_schema:
|
9
|
-
name: Dispatch Schema to Clients
|
10
|
-
runs-on: ubuntu-latest
|
11
|
-
|
12
|
-
strategy:
|
13
|
-
matrix:
|
14
|
-
client_repo:
|
15
|
-
- ladybug-tools/lbt-grasshopper
|
16
|
-
|
17
|
-
steps:
|
18
|
-
- name: Send repo dispatch to lbt-grasshopper
|
19
|
-
env:
|
20
|
-
RELEASE_TAG: ${{ github.event.release.tag_name }}
|
21
|
-
DISPATCH_URL: https://api.github.com/repos/${{ matrix.client_repo }}/dispatches
|
22
|
-
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
23
|
-
run: |
|
24
|
-
curl -X POST $DISPATCH_URL \
|
25
|
-
-H "Accept: application/vnd.github.everest-preview+json" \
|
26
|
-
-d '{
|
27
|
-
"event_type": "honeybee_openstudio_gem_release",
|
28
|
-
"client_payload": {
|
29
|
-
"version" : "'$RELEASE_TAG'"
|
30
|
-
}
|
31
|
-
}' \
|
32
|
-
-u ladybugbot:$GH_TOKEN
|
@@ -1,141 +0,0 @@
|
|
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
|
-
# TODO: check outdoor boundary condition for fixed window and operable window and assign to
|
74
|
-
# interior_construction for aperture
|
75
|
-
# get interior fixed window construction
|
76
|
-
unless int_subsurf_const.fixedWindowConstruction.empty?
|
77
|
-
int_wind_const = int_subsurf_const.fixedWindowConstruction.get
|
78
|
-
hash[:aperture_set][:window_construction] = int_wind_const.nameString
|
79
|
-
end
|
80
|
-
# get interior door construction
|
81
|
-
unless int_subsurf_const.doorConstruction.empty?
|
82
|
-
int_door_const = int_subsurf_const.doorConstruction.get
|
83
|
-
hash[:door_set][:interior_construction] = int_door_const.nameString
|
84
|
-
end
|
85
|
-
# get interior glass door construction
|
86
|
-
unless int_subsurf_const.glassDoorConstruction.empty?
|
87
|
-
int_glass_door_const = int_subsurf_const.glassDoorConstruction.get
|
88
|
-
hash[:door_set][:interior_glass_construction] = int_glass_door_const.nameString
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
# get exterior surface constructions
|
93
|
-
unless construction_set.defaultExteriorSurfaceConstructions.empty?
|
94
|
-
ext_surf_const = construction_set.defaultExteriorSurfaceConstructions.get
|
95
|
-
# get exterior wall construction
|
96
|
-
unless ext_surf_const.wallConstruction.empty?
|
97
|
-
ext_wall_const = ext_surf_const.wallConstruction.get
|
98
|
-
hash[:wall_set][:exterior_construction] = ext_wall_const.nameString
|
99
|
-
end
|
100
|
-
# get exterior floor construction
|
101
|
-
unless ext_surf_const.floorConstruction.empty?
|
102
|
-
ext_floor_const = ext_surf_const.floorConstruction.get
|
103
|
-
hash[:floor_set][:exterior_construction] = ext_floor_const.nameString
|
104
|
-
end
|
105
|
-
# get exterior roofceiling construction
|
106
|
-
unless ext_surf_const.roofCeilingConstruction.empty?
|
107
|
-
ext_roof_const = ext_surf_const.roofCeilingConstruction.get
|
108
|
-
hash[:roof_ceiling_set][:exterior_construction] = ext_roof_const.nameString
|
109
|
-
end
|
110
|
-
end
|
111
|
-
|
112
|
-
# get exterior subsurface construction
|
113
|
-
unless construction_set.defaultExteriorSubSurfaceConstructions.empty?
|
114
|
-
ext_subsurf_const = construction_set.defaultExteriorSubSurfaceConstructions.get
|
115
|
-
# get exterior operable window construction
|
116
|
-
unless ext_subsurf_const.operableWindowConstruction.empty?
|
117
|
-
ext_wind_const = ext_subsurf_const.operableWindowConstruction.get
|
118
|
-
hash[:aperture_set][:operable_construction] = ext_wind_const.nameString
|
119
|
-
end
|
120
|
-
# get exterior skylight construction
|
121
|
-
unless ext_subsurf_const.skylightConstruction.empty?
|
122
|
-
ext_skylight_const = ext_subsurf_const.skylightConstruction.get
|
123
|
-
hash[:aperture_set][:skylight_construction] = ext_skylight_const.nameString
|
124
|
-
end
|
125
|
-
# get exterior door construction
|
126
|
-
unless ext_subsurf_const.doorConstruction.empty?
|
127
|
-
ext_door_const = ext_subsurf_const.doorConstruction.get
|
128
|
-
hash[:door_set][:exterior_construction] = ext_door_const.nameString
|
129
|
-
end
|
130
|
-
# get exterior overhead door construction
|
131
|
-
unless ext_subsurf_const.overheadDoorConstruction.empty?
|
132
|
-
ext_ovhd_door_const = ext_subsurf_const.overheadDoorConstruction.get
|
133
|
-
hash[:door_set][:overhead_construction] = ext_ovhd_door_const.nameString
|
134
|
-
end
|
135
|
-
end
|
136
|
-
|
137
|
-
hash
|
138
|
-
|
139
|
-
end
|
140
|
-
end # ConstructionSetAbridged
|
141
|
-
end # Honeybee
|