honeybee-openstudio 2.23.7 → 2.24.0
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: aaaa7ddfb52102f325f31d2090e14c7174c3a98ba156859b989b30391a4abbdb
|
4
|
+
data.tar.gz: 5f6fb58c9f9f926fab088fb0c300cbe4527039a984d2bc5d816d72c27f64d7f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47d6f83ad9135c92c77e5924c9d1872c2b2573a2d056f9940bec7f96b7aba8e74c6bcd0aca8cd83766a79c4c8398df88bbf54ae2a29edb8a080cc6d57a6f13ef
|
7
|
+
data.tar.gz: dc582df2f41e9ffe26b67a0c92b0d256dbab7215697573655d4eb50edd6a498ef9f084fd66016f8dfff3882555afacdcb6b558db7d7ed4fabc795145d3df89af
|
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.24.0'
|
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
|
|
@@ -75,6 +75,8 @@ module Honeybee
|
|
75
75
|
transmittance_schedule = shading_surface.transmittanceSchedule
|
76
76
|
if !transmittance_schedule.empty?
|
77
77
|
trans_sch_name = clean_identifier(transmittance_schedule.get.nameString)
|
78
|
+
# Check whether schedules other than schedule ruleset or schedule fixed interval are
|
79
|
+
# being assigned
|
78
80
|
unless $schedules[trans_sch_name].nil?
|
79
81
|
hash[:transmittance_schedule] = trans_sch_name
|
80
82
|
end
|
@@ -48,6 +48,7 @@ require 'from_openstudio/construction/shade'
|
|
48
48
|
require 'from_openstudio/construction_set'
|
49
49
|
require 'from_openstudio/schedule/type_limit'
|
50
50
|
require 'from_openstudio/schedule/ruleset'
|
51
|
+
require 'from_openstudio/schedule/fixed_interval'
|
51
52
|
|
52
53
|
require 'openstudio'
|
53
54
|
|
@@ -134,6 +135,7 @@ module Honeybee
|
|
134
135
|
hash[:construction_sets] = constructionsets_from_model(openstudio_model)
|
135
136
|
hash[:schedule_type_limits] = schedtypelimits_from_model(openstudio_model)
|
136
137
|
hash[:schedules] = scheduleruleset_from_model(openstudio_model)
|
138
|
+
hash[:schedules] = schedulefixedinterval_from_model(openstudio_model)
|
137
139
|
|
138
140
|
hash
|
139
141
|
end
|
@@ -290,5 +292,18 @@ module Honeybee
|
|
290
292
|
result
|
291
293
|
end
|
292
294
|
|
295
|
+
# Create HB Schedule Fixed Interval from OpenStudio Schedule Fixed Interval
|
296
|
+
def self.schedulefixedinterval_from_model(openstudio_model)
|
297
|
+
result = []
|
298
|
+
# check if it is a leap year
|
299
|
+
is_leap_year = openstudio_model.getYearDescription.isLeapYear
|
300
|
+
openstudio_model.getScheduleFixedIntervals.each do |sch_fix_int|
|
301
|
+
sched_fixed_hash = ScheduleFixedIntervalAbridged.from_schedule_fixedinterval(sch_fix_int, is_leap_year)
|
302
|
+
$schedules[sched_fixed_hash[:identifier]] = sched_fixed_hash
|
303
|
+
result << sched_fixed_hash
|
304
|
+
end
|
305
|
+
result
|
306
|
+
end
|
307
|
+
|
293
308
|
end # Model
|
294
309
|
end # Honeybee
|
@@ -0,0 +1,71 @@
|
|
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/schedule/fixed_interval'
|
33
|
+
require 'from_openstudio/model_object'
|
34
|
+
|
35
|
+
module Honeybee
|
36
|
+
class ScheduleFixedIntervalAbridged < ModelObject
|
37
|
+
|
38
|
+
def self.from_schedule_fixedinterval(schedule_fixedinterval, is_leap_year)
|
39
|
+
# create an empty hash
|
40
|
+
hash = {}
|
41
|
+
hash[:type] = 'ScheduleFixedIntervalAbridged'
|
42
|
+
hash[:identifier] = clean_name(schedule_fixedinterval.nameString)
|
43
|
+
start_month = schedule_fixedinterval.startMonth
|
44
|
+
start_day = schedule_fixedinterval.startDay
|
45
|
+
if is_leap_year
|
46
|
+
# if it is a leap year then add 1 as third value
|
47
|
+
hash[:start_date] = [start_month, start_day, 1]
|
48
|
+
else
|
49
|
+
hash[:start_date] = [start_month, start_day]
|
50
|
+
end
|
51
|
+
hash[:interpolate] = schedule_fixedinterval.interpolatetoTimestep
|
52
|
+
# assigning schedule type limit if it exists
|
53
|
+
unless schedule_fixedinterval.scheduleTypeLimits.empty?
|
54
|
+
typ_lim = schedule_fixedinterval.scheduleTypeLimits.get
|
55
|
+
hash[:schedule_type_limit] = clean_name(typ_lim.nameString)
|
56
|
+
end
|
57
|
+
interval_length = schedule_fixedinterval.intervalLength
|
58
|
+
hash[:timestep] = 60 / interval_length.to_i
|
59
|
+
# get values from schedule fixed interval
|
60
|
+
values = schedule_fixedinterval.timeSeries.values
|
61
|
+
value_array = []
|
62
|
+
for i in 0..(values.size - 1)
|
63
|
+
value_array << values[i]
|
64
|
+
end
|
65
|
+
hash[:values] = value_array
|
66
|
+
|
67
|
+
hash
|
68
|
+
end
|
69
|
+
|
70
|
+
end
|
71
|
+
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.24.0
|
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-10-02 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -187,6 +187,7 @@ files:
|
|
187
187
|
- lib/from_openstudio/material/window_simpleglazsys.rb
|
188
188
|
- lib/from_openstudio/model.rb
|
189
189
|
- lib/from_openstudio/model_object.rb
|
190
|
+
- lib/from_openstudio/schedule/fixed_interval.rb
|
190
191
|
- lib/from_openstudio/schedule/ruleset.rb
|
191
192
|
- lib/from_openstudio/schedule/type_limit.rb
|
192
193
|
- lib/from_openstudio/simulation/design_day.rb
|