honeybee-openstudio 2.26.0 → 2.27.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/files/urbanopt_Gemfile +1 -1
- data/lib/from_openstudio/construction/air.rb +3 -0
- data/lib/from_openstudio/construction/opaque.rb +3 -0
- data/lib/from_openstudio/construction/shade.rb +3 -0
- data/lib/from_openstudio/construction/window.rb +3 -0
- data/lib/from_openstudio/construction_set.rb +3 -0
- data/lib/from_openstudio/material/opaque.rb +16 -1
- data/lib/from_openstudio/material/opaque_no_mass.rb +16 -1
- data/lib/from_openstudio/material/window_blind.rb +3 -0
- data/lib/from_openstudio/material/window_gas.rb +3 -0
- data/lib/from_openstudio/material/window_gas_custom.rb +3 -0
- data/lib/from_openstudio/material/window_gas_mixture.rb +3 -0
- data/lib/from_openstudio/material/window_glazing.rb +3 -0
- data/lib/from_openstudio/material/window_simpleglazsys.rb +3 -0
- data/lib/from_openstudio/schedule/fixed_interval.rb +3 -0
- data/lib/from_openstudio/schedule/ruleset.rb +3 -0
- data/lib/from_openstudio/schedule/type_limit.rb +3 -0
- data/lib/honeybee/model.rb +2 -1
- data/lib/honeybee/model_object.rb +32 -1
- data/lib/honeybee/simulation/parameter_model.rb +2 -1
- data/lib/to_openstudio/construction/air.rb +3 -0
- data/lib/to_openstudio/construction/opaque.rb +3 -0
- data/lib/to_openstudio/construction/shade.rb +3 -0
- data/lib/to_openstudio/construction/window.rb +3 -1
- data/lib/to_openstudio/construction/windowshade.rb +3 -2
- data/lib/to_openstudio/construction_set.rb +3 -2
- data/lib/to_openstudio/geometry/aperture.rb +4 -0
- data/lib/to_openstudio/geometry/door.rb +4 -0
- data/lib/to_openstudio/geometry/face.rb +3 -0
- data/lib/to_openstudio/geometry/room.rb +3 -0
- data/lib/to_openstudio/geometry/shade.rb +3 -1
- data/lib/to_openstudio/hvac/ideal_air.rb +3 -1
- 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/infiltration.rb +3 -1
- data/lib/to_openstudio/load/lighting.rb +3 -0
- data/lib/to_openstudio/load/people.rb +3 -0
- data/lib/to_openstudio/load/process.rb +3 -0
- data/lib/to_openstudio/load/ventilation.rb +3 -0
- data/lib/to_openstudio/material/opaque.rb +3 -0
- data/lib/to_openstudio/material/opaque_no_mass.rb +3 -1
- data/lib/to_openstudio/material/window_blind.rb +3 -1
- data/lib/to_openstudio/material/window_gas.rb +3 -1
- data/lib/to_openstudio/material/window_gas_custom.rb +3 -0
- data/lib/to_openstudio/material/window_gas_mixture.rb +3 -1
- data/lib/to_openstudio/material/window_glazing.rb +3 -1
- data/lib/to_openstudio/material/window_shade.rb +3 -1
- data/lib/to_openstudio/material/window_simpleglazsys.rb +3 -1
- data/lib/to_openstudio/program_type.rb +3 -1
- data/lib/to_openstudio/schedule/fixed_interval.rb +6 -1
- data/lib/to_openstudio/schedule/ruleset.rb +6 -1
- data/lib/to_openstudio/schedule/type_limit.rb +3 -1
- 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: 84b66e4746d59f77468d6ab7e342a1c7feb57806e692173dee69ec248f5a4b1f
|
4
|
+
data.tar.gz: e9e0476441a4f9261292b2d78d49c15c1d113de599b6ef7dcebfb3c79cc72888
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a260b02b02b502f29c2cebfa55c9b9938aef96f0b2bcdfe4044cc3a28af14290615ad6e1b9afde6747cd6d11e4e18a0974f793683af251a3d5743ca20450d37b
|
7
|
+
data.tar.gz: 8022e1f14fb2a5f700e7f5dedfc5d7a26e481b463ebef2cac6b381ee798d3906508edd9508717e07b7dcb6f967a5a9f2ed9bd7c9c85aaafa79d822d6b74fea90
|
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.
|
7
|
+
spec.version = '2.27.0'
|
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
|
|
data/lib/files/urbanopt_Gemfile
CHANGED
@@ -41,6 +41,9 @@ module Honeybee
|
|
41
41
|
hash[:type] = 'AirBoundaryConstructionAbridged'
|
42
42
|
# set hash values from OpenStudio Object
|
43
43
|
hash[:identifier] = clean_name(construction.nameString)
|
44
|
+
unless construction.displayName.empty?
|
45
|
+
hash[:display_name] = (construction.displayName.get).force_encoding("UTF-8")
|
46
|
+
end
|
44
47
|
# check if boost optional object is empty
|
45
48
|
unless construction.simpleMixingSchedule.empty?
|
46
49
|
schedule = construction.simpleMixingSchedule.get
|
@@ -41,6 +41,9 @@ module Honeybee
|
|
41
41
|
hash[:type] = 'OpaqueConstructionAbridged'
|
42
42
|
# set hash values from OpenStudio Object
|
43
43
|
hash[:identifier] = clean_name(construction.nameString)
|
44
|
+
unless construction.displayName.empty?
|
45
|
+
hash[:display_name] = (construction.displayName.get).force_encoding("UTF-8")
|
46
|
+
end
|
44
47
|
hash[:materials] = []
|
45
48
|
# get construction layers
|
46
49
|
layers = construction.layers
|
@@ -41,6 +41,9 @@ module Honeybee
|
|
41
41
|
hash[:type] = 'ShadeConstruction'
|
42
42
|
# set hash values from OpenStudio Object
|
43
43
|
hash[:identifier] = clean_name(construction.nameString)
|
44
|
+
unless construction.displayName.empty?
|
45
|
+
hash[:display_name] = (construction.displayName.get).force_encoding("UTF-8")
|
46
|
+
end
|
44
47
|
# get outermost construction layers
|
45
48
|
layer = construction.layers[0]
|
46
49
|
if layer.to_StandardGlazing.is_initialized
|
@@ -41,6 +41,9 @@ module Honeybee
|
|
41
41
|
hash[:type] = 'WindowConstructionAbridged'
|
42
42
|
# set hash values from OpenStudio Object
|
43
43
|
hash[:identifier] = clean_name(construction.nameString)
|
44
|
+
unless construction.displayName.empty?
|
45
|
+
hash[:display_name] = (construction.displayName.get).force_encoding("UTF-8")
|
46
|
+
end
|
44
47
|
hash[:materials] = []
|
45
48
|
# get construction layers
|
46
49
|
layers = construction.layers
|
@@ -41,6 +41,9 @@ module Honeybee
|
|
41
41
|
hash[:type] = 'ConstructionSetAbridged'
|
42
42
|
# set hash values from OpenStudio Object
|
43
43
|
hash[:identifier] = clean_name(construction_set.nameString)
|
44
|
+
unless construction_set.displayName.empty?
|
45
|
+
hash[:display_name] = (construction_set.displayName.get).force_encoding("UTF-8")
|
46
|
+
end
|
44
47
|
hash[:wall_set] = {}
|
45
48
|
hash[:floor_set] = {}
|
46
49
|
hash[:aperture_set] = {}
|
@@ -41,11 +41,26 @@ module Honeybee
|
|
41
41
|
hash[:type] = 'EnergyMaterial'
|
42
42
|
# set hash values from OpenStudio Object
|
43
43
|
hash[:identifier] = clean_name(material.nameString)
|
44
|
+
unless material.displayName.empty?
|
45
|
+
hash[:display_name] = (material.displayName.get).force_encoding("UTF-8")
|
46
|
+
end
|
44
47
|
hash[:thickness] = material.thickness
|
45
48
|
hash[:conductivity] = material.conductivity
|
46
49
|
hash[:density] = material.density
|
47
50
|
hash[:specific_heat] = material.specificHeat
|
48
|
-
|
51
|
+
case material.roughness.downcase
|
52
|
+
when 'veryrough'
|
53
|
+
hash[:roughness] == 'VeryRough'
|
54
|
+
when 'mediumrough'
|
55
|
+
hash[:roughness] == 'MediumRough'
|
56
|
+
when 'mediumsmooth'
|
57
|
+
hash[:roughness] == 'MediumSmooth'
|
58
|
+
when 'verysmooth'
|
59
|
+
hash[:roughness] == 'VerySmooth'
|
60
|
+
# In case of Rough or Smooth
|
61
|
+
else
|
62
|
+
hash[:roughness] = material.roughness.titleize
|
63
|
+
end
|
49
64
|
hash[:thermal_absorptance] = material.thermalAbsorptance
|
50
65
|
hash[:solar_absorptance] = material.solarAbsorptance
|
51
66
|
hash[:visible_absorptance] = material.visibleAbsorptance
|
@@ -41,12 +41,27 @@ module Honeybee
|
|
41
41
|
hash[:type] = 'EnergyMaterialNoMass'
|
42
42
|
# set hash values from OpenStudio Object
|
43
43
|
hash[:identifier] = clean_name(material.nameString)
|
44
|
+
unless material.displayName.empty?
|
45
|
+
hash[:display_name] = (material.displayName.get).force_encoding("UTF-8")
|
46
|
+
end
|
44
47
|
hash[:r_value] = material.thermalResistance
|
45
48
|
|
46
49
|
if material.to_MasslessOpaqueMaterial.is_initialized
|
47
50
|
# Roughness is a required property for OS MasslessOpaqueMaterial but isn't a listed
|
48
51
|
# property for OS AirGap
|
49
|
-
|
52
|
+
case material.roughness.downcase
|
53
|
+
when 'veryrough'
|
54
|
+
hash[:roughness] == 'VeryRough'
|
55
|
+
when 'mediumrough'
|
56
|
+
hash[:roughness] == 'MediumRough'
|
57
|
+
when 'mediumsmooth'
|
58
|
+
hash[:roughness] == 'MediumSmooth'
|
59
|
+
when 'verysmooth'
|
60
|
+
hash[:roughness] == 'VerySmooth'
|
61
|
+
# In case of Rough or Smooth
|
62
|
+
else
|
63
|
+
hash[:roughness] = material.roughness.titleize
|
64
|
+
end
|
50
65
|
# check if boost optional object is empty
|
51
66
|
unless material.thermalAbsorptance.empty?
|
52
67
|
hash[:thermal_absorptance] = material.thermalAbsorptance.get
|
@@ -41,6 +41,9 @@ module Honeybee
|
|
41
41
|
hash[:type] = 'EnergyWindowMaterialBlind'
|
42
42
|
# set hash values from OpenStudio Object
|
43
43
|
hash[:identifier] = clean_name(material.nameString)
|
44
|
+
unless material.displayName.empty?
|
45
|
+
hash[:display_name] = (material.displayName.get).force_encoding("UTF-8")
|
46
|
+
end
|
44
47
|
hash[:slat_orientation] = material.slatOrientation
|
45
48
|
hash[:slat_width] = material.slatWidth
|
46
49
|
hash[:slat_separation] = material.slatSeparation
|
@@ -41,6 +41,9 @@ module Honeybee
|
|
41
41
|
hash[:type] = 'EnergyWindowMaterialGas'
|
42
42
|
# set hash values from OpenStudio Object
|
43
43
|
hash[:identifier] = clean_name(material.nameString)
|
44
|
+
unless material.displayName.empty?
|
45
|
+
hash[:display_name] = (material.displayName.get).force_encoding("UTF-8")
|
46
|
+
end
|
44
47
|
hash[:thickness] = material.thickness
|
45
48
|
hash[:gas_type] = material.gasType
|
46
49
|
|
@@ -41,6 +41,9 @@ module Honeybee
|
|
41
41
|
hash[:type] = 'EnergyWindowMaterialGasCustom'
|
42
42
|
# set hash values from OpenStudio Object
|
43
43
|
hash[:identifier] = clean_name(material.nameString)
|
44
|
+
unless material.displayName.empty?
|
45
|
+
hash[:display_name] = (material.displayName.get).force_encoding("UTF-8")
|
46
|
+
end
|
44
47
|
hash[:thickness] = material.thickness
|
45
48
|
# check if boost optional object is empty
|
46
49
|
unless material.customConductivityCoefficientA.empty?
|
@@ -41,6 +41,9 @@ module Honeybee
|
|
41
41
|
hash[:type] = 'EnergyWindowMaterialGasMixture'
|
42
42
|
# set hash values from OpenStudio Object
|
43
43
|
hash[:identifier] = clean_name(material.nameString)
|
44
|
+
unless material.displayName.empty?
|
45
|
+
hash[:display_name] = (material.displayName.get).force_encoding("UTF-8")
|
46
|
+
end
|
44
47
|
hash[:thickness] = material.thickness
|
45
48
|
hash[:gas_types] = []
|
46
49
|
hash[:gas_fractions] = []
|
@@ -41,6 +41,9 @@ module Honeybee
|
|
41
41
|
hash[:type] = 'EnergyWindowMaterialGlazing'
|
42
42
|
# set hash values from OpenStudio Object
|
43
43
|
hash[:identifier] = clean_name(material.nameString)
|
44
|
+
unless material.displayName.empty?
|
45
|
+
hash[:display_name] = (material.displayName.get).force_encoding("UTF-8")
|
46
|
+
end
|
44
47
|
hash[:thickness] = material.thickness
|
45
48
|
hash[:solar_transmittance] = material.solarTransmittance
|
46
49
|
# check if boost optional object is empty
|
@@ -41,6 +41,9 @@ module Honeybee
|
|
41
41
|
hash[:type] = 'EnergyWindowMaterialSimpleGlazSys'
|
42
42
|
# set hash values from OpenStudio Object
|
43
43
|
hash[:identifier] = clean_name(material.nameString)
|
44
|
+
unless material.displayName.empty?
|
45
|
+
hash[:display_name] = (material.displayName.get).force_encoding("UTF-8")
|
46
|
+
end
|
44
47
|
hash[:u_factor] = material.uFactor
|
45
48
|
hash[:shgc] = material.solarHeatGainCoefficient
|
46
49
|
# check if boost optional object is empty
|
@@ -40,6 +40,9 @@ module Honeybee
|
|
40
40
|
hash = {}
|
41
41
|
hash[:type] = 'ScheduleFixedIntervalAbridged'
|
42
42
|
hash[:identifier] = clean_name(schedule_fixedinterval.nameString)
|
43
|
+
unless schedule_fixedinterval.displayName.empty?
|
44
|
+
hash[:display_name] = (schedule_fixedinterval.displayName.get).force_encoding("UTF-8")
|
45
|
+
end
|
43
46
|
start_month = schedule_fixedinterval.startMonth
|
44
47
|
start_day = schedule_fixedinterval.startDay
|
45
48
|
if is_leap_year
|
@@ -41,6 +41,9 @@ module Honeybee
|
|
41
41
|
hash[:type] = 'ScheduleRulesetAbridged'
|
42
42
|
# set the primary (required) day schedules of the object
|
43
43
|
hash[:identifier] = clean_name(schedule_ruleset.nameString)
|
44
|
+
unless schedule_ruleset.displayName.empty?
|
45
|
+
hash[:display_name] = (schedule_ruleset.displayName.get).force_encoding("UTF-8")
|
46
|
+
end
|
44
47
|
hash[:default_day_schedule] = clean_name(schedule_ruleset.defaultDaySchedule.nameString)
|
45
48
|
hash[:summer_designday_schedule] = clean_name(schedule_ruleset.summerDesignDaySchedule.nameString)
|
46
49
|
hash[:winter_designday_schedule] = clean_name(schedule_ruleset.winterDesignDaySchedule.nameString)
|
@@ -41,6 +41,9 @@ module Honeybee
|
|
41
41
|
hash[:type] = 'ScheduleTypeLimit'
|
42
42
|
# set hash values from OpenStudio Object
|
43
43
|
hash[:identifier] = clean_name(schedule_type_limit.nameString)
|
44
|
+
unless schedule_type_limit.displayName.empty?
|
45
|
+
hash[:display_name] = (schedule_type_limit.displayName.get).force_encoding("UTF-8")
|
46
|
+
end
|
44
47
|
# check if boost optional object is empty
|
45
48
|
unless schedule_type_limit.lowerLimitValue.empty?
|
46
49
|
hash[:lower_limit] = schedule_type_limit.lowerLimitValue.get
|
data/lib/honeybee/model.rb
CHANGED
@@ -40,7 +40,8 @@ module Honeybee
|
|
40
40
|
def self.read_from_disk(file)
|
41
41
|
hash = nil
|
42
42
|
File.open(File.join(file), 'r') do |f|
|
43
|
-
hash = JSON.parse(
|
43
|
+
hash = JSON.parse(File.read(f, :external_encoding => 'UTF-8',
|
44
|
+
:internal_encoding => 'UTF-8'), symbolize_names: true, encoding: 'UTF-8')
|
44
45
|
end
|
45
46
|
Model.new(hash)
|
46
47
|
end
|
@@ -30,6 +30,20 @@
|
|
30
30
|
# *******************************************************************************
|
31
31
|
|
32
32
|
module Honeybee
|
33
|
+
class FakeOptionalString
|
34
|
+
def initialize(str)
|
35
|
+
@str = str
|
36
|
+
end
|
37
|
+
|
38
|
+
def empty?
|
39
|
+
false
|
40
|
+
end
|
41
|
+
|
42
|
+
def get
|
43
|
+
@str
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
33
47
|
class ModelObject
|
34
48
|
# Base class from which all other objects in this module inherit.
|
35
49
|
# Attributes and methods of this class should be overwritten in each inheriting object.
|
@@ -43,6 +57,7 @@ module Honeybee
|
|
43
57
|
:universal_newline => true # Always break lines with \n
|
44
58
|
}
|
45
59
|
|
60
|
+
|
46
61
|
def method_missing(sym, *args)
|
47
62
|
name = sym.to_s
|
48
63
|
aname = name.sub('=', '')
|
@@ -64,7 +79,8 @@ module Honeybee
|
|
64
79
|
def self.read_from_disk(file)
|
65
80
|
hash = nil
|
66
81
|
File.open(File.join(file), 'r') do |f|
|
67
|
-
hash = JSON.parse(
|
82
|
+
hash = JSON.parse(File.read(f, :external_encoding => 'UTF-8',
|
83
|
+
:internal_encoding => 'UTF-8'), symbolize_names: true, encoding: 'UTF-8')
|
68
84
|
end
|
69
85
|
new(hash)
|
70
86
|
end
|
@@ -116,6 +132,21 @@ module Honeybee
|
|
116
132
|
encode_str.gsub(/[^.A-Za-z0-9_-]/, '_').gsub(' ', '_')
|
117
133
|
end
|
118
134
|
|
135
|
+
# Create methods to get and set display name
|
136
|
+
if !OpenStudio::Model::ModelObject.method_defined?(:displayName)
|
137
|
+
OpenStudio::Model::ModelObject.class_eval do
|
138
|
+
define_method(:displayName) do
|
139
|
+
result = additionalProperties.getFeatureAsString("DisplayName")
|
140
|
+
if !result.empty?
|
141
|
+
result = FakeOptionalString.new(result.get.force_encoding(Encoding::UTF_8))
|
142
|
+
end
|
143
|
+
result
|
144
|
+
end
|
145
|
+
define_method(:setDisplayName) do |value|
|
146
|
+
additionalProperties.setFeature("DisplayName", value)
|
147
|
+
end
|
148
|
+
end
|
149
|
+
end
|
119
150
|
|
120
151
|
end # ModelObject
|
121
152
|
end # Honeybee
|
@@ -40,7 +40,8 @@ module Honeybee
|
|
40
40
|
def self.read_from_disk(file)
|
41
41
|
hash = nil
|
42
42
|
File.open(File.join(file), 'r') do |f|
|
43
|
-
hash = JSON.parse(
|
43
|
+
hash = JSON.parse(File.read(f, :external_encoding => 'UTF-8',
|
44
|
+
:internal_encoding => 'UTF-8'), symbolize_names: true, encoding: 'UTF-8')
|
44
45
|
end
|
45
46
|
|
46
47
|
SimulationParameter.new(hash)
|
@@ -46,6 +46,9 @@ module Honeybee
|
|
46
46
|
os_construction = OpenStudio::Model::ConstructionAirBoundary.new(openstudio_model)
|
47
47
|
os_construction.setName(@hash[:identifier])
|
48
48
|
os_construction.setAirExchangeMethod('None')
|
49
|
+
unless @hash[:display_name].nil?
|
50
|
+
os_construction.setDisplayName(@hash[:display_name])
|
51
|
+
end
|
49
52
|
|
50
53
|
os_construction
|
51
54
|
end
|
@@ -46,6 +46,9 @@ module Honeybee
|
|
46
46
|
# create construction and set identifier
|
47
47
|
os_construction = OpenStudio::Model::Construction.new(openstudio_model)
|
48
48
|
os_construction.setName(@hash[:identifier])
|
49
|
+
unless @hash[:display_name].nil?
|
50
|
+
os_construction.setDisplayName(@hash[:display_name])
|
51
|
+
end
|
49
52
|
|
50
53
|
# create material vector
|
51
54
|
os_materials = OpenStudio::Model::MaterialVector.new
|
@@ -46,6 +46,9 @@ module Honeybee
|
|
46
46
|
|
47
47
|
os_construction = OpenStudio::Model::Construction.new(openstudio_model)
|
48
48
|
os_construction.setName(@hash[:identifier])
|
49
|
+
unless @hash[:display_name].nil?
|
50
|
+
os_construction.setDisplayName(@hash[:display_name])
|
51
|
+
end
|
49
52
|
os_materials = OpenStudio::Model::MaterialVector.new
|
50
53
|
|
51
54
|
# create standard glazing if is specular is true
|
@@ -46,7 +46,9 @@ module Honeybee
|
|
46
46
|
# create construction and set identifier
|
47
47
|
os_construction = OpenStudio::Model::Construction.new(openstudio_model)
|
48
48
|
os_construction.setName(@hash[:identifier])
|
49
|
-
|
49
|
+
unless @hash[:display_name].nil?
|
50
|
+
os_construction.setDisplayName(@hash[:display_name])
|
51
|
+
end
|
50
52
|
# create material vector
|
51
53
|
os_materials = OpenStudio::Model::MaterialVector.new
|
52
54
|
# loop through each layer and add to material vector
|
@@ -51,7 +51,6 @@ module Honeybee
|
|
51
51
|
shd_id = @hash[:window_construction][:identifier]
|
52
52
|
@hash[:window_construction][:identifier] = unshd_id
|
53
53
|
@hash[:identifier] = shd_id
|
54
|
-
|
55
54
|
# create the unshaded construction
|
56
55
|
unshd_constr_obj = WindowConstructionAbridged.new(@hash[:window_construction])
|
57
56
|
@construction = unshd_constr_obj.to_openstudio(openstudio_model)
|
@@ -59,7 +58,9 @@ module Honeybee
|
|
59
58
|
# create the shaded construction
|
60
59
|
@shade_construction = OpenStudio::Model::Construction.new(openstudio_model)
|
61
60
|
@shade_construction.setName(shd_id)
|
62
|
-
|
61
|
+
unless @hash[:display_name].nil?
|
62
|
+
@shade_construction.setDisplayName(@hash[:display_name])
|
63
|
+
end
|
63
64
|
# create the layers of the unshaded construction into which we will insert the shade
|
64
65
|
os_materials = []
|
65
66
|
if @hash.key?(:layers)
|
@@ -30,7 +30,6 @@
|
|
30
30
|
# *******************************************************************************
|
31
31
|
|
32
32
|
require 'honeybee/construction_set'
|
33
|
-
|
34
33
|
require 'to_openstudio/model_object'
|
35
34
|
|
36
35
|
module Honeybee
|
@@ -46,7 +45,9 @@ module Honeybee
|
|
46
45
|
# create the constructionset object
|
47
46
|
os_constr_set = OpenStudio::Model::DefaultConstructionSet.new(openstudio_model)
|
48
47
|
os_constr_set.setName(@hash[:identifier])
|
49
|
-
|
48
|
+
unless @hash[:display_name].nil?
|
49
|
+
os_constr_set.setDisplayName(@hash[:display_name])
|
50
|
+
end
|
50
51
|
int_surf_const = OpenStudio::Model::DefaultSurfaceConstructions.new(openstudio_model)
|
51
52
|
ext_surf_const = OpenStudio::Model::DefaultSurfaceConstructions.new(openstudio_model)
|
52
53
|
grnd_surf_const = OpenStudio::Model::DefaultSurfaceConstructions.new(openstudio_model)
|
@@ -114,6 +114,10 @@ module Honeybee
|
|
114
114
|
os_subsurface.setName(@hash[:identifier])
|
115
115
|
end
|
116
116
|
|
117
|
+
unless @hash[:display_name].nil?
|
118
|
+
os_subsurface.setDisplayName(@hash[:display_name])
|
119
|
+
end
|
120
|
+
|
117
121
|
# assign the construction if it exists
|
118
122
|
if @hash[:properties][:energy][:construction]
|
119
123
|
construction_identifier = @hash[:properties][:energy][:construction]
|
@@ -114,6 +114,10 @@ module Honeybee
|
|
114
114
|
os_subsurface.setName(@hash[:identifier])
|
115
115
|
end
|
116
116
|
|
117
|
+
unless @hash[:display_name].nil?
|
118
|
+
os_subsurface.setDisplayName(@hash[:display_name])
|
119
|
+
end
|
120
|
+
|
117
121
|
# assign the construction if it exists
|
118
122
|
if @hash[:properties][:energy][:construction]
|
119
123
|
construction_identifier = @hash[:properties][:energy][:construction]
|
@@ -60,6 +60,9 @@ module Honeybee
|
|
60
60
|
# create the openstudio surface and assign the type
|
61
61
|
os_surface = OpenStudio::Model::Surface.new(reordered_vertices, openstudio_model)
|
62
62
|
os_surface.setName(@hash[:identifier])
|
63
|
+
unless @hash[:display_name].nil?
|
64
|
+
os_surface.setDisplayName(@hash[:display_name])
|
65
|
+
end
|
63
66
|
os_surface.setSurfaceType(@hash[:face_type])
|
64
67
|
|
65
68
|
# assign the construction if it is present
|
@@ -76,6 +76,9 @@ module Honeybee
|
|
76
76
|
# create the space and thermal zone
|
77
77
|
os_space = OpenStudio::Model::Space.new(openstudio_model)
|
78
78
|
os_space.setName(@hash[:identifier])
|
79
|
+
unless @hash[:display_name].nil?
|
80
|
+
os_space.setDisplayName(@hash[:display_name])
|
81
|
+
end
|
79
82
|
os_thermal_zone = OpenStudio::Model::ThermalZone.new(openstudio_model)
|
80
83
|
os_thermal_zone.setName(@hash[:identifier])
|
81
84
|
os_space.setThermalZone(os_thermal_zone)
|
@@ -59,7 +59,9 @@ module Honeybee
|
|
59
59
|
|
60
60
|
os_shading_surface = OpenStudio::Model::ShadingSurface.new(reordered_vertices, openstudio_model)
|
61
61
|
os_shading_surface.setName(@hash[:identifier])
|
62
|
-
|
62
|
+
unless @hash[:display_name].nil?
|
63
|
+
os_shading_surface.setDisplayName(@hash[:display_name])
|
64
|
+
end
|
63
65
|
# assign the construction if it exists
|
64
66
|
if @hash[:properties][:energy][:construction]
|
65
67
|
construction_identifier = @hash[:properties][:energy][:construction]
|
@@ -40,7 +40,9 @@ module Honeybee
|
|
40
40
|
# create the ideal air system and set the identifier
|
41
41
|
os_ideal_air = OpenStudio::Model::ZoneHVACIdealLoadsAirSystem.new(openstudio_model)
|
42
42
|
os_ideal_air.setName(@hash[:identifier])
|
43
|
-
|
43
|
+
unless @hash[:display_name].nil?
|
44
|
+
os_ideal_air.setDisplayName(@hash[:display_name])
|
45
|
+
end
|
44
46
|
# assign the economizer type
|
45
47
|
if @hash[:economizer_type]
|
46
48
|
os_ideal_air.setOutdoorAirEconomizerType(@hash[:economizer_type])
|
@@ -47,6 +47,9 @@ module Honeybee
|
|
47
47
|
os_electric_equip_def = OpenStudio::Model::ElectricEquipmentDefinition.new(openstudio_model)
|
48
48
|
os_electric_equip = OpenStudio::Model::ElectricEquipment.new(os_electric_equip_def)
|
49
49
|
os_electric_equip_def.setName(@hash[:identifier])
|
50
|
+
unless @hash[:display_name].nil?
|
51
|
+
os_electric_equip_def.setDisplayName(@hash[:display_name])
|
52
|
+
end
|
50
53
|
os_electric_equip.setName(@hash[:identifier])
|
51
54
|
|
52
55
|
# assign watts per area
|
@@ -48,6 +48,9 @@ module Honeybee
|
|
48
48
|
os_gas_equip_def = OpenStudio::Model::GasEquipmentDefinition.new(openstudio_model)
|
49
49
|
os_gas_equip = OpenStudio::Model::GasEquipment.new(os_gas_equip_def)
|
50
50
|
os_gas_equip_def.setName(@hash[:identifier])
|
51
|
+
unless @hash[:display_name].nil?
|
52
|
+
os_gas_equip_def.setDisplayName(@hash[:display_name])
|
53
|
+
end
|
51
54
|
os_gas_equip.setName(@hash[:identifier])
|
52
55
|
|
53
56
|
# assign watts per space floor area
|
@@ -47,7 +47,9 @@ module Honeybee
|
|
47
47
|
# create infiltration OpenStudio object and set identifier
|
48
48
|
os_infilt = OpenStudio::Model::SpaceInfiltrationDesignFlowRate.new(openstudio_model)
|
49
49
|
os_infilt.setName(@hash[:identifier])
|
50
|
-
|
50
|
+
unless @hash[:display_name].nil?
|
51
|
+
os_infilt.setDisplayName(@hash[:display_name])
|
52
|
+
end
|
51
53
|
# assign flow per surface
|
52
54
|
os_infilt.setFlowperExteriorSurfaceArea(@hash[:flow_per_exterior_area])
|
53
55
|
|
@@ -48,6 +48,9 @@ module Honeybee
|
|
48
48
|
os_lights_def = OpenStudio::Model::LightsDefinition.new(openstudio_model)
|
49
49
|
os_lights = OpenStudio::Model::Lights.new(os_lights_def)
|
50
50
|
os_lights_def.setName(@hash[:identifier])
|
51
|
+
unless @hash[:display_name].nil?
|
52
|
+
os_lights_def.setDisplayName(@hash[:display_name])
|
53
|
+
end
|
51
54
|
os_lights.setName(@hash[:identifier])
|
52
55
|
|
53
56
|
# assign watts per space floor area
|
@@ -48,6 +48,9 @@ module Honeybee
|
|
48
48
|
os_people_def = OpenStudio::Model::PeopleDefinition.new(openstudio_model)
|
49
49
|
os_people = OpenStudio::Model::People.new(os_people_def)
|
50
50
|
os_people_def.setName(@hash[:identifier])
|
51
|
+
unless @hash[:display_name].nil?
|
52
|
+
os_people_def.setDisplayName(@hash[:display_name])
|
53
|
+
end
|
51
54
|
os_people.setName(@hash[:identifier])
|
52
55
|
|
53
56
|
# assign people per space floor area
|
@@ -47,6 +47,9 @@ module Honeybee
|
|
47
47
|
os_other_equip_def = OpenStudio::Model::OtherEquipmentDefinition.new(openstudio_model)
|
48
48
|
os_other_equip = OpenStudio::Model::OtherEquipment.new(os_other_equip_def)
|
49
49
|
os_other_equip_def.setName(@hash[:identifier])
|
50
|
+
unless @hash[:display_name].nil?
|
51
|
+
os_other_equip_def.setDisplayName(@hash[:display_name])
|
52
|
+
end
|
50
53
|
os_other_equip.setName(@hash[:identifier])
|
51
54
|
|
52
55
|
# assign watts
|
@@ -46,6 +46,9 @@ module Honeybee
|
|
46
46
|
# create ventilation openstudio object and set identifier
|
47
47
|
os_vent = OpenStudio::Model::DesignSpecificationOutdoorAir.new(openstudio_model)
|
48
48
|
os_vent.setName(@hash[:identifier])
|
49
|
+
unless @hash[:display_name].nil?
|
50
|
+
os_vent.setDisplayName(@hash[:display_name])
|
51
|
+
end
|
49
52
|
|
50
53
|
# assign air changes per hour if it exists
|
51
54
|
if @hash[:air_changes_per_hour]
|
@@ -46,6 +46,9 @@ module Honeybee
|
|
46
46
|
# create standard opaque OpenStudio material
|
47
47
|
os_opaque_mat = OpenStudio::Model::StandardOpaqueMaterial.new(openstudio_model)
|
48
48
|
os_opaque_mat.setName(@hash[:identifier])
|
49
|
+
unless @hash[:display_name].nil?
|
50
|
+
os_opaque_mat.setDisplayName(@hash[:display_name])
|
51
|
+
end
|
49
52
|
os_opaque_mat.setThickness(@hash[:thickness])
|
50
53
|
os_opaque_mat.setConductivity(@hash[:conductivity])
|
51
54
|
os_opaque_mat.setDensity(@hash[:density])
|
@@ -47,7 +47,9 @@ module Honeybee
|
|
47
47
|
# create no mass material OpenStudio object and set identifier
|
48
48
|
os_nomass_mat = OpenStudio::Model::MasslessOpaqueMaterial.new(openstudio_model)
|
49
49
|
os_nomass_mat.setName(@hash[:identifier])
|
50
|
-
|
50
|
+
unless @hash[:display_name].nil?
|
51
|
+
os_nomass_mat.setDisplayName(@hash[:display_name])
|
52
|
+
end
|
51
53
|
# assign thermal resistance
|
52
54
|
os_nomass_mat.setThermalResistance(@hash[:r_value])
|
53
55
|
|
@@ -46,7 +46,9 @@ module Honeybee
|
|
46
46
|
# create blind OpenStudio object
|
47
47
|
os_blind = OpenStudio::Model::Blind.new(openstudio_model)
|
48
48
|
os_blind.setName(@hash[:identifier])
|
49
|
-
|
49
|
+
unless @hash[:display_name].nil?
|
50
|
+
os_blind.setDisplayName(@hash[:display_name])
|
51
|
+
end
|
50
52
|
# assign slat orientation
|
51
53
|
if @hash[:slat_orientation]
|
52
54
|
os_blind.setSlatOrientation(@hash[:slat_orientation])
|
@@ -46,7 +46,9 @@ module Honeybee
|
|
46
46
|
# create window gas OpenStudio object
|
47
47
|
os_window_gas = OpenStudio::Model::Gas.new(openstudio_model)
|
48
48
|
os_window_gas.setName(@hash[:identifier])
|
49
|
-
|
49
|
+
unless @hash[:display_name].nil?
|
50
|
+
os_window_gas.setDisplayName(@hash[:display_name])
|
51
|
+
end
|
50
52
|
# assign thickness
|
51
53
|
if @hash[:thickness]
|
52
54
|
os_window_gas.setThickness(@hash[:thickness])
|
@@ -46,6 +46,9 @@ module Honeybee
|
|
46
46
|
# create window gas openstudio object
|
47
47
|
os_gas_custom = OpenStudio::Model::Gas.new(openstudio_model)
|
48
48
|
os_gas_custom.setName(@hash[:identifier])
|
49
|
+
unless @hash[:display_name].nil?
|
50
|
+
os_gas_custom.setDisplayName(@hash[:display_name])
|
51
|
+
end
|
49
52
|
os_gas_custom.setGasType('Custom')
|
50
53
|
os_gas_custom.setConductivityCoefficientA(@hash[:conductivity_coeff_a])
|
51
54
|
os_gas_custom.setViscosityCoefficientA(@hash[:viscosity_coeff_a])
|
@@ -46,7 +46,9 @@ module Honeybee
|
|
46
46
|
# create the gas mixture
|
47
47
|
os_gas_mixture = OpenStudio::Model::GasMixture.new(openstudio_model)
|
48
48
|
os_gas_mixture.setName(@hash[:identifier])
|
49
|
-
|
49
|
+
unless @hash[:display_name].nil?
|
50
|
+
os_gas_mixture.setDisplayName(@hash[:display_name])
|
51
|
+
end
|
50
52
|
# set the thickness
|
51
53
|
if @hash[:thickness]
|
52
54
|
os_gas_mixture.setThickness(@hash[:thickness])
|
@@ -46,7 +46,9 @@ module Honeybee
|
|
46
46
|
# create openstudio standard glazing object and set identifier
|
47
47
|
os_glazing = OpenStudio::Model::StandardGlazing.new(openstudio_model)
|
48
48
|
os_glazing.setName(@hash[:identifier])
|
49
|
-
|
49
|
+
unless @hash[:display_name].nil?
|
50
|
+
os_glazing.setDisplayName(@hash[:display_name])
|
51
|
+
end
|
50
52
|
# assign thickness
|
51
53
|
if @hash[:thickness]
|
52
54
|
os_glazing.setThickness(@hash[:thickness])
|
@@ -46,7 +46,9 @@ module Honeybee
|
|
46
46
|
# create openstudio shade object
|
47
47
|
os_shade_mat = OpenStudio::Model::Shade.new(openstudio_model)
|
48
48
|
os_shade_mat.setName(@hash[:identifier])
|
49
|
-
|
49
|
+
unless @hash[:display_name].nil?
|
50
|
+
os_shade_mat.setDisplayName(@hash[:display_name])
|
51
|
+
end
|
50
52
|
# assign solar transmittance
|
51
53
|
if @hash[:solar_transmittance]
|
52
54
|
os_shade_mat.setSolarTransmittance(@hash[:solar_transmittance])
|
@@ -48,7 +48,9 @@ module Honeybee
|
|
48
48
|
os_simple_glazing.setName(@hash[:identifier])
|
49
49
|
os_simple_glazing.setUFactor(@hash[:u_factor])
|
50
50
|
os_simple_glazing.setSolarHeatGainCoefficient(@hash[:shgc])
|
51
|
-
|
51
|
+
unless @hash[:display_name].nil?
|
52
|
+
os_simple_glazing.setDisplayName(@hash[:display_name])
|
53
|
+
end
|
52
54
|
# assign visible transmittance
|
53
55
|
if @hash[:vt]
|
54
56
|
os_simple_glazing.setVisibleTransmittance(@hash[:vt])
|
@@ -46,7 +46,9 @@ module Honeybee
|
|
46
46
|
# create openstudio space type object
|
47
47
|
os_space_type = OpenStudio::Model::SpaceType.new(openstudio_model)
|
48
48
|
os_space_type.setName(@hash[:identifier])
|
49
|
-
|
49
|
+
unless @hash[:display_name].nil?
|
50
|
+
os_space_type.setDisplayName(@hash[:display_name])
|
51
|
+
end
|
50
52
|
# assign people
|
51
53
|
if @hash[:people]
|
52
54
|
people = PeopleAbridged.new(@hash[:people])
|
@@ -89,7 +89,9 @@ module Honeybee
|
|
89
89
|
# create the new schedule
|
90
90
|
os_fi_schedule = OpenStudio::Model::ScheduleFixedInterval.new(openstudio_model)
|
91
91
|
os_fi_schedule.setName(@hash[:identifier])
|
92
|
-
|
92
|
+
unless @hash[:display_name].nil?
|
93
|
+
os_fi_schedule.setDisplayName(@hash[:display_name])
|
94
|
+
end
|
93
95
|
# assign start date
|
94
96
|
os_fi_schedule.setStartMonth(start_month)
|
95
97
|
os_fi_schedule.setStartDay(start_day)
|
@@ -202,6 +204,9 @@ module Honeybee
|
|
202
204
|
rowsToSkip = 1
|
203
205
|
os_schedule_file = OpenStudio::Model::ScheduleFile.new(os_external_file, column, rowsToSkip)
|
204
206
|
os_schedule_file.setName(@hash[:identifier])
|
207
|
+
unless @hash[:display_name].nil?
|
208
|
+
os_schedule_file.setDisplayName(@hash[:display_name])
|
209
|
+
end
|
205
210
|
os_schedule_file.setInterpolatetoTimestep(interpolate)
|
206
211
|
os_schedule_file.setMinutesperItem(interval_length)
|
207
212
|
|
@@ -47,7 +47,9 @@ module Honeybee
|
|
47
47
|
# create openstudio schedule ruleset object
|
48
48
|
os_sch_ruleset = OpenStudio::Model::ScheduleRuleset.new(openstudio_model)
|
49
49
|
os_sch_ruleset.setName(@hash[:identifier])
|
50
|
-
|
50
|
+
unless @hash[:display_name].nil?
|
51
|
+
os_sch_ruleset.setDisplayName(@hash[:display_name])
|
52
|
+
end
|
51
53
|
# assign schedule type limit
|
52
54
|
sch_type_limit_obj = nil
|
53
55
|
if @hash[:schedule_type_limit]
|
@@ -65,6 +67,9 @@ module Honeybee
|
|
65
67
|
if day_schedule[:identifier] != def_day_id
|
66
68
|
day_schedule_new = OpenStudio::Model::ScheduleDay.new(openstudio_model)
|
67
69
|
day_schedule_new.setName(day_schedule[:identifier])
|
70
|
+
unless @hash[:display_name].nil?
|
71
|
+
day_schedule_new.setDisplayName(@hash[:display_name])
|
72
|
+
end
|
68
73
|
unless sch_type_limit_obj.nil?
|
69
74
|
day_schedule_new.setScheduleTypeLimits(sch_type_limit_obj)
|
70
75
|
end
|
@@ -46,7 +46,9 @@ module Honeybee
|
|
46
46
|
# create schedule type limits openstudio object
|
47
47
|
os_type_limit = OpenStudio::Model::ScheduleTypeLimits.new(openstudio_model)
|
48
48
|
os_type_limit.setName(@hash[:identifier])
|
49
|
-
|
49
|
+
unless @hash[:display_name].nil?
|
50
|
+
os_type_limit.setDisplayName(@hash[:display_name])
|
51
|
+
end
|
50
52
|
if @hash[:lower_limit] != nil and @hash[:lower_limit] != {:type => 'NoLimit'}
|
51
53
|
os_type_limit.setLowerLimitValue(@hash[:lower_limit])
|
52
54
|
end
|
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.27.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-
|
14
|
+
date: 2021-11-16 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: bundler
|