urbanopt-reporting 0.6.1 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -69,9 +69,15 @@
69
69
  },
70
70
  "rnm_results": {
71
71
  "$ref": "#definitions/RnmResults"
72
- },
72
+ },
73
73
  "scenario_power_distribution": {
74
74
  "$ref": "#definitions/ScenarioPowerDistribution"
75
+ },
76
+ "scenario_power_distribution_cost": {
77
+ "$ref": "#definitions/ScenarioPowerDistributionCost"
78
+ },
79
+ "qaqc_flags": {
80
+ "$ref": "#/definitions/qaqc_flags"
75
81
  }
76
82
  },
77
83
  "required": [
@@ -129,6 +135,281 @@
129
135
  }
130
136
  }
131
137
  },
138
+ "ScenarioPowerDistributionCost": {
139
+ "type": "object",
140
+ "properties": {
141
+ "title": "UpgradeParamsBaseModel",
142
+ "description": "Contains results from all jobs in the simulation.",
143
+ "type": "object",
144
+ "properties": {
145
+ "results": {
146
+ "title": "results",
147
+ "description": "Results summary for each job",
148
+ "type": "array",
149
+ "items": {}
150
+ },
151
+ "outputs": {
152
+ "title": "outputs",
153
+ "description": "Outputs for each job in the simulation.",
154
+ "allOf": [{
155
+ "$ref": "#/definitions/UpgradeSimulationOutputModel"
156
+ }]
157
+ },
158
+ "violation_summary": {
159
+ "title": "upgrade_summary",
160
+ "description": "Contains thermal or voltage upgrade results for each job",
161
+ "type": "array",
162
+ "items": {
163
+ "$ref": "#/definitions/UpgradeViolationResultModel"
164
+ }
165
+ },
166
+ "costs_per_equipment": {
167
+ "title": "costs_per_equipment",
168
+ "description": "Contains upgrade cost information for each job by equipment type",
169
+ "type": "array",
170
+ "items": {
171
+ "$ref": "#/definitions/TotalUpgradeCostsResultModel"
172
+ }
173
+ },
174
+ "equipment": {
175
+ "title": "equipment",
176
+ "description": "Contains equipment information for each job",
177
+ "type": "array",
178
+ "items": {}
179
+ }
180
+ },
181
+ "additionalProperties": false,
182
+ "definitions": {
183
+ "UpgradeJobOutputModel": {
184
+ "title": "UpgradeParamsBaseModel",
185
+ "description": "Contains outputs from one job.",
186
+ "type": "object",
187
+ "properties": {
188
+ "upgraded_opendss_model_file": {
189
+ "title": "upgraded_opendss_model_file",
190
+ "description": "Path to file that will load the upgraded network.",
191
+ "type": "string"
192
+ },
193
+ "feeder_stats": {
194
+ "title": "feeder_stats",
195
+ "description": "Path to file containing feeder metadata and equipment details before and after upgrades.",
196
+ "type": "string"
197
+ },
198
+ "return_code": {
199
+ "title": "return_code",
200
+ "description": "Return code from process. Zero is success, non-zero is a failure.",
201
+ "type": "integer"
202
+ }
203
+ },
204
+ "required": [
205
+ "upgraded_opendss_model_file",
206
+ "feeder_stats",
207
+ "return_code"
208
+ ],
209
+ "additionalProperties": false
210
+ },
211
+ "UpgradeSimulationOutputModel": {
212
+ "title": "UpgradeParamsBaseModel",
213
+ "description": "Contains outputs from all jobs in the simulation.",
214
+ "type": "object",
215
+ "properties": {
216
+ "log_file": {
217
+ "title": "log_file",
218
+ "description": "Path to log file for the simulation.",
219
+ "type": "string"
220
+ },
221
+ "jobs": {
222
+ "title": "jobs",
223
+ "description": "Outputs for each job in the simulation.",
224
+ "type": "array",
225
+ "items": {
226
+ "$ref": "#/definitions/UpgradeJobOutputModel"
227
+ }
228
+ }
229
+ },
230
+ "required": [
231
+ "log_file",
232
+ "jobs"
233
+ ],
234
+ "additionalProperties": false
235
+ },
236
+ "UpgradeViolationResultModel": {
237
+ "title": "UpgradeParamsBaseModel",
238
+ "description": "Defines result parameters for thermal upgrades.",
239
+ "type": "object",
240
+ "properties": {
241
+ "name": {
242
+ "title": "name",
243
+ "description": "Job name that produced the result",
244
+ "type": "string"
245
+ },
246
+ "scenario": {
247
+ "title": "scenario",
248
+ "description": "Simulation scenario describing the controls being used",
249
+ "default": "control_mode",
250
+ "type": "string"
251
+ },
252
+ "stage": {
253
+ "title": "stage",
254
+ "description": "Stage of upgrades: initial (before upgrades) or final (after upgrades)",
255
+ "type": "string"
256
+ },
257
+ "upgrade_type": {
258
+ "title": "upgrade_type",
259
+ "description": "Type of upgrade: thermal or voltage",
260
+ "type": "string"
261
+ },
262
+ "simulation_time_s": {
263
+ "title": "simulation_time_s",
264
+ "description": "Simulation time to perform upgrades (seconds)",
265
+ "type": "number"
266
+ },
267
+ "thermal_violations_present": {
268
+ "title": "thermal_violations_present",
269
+ "description": "Flag indicating whether thermal violations are present",
270
+ "type": "boolean"
271
+ },
272
+ "voltage_violations_present": {
273
+ "title": "voltage_violations_present",
274
+ "description": "Flag indicating whether voltage violations are present",
275
+ "type": "boolean"
276
+ },
277
+ "max_bus_voltage": {
278
+ "title": "max_bus_voltage",
279
+ "description": "Maximum voltage recorded on any bus",
280
+ "units": "pu",
281
+ "type": "number"
282
+ },
283
+ "min_bus_voltage": {
284
+ "title": "min_bus_voltage",
285
+ "description": "Minimum voltage recorded on any bus",
286
+ "units": "pu",
287
+ "type": "number"
288
+ },
289
+ "num_voltage_violation_buses": {
290
+ "title": "num_voltage_violation_buses",
291
+ "description": "Number of buses with voltage violations",
292
+ "type": "integer"
293
+ },
294
+ "num_overvoltage_violation_buses": {
295
+ "title": "num_overvoltage_violation_buses",
296
+ "description": "Number of buses with voltage above voltage_upper_limit",
297
+ "type": "integer"
298
+ },
299
+ "voltage_upper_limit": {
300
+ "title": "voltage_upper_limit",
301
+ "description": "Voltage upper limit, the threshold considered for determining overvoltages",
302
+ "units": "pu",
303
+ "type": "number"
304
+ },
305
+ "num_undervoltage_violation_buses": {
306
+ "title": "num_undervoltage_violation_buses",
307
+ "description": "Number of buses with voltage below voltage_lower_limit",
308
+ "type": "integer"
309
+ },
310
+ "voltage_lower_limit": {
311
+ "title": "voltage_lower_limit",
312
+ "description": "Voltage lower limit, the threshold considered for determining undervoltages",
313
+ "units": "pu",
314
+ "type": "number"
315
+ },
316
+ "max_line_loading": {
317
+ "title": "max_line_loading",
318
+ "description": "Maximum line loading",
319
+ "units": "pu",
320
+ "type": "number"
321
+ },
322
+ "max_transformer_loading": {
323
+ "title": "max_transformer_loading",
324
+ "description": "Maximum transformer loading",
325
+ "units": "pu",
326
+ "type": "number"
327
+ },
328
+ "num_line_violations": {
329
+ "title": "num_line_violations",
330
+ "description": "Number of lines with loading above line upper limit",
331
+ "type": "integer"
332
+ },
333
+ "line_upper_limit": {
334
+ "title": "line_upper_limit",
335
+ "description": "Line upper limit, the threshold considered for determining line overloading",
336
+ "units": "pu",
337
+ "type": "number"
338
+ },
339
+ "num_transformer_violations": {
340
+ "title": "num_transformer_violations",
341
+ "description": "Number of transformers with loading above transformer upper limit",
342
+ "type": "integer"
343
+ },
344
+ "transformer_upper_limit": {
345
+ "title": "transformer_upper_limit",
346
+ "description": "Transformer upper limit, the threshold considered for determining transformer overloading",
347
+ "units": "pu",
348
+ "type": "number"
349
+ }
350
+ },
351
+ "required": [
352
+ "name",
353
+ "stage",
354
+ "upgrade_type",
355
+ "simulation_time_s",
356
+ "thermal_violations_present",
357
+ "voltage_violations_present",
358
+ "max_bus_voltage",
359
+ "min_bus_voltage",
360
+ "num_voltage_violation_buses",
361
+ "num_overvoltage_violation_buses",
362
+ "voltage_upper_limit",
363
+ "num_undervoltage_violation_buses",
364
+ "voltage_lower_limit",
365
+ "max_line_loading",
366
+ "max_transformer_loading",
367
+ "num_line_violations",
368
+ "line_upper_limit",
369
+ "num_transformer_violations",
370
+ "transformer_upper_limit"
371
+ ],
372
+ "additionalProperties": false
373
+ },
374
+ "TotalUpgradeCostsResultModel": {
375
+ "title": "UpgradeParamsBaseModel",
376
+ "description": "Provides total output costs for upgrading a type of equipment.",
377
+ "type": "object",
378
+ "properties": {
379
+ "name": {
380
+ "title": "name",
381
+ "description": "Job name",
382
+ "type": "string"
383
+ },
384
+ "type": {
385
+ "title": "type",
386
+ "description": "Equipment type",
387
+ "type": "string"
388
+ },
389
+ "count": {
390
+ "title": "count",
391
+ "description": "Count of upgraded equipment",
392
+ "type": "integer"
393
+ },
394
+ "total_cost_usd": {
395
+ "title": "total_cost_usd",
396
+ "description": "Total cost in US dollars",
397
+ "units": "dollars",
398
+ "type": "number"
399
+ }
400
+ },
401
+ "required": [
402
+ "name",
403
+ "type",
404
+ "count",
405
+ "total_cost_usd"
406
+ ],
407
+ "additionalProperties": false
408
+ }
409
+ }
410
+ }
411
+
412
+ },
132
413
  "DistributedGeneration": {
133
414
  "type": "object",
134
415
  "properties": {
@@ -254,24 +535,7 @@
254
535
  }
255
536
  },
