honeybee-openstudio 2.38.5 → 2.38.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a6d0c0fa833bdb3f833eecade1c1d74936685962d69b3efb6cf41517b86fb4b8
4
- data.tar.gz: 1a77bbfc0da58fdc289398f69583e9a53ea1930d410e93c47b5ce4c31cc9c0d8
3
+ metadata.gz: 00dbd4e1a8ff317244a829844ed85f824e52cd22dfbb671310d4a9ede84a8103
4
+ data.tar.gz: b1f445898204f6af213451b219f9c2dc0fc00df1770b01ddce712ea85cdb7cf9
5
5
  SHA512:
6
- metadata.gz: 2c49d214e7185f1379bbedf900566ef24d046fd95fc22d52ffcea5455c487124f6c8779b056d7d7da1775760691e9c1cbf6b338018307ba1003b93f29f9ef687
7
- data.tar.gz: f1d93d95d81bf0db97bd540b653686235ecf710a077756bb790ea531eb3ba7c1ce906611ede9d6584574ed0ccc7eb3250dd1515ee615cfee9424fc11a7a8ba45
6
+ metadata.gz: ac40630d69c86a9d7e2a874ef341253e8ade7cdaf5227b9e377f5a3a7febb138506789aa1e9e4d0f0d5aa1158c5df99d798b6bf7f87c2a3ab3976b19fc26cacd
7
+ data.tar.gz: edd6e41aa96ee53efec65c7cfd24a10fa18a230f0426950168fba654ece99b1fb6411684bb26e71a847410c9d18b13f7634ba0dd096a1f41296ba0f6c54fec4a
@@ -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.38.5'
7
+ spec.version = '2.38.7'
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
 
@@ -60,7 +60,7 @@ module Honeybee
60
60
  end
61
61
 
62
62
  def self.humidity_type_from_design_day(design_day)
63
- humidity_type = design_day.humidityIndicatingType
63
+ humidity_type = design_day.humidityConditionType
64
64
  allowed_types = ['WetBulb', 'Dewpoint', 'HumidityRatio', 'Enthalpy']
65
65
  if !allowed_types.any?{ |s| s.casecmp(humidity_type)==0 }
66
66
  raise "'#{humidity_type}' is not an allowed humidity type"
@@ -72,7 +72,13 @@ module Honeybee
72
72
  hash = {}
73
73
  hash[:type] = 'HumidityCondition'
74
74
  hash[:humidity_type] = humidity_type_from_design_day(design_day)
75
- hash[:humidity_value] = design_day.humidityIndicatingConditionsAtMaximumDryBulb
75
+ if hash[:humidity_type] == 'HumidityRatio'
76
+ hash[:humidity_value] = design_day.humidityRatioAtMaximumDryBulb
77
+ elsif hash[:humidity_type] == 'Enthalpy'
78
+ hash[:humidity_value] = design_day.enthalpyAtMaximumDryBulb
79
+ else
80
+ hash[:humidity_value] = design_day.wetBulbOrDewPointAtMaximumDryBulb
81
+ end
76
82
  hash[:barometric_pressure] = design_day.barometricPressure
77
83
  hash[:rain] = design_day.rainIndicator
78
84
  hash[:snow_on_ground] = design_day.snowIndicator
@@ -112,8 +112,9 @@ module Honeybee
112
112
 
113
113
  # remove illegal characters in identifier
114
114
  def self.clean_name(str)
115
- ascii = str.encode(Encoding.find('ASCII'), **@@encoding_options)
116
- ascii = truncate(ascii, 97)
115
+ encode_str = str.encode(Encoding.find('ASCII'), **@@encoding_options)
116
+ encode_str = truncate(encode_str, 97)
117
+ encode_str.gsub(/[,;!]/, '_')
117
118
  end
118
119
 
119
120
  # remove illegal characters in identifier
@@ -53,8 +53,15 @@ module Honeybee
53
53
  os_des_day.setDailyDryBulbTemperatureRange(@hash[:dry_bulb_condition][:dry_bulb_range])
54
54
 
55
55
  # set the HumidityCondition properties
56
- os_des_day.setHumidityIndicatingType(@hash[:humidity_condition][:humidity_type])
57
- os_des_day.setHumidityIndicatingConditionsAtMaximumDryBulb(@hash[:humidity_condition][:humidity_value])
56
+ humid_type = @hash[:humidity_condition][:humidity_type]
57
+ os_des_day.setHumidityConditionType(@hash[:humidity_condition][:humidity_type])
58
+ if humid_type == 'HumidityRatio'
59
+ os_des_day.setHumidityRatioAtMaximumDryBulb(@hash[:humidity_condition][:humidity_value])
60
+ elsif humid_type == 'Enthalpy'
61
+ os_des_day.setEnthalpyAtMaximumDryBulb(@hash[:humidity_condition][:humidity_value])
62
+ else
63
+ os_des_day.setWetBulbOrDewPointAtMaximumDryBulb(@hash[:humidity_condition][:humidity_value])
64
+ end
58
65
  if @hash[:humidity_condition][:barometric_pressure]
59
66
  os_des_day.setBarometricPressure(@hash[:humidity_condition][:barometric_pressure])
60
67
  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.38.5
4
+ version: 2.38.7
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: 2024-03-09 00:00:00.000000000 Z
14
+ date: 2024-04-09 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json_pure