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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 36e1a63a690e85c6c22baf31da94ff11ab277de6d30b274a1454dab2ca11d87f
4
- data.tar.gz: df1209e056ddbb6cbfa1401f15c3332d3e5316553e4593541c5db3c20e5b9448
3
+ metadata.gz: 3b9505fa54d86fb8c621ade53300a6b43def5a7fcd55d35849d401cdf7cd1a28
4
+ data.tar.gz: 6edb996029182479414ae88b56008bad2111dc440cd5a6bbe283de7e66b8a087
5
5
  SHA512:
6
- metadata.gz: 647b3b5ad803b8248b4234cbdb4f31669092adae8c7d7244f68804a73853777ecb97b0028d09fd495f05811e6e7aadb71248d310d4b4cdab46fec860a2127398
7
- data.tar.gz: 3225c1675846d452a31da177533a34d7daa9fbf07a15b0ba2dbd4abb7c139a3e491d3c45658518c0e27c983678a083c70fe4718e16c7361ef94334cca8144a65
6
+ metadata.gz: 4339561d74a18e66c9cd8932ead70d35907f6b7cfc3b745ab01f99d2060ef193119f746f2fc0272ed5731cccf51ed89f635322fdea82d7ab6843ebd602844b34
7
+ data.tar.gz: c3f8681f7a55584ed4f44a2c3ea5f731a740ee2b477580f36f7763d5c8806e926703828f36c0ba79c194c7665b531b83da53f2bafbc2e152a715ab3f79b3dfd4
@@ -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.0'
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.to_ScheduleFixedInterval.is_initialized or sch.to_ScheduleRuleset.is_initialized
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.to_ScheduleFixedInterval.is_initialized or sch.to_ScheduleRuleset.is_initialized
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.to_ScheduleFixedInterval.is_initialized or sch.to_ScheduleRuleset.is_initialized
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.to_ScheduleFixedInterval.is_initialized or sch.to_ScheduleRuleset.is_initialized
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
- unless other_eq.designLevel.empty?
144
- hash[:process_loads] << Honeybee::ProcessAbridged.from_load(other_eq)
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.to_ScheduleFixedInterval.is_initialized or sch.to_ScheduleRuleset.is_initialized
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
- if thermostat.heatingSetpointTemperatureSchedule.empty?
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 = thermostat.heatingSetpointTemperatureSchedule.get
200
+ heating_schedule = sch.get
192
201
  hash[:setpoint][:heating_schedule] = heating_schedule.nameString
193
202
  end
194
- if thermostat.coolingSetpointTemperatureSchedule.empty?
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), -100)
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 = thermostat.coolingSetpointTemperatureSchedule.get
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
- humidifying_schedule = humidistat.humidifyingRelativeHumiditySetpointSchedule.get
219
- hash[:setpoint][:humidifying_schedule] = humidifying_schedule.nameString
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
- dehumidifying_schedule = humidistat.dehumidifyingRelativeHumiditySetpointSchedule.get
223
- hash[:setpoint][:dehumidifying_schedule] = dehumidifying_schedule.nameString
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
- if schedule.to_ScheduleFixedInterval.is_initialized or schedule.to_ScheduleRuleset.is_initialized
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
- if schedule.to_ScheduleFixedInterval.is_initialized or schedule.to_ScheduleRuleset.is_initialized
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] = 'InfiltrationaAridged'
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
- if schedule.to_ScheduleFixedInterval.is_initialized or schedule.to_ScheduleRuleset.is_initialized
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
- if schedule.to_ScheduleFixedInterval.is_initialized or schedule.to_ScheduleRuleset.is_initialized
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
- if schedule.to_ScheduleFixedInterval.is_initialized or schedule.to_ScheduleRuleset.is_initialized
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
- if schedule.to_ScheduleFixedInterval.is_initialized or schedule.to_ScheduleRuleset.is_initialized
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 - load_def.sensibleHeatFraction.get
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
- hash[:watts] = load_def.getDesignLevel
49
- schedule = load.schedule
50
- if schedule.to_ScheduleFixedInterval.is_initialized or schedule.to_ScheduleRuleset.is_initialized
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.scheduleTypeLimits.get.unitType
50
- # Check if the schedule type is correct
51
- if sch == 'Fractional'
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.to_ScheduleFixedInterval.is_initialized or sch.to_ScheduleRuleset.is_initialized
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.to_ScheduleFixedInterval.is_initialized or sch.to_ScheduleRuleset.is_initialized
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.to_ScheduleFixedInterval.is_initialized or sch.to_ScheduleRuleset.is_initialized
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.to_ScheduleFixedInterval.is_initialized or sch.to_ScheduleRuleset.is_initialized
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.to_ScheduleFixedInterval.is_initialized or sch.to_ScheduleRuleset.is_initialized
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])
@@ -89,7 +89,6 @@ module Honeybee
89
89
  OpenStudio::Model::Model.new
90
90
  end
91
91
 
92
- @openstudio_model.getYearDescription.setCalendarYear(2020)
93
92
  # create all openstudio objects in the model
94
93
  create_openstudio_objects(log_report)
95
94
 
@@ -49,8 +49,6 @@ module Honeybee
49
49
  else
50
50
  OpenStudio::Model::Model.new
51
51
  end
52
-
53
- @openstudio_model.getYearDescription.setCalendarYear(2020)
54
52
 
55
53
  create_openstudio_objects
56
54
 
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.29.0
4
+ version: 2.29.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tanushree Charan