256
537
  "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
- }
538
+ "$ref": "#/definitions/LineLength"
275
539
  },
276
540
  "distribution_transformers_capacity_kva": {
277
541
  "description": "Distribution transformers capacity in kVA",
@@ -282,18 +546,10 @@
282
546
  "type": "object",
283
547
  "properties": {
284
548
  "investment": {
285
- "description": "Investment cost",
286
- "type": "object",
287
- "properties": {
288
- "$ref": "#/definitions/RnmCost"
289
- }
549
+ "$ref": "#/definitions/RnmCost"
290
550
  },
291
551
  "yearly_maintenance": {
292
- "description": "Yearly maintenance cost",
293
- "type": "object",
294
- "properties": {
295
- "$ref": "#/definitions/RnmCost"
296
- }
552
+ "$ref": "#/definitions/RnmCost"
297
553
  }
298
554
  }
299
555
  },
@@ -344,6 +600,17 @@
344
600
  "underground_mi": {
345
601
  "description": "Length of underground lines (miles)",
346
602
  "type": "number"
603
+ },
604
+ "type": "object",
605
+ "properties": {
606
+ "overhead_mi": {
607
+ "description": "Length of overhead lines (miles)",
608
+ "type": "number"
609
+ },
610
+ "underground_mi": {
611
+ "description": "Length of underground lines (miles)",
612
+ "type": "number"
613
+ }
347
614
  }
