urbanopt-reporting 0.5.0 → 0.6.2
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/.github/workflows/nightly_build.yml +41 -0
- data/CHANGELOG.md +22 -1
- data/LICENSE.md +17 -17
- data/README.md +4 -2
- data/doc_templates/LICENSE.md +17 -17
- data/doc_templates/copyright_erb.txt +2 -2
- data/doc_templates/copyright_js.txt +2 -2
- data/doc_templates/copyright_ruby.txt +1 -1
- data/docs/package-lock.json +15720 -1410
- data/lib/measures/.rubocop.yml +4 -2
- data/lib/measures/default_feature_reports/measure.rb +221 -16
- data/lib/measures/export_modelica_loads/measure.rb +1 -1
- data/lib/measures/export_time_series_modelica/measure.rb +1 -1
- data/lib/measures/export_time_series_modelica/resources/os_lib_helper_methods.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/construction_cost.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/date.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/distributed_generation.rb +20 -2
- data/lib/urbanopt/reporting/default_reports/end_use.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/end_uses.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/extension.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/feature_report.rb +2 -2
- data/lib/urbanopt/reporting/default_reports/generator.rb +1 -2
- data/lib/urbanopt/reporting/default_reports/location.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/logger.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/power_distribution.rb +21 -6
- data/lib/urbanopt/reporting/default_reports/program.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/reporting_period.rb +44 -3
- data/lib/urbanopt/reporting/default_reports/scenario_power_distribution.rb +148 -0
- data/lib/urbanopt/reporting/default_reports/scenario_report.rb +7 -3
- data/lib/urbanopt/reporting/default_reports/schema/scenario_csv_columns.txt +24 -0
- data/lib/urbanopt/reporting/default_reports/schema/scenario_schema.json +265 -6
- data/lib/urbanopt/reporting/default_reports/solar_pv.rb +42 -3
- data/lib/urbanopt/reporting/default_reports/storage.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/thermal_storage.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/timeseries_csv.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/validator.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/wind.rb +11 -2
- data/lib/urbanopt/reporting/default_reports.rb +1 -1
- data/lib/urbanopt/reporting/derived_extension.rb +1 -1
- data/lib/urbanopt/reporting/version.rb +2 -2
- data/lib/urbanopt/reporting.rb +1 -1
- data/urbanopt-reporting-gem.gemspec +3 -0
- metadata +32 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt™, Copyright (c) 2019-
|
2
|
+
# URBANopt™, Copyright (c) 2019-2022, 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,
|
@@ -57,14 +57,22 @@ module URBANopt
|
|
57
57
|
:net_site_energy_kwh, :net_source_energy_kwh, :total_utility_cost_dollar, :net_utility_cost_dollar, :utility_costs_dollar, :electricity_kwh, :natural_gas_kwh, :propane_kwh, :fuel_oil_kwh, :other_fuels_kwh, :district_cooling_kwh,
|
58
58
|
:district_heating_kwh, :water_qbft, :electricity_produced_kwh, :end_uses, :energy_production_kwh, :photovoltaic,
|
59
59
|
:fuel_type, :total_cost_dollar, :usage_cost_dollar, :demand_cost_dollar, :comfort_result, :time_setpoint_not_met_during_occupied_cooling,
|
60
|
-
:time_setpoint_not_met_during_occupied_heating, :time_setpoint_not_met_during_occupied_hours, :hours_out_of_comfort_bounds_PMV, :hours_out_of_comfort_bounds_PPD
|
60
|
+
:time_setpoint_not_met_during_occupied_heating, :time_setpoint_not_met_during_occupied_hours, :hours_out_of_comfort_bounds_PMV, :hours_out_of_comfort_bounds_PPD,
|
61
|
+
:emissions, :future_annual_electricity_emissions_mt, :future_hourly_electricity_emissions_mt, :historical_annual_electricity_emissions_mt, :historical_hourly_electricity_emissions_mt,
|
62
|
+
:future_annual_electricity_emissions_intensity_kg_per_ft2, :future_hourly_electricity_emissions_intensity_kg_per_ft2, :historical_annual_electricity_emissions_intensity_kg_per_ft2, :historical_hourly_electricity_emissions_intensity_kg_per_ft2 ,
|
63
|
+
:natural_gas_emissions_mt, :natural_gas_emissions_intensity_kg_per_ft2, :propane_emissions_mt, :propane_emissions_intensity_kg_per_ft2,
|
64
|
+
:fueloil_no2_emissions_mt, :fueloil_no2_emissions_intensity_kg_per_ft2 #:nodoc:
|
61
65
|
|
62
66
|
# ReportingPeriod class initializes the reporting period attributes:
|
63
67
|
# +:id+ , +:name+ , +:multiplier+ , +:start_date+ , +:end_date+ , +:month+ , +:day_of_month+ , +:year+ , +:total_site_energy_kwh+ , +:total_source_energy_kwh+ , +:site_EUI_kwh_per_m2+, +:site_EUI_kbtu_per_ft2+, +:source_EUI_kwh_per_m2+, +:source_EUI_kbtu_per_ft2+,
|
64
68
|
# +:net_site_energy_kwh+ , +:net_source_energy_kwh+ , +:total_utility_cost_dollar , +:net_utility_cost_dollar+ , +:utility_costs_dollar+ , +:electricity_kwh+ , +:natural_gas_kwh+ , +:propane_kwh+ , +:fuel_oil_kwh+ , +:other_fuels_kwh+ , +:district_cooling_kwh+ ,
|
65
69
|
# +:district_heating_kwh+ , +:water_qbft+ , +:electricity_produced_kwh+ , +:end_uses+ , +:energy_production_kwh+ , +:photovoltaic_kwh+ ,
|
66
70
|
# +:fuel_type+ , +:total_cost_dollar+ , +:usage_cost_dollar+ , +:demand_cost_dollar+ , +:comfort_result+ , +:time_setpoint_not_met_during_occupied_cooling+ ,
|
67
|
-
# +:time_setpoint_not_met_during_occupied_heating+ , +:time_setpoint_not_met_during_occupied_hours+
|
71
|
+
# +:time_setpoint_not_met_during_occupied_heating+ , +:time_setpoint_not_met_during_occupied_hours+ , +:hours_out_of_comfort_bounds_PMV+ , +:hours_out_of_comfort_bounds_PPD+ ,
|
72
|
+
# +:emissions, +:future_annual_electricity_emissions_mt+, +:future_hourly_electricity_emissions_mt+, +:historical_annual_electricity_emissions_mt+, +:historical_hourly_electricity_emissions_mt+,
|
73
|
+
# +:future_annual_electricity_emissions_intensity_kg_per_ft2+, +:future_hourly_electricity_emissions_intensity_kg_per_ft2+, +:historical_annual_electricity_emissions_intensity_kg_per_ft2+, +:historical_hourly_electricity_emissions_intensity_kg_per_ft2+,
|
74
|
+
# +:natural_gas_emissions_mt+, +:natural_gas_emissions_intensity_kg_per_ft2+, +:propane_emissions_mt+, +:propane_emissions_intensity_kg_per_ft2+,
|
75
|
+
# +:fueloil_no2_emissions_mt+, +:fueloil_no2_emissions_intensity_kg_per_ft2+
|
68
76
|
##
|
69
77
|
# [parameters:]
|
70
78
|
# +hash+ - _Hash_ - A hash which may contain a deserialized reporting_period.
|
@@ -106,6 +114,8 @@ module URBANopt
|
|
106
114
|
|
107
115
|
@comfort_result = hash[:comfort_result]
|
108
116
|
|
117
|
+
@emissions = hash[:emissions]
|
118
|
+
|
109
119
|
# initialize class variables @@validator and @@schema
|
110
120
|
@@validator ||= Validator.new
|
111
121
|
@@schema ||= @@validator.schema
|
@@ -147,6 +157,12 @@ module URBANopt
|
|
147
157
|
hash[:utility_costs_dollar] = [{ fuel_type: nil, total_cost_dollar: nil, usage_cost_dollar: nil, demand_cost_dollar: nil }]
|
148
158
|
hash[:comfort_result] = { time_setpoint_not_met_during_occupied_cooling: nil, time_setpoint_not_met_during_occupied_heating: nil,
|
149
159
|
time_setpoint_not_met_during_occupied_hours: nil, hours_out_of_comfort_bounds_PMV: nil, hours_out_of_comfort_bounds_PPD: nil }
|
160
|
+
hash[:emissions] = { future_annual_electricity_emissions_mt: nil, future_hourly_electricity_emissions_mt: nil, historical_annual_electricity_emissions_mt: nil,
|
161
|
+
historical_hourly_electricity_emissions_mt: nil, future_annual_electricity_emissions_intensity_kg_per_ft2: nil,
|
162
|
+
future_hourly_electricity_emissions_intensity_kg_per_ft2: nil, historical_annual_electricity_emissions_intensity_kg_per_ft2: nil,
|
163
|
+
historical_hourly_electricity_emissions_intensity_kg_per_ft2: nil, natural_gas_emissions_mt: nil,
|
164
|
+
natural_gas_emissions_intensity_kg_per_ft2: nil, propane_emissions_mt: nil, propane_emissions_intensity_kg_per_ft2: nil,
|
165
|
+
fueloil_no2_emissions_mt: nil, fueloil_no2_emissions_intensity_kg_per_ft2: nil }
|
150
166
|
|
151
167
|
return hash
|
152
168
|
end
|
@@ -205,6 +221,10 @@ module URBANopt
|
|
205
221
|
comfort_result_hash.delete_if { |k, v| v.nil? }
|
206
222
|
result[:comfort_result] = comfort_result_hash if @comfort_result
|
207
223
|
|
224
|
+
emissions_hash = @emissions if @emissions
|
225
|
+
emissions_hash.delete_if { |k, v| v.nil? }
|
226
|
+
result[:emissions] = emissions_hash if @emissions
|
227
|
+
|
208
228
|
# validates +reporting_period+ properties against schema for reporting period.
|
209
229
|
if @@validator.validate(@@schema[:definitions][:ReportingPeriod][:properties], result).any?
|
210
230
|
raise "feature_report properties does not match schema: #{@@validator.validate(@@schema[:definitions][:ReportingPeriod][:properties], result)}"
|
@@ -278,6 +298,27 @@ module URBANopt
|
|
278
298
|
existing_period.comfort_result[:hours_out_of_comfort_bounds_PPD] = add_values(existing_period.comfort_result[:hours_out_of_comfort_bounds_PPD], new_period.comfort_result[:hours_out_of_comfort_bounds_PPD])
|
279
299
|
end
|
280
300
|
|
301
|
+
if existing_period.emissions
|
302
|
+
existing_period.emissions[:future_annual_electricity_emissions_mt] = add_values(existing_period.emissions[:future_annual_electricity_emissions_mt], new_period.emissions[:future_annual_electricity_emissions_mt])
|
303
|
+
existing_period.emissions[:future_hourly_electricity_emissions_mt] = add_values(existing_period.emissions[:future_hourly_electricity_emissions_mt], new_period.emissions[:future_hourly_electricity_emissions_mt])
|
304
|
+
existing_period.emissions[:historical_annual_electricity_emissions_mt] = add_values(existing_period.emissions[:historical_annual_electricity_emissions_mt], new_period.emissions[:historical_annual_electricity_emissions_mt])
|
305
|
+
existing_period.emissions[:historical_hourly_electricity_emissions_mt] = add_values(existing_period.emissions[:historical_hourly_electricity_emissions_mt], new_period.emissions[:historical_hourly_electricity_emissions_mt])
|
306
|
+
|
307
|
+
existing_period.emissions[:natural_gas_emissions_mt] = add_values(existing_period.emissions[:natural_gas_emissions_mt], new_period.emissions[:natural_gas_emissions_mt])
|
308
|
+
existing_period.emissions[:propane_emissions_mt] = add_values(existing_period.emissions[:propane_emissions_mt], new_period.emissions[:propane_emissions_mt])
|
309
|
+
existing_period.emissions[:fueloil_no2_emissions_mt] = add_values(existing_period.emissions[:fueloil_no2_emissions_mt], new_period.emissions[:fueloil_no2_emissions_mt])
|
310
|
+
|
311
|
+
existing_period.emissions[:future_annual_electricity_emissions_intensity_kg_per_ft2] = add_values(existing_period.emissions[:future_annual_electricity_emissions_intensity_kg_per_ft2], new_period.emissions[:future_annual_electricity_emissions_intensity_kg_per_ft2])
|
312
|
+
existing_period.emissions[:future_hourly_electricity_emissions_intensity_kg_per_ft2] = add_values(existing_period.emissions[:future_hourly_electricity_emissions_intensity_kg_per_ft2], new_period.emissions[:future_hourly_electricity_emissions_intensity_kg_per_ft2])
|
313
|
+
existing_period.emissions[:historical_annual_electricity_emissions_intensity_kg_per_ft2] = add_values(existing_period.emissions[:historical_annual_electricity_emissions_intensity_kg_per_ft2], new_period.emissions[:historical_annual_electricity_emissions_intensity_kg_per_ft2])
|
314
|
+
existing_period.emissions[:historical_hourly_electricity_emissions_intensity_kg_per_ft2] = add_values(existing_period.emissions[:historical_hourly_electricity_emissions_intensity_kg_per_ft2], new_period.emissions[:historical_hourly_electricity_emissions_intensity_kg_per_ft2])
|
315
|
+
|
316
|
+
existing_period.emissions[:natural_gas_emissions_intensity_kg_per_ft2] = add_values(existing_period.emissions[:natural_gas_emissions_intensity_kg_per_ft2], new_period.emissions[:natural_gas_emissions_intensity_kg_per_ft2])
|
317
|
+
existing_period.emissions[:propane_emissions_intensity_kg_per_ft2] = add_values(existing_period.emissions[:propane_emissions_intensity_kg_per_ft2], new_period.emissions[:propane_emissions_intensity_kg_per_ft2])
|
318
|
+
existing_period.emissions[:fueloil_no2_emissions_intensity_kg_per_ft2] = add_values(existing_period.emissions[:fueloil_no2_emissions_intensity_kg_per_ft2], new_period.emissions[:fueloil_no2_emissions_intensity_kg_per_ft2])
|
319
|
+
|
320
|
+
end
|
321
|
+
|
281
322
|
return existing_period
|
282
323
|
end
|
283
324
|
|
@@ -0,0 +1,148 @@
|
|
1
|
+
# *********************************************************************************
|
2
|
+
# URBANopt™, Copyright (c) 2019-2022, Alliance for Sustainable Energy, LLC, and other
|
3
|
+
# contributors. All rights reserved.
|
4
|
+
|
5
|
+
# Redistribution and use in source and binary forms, with or without modification,
|
6
|
+
# are permitted provided that the following conditions are met:
|
7
|
+
|
8
|
+
# Redistributions of source code must retain the above copyright notice, this list
|
9
|
+
# of conditions and the following disclaimer.
|
10
|
+
|
11
|
+
# Redistributions in binary form must reproduce the above copyright notice, this
|
12
|
+
# list of conditions and the following disclaimer in the documentation and/or other
|
13
|
+
# materials provided with the distribution.
|
14
|
+
|
15
|
+
# Neither the name of the copyright holder nor the names of its contributors may be
|
16
|
+
# used to endorse or promote products derived from this software without specific
|
17
|
+
# prior written permission.
|
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
|
+
|
29
|
+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
30
|
+
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
31
|
+
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
32
|
+
# IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
33
|
+
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
34
|
+
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
35
|
+
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
36
|
+
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
37
|
+
# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
38
|
+
# OF THE POSSIBILITY OF SUCH DAMAGE.
|
39
|
+
# *********************************************************************************
|
40
|
+
|
41
|
+
require_relative 'validator'
|
42
|
+
|
43
|
+
require 'json'
|
44
|
+
require 'json-schema'
|
45
|
+
|
46
|
+
module URBANopt
|
47
|
+
module Reporting
|
48
|
+
module DefaultReports
|
49
|
+
##
|
50
|
+
# scenario_power_distribution include eletrical power distribution systems information.
|
51
|
+
##
|
52
|
+
class ScenarioPowerDistribution
|
53
|
+
attr_accessor :substations, :distribution_lines, :capacitors
|
54
|
+
|
55
|
+
##
|
56
|
+
# ScenarioPowerDistribution class initialize all scenario_power_distribution attributes:
|
57
|
+
# +:substations+ , +:distribution_lines+
|
58
|
+
##
|
59
|
+
# [parameters:]
|
60
|
+
# +hash+ - _Hash_ - A hash which may contain a deserialized power_distribution.
|
61
|
+
##
|
62
|
+
def initialize(hash = {})
|
63
|
+
hash.delete_if { |k, v| v.nil? }
|
64
|
+
hash = defaults.merge(hash)
|
65
|
+
|
66
|
+
@substations = hash[:substations]
|
67
|
+
@distribution_lines = hash[:distribution_lines]
|
68
|
+
@capacitors = hash[:capacitors]
|
69
|
+
|
70
|
+
# initialize class variables @@validator and @@schema
|
71
|
+
@@validator ||= Validator.new
|
72
|
+
@@schema ||= @@validator.schema
|
73
|
+
end
|
74
|
+
|
75
|
+
##
|
76
|
+
# Assigns default values if attribute values do not exist.
|
77
|
+
##
|
78
|
+
def defaults
|
79
|
+
hash = {}
|
80
|
+
hash[:substations] = []
|
81
|
+
hash[:distribution_lines] = []
|
82
|
+
hash[:capacitors] = []
|
83
|
+
|
84
|
+
return hash
|
85
|
+
end
|
86
|
+
|
87
|
+
##
|
88
|
+
# Converts to a Hash equivalent for JSON serialization.
|
89
|
+
##
|
90
|
+
# - Exclude attributes with nil values.
|
91
|
+
# - Validate power_distribution hash properties against schema.
|
92
|
+
##
|
93
|
+
def to_hash
|
94
|
+
result = {}
|
95
|
+
result[:substations] = @substations if @substations
|
96
|
+
result[:distribution_lines] = @distribution_lines if @distribution_lines
|
97
|
+
result[:capacitors] = @capacitors if @capacitors
|
98
|
+
|
99
|
+
# validate power_distribution properties against schema
|
100
|
+
if @@validator.validate(@@schema[:definitions][:ScenarioPowerDistribution][:properties], result).any?
|
101
|
+
raise "scenario_power_distribution properties does not match schema: #{@@validator.validate(@@schema[:definitions][:ScenarioPowerDistribution][:properties], result)}"
|
102
|
+
end
|
103
|
+
|
104
|
+
return result
|
105
|
+
end
|
106
|
+
|
107
|
+
##
|
108
|
+
# Add a substation
|
109
|
+
##
|
110
|
+
def add_substation(hash = {})
|
111
|
+
hash.delete_if { |k, v| v.nil? }
|
112
|
+
hash = defaults.merge(hash)
|
113
|
+
# field: nominal_voltage
|
114
|
+
substation = {}
|
115
|
+
substation['nominal_voltage'] = hash[:nominal_voltage]
|
116
|
+
@substations << substation
|
117
|
+
end
|
118
|
+
|
119
|
+
##
|
120
|
+
# Add a line
|
121
|
+
##
|
122
|
+
def add_line(hash = {})
|
123
|
+
hash.delete_if { |k, v| v.nil? }
|
124
|
+
hash = defaults.merge(hash)
|
125
|
+
# fields: length, ampacity, commercial_line_type
|
126
|
+
line = {}
|
127
|
+
line['length'] = hash[:length]
|
128
|
+
line['ampacity'] = hash[:ampacity]
|
129
|
+
line['commercial_line_type'] = hash[:commercial_line_type]
|
130
|
+
|
131
|
+
@distribution_lines << line
|
132
|
+
end
|
133
|
+
|
134
|
+
##
|
135
|
+
# Add a capacitor
|
136
|
+
##
|
137
|
+
def add_capacitor(hash = {})
|
138
|
+
hash.delete_if { |k, v| v.nil? }
|
139
|
+
hash = defaults.merge(hash)
|
140
|
+
# fields: nominal_capacity
|
141
|
+
cap = {}
|
142
|
+
cap['nominal_capacity'] = hash[:nominal_capacity]
|
143
|
+
cap
|
144
|
+
end
|
145
|
+
end
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# *********************************************************************************
|
2
|
-
# URBANopt™, Copyright (c) 2019-
|
2
|
+
# URBANopt™, Copyright (c) 2019-2022, 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,
|
@@ -46,6 +46,7 @@ require_relative 'reporting_period'
|
|
46
46
|
require_relative 'timeseries_csv'
|
47
47
|
require_relative 'distributed_generation'
|
48
48
|
require_relative 'validator'
|
49
|
+
require_relative 'scenario_power_distribution'
|
49
50
|
|
50
51
|
require 'json'
|
51
52
|
require 'json-schema'
|
@@ -62,7 +63,8 @@ module URBANopt
|
|
62
63
|
class ScenarioReport
|
63
64
|
attr_accessor :id, :name, :directory_name, :timesteps_per_hour, :number_of_not_started_simulations,
|
64
65
|
:number_of_started_simulations, :number_of_complete_simulations, :number_of_failed_simulations,
|
65
|
-
:timeseries_csv, :location, :program, :construction_costs, :reporting_periods, :feature_reports, :distributed_generation
|
66
|
+
:timeseries_csv, :location, :program, :construction_costs, :reporting_periods, :feature_reports, :distributed_generation,
|
67
|
+
:scenario_power_distribution # :nodoc:
|
66
68
|
|
67
69
|
# ScenarioReport class intializes the scenario report attributes:
|
68
70
|
# +:id+ , +:name+ , +:directory_name+, +:timesteps_per_hour+ , +:number_of_not_started_simulations+ ,
|
@@ -90,10 +92,11 @@ module URBANopt
|
|
90
92
|
@location = Location.new(hash[:location])
|
91
93
|
@program = Program.new(hash[:program])
|
92
94
|
@distributed_generation = DistributedGeneration.new(hash[:distributed_generation] || {})
|
95
|
+
@scenario_power_distribution = ScenarioPowerDistribution.new(hash[:scenario_power_distribution] || {})
|
93
96
|
|
94
97
|
@construction_costs = []
|
95
98
|
hash[:construction_costs].each do |cc|
|
96
|
-
@
|
99
|
+
@construction_costs << ConstructionCost.new(cc)
|
97
100
|
end
|
98
101
|
|
99
102
|
@reporting_periods = []
|
@@ -229,6 +232,7 @@ module URBANopt
|
|
229
232
|
result[:location] = @location.to_hash if @location
|
230
233
|
result[:program] = @program.to_hash if @program
|
231
234
|
result[:distributed_generation] = @distributed_generation.to_hash if @distributed_generation
|
235
|
+
result[:scenario_power_distribution] = @scenario_power_distribution.to_hash if @scenario_power_distribution
|
232
236
|
|
233
237
|
result[:construction_costs] = []
|
234
238
|
@construction_costs&.each { |cc| result[:construction_costs] << cc.to_hash }
|
@@ -50,3 +50,27 @@ Net Power
|
|
50
50
|
Net Apparent Power
|
51
51
|
Ice Thermal Storage End Fraction
|
52
52
|
Cooling Coil Ice Thermal Storage End Fraction
|
53
|
+
Future_Annual_Electricity_Emissions
|
54
|
+
Future_Hourly_Electricity_Emissions
|
55
|
+
Historical_Annual_Electricity_Emissions
|
56
|
+
Historical_Hourly_Electricity_Emissions
|
57
|
+
Future_Annual_Electricity_Emissions_Intensity
|
58
|
+
Future_Hourly_Electricity_Emissions_Intensity
|
59
|
+
Historical_Annual_Electricity_Emissions_Intensity
|
60
|
+
Historical_Hourly_Electricity_Emissions_Intensity
|
61
|
+
Natural_Gas_Emissions
|
62
|
+
Natural_Gas_Emissions_Intensity
|
63
|
+
Propane_Emissions
|
64
|
+
Propane_Emissions_Intensity
|
65
|
+
FuelOilNo2_Emissions
|
66
|
+
FuelOilNo2_Emissions_Intensity
|
67
|
+
Curtailed EV Power
|
68
|
+
Daily EV Charge Energy Capacity
|
69
|
+
EV Charge Ratio
|
70
|
+
Total Charged EV Energy
|
71
|
+
Total Curtailed EV Energy
|
72
|
+
Total Scheduled EV Energy
|
73
|
+
Emission Intensity Schedule Output
|
74
|
+
EV Charging Effective Schedule
|
75
|
+
EV Charging Original Schedule
|
76
|
+
EV Charging Original Load
|
@@ -66,6 +66,12 @@
|
|
66
66
|
},
|
67
67
|
"thermal_storage": {
|
68
68
|
"$ref": "#/definitions/ThermalStorage"
|
69
|
+
},
|
70
|
+
"rnm_results": {
|
71
|
+
"$ref": "#definitions/RnmResults"
|
72
|
+
},
|
73
|
+
"scenario_power_distribution": {
|
74
|
+
"$ref": "#definitions/ScenarioPowerDistribution"
|
69
75
|
}
|
70
76
|
},
|
71
77
|
"required": [
|
@@ -81,9 +87,59 @@
|
|
81
87
|
],
|
82
88
|
"additionalProperties": false
|
83
89
|
},
|
90
|
+
"ScenarioPowerDistribution": {
|
91
|
+
"type": "object",
|
92
|
+
"properties": {
|
93
|
+
"substations": {
|
94
|
+
"description": "Array of electrical substations",
|
95
|
+
"type": "array",
|
96
|
+
"items": {
|
97
|
+
"type": "object",
|
98
|
+
"properties": {
|
99
|
+
"nominal_voltage": {
|
100
|
+
"description": "Nominal Voltage (V)",
|
101
|
+
"type": "number"
|
102
|
+
}
|
103
|
+
}
|
104
|
+
}
|
105
|
+
},
|
106
|
+
"distribution_lines": {
|
107
|
+
"description": "Array of distribution lines",
|
108
|
+
"type": "array",
|
109
|
+
"items": {
|
110
|
+
"type": "object",
|
111
|
+
"properties": {
|
112
|
+
"length": {
|
113
|
+
"description": "Length of the line (m)",
|
114
|
+
"type": "number"
|
115
|
+
},
|
116
|
+
"ampacity": {
|
117
|
+
"description": "Maximum ampacity of the line (A)",
|
118
|
+
"type": "number"
|
119
|
+
},
|
120
|
+
"commercial_line_type": {
|
121
|
+
"description": "Array of the wire types that make up the line",
|
122
|
+
"type": "array",
|
123
|
+
"items": {
|
124
|
+
"type": "string"
|
125
|
+
}
|
126
|
+
}
|
127
|
+
}
|
128
|
+
}
|
129
|
+
}
|
130
|
+
}
|
131
|
+
},
|
84
132
|
"DistributedGeneration": {
|
85
133
|
"type": "object",
|
86
134
|
"properties": {
|
135
|
+
"reopt_assumptions_file_path": {
|
136
|
+
"description": "File path of REopt assumptions file used to generate results, if known",
|
137
|
+
"type": "string"
|
138
|
+
},
|
139
|
+
"annual_renewable_electricity_pct": {
|
140
|
+
"description": "Percentage of annual renewable electricity generation",
|
141
|
+
"type": "number"
|
142
|
+
},
|
87
143
|
"lcc_us_dollars": {
|
88
144
|
"description": "Optimal lifecycle cost",
|
89
145
|
"type": "number"
|
@@ -127,7 +183,7 @@
|
|
127
183
|
"properties": {
|
128
184
|
"size_kw": {
|
129
185
|
"description": "rated power in kW",
|
130
|
-
"type": "
|
186
|
+
"type": "number"
|
131
187
|
},
|
132
188
|
"location": {
|
133
189
|
"description": "Location of PV. Available options are roof, ground or both.",
|
@@ -137,6 +193,14 @@
|
|
137
193
|
"ground",
|
138
194
|
"both"
|
139
195
|
]
|
196
|
+
},
|
197
|
+
"tilt": {
|
198
|
+
"description": "PV system tilt",
|
199
|
+
"type": "number"
|
200
|
+
},
|
201
|
+
"azimuth": {
|
202
|
+
"description": "PV azimuth angle",
|
203
|
+
"type": "number"
|
140
204
|
}
|
141
205
|
}
|
142
206
|
},
|
@@ -145,6 +209,14 @@
|
|
145
209
|
"properties": {
|
146
210
|
"size_kw": {
|
147
211
|
"description": "rated power in kW",
|
212
|
+
"type": "number"
|
213
|
+
},
|
214
|
+
"average_yearly_energy_produced_kwh": {
|
215
|
+
"description": "average yearly energy produced in kWh",
|
216
|
+
"type": "number"
|
217
|
+
},
|
218
|
+
"size_class": {
|
219
|
+
"description": "Turbine size-class. One of [residential, commercial, medium, large]",
|
148
220
|
"type": "string"
|
149
221
|
}
|
150
222
|
}
|
@@ -154,7 +226,7 @@
|
|
154
226
|
"properties": {
|
155
227
|
"size_kw": {
|
156
228
|
"description": "rated power in kW",
|
157
|
-
"type": "
|
229
|
+
"type": "number"
|
158
230
|
}
|
159
231
|
}
|
160
232
|
},
|
@@ -163,14 +235,139 @@
|
|
163
235
|
"properties": {
|
164
236
|
"size_kw": {
|
165
237
|
"description": "rated power in kW",
|
166
|
-
"type": "
|
238
|
+
"type": "number"
|
167
239
|
},
|
168
|
-
"
|
240
|
+
"size_kwh": {
|
169
241
|
"description": "rated capacity in kWh",
|
170
|
-
"type": "
|
242
|
+
"type": "number"
|
243
|
+
}
|
244
|
+
}
|
245
|
+
},
|
246
|
+
"RnmResults": {
|
247
|
+
"type": "object",
|
248
|
+
"properties": {
|
249
|
+
"demand_generation_planning": {
|
250
|
+
"description": "Demand generation planning",
|
251
|
+
"type": "array",
|
252
|
+
"items": {
|
253
|
+
"$ref": "#/definitions/DemandGenPlanning"
|
254
|
+
}
|
255
|
+
},
|
256
|
+
"electrical_lines_length": {
|
257
|
+
"description": "Electrical lines length",
|
258
|
+
"type": "object",
|
259
|
+
"properties": {
|
260
|
+
"low_voltage": {
|
261
|
+
"description": "Low voltage electrical lines length",
|
262
|
+
"type": "object",
|
263
|
+
"properties": {
|
264
|
+
"$ref": "#/definitions/LineLength"
|
265
|
+
}
|
266
|
+
},
|
267
|
+
"medium_voltage": {
|
268
|
+
"description": "Medium voltage electrical lines length",
|
269
|
+
"type": "object",
|
270
|
+
"properties": {
|
271
|
+
"$ref": "#/definitions/LineLength"
|
272
|
+
}
|
273
|
+
}
|
274
|
+
}
|
275
|
+
},
|
276
|
+
"distribution_transformers_capacity_kva": {
|
277
|
+
"description": "Distribution transformers capacity in kVA",
|
278
|
+
"type": "number"
|
279
|
+
},
|
280
|
+
"costs": {
|
281
|
+
"description": "Costs",
|
282
|
+
"type": "object",
|
283
|
+
"properties": {
|
284
|
+
"investment": {
|
285
|
+
"description": "Investment cost",
|
286
|
+
"type": "object",
|
287
|
+
"properties": {
|
288
|
+
"$ref": "#/definitions/RnmCost"
|
289
|
+
}
|
290
|
+
},
|
291
|
+
"yearly_maintenance": {
|
292
|
+
"description": "Yearly maintenance cost",
|
293
|
+
"type": "object",
|
294
|
+
"properties": {
|
295
|
+
"$ref": "#/definitions/RnmCost"
|
296
|
+
}
|
297
|
+
}
|
298
|
+
}
|
299
|
+
},
|
300
|
+
"reliability_indexes": {
|
301
|
+
"description": "Reliability Indexes",
|
302
|
+
"type": "object",
|
303
|
+
"properties": {
|
304
|
+
"SAIDI": {
|
305
|
+
"description": "System Average Interruption Duration Index",
|
306
|
+
"type": "number"
|
307
|
+
},
|
308
|
+
"SAIFI": {
|
309
|
+
"description": "System Average Interruption Frequency Index",
|
310
|
+
"type": "number"
|
311
|
+
}
|
312
|
+
}
|
171
313
|
}
|
172
314
|
}
|
173
315
|
},
|
316
|
+
"DemandGenPlanning": {
|
317
|
+
"type": "object",
|
318
|
+
"properties": {
|
319
|
+
"type": {
|
320
|
+
"description": "Type of demand generation planning",
|
321
|
+
"type": "string",
|
322
|
+
"enum": [
|
323
|
+
"Low Voltage (LV) Consumers",
|
324
|
+
"Medium Voltage (MV) Consumers",
|
325
|
+
"Low Voltage (LV) Distributed generators",
|
326
|
+
"Medium Voltage (MV) Distributed generators"
|
327
|
+
]
|
328
|
+
},
|
329
|
+
"peak_demand_kw": {
|
330
|
+
"description": "Peak demand in kw for this type",
|
331
|
+
"type": "number"
|
332
|
+
},
|
333
|
+
"number_of_nodes_in_network": {
|
334
|
+
"description": "Number of nodes of this type in the network",
|
335
|
+
"type": "number"
|
336
|
+
}
|
337
|
+
}
|
338
|
+
},
|
339
|
+
"LineLength": {
|
340
|
+
"overhead_mi": {
|
341
|
+
"description": "Length of overhead lines (miles)",
|
342
|
+
"type": "number"
|
343
|
+
},
|
344
|
+
"underground_mi": {
|
345
|
+
"description": "Length of underground lines (miles)",
|
346
|
+
"type": "number"
|
347
|
+
}
|
348
|
+
},
|
349
|
+
"RnmCost": {
|
350
|
+
"low_voltage_network": {
|
351
|
+
"description": "Low Voltage Network Cost ($)",
|
352
|
+
"type": "number"
|
353
|
+
},
|
354
|
+
"distribution_transformers": {
|
355
|
+
"description": "Distribution Transformers Cost ($)",
|
356
|
+
"type": "number"
|
357
|
+
},
|
358
|
+
"medium_voltage_network": {
|
359
|
+
"description": "Medium Voltage Network Cost ($)",
|
360
|
+
"type": "number"
|
361
|
+
},
|
362
|
+
"primary_substations": {
|
363
|
+
"description": "Primary Substations Cost ($)",
|
364
|
+
"type": "number"
|
365
|
+
},
|
366
|
+
"total": {
|
367
|
+
"description": "Total Cost ($)",
|
368
|
+
"type": "number"
|
369
|
+
}
|
370
|
+
},
|
174
371
|
"FeatureReport": {
|
175
372
|
"type": "object",
|
176
373
|
"properties": {
|
@@ -371,6 +568,68 @@
|
|
371
568
|
},
|
372
569
|
"comfort_result": {
|
373
570
|
"$ref": "#/definitions/ComfortResult"
|
571
|
+
},
|
572
|
+
"emissions": {
|
573
|
+
"type": "object",
|
574
|
+
"properties": {
|
575
|
+
"future_annual_electricity_emissions_mt": {
|
576
|
+
"description": "Future emissions in metric ton (mt) calculated based on an annual emission factor value for the selected future year",
|
577
|
+
"type": "number"
|
578
|
+
},
|
579
|
+
"future_hourly_electricity_emissions_mt": {
|
580
|
+
"description": "Future emissions in metric ton (mt) calculated based on hourly emission factor values for the selected future year",
|
581
|
+
"type": "number"
|
582
|
+
},
|
583
|
+
"historical_annual_electricity_emissions_mt": {
|
584
|
+
"description": "Historical emissions in metric ton (mt) calculated based on an annual emission factor value for the selected historical year",
|
585
|
+
"type": "number"
|
586
|
+
},
|
587
|
+
"historical_hourly_electricity_emissions_mt": {
|
588
|
+
"description": "Historical emissions in metric ton (mt) calculated based on hourly emission factor values for the selected historical year",
|
589
|
+
"type": "number"
|
590
|
+
},
|
591
|
+
"future_annual_electricity_emissions_intensity_kg_per_ft2": {
|
592
|
+
"description": "Future emissions intensity in kg/ft2 calculated based on an annual emission factor value for the selected future year",
|
593
|
+
"type": "number"
|
594
|
+
},
|
595
|
+
"future_hourly_electricity_emissions_intensity_kg_per_ft2": {
|
596
|
+
"description": "Future emissions intensity in kg/ft2 calculated based on hourly emission factor values for the selected future year",
|
597
|
+
"type": "number"
|
598
|
+
},
|
599
|
+
"historical_annual_electricity_emissions_intensity_kg_per_ft2": {
|
600
|
+
"description": "Historical emissions intensity in kg/ft2 calculated based on an annual emission factor value for the selected historical year",
|
601
|
+
"type": "number"
|
602
|
+
},
|
603
|
+
"historical_hourly_electricity_emissions_intensity_kg_per_ft2": {
|
604
|
+
"description": "Historical emissions intensity in kg/ft2 calculated based on hourly emission factor values for the selected historical year",
|
605
|
+
"type": "number"
|
606
|
+
},
|
607
|
+
"natural_gas_emissions_mt": {
|
608
|
+
"description": "Natural Gas emissions in mt calculated based on EPA eGRID data and calculated using 20-year GWP horizon based on ASHRAE 189.1",
|
609
|
+
"type": "number"
|
610
|
+
},
|
611
|
+
"natural_gas_emissions_intensity_kg_per_ft2": {
|
612
|
+
"description": "Natural Gas emissions intensity in kg/ft2 calculated based on EPA eGRID data and calculated using 20-year GWP horizon based on ASHRAE 189.1",
|
613
|
+
"type": "number"
|
614
|
+
},
|
615
|
+
"propane_emissions_mt": {
|
616
|
+
"description": "Propane emissions in mt calculated based on EPA eGRID data and calculated using 20-year GWP horizon based on ASHRAE 189.1",
|
617
|
+
"type": "number"
|
618
|
+
},
|
619
|
+
"propane_emissions_intensity_kg_per_ft2": {
|
620
|
+
"description": "Propane emissions intensity in kg/ft2 calculated based on EPA eGRID data and calculated using 20-year GWP horizon based on ASHRAE 189.1",
|
621
|
+
"type": "number"
|
622
|
+
},
|
623
|
+
"fueloil_no2_emissions_mt": {
|
624
|
+
"description": "FuelOilNo2 emissions in mt calculated based on EPA eGRID data and calculated using 20-year GWP horizon based on ASHRAE 189.1",
|
625
|
+
"type": "number"
|
626
|
+
},
|
627
|
+
"fueloil_no2_emissions_intensity_kg_per_ft2": {
|
628
|
+
"description": "FuelOilNo2 emissions intensity in kg/ft2 calculated based on EPA eGRID data and calculated using 20-year GWP horizon based on ASHRAE 189.1",
|
629
|
+
"type": "number"
|
630
|
+
}
|
631
|
+
|
632
|
+
}
|
374
633
|
}
|
375
634
|
},
|
376
635
|
"additionalProperties": false
|
@@ -913,4 +1172,4 @@
|
|
913
1172
|
}
|
914
1173
|
}
|
915
1174
|
}
|
916
|
-
}
|
1175
|
+
}
|