honeybee-openstudio 2.25.3 → 2.26.0
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/honeybee/_defaults/model.json +661 -29
- data/lib/honeybee/load/process.rb +42 -0
- data/lib/honeybee.rb +1 -0
- data/lib/to_openstudio/geometry/room.rb +9 -0
- data/lib/to_openstudio/load/electric_equipment.rb +3 -0
- data/lib/to_openstudio/load/gas_equipment.rb +3 -0
- data/lib/to_openstudio/load/process.rb +97 -0
- data/lib/to_openstudio.rb +1 -0
- metadata +4 -2
@@ -0,0 +1,42 @@
|
|
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/model_object'
|
33
|
+
|
34
|
+
module Honeybee
|
35
|
+
class ProcessAbridged < ModelObject
|
36
|
+
|
37
|
+
def defaults
|
38
|
+
@@schema[:components][:schemas][:ProcessAbridged][:properties]
|
39
|
+
end
|
40
|
+
|
41
|
+
end #ProcessAbridged
|
42
|
+
end #Honeybee
|
data/lib/honeybee.rb
CHANGED
@@ -79,6 +79,7 @@ require 'honeybee/load/ventilation'
|
|
79
79
|
require 'honeybee/load/setpoint_thermostat'
|
80
80
|
require 'honeybee/load/setpoint_humidistat'
|
81
81
|
require 'honeybee/load/daylight'
|
82
|
+
require 'honeybee/load/process'
|
82
83
|
|
83
84
|
# import the schedule objects
|
84
85
|
require 'honeybee/schedule/type_limit'
|
@@ -382,6 +382,15 @@ module Honeybee
|
|
382
382
|
end
|
383
383
|
end
|
384
384
|
|
385
|
+
# assign any process loads if specified
|
386
|
+
if @hash[:properties][:energy][:process_loads]
|
387
|
+
@hash[:properties][:energy][:process_loads].each do |p_load|
|
388
|
+
hb_p_load = ProcessAbridged.new(p_load)
|
389
|
+
os_p_load = hb_p_load.to_openstudio(openstudio_model)
|
390
|
+
os_p_load.setSpace(os_space)
|
391
|
+
end
|
392
|
+
end
|
393
|
+
|
385
394
|
os_space
|
386
395
|
end
|
387
396
|
|
@@ -59,6 +59,9 @@ module Honeybee
|
|
59
59
|
os_electric_equip.setSchedule(electric_equipment_schedule_object)
|
60
60
|
end
|
61
61
|
|
62
|
+
# ensure that it's always reported under electric equipment
|
63
|
+
os_electric_equip.setEndUseSubcategory('Electric Equipment')
|
64
|
+
|
62
65
|
# assign radiant fraction if it exists
|
63
66
|
if @hash[:radiant_fraction]
|
64
67
|
os_electric_equip_def.setFractionRadiant(@hash[:radiant_fraction])
|
@@ -60,6 +60,9 @@ module Honeybee
|
|
60
60
|
os_gas_equip.setSchedule(gas_equipment_schedule_object)
|
61
61
|
end
|
62
62
|
|
63
|
+
# ensure that it's always reported under electric equipment
|
64
|
+
os_gas_equip.setEndUseSubcategory('Gas Equipment')
|
65
|
+
|
63
66
|
# assign radiant fraction if it exists
|
64
67
|
if @hash[:radiant_fraction]
|
65
68
|
os_gas_equip_def.setFractionRadiant(@hash[:radiant_fraction])
|
@@ -0,0 +1,97 @@
|
|
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/load/process'
|
33
|
+
|
34
|
+
require 'to_openstudio/model_object'
|
35
|
+
|
36
|
+
module Honeybee
|
37
|
+
class ProcessAbridged
|
38
|
+
|
39
|
+
def find_existing_openstudio_object(openstudio_model)
|
40
|
+
model_other_equipment = openstudio_model.getOtherEquipmentByName(@hash[:identifier])
|
41
|
+
return model_other_equipment.get unless model_other_equipment.empty?
|
42
|
+
nil
|
43
|
+
end
|
44
|
+
|
45
|
+
def to_openstudio(openstudio_model)
|
46
|
+
# create process load and set identifier
|
47
|
+
os_other_equip_def = OpenStudio::Model::OtherEquipmentDefinition.new(openstudio_model)
|
48
|
+
os_other_equip = OpenStudio::Model::OtherEquipment.new(os_other_equip_def)
|
49
|
+
os_other_equip_def.setName(@hash[:identifier])
|
50
|
+
os_other_equip.setName(@hash[:identifier])
|
51
|
+
|
52
|
+
# assign watts
|
53
|
+
os_other_equip_def.setDesignLevel(@hash[:watts])
|
54
|
+
|
55
|
+
# assign schedule
|
56
|
+
other_equipment_schedule = openstudio_model.getScheduleByName(@hash[:schedule])
|
57
|
+
unless other_equipment_schedule.empty?
|
58
|
+
other_equipment_schedule_object = other_equipment_schedule.get
|
59
|
+
os_other_equip.setSchedule(other_equipment_schedule_object)
|
60
|
+
end
|
61
|
+
|
62
|
+
# assign the fuel type
|
63
|
+
os_other_equip.setFuelType(@hash[:fuel_type])
|
64
|
+
|
65
|
+
# assign the end use category if it exists
|
66
|
+
if @hash[:end_use_category]
|
67
|
+
os_other_equip.setEndUseSubcategory(@hash[:end_use_category])
|
68
|
+
else
|
69
|
+
os_other_equip.setEndUseSubcategory(defaults[:end_use_category][:default])
|
70
|
+
end
|
71
|
+
|
72
|
+
# assign radiant fraction if it exists
|
73
|
+
if @hash[:radiant_fraction]
|
74
|
+
os_other_equip_def.setFractionRadiant(@hash[:radiant_fraction])
|
75
|
+
else
|
76
|
+
os_other_equip_def.setFractionRadiant(defaults[:radiant_fraction][:default])
|
77
|
+
end
|
78
|
+
|
79
|
+
# assign latent fraction if it exists
|
80
|
+
if @hash[:latent_fraction]
|
81
|
+
os_other_equip_def.setFractionLatent(@hash[:latent_fraction])
|
82
|
+
else
|
83
|
+
os_other_equip_def.setFractionLatent(defaults[:latent_fraction][:default])
|
84
|
+
end
|
85
|
+
|
86
|
+
# assign lost fraction if it exists
|
87
|
+
if @hash[:lost_fraction]
|
88
|
+
os_other_equip_def.setFractionLost(@hash[:lost_fraction])
|
89
|
+
else
|
90
|
+
os_other_equip_def.setFractionLost(defaults[:lost_fraction][:default])
|
91
|
+
end
|
92
|
+
|
93
|
+
os_other_equip
|
94
|
+
end
|
95
|
+
|
96
|
+
end #ProcessAbridged
|
97
|
+
end #Honeybee
|
data/lib/to_openstudio.rb
CHANGED
@@ -79,6 +79,7 @@ require 'to_openstudio/load/ventilation'
|
|
79
79
|
require 'to_openstudio/load/setpoint_thermostat'
|
80
80
|
require 'to_openstudio/load/setpoint_humidistat'
|
81
81
|
require 'to_openstudio/load/daylight'
|
82
|
+
require 'to_openstudio/load/process'
|
82
83
|
|
83
84
|
# extend the schedule objects
|
84
85
|
require 'to_openstudio/schedule/type_limit'
|
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.26.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-10-
|
14
|
+
date: 2021-10-26 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|
@@ -219,6 +219,7 @@ files:
|
|
219
219
|
- lib/honeybee/load/infiltration.rb
|
220
220
|
- lib/honeybee/load/lighting.rb
|
221
221
|
- lib/honeybee/load/people.rb
|
222
|
+
- lib/honeybee/load/process.rb
|
222
223
|
- lib/honeybee/load/service_hot_water.rb
|
223
224
|
- lib/honeybee/load/setpoint_humidistat.rb
|
224
225
|
- lib/honeybee/load/setpoint_thermostat.rb
|
@@ -298,6 +299,7 @@ files:
|
|
298
299
|
- lib/to_openstudio/load/infiltration.rb
|
299
300
|
- lib/to_openstudio/load/lighting.rb
|
300
301
|
- lib/to_openstudio/load/people.rb
|
302
|
+
- lib/to_openstudio/load/process.rb
|
301
303
|
- lib/to_openstudio/load/service_hot_water.rb
|
302
304
|
- lib/to_openstudio/load/setpoint_humidistat.rb
|
303
305
|
- lib/to_openstudio/load/setpoint_thermostat.rb
|