348
615
  },
349
616
  "RnmCost": {
@@ -366,6 +633,78 @@
366
633
  "total": {
367
634
  "description": "Total Cost ($)",
368
635
  "type": "number"
636
+ },
637
+ "type": "object",
638
+ "properties": {
639
+ "low_voltage_network": {
640
+ "description": "Low Voltage Network Cost ($)",
641
+ "type": "number"
642
+ },
643
+ "distribution_transformers": {
644
+ "description": "Distribution Transformers Cost ($)",
645
+ "type": "number"
646
+ },
647
+ "medium_voltage_network": {
648
+ "description": "Medium Voltage Network Cost ($)",
649
+ "type": "number"
650
+ },
651
+ "primary_substations": {
652
+ "description": "Primary Substations Cost ($)",
653
+ "type": "number"
654
+ },
655
+ "total": {
656
+ "description": "TOtal Cost ($)",
657
+ "type": "number"
658
+ }
659
+ }
660
+ },
661
+ "qaqc_flags": {
662
+ "type": "object",
663
+ "properties": {
664
+ "eui_reasonableness": {
665
+ "description": "Whether the EUI is within ASHRAE 90.1-2013 bounds for that building type",
666
+ "type": ["integer", "null"]
667
+ },
668
+ "end_use_by_category": {
669
+ "description": "Whether building energy use is within ASHRAE 90.1-2013 bounds for that building type",
670
+ "type": ["integer", "null"]
671
+ },
672
+ "mechanical_system_part_load_efficiency": {
673
+ "description": "Whether 40% & 80% heating and cooling efficiency is within ASHRAE 90.1-2013 bounds for that building type",
674
+ "type": ["integer", "null"]
675
+ },
676
+ "simultaneous_heating_and_cooling": {
677
+ "description": "Whether heating and cooling are occuring during the same hour when cooling load exists",
678
+ "type": ["integer", "null"]
679
+ },
680
+ "internal_loads": {
681
+ "description": "Whether lighting, plug, and equipment use is within ASHRAE 90.1-2013 bounds for that building type",
682
+ "type": ["integer", "null"]
683
+ },
684
+ "schedules": {
685
+ "description": "Whether lighting, ventilation, occupant, plug, and equipment schedules are within ASHRAE 90.1-2013 bounds for that building type",
686
+ "type": ["integer", "null"]
687
+ },
688
+ "envelope_r_value": {
689
+ "description": "Whether building envelope is within ASHRAE 90.1-2013 bounds for that building type",
690
+ "type": ["integer", "null"]
691
+ },
692
+ "domestic_hot_water": {
693
+ "description": "Whether DHW energy use is within 2011 ASHRAE handbook bounds for that building type",
694
+ "type": ["integer", "null"]
695
+ },
696
+ "mechanical_system_efficiency": {
697
+ "description": "Whether heating and cooling efficiency is within ASHRAE 90.1-2013 bounds for that building type",
698
+ "type": ["integer", "null"]
699
+ },
700
+ "supply_and_zone_air_temperature": {
701
+ "description": "Whether fan effectiveness is within ASHRAE 90.1-2013 bounds for that building type",
702
+ "type": ["integer", "null"]
703
+ },
704
+ "total_qaqc_flags": {
705
+ "description": "How many QAQC flags have been raised for this feature or scenario",
706
+ "type": ["integer", "null"]
707
+ }
369
708
  }
370
709
  },
