urbanopt-reporting 0.4.3 → 0.6.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 +21 -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 +15720 -1410
- data/lib/measures/.rubocop.yml +4 -2
- data/lib/measures/default_feature_reports/measure.rb +242 -36
- data/lib/measures/export_modelica_loads/measure.rb +2 -1
- data/lib/measures/export_time_series_modelica/measure.rb +58 -59
- data/lib/measures/export_time_series_modelica/resources/os_lib_helper_methods.rb +3 -5
- data/lib/urbanopt/reporting/default_reports/construction_cost.rb +2 -1
- data/lib/urbanopt/reporting/default_reports/date.rb +2 -1
- data/lib/urbanopt/reporting/default_reports/distributed_generation.rb +24 -6
- data/lib/urbanopt/reporting/default_reports/end_use.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/end_uses.rb +2 -1
- data/lib/urbanopt/reporting/default_reports/extension.rb +1 -1
- data/lib/urbanopt/reporting/default_reports/feature_report.rb +9 -8
- data/lib/urbanopt/reporting/default_reports/generator.rb +1 -2
- data/lib/urbanopt/reporting/default_reports/location.rb +2 -1
- data/lib/urbanopt/reporting/default_reports/logger.rb +2 -2
- data/lib/urbanopt/reporting/default_reports/power_distribution.rb +22 -6
- data/lib/urbanopt/reporting/default_reports/program.rb +2 -1
- data/lib/urbanopt/reporting/default_reports/reporting_period.rb +47 -7
- data/lib/urbanopt/reporting/default_reports/scenario_power_distribution.rb +148 -0
- data/lib/urbanopt/reporting/default_reports/scenario_report.rb +20 -14
- 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 +2 -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 -4
- metadata +16 -15
@@ -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
|
+
}
|
@@ -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,
|
@@ -291,6 +291,7 @@ module URBANopt
|
|
291
291
|
if current_values.size != new_values.size
|
292
292
|
raise 'Values of different sizes in add_timeseries_csv'
|
293
293
|
end
|
294
|
+
|
294
295
|
new_values.each_with_index do |value, i|
|
295
296
|
# aggregate all columns except Datime column
|
296
297
|
if column_name != 'Datetime'
|
@@ -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.1'.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,
|
@@ -1,4 +1,3 @@
|
|
1
|
-
|
2
1
|
lib = File.expand_path('lib', __dir__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'urbanopt/reporting/version'
|
@@ -26,8 +25,8 @@ Gem::Specification.new do |spec|
|
|
26
25
|
|
27
26
|
spec.add_development_dependency 'bundler', '>= 2.1.0'
|
28
27
|
spec.add_development_dependency 'rake', '~> 13.0'
|
29
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
30
|
-
spec.add_runtime_dependency 'json-schema', '~> 2.8'
|
28
|
+
spec.add_development_dependency 'rspec', '~> 3.9'
|
31
29
|
spec.add_runtime_dependency 'json_pure', '~> 2.3'
|
32
|
-
spec.add_runtime_dependency '
|
30
|
+
spec.add_runtime_dependency 'json-schema', '~> 2.8'
|
31
|
+
spec.add_runtime_dependency 'openstudio-extension', '~> 0.5.1'
|
33
32
|
end
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rawad El Kontar
|
8
8
|
- Dan Macumber
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-06-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -45,56 +45,56 @@ dependencies:
|
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '3.
|
48
|
+
version: '3.9'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '3.
|
55
|
+
version: '3.9'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
57
|
+
name: json_pure
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '2.
|
62
|
+
version: '2.3'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '2.
|
69
|
+
version: '2.3'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
71
|
+
name: json-schema
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: '2.
|
76
|
+
version: '2.8'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: '2.
|
83
|
+
version: '2.8'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: openstudio-extension
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: 0.
|
90
|
+
version: 0.5.1
|
91
91
|
type: :runtime
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: 0.
|
97
|
+
version: 0.5.1
|
98
98
|
description: Library include scenario default reporting measure and scenario defaults
|
99
99
|
reports schema and classes
|
100
100
|
email:
|
@@ -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
|
@@ -191,7 +192,7 @@ homepage: https://github.com/urbanopt
|
|
191
192
|
licenses:
|
192
193
|
- Nonstandard
|
193
194
|
metadata: {}
|
194
|
-
post_install_message:
|
195
|
+
post_install_message:
|
195
196
|
rdoc_options: []
|
196
197
|
require_paths:
|
197
198
|
- lib
|
@@ -207,7 +208,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
207
208
|
version: '0'
|
208
209
|
requirements: []
|
209
210
|
rubygems_version: 3.1.4
|
210
|
-
signing_key:
|
211
|
+
signing_key:
|
211
212
|
specification_version: 4
|
212
213
|
summary: Library to report URBANopt results
|
213
214
|
test_files: []
|