urbanopt-reporting 0.3.5 → 0.3.6
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/CHANGELOG.md +6 -0
- data/lib/measures/default_feature_reports/measure.rb +20 -23
- data/lib/measures/export_modelica_loads/measure.rb +7 -8
- data/lib/measures/export_time_series_modelica/measure.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/end_use.rb +0 -1
- data/lib/urbanopt/reporting/default_reports/schema/scenario_csv_columns.txt +10 -10
- data/lib/urbanopt/reporting/version.rb +1 -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: 62dbeebffeb4088f111f04c86062b6c2db3a9f061ccf7dc6a84b1a5824456272
|
4
|
+
data.tar.gz: 705785c0bdbe0725ab6814be1a263627f1daf64d8cddab12efce59276bdca1bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a76f98043801029d98477f18fa123aafd5f84fc46977b5ebb2ee946d1d09b68d7d560e392e87418742abc66faf7ebc8df9cd9be65e1d18e9183e0a259d7d353e
|
7
|
+
data.tar.gz: 87e1cd2f3615e3845f50c7af04d685c72cc4242bb5d545f20c6821807cf55196c65a4a328534cb850069225d2653b2d1b4872cf4d3f07d7e9deea85c3502f4a8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# URBANopt Reporting Gem
|
2
2
|
|
3
|
+
## Version 0.3.6
|
4
|
+
|
5
|
+
Date Range: 02/05/21 - 02/11/21
|
6
|
+
|
7
|
+
- Fixed [#64]( https://github.com/urbanopt/urbanopt-reporting-gem/issues/64 ), EnergyPlus changed output fuel names in version 9.4
|
8
|
+
|
3
9
|
## Version 0.3.5
|
4
10
|
|
5
11
|
Date Range: 01/16/21 - 02/04/21
|
@@ -101,10 +101,9 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
|
|
101
101
|
def fuel_types
|
102
102
|
fuel_types = {
|
103
103
|
'Electricity' => 'Electricity',
|
104
|
-
'
|
105
|
-
'
|
104
|
+
'NaturalGas' => 'Natural Gas',
|
105
|
+
'FuelOilNo2' => 'Fuel Oil #2',
|
106
106
|
'Propane' => 'Propane',
|
107
|
-
'AdditionalFuel' => 'Additional Fuel',
|
108
107
|
'DistrictCooling' => 'District Cooling',
|
109
108
|
'DistrictHeating' => 'District Heating',
|
110
109
|
'Water' => 'Water'
|
@@ -201,7 +200,6 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
|
|
201
200
|
result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,Gas:Facility,#{reporting_frequency};").get
|
202
201
|
result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,DistrictCooling:Facility,#{reporting_frequency};").get
|
203
202
|
result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,DistrictHeating:Facility,#{reporting_frequency};").get
|
204
|
-
|
205
203
|
|
206
204
|
# result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,Cooling:Electricity,#{reporting_frequency};").get
|
207
205
|
# result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,Heating:Electricity,#{reporting_frequency};").get
|
@@ -211,11 +209,11 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
|
|
211
209
|
# result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,Fans:Electricity,#{reporting_frequency};").get
|
212
210
|
# result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,Pumps:Electricity,#{reporting_frequency};").get
|
213
211
|
# result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,WaterSystems:Electricity,#{reporting_frequency};").get
|
214
|
-
# result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,Heating:
|
215
|
-
# result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,WaterSystems:
|
216
|
-
# result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,InteriorEquipment:
|
212
|
+
# result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,Heating:NaturalGas,#{reporting_frequency};").get
|
213
|
+
# result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,WaterSystems:NaturalGas,#{reporting_frequency};").get
|
214
|
+
# result << OpenStudio::IdfObject.load("Output:Meter:MeterFileOnly,InteriorEquipment:NaturalGas,#{reporting_frequency};").get
|
217
215
|
result << OpenStudio::IdfObject.load('Output:Variable,*,Heating Coil Heating Rate,hourly; !- HVAC Average [W];').get
|
218
|
-
#result << OpenStudio::IdfObject.load("Output:Variable,*,Exterior Equipment:Electric Vehicles,#{reporting_frequency};").get
|
216
|
+
# result << OpenStudio::IdfObject.load("Output:Variable,*,Exterior Equipment:Electric Vehicles,#{reporting_frequency};").get
|
219
217
|
|
220
218
|
timeseries_data = ['District Cooling Chilled Water Rate', 'District Cooling Mass Flow Rate',
|
221
219
|
'District Cooling Inlet Temperature', 'District Cooling Outlet Temperature',
|
@@ -223,11 +221,10 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
|
|
223
221
|
'District Heating Inlet Temperature', 'District Heating Outlet Temperature', 'Cooling Coil Total Cooling Rate',
|
224
222
|
'Heating Coil Heating Rate', 'ExteriorEquipment:Electricity']
|
225
223
|
|
226
|
-
|
227
224
|
tes_timeseries_data = ['Ice Thermal Storage End Fraction', 'Cooling coil Ice Thermal Storage End Fraction']
|
228
|
-
|
225
|
+
|
229
226
|
ev_timeseries_data = ['Exterior Equipment:Electric Vehicles']
|
230
|
-
|
227
|
+
|
231
228
|
timeseries_data += tes_timeseries_data
|
232
229
|
|
233
230
|
timeseries_data.each do |ts|
|
@@ -646,7 +643,7 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
|
|
646
643
|
feature_report.reporting_periods[0].propane_kwh = convert_units(propane, 'GJ', 'kWh') unless propane.nil?
|
647
644
|
|
648
645
|
# fuel_oil
|
649
|
-
fuel_oil = sql_query(runner, sql_file, 'EnergyMeters', "TableName='Annual and Peak Values - Other' AND RowName='
|
646
|
+
fuel_oil = sql_query(runner, sql_file, 'EnergyMeters', "TableName='Annual and Peak Values - Other' AND RowName='FuelOilNo2:Facility' AND ColumnName='Annual Value'")
|
650
647
|
feature_report.reporting_periods[0].fuel_oil_kwh = 0.0
|
651
648
|
feature_report.reporting_periods[0].fuel_oil_kwh = convert_units(fuel_oil, 'GJ', 'kWh') unless fuel_oil.nil?
|
652
649
|
|
@@ -806,9 +803,9 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
|
|
806
803
|
requested_timeseries_names = [
|
807
804
|
'Electricity:Facility',
|
808
805
|
'ElectricityProduced:Facility',
|
809
|
-
'
|
806
|
+
'NaturalGas:Facility',
|
810
807
|
'Propane:Facility',
|
811
|
-
'
|
808
|
+
'FuelOilNo2:Facility',
|
812
809
|
'OtherFuels:Facility',
|
813
810
|
'Cooling:Electricity',
|
814
811
|
'Heating:Electricity',
|
@@ -820,18 +817,18 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
|
|
820
817
|
'Pumps:Electricity',
|
821
818
|
'WaterSystems:Electricity',
|
822
819
|
'HeatRejection:Electricity',
|
823
|
-
'HeatRejection:
|
824
|
-
'Heating:
|
825
|
-
'WaterSystems:
|
826
|
-
'InteriorEquipment:
|
820
|
+
'HeatRejection:NaturalGas',
|
821
|
+
'Heating:NaturalGas',
|
822
|
+
'WaterSystems:NaturalGas',
|
823
|
+
'InteriorEquipment:NaturalGas',
|
827
824
|
'HeatRejection:Propane',
|
828
825
|
'Heating:Propane',
|
829
826
|
'WaterSystems:Propane',
|
830
827
|
'InteriorEquipment:Propane',
|
831
|
-
'HeatRejection:
|
832
|
-
'Heating:
|
833
|
-
'WaterSystems:
|
834
|
-
'InteriorEquipment:
|
828
|
+
'HeatRejection:FuelOilNo2',
|
829
|
+
'Heating:FuelOilNo2',
|
830
|
+
'WaterSystems:FuelOilNo2',
|
831
|
+
'InteriorEquipment:FuelOilNo2',
|
835
832
|
'HeatRejection:OtherFuels',
|
836
833
|
'Heating:OtherFuels',
|
837
834
|
'WaterSystems:OtherFuels',
|
@@ -975,7 +972,7 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
|
|
975
972
|
# unit conversion
|
976
973
|
old_unit = ts.get.units if ts.is_initialized
|
977
974
|
|
978
|
-
if timeseries_name.include?('
|
975
|
+
if timeseries_name.include?('NaturalGas') || timeseries_name.include?('Propane') || timeseries_name.include?('FuelOilNo2') || timeseries_name.include?('OtherFuels')
|
979
976
|
new_unit = 'kBtu'
|
980
977
|
else
|
981
978
|
new_unit = case old_unit.to_s
|
@@ -35,7 +35,6 @@
|
|
35
35
|
|
36
36
|
require 'erb'
|
37
37
|
|
38
|
-
|
39
38
|
# This measure is originally from https://github.com/urbanopt/DES_HVAC
|
40
39
|
# start the measure
|
41
40
|
class ExportModelicaLoads < OpenStudio::Measure::ReportingMeasure
|
@@ -89,13 +88,13 @@ class ExportModelicaLoads < OpenStudio::Measure::ReportingMeasure
|
|
89
88
|
result << OpenStudio::IdfObject.load('Output:Variable,,Site Outdoor Air Relative Humidity,timestep;').get
|
90
89
|
result << OpenStudio::IdfObject.load('Output:Meter,Cooling:Electricity,timestep;').get
|
91
90
|
result << OpenStudio::IdfObject.load('Output:Meter,Heating:Electricity,timestep;').get
|
92
|
-
result << OpenStudio::IdfObject.load('Output:Meter,Heating:
|
91
|
+
result << OpenStudio::IdfObject.load('Output:Meter,Heating:NaturalGas,timestep;').get
|
93
92
|
result << OpenStudio::IdfObject.load('Output:Meter,InteriorLights:Electricity,timestep;').get
|
94
93
|
result << OpenStudio::IdfObject.load('Output:Meter,Fans:Electricity,timestep;').get
|
95
94
|
result << OpenStudio::IdfObject.load('Output:Meter,InteriorEquipment:Electricity,timestep;').get # Joules
|
96
95
|
result << OpenStudio::IdfObject.load('Output:Meter,ExteriorLighting:Electricity,timestep;').get # Joules
|
97
96
|
result << OpenStudio::IdfObject.load('Output:Meter,Electricity:Facility,timestep;').get # Joules
|
98
|
-
result << OpenStudio::IdfObject.load('Output:Meter,Electricity:Facility,timestep;').get
|
97
|
+
result << OpenStudio::IdfObject.load('Output:Meter,Electricity:Facility,timestep;').get # #Using this for data at timestep interval
|
99
98
|
result << OpenStudio::IdfObject.load('Output:Meter,Gas:Facility,timestep;').get # Joules
|
100
99
|
result << OpenStudio::IdfObject.load('Output:Meter,Heating:EnergyTransfer,timestep;').get # Joules
|
101
100
|
result << OpenStudio::IdfObject.load('Output:Meter,WaterSystems:EnergyTransfer,timestep;').get # Joules
|
@@ -215,8 +214,8 @@ class ExportModelicaLoads < OpenStudio::Measure::ReportingMeasure
|
|
215
214
|
end
|
216
215
|
model = model.get
|
217
216
|
|
218
|
-
timesteps_per_hour=model.getTimestep.numberOfTimestepsPerHour.to_i
|
219
|
-
timestep=60/timesteps_per_hour #timestep in minutes
|
217
|
+
timesteps_per_hour = model.getTimestep.numberOfTimestepsPerHour.to_i
|
218
|
+
timestep = 60 / timesteps_per_hour # timestep in minutes
|
220
219
|
|
221
220
|
sqlFile = runner.lastEnergyPlusSqlFile
|
222
221
|
if sqlFile.empty?
|
@@ -243,7 +242,7 @@ class ExportModelicaLoads < OpenStudio::Measure::ReportingMeasure
|
|
243
242
|
ts = sqlFile.timeSeries('RUN PERIOD 1', 'Zone Timestep', attribute_name)
|
244
243
|
if ts.empty?
|
245
244
|
runner.registerError("This feature does not have the attribute '#{attribute_name}' to enable this measure to work." \
|
246
|
-
|
245
|
+
'To resolve, simulate a building with electricity or remove this measure from your workflow.')
|
247
246
|
else
|
248
247
|
ts = ts.first
|
249
248
|
dt_base = nil
|
@@ -258,7 +257,7 @@ class ExportModelicaLoads < OpenStudio::Measure::ReportingMeasure
|
|
258
257
|
dt.date.dayOfWeek.value,
|
259
258
|
dt.time.hours,
|
260
259
|
dt.time.minutes,
|
261
|
-
dt_current.to_time.to_i - dt_base.to_time.to_i + timestep*60
|
260
|
+
dt_current.to_time.to_i - dt_base.to_time.to_i + timestep * 60
|
262
261
|
]
|
263
262
|
end
|
264
263
|
end
|
@@ -267,7 +266,7 @@ class ExportModelicaLoads < OpenStudio::Measure::ReportingMeasure
|
|
267
266
|
extract_timeseries_into_matrix(sqlFile, rows, 'Site Outdoor Air Drybulb Temperature', 'Environment', 0, timestep)
|
268
267
|
extract_timeseries_into_matrix(sqlFile, rows, 'Site Outdoor Air Relative Humidity', 'Environment', 0, timestep)
|
269
268
|
extract_timeseries_into_matrix(sqlFile, rows, 'Heating:Electricity', nil, 0, timestep)
|
270
|
-
extract_timeseries_into_matrix(sqlFile, rows, 'Heating:
|
269
|
+
extract_timeseries_into_matrix(sqlFile, rows, 'Heating:NaturalGas', nil, 0, timestep)
|
271
270
|
extract_timeseries_into_matrix(sqlFile, rows, 'Cooling:Electricity', nil, 0, timestep)
|
272
271
|
extract_timeseries_into_matrix(sqlFile, rows, 'Electricity:Facility', nil, 0, timestep)
|
273
272
|
extract_timeseries_into_matrix(sqlFile, rows, 'Gas:Facility', nil, 0, timestep)
|
@@ -150,7 +150,7 @@ class ExportTimeSeriesLoadsCSV < OpenStudio::Measure::ReportingMeasure
|
|
150
150
|
result << OpenStudio::IdfObject.load('Output:Meter,Cooling:Electricity,hourly;').get
|
151
151
|
result << OpenStudio::IdfObject.load('Output:Meter,Electricity:Facility,timestep;').get ##Using this for data at timestep interval
|
152
152
|
result << OpenStudio::IdfObject.load('Output:Meter,Heating:Electricity,hourly;').get
|
153
|
-
result << OpenStudio::IdfObject.load('Output:Meter,Heating:
|
153
|
+
result << OpenStudio::IdfObject.load('Output:Meter,Heating:NaturalGas,hourly;').get
|
154
154
|
result << OpenStudio::IdfObject.load('Output:Meter,InteriorLights:Electricity,hourly;').get
|
155
155
|
result << OpenStudio::IdfObject.load('Output:Meter,Fans:Electricity,hourly;').get
|
156
156
|
result << OpenStudio::IdfObject.load('Output:Meter,InteriorEquipment:Electricity,hourly;').get # Joules
|
@@ -156,7 +156,6 @@ module URBANopt
|
|
156
156
|
# +other+ - _EndUse_ - An object of EndUse class.
|
157
157
|
##
|
158
158
|
def merge_end_use!(other)
|
159
|
-
|
160
159
|
@heating = add_values(@heating, other.heating)
|
161
160
|
@cooling = add_values(@cooling, other.cooling)
|
162
161
|
@interior_lighting = add_values(@interior_lighting, other.interior_lighting)
|
@@ -1,9 +1,9 @@
|
|
1
1
|
Datetime
|
2
2
|
Electricity:Facility
|
3
3
|
ElectricityProduced:Facility
|
4
|
-
|
4
|
+
NaturalGas:Facility
|
5
5
|
Propane:Facility
|
6
|
-
|
6
|
+
FuelOilNo2:Facility
|
7
7
|
OtherFuels:Facility
|
8
8
|
Cooling:Electricity
|
9
9
|
Heating:Electricity
|
@@ -15,18 +15,18 @@ Fans:Electricity
|
|
15
15
|
Pumps:Electricity
|
16
16
|
WaterSystems:Electricity
|
17
17
|
HeatRejection:Electricity
|
18
|
-
HeatRejection:
|
19
|
-
Heating:
|
20
|
-
WaterSystems:
|
21
|
-
InteriorEquipment:
|
18
|
+
HeatRejection:NaturalGas
|
19
|
+
Heating:NaturalGas
|
20
|
+
WaterSystems:NaturalGas
|
21
|
+
InteriorEquipment:NaturalGas
|
22
22
|
HeatRejection:Propane
|
23
23
|
Heating:Propane
|
24
24
|
WaterSystems:Propane
|
25
25
|
InteriorEquipment:Propane
|
26
|
-
HeatRejection:
|
27
|
-
Heating:
|
28
|
-
WaterSystems:
|
29
|
-
InteriorEquipment:
|
26
|
+
HeatRejection:FuelOilNo2
|
27
|
+
Heating:FuelOilNo2
|
28
|
+
WaterSystems:FuelOilNo2
|
29
|
+
InteriorEquipment:FuelOilNo2
|
30
30
|
HeatRejection:OtherFuels
|
31
31
|
Heating:OtherFuels
|
32
32
|
WaterSystems:OtherFuels
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: urbanopt-reporting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rawad El Kontar
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-02-
|
12
|
+
date: 2021-02-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|