honeybee-openstudio 2.11.2 → 2.11.3
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/honeybee-openstudio.gemspec +1 -1
- data/lib/files/Honeybee.rb +28 -17
- data/lib/files/urbanopt_Gemfile +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 66f698f2ff00e7c8a4461f4b8595e4d6939c0aadba9b03469a00db5647d15761
|
4
|
+
data.tar.gz: e52a3be101d446f90e0d9bcacd705c961a73d62951addbb7e1a9a1d9dea17005
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 246fee05105a6507b52468852dad7cccb8a0bf93a5ad866d382f67bf6f5e40ee3a7537cf8780509957e5c1b7a3da520e71160b467d497a3345f5624b901b3c87
|
7
|
+
data.tar.gz: 4719f21f7ed1b5e74ff1f213a656d0dff3a6ea3f4a816012eafd09c6e85fa164bd22cda5c971c63d38dcc755f9f592d3b887f246d362be5e1b38b7bae4a6b7c1
|
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.11.
|
7
|
+
spec.version = '2.11.3'
|
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/files/Honeybee.rb
CHANGED
@@ -42,25 +42,34 @@ module URBANopt
|
|
42
42
|
# class level variables
|
43
43
|
@@instance_lock = Mutex.new
|
44
44
|
@@osw = nil
|
45
|
+
@@mapper_measures = nil
|
45
46
|
@@geometry = nil
|
46
47
|
|
47
48
|
def initialize()
|
48
|
-
|
49
49
|
# do initialization of class variables in thread safe way
|
50
50
|
@@instance_lock.synchronize do
|
51
|
-
|
51
|
+
# load the OSW for this class
|
52
|
+
if @@osw.nil?
|
53
|
+
osw_path = File.join(File.dirname(__FILE__), 'honeybee_workflow.osw')
|
54
|
+
File.open(osw_path, 'r') do |file|
|
55
|
+
@@osw = JSON.parse(file.read, symbolize_names: true)
|
56
|
+
end
|
57
|
+
# configure OSW with extension gem paths for measures and files
|
58
|
+
# all extension gems must be required before this line
|
59
|
+
@@osw = OpenStudio::Extension.configure_osw(@@osw)
|
60
|
+
end
|
52
61
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
62
|
+
# load the mapper measure variables if the file exists
|
63
|
+
if @@mapper_measures.nil?
|
64
|
+
map_meas_path = File.join(File.dirname(__FILE__), 'mapper_measures.json')
|
65
|
+
if File.file?(map_meas_path)
|
66
|
+
File.open(map_meas_path, 'r') do |file|
|
67
|
+
@@mapper_measures = JSON.parse(file.read)
|
57
68
|
end
|
58
|
-
|
59
|
-
# configure OSW with extension gem paths for measures and files
|
60
|
-
# all extension gems must be required before this line
|
61
|
-
@@osw = OpenStudio::Extension.configure_osw(@@osw)
|
62
69
|
end
|
63
70
|
end
|
71
|
+
|
72
|
+
end
|
64
73
|
end
|
65
74
|
|
66
75
|
def create_osw(scenario, features, feature_names)
|
@@ -76,7 +85,6 @@ module URBANopt
|
|
76
85
|
# take the centroid of the vertices as the location of the building
|
77
86
|
feature_vertices_coordinates = feature.feature_json[:geometry][:coordinates][0]
|
78
87
|
feature_location = feature.find_feature_center(feature_vertices_coordinates).to_s
|
79
|
-
|
80
88
|
if feature_names.size == 1
|
81
89
|
feature_name = feature_names[0]
|
82
90
|
end
|
@@ -93,12 +101,15 @@ module URBANopt
|
|
93
101
|
OpenStudio::Extension.set_measure_argument(
|
94
102
|
osw, 'from_honeybee_model', 'model_json', feature.detailed_model_filename)
|
95
103
|
|
96
|
-
#
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
104
|
+
# add any of the mapper measure variables
|
105
|
+
if not @@mapper_measures.nil?
|
106
|
+
@@mapper_measures.each do |map_measure_param|
|
107
|
+
# get the attribute from the feature
|
108
|
+
feature_param = feature.send(map_measure_param[2])
|
109
|
+
# set the measure argument
|
110
|
+
OpenStudio::Extension.set_measure_argument(
|
111
|
+
osw, map_measure_param[0], map_measure_param[1], feature_param)
|
112
|
+
end
|
102
113
|
end
|
103
114
|
|
104
115
|
# add the feature id and name to the reporting measure
|
data/lib/files/urbanopt_Gemfile
CHANGED
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.11.
|
4
|
+
version: 2.11.3
|
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-
|
14
|
+
date: 2021-02-08 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|