urbanopt-reporting 0.3.2 → 0.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +39 -0
  3. data/LICENSE.md +29 -17
  4. data/Rakefile +16 -6
  5. data/doc_templates/copyright_ruby.txt +17 -7
  6. data/lib/measures/default_feature_reports/measure.rb +156 -95
  7. data/lib/measures/export_modelica_loads/LICENSE.md +27 -0
  8. data/lib/measures/export_modelica_loads/README.md +26 -0
  9. data/lib/measures/export_modelica_loads/README.md.erb +42 -0
  10. data/lib/measures/export_modelica_loads/docs/.gitkeep +0 -0
  11. data/lib/measures/export_modelica_loads/measure.rb +374 -0
  12. data/lib/measures/export_modelica_loads/measure.xml +92 -0
  13. data/lib/measures/export_modelica_loads/resources/report.html.in +13 -0
  14. data/lib/measures/export_time_series_modelica/LICENSE.md +1 -0
  15. data/lib/measures/export_time_series_modelica/README.md +59 -0
  16. data/lib/measures/export_time_series_modelica/README.md.erb +42 -0
  17. data/lib/measures/export_time_series_modelica/docs/.gitkeep +0 -0
  18. data/lib/measures/export_time_series_modelica/measure.rb +430 -0
  19. data/lib/measures/export_time_series_modelica/measure.xml +147 -0
  20. data/lib/measures/export_time_series_modelica/resources/os_lib_helper_methods.rb +399 -0
  21. data/lib/measures/export_time_series_modelica/resources/report.html.in +13 -0
  22. data/lib/urbanopt/reporting.rb +16 -6
  23. data/lib/urbanopt/reporting/default_reports.rb +16 -6
  24. data/lib/urbanopt/reporting/default_reports/construction_cost.rb +16 -6
  25. data/lib/urbanopt/reporting/default_reports/date.rb +16 -6
  26. data/lib/urbanopt/reporting/default_reports/distributed_generation.rb +16 -6
  27. data/lib/urbanopt/reporting/default_reports/end_use.rb +54 -23
  28. data/lib/urbanopt/reporting/default_reports/end_uses.rb +16 -6
  29. data/lib/urbanopt/reporting/default_reports/extension.rb +16 -6
  30. data/lib/urbanopt/reporting/default_reports/feature_report.rb +68 -6
  31. data/lib/urbanopt/reporting/default_reports/generator.rb +16 -6
  32. data/lib/urbanopt/reporting/default_reports/location.rb +16 -6
  33. data/lib/urbanopt/reporting/default_reports/logger.rb +16 -6
  34. data/lib/urbanopt/reporting/default_reports/power_distribution.rb +16 -6
  35. data/lib/urbanopt/reporting/default_reports/program.rb +17 -7
  36. data/lib/urbanopt/reporting/default_reports/reporting_period.rb +30 -8
  37. data/lib/urbanopt/reporting/default_reports/scenario_report.rb +26 -11
  38. data/lib/urbanopt/reporting/default_reports/schema/scenario_csv_columns.txt +11 -10
  39. data/lib/urbanopt/reporting/default_reports/schema/scenario_schema.json +27 -12
  40. data/lib/urbanopt/reporting/default_reports/solar_pv.rb +16 -6
  41. data/lib/urbanopt/reporting/default_reports/storage.rb +16 -6
  42. data/lib/urbanopt/reporting/default_reports/thermal_storage.rb +16 -6
  43. data/lib/urbanopt/reporting/default_reports/timeseries_csv.rb +17 -7
  44. data/lib/urbanopt/reporting/default_reports/validator.rb +16 -6
  45. data/lib/urbanopt/reporting/default_reports/wind.rb +16 -6
  46. data/lib/urbanopt/reporting/derived_extension.rb +16 -6
  47. data/lib/urbanopt/reporting/version.rb +17 -7
  48. metadata +17 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0adaa330d8958566edae263cedfd8a1bdee84769c881b98b86481ec4b0ee8bd5
4
- data.tar.gz: ceb2145a16413bd4885a1ef81fc9e534d8ed96e49ba19aaff47980dfeaa4838a
3
+ metadata.gz: c7f77ced3ece4ad3c08bc93a92108e57b4fc83bbd982304d2ceee67b5f6260ab
4
+ data.tar.gz: 026a4b1d4fd2bfe3690444092eee67ef47c936a5bbdbcc6318c4c0403b2ddf1e
5
5
  SHA512:
6
- metadata.gz: d8b2234582c11610f1ad932566bc60e8006930b6038dc619d307955739b21b63b3493488fea25cb2c66d3bb8c70433aebdacd66739920c944d08f53052ac105c
7
- data.tar.gz: 5be211005727f24581d0a2e2540db99b1aff5ac1003bdbaf61fafd0b6c4bbfbb2b293408afaac7cb45aa4f757cb153fb2c4aa420ca7bbcbc3e2e5ee40c1f5b3d
6
+ metadata.gz: 95161e4c8f6019163f112607c2c6d7576b1eb436a89f90ce91434e21096debfe7ee488c78fb107cd92eccedceab61700b1632333f7819b684bc05e9f611cf06f
7
+ data.tar.gz: 988b4612f950580f7baeaadc10845f71e5e5be954143f5374e9615184d74fee37893c7110682bc1476319faa536283350956e480c5fe603f12f1d531af438b14
data/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # URBANopt Reporting Gem
2
2
 