371
710
  "FeatureReport": {
@@ -428,6 +767,9 @@
428
767
  },
429
768
  "thermal_storage": {
430
769
  "$ref": "#/definitions/ThermalStorage"
770
+ },
771
+ "qaqc_flags": {
772
+ "$ref": "#/definitions/qaqc_flags"
431
773
  }
432
774
  },
433
775
  "required": [
@@ -628,7 +970,6 @@
628
970
  "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
971
  "type": "number"
630
972
  }
631
-
632
973
  }
633
974
  }
634
975
  },
@@ -1172,4 +1513,4 @@
1172
1513
  }
1173
1514
  }
1174
1515
  }
1175
- }
1516
+ }
@@ -40,6 +40,6 @@
40
40
 
41
41
  module URBANopt
42
42
  module Reporting
43
- VERSION = '0.6.1'.freeze
43
+ VERSION = '0.7.0'.freeze
44
44
  end
45
45
  end
@@ -26,7 +26,10 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency 'bundler', '>= 2.1.0'
27
27
  spec.add_development_dependency 'rake', '~> 13.0'
28
28
  spec.add_development_dependency 'rspec', '~> 3.9'
29
+ spec.add_development_dependency 'simplecov', '~> 0.18.2'
30
+ spec.add_development_dependency 'simplecov-lcov', '~> 0.8.0'
31
+
29
32
  spec.add_runtime_dependency 'json_pure', '~> 2.3'
