Class: EnergyPlus::StatFile
- Inherits:
-
Object
- Object
- EnergyPlus::StatFile
- Defined in:
- lib/measures/ChangeBuildingLocation/resources/stat_file.rb
Instance Attribute Summary collapse
-
#cdd10 ⇒ Object
Returns the value of attribute cdd10.
-
#cdd18 ⇒ Object
Returns the value of attribute cdd18.
-
#elevation ⇒ Object
Returns the value of attribute elevation.
-
#gmt ⇒ Object
Returns the value of attribute gmt.
-
#hdd10 ⇒ Object
Returns the value of attribute hdd10.
-
#hdd18 ⇒ Object
Returns the value of attribute hdd18.
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#lon ⇒ Object
Returns the value of attribute lon.
-
#monthlyDB ⇒ Object
Returns the value of attribute monthlyDB.
-
#path ⇒ Object
Returns the value of attribute path.
-
#valid ⇒ Object
Returns the value of attribute valid.
Instance Method Summary collapse
-
#delta_dry_bulb ⇒ Object
max - min of the mean monthly dry bulbs.
-
#initialize(path) ⇒ StatFile
constructor
A new instance of StatFile.
-
#mean_dry_bulb ⇒ Object
the mean of the mean monthly dry bulbs.
- #valid? ⇒ Boolean
Constructor Details
#initialize(path) ⇒ StatFile
Returns a new instance of StatFile.
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/measures/ChangeBuildingLocation/resources/stat_file.rb', line 22 def initialize(path) @path = Pathname.new(path) @valid = false @lat = [] @lon = [] @gmt = [] @elevation = [] @hdd18 = [] @cdd18 = [] @hdd10 = [] @cdd10 = [] @monthly_dry_bulb = [] @delta_dry_bulb = [] init end |
Instance Attribute Details
#cdd10 ⇒ Object
Returns the value of attribute cdd10.
20 21 22 |
# File 'lib/measures/ChangeBuildingLocation/resources/stat_file.rb', line 20 def cdd10 @cdd10 end |
#cdd18 ⇒ Object
Returns the value of attribute cdd18.
18 19 20 |
# File 'lib/measures/ChangeBuildingLocation/resources/stat_file.rb', line 18 def cdd18 @cdd18 end |
#elevation ⇒ Object
Returns the value of attribute elevation.
14 15 16 |
# File 'lib/measures/ChangeBuildingLocation/resources/stat_file.rb', line 14 def elevation @elevation end |
#gmt ⇒ Object
Returns the value of attribute gmt.
15 16 17 |
# File 'lib/measures/ChangeBuildingLocation/resources/stat_file.rb', line 15 def gmt @gmt end |
#hdd10 ⇒ Object
Returns the value of attribute hdd10.
19 20 21 |
# File 'lib/measures/ChangeBuildingLocation/resources/stat_file.rb', line 19 def hdd10 @hdd10 end |
#hdd18 ⇒ Object
Returns the value of attribute hdd18.
17 18 19 |
# File 'lib/measures/ChangeBuildingLocation/resources/stat_file.rb', line 17 def hdd18 @hdd18 end |
#lat ⇒ Object
Returns the value of attribute lat.
12 13 14 |
# File 'lib/measures/ChangeBuildingLocation/resources/stat_file.rb', line 12 def lat @lat end |
#lon ⇒ Object
Returns the value of attribute lon.
13 14 15 |
# File 'lib/measures/ChangeBuildingLocation/resources/stat_file.rb', line 13 def lon @lon end |
#monthlyDB ⇒ Object
Returns the value of attribute monthlyDB.
16 17 18 |
# File 'lib/measures/ChangeBuildingLocation/resources/stat_file.rb', line 16 def monthlyDB @monthlyDB end |
#path ⇒ Object
Returns the value of attribute path.
10 11 12 |
# File 'lib/measures/ChangeBuildingLocation/resources/stat_file.rb', line 10 def path @path end |
#valid ⇒ Object
Returns the value of attribute valid.
11 12 13 |
# File 'lib/measures/ChangeBuildingLocation/resources/stat_file.rb', line 11 def valid @valid end |
Instance Method Details
#delta_dry_bulb ⇒ Object
max - min of the mean monthly dry bulbs
56 57 58 59 60 61 62 63 64 |
# File 'lib/measures/ChangeBuildingLocation/resources/stat_file.rb', line 56 def delta_dry_bulb if !@monthly_dry_bulb.empty? delta_t = @monthly_dry_bulb.max - @monthly_dry_bulb.min else delta_t = '' end delta_t.to_f end |
#mean_dry_bulb ⇒ Object
the mean of the mean monthly dry bulbs
43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/measures/ChangeBuildingLocation/resources/stat_file.rb', line 43 def mean_dry_bulb if !@monthly_dry_bulb.empty? sum = 0 @monthly_dry_bulb.each { |db| sum += db } mean = sum / @monthly_dry_bulb.size else mean = '' end mean.to_f end |
#valid? ⇒ Boolean
38 39 40 |
# File 'lib/measures/ChangeBuildingLocation/resources/stat_file.rb', line 38 def valid? return @valid end |