3
+ ## Version 0.3.7
4
+ Date Range: 02/12/21 - 03/26/21
5
+
6
+ - Fixed [#47]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/47 ), Default features report bugfixes and updates
7
+ - Fixed [#67]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/67 ), Update copyrights for 2021
8
+ - Fixed [#70]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/70 ), feature report bug fix
9
+
10
+ ## Version 0.3.6
11
+
12
+ Date Range: 02/05/21 - 02/11/21
13
+
14
+ - Fixed [#64]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/64 ), EnergyPlus changed output fuel names in version 9.4
15
+
16
+ ## Version 0.3.5
17
+
18
+ Date Range: 01/16/21 - 02/04/21
19
+
20
+ - Fixed [#58]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/58 ), Feature report saving bug fix.
21
+ - Fixed [#60]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/60 ), Added EV/ ExteriorEquipment results to csv and json reports
22
+ - Fixed [#61]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/61 ), Enhance the aggregation of enduses.
23
+
24
+
25
+ ## Version 0.3.4
26
+
27
+ Date Range: 01/14/21 - 01/15/21
28
+
29
+ - Fixed [#53]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/53 ), Make subfolders in feature saving if necessary
30
+ - Fixed [#55]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/55 ), Fix new measures
31
+
32
+ ## Version 0.3.3
33
+
34
+ Date Range: 12/09/20 - 01/13/21
35
+
36
+ - Fixed [#36]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/36 ), Add reporting measure for district heating/cooling system mass flow rates
37
+ - Fixed [#37]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/37 ), Add EUI to default report
38
+ - Fixed [#38]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/38 ), Add better error handling around convert_units
39
+ - Fixed [#43]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/43 ), Add available_roof_area calculation
40
+ - Fixed [#44]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/44 ), Fix coordinates order
41
+
3
42
  ## Version 0.3.2
4
43
 
5
44
  Date Range: 12/07/20 - 12/08/20
data/LICENSE.md CHANGED
@@ -1,27 +1,39 @@
1
- URBANopt (tm), Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
1
+ # License
2
+
3
+ URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
2
4
  contributors. All rights reserved.
3
5
 
4
- Redistribution and use in source and binary forms, with or without modification,
6
+ Redistribution and use in source and binary forms, with or without modification,
5
7
  are permitted provided that the following conditions are met:
6
8
 
7
- Redistributions of source code must retain the above copyright notice, this list
9
+ Redistributions of source code must retain the above copyright notice, this list
8
10
  of conditions and the following disclaimer.
9
11
 
10
- Redistributions in binary form must reproduce the above copyright notice, this
11
- list of conditions and the following disclaimer in the documentation and/or other
12
+ Redistributions in binary form must reproduce the above copyright notice, this
13
+ list of conditions and the following disclaimer in the documentation and/or other
12
14
  materials provided with the distribution.
13
-
14
- Neither the name of the copyright holder nor the names of its contributors may be
15
- used to endorse or promote products derived from this software without specific
15
+
16
+ Neither the name of the copyright holder nor the names of its contributors may be
17
+ used to endorse or promote products derived from this software without specific
16
18
  prior written permission.
17
19
 
18
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19
- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20
- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21
- IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
22
- INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
23
- BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24
- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
26
- OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
20
+ Redistribution of this software, without modification, must refer to the software
21
+ by the same designation. Redistribution of a modified version of this software
22
+ (i) may not refer to the modified version by the same designation, or by any
23
+ confusingly similar designation, and (ii) must refer to the underlying software
24
+ originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
25
+ the term “URBANopt”, or any confusingly similar designation may not be used to
26
+ refer to any modified version of this software or any modified version of the
27
+ underlying software originally provided by Alliance without the prior written
28
+ consent of Alliance.
29
+
30
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
31
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
32
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
33
+ IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
34
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
35
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
37
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
38
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
27
39
  OF THE POSSIBILITY OF SUCH DAMAGE.
data/Rakefile CHANGED
@@ -1,21 +1,31 @@
1
1
  # *********************************************************************************
2
- # URBANopt (tm), Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
3
3
  # contributors. All rights reserved.
4
- #
4
+
5
5
  # Redistribution and use in source and binary forms, with or without modification,
6
6
  # are permitted provided that the following conditions are met:
7
- #
7
+
8
8
  # Redistributions of source code must retain the above copyright notice, this list
9
9
  # of conditions and the following disclaimer.
10
- #
10
+
11
11
  # Redistributions in binary form must reproduce the above copyright notice, this
12
12
  # list of conditions and the following disclaimer in the documentation and/or other
13
13
  # materials provided with the distribution.
14
- #
14
+
15
15
  # Neither the name of the copyright holder nor the names of its contributors may be
16
16
  # used to endorse or promote products derived from this software without specific
17
17
  # prior written permission.
18
- #
18
+
19
+ # Redistribution of this software, without modification, must refer to the software
20
+ # by the same designation. Redistribution of a modified version of this software
21
+ # (i) may not refer to the modified version by the same designation, or by any
22
+ # confusingly similar designation, and (ii) must refer to the underlying software
23
+ # originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
24
+ # the term “URBANopt”, or any confusingly similar designation may not be used to
25
+ # refer to any modified version of this software or any modified version of the
26
+ # underlying software originally provided by Alliance without the prior written
27
+ # consent of Alliance.
28
+
19
29
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
30
  # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
31
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
@@ -1,21 +1,31 @@
1
1
  # *********************************************************************************
2
- # URBANopt (tm), Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
3
3
  # contributors. All rights reserved.
4
- #
4
+
5
5
  # Redistribution and use in source and binary forms, with or without modification,
6
6
  # are permitted provided that the following conditions are met:
7
- #
7
+
8
8
  # Redistributions of source code must retain the above copyright notice, this list
9
9
  # of conditions and the following disclaimer.
10
- #
10
+
11
11
  # Redistributions in binary form must reproduce the above copyright notice, this
12
12
  # list of conditions and the following disclaimer in the documentation and/or other
13
13
  # materials provided with the distribution.
14
- #
14
+
15
15
  # Neither the name of the copyright holder nor the names of its contributors may be
16
16
  # used to endorse or promote products derived from this software without specific
17
17
  # prior written permission.
18
- #
18
+
19
+ # Redistribution of this software, without modification, must refer to the software
20
+ # by the same designation. Redistribution of a modified version of this software
21
+ # (i) may not refer to the modified version by the same designation, or by any
22
+ # confusingly similar designation, and (ii) must refer to the underlying software
23
+ # originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
24
+ # the term “URBANopt”, or any confusingly similar designation may not be used to
25
+ # refer to any modified version of this software or any modified version of the
26
+ # underlying software originally provided by Alliance without the prior written
27
+ # consent of Alliance.
28
+
19
29
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
30
  # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
31
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
@@ -26,4 +36,4 @@
26
36
  # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
27
37
  # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
28
38
  # OF THE POSSIBILITY OF SUCH DAMAGE.
29
- # *********************************************************************************
39
+ # *********************************************************************************
@@ -1,21 +1,31 @@
1
1
  # *********************************************************************************
2
- # URBANopt (tm), Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt™, Copyright (c) 2019-2021, Alliance for Sustainable Energy, LLC, and other
3
3
  # contributors. All rights reserved.
4
- #
4
+
5
5
  # Redistribution and use in source and binary forms, with or without modification,
6
6
  # are permitted provided that the following conditions are met:
7
- #
7
+
8
8
  # Redistributions of source code must retain the above copyright notice, this list
9
9
  # of conditions and the following disclaimer.
10
- #
10
+
11
11
  # Redistributions in binary form must reproduce the above copyright notice, this
12
12
  # list of conditions and the following disclaimer in the documentation and/or other
13
13
  # materials provided with the distribution.
14
- #
14
+
15
15
  # Neither the name of the copyright holder nor the names of its contributors may be
16
16
  # used to endorse or promote products derived from this software without specific
17
17
  # prior written permission.
18
- #
18
+
19
+ # Redistribution of this software, without modification, must refer to the software
20
+ # by the same designation. Redistribution of a modified version of this software
21
+ # (i) may not refer to the modified version by the same designation, or by any
22
+ # confusingly similar designation, and (ii) must refer to the underlying software
23
+ # originally provided by Alliance as “URBANopt”. Except to comply with the foregoing,
24
+ # the term “URBANopt”, or any confusingly similar designation may not be used to
25
+ # refer to any modified version of this software or any modified version of the
26
+ # underlying software originally provided by Alliance without the prior written
27
+ # consent of Alliance.
28
+
19
29
  # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
20
30
  # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
21
31
  # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
@@ -101,10 +111,9 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
101
111
  def fuel_types
102
112
  fuel_types = {
103
113
  'Electricity' => 'Electricity',
104
- 'Gas' => 'Natural Gas',
105
- 'FuelOil#2' => 'Fuel Oil #2',
114
+ 'NaturalGas' => 'Natural Gas',
115
+ 'FuelOilNo2' => 'Fuel Oil #2',
106
116
  'Propane' => 'Propane',
107
- 'AdditionalFuel' => 'Additional Fuel',
108
117
  'DistrictCooling' => 'District Cooling',
109
118
  'DistrictHeating' => 'District Heating',
110
119
  'Water' => 'Water'
@@ -113,6 +122,11 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
113
122
  return fuel_types
114
123
  end
115
124
 
125
+ # define other fuel types
126
+ def other_fuels
127
+ return ['Gasoline', 'Diesel', 'Coal', 'Fuel Oil No 1', 'Other Fuel 1', 'Steam']
128
+ end
129
+
116
130
  # define enduses
117
131
  def end_uses
118
132
  end_uses = {
@@ -177,13 +191,13 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
177
191
  end
178
192
  end
179
193
 
180
- # OtherFuels
181
- other_fuels = ['FuelOil#1', 'Diesel', 'Gasoline', 'Coal', 'Steam']
194
+ # Create a custom meter for OtherFuels
182
195
  other_fuel_uses = ['HeatRejection', 'Heating', 'WaterSystems', 'InteriorEquipment']
183
- custom_meter_facility = 'Meter:Custom,OtherFuels:Facility,OtherFuel1'
196
+ custom_meter_facility = 'Meter:Custom,OtherFuels:Facility,OtherFuel2'
184
197
  other_fuel_uses.each do |end_use|
185
- custom_meter = "Meter:Custom,#{end_use}:OtherFuels,OtherFuel1"
198
+ custom_meter = "Meter:Custom,#{end_use}:OtherFuels,OtherFuel2"
186
199
  other_fuels.each do |other_fuel|
200
+ other_fuel = other_fuel.gsub(' ', '')
187
201
  result << OpenStudio::IdfObject.load("Output:Meter,#{end_use}:#{other_fuel},#{reporting_frequency};").get
188
202
  custom_meter_facility += ",,#{end_use}:#{other_fuel}"
189
203
  custom_meter += ",,#{end_use}:#{other_fuel}"
@@ -198,9 +212,10 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
198
212
  # Request the output for each end use/fuel type combination
199
213
  result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,Electricity:Facility,#{reporting_frequency};").get
200
214
  result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,ElectricityProduced:Facility,#{reporting_frequency};").get
201
- result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,Gas:Facility,#{reporting_frequency};").get
215
+ result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,NaturalGas:Facility,#{reporting_frequency};").get
202
216
  result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,DistrictCooling:Facility,#{reporting_frequency};").get
203
217
  result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,DistrictHeating:Facility,#{reporting_frequency};").get
218
+
204
219
  # result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,Cooling:Electricity,#{reporting_frequency};").get
205
220
  # result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,Heating:Electricity,#{reporting_frequency};").get
206
221
  # result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,InteriorLights:Electricity,#{reporting_frequency};").get
@@ -209,18 +224,22 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
209
224
  # result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,Fans:Electricity,#{reporting_frequency};").get
210
225
  # result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,Pumps:Electricity,#{reporting_frequency};").get
211
226
  # result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,WaterSystems:Electricity,#{reporting_frequency};").get
212
- # result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,Heating:Gas,#{reporting_frequency};").get
213
- # result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,WaterSystems:Gas,#{reporting_frequency};").get
214
- # result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,InteriorEquipment:Gas,#{reporting_frequency};").get
227
+ # result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,Heating:NaturalGas,#{reporting_frequency};").get
228
+ # result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,WaterSystems:NaturalGas,#{reporting_frequency};").get
229
+ # result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,InteriorEquipment:NaturalGas,#{reporting_frequency};").get
215
230
  result << OpenStudio::IdfObject.load('Output:Variable,*,Heating Coil Heating Rate,hourly; !- HVAC Average [W];').get
231
+ # result << OpenStudio::IdfObject.load("Output:Variable,*,Exterior Equipment:Electric Vehicles,#{reporting_frequency};").get
216
232
 
217
233
  timeseries_data = ['District Cooling Chilled Water Rate', 'District Cooling Mass Flow Rate',
218
234
  'District Cooling Inlet Temperature', 'District Cooling Outlet Temperature',
219
235
  'District Heating Hot Water Rate', 'District Heating Mass Flow Rate',
220
236
  'District Heating Inlet Temperature', 'District Heating Outlet Temperature', 'Cooling Coil Total Cooling Rate',
221
- 'Heating Coil Heating Rate']
237
+ 'Heating Coil Heating Rate', 'ExteriorEquipment:Electricity']
222
238
 
223
239
  tes_timeseries_data = ['Ice Thermal Storage End Fraction', 'Cooling coil Ice Thermal Storage End Fraction']
240
+
241
+ ev_timeseries_data = ['Exterior Equipment:Electric Vehicles']
242
+
224
243
  timeseries_data += tes_timeseries_data
225
244
 
226
245
  timeseries_data.each do |ts|
@@ -258,6 +277,11 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
258
277
  if value.nil?
259
278
  return nil
260
279
  end
280
+ if from_units.nil? || to_units.nil?
281
+ @runner.registerError("Cannot convert units...from_units: #{from_units} or to_units: #{to_units} left blank.")
282
+ return nil
283
+ end
284
+
261
285
  # apply unit conversion
262
286
  value_converted = OpenStudio.convert(value, from_units, to_units)
263
287
  if value_converted.is_initialized
@@ -353,10 +377,10 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
353
377
  ##
354
378
 
355
379
  if feature_location.include? '['
356
- # get latitude from feature_location
357
- latitude = (feature_location.split(',')[0].delete! '[]').to_f
358
380
  # get longitude from feature_location
359
- longitude = (feature_location.split(',')[1].delete! '[]').to_f
381
+ longitude = (feature_location.split(',')[0].delete! '[]').to_f
382
+ # get latitude from feature_location
383
+ latitude = (feature_location.split(',')[1].delete! '[]').to_f
360
384
  # latitude
361
385
  feature_report.location.latitude_deg = latitude
362
386
  # longitude
@@ -384,27 +408,34 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
384
408
  # unconditioned_area
385
409
  unconditioned_area = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='Building Area' AND RowName='Unconditioned Building Area' AND ColumnName='Area'")
386
410
  feature_report.program.unconditioned_area_sqft = convert_units(unconditioned_area, 'm^2', 'ft^2')
387
-
388
- # footprint_area
389
- feature_report.program.footprint_area_sqft = convert_units(floor_area, 'm^2', 'ft^2')
411
+ if building.standardsBuildingType.is_initialized
412
+ floor_area -= unconditioned_area if ['Residential'].include?(building.standardsBuildingType.get) # conditioned floor area only
413
+ end
390
414
 
391
415
  # maximum_number_of_stories
392
416
  number_of_stories = building.standardsNumberOfStories.get if building.standardsNumberOfStories.is_initialized
393
417
  number_of_stories ||= 1
394
418
  feature_report.program.maximum_number_of_stories = number_of_stories
395
419
 
396
- # maximum_roof_height
397
- floor_to_floor_height = building.nominalFloortoFloorHeight.to_f
398
- maximum_roof_height = number_of_stories * floor_to_floor_height
399
- feature_report.program.maximum_roof_height_ft = maximum_roof_height
400
-
401
420
  # maximum_number_of_stories_above_ground
402
421
  number_of_stories_above_ground = building.standardsNumberOfAboveGroundStories.get if building.standardsNumberOfAboveGroundStories.is_initialized
403
422
  number_of_stories_above_ground ||= 1
404
423
  feature_report.program.maximum_number_of_stories_above_ground = number_of_stories_above_ground
405
424
 
425
+ # maximum_roof_height
426
+ floor_to_floor_height = building.nominalFloortoFloorHeight.get if building.nominalFloortoFloorHeight.is_initialized
427
+ floor_to_floor_height ||= 8
428
+ feature_report.program.maximum_roof_height_ft = feature_report.program.maximum_number_of_stories_above_ground * floor_to_floor_height
429
+
430
+ # footprint_area
431
+ if not ['Residential'].include?(building.standardsBuildingType.get)
432
+ feature_report.program.footprint_area_sqft = feature_report.program.floor_area_sqft / number_of_stories
433
+ else
434
+ feature_report.program.footprint_area_sqft = convert_units(floor_area, 'm^2', 'ft^2') / building.additionalProperties.getFeatureAsInteger('NumberOfConditionedStories').get
435
+ end
436
+
406
437
  # number_of_residential_units
407
- number_of_living_units = building.standardsNumberOfLivingUnits.to_i.get if building.standardsNumberOfLivingUnits.is_initialized
438
+ number_of_living_units = building.standardsNumberOfLivingUnits.get if building.standardsNumberOfLivingUnits.is_initialized
408
439
  number_of_living_units ||= 1
409
440
  feature_report.program.number_of_residential_units = number_of_living_units
410
441
 
@@ -425,6 +456,7 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
425
456
  else
426
457
  building_type = building_type.get
427
458
  end
459
+ next if ['Residential'].include?(building_type) # space types with empty building type fields will inherit from the building object
428
460
  space_type_areas[building_type] = 0 if space_type_areas[building_type].nil?
429
461
  space_type_areas[building_type] += convert_units(space_type.floorArea, 'm^2', 'ft^2')
430
462
  end
@@ -495,7 +527,22 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
495
527
  total_roof_area += surface.netArea
496
528
  end
497
529
  end
498
- feature_report.program.roof_area_sqft[:total_roof_area_sqft] = convert_units(total_roof_area, 'm^2', 'ft^2')
530
+
531
+ total_roof_area_sqft = convert_units(total_roof_area, 'm^2', 'ft^2')
532
+ feature_report.program.roof_area_sqft[:total_roof_area_sqft] = total_roof_area_sqft
533
+
534
+ # available_roof_area_sqft
535
+ # RK: a more robust method should be implemented to find the available_roof_area
536
+ # assign available roof area to be a percentage of the total roof area
537
+
538
+ if building_types[0][:building_type].include? 'Single-Family Detached'
539
+ feature_report.program.roof_area_sqft[:available_roof_area_sqft] = 0.45 * total_roof_area_sqft
540
+ else
541
+ feature_report.program.roof_area_sqft[:available_roof_area_sqft] = 0.75 * total_roof_area_sqft
542
+ end
543
+
544
+ # RK: Temporary solution: assign available roof area to be equal to total roof area
545
+ # feature_report.program.roof_area_sqft[:available_roof_area_sqft] = total_roof_area_sqft
499
546
 
500
547
  # orientation
501
548
  # RK: a more robust method should be implemented to find orientation(finding main axis of the building using aspect ratio)
@@ -581,6 +628,22 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
581
628
  total_source_energy = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='Site and Source Energy' AND RowName='Total Source Energy' AND ColumnName='Total Energy'")
582
629
  feature_report.reporting_periods[0].total_source_energy_kwh = convert_units(total_source_energy, 'GJ', 'kWh')
583
630
 
631
+ # EUI is only valid with a full year of energy data
632
+ if begin_month == 1 && begin_day_of_month == 1 && end_month == 12 && end_day_of_month == 31
633
+ # calculate site EUI
634
+ site_EUI_kwh_per_m2 = feature_report.reporting_periods[0].total_site_energy_kwh / floor_area
635
+ site_EUI_kbtu_per_ft2 = convert_units(total_site_energy, 'GJ', 'kBtu') / convert_units(floor_area, 'm^2', 'ft^2')
636
+ # add site EUI to feature report
637
+ feature_report.reporting_periods[0].site_EUI_kwh_per_m2 = site_EUI_kwh_per_m2
638
+ feature_report.reporting_periods[0].site_EUI_kbtu_per_ft2 = site_EUI_kbtu_per_ft2
639
+ # calculate source EUI
640
+ source_EUI_kwh_per_m2 = feature_report.reporting_periods[0].total_source_energy_kwh / floor_area
641
+ source_EUI_kbtu_per_ft2 = convert_units(total_source_energy, 'GJ', 'kBtu') / convert_units(floor_area, 'm^2', 'ft^2')
642
+ # add source EUI to feature report
643
+ feature_report.reporting_periods[0].source_EUI_kwh_per_m2 = source_EUI_kwh_per_m2
644
+ feature_report.reporting_periods[0].source_EUI_kbtu_per_ft2 = source_EUI_kbtu_per_ft2
645
+ end
646
+
584
647
  # net_site_energy
585
648
  net_site_energy = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='Site and Source Energy' AND RowName='Net Site Energy' AND ColumnName='Total Energy'")
586
649
  feature_report.reporting_periods[0].net_site_energy_kwh = convert_units(net_site_energy, 'GJ', 'kWh')
@@ -598,40 +661,45 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
598
661
  feature_report.reporting_periods[0].natural_gas_kwh = convert_units(natural_gas, 'GJ', 'kWh')
599
662
 
600
663
  # propane
601
- propane = sql_query(runner, sql_file, 'EnergyMeters', "TableName='Annual and Peak Values - Other' AND RowName='Propane:Facility' AND ColumnName='Annual Value'")
602
- feature_report.reporting_periods[0].propane_kwh = 0.0
603
- feature_report.reporting_periods[0].propane_kwh = convert_units(propane, 'GJ', 'kWh') unless propane.nil?
664
+ propane = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses' AND RowName='Total End Uses' AND ColumnName='Propane'")
665
+ feature_report.reporting_periods[0].propane_kwh = convert_units(propane, 'GJ', 'kWh')
604
666
 
605
667
  # fuel_oil
606
- fuel_oil = sql_query(runner, sql_file, 'EnergyMeters', "TableName='Annual and Peak Values - Other' AND RowName='FuelOil#2:Facility' AND ColumnName='Annual Value'")
607
- feature_report.reporting_periods[0].fuel_oil_kwh = 0.0
608
- feature_report.reporting_periods[0].fuel_oil_kwh = convert_units(fuel_oil, 'GJ', 'kWh') unless fuel_oil.nil?
668
+ fuel_oil = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses' AND RowName='Total End Uses' AND ColumnName='Fuel Oil No 2'")
669
+ feature_report.reporting_periods[0].fuel_oil_kwh = convert_units(fuel_oil, 'GJ', 'kWh')
609
670
 
610
671
  # other_fuels
611
- additional_fuel = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses' AND RowName='Total End Uses' AND ColumnName='Additional Fuel'")
612
- # ensure additional fuel is not nil
672
+ gasoline = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses' AND RowName='Total End Uses' AND ColumnName='Gasoline'")
673
+ diesel = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses' AND RowName='Total End Uses' AND ColumnName='Diesel'")
674
+ coal = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses' AND RowName='Total End Uses' AND ColumnName='Coal'")
675
+ fueloilno1 = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses' AND RowName='Total End Uses' AND ColumnName='Fuel Oil No 1'")
676
+ otherfuel1 = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses' AND RowName='Total End Uses' AND ColumnName='Other Fuel 1'")
677
+ steam = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses' AND RowName='Total End Uses' AND ColumnName='Steam'")
678
+ # ensure not nil
613
679
  feature_report.reporting_periods[0].other_fuels_kwh = 0.0
614
- feature_report.reporting_periods[0].other_fuels_kwh = convert_units(additional_fuel, 'GJ', 'kWh') unless additional_fuel.nil?
615
- feature_report.reporting_periods[0].other_fuels_kwh -= feature_report.reporting_periods[0].propane_kwh
616
- feature_report.reporting_periods[0].other_fuels_kwh -= feature_report.reporting_periods[0].fuel_oil_kwh
680
+ feature_report.reporting_periods[0].other_fuels_kwh += convert_units(gasoline, 'GJ', 'kWh') unless gasoline.nil?
681
+ feature_report.reporting_periods[0].other_fuels_kwh += convert_units(diesel, 'GJ', 'kWh') unless diesel.nil?
682
+ feature_report.reporting_periods[0].other_fuels_kwh += convert_units(coal, 'GJ', 'kWh') unless coal.nil?
683
+ feature_report.reporting_periods[0].other_fuels_kwh += convert_units(fueloilno1, 'GJ', 'kWh') unless fueloilno1.nil?
684
+ feature_report.reporting_periods[0].other_fuels_kwh += convert_units(otherfuel1, 'GJ', 'kWh') unless otherfuel1.nil?
685
+ feature_report.reporting_periods[0].other_fuels_kwh += convert_units(steam, 'GJ', 'kWh') unless steam.nil?
617
686
 
618
687
  # district_cooling
619
688
  district_cooling = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses' AND RowName='Total End Uses' AND ColumnName='District Cooling'")
620
689
  feature_report.reporting_periods[0].district_cooling_kwh = convert_units(district_cooling, 'GJ', 'kWh')
621
- building_types.each do |i|
622
- feature_report.reporting_periods[0].district_cooling_kwh = 0.0 if i[:building_type].include?('Single-Family Detached')
690
+ if building.standardsBuildingType.is_initialized
691
+ feature_report.reporting_periods[0].district_cooling_kwh = 0.0 if ['Residential'].include?(building.standardsBuildingType.get)
623
692
  end
624
693
 
625
694
  # district_heating
626
695
  district_heating = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses' AND RowName='Total End Uses' AND ColumnName='District Heating'")
627
696
  feature_report.reporting_periods[0].district_heating_kwh = convert_units(district_heating, 'GJ', 'kWh')
628
- building_types.each do |i|
629
- feature_report.reporting_periods[0].district_heating_kwh = 0.0 if i[:building_type].include?('Single-Family Detached')
697
+ if building.standardsBuildingType.is_initialized
698
+ feature_report.reporting_periods[0].district_heating_kwh = 0.0 if ['Residential'].include?(building.standardsBuildingType.get)
630
699
  end
631
700
 
632
701
  # water
633
702
  water = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses' AND RowName='Total End Uses' AND ColumnName='Water'")
634
- # feature_report.reporting_periods[0].water = convert_units(water, 'm3', 'ft3')
635
703
  feature_report.reporting_periods[0].water_qbft = water
636
704
 
637
705
  # electricity_produced
@@ -642,34 +710,11 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
642
710
 
643
711
  # get fuel type as listed in the sql file
644
712
  fueltypes = fuel_types.values
645
- fueltypes.delete('Propane')
646
- fueltypes.delete('Fuel Oil #2')
647
713
 
648
714
  # get enduses as listed in the sql file
649
715
  enduses = end_uses.values
650
716
  enduses.delete('Facility')
651
717
 
652
- # propane / fuel_oil
653
- ['Propane', 'Fuel Oil #2'].each do |ft|
654
- end_uses.keys.each do |eu|
655
- next if eu == 'Facility'
656
-
657
- sql_r = sql_query(runner, sql_file, 'EnergyMeters', "TableName='Annual and Peak Values - Other' AND RowName='#{eu}:#{ft.tr(' ', '')}' AND ColumnName='Annual Value'")
658
-
659
- # report each query in its corresponding feature report obeject
660
- x = ft.tr(' ', '_').downcase
661
- x = x.gsub('_#2', '')
662
- x_u = x + '_kwh'
663
- m = feature_report.reporting_periods[0].end_uses.send(x_u)
664
-
665
- y = end_uses[eu].tr(' ', '_').downcase
666
- if sql_r.nil?
667
- sql_r = 0.0
668
- end
669
- m.send("#{y}=", convert_units(sql_r, 'GJ', 'kWh'))
670
- end
671
- end
672
-
673
718
  # loop through fuel types and enduses to fill in sql_query method
674
719
  fueltypes.each do |ft|
675
720
  enduses.each do |eu|
@@ -679,12 +724,10 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
679
724
  x = ft.tr(' ', '_').downcase
680
725
  if x.include? 'water'
681
726
  x_u = x + '_qbft'
682
- else
727
+ else
728
+ x = x.gsub('_#2', '')
683
729
  x_u = x + '_kwh'
684
730
  end
685
- if x_u == 'additional_fuel_kwh'
686
- x_u = 'other_fuels_kwh'
687
- end
688
731
  m = feature_report.reporting_periods[0].end_uses.send(x_u)
689
732
 
690
733
  y = eu.tr(' ', '_').downcase
@@ -693,17 +736,34 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
693
736
  sql_r = 0.0
694
737
  end
695
738
  sql_r = convert_units(sql_r, 'GJ', 'kWh')
696
- if x_u == 'other_fuels_kwh'
697
- sql_r -= feature_report.reporting_periods[0].end_uses.propane_kwh.send(y)
698
- sql_r -= feature_report.reporting_periods[0].end_uses.fuel_oil_kwh.send(y)
699
- end
700
- building_types.each do |i|
701
- sql_r = 0.0 if i[:building_type].include?('Single-Family Detached') && x_u.include?('district')
739
+
740
+ if building.standardsBuildingType.is_initialized
741
+ sql_r = 0.0 if ['Residential'].include?(building.standardsBuildingType.get) && x_u.include?('district')
702
742
  end
703
743
  m.send("#{y}=", sql_r)
704
744
  end
705
745
  end
706
746
 
747
+ # other fuels
748
+ m = feature_report.reporting_periods[0].end_uses.send('other_fuels_kwh')
749
+ enduses.each do |eu|
750
+ y = eu.tr(' ', '_').downcase
751
+ sql_r = 0.0
752
+ other_fuels.each do |ft|
753
+ sql = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses' AND RowName='#{eu}' AND ColumnName='#{ft}'")
754
+
755
+ # ensure not nil so the equations below don't error out
756
+ if not sql.nil?
757
+ sql_r += convert_units(sql, 'GJ', 'kWh')
758
+ end
759
+ end
760
+ m.send("#{y}=", sql_r)
761
+ end
762
+
763
+ # add enduses subcategories
764
+ electric_vehicles = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses By Subcategory' AND RowName='Exterior Equipment:Electric Vehicles' AND ColumnName='Electricity'")
765
+ feature_report.reporting_periods[0].end_uses.electricity_kwh.electric_vehicles = convert_units(electric_vehicles, 'GJ', 'kWh')
766
+
707
767
  ### energy_production
708
768
  ## electricity_produced
709
769
  # photovoltaic
@@ -720,7 +780,7 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
720
780
  feature_report.reporting_periods[0].utility_costs_dollar[0][:fuel_type] = 'Electricity'
721
781
  feature_report.reporting_periods[0].utility_costs_dollar[0][:total_cost] = elec_utility_cost
722
782
  # gas utility cost
723
- gas_utility_cost = sql_query(runner, sql_file, 'Economics Results Summary Report', "TableName='Annual Cost' AND RowName='Cost' AND ColumnName='Gas'")
783
+ gas_utility_cost = sql_query(runner, sql_file, 'Economics Results Summary Report', "TableName='Annual Cost' AND RowName='Cost' AND ColumnName='Natural Gas'")
724
784
  feature_report.reporting_periods[0].utility_costs_dollar << { fuel_type: 'Natural Gas', total_cost: gas_utility_cost }
725
785
 
726
786
  ## comfort_result
@@ -758,31 +818,32 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
758
818
  requested_timeseries_names = [
759
819
  'Electricity:Facility',
760
820
  'ElectricityProduced:Facility',
761
- 'Gas:Facility',
821
+ 'NaturalGas:Facility',
762
822
  'Propane:Facility',
763
- 'FuelOil#2:Facility',
823
+ 'FuelOilNo2:Facility',
764
824
  'OtherFuels:Facility',
765
825
  'Cooling:Electricity',
766
826
  'Heating:Electricity',
767
827
  'InteriorLights:Electricity',
768
828
  'ExteriorLights:Electricity',
769
829
  'InteriorEquipment:Electricity',
830
+ 'ExteriorEquipment:Electricity',
770
831
  'Fans:Electricity',
771
832
  'Pumps:Electricity',
772
833
  'WaterSystems:Electricity',
773
834
  'HeatRejection:Electricity',
774
- 'HeatRejection:Gas',
775
- 'Heating:Gas',
776
- 'WaterSystems:Gas',
777
- 'InteriorEquipment:Gas',
835
+ 'HeatRejection:NaturalGas',
836
+ 'Heating:NaturalGas',
837
+ 'WaterSystems:NaturalGas',
838
+ 'InteriorEquipment:NaturalGas',
778
839
  'HeatRejection:Propane',
779
840
  'Heating:Propane',
780
841
  'WaterSystems:Propane',
781
842
  'InteriorEquipment:Propane',
782
- 'HeatRejection:FuelOil#2',
783
- 'Heating:FuelOil#2',
784
- 'WaterSystems:FuelOil#2',
785
- 'InteriorEquipment:FuelOil#2',
843
+ 'HeatRejection:FuelOilNo2',
844
+ 'Heating:FuelOilNo2',
845
+ 'WaterSystems:FuelOilNo2',
846
+ 'InteriorEquipment:FuelOilNo2',
786
847
  'HeatRejection:OtherFuels',
787
848
  'Heating:OtherFuels',
788
849
  'WaterSystems:OtherFuels',
@@ -919,14 +980,14 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
919
980
  end
920
981
 
921
982
  # residential considerations
922
- building_types.each do |i|
923
- values[key_cnt] = Array.new(n, 0) if ['DistrictCooling:Facility', 'DistrictHeating:Facility'].include?(timeseries_name) && i[:building_type].include?('Single-Family Detached')
983
+ if building.standardsBuildingType.is_initialized
984
+ values[key_cnt] = Array.new(n, 0) if ['DistrictCooling:Facility', 'DistrictHeating:Facility'].include?(timeseries_name) && ['Residential'].include?(building.standardsBuildingType.get)
924
985
  end
925
986
 
926
987
  # unit conversion
927
988
  old_unit = ts.get.units if ts.is_initialized
928
989
 
929
- if timeseries_name.include?('Gas') || timeseries_name.include?('Propane') || timeseries_name.include?('FuelOil#2') || timeseries_name.include?('OtherFuels')
990
+ if timeseries_name.include?('NaturalGas') || timeseries_name.include?('Propane') || timeseries_name.include?('FuelOilNo2') || timeseries_name.include?('OtherFuels')
930
991
  new_unit = 'kBtu'
931
992
  else
932
993
  new_unit = case old_unit.to_s
@@ -1115,7 +1176,7 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
1115
1176
  # get the timeseries for any of available timeseries
1116
1177
  # RK: code enhancement needed
1117
1178
  ts_d_e = sql_file.timeSeries(ann_env_pd.to_s, reporting_frequency.to_s, 'Electricity:Facility', '')
1118
- ts_d_g = sql_file.timeSeries(ann_env_pd.to_s, reporting_frequency.to_s, 'Gas:Facility', '')
1179
+ ts_d_g = sql_file.timeSeries(ann_env_pd.to_s, reporting_frequency.to_s, 'NaturalGas:Facility', '')
1119
1180
 
1120
1181
  if ts_d_e.is_initialized
1121
1182
  timeseries_d = ts_d_e.get