honeybee-openstudio 2.23.2 → 2.23.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yaml +1 -1
- data/honeybee-openstudio.gemspec +1 -1
- data/lib/files/honeybee_adapter.rb +1 -1
- data/lib/from_openstudio/geometry/aperture.rb +1 -1
- data/lib/from_openstudio/geometry/door.rb +1 -1
- data/lib/from_openstudio/geometry/face.rb +1 -1
- data/lib/from_openstudio/geometry/room.rb +1 -1
- data/lib/from_openstudio/geometry/shade.rb +5 -2
- data/lib/from_openstudio/model.rb +5 -2
- data/lib/from_openstudio/simulation/design_day.rb +1 -1
- data/lib/measures/from_honeybee_simulation_parameter/measure.xml +0 -1
- data/lib/to_openstudio/construction/dynamic.rb +9 -15
- data/lib/to_openstudio/construction/windowshade.rb +5 -5
- data/lib/to_openstudio/ventcool/control.rb +8 -11
- 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: 779f0f0085d9d4651f48c715cb6c70813d687dce61a540c90766b2efa5d42e88
|
4
|
+
data.tar.gz: 8c71a2c98b1e041ee9589115e6e3cc88380b7a670ccca558a010d6059835f0dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6bb6241027111bfcd79562bb0e2cb489c6bb0ae4883191572938bc94015c46b1c81c9a1037db2a4886263f55a0a001e934dbb17e537eaa8669bdd1266d7da65c
|
7
|
+
data.tar.gz: '059d0b94c4f7ec99ec9f8c9ae6ce8c524e46be2a00ea5edf8d461dacb446d5e15592c5ab1427885a6bb6b89592e41dddfc98e24073711bd45575427cea2bf102'
|
data/.github/workflows/ci.yaml
CHANGED
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.6'
|
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
|
|
@@ -72,7 +72,7 @@ module Honeybee
|
|
72
72
|
unless sub_surface.isConstructionDefaulted
|
73
73
|
construction = sub_surface.construction
|
74
74
|
if !construction.empty?
|
75
|
-
constr_id = construction.get.nameString
|
75
|
+
constr_id = clean_identifier(construction.get.nameString)
|
76
76
|
unless $window_constructions[constr_id].nil?
|
77
77
|
hash[:construction] = constr_id
|
78
78
|
end
|
@@ -72,7 +72,7 @@ module Honeybee
|
|
72
72
|
unless sub_surface.isConstructionDefaulted
|
73
73
|
construction = sub_surface.construction
|
74
74
|
if !construction.empty?
|
75
|
-
constr_id = construction.get.nameString
|
75
|
+
constr_id = clean_identifier(construction.get.nameString)
|
76
76
|
if hash[:is_glass] && !$window_constructions[constr_id].nil?
|
77
77
|
hash[:construction] = constr_id
|
78
78
|
elsif !hash[:is_glass] && !$opaque_constructions[constr_id].nil?
|
@@ -74,7 +74,7 @@ module Honeybee
|
|
74
74
|
unless surface.isConstructionDefaulted
|
75
75
|
construction = surface.construction
|
76
76
|
if !construction.empty?
|
77
|
-
constr_id = construction.get.nameString
|
77
|
+
constr_id = clean_identifier(construction.get.nameString)
|
78
78
|
unless $opaque_constructions[constr_id].nil?
|
79
79
|
hash[:construction] = constr_id
|
80
80
|
end
|
@@ -62,7 +62,7 @@ module Honeybee
|
|
62
62
|
unless shading_surface.isConstructionDefaulted
|
63
63
|
construction = shading_surface.construction
|
64
64
|
if !construction.empty?
|
65
|
-
const_name = construction.get.nameString
|
65
|
+
const_name = clean_identifier(construction.get.nameString)
|
66
66
|
hash[:construction] = const_name
|
67
67
|
unless $shade_constructions.has_key?(const_name)
|
68
68
|
const_obj = construction.get
|
@@ -74,7 +74,10 @@ module Honeybee
|
|
74
74
|
|
75
75
|
transmittance_schedule = shading_surface.transmittanceSchedule
|
76
76
|
if !transmittance_schedule.empty?
|
77
|
-
|
77
|
+
trans_sch_name = clean_identifier(transmittance_schedule.get.nameString)
|
78
|
+
unless $schedules[trans_sch_name].nil?
|
79
|
+
hash[:transmittance_schedule] = trans_sch_name
|
80
|
+
end
|
78
81
|
end
|
79
82
|
|
80
83
|
hash
|
@@ -64,7 +64,8 @@ module Honeybee
|
|
64
64
|
hash[:tolerance] = 0.01
|
65
65
|
hash[:angle_tolerance] = 1.0
|
66
66
|
|
67
|
-
# Hashes for all constructions in the model
|
67
|
+
# Hashes for all shcedules and constructions in the model
|
68
|
+
$schedules = {}
|
68
69
|
$opaque_constructions = {}
|
69
70
|
$window_constructions = {}
|
70
71
|
$shade_constructions = {}
|
@@ -282,7 +283,9 @@ module Honeybee
|
|
282
283
|
def self.scheduleruleset_from_model(openstudio_model)
|
283
284
|
result = []
|
284
285
|
openstudio_model.getScheduleRulesets.each do |sch_ruleset|
|
285
|
-
|
286
|
+
sched_hash = ScheduleRulesetAbridged.from_schedule_ruleset(sch_ruleset)
|
287
|
+
$schedules[sched_hash[:identifier]] = sched_hash
|
288
|
+
result << sched_hash
|
286
289
|
end
|
287
290
|
result
|
288
291
|
end
|
@@ -37,7 +37,7 @@ module Honeybee
|
|
37
37
|
def self.from_design_day(design_day)
|
38
38
|
hash = {}
|
39
39
|
hash[:type] = 'DesignDay'
|
40
|
-
hash[:name] = design_day.nameString
|
40
|
+
hash[:name] = clean_identifier(design_day.nameString)
|
41
41
|
hash[:day_type] = day_type_from_design_day(design_day)
|
42
42
|
hash[:dry_bulb_condition] = dry_bulb_condition_from_design_day(design_day)
|
43
43
|
hash[:humidity_condition] = humidity_condition_from_design_day(design_day)
|
@@ -88,7 +88,7 @@ module Honeybee
|
|
88
88
|
|
89
89
|
# set up the EMS sensor for the schedule value
|
90
90
|
state_sch = openstudio_model.getScheduleByName(@hash[:schedule])
|
91
|
-
@sch_sensor_name = replace_ems_special_characters(@hash[:identifier]) + '
|
91
|
+
@sch_sensor_name = replace_ems_special_characters(@hash[:identifier]) + 'Sensor' + @@sensor_count.to_s
|
92
92
|
@@sensor_count = @@sensor_count + 1
|
93
93
|
unless state_sch.empty? # schedule not specified
|
94
94
|
sch_var = OpenStudio::Model::OutputVariable.new('Schedule Value', openstudio_model)
|
@@ -107,18 +107,15 @@ module Honeybee
|
|
107
107
|
@sub_faces.each do |dyn_window|
|
108
108
|
window_act = OpenStudio::Model::EnergyManagementSystemActuator.new(
|
109
109
|
dyn_window, 'Surface', 'Construction State')
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
window_act.setName(act_name)
|
115
|
-
actuator_names << act_name
|
116
|
-
end
|
110
|
+
act_name = replace_ems_special_characters(dyn_window.nameString) + 'Actuator' + @@actuator_count.to_s
|
111
|
+
@@actuator_count = @@actuator_count + 1
|
112
|
+
window_act.setName(act_name)
|
113
|
+
actuator_names << act_name
|
117
114
|
end
|
118
115
|
|
119
116
|
# create the EMS Program to accout for each state according to the control logic
|
120
117
|
ems_program = OpenStudio::Model::EnergyManagementSystemProgram.new(openstudio_model)
|
121
|
-
prog_name = replace_ems_special_characters(@hash[:identifier]) + '
|
118
|
+
prog_name = replace_ems_special_characters(@hash[:identifier]) + 'StateChange' + @@program_count.to_s
|
122
119
|
@@program_count = @@program_count + 1
|
123
120
|
ems_program.setName(prog_name)
|
124
121
|
|
@@ -143,12 +140,9 @@ module Honeybee
|
|
143
140
|
# create the construction index variable
|
144
141
|
constr_i = OpenStudio::Model::EnergyManagementSystemConstructionIndexVariable.new(
|
145
142
|
openstudio_model, construction)
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
@@state_count = @@state_count + 1
|
150
|
-
constr_i.setName(constr_i_name)
|
151
|
-
end
|
143
|
+
constr_i_name = replace_ems_special_characters(construction.nameString) + 'State' + @@state_count.to_s
|
144
|
+
@@state_count = @@state_count + 1
|
145
|
+
constr_i.setName(constr_i_name)
|
152
146
|
|
153
147
|
# loop through the actuators and set the appropriate window state
|
154
148
|
actuator_names.each do |act_name|
|
@@ -86,13 +86,13 @@ module Honeybee
|
|
86
86
|
shd_mat_name = openstudio_model.getMaterialByName(@hash[:shade_material])
|
87
87
|
unless shd_mat_name.empty?
|
88
88
|
@shade_material = shd_mat_name.get
|
89
|
-
obj_type = @shade_material.iddObject.name
|
89
|
+
obj_type = @shade_material.iddObject.name.to_s
|
90
90
|
end
|
91
91
|
unless @shade_material.nil?
|
92
|
-
if obj_type == 'OS:WindowMaterial:StandardGlazing'
|
92
|
+
if obj_type == 'OS:WindowMaterial:StandardGlazing' || obj_type == 'OS:WindowMaterial:Glazing'
|
93
93
|
if @shade_location == 'Interior'
|
94
94
|
os_materials[-1] = @shade_material
|
95
|
-
elsif @shade_location == 'Exterior'
|
95
|
+
elsif @shade_location == 'Exterior' || os_materials.length < 2
|
96
96
|
os_materials[0] = @shade_material
|
97
97
|
else # middle glass pane
|
98
98
|
os_materials[-3] = @shade_material
|
@@ -150,9 +150,9 @@ module Honeybee
|
|
150
150
|
|
151
151
|
# figure out the shading type
|
152
152
|
unless @shade_material.nil?
|
153
|
-
obj_type = @shade_material.iddObject.name
|
153
|
+
obj_type = @shade_material.iddObject.name.to_s
|
154
154
|
end
|
155
|
-
if obj_type == 'OS:WindowMaterial:StandardGlazing'
|
155
|
+
if obj_type == 'OS:WindowMaterial:StandardGlazing' || obj_type == 'OS:WindowMaterial:Glazing'
|
156
156
|
shd_type = 'SwitchableGlazing'
|
157
157
|
elsif obj_type == 'OS:WindowMaterial:Blind'
|
158
158
|
if @shade_location == 'Between'
|
@@ -85,7 +85,7 @@ module Honeybee
|
|
85
85
|
in_var.setKeyValue(os_zone_name)
|
86
86
|
end
|
87
87
|
in_air_temp = OpenStudio::Model::EnergyManagementSystemSensor.new(openstudio_model, in_var)
|
88
|
-
in_sensor_name = replace_ems_special_characters(os_zone_name) + '
|
88
|
+
in_sensor_name = replace_ems_special_characters(os_zone_name) + 'Sensor' + @@sensor_count.to_s
|
89
89
|
@@sensor_count = @@sensor_count + 1
|
90
90
|
in_air_temp.setName(in_sensor_name)
|
91
91
|
|
@@ -97,7 +97,7 @@ module Honeybee
|
|
97
97
|
sch_var.setReportingFrequency('Timestep')
|
98
98
|
sch_var.setKeyValue(@hash[:schedule])
|
99
99
|
sch_sens = OpenStudio::Model::EnergyManagementSystemSensor.new(openstudio_model, sch_var)
|
100
|
-
sch_sensor_name = replace_ems_special_characters(os_zone_name) + '
|
100
|
+
sch_sensor_name = replace_ems_special_characters(os_zone_name) + 'Sensor' + @@sensor_count.to_s
|
101
101
|
@@sensor_count = @@sensor_count + 1
|
102
102
|
sch_sens.setName(sch_sensor_name)
|
103
103
|
end
|
@@ -108,14 +108,11 @@ module Honeybee
|
|
108
108
|
vent_opening_surfaces.each do |vent_srf|
|
109
109
|
window_act = OpenStudio::Model::EnergyManagementSystemActuator.new(
|
110
110
|
vent_srf, 'AirFlow Network Window/Door Opening', 'Venting Opening Factor')
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
window_act.setName(act_name)
|
117
|
-
actuator_names << act_name
|
118
|
-
end
|
111
|
+
act_name = replace_ems_special_characters(vent_srf.nameString) + \
|
112
|
+
'OpenFactor' + @@actuator_count.to_s
|
113
|
+
@@actuator_count = @@actuator_count + 1
|
114
|
+
window_act.setName(act_name)
|
115
|
+
actuator_names << act_name
|
119
116
|
end
|
120
117
|
|
121
118
|
# create the first line of the EMS Program to open each window according to the control logic
|
@@ -158,7 +155,7 @@ module Honeybee
|
|
158
155
|
|
159
156
|
# initialize the program and add the complete logic
|
160
157
|
ems_program = OpenStudio::Model::EnergyManagementSystemProgram.new(openstudio_model)
|
161
|
-
prog_name = replace_ems_special_characters(os_zone_name) + '
|
158
|
+
prog_name = replace_ems_special_characters(os_zone_name) + 'WindowOpening' + @@program_count.to_s
|
162
159
|
@@program_count = @@program_count + 1
|
163
160
|
ems_program.setName(prog_name)
|
164
161
|
ems_program.addLine(complete_logic)
|
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.23.
|
4
|
+
version: 2.23.6
|
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-09-
|
14
|
+
date: 2021-09-21 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|