honeybee-openstudio 2.34.7 → 2.34.9
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4d3ae6c224643694b834d77b34a79550d059ad0df9104d90509ae931a844337
|
4
|
+
data.tar.gz: 1ed909608fb5019d1549d26b3200cf238304edf590f993a59c016941d6c1e6a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4be5fafda6b741381169f7318d713dd34e74ddf22c7bc0c8d49bf4db8f2929e4136d1b861e6fc7eb29474d164e2e11d3157e1b820fc14c2f51e479278475fa71
|
7
|
+
data.tar.gz: 5e347d2612b3a8fe6fce4a283ee1144759d09e9e7d355b9f36123c8f79dcf223a63d942b5137dafee1cd1cea872535a40a6878a5be307eb1eb370c0b09975fc5
|
data/.github/workflows/ci.yaml
CHANGED
@@ -15,8 +15,8 @@ jobs:
|
|
15
15
|
run: |
|
16
16
|
echo $(pwd)
|
17
17
|
echo $(ls)
|
18
|
-
docker pull nrel/openstudio:3.
|
19
|
-
docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.
|
18
|
+
docker pull nrel/openstudio:3.6.1
|
19
|
+
docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.6.1
|
20
20
|
docker exec -t test pwd
|
21
21
|
docker exec -t test ls
|
22
22
|
docker exec -t test bundle update
|
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.34.
|
7
|
+
spec.version = '2.34.9'
|
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
|
|
@@ -25,14 +25,14 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.required_ruby_version = "~> 2.7.0"
|
26
26
|
|
27
27
|
spec.add_development_dependency "bundler", "~> 2.1"
|
28
|
-
spec.add_development_dependency "public_suffix", "~>
|
29
|
-
spec.add_development_dependency "json-schema", "~> 2.
|
30
|
-
spec.add_development_dependency "rake", "~> 13.0"
|
28
|
+
spec.add_development_dependency "public_suffix", "~> 5.0.3"
|
29
|
+
spec.add_development_dependency "json-schema", "~> 2.7.0"
|
30
|
+
spec.add_development_dependency "rake", "~> 13.0.6"
|
31
31
|
spec.add_development_dependency "rspec", "~> 3.9"
|
32
32
|
spec.add_development_dependency "rubocop", "~> 1.15.0"
|
33
33
|
end
|
34
34
|
|
35
35
|
spec.add_dependency 'json_pure'
|
36
36
|
spec.add_dependency 'openstudio-extension', '0.6.1'
|
37
|
-
spec.add_dependency 'openstudio-standards', '~> 0.
|
37
|
+
spec.add_dependency 'openstudio-standards', '~> 0.4.0'
|
38
38
|
end
|
data/lib/files/urbanopt_Gemfile
CHANGED
@@ -11,30 +11,30 @@ gem 'builder', '3.2.4'
|
|
11
11
|
gem 'docile', '1.4.0'
|
12
12
|
gem 'faraday', '1.0.1'
|
13
13
|
gem 'git', '1.12.0'
|
14
|
-
gem 'json-schema', '2.
|
14
|
+
gem 'json-schema', '2.7.0'
|
15
15
|
gem 'json_pure', '2.6.3'
|
16
16
|
gem 'macaddr', '1.7.2'
|
17
17
|
gem 'minitar', '0.9'
|
18
|
+
gem 'minitest', '5.14.4'
|
19
|
+
gem 'minitest-reporters', '1.4.3'
|
18
20
|
gem 'multipart-post', '2.3.0'
|
19
21
|
gem 'octokit', '4.18.0'
|
20
|
-
gem 'openstudio-calibration', '0.
|
21
|
-
gem 'openstudio-common-measures', '0.
|
22
|
-
gem 'openstudio-ee', '0.
|
23
|
-
gem 'openstudio-extension', '0.6.
|
24
|
-
gem 'openstudio-geb', '0.2
|
25
|
-
gem 'openstudio-load-flexibility-measures', '0.
|
22
|
+
gem 'openstudio-calibration', '0.8.0'
|
23
|
+
gem 'openstudio-common-measures', '0.8.0'
|
24
|
+
gem 'openstudio-ee', '0.8.0'
|
25
|
+
gem 'openstudio-extension', '0.6.1'
|
26
|
+
gem 'openstudio-geb', '0.3.2'
|
27
|
+
gem 'openstudio-load-flexibility-measures', '0.7.0'
|
26
28
|
gem 'openstudio_measure_tester', '0.3.2'
|
27
|
-
gem 'openstudio-model-articulation', '0.
|
28
|
-
gem 'openstudio-standards', '0.
|
29
|
+
gem 'openstudio-model-articulation', '0.8.0'
|
30
|
+
gem 'openstudio-standards', '0.4.0'
|
29
31
|
gem 'openstudio-workflow', '2.3.1'
|
30
32
|
gem 'parallel', '1.19.2'
|
31
33
|
gem 'parser', '3.2.2.2'
|
32
|
-
gem 'public_suffix', '5.0.
|
33
|
-
gem 'minitest', '5.14.4'
|
34
|
-
gem 'minitest-reporters', '1.4.3'
|
35
|
-
gem 'rchardet', '1.8.0'
|
36
|
-
gem 'rake', '13.0.6'
|
34
|
+
gem 'public_suffix', '5.0.3'
|
37
35
|
gem 'rainbow', '3.1.1'
|
36
|
+
gem 'rake', '13.0.6'
|
37
|
+
gem 'rchardet', '1.8.0'
|
38
38
|
gem 'regexp_parser', '2.8.1'
|
39
39
|
gem 'rexml', '3.2.5'
|
40
40
|
gem 'rubocop', '1.15.0'
|
@@ -50,12 +50,12 @@ gem 'simplecov-html', '0.12.3'
|
|
50
50
|
gem 'spreadsheet', '1.2.9'
|
51
51
|
gem 'systemu', '2.6.5'
|
52
52
|
gem 'unicode-display_width', '2.4.2'
|
53
|
-
gem 'urbanopt-core', '0.
|
54
|
-
gem 'urbanopt-geojson', '0.
|
55
|
-
gem 'urbanopt-reporting', '0.
|
53
|
+
gem 'urbanopt-core', '0.10.0'
|
54
|
+
gem 'urbanopt-geojson', '0.10.0'
|
55
|
+
gem 'urbanopt-reporting', '0.8.0'
|
56
56
|
gem 'uuid', '2.3.9'
|
57
57
|
gem 'yamler', '0.1.0'
|
58
58
|
gem 'zliby', '0.0.5'
|
59
59
|
|
60
60
|
# include the honeybee-openstudio-gem
|
61
|
-
gem 'honeybee-openstudio', '2.
|
61
|
+
gem 'honeybee-openstudio', '2.34.9'
|
@@ -45,19 +45,20 @@ module Honeybee
|
|
45
45
|
end
|
46
46
|
|
47
47
|
def to_openstudio(openstudio_model)
|
48
|
-
#
|
49
|
-
# reverse the shaded and unshaded identifiers so unshaded one is assigned to apertures
|
48
|
+
# set the unshaded ID to be the whole construction ID so unshaded one is assigned to apertures
|
50
49
|
unshd_id = @hash[:identifier]
|
51
|
-
shd_id = @hash[:window_construction][:identifier]
|
52
50
|
@hash[:window_construction][:identifier] = unshd_id
|
51
|
+
# derive a new ID for the shaded construction that will not conflict with any bare versions of the construction
|
52
|
+
shd_id = @hash[:identifier] + '_Shaded'
|
53
53
|
@hash[:identifier] = shd_id
|
54
|
+
|
54
55
|
# create the unshaded construction
|
55
56
|
unshd_constr_obj = WindowConstructionAbridged.new(@hash[:window_construction])
|
56
57
|
@construction = unshd_constr_obj.to_openstudio(openstudio_model)
|
57
58
|
|
58
59
|
# create the shaded construction
|
59
60
|
@shade_construction = OpenStudio::Model::Construction.new(openstudio_model)
|
60
|
-
@shade_construction.setName(
|
61
|
+
@shade_construction.setName(@hash[:identifier])
|
61
62
|
unless @hash[:display_name].nil?
|
62
63
|
@shade_construction.setDisplayName(@hash[:display_name])
|
63
64
|
end
|
@@ -85,6 +85,55 @@ module Honeybee
|
|
85
85
|
defaults[:placeholder_value][:default]
|
86
86
|
end
|
87
87
|
|
88
|
+
def full_annual_values(openstudio_model)
|
89
|
+
# get start and end date times
|
90
|
+
yd = openstudio_model.getYearDescription
|
91
|
+
date_time = OpenStudio::DateTime.new(yd.makeDate(1, 1), OpenStudio::Time.new(0,0,0))
|
92
|
+
start_date_time = OpenStudio::DateTime.new(yd.makeDate(start_month, start_day), OpenStudio::Time.new(0,0,0))
|
93
|
+
end_date_time = OpenStudio::DateTime.new(yd.makeDate(12, 31), OpenStudio::Time.new(1,0,0))
|
94
|
+
|
95
|
+
# get timestep
|
96
|
+
interval_length = 60 / timestep
|
97
|
+
dt = OpenStudio::Time.new(0, 0, interval_length, 0)
|
98
|
+
|
99
|
+
# get values and date times
|
100
|
+
values = @hash[:values]
|
101
|
+
num_values = values.size
|
102
|
+
i_values = 0
|
103
|
+
padded_values = []
|
104
|
+
date_times = []
|
105
|
+
pv = placeholder_value
|
106
|
+
|
107
|
+
while date_time < end_date_time
|
108
|
+
date = date_time.date
|
109
|
+
time = date_time.time
|
110
|
+
date_times << "#{date.dayOfMonth} #{date.monthOfYear.valueName} #{time.hours.to_s.rjust(2,'0')}:#{time.minutes.to_s.rjust(2,'0')}"
|
111
|
+
|
112
|
+
if date_time < start_date_time
|
113
|
+
padded_values << pv
|
114
|
+
elsif i_values < num_values
|
115
|
+
padded_values << values[i_values]
|
116
|
+
i_values += 1
|
117
|
+
else
|
118
|
+
padded_values << pv
|
119
|
+
end
|
120
|
+
|
121
|
+
date_time += dt
|
122
|
+
end
|
123
|
+
|
124
|
+
# if there are still more values to add, this indicates a reversed period
|
125
|
+
if i_values + 1 < num_values
|
126
|
+
overwrite_index = 0
|
127
|
+
while i_values != num_values
|
128
|
+
padded_values[overwrite_index] = values[i_values]
|
129
|
+
i_values += 1
|
130
|
+
overwrite_index += 1
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
return padded_values, date_times
|
135
|
+
end
|
136
|
+
|
88
137
|
def to_schedule_fixed_interval(openstudio_model)
|
89
138
|
# create the new schedule
|
90
139
|
os_fi_schedule = OpenStudio::Model::ScheduleFixedInterval.new(openstudio_model)
|
@@ -92,9 +141,11 @@ module Honeybee
|
|
92
141
|
unless @hash[:display_name].nil?
|
93
142
|
os_fi_schedule.setDisplayName(@hash[:display_name])
|
94
143
|
end
|
95
|
-
|
96
|
-
|
97
|
-
os_fi_schedule.
|
144
|
+
|
145
|
+
# assign start date and the out of range value
|
146
|
+
os_fi_schedule.setStartMonth(1)
|
147
|
+
os_fi_schedule.setStartDay(1)
|
148
|
+
os_fi_schedule.setOutOfRangeValue(placeholder_value)
|
98
149
|
|
99
150
|
# assign the interpolate value
|
100
151
|
os_fi_schedule.setInterpolatetoTimestep(interpolate)
|
@@ -115,8 +166,9 @@ module Honeybee
|
|
115
166
|
|
116
167
|
# assign the values as a timeseries
|
117
168
|
year_description = openstudio_model.getYearDescription
|
118
|
-
start_date = year_description.makeDate(
|
119
|
-
|
169
|
+
start_date = year_description.makeDate(1, 1)
|
170
|
+
all_values, date_times = full_annual_values(openstudio_model)
|
171
|
+
timeseries = OpenStudio::TimeSeries.new(start_date, openstudio_interval_length, OpenStudio.createVector(all_values), '')
|
120
172
|
os_fi_schedule.setTimeSeries(timeseries)
|
121
173
|
|
122
174
|
os_fi_schedule
|
@@ -127,41 +179,9 @@ module Honeybee
|
|
127
179
|
# in order to combine schedules in the same csv file they must have the same key
|
128
180
|
schedule_key = "#{@hash[:identifier]}_#{start_month}_#{start_day}_#{timestep}"
|
129
181
|
|
130
|
-
# get
|
131
|
-
yd = openstudio_model.getYearDescription
|
132
|
-
date_time = OpenStudio::DateTime.new(yd.makeDate(1, 1), OpenStudio::Time.new(0,0,0))
|
133
|
-
start_date_time = OpenStudio::DateTime.new(yd.makeDate(start_month, start_day), OpenStudio::Time.new(0,0,0))
|
134
|
-
end_date_time = OpenStudio::DateTime.new(yd.makeDate(12, 31), OpenStudio::Time.new(1,0,0))
|
135
|
-
|
136
|
-
# get timestep
|
182
|
+
# get the list of values for the whole year
|
137
183
|
interval_length = 60 / timestep
|
138
|
-
|
139
|
-
|
140
|
-
# get values and date times
|
141
|
-
values = @hash[:values]
|
142
|
-
num_values = values.size
|
143
|
-
i_values = 0
|
144
|
-
padded_values = []
|
145
|
-
date_times = []
|
146
|
-
pv = placeholder_value
|
147
|
-
|
148
|
-
while date_time < end_date_time
|
149
|
-
date = date_time.date
|
150
|
-
time = date_time.time
|
151
|
-
date_times << "#{date.dayOfMonth} #{date.monthOfYear.valueName} #{time.hours.to_s.rjust(2,'0')}:#{time.minutes.to_s.rjust(2,'0')}"
|
152
|
-
|
153
|
-
if date_time < start_date_time
|
154
|
-
padded_values << pv
|
155
|
-
elsif i_values < num_values
|
156
|
-
padded_values << values[i_values]
|
157
|
-
i_values += 1
|
158
|
-
else
|
159
|
-
padded_values << pv
|
160
|
-
end
|
161
|
-
|
162
|
-
date_time += dt
|
163
|
-
end
|
164
|
-
|
184
|
+
padded_values, date_times = full_annual_values(openstudio_model)
|
165
185
|
|
166
186
|
# find or create the schedule csv object which will hold the filename and columns
|
167
187
|
filename = nil
|
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.34.
|
4
|
+
version: 2.34.9
|
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: 2023-
|
14
|
+
date: 2023-08-02 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: json_pure
|
@@ -47,14 +47,14 @@ dependencies:
|
|
47
47
|
requirements:
|
48
48
|
- - "~>"
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: 0.
|
50
|
+
version: 0.4.0
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
55
|
- - "~>"
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: 0.
|
57
|
+
version: 0.4.0
|
58
58
|
description: Library and measures for translating between Honeybee JSON schema and
|
59
59
|
OpenStudio Model schema (OSM).
|
60
60
|
email:
|