urbanopt-reporting 0.5.0 → 0.6.0
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 +11 -1
- data/LICENSE.md +17 -17
- 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 +15717 -1407
- data/lib/measures/.rubocop.yml +4 -2
- data/lib/measures/default_feature_reports/measure.rb +80 -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 +27 -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 +18 -0
- data/lib/urbanopt/reporting/default_reports/schema/scenario_schema.json +240 -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
- metadata +3 -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,
|
@@ -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,21 @@ 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_Emissions_Var
|
54
|
+
Future_Hourly_Emissions_Var
|
55
|
+
Historical_Annual_Emissions_Var
|
56
|
+
Historical_Hourly_Emissions_Var
|
57
|
+
Future_Annual_Emissions_Intensity_Var
|
58
|
+
Future_Hourly_Emissions_Intensity_Var
|
59
|
+
Historical_Annual_Emissions_Intensity_Var
|
60
|
+
Historical_Hourly_Emissions_Intensity_Var
|
61
|
+
Curtailed EV Power
|
62
|
+
Daily EV Charge Energy Capacity
|
63
|
+
EV Charge Ratio
|
64
|
+
Total Charged EV Energy
|
65
|
+
Total Curtailed EV Energy
|
66
|
+
Total Scheduled EV Energy
|
67
|
+
Emission Intensity Schedule Output
|
68
|
+
EV Charging Effective Schedule
|
69
|
+
EV Charging Original Schedule
|
70
|
+
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
|
+
}
|
313
|
+
}
|
314
|
+
}
|
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"
|
171
336
|
}
|
172
337
|
}
|
173
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,43 @@
|
|
371
568
|
},
|
372
569
|
"comfort_result": {
|
373
570
|
"$ref": "#/definitions/ComfortResult"
|
571
|
+
},
|
572
|
+
"emissions": {
|
573
|
+
"type": "object",
|
574
|
+
"properties": {
|
575
|
+
"future_annual_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_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_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_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_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_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_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_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
|
+
}
|
374
608
|
}
|
375
609
|
},
|
376
610
|
"additionalProperties": false
|
@@ -913,4 +1147,4 @@
|
|
913
1147
|
}
|
914
1148
|
}
|
915
1149
|
}
|
916
|
-
}
|
1150
|
+
}
|
@@ -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,
|
@@ -52,7 +52,7 @@ module URBANopt
|
|
52
52
|
# _Float_ - power capacity in kilowatts
|
53
53
|
#
|
54
54
|
attr_accessor :size_kw
|
55
|
-
attr_accessor :location
|
55
|
+
attr_accessor :location, :tilt, :azimuth, :module_type
|
56
56
|
|
57
57
|
##
|
58
58
|
# Initialize SolarPV attributes from a hash. Solar PV attributes currently are limited to power capacity.
|
@@ -67,6 +67,39 @@ module URBANopt
|
|
67
67
|
@size_kw = hash[:size_kw]
|
68
68
|
@id = hash[:id]
|
69
69
|
@location = hash[:location]
|
70
|
+
@approx_area_m2 = 0
|
71
|
+
|
72
|
+
if hash[:azimuth]
|
73
|
+
@azimuth = hash[:azimuth]
|
74
|
+
end
|
75
|
+
if hash[:tilt]
|
76
|
+
@tilt = hash[:tilt]
|
77
|
+
end
|
78
|
+
if hash[:module_type]
|
79
|
+
@module_type = hash[:module_type]
|
80
|
+
|
81
|
+
# calculate area with PVWatts formulas
|
82
|
+
# Size (kW) = Array Area (m²) × 1 kW/m² × Module Efficiency (%)
|
83
|
+
# also grab module efficiency: 0 (standard) = 15%, 1 (premium) = 19%, 2 (thin film) = 10%
|
84
|
+
eff = 0
|
85
|
+
case @module_type
|
86
|
+
when 0
|
87
|
+
eff = 0.15
|
88
|
+
when 1
|
89
|
+
eff = 0.19
|
90
|
+
when 2
|
91
|
+
eff = 0.10
|
92
|
+
end
|
93
|
+
if @size_kw != 0
|
94
|
+
@approx_area_m2 = (@size_kw / eff).round(3)
|
95
|
+
end
|
96
|
+
end
|
97
|
+
if hash[:gcr]
|
98
|
+
@gcr = hash[:gcr]
|
99
|
+
end
|
100
|
+
if hash[:average_yearly_energy_produced_kwh]
|
101
|
+
@annual_energy_produced = hash[:average_yearly_energy_produced_kwh]
|
102
|
+
end
|
70
103
|
|
71
104
|
# initialize class variables @@validator and @@schema
|
72
105
|
@@validator ||= Validator.new
|
@@ -84,6 +117,12 @@ module URBANopt
|
|
84
117
|
|
85
118
|
result[:size_kw] = @size_kw if @size_kw
|
86
119
|
result[:location] = @location if @location
|
120
|
+
result[:azimuth] = @azimuth if @azimuth
|
121
|
+
result[:tilt] = @tilt if @tilt
|
122
|
+
result[:module_type] = @module_type if @module_type
|
123
|
+
result[:approximate_area_m2] = @approx_area_m2 if @approx_area_m2
|
124
|
+
result[:gcr] = @gcr if @gcr
|
125
|
+
result[:average_yearly_energy_produced_kwh] = @annual_energy_produced if @annual_energy_produced
|
87
126
|
|
88
127
|
return result
|
89
128
|
end
|
@@ -97,7 +136,7 @@ module URBANopt
|
|
97
136
|
else
|
98
137
|
existing_pv.size_kw = (existing_pv.size_kw || 0) + (new_pv.size_kw || 0)
|
99
138
|
end
|
100
|
-
|
139
|
+
# KAF: todo, recalculate area?
|
101
140
|
return existing_pv
|
102
141
|
end
|
103
142
|
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,
|
@@ -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,
|
@@ -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,
|
@@ -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,
|
@@ -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,
|
@@ -51,7 +51,7 @@ module URBANopt
|
|
51
51
|
##
|
52
52
|
# _Float_ - power capacity in kilowatts
|
53
53
|
#
|
54
|
-
attr_accessor :size_kw
|
54
|
+
attr_accessor :size_kw, :average_yearly_energy_produced_kwh, :size_class
|
55
55
|
|
56
56
|
##
|
57
57
|
# Initialize Wind attributes from a hash. Wind attributes currently are limited to power capacity.
|
@@ -64,6 +64,8 @@ module URBANopt
|
|
64
64
|
hash.delete_if { |k, v| v.nil? }
|
65
65
|
|
66
66
|
@size_kw = hash[:size_kw]
|
67
|
+
@avg_energy_kwh = hash[:average_yearly_energy_produced_kwh]
|
68
|
+
@size_class = hash[:size_class]
|
67
69
|
|
68
70
|
# initialize class variables @@validator and @@schema
|
69
71
|
@@validator ||= Validator.new
|
@@ -80,6 +82,8 @@ module URBANopt
|
|
80
82
|
result = {}
|
81
83
|
|
82
84
|
result[:size_kw] = @size_kw if @size_kw
|
85
|
+
result[:average_yearly_energy_produced_kwh] = @avg_energy_kwh if @avg_energy_kwh
|
86
|
+
result[:size_class] = @size_class if @size_class
|
83
87
|
|
84
88
|
return result
|
85
89
|
end
|
@@ -93,6 +97,11 @@ module URBANopt
|
|
93
97
|
else
|
94
98
|
existing_wind.size_kw = (existing_wind.size_kw || 0) + (new_wind.size_kw || 0)
|
95
99
|
end
|
100
|
+
if existing_wind.average_yearly_energy_produced_kwh.nil? && new_wind.average_yearly_energy_produced_kwh.nil?
|
101
|
+
existing_wind.average_yearly_energy_produced_kwh = nil
|
102
|
+
else
|
103
|
+
existing_wind.average_yearly_energy_produced_kwh = (existing_wind.average_yearly_energy_produced_kwh || 0) + (new_wind.average_yearly_energy_produced_kwh || 0)
|
104
|
+
end
|
96
105
|
|
97
106
|
return existing_wind
|
98
107
|
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,
|
@@ -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,
|
@@ -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,
|
@@ -40,6 +40,6 @@
|
|
40
40
|
|
41
41
|
module URBANopt
|
42
42
|
module Reporting
|
43
|
-
VERSION = '0.
|
43
|
+
VERSION = '0.6.0'.freeze
|
44
44
|
end
|
45
45
|
end
|
data/lib/urbanopt/reporting.rb
CHANGED
@@ -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,
|
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.
|
4
|
+
version: 0.6.0
|
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:
|
12
|
+
date: 2022-05-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -174,6 +174,7 @@ files:
|
|
174
174
|
- lib/urbanopt/reporting/default_reports/power_distribution.rb
|
175
175
|
- lib/urbanopt/reporting/default_reports/program.rb
|
176
176
|
- lib/urbanopt/reporting/default_reports/reporting_period.rb
|
177
|
+
- lib/urbanopt/reporting/default_reports/scenario_power_distribution.rb
|
177
178
|
- lib/urbanopt/reporting/default_reports/scenario_report.rb
|
178
179
|
- lib/urbanopt/reporting/default_reports/schema/README.md
|
179
180
|
- lib/urbanopt/reporting/default_reports/schema/scenario_csv_columns.txt
|