honeybee-openstudio 2.23.0 → 2.23.1
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5b611d0b78befb14bd1968ad3bc09479295c7367265049523c28ef3b3e3feeb
|
4
|
+
data.tar.gz: 6630478417dcc8d8680339b3d673b857ac6e0593152310213a3dc9c6eb227914
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 549cb01585b8b2983b5d5014703325bf87a83db1cc600c4f4ed557a501d998cc5e2632970a7d58d0c75d7a34234a11befbe2eb27c49c085303d25708040c794a
|
7
|
+
data.tar.gz: 16c6ed67bb2a2a8a5e83fe63641dee6db8df13a855103149565a4d476e0746c02a7837d12307f45ad67fe77854d2c572fcd39323434be5338395e27bb98f36a5
|
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.23.
|
7
|
+
spec.version = '2.23.1'
|
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
|
|
@@ -128,14 +128,10 @@ module Honeybee
|
|
128
128
|
def self.energy_properties_from_model(openstudio_model)
|
129
129
|
hash = {}
|
130
130
|
hash[:type] = 'ModelEnergyProperties'
|
131
|
-
hash[:constructions] = []
|
132
131
|
hash[:constructions] = constructions_from_model(openstudio_model)
|
133
132
|
hash[:materials] = materials_from_model(openstudio_model)
|
134
|
-
hash[:construction_sets] = []
|
135
133
|
hash[:construction_sets] = constructionsets_from_model(openstudio_model)
|
136
|
-
hash[:schedule_type_limits] = []
|
137
134
|
hash[:schedule_type_limits] = schedtypelimits_from_model(openstudio_model)
|
138
|
-
hash[:schedules] = []
|
139
135
|
hash[:schedules] = scheduleruleset_from_model(openstudio_model)
|
140
136
|
|
141
137
|
hash
|
@@ -39,23 +39,49 @@ module Honeybee
|
|
39
39
|
# create an empty hash
|
40
40
|
hash = {}
|
41
41
|
hash[:type] = 'ScheduleRulesetAbridged'
|
42
|
-
# set
|
43
|
-
hash[:identifier] = schedule_ruleset.nameString
|
44
|
-
|
45
|
-
hash[:
|
46
|
-
hash[:
|
47
|
-
hash[:
|
48
|
-
hash[:holiday_schedule] = schedule_ruleset.holidaySchedule.nameString
|
42
|
+
# set the primary (required) day schedules of the object
|
43
|
+
hash[:identifier] = clean_name(schedule_ruleset.nameString)
|
44
|
+
hash[:default_day_schedule] = clean_name(schedule_ruleset.defaultDaySchedule.nameString)
|
45
|
+
hash[:summer_designday_schedule] = clean_name(schedule_ruleset.summerDesignDaySchedule.nameString)
|
46
|
+
hash[:winter_designday_schedule] = clean_name(schedule_ruleset.winterDesignDaySchedule.nameString)
|
47
|
+
hash[:holiday_schedule] = clean_name(schedule_ruleset.holidaySchedule.nameString)
|
49
48
|
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
49
|
+
# create a list of all day schedules referenced in the Ruleset
|
50
|
+
schedule_days, day_ids = [], []
|
51
|
+
required_days = [
|
52
|
+
schedule_ruleset.defaultDaySchedule,
|
53
|
+
schedule_ruleset.summerDesignDaySchedule,
|
54
|
+
schedule_ruleset.winterDesignDaySchedule,
|
55
|
+
schedule_ruleset.holidaySchedule
|
56
|
+
]
|
57
|
+
required_days.each do |day_sch|
|
58
|
+
unless day_ids.include? day_sch.nameString
|
59
|
+
schedule_days << day_sch
|
60
|
+
day_ids << day_sch.nameString
|
61
|
+
end
|
54
62
|
end
|
55
63
|
|
64
|
+
# loop through the rules and add them along with their day schedules
|
56
65
|
hash[:schedule_rules] = []
|
57
66
|
schedule_ruleset.scheduleRules.each do |schedule_rule|
|
58
67
|
hash[:schedule_rules] << ScheduleRulesetAbridged.from_schedule_rule(schedule_rule)
|
68
|
+
day_sch = schedule_rule.daySchedule
|
69
|
+
unless day_ids.include? day_sch.nameString
|
70
|
+
schedule_days << day_sch
|
71
|
+
day_ids << day_sch.nameString
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
# write all of the day schedule specifications into the hash
|
76
|
+
hash[:day_schedules] = []
|
77
|
+
schedule_days.each do |schedule_day|
|
78
|
+
hash[:day_schedules] << ScheduleRulesetAbridged.from_day_schedule(schedule_day)
|
79
|
+
end
|
80
|
+
|
81
|
+
# assing any schedule type limits if they exist
|
82
|
+
unless schedule_ruleset.scheduleTypeLimits.empty?
|
83
|
+
typ_lim = schedule_ruleset.scheduleTypeLimits.get
|
84
|
+
hash[:schedule_type_limit] = clean_name(typ_lim.nameString)
|
59
85
|
end
|
60
86
|
|
61
87
|
hash
|
@@ -64,7 +90,7 @@ module Honeybee
|
|
64
90
|
def self.from_day_schedule(day_schedule)
|
65
91
|
hash = {}
|
66
92
|
hash[:type] = 'ScheduleDay'
|
67
|
-
hash[:identifier] = day_schedule.nameString
|
93
|
+
hash[:identifier] = clean_name(day_schedule.nameString)
|
68
94
|
hash[:interpolate] = day_schedule.interpolatetoTimestep
|
69
95
|
hash[:values] = day_schedule.values
|
70
96
|
time_until = [[0,0]]
|
@@ -80,7 +106,7 @@ module Honeybee
|
|
80
106
|
def self.from_schedule_rule(schedule_rule)
|
81
107
|
hash = {}
|
82
108
|
hash[:type] = 'ScheduleRuleAbridged'
|
83
|
-
hash[:schedule_day] = schedule_rule.daySchedule.nameString
|
109
|
+
hash[:schedule_day] = clean_name(schedule_rule.daySchedule.nameString)
|
84
110
|
hash[:apply_sunday] = schedule_rule.applySunday
|
85
111
|
hash[:apply_monday] = schedule_rule.applyMonday
|
86
112
|
hash[:apply_tuesday] = schedule_rule.applyTuesday
|
@@ -40,7 +40,7 @@ module Honeybee
|
|
40
40
|
hash = {}
|
41
41
|
hash[:type] = 'ScheduleTypeLimit'
|
42
42
|
# set hash values from OpenStudio Object
|
43
|
-
hash[:identifier] = schedule_type_limit.nameString
|
43
|
+
hash[:identifier] = clean_name(schedule_type_limit.nameString)
|
44
44
|
# check if boost optional object is empty
|
45
45
|
unless schedule_type_limit.lowerLimitValue.empty?
|
46
46
|
hash[:lower_limit] = schedule_type_limit.lowerLimitValue.get
|
@@ -54,7 +54,19 @@ module Honeybee
|
|
54
54
|
numeric_type = schedule_type_limit.numericType.get
|
55
55
|
hash[:numeric_type] = numeric_type.titleize
|
56
56
|
end
|
57
|
-
|
57
|
+
|
58
|
+
# make sure unit type always follows the capitalization of the Honeybee Enumeration
|
59
|
+
unit_type = schedule_type_limit.unitType.titleize
|
60
|
+
if unit_type == 'Deltatemperature'
|
61
|
+
unit_type = 'DeltaTemperature'
|
62
|
+
elsif unit_type == 'Precipitationrate'
|
63
|
+
unit_type = 'PrecipitationRate'
|
64
|
+
elsif unit_type == 'Convectioncoefficient'
|
65
|
+
unit_type = 'ConvectionCoefficient'
|
66
|
+
elsif unit_type == 'Activitylevel'
|
67
|
+
unit_type = 'ActivityLevel'
|
68
|
+
end
|
69
|
+
hash[:unit_type] = unit_type
|
58
70
|
|
59
71
|
hash
|
60
72
|
end
|