honeybee-openstudio 2.29.0 → 2.29.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 +4 -4
- data/honeybee-openstudio.gemspec +1 -1
- data/lib/from_openstudio/geometry/room.rb +31 -17
- data/lib/from_openstudio/load/electric_equipment.rb +1 -3
- data/lib/from_openstudio/load/gas_equipment.rb +1 -3
- data/lib/from_openstudio/load/infiltration.rb +2 -4
- data/lib/from_openstudio/load/lighting.rb +1 -3
- data/lib/from_openstudio/load/people.rb +3 -7
- data/lib/from_openstudio/load/process.rb +5 -3
- data/lib/from_openstudio/load/ventilation.rb +3 -4
- data/lib/from_openstudio/program_type.rb +5 -5
- data/lib/to_openstudio/load/setpoint_humidistat.rb +4 -0
- data/lib/to_openstudio/load/setpoint_thermostat.rb +4 -0
- data/lib/to_openstudio/model.rb +0 -1
- data/lib/to_openstudio/simulation/parameter_model.rb +0 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b9505fa54d86fb8c621ade53300a6b43def5a7fcd55d35849d401cdf7cd1a28
|
4
|
+
data.tar.gz: 6edb996029182479414ae88b56008bad2111dc440cd5a6bbe283de7e66b8a087
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4339561d74a18e66c9cd8932ead70d35907f6b7cfc3b745ab01f99d2060ef193119f746f2fc0272ed5731cccf51ed89f635322fdea82d7ab6843ebd602844b34
|
7
|
+
data.tar.gz: c3f8681f7a55584ed4f44a2c3ea5f731a740ee2b477580f36f7763d5c8806e926703828f36c0ba79c194c7665b531b83da53f2bafbc2e152a715ab3f79b3dfd4
|
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.29.
|
7
|
+
spec.version = '2.29.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
|
|
@@ -88,7 +88,7 @@ module Honeybee
|
|
88
88
|
# Check if schedule exists and is of the correct type
|
89
89
|
if !people_def.peopleperSpaceFloorArea.empty? && !people.numberofPeopleSchedule.empty?
|
90
90
|
sch = people.numberofPeopleSchedule.get
|
91
|
-
if sch.
|
91
|
+
if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
|
92
92
|
hash[:people] = Honeybee::PeopleAbridged.from_load(people)
|
93
93
|
break
|
94
94
|
end
|
@@ -102,7 +102,7 @@ module Honeybee
|
|
102
102
|
# Check if schedule exists and is of the correct type
|
103
103
|
if !light_def.wattsperSpaceFloorArea.empty? && !light.schedule.empty?
|
104
104
|
sch = light.schedule.get
|
105
|
-
if sch.
|
105
|
+
if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
|
106
106
|
hash[:lighting] = Honeybee::LightingAbridged.from_load(light)
|
107
107
|
break
|
108
108
|
end
|
@@ -116,7 +116,7 @@ module Honeybee
|
|
116
116
|
# Check if schedule exists and is of the correct type
|
117
117
|
if !electric_eq_def.wattsperSpaceFloorArea.empty? && !electric_eq.schedule.empty?
|
118
118
|
sch = electric_eq.schedule.get
|
119
|
-
if sch.
|
119
|
+
if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
|
120
120
|
hash[:electric_equipment] = Honeybee::ElectricEquipmentAbridged.from_load(electric_eq)
|
121
121
|
break
|
122
122
|
end
|
@@ -130,7 +130,7 @@ module Honeybee
|
|
130
130
|
# Check if schedule exists and is of the correct type
|
131
131
|
if !gas_eq_def.wattsperSpaceFloorArea.empty? && !gas_eq.schedule.empty?
|
132
132
|
sch = gas_eq.schedule.get
|
133
|
-
if sch.
|
133
|
+
if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
|
134
134
|
hash[:gas_equipment] = Honeybee::GasEquipmentAbridged.from_load(gas_eq)
|
135
135
|
break
|
136
136
|
end
|
@@ -140,8 +140,12 @@ module Honeybee
|
|
140
140
|
unless space.otherEquipment.empty?
|
141
141
|
hash[:process_loads] = []
|
142
142
|
space.otherEquipment.each do |other_eq|
|
143
|
-
|
144
|
-
|
143
|
+
other_eq_def = other_eq.otherEquipmentDefinition
|
144
|
+
if !other_eq_def.designLevel.empty? && !other_eq.schedule.empty?
|
145
|
+
sch = other_eq.schedule.get
|
146
|
+
if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
|
147
|
+
hash[:process_loads] << Honeybee::ProcessAbridged.from_load(other_eq)
|
148
|
+
end
|
145
149
|
end
|
146
150
|
end
|
147
151
|
end
|
@@ -151,7 +155,7 @@ module Honeybee
|
|
151
155
|
# Check if schedule exists and is of the correct type
|
152
156
|
if !infiltration.flowperExteriorSurfaceArea.empty? && !infiltration.schedule.empty?
|
153
157
|
sch = infiltration.schedule.get
|
154
|
-
if sch.
|
158
|
+
if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
|
155
159
|
hash[:infiltration] = Honeybee::InfiltrationAbridged.from_load(infiltration)
|
156
160
|
break
|
157
161
|
end
|
@@ -169,9 +173,14 @@ module Honeybee
|
|
169
173
|
thermal_zone = space.thermalZone.get
|
170
174
|
unless thermal_zone.thermostatSetpointDualSetpoint.empty?
|
171
175
|
hash[:setpoint] = {}
|
176
|
+
hash[:setpoint][:type] = 'SetpointAbridged'
|
172
177
|
thermostat = thermal_zone.thermostatSetpointDualSetpoint.get
|
173
178
|
hash[:setpoint][:identifier] = thermostat.nameString
|
174
|
-
|
179
|
+
unless thermostat.displayName.empty?
|
180
|
+
hash[:display_name] = (thermostat.displayName.get).force_encoding("UTF-8")
|
181
|
+
end
|
182
|
+
sch = thermostat.heatingSetpointTemperatureSchedule
|
183
|
+
if sch.empty? or !sch.get.to_ScheduleRuleset.is_initialized
|
175
184
|
# if heating setpoint schedule is not specified create a new setpoint schedule and assign to HB thermostat object.
|
176
185
|
# first check if schedule is already created
|
177
186
|
if $heating_setpoint_schedule.nil?
|
@@ -182,16 +191,17 @@ module Honeybee
|
|
182
191
|
openstudio_sch_type_lim.setName('Temperature')
|
183
192
|
openstudio_sch_type_lim.setNumericType('Temperature')
|
184
193
|
openstudio_schedule.defaultDaySchedule.setName('Heating Day Default')
|
185
|
-
openstudio_schedule.defaultDaySchedule.addValue(OpenStudio::Time.new(0,24,0,0), 100)
|
194
|
+
openstudio_schedule.defaultDaySchedule.addValue(OpenStudio::Time.new(0,24,0,0), -100)
|
186
195
|
openstudio_schedule.defaultDaySchedule.setScheduleTypeLimits(openstudio_sch_type_lim)
|
187
196
|
$heating_setpoint_schedule = Honeybee::ScheduleRulesetAbridged.from_schedule_ruleset(openstudio_schedule)
|
188
197
|
end
|
189
198
|
hash[:setpoint][:heating_schedule] = $heating_setpoint_schedule[:identifier]
|
190
199
|
else
|
191
|
-
heating_schedule =
|
200
|
+
heating_schedule = sch.get
|
192
201
|
hash[:setpoint][:heating_schedule] = heating_schedule.nameString
|
193
202
|
end
|
194
|
-
|
203
|
+
sch = thermostat.coolingSetpointTemperatureSchedule
|
204
|
+
if sch.empty? or !sch.get.to_ScheduleRuleset.is_initialized
|
195
205
|
# if cooling setpoint schedule is not specified create a new setpoint schedule and assign to HB thermostat object
|
196
206
|
# first check if schedule is already created
|
197
207
|
if $cooling_setpoint_schedule.nil?
|
@@ -202,25 +212,29 @@ module Honeybee
|
|
202
212
|
openstudio_sch_type_lim.setName('Temperature')
|
203
213
|
openstudio_sch_type_lim.setNumericType('Temperature')
|
204
214
|
openstudio_schedule.defaultDaySchedule.setName('Cooling Day Default')
|
205
|
-
openstudio_schedule.defaultDaySchedule.addValue(OpenStudio::Time.new(0,24,0,0),
|
215
|
+
openstudio_schedule.defaultDaySchedule.addValue(OpenStudio::Time.new(0,24,0,0), 100)
|
206
216
|
openstudio_schedule.defaultDaySchedule.setScheduleTypeLimits(openstudio_sch_type_lim)
|
207
217
|
$cooling_setpoint_schedule = Honeybee::ScheduleRulesetAbridged.from_schedule_ruleset(openstudio_schedule)
|
208
218
|
end
|
209
219
|
hash[:setpoint][:cooling_schedule] = $cooling_setpoint_schedule[:identifier]
|
210
220
|
else
|
211
|
-
cooling_schedule =
|
221
|
+
cooling_schedule = sch.get
|
212
222
|
hash[:setpoint][:cooling_schedule] = cooling_schedule.nameString
|
213
223
|
end
|
214
224
|
end
|
215
225
|
unless thermal_zone.zoneControlHumidistat.empty?
|
216
226
|
humidistat = thermal_zone.zoneControlHumidistat.get
|
217
227
|
unless humidistat.humidifyingRelativeHumiditySetpointSchedule.empty?
|
218
|
-
|
219
|
-
|
228
|
+
sch = humidistat.humidifyingRelativeHumiditySetpointSchedule.get
|
229
|
+
if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
|
230
|
+
hash[:setpoint][:humidifying_schedule] = sch.nameString
|
231
|
+
end
|
220
232
|
end
|
221
233
|
unless humidistat.dehumidifyingRelativeHumiditySetpointSchedule.empty?
|
222
|
-
|
223
|
-
|
234
|
+
sch = humidistat.dehumidifyingRelativeHumiditySetpointSchedule.get
|
235
|
+
if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
|
236
|
+
hash[:setpoint][:dehumidifying_schedule] = sch.nameString
|
237
|
+
end
|
224
238
|
end
|
225
239
|
end
|
226
240
|
end
|
@@ -46,9 +46,7 @@ module Honeybee
|
|
46
46
|
end
|
47
47
|
unless load.schedule.empty?
|
48
48
|
schedule = load.schedule.get
|
49
|
-
|
50
|
-
hash[:schedule] = schedule.nameString
|
51
|
-
end
|
49
|
+
hash[:schedule] = schedule.nameString
|
52
50
|
end
|
53
51
|
load_def = load.electricEquipmentDefinition
|
54
52
|
unless load_def.wattsperSpaceFloorArea.empty?
|
@@ -43,9 +43,7 @@ module Honeybee
|
|
43
43
|
hash[:identifier] = clean_name(load.nameString)
|
44
44
|
unless load.schedule.empty?
|
45
45
|
schedule = load.schedule.get
|
46
|
-
|
47
|
-
hash[:schedule] = schedule.nameString
|
48
|
-
end
|
46
|
+
hash[:schedule] = schedule.nameString
|
49
47
|
end
|
50
48
|
load_def = load.gasEquipmentDefinition
|
51
49
|
unless load_def.wattsperSpaceFloorArea.empty?
|
@@ -38,7 +38,7 @@ module Honeybee
|
|
38
38
|
def self.from_load(load)
|
39
39
|
# create an empty hash
|
40
40
|
hash = {}
|
41
|
-
hash[:type] = '
|
41
|
+
hash[:type] = 'InfiltrationAbridged'
|
42
42
|
# set hash values from OpenStudio Object
|
43
43
|
hash[:identifier] = clean_name(load.nameString)
|
44
44
|
unless load.displayName.empty?
|
@@ -47,9 +47,7 @@ module Honeybee
|
|
47
47
|
hash[:flow_per_exterior_area] = load.flowperExteriorSurfaceArea.get
|
48
48
|
unless load.schedule.empty?
|
49
49
|
schedule = load.schedule.get
|
50
|
-
|
51
|
-
hash[:schedule] = schedule.nameString
|
52
|
-
end
|
50
|
+
hash[:schedule] = schedule.nameString
|
53
51
|
end
|
54
52
|
hash[:constant_coefficient] = load.constantTermCoefficient
|
55
53
|
hash[:temperature_coefficient] = load.temperatureTermCoefficient
|
@@ -46,9 +46,7 @@ module Honeybee
|
|
46
46
|
end
|
47
47
|
unless load.schedule.empty?
|
48
48
|
schedule = load.schedule.get
|
49
|
-
|
50
|
-
hash[:schedule] = schedule.nameString
|
51
|
-
end
|
49
|
+
hash[:schedule] = schedule.nameString
|
52
50
|
end
|
53
51
|
loads_def = load.lightsDefinition
|
54
52
|
unless loads_def.wattsperSpaceFloorArea.empty?
|
@@ -48,15 +48,11 @@ module Honeybee
|
|
48
48
|
#in OS
|
49
49
|
unless load.numberofPeopleSchedule.empty?
|
50
50
|
schedule = load.numberofPeopleSchedule.get
|
51
|
-
|
52
|
-
hash[:occupancy_schedule] = schedule.nameString
|
53
|
-
end
|
51
|
+
hash[:occupancy_schedule] = schedule.nameString
|
54
52
|
end
|
55
53
|
unless load.activityLevelSchedule.empty?
|
56
54
|
schedule = load.activityLevelSchedule.get
|
57
|
-
|
58
|
-
hash[:activity_schedule] = schedule.nameString
|
59
|
-
end
|
55
|
+
hash[:activity_schedule] = schedule.nameString
|
60
56
|
end
|
61
57
|
load_def = load.peopleDefinition
|
62
58
|
unless load_def.peopleperSpaceFloorArea.empty?
|
@@ -66,7 +62,7 @@ module Honeybee
|
|
66
62
|
unless load_def.isSensibleHeatFractionAutocalculated
|
67
63
|
sensible_fraction = load_def.sensibleHeatFraction
|
68
64
|
unless sensible_fraction.empty
|
69
|
-
hash[:latent_fraction] = 1 -
|
65
|
+
hash[:latent_fraction] = 1 - sensible_fraction.get
|
70
66
|
end
|
71
67
|
end
|
72
68
|
hash
|
@@ -45,9 +45,11 @@ module Honeybee
|
|
45
45
|
unless load_def.displayName.empty?
|
46
46
|
hash[:display_name] = (load_def.displayName.get).force_encoding("UTF-8")
|
47
47
|
end
|
48
|
-
|
49
|
-
|
50
|
-
|
48
|
+
unless load_def.designLevel.empty?
|
49
|
+
hash[:watts] = load_def.designLevel.get
|
50
|
+
end
|
51
|
+
unless load.schedule.empty?
|
52
|
+
schedule = load.schedule.get
|
51
53
|
hash[:schedule] = schedule.nameString
|
52
54
|
end
|
53
55
|
hash[:end_use_category] = load.endUseSubcategory
|
@@ -46,10 +46,9 @@ module Honeybee
|
|
46
46
|
hash[:flow_per_person] = load.outdoorAirFlowperPerson
|
47
47
|
hash[:flow_per_area] = load.outdoorAirFlowperFloorArea
|
48
48
|
unless load.outdoorAirFlowRateFractionSchedule.empty?
|
49
|
-
sch = load.outdoorAirFlowRateFractionSchedule.get
|
50
|
-
|
51
|
-
|
52
|
-
hash[:schedule] = load.name
|
49
|
+
sch = load.outdoorAirFlowRateFractionSchedule.get
|
50
|
+
if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
|
51
|
+
hash[:schedule] = sch.nameString
|
53
52
|
end
|
54
53
|
end
|
55
54
|
|
@@ -51,7 +51,7 @@ module Honeybee
|
|
51
51
|
# Check if schedule exists and is of the correct type
|
52
52
|
if !people_def.peopleperSpaceFloorArea.empty? && !people.numberofPeopleSchedule.empty?
|
53
53
|
sch = people.numberofPeopleSchedule.get
|
54
|
-
if sch.
|
54
|
+
if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
|
55
55
|
hash[:people] = Honeybee::PeopleAbridged.from_load(people)
|
56
56
|
break
|
57
57
|
end
|
@@ -65,7 +65,7 @@ module Honeybee
|
|
65
65
|
# Check if schedule exists and is of the correct type
|
66
66
|
if !light_def.wattsperSpaceFloorArea.empty? && !light.schedule.empty?
|
67
67
|
sch = light.schedule.get
|
68
|
-
if sch.
|
68
|
+
if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
|
69
69
|
hash[:lighting] = Honeybee::LightingAbridged.from_load(light)
|
70
70
|
break
|
71
71
|
end
|
@@ -79,7 +79,7 @@ module Honeybee
|
|
79
79
|
# Check if schedule exists and is of the correct type
|
80
80
|
if !electric_eq_def.wattsperSpaceFloorArea.empty? && !electric_eq.schedule.empty?
|
81
81
|
sch = electric_eq.schedule.get
|
82
|
-
if sch.
|
82
|
+
if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
|
83
83
|
hash[:electric_equipment] = Honeybee::ElectricEquipmentAbridged.from_load(electric_eq)
|
84
84
|
break
|
85
85
|
end
|
@@ -93,7 +93,7 @@ module Honeybee
|
|
93
93
|
# Check if schedule exists and is of the correct type
|
94
94
|
if !gas_eq_def.wattsperSpaceFloorArea.empty? && !gas_eq.schedule.empty?
|
95
95
|
sch = gas_eq.schedule.get
|
96
|
-
if sch.
|
96
|
+
if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
|
97
97
|
hash[:gas_equipment] = Honeybee::GasEquipmentAbridged.from_load(gas_eq)
|
98
98
|
break
|
99
99
|
end
|
@@ -106,7 +106,7 @@ module Honeybee
|
|
106
106
|
# Check if schedule exists and is of the correct type
|
107
107
|
if !infiltration.flowperExteriorSurfaceArea.empty? && !infiltration.schedule.empty?
|
108
108
|
sch = infiltration.schedule.get
|
109
|
-
if sch.
|
109
|
+
if sch.to_ScheduleRuleset.is_initialized or sch.to_ScheduleFixedInterval.is_initialized
|
110
110
|
hash[:infiltration] = Honeybee::InfiltrationAbridged.from_load(infiltration)
|
111
111
|
break
|
112
112
|
end
|
@@ -40,6 +40,10 @@ module Honeybee
|
|
40
40
|
|
41
41
|
# create humidistat openstudio object
|
42
42
|
os_humidistat = OpenStudio::Model::ZoneControlHumidistat.new(openstudio_model)
|
43
|
+
os_humidistat.setName(@hash[:identifier])
|
44
|
+
unless @hash[:display_name].nil?
|
45
|
+
os_humidistat.setDisplayName(@hash[:display_name])
|
46
|
+
end
|
43
47
|
|
44
48
|
# assign humidifying schedule if it exists
|
45
49
|
if @hash[:humidifying_schedule]
|
@@ -40,6 +40,10 @@ module Honeybee
|
|
40
40
|
|
41
41
|
# create thermostat openstudio object
|
42
42
|
os_thermostat = OpenStudio::Model::ThermostatSetpointDualSetpoint.new(openstudio_model)
|
43
|
+
os_thermostat.setName(@hash[:identifier])
|
44
|
+
unless @hash[:display_name].nil?
|
45
|
+
os_thermostat.setDisplayName(@hash[:display_name])
|
46
|
+
end
|
43
47
|
|
44
48
|
# assign heating setpoint temperature schedule
|
45
49
|
heat_sch = openstudio_model.getScheduleByName(@hash[:heating_schedule])
|
data/lib/to_openstudio/model.rb
CHANGED