30
33
  spec.add_runtime_dependency 'json-schema', '~> 2.8'
31
- spec.add_runtime_dependency 'openstudio-extension', '~> 0.5.1'
34
+ spec.add_runtime_dependency 'openstudio-extension', '~> 0.6.0'
32
35
  end
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.6.1
4
+ version: 0.7.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: 2022-06-27 00:00:00.000000000 Z
12
+ date: 2022-12-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -53,6 +53,34 @@ dependencies:
53
53
  - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: '3.9'
56
+ - !ruby/object:Gem::Dependency
57
+ name: simplecov
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - "~>"
61
+ - !ruby/object:Gem::Version
62
+ version: 0.18.2
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - "~>"
68
+ - !ruby/object:Gem::Version
69
+ version: 0.18.2
70
+ - !ruby/object:Gem::Dependency
71
+ name: simplecov-lcov
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - "~>"
75
+ - !ruby/object:Gem::Version
76
+ version: 0.8.0
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: 0.8.0
56
84
  - !ruby/object:Gem::Dependency
57
85
  name: json_pure
58
86
  requirement: !ruby/object:Gem::Requirement
@@ -87,14 +115,14 @@ dependencies:
87
115
  requirements:
88
116
  - - "~>"
89
117
  - !ruby/object:Gem::Version
90
- version: 0.5.1
118
+ version: 0.6.0
91
119
  type: :runtime
92
120
  prerelease: false
93
121
  version_requirements: !ruby/object:Gem::Requirement
94
122
  requirements:
95
123
  - - "~>"
96
124
  - !ruby/object:Gem::Version
97
- version: 0.5.1
125
+ version: 0.6.0
98
126
  description: Library include scenario default reporting measure and scenario defaults
99
127
  reports schema and classes
100
128
  email:
@@ -106,6 +134,7 @@ files:
106
134
  - ".github/ISSUE_TEMPLATE/bug_report.md"
107
135
  - ".github/ISSUE_TEMPLATE/feature_request.md"
108
136
  - ".github/pull_request_template.md"
137
+ - ".github/workflows/nightly_build.yml"
109
138
  - ".gitignore"
110
139
  - ".rdoc_options"
111
140
  - ".rubocop.yml"
@@ -173,8 +202,10 @@ files:
173
202
  - lib/urbanopt/reporting/default_reports/logger.rb
174
203
  - lib/urbanopt/reporting/default_reports/power_distribution.rb
175
204
  - lib/urbanopt/reporting/default_reports/program.rb
205
+ - lib/urbanopt/reporting/default_reports/qaqc_flags.rb
176
206
  - lib/urbanopt/reporting/default_reports/reporting_period.rb
177
207
  - lib/urbanopt/reporting/default_reports/scenario_power_distribution.rb
208
+ - lib/urbanopt/reporting/default_reports/scenario_power_distribution_cost.rb
178
209
  - lib/urbanopt/reporting/default_reports/scenario_report.rb
179
210
  - lib/urbanopt/reporting/default_reports/schema/README.md
180
211
  - lib/urbanopt/reporting/default_reports/schema/scenario_csv_columns.txt