honeybee-openstudio 2.23.1 → 2.23.5

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: f5b611d0b78befb14bd1968ad3bc09479295c7367265049523c28ef3b3e3feeb
4
- data.tar.gz: 6630478417dcc8d8680339b3d673b857ac6e0593152310213a3dc9c6eb227914
3
+ metadata.gz: 5ced01eda1ef2637e0f07892dc5498c63c7e7e424965ef9d458e0ce16daba7c2
4
+ data.tar.gz: b98a359da6cfbef7010b3b77b0a3513937015c571c0c27602d3c7e4c4de35ed3
5
5
  SHA512:
6
- metadata.gz: 549cb01585b8b2983b5d5014703325bf87a83db1cc600c4f4ed557a501d998cc5e2632970a7d58d0c75d7a34234a11befbe2eb27c49c085303d25708040c794a
7
- data.tar.gz: 16c6ed67bb2a2a8a5e83fe63641dee6db8df13a855103149565a4d476e0746c02a7837d12307f45ad67fe77854d2c572fcd39323434be5338395e27bb98f36a5
6
+ metadata.gz: bbc8d2fde85273d8bed150e222671fee710f2c450591cf1dbf3b1f26e40c5b11ae1006f6ae865f2ae6250076a34518f120da7593e27f278d75aded811cae5957
7
+ data.tar.gz: 78cd389a850c7b326a6e461126e969bec2c8f14a673c8aa4058216a5c67156f070e41d72360aa68f198e36590c83c011357a6f7bf6fc632528ba3713d3307afb
@@ -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.1'
7
+ spec.version = '2.23.5'
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
 
@@ -34,7 +34,7 @@ require 'openstudio/workflow/adapters/output_adapter'
34
34
  # Local file based workflow
35
35
  class HoneybeeAdapter < OpenStudio::Workflow::OutputAdapters
36
36
  def initialize(options = {})
37
- puts "viiiiiiiiiiiiizzzzzzzzz!"
37
+
38
38
  STDOUT.flush
39
39
  super
40
40
  end
@@ -65,6 +65,8 @@ module Honeybee
65
65
  unit_type = 'ConvectionCoefficient'
66
66
  elsif unit_type == 'Activitylevel'
67
67
  unit_type = 'ActivityLevel'
68
+ elsif unit_type == 'Controlmode'
69
+ unit_type = 'Control'
68
70
  end
69
71
  hash[:unit_type] = unit_type
70
72
 
@@ -36,13 +36,6 @@ module Honeybee
36
36
 
37
37
  attr_reader :errors, :warnings
38
38
 
39
- @@encoding_options = {
40
- :invalid => :replace, # Replace invalid byte sequences
41
- :undef => :replace, # Replace anything not defined in ASCII
42
- :replace => '', # Use a blank for those replacements
43
- :universal_newline => true # Always break lines with \n
44
- }
45
-
46
39
  def method_missing(sym, *args)
47
40
  name = sym.to_s
48
41
  aname = name.sub('=', '')
@@ -107,12 +100,12 @@ module Honeybee
107
100
 
108
101
  # remove illegal characters in identifier
109
102
  def self.clean_name(str)
110
- ascii = str.encode(Encoding.find('ASCII'), @@encoding_options)
103
+ ascii = str.encode(Encoding.find('ASCII'))
111
104
  end
112
105
 
113
106
  # remove illegal characters in identifier
114
107
  def self.clean_identifier(str)
115
- encode_str = str.encode(Encoding.find('ASCII'), @@encoding_options)
108
+ encode_str = str.encode(Encoding.find('ASCII'))
116
109
  encode_str.gsub(/[^.A-Za-z0-9_-]/, '_').gsub(' ', '_')
117
110
  end
118
111
 
@@ -83,4 +83,3 @@
83
83
  </file>
84
84
  </files>
85
85
  </measure>
86
- <error>cannot load such file -- honeybee/simulation/parameter</error>
@@ -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]) + '_Sensor' + @@sensor_count.to_s
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
- dyn_window_name = dyn_window.name
111
- unless dyn_window_name.empty?
112
- act_name = replace_ems_special_characters(dyn_window_name.get) + '_Actuator' + @@actuator_count.to_s
113
- @@actuator_count = @@actuator_count + 1
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]) + '_StateChange' + @@program_count.to_s
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
- constr_name = construction.name
147
- unless constr_name.empty?
148
- constr_i_name = replace_ems_special_characters(constr_name.get) + '_State' + @@state_count.to_s
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' | os_materials.length < 2
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) + '_Sensor' + @@sensor_count.to_s
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) + '_Sensor' + @@sensor_count.to_s
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
- vent_srf_name = vent_srf.name
112
- unless vent_srf_name.empty?
113
- act_name = replace_ems_special_characters(vent_srf_name.get) + \
114
- '_OpenFactor' + @@actuator_count.to_s
115
- @@actuator_count = @@actuator_count + 1
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) + '_WindowOpening' + @@program_count.to_s
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.1
4
+ version: 2.23.5
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-15 00:00:00.000000000 Z
14
+ date: 2021-09-20 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: bundler