urbanopt-reporting 0.10.0 → 0.10.1
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 -1
- data/Gemfile +2 -0
- data/lib/measures/default_feature_reports/measure.rb +18 -19
- data/lib/measures/default_feature_reports/measure.xml +3 -3
- data/lib/measures/export_modelica_loads/measure.xml +1 -1
- data/lib/measures/export_time_series_modelica/measure.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/construction_cost.rb +2 -2
- data/lib/urbanopt/reporting/default_reports/date.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/end_use.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/end_uses.rb +2 -2
- data/lib/urbanopt/reporting/default_reports/feature_report.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/generator.rb +2 -2
- data/lib/urbanopt/reporting/default_reports/logger.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/power_distribution.rb +2 -2
- data/lib/urbanopt/reporting/default_reports/scenario_report.rb +3 -3
- data/lib/urbanopt/reporting/default_reports/schema/scenario_schema.json +3 -3
- data/lib/urbanopt/reporting/default_reports/solar_pv.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/storage.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/timeseries_csv.rb +2 -2
- data/lib/urbanopt/reporting/default_reports/wind.rb +1 -1
- 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: b1877280e45c42b9a43bfd39dbd5305079fdcd3e4fad3cfba9894d0b7a05940c
|
4
|
+
data.tar.gz: 4380403c78776ac9ffa650859cf14a607b25bd910a0b1347c5c0f94362e21a55
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 45de5ba3805fa748b1b6630ba7ca655643c28bc611c9aa4771944d6ffb40f296c0500f46dc700c293d54522a20a6d6f3c8205482e704436bff369f6386d1d569
|
7
|
+
data.tar.gz: 69a9b1ee7e94e14faa98f4cfd64f9f5cd0efdc9939f5c0ea8490018b14596f2a26590622efee2e23a602a1f1f34548756dabe2123f9b251df39c22a088a9dbd1
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
# URBANopt Reporting Gem
|
2
2
|
|
3
|
+
## Version 0.10.1
|
4
|
+
* Other Fuel emission factors update by @rawadelkontar in https://github.com/urbanopt/urbanopt-reporting-gem/pull/153
|
5
|
+
|
6
|
+
|
7
|
+
**Full Changelog**: https://github.com/urbanopt/urbanopt-reporting-gem/compare/v0.10.0...v0.10.1
|
8
|
+
|
3
9
|
## Version 0.10.0
|
4
|
-
## What's Changed
|
5
10
|
* Additional reporting tests by @vtnate in https://github.com/urbanopt/urbanopt-reporting-gem/pull/147
|
6
11
|
* Update formatting and version in export_modelica_loads by @nllong in https://github.com/urbanopt/urbanopt-reporting-gem/pull/149
|
7
12
|
* Update feature reports for Reopt v3 by @vtnate in https://github.com/urbanopt/urbanopt-reporting-gem/pull/148
|
data/Gemfile
CHANGED
@@ -15,6 +15,8 @@ allow_local = ENV['FAVOR_LOCAL_GEMS']
|
|
15
15
|
gem 'addressable', '2.8.1'
|
16
16
|
# pin this dependency to avoid using racc dependency (which has native extensions)
|
17
17
|
gem 'parser', '3.2.2.2'
|
18
|
+
# pin this dependency because 2.9.2 breaks OS tests (openstudio:test_with_openstudio)
|
19
|
+
gem 'regexp_parser', '2.9.0'
|
18
20
|
|
19
21
|
# if allow_local && File.exist?('../openstudio-extension-gem')
|
20
22
|
# gem 'openstudio-extension', path: '../openstudio-extension-gem'
|
@@ -798,7 +798,7 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
|
|
798
798
|
enduses.each do |eu|
|
799
799
|
sql_r = sql_query(runner, sql_file, 'AnnualBuildingUtilityPerformanceSummary', "TableName='End Uses' AND RowName='#{eu}' AND ColumnName='#{ft}'")
|
800
800
|
|
801
|
-
# report each query in its corresponding feature report
|
801
|
+
# report each query in its corresponding feature report object
|
802
802
|
x = ft.tr(' ', '_').downcase
|
803
803
|
if x.include? 'water'
|
804
804
|
x_u = "#{x}_qbft"
|
@@ -931,14 +931,14 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
|
|
931
931
|
conv_kg_mt = 0.001 # kg to metric ton
|
932
932
|
conv_kbtu_J = 1054852.32 # KBtu to J (1kBtu = 1054852.32 J)
|
933
933
|
|
934
|
-
##### Emisison factors for natural gas, propane, and fuel oil based on
|
935
|
-
## natural gas :
|
936
|
-
## propane :
|
937
|
-
## Fuel oil :
|
938
|
-
nat_gas_val =
|
939
|
-
lpg_val =
|
940
|
-
fo1_val =
|
941
|
-
fo2_val =
|
934
|
+
##### Emisison factors for natural gas, propane, and fuel oil based on https://portfoliomanager.energystar.gov/pdf/reference/Emissions.pdf
|
935
|
+
## natural gas : 181.7 KG/MWH
|
936
|
+
## propane : 219.2 KG/MWH
|
937
|
+
## Fuel oil #1: 250.8 KG/MWH
|
938
|
+
nat_gas_val = 181.7
|
939
|
+
lpg_val = 219.2
|
940
|
+
fo1_val = 250.8
|
941
|
+
fo2_val = 253.2
|
942
942
|
|
943
943
|
##########################################################################################################################
|
944
944
|
######################################## Reporting TImeseries Results FOR CSV File #######################################
|
@@ -1046,7 +1046,7 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
|
|
1046
1046
|
total_hours = 1 / timesteps_per_hour.to_f # make sure timesteps_per_hour is a float in the division
|
1047
1047
|
# set power_conversion
|
1048
1048
|
power_conversion = total_hours # we set the power conversio to total_hours since we want to convert lWh to kW
|
1049
|
-
puts "Power
|
1049
|
+
puts "Power Conversion: to convert kWh to kW values will be divided by #{power_conversion}"
|
1050
1050
|
|
1051
1051
|
# number of values in each timeseries
|
1052
1052
|
n = nil
|
@@ -1184,14 +1184,13 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
|
|
1184
1184
|
# conv_kg_mt = 0.001 # kg to metric ton
|
1185
1185
|
# conv_kbtu_J = 1054852.32 # KBtu to J (1kBtu = 1054852.32 J)
|
1186
1186
|
|
1187
|
-
# ##### Emisison factors for natural gas, propane, and fuel oil based on
|
1188
|
-
# ## natural gas :
|
1189
|
-
# ## propane :
|
1190
|
-
#
|
1191
|
-
#
|
1192
|
-
#
|
1193
|
-
#
|
1194
|
-
# fo2_val = 294.962046
|
1187
|
+
# ##### Emisison factors for natural gas, propane, and fuel oil based on https://portfoliomanager.energystar.gov/pdf/reference/Emissions.pdf
|
1188
|
+
# ## natural gas : 181.7 KG/MWH
|
1189
|
+
# ## propane : 219.2 KG/MWH
|
1190
|
+
# nat_gas_val = 181.7
|
1191
|
+
# lpg_val = 219.2
|
1192
|
+
# fo1_val = 250.8
|
1193
|
+
# fo2_val = 253.2
|
1195
1194
|
|
1196
1195
|
if timeseries_name == 'Natural_Gas_Emissions'
|
1197
1196
|
newVals = Array.new(n, 0)
|
@@ -1441,7 +1440,7 @@ class DefaultFeatureReports < OpenStudio::Measure::ReportingMeasure
|
|
1441
1440
|
else
|
1442
1441
|
raise 'ELECTRICITY and GAS results are not initiaized'
|
1443
1442
|
end
|
1444
|
-
# get
|
1443
|
+
# get formatted datetimes
|
1445
1444
|
timeseries_d.dateTimes.each do |datetime|
|
1446
1445
|
datetimes << format_datetime(datetime.to_s)
|
1447
1446
|
end
|
@@ -3,8 +3,8 @@
|
|
3
3
|
<schema_version>3.1</schema_version>
|
4
4
|
<name>default_feature_reports</name>
|
5
5
|
<uid>9ee3135a-8070-4408-bfa1-b75fecf9dd4f</uid>
|
6
|
-
<version_id>
|
7
|
-
<version_modified>2024-
|
6
|
+
<version_id>1f0dd70a-ddad-4bb8-a54b-0aeb696e80d0</version_id>
|
7
|
+
<version_modified>2024-06-20T19:28:12Z</version_modified>
|
8
8
|
<xml_checksum>FB304155</xml_checksum>
|
9
9
|
<class_name>DefaultFeatureReports</class_name>
|
10
10
|
<display_name>DefaultFeatureReports</display_name>
|
@@ -128,7 +128,7 @@
|
|
128
128
|
<filename>measure.rb</filename>
|
129
129
|
<filetype>rb</filetype>
|
130
130
|
<usage_type>script</usage_type>
|
131
|
-
<checksum>
|
131
|
+
<checksum>005CDD6D</checksum>
|
132
132
|
</file>
|
133
133
|
<file>
|
134
134
|
<filename>USA_CO_Golden-NREL.724666_TMY3.epw</filename>
|
@@ -77,7 +77,7 @@ class ExportTimeSeriesLoadsCSV < OpenStudio::Measure::ReportingMeasure
|
|
77
77
|
# use the built-in error checking
|
78
78
|
return false unless runner.validateUserArguments(arguments(model), user_arguments)
|
79
79
|
|
80
|
-
# #Read in
|
80
|
+
# #Read in arguments related to variables for output requests
|
81
81
|
hhw_loop_name = runner.getStringArgumentValue('hhw_loop_name', user_arguments)
|
82
82
|
chw_loop_name = runner.getStringArgumentValue('chw_loop_name', user_arguments)
|
83
83
|
|
@@ -17,7 +17,7 @@ module URBANopt
|
|
17
17
|
attr_accessor :category, :item_name, :unit_cost, :cost_units, :item_quantity, :total_cost # :nodoc:
|
18
18
|
|
19
19
|
##
|
20
|
-
# ConstructionCost class
|
20
|
+
# ConstructionCost class initialize all construction_cost attributes:
|
21
21
|
# +:category+ , +:item_name+ , +:unit_cost+ , +:cost_units+ , +:item_quantity+ , +:total_cost+
|
22
22
|
##
|
23
23
|
# [parameters:]
|
@@ -108,7 +108,7 @@ module URBANopt
|
|
108
108
|
end
|
109
109
|
|
110
110
|
##
|
111
|
-
# Merges
|
111
|
+
# Merges multiple construction costs together.
|
112
112
|
# - loops over the new_costs and find the index of the cost with identical +:item_name+.
|
113
113
|
# - if +item_name+ is identical then modify the existing_cost array by summing the :total_cost and :item_quantity. Else add the new_cost to existing_costs array.
|
114
114
|
##
|
@@ -17,7 +17,7 @@ module URBANopt
|
|
17
17
|
:fans, :pumps, :heat_rejection, :humidification, :heat_recovery, :water_systems, :refrigeration, :generators # :nodoc:
|
18
18
|
|
19
19
|
##
|
20
|
-
# EndUse class
|
20
|
+
# EndUse class initialize all enduse attributes: +:heating+ , +:cooling+ , +:interior_lighting+ ,
|
21
21
|
# +:exterior_lighting+ , +:interior_equipment+ , +:exterior_equipment+ ,
|
22
22
|
# +:fans+ , +:pumps+ , +:heat_rejection+ , +:humidification+ , +:heat_recovery+ , +:water_systems+ , +:refrigeration+ , +:generators+
|
23
23
|
##
|
@@ -11,13 +11,13 @@ module URBANopt
|
|
11
11
|
module Reporting
|
12
12
|
module DefaultReports
|
13
13
|
##
|
14
|
-
# Enduses class
|
14
|
+
# Enduses class include results for each fuel type.
|
15
15
|
##
|
16
16
|
class EndUses
|
17
17
|
attr_accessor :electricity_kwh, :natural_gas_kwh, :propane_kwh, :fuel_oil_kwh, :other_fuels_kwh, :district_cooling_kwh, :district_heating_kwh, :water_qbft # :nodoc:
|
18
18
|
|
19
19
|
##
|
20
|
-
# EndUses class
|
20
|
+
# EndUses class initialize end_uses(fuel type) attributes: +:electricity_kwh+ , +:natural_gas_kwh+ , +:propane_kwh+ , +:fuel_oil_kwh+ , +:other_fuels_kwh+ ,
|
21
21
|
# +:district_cooling_kwh+ , +:district_heating_kwh+ , +:water_qbft+
|
22
22
|
##
|
23
23
|
# [parameters:]
|
@@ -297,7 +297,7 @@ module URBANopt
|
|
297
297
|
##
|
298
298
|
# Saves the 'default_feature_report.csv' file to the results directory
|
299
299
|
# This method only copies the CSV feature reports from the folder generated by the reporting measure
|
300
|
-
# (<
|
300
|
+
# (<measure number>_default_feature_reports/) to the new feature_reports/ folder
|
301
301
|
##
|
302
302
|
# [parameters]:
|
303
303
|
# +file_name+ - _String_ - Assign a name to the saved feature report file without an extension
|
@@ -19,11 +19,11 @@ module URBANopt
|
|
19
19
|
attr_accessor :size_kw
|
20
20
|
|
21
21
|
##
|
22
|
-
#
|
22
|
+
# Initialize Generator attributes from a hash. Generator attributes currently are limited to power capacity.
|
23
23
|
##
|
24
24
|
# [parameters:]
|
25
25
|
#
|
26
|
-
# * +hash+ - _Hash_ - A hash
|
26
|
+
# * +hash+ - _Hash_ - A hash containing a +:size_kw+ key/value pair which represents the nameplate capacity in kilowatts (kW)
|
27
27
|
#
|
28
28
|
def initialize(hash = {})
|
29
29
|
hash.delete_if { |k, v| v.nil? }
|
@@ -12,7 +12,7 @@ module URBANopt
|
|
12
12
|
|
13
13
|
@@logger.level = Logger::WARN
|
14
14
|
##
|
15
|
-
#
|
15
|
+
# Defining class variable "@@logger" to log errors, info and warning messages.
|
16
16
|
def self.logger
|
17
17
|
@@logger
|
18
18
|
end
|
@@ -12,7 +12,7 @@ module URBANopt
|
|
12
12
|
module Reporting
|
13
13
|
module DefaultReports
|
14
14
|
##
|
15
|
-
#
|
15
|
+
# power_distribution include eletrical power distribution systems information.
|
16
16
|
##
|
17
17
|
class PowerDistribution
|
18
18
|
attr_accessor :under_voltage_hours, :over_voltage_hours, :nominal_capacity,
|
@@ -89,7 +89,7 @@ module URBANopt
|
|
89
89
|
end
|
90
90
|
|
91
91
|
##
|
92
|
-
# Merges
|
92
|
+
# Merges multiple power distribution results together.
|
93
93
|
##
|
94
94
|
# +new_costs+ - _Array_ - An array of ConstructionCost objects.
|
95
95
|
def merge_power_distribution
|
@@ -33,7 +33,7 @@ module URBANopt
|
|
33
33
|
:timeseries_csv, :location, :program, :construction_costs, :reporting_periods, :feature_reports, :distributed_generation,
|
34
34
|
:scenario_power_distribution, :scenario_power_distribution_cost, :qaqc_flags # :nodoc:
|
35
35
|
|
36
|
-
# ScenarioReport class
|
36
|
+
# ScenarioReport class initializes the scenario report attributes:
|
37
37
|
# +:id+ , +:name+ , +:directory_name+, +:timesteps_per_hour+ , +:number_of_not_started_simulations+ ,
|
38
38
|
# +:number_of_started_simulations+ , +:number_of_complete_simulations+ , +:number_of_failed_simulations+ ,
|
39
39
|
# +:timeseries_csv+ , +:location+ , +:program+ , +:construction_costs+ , +:reporting_periods+ , +:feature_reports+,
|
@@ -74,7 +74,7 @@ module URBANopt
|
|
74
74
|
@reporting_periods << ReportingPeriod.new(rp)
|
75
75
|
end
|
76
76
|
|
77
|
-
# feature_report is
|
77
|
+
# feature_report is initialized here to be used in the add_feature_report method
|
78
78
|
@feature_reports = []
|
79
79
|
hash[:feature_reports].each do |fr|
|
80
80
|
@feature_reports << FeatureReport.new(fr)
|
@@ -246,7 +246,7 @@ module URBANopt
|
|
246
246
|
# - add the array of feature_reports
|
247
247
|
# - scenario report location takes the location of the first feature in the list
|
248
248
|
##
|
249
|
-
# [
|
249
|
+
# [parameters:]
|
250
250
|
# +feature_report+ - _FeatureReport_ - An object of FeatureReport class.
|
251
251
|
##
|
252
252
|
def add_feature_report(feature_report)
|
@@ -719,7 +719,7 @@
|
|
719
719
|
]
|
720
720
|
},
|
721
721
|
"simultaneous_heating_and_cooling": {
|
722
|
-
"description": "Whether heating and cooling are
|
722
|
+
"description": "Whether heating and cooling are occurring during the same hour when cooling load exists",
|
723
723
|
"type": [
|
724
724
|
"integer",
|
725
725
|
"null"
|
@@ -784,7 +784,7 @@
|
|
784
784
|
"type": "string"
|
785
785
|
},
|
786
786
|
"name": {
|
787
|
-
"description": "name refers to the name of the feature (eg. Building 1,
|
787
|
+
"description": "name refers to the name of the feature (eg. Building 1, transformer 5)",
|
788
788
|
"type": "string"
|
789
789
|
},
|
790
790
|
"directory_name": {
|
@@ -870,7 +870,7 @@
|
|
870
870
|
"type": "string"
|
871
871
|
},
|
872
872
|
"multiplier": {
|
873
|
-
"description": "Multiplier used if this reporting period is representative of
|
873
|
+
"description": "Multiplier used if this reporting period is representative of multiple periods. For example one week simulation that represents entire month.",
|
874
874
|
"type": "number",
|
875
875
|
"default": 1
|
876
876
|
},
|
@@ -24,7 +24,7 @@ module URBANopt
|
|
24
24
|
##
|
25
25
|
# [parameters:]
|
26
26
|
#
|
27
|
-
# * +hash+ - _Hash_ - A hash
|
27
|
+
# * +hash+ - _Hash_ - A hash containing a +:size_kw+ key/value pair which represents the nameplate capacity in kilowatts (kW)
|
28
28
|
#
|
29
29
|
def initialize(hash = {})
|
30
30
|
hash.delete_if { |k, v| v.nil? }
|
@@ -28,7 +28,7 @@ module URBANopt
|
|
28
28
|
##
|
29
29
|
# [parameters:]
|
30
30
|
#
|
31
|
-
# * +hash+ - _Hash_ - A hash
|
31
|
+
# * +hash+ - _Hash_ - A hash containing +:size_kw+ and +:size_kwh+ key/value pair which represents the power and storage capacity in kilowatts (kW) and kilowatt-hours respectively.
|
32
32
|
#
|
33
33
|
def initialize(hash = {})
|
34
34
|
hash.delete_if { |k, v| v.nil? }
|
@@ -14,7 +14,7 @@ module URBANopt
|
|
14
14
|
module Reporting
|
15
15
|
module DefaultReports
|
16
16
|
##
|
17
|
-
# TimeseriesCSV include timesries
|
17
|
+
# TimeseriesCSV include timesries results reported in a CSV file.
|
18
18
|
##
|
19
19
|
class TimeseriesCSV
|
20
20
|
attr_accessor :path, :first_report_datetime, :column_names #:nodoc:
|
@@ -33,7 +33,7 @@ module URBANopt
|
|
33
33
|
@path = hash[:path]
|
34
34
|
@first_report_datetime = hash[:first_report_datetime]
|
35
35
|
|
36
|
-
# from scenario csv shema get required
|
36
|
+
# from scenario csv shema get required results to be aggregated
|
37
37
|
@required_column_names = load_scenario_csv_schema_headers
|
38
38
|
|
39
39
|
@column_names = hash[:column_names]
|
@@ -23,7 +23,7 @@ module URBANopt
|
|
23
23
|
##
|
24
24
|
# [parameters:]
|
25
25
|
#
|
26
|
-
# * +hash+ - _Hash_ - A hash
|
26
|
+
# * +hash+ - _Hash_ - A hash containing a +:size_kw+ key/value pair which represents the nameplate capacity in kilowatts (kW)
|
27
27
|
#
|
28
28
|
def initialize(hash = {})
|
29
29
|
hash.delete_if { |k, v| v.nil? }
|
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.10.
|
4
|
+
version: 0.10.1
|
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: 2024-
|
12
|
+
date: 2024-06-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|