honeybee-openstudio 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/honeybee-openstudio.gemspec +1 -1
- data/lib/from_honeybee/schedule/ruleset.rb +13 -9
- 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: df00142e35c53ffa6e706d3e99b9e5a99b1466a6963677d478d6c1b34dec8424
|
4
|
+
data.tar.gz: 697e61773ee5e76c64e21ad711b434c7c13cd592fd669cd92e506a7895f89511
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46586662b09ef02607e8a616b3541f0fcaf974469d5b762229029241cce79a87e615fdd77d9c6a5ad2fa75458dc651ef679e3873d830bc8d47f494ab7068cf76
|
7
|
+
data.tar.gz: d8f1ab3659d344ab93db52c9aca8fd8e3b1b6badb494bf1be8790f57d4663d97e4a79a5784dbeb184f9e7fb01c676efb6ed72a80b1139e2047b02ad1b3ffd36e
|
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.0.
|
7
|
+
spec.version = '2.0.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
|
|
@@ -58,10 +58,23 @@ module FromHoneybee
|
|
58
58
|
os_sch_ruleset = OpenStudio::Model::ScheduleRuleset.new(openstudio_model)
|
59
59
|
os_sch_ruleset.setName(@hash[:identifier])
|
60
60
|
|
61
|
+
# assign schedule type limit
|
62
|
+
sch_type_limit_obj = nil
|
63
|
+
if @hash[:schedule_type_limit]
|
64
|
+
schedule_type_limit = openstudio_model.getScheduleTypeLimitsByName(@hash[:schedule_type_limit])
|
65
|
+
unless schedule_type_limit.empty?
|
66
|
+
sch_type_limit_obj = schedule_type_limit.get
|
67
|
+
os_sch_ruleset.setScheduleTypeLimits(sch_type_limit_obj)
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
61
71
|
# loop through day schedules and create openstudio schedule day object
|
62
72
|
@hash[:day_schedules].each do |day_schedule|
|
63
73
|
day_schedule_new = OpenStudio::Model::ScheduleDay.new(openstudio_model)
|
64
74
|
day_schedule_new.setName(day_schedule[:identifier])
|
75
|
+
unless sch_type_limit_obj.nil?
|
76
|
+
day_schedule_new.setScheduleTypeLimits(sch_type_limit_obj)
|
77
|
+
end
|
65
78
|
values_day_new = day_schedule[:values]
|
66
79
|
times_day_new = day_schedule[:times]
|
67
80
|
times_day_new.delete_at(0) # Remove [0, 0] from array at index 0.
|
@@ -112,15 +125,6 @@ module FromHoneybee
|
|
112
125
|
os_sch_ruleset.defaultDaySchedule.addValue(times[i], values[i])
|
113
126
|
end
|
114
127
|
end
|
115
|
-
|
116
|
-
# assign schedule type limit
|
117
|
-
if @hash[:schedule_type_limit]
|
118
|
-
schedule_type_limit = openstudio_model.getScheduleTypeLimitsByName(@hash[:schedule_type_limit])
|
119
|
-
unless schedule_type_limit.empty?
|
120
|
-
schedule_type_limit_object = schedule_type_limit.get
|
121
|
-
os_sch_ruleset.setScheduleTypeLimits(schedule_type_limit_object)
|
122
|
-
end
|
123
|
-
end
|
124
128
|
|
125
129
|
# assign schedule rules
|
126
130
|
if @hash[:schedule_rules]
|
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.0.
|
4
|
+
version: 2.0.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: 2020-05-
|
14
|
+
date: 2020-05-29 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|