urbanopt-reporting 0.1.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/.github/ISSUE_TEMPLATE/bug_report.md +19 -0
  3. data/.github/ISSUE_TEMPLATE/feature_request.md +15 -0
  4. data/.github/pull_request_template.md +13 -0
  5. data/.rdoc_options +36 -0
  6. data/CHANGELOG.md +41 -1
  7. data/CONTRIBUTING.md +1 -1
  8. data/LICENSE.md +1 -1
  9. data/RDOC_MAIN.md +10 -0
  10. data/README.md +1 -1
  11. data/Rakefile +1 -1
  12. data/deploy_docs.sh +5 -0
  13. data/doc_templates/LICENSE.md +1 -1
  14. data/doc_templates/copyright_erb.txt +1 -1
  15. data/doc_templates/copyright_js.txt +1 -1
  16. data/doc_templates/copyright_ruby.txt +1 -1
  17. data/docs/.gitignore +3 -0
  18. data/docs/.vuepress/components/InnerJsonSchema.vue +76 -0
  19. data/docs/.vuepress/components/JsonSchema.vue +12 -0
  20. data/docs/.vuepress/components/ScenarioSchema.vue +12 -0
  21. data/docs/.vuepress/components/StaticLink.vue +8 -0
  22. data/docs/.vuepress/config.js +25 -0
  23. data/docs/.vuepress/highlight.js +8 -0
  24. data/docs/.vuepress/json-schema-deref-loader.js +22 -0
  25. data/docs/.vuepress/public/custom_rdoc_styles.css +78 -0
  26. data/docs/.vuepress/styles/palette.styl +1 -0
  27. data/docs/.vuepress/utils.js +17 -0
  28. data/docs/README.md +9 -0
  29. data/docs/package-lock.json +10018 -0
  30. data/docs/package.json +30 -0
  31. data/docs/schemas/scenario-schema.md +3 -0
  32. data/lib/measures/default_feature_reports/LICENSE.md +1 -1
  33. data/lib/measures/default_feature_reports/measure.rb +191 -84
  34. data/lib/measures/default_feature_reports/measure.xml +11 -11
  35. data/lib/urbanopt/reporting.rb +1 -1
  36. data/lib/urbanopt/reporting/default_reports.rb +1 -1
  37. data/lib/urbanopt/reporting/default_reports/construction_cost.rb +1 -1
  38. data/lib/urbanopt/reporting/default_reports/date.rb +1 -1
  39. data/lib/urbanopt/reporting/default_reports/distributed_generation.rb +119 -6
  40. data/lib/urbanopt/reporting/default_reports/end_use.rb +1 -1
  41. data/lib/urbanopt/reporting/default_reports/end_uses.rb +53 -39
  42. data/lib/urbanopt/reporting/default_reports/extension.rb +30 -0
  43. data/lib/urbanopt/reporting/default_reports/feature_report.rb +42 -19
  44. data/lib/urbanopt/reporting/default_reports/generator.rb +2 -2
  45. data/lib/urbanopt/reporting/default_reports/location.rb +12 -12
  46. data/lib/urbanopt/reporting/default_reports/logger.rb +1 -1
  47. data/lib/urbanopt/reporting/default_reports/power_distribution.rb +1 -1
  48. data/lib/urbanopt/reporting/default_reports/program.rb +87 -87
  49. data/lib/urbanopt/reporting/default_reports/reporting_period.rb +87 -79
  50. data/lib/urbanopt/reporting/default_reports/scenario_report.rb +1 -1
  51. data/lib/urbanopt/reporting/default_reports/schema/README.md +1 -1
  52. data/lib/urbanopt/reporting/default_reports/schema/scenario_csv_columns.txt +15 -0
  53. data/lib/urbanopt/reporting/default_reports/schema/scenario_schema.json +97 -81
  54. data/lib/urbanopt/reporting/default_reports/solar_pv.rb +2 -2
  55. data/lib/urbanopt/reporting/default_reports/storage.rb +2 -2
  56. data/lib/urbanopt/reporting/default_reports/thermal_storage.rb +11 -11
  57. data/lib/urbanopt/reporting/default_reports/timeseries_csv.rb +1 -1
  58. data/lib/urbanopt/reporting/default_reports/validator.rb +1 -1
  59. data/lib/urbanopt/reporting/default_reports/wind.rb +2 -2
  60. data/lib/urbanopt/reporting/derived_extension.rb +1 -1
  61. data/lib/urbanopt/reporting/version.rb +2 -2
  62. data/urbanopt-reporting-gem.gemspec +4 -4
  63. metadata +35 -13
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt (tm), Copyright (c) 2019-2020, 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,6 +1,6 @@
1
1
  # URBANopt Scenario Schema
2
2
 
3
- The URBANopt Scenario Gem includes functionality for defining scenarios, running simulations, and post-processing results. An URBANopt Scenario describes a specific set of options to apply to each Feature in a FeatureFile (e.g. each GeoJSON Feature in an URBANopt GeoJSON File). User defined SimulationMapper classes translate each Feature to a SimulationDir which is a directory containing simulation input files. A ScenarioRunner is used to perform simulations for each SimulationDir. Finally, a ScenarioPostProcessor can run on a Scenario to generate scenario level results. The [URBANopt Scenario Gem Design Document](https://docs.google.com/document/d/1ExcGuHliaSvPlrYevAJTSV8XAtTQXz_KQqH3p4iQDwg/edit) describes the gem in more detail. The [URBANopt Example Project](https://github.com/urbanopt/urbanopt-example-project) demonstrates how to use the URBANopt Scenario Gem to perform a scenario analysis.
3
+ The URBANopt <sup>&trade;</sup> Scenario Gem includes functionality for defining scenarios, running simulations, and post-processing results. An URBANopt Scenario describes a specific set of options to apply to each Feature in a FeatureFile (e.g. each GeoJSON Feature in an URBANopt GeoJSON File). User defined SimulationMapper classes translate each Feature to a SimulationDir which is a directory containing simulation input files. A ScenarioRunner is used to perform simulations for each SimulationDir. Finally, a ScenarioPostProcessor can run on a Scenario to generate scenario level results. The [URBANopt Scenario Gem Design Document](https://docs.google.com/document/d/1ExcGuHliaSvPlrYevAJTSV8XAtTQXz_KQqH3p4iQDwg/edit) describes the gem in more detail. The [URBANopt Example Project](https://github.com/urbanopt/urbanopt-example-project) demonstrates how to use the URBANopt Scenario Gem to perform a scenario analysis.
4
4
 
5
5
  ## Reporting output units
6
6
 
@@ -2,6 +2,9 @@ Datetime
2
2
  Electricity:Facility
3
3
  ElectricityProduced:Facility
4
4
  Gas:Facility
5
+ Propane:Facility
6
+ FuelOil#2:Facility
7
+ OtherFuels:Facility
5
8
  Cooling:Electricity
6
9
  Heating:Electricity
7
10
  InteriorLights:Electricity
@@ -15,6 +18,18 @@ HeatRejection:Gas
15
18
  Heating:Gas
16
19
  WaterSystems:Gas
17
20
  InteriorEquipment:Gas
21
+ HeatRejection:Propane
22
+ Heating:Propane
23
+ WaterSystems:Propane
24
+ InteriorEquipment:Propane
25
+ HeatRejection:FuelOil#2
26
+ Heating:FuelOil#2
27
+ WaterSystems:FuelOil#2
28
+ InteriorEquipment:FuelOil#2
29
+ HeatRejection:OtherFuels
30
+ Heating:OtherFuels
31
+ WaterSystems:OtherFuels
32
+ InteriorEquipment:OtherFuels
18
33
  DistrictCooling:Facility
19
34
  DistrictHeating:Facility
20
35
  District Cooling Chilled Water Rate
@@ -263,69 +263,77 @@
263
263
  "end_date": {
264
264
  "$ref": "#/definitions/Date"
265
265
  },
266
- "total_site_energy": {
267
- "description": "Total energy used on site, does not include generation (kBtu)",
266
+ "total_site_energy_kwh": {
267
+ "description": "Total energy used on site, does not include generation (kWh)",
268
268
  "type": "number"
269
269
  },
270
- "total_source_energy": {
271
- "description": "Total source energy used, does not include generation (kBtu)",
270
+ "total_source_energy_kwh": {
271
+ "description": "Total source energy used, does not include generation (kWh)",
272
272
  "type": "number"
273
273
  },
274
- "net_site_energy": {
275
- "description": "Net site energy (kBtu)",
274
+ "net_site_energy_kwh": {
275
+ "description": "Net site energy (kWh)",
276
276
  "type": "number"
277
277
  },
278
- "net_source_energy": {
279
- "description": "Net source energy (kBtu)",
278
+ "net_source_energy_kwh": {
279
+ "description": "Net source energy (kWh)",
280
280
  "type": "number"
281
281
  },
282
- "total_utility_cost": {
283
- "description": "Total utility cost",
282
+ "total_utility_cost_dollar": {
283
+ "description": "Total utility cost ($)",
284
284
  "type": "number"
285
285
  },
286
- "net_utility_cost": {
287
- "description": "Net utility cost for reporting period includes generation",
286
+ "net_utility_cost_dollar": {
287
+ "description": "Net utility cost for reporting period includes generation ($)",
288
288
  "type": "number"
289
289
  },
290
- "utility_costs": {
290
+ "utility_costs_dollar": {
291
291
  "type": "array",
292
292
  "items": {
293
293
  "$ref": "#/definitions/UtilityCost"
294
294
  }
295
295
  },
296
- "electricity": {
296
+ "electricity_kwh": {
297
297
  "description": "Sum of all electricity used, does not include electricity produced (kWh)",
298
298
  "type": "number"
299
299
  },
300
- "natural_gas": {
301
- "description": "Sum of all natural gas end uses consumption (kBtu)",
300
+ "natural_gas_kwh": {
301
+ "description": "Sum of all natural gas end uses consumption (kWh)",
302
302
  "type": "number"
303
303
  },
304
- "additional_fuel": {
305
- "description": "Sum of all additional fuel end uses consumption (kBtu)",
304
+ "propane_kwh": {
305
+ "description": "Sum of all propane end uses consumption (kWh)",
306
+ "type": "number"
307
+ },
308
+ "fuel_oil_kwh": {
309
+ "description": "Sum of all fuel oil #2 end uses consumption (kWh)",
310
+ "type": "number"
311
+ },
312
+ "other_fuels_kwh": {
313
+ "description": "Sum of all other (fuel oil #1, diesel, gasoline, coal, steam) fuel end uses consumption (kWh)",
306
314
  "type": "number"
307
315
  },
308
- "district_cooling": {
309
- "description": "Sum of all distric cooling end uses consumption (kBtu)",
316
+ "district_cooling_kwh": {
317
+ "description": "Sum of all distric cooling end uses consumption (kWh)",
310
318
  "type": "number"
311
319
  },
312
- "district_heating": {
313
- "description": "Sum of all distric heating end uses consumption (kBtu)",
320
+ "district_heating_kwh": {
321
+ "description": "Sum of all distric heating end uses consumption (kWh)",
314
322
  "type": "number"
315
323
  },
316
- "water": {
324
+ "water_qbft": {
317
325
  "description": "Sum of all water end uses consumption (ft^3)",
318
326
  "type": "number"
319
327
  },
320
- "electricity_produced": {
328
+ "electricity_produced_kwh": {
321
329
  "description": "Sum of all electricity produced (kWh)",
322
330
  "type": "number"
323
331
  },
324
332
  "end_uses": {
325
333
  "$ref": "#/definitions/EndUses"
326
334
  },
327
- "energy_production": {
328
- "description": "Energy produced for reporting period. Electricity reported in kWh, water in m^3, all others in kBtu.",
335
+ "energy_production_kwh": {
336
+ "description": "Energy produced for reporting period. Water reported in m^3, all others in kWh.",
329
337
  "type": "object",
330
338
  "properties": {
331
339
  "electricity_produced": {
@@ -362,25 +370,31 @@
362
370
  "additionalProperties": false
363
371
  },
364
372
  "EndUses": {
365
- "description": "End uses for reporting period. Does not include energy produced. Electricity reported in kWh, water in m^3, all others in kBtu.",
373
+ "description": "End uses for reporting period. Does not include energy produced. Water reported in m^3, all others in kWh.",
366
374
  "type": "object",
367
375
  "properties": {
368
- "electricity": {
376
+ "electricity_kwh": {
369
377
  "$ref": "#/definitions/EndUse"
370
378
  },
371
- "natural_gas": {
379
+ "natural_gas_kwh": {
372
380
  "$ref": "#/definitions/EndUse"
373
381
  },
374
- "additional_fuel": {
382
+ "propane_kwh": {
383
+ "$ref": "#/definitions/EndUse"
384
+ },
385
+ "fuel_oil_kwh": {
386
+ "$ref": "#/definitions/EndUse"
387
+ },
388
+ "other_fuels_kwh": {
375
389
  "$ref": "#/definitions/EndUse"
376
390
  },
377
- "district_cooling": {
391
+ "district_cooling_kwh": {
378
392
  "$ref": "#/definitions/EndUse"
379
393
  },
380
- "district_heating": {
394
+ "district_heating_kwh": {
381
395
  "$ref": "#/definitions/EndUse"
382
396
  },
383
- "water": {
397
+ "water_qbft": {
384
398
  "$ref": "#/definitions/EndUse"
385
399
  }
386
400
  },
@@ -522,9 +536,11 @@
522
536
  "enum": [
523
537
  "Electricity",
524
538
  "Natural Gas",
539
+ "Propane",
540
+ "Fuel Oil",
525
541
  "District Cooling",
526
542
  "District Heating",
527
- "Additional Fuel",
543
+ "Other Fuels",
528
544
  "Water"
529
545
  ]
530
546
  },
@@ -546,15 +562,15 @@
546
562
  "Location": {
547
563
  "type": "object",
548
564
  "properties": {
549
- "latitude": {
565
+ "latitude_deg": {
550
566
  "description": "latitude for the centroid of the feature (deg)",
551
567
  "type": "number"
552
568
  },
553
- "longitude": {
569
+ "longitude_deg": {
554
570
  "description": "longitude for the centroid of the feature (deg)",
555
571
  "type": "number"
556
572
  },
557
- "surface_elevation": {
573
+ "surface_elevation_ft": {
558
574
  "description": "The surface elevation (above NAVD88 datum) (ft).",
559
575
  "type": "number"
560
576
  },
@@ -573,27 +589,27 @@
573
589
  "Program": {
574
590
  "type": "object",
575
591
  "properties": {
576
- "site_area": {
592
+ "site_area_sqft": {
577
593
  "description": "Area of the entire site or lot (ft^2)",
578
594
  "type": "number"
579
595
  },
580
- "floor_area": {
596
+ "floor_area_sqft": {
581
597
  "description": "Building gross floor area (ft^2)",
582
598
  "type": "number"
583
599
  },
584
- "conditioned_area": {
600
+ "conditioned_area_sqft": {
585
601
  "description": "Building conditioned floor area (ft^2)",
586
602
  "type": "number"
587
603
  },
588
- "unconditioned_area": {
604
+ "unconditioned_area_sqft": {
589
605
  "description": "Building unconditioned floor area (ft^2)",
590
606
  "type": "number"
591
607
  },
592
- "footprint_area": {
608
+ "footprint_area_sqft": {
593
609
  "description": "Building floorprint area (ft^2)",
594
610
  "type": "number"
595
611
  },
596
- "maximum_roof_height": {
612
+ "maximum_roof_height_ft": {
597
613
  "description": "Maximum height of the roof relative to surface elevation (ft)",
598
614
  "type": "number"
599
615
  },
@@ -605,7 +621,7 @@
605
621
  "description": "The maximum number of building stories above ground",
606
622
  "type": "number"
607
623
  },
608
- "parking_area": {
624
+ "parking_area_sqft": {
609
625
  "description": "Parking gross area (ft^2)",
610
626
  "type": "number"
611
627
  },
@@ -617,11 +633,11 @@
617
633
  "description": "Number of parking spaces with electric vehicle charging",
618
634
  "type": "number"
619
635
  },
620
- "parking_footprint_area": {
636
+ "parking_footprint_area_sqft": {
621
637
  "description": "Parking floorprint area (ft^2)",
622
638
  "type": "number"
623
639
  },
624
- "maximum_parking_height": {
640
+ "maximum_parking_height_ft": {
625
641
  "description": "Maximum height of the parking structure relative to surface elevation (ft)",
626
642
  "type": "number"
627
643
  },
@@ -643,84 +659,84 @@
643
659
  "$ref": "#/definitions/BuildingType"
644
660
  }
645
661
  },
646
- "window_area": {
662
+ "window_area_sqft": {
647
663
  "description": "Exterior windows gross area (ft^2)",
648
664
  "type": "object",
649
665
  "properties": {
650
- "north_window_area": {
666
+ "north_window_area_sqft": {
651
667
  "type": "number"
652
668
  },
653
- "south_window_area": {
669
+ "south_window_area_sqft": {
654
670
  "type": "number"
655
671
  },
656
- "east_window_area": {
672
+ "east_window_area_sqft": {
657
673
  "type": "number"
658
674
  },
659
- "west_window_area": {
675
+ "west_window_area_sqft": {
660
676
  "type": "number"
661
677
  },
662
- "total_window_area": {
678
+ "total_window_area_sqft": {
663
679
  "type": "number"
664
680
  }
665
681
  },
666
682
  "required": [
667
- "total_window_area"
683
+ "total_window_area_sqft"
668
684
  ],
669
685
  "additionalProperties": false
670
686
  },
671
- "wall_area": {
687
+ "wall_area_sqft": {
672
688
  "description": "exterior walls gross area (ft^2)",
673
689
  "type": "object",
674
690
  "properties": {
675
- "north_wall_area": {
691
+ "north_wall_area_sqft": {
676
692
  "type": "number"
677
693
  },
678
- "south_wall_area": {
694
+ "south_wall_area_sqft": {
679
695
  "type": "number"
680
696
  },
681
- "east_wall_area": {
697
+ "east_wall_area_sqft": {
682
698
  "type": "number"
683
699
  },
684
- "west_wall_area": {
700
+ "west_wall_area_sqft": {
685
701
  "type": "number"
686
702
  },
687
- "total_wall_area": {
703
+ "total_wall_area_sqft": {
688
704
  "type": "number"
689
705
  }
690
706
  },
691
707
  "required": [
692
- "north_wall_area",
693
- "south_wall_area",
694
- "east_wall_area",
695
- "west_wall_area",
696
- "total_wall_area"
708
+ "north_wall_area_sqft",
709
+ "south_wall_area_sqft",
710
+ "east_wall_area_sqft",
711
+ "west_wall_area_sqft",
712
+ "total_wall_area_sqft"
697
713
  ],
698
714
  "additionalProperties": false
699
715
  },
700
- "roof_area": {
716
+ "roof_area_sqft": {
701
717
  "type": "object",
702
718
  "properties": {
703
- "equipment_roof_area": {
719
+ "equipment_roof_area_sqft": {
704
720
  "type": "number"
705
721
  },
706
- "photovoltaic_roof_area": {
722
+ "photovoltaic_roof_area_sqft": {
707
723
  "type": "number"
708
724
  },
709
- "available_roof_area": {
725
+ "available_roof_area_sqft": {
710
726
  "description": "gross roof area (ft^2)",
711
727
  "type": "number"
712
728
  },
713
- "total_roof_area": {
729
+ "total_roof_area_sqft": {
714
730
  "description": "Exterior roofs gross area (ft^2)",
715
731
  "type": "number"
716
732
  }
717
733
  },
718
734
  "required": [
719
- "total_roof_area"
735
+ "total_roof_area_sqft"
720
736
  ],
721
737
  "additionalProperties": false
722
738
  },
723
- "orientation": {
739
+ "orientation_deg": {
724
740
  "description": "Rotation of longest axis from East-West,about up axis (deg)",
725
741
  "type": "number"
726
742
  },
@@ -728,22 +744,22 @@
728
744
  "description": "Ratio of longest to shortest axis",
729
745
  "type": "number"
730
746
  },
731
- "total_construction_cost": {
747
+ "total_construction_cost_dollar": {
732
748
  "description": "total construction cost calculated from the defined cost per floor area ($)",
733
749
  "type": "number"
734
750
  }
735
751
  },
736
752
  "required": [
737
- "floor_area",
738
- "conditioned_area",
739
- "unconditioned_area",
740
- "footprint_area",
741
- "maximum_roof_height",
753
+ "floor_area_sqft",
754
+ "conditioned_area_sqft",
755
+ "unconditioned_area_sqft",
756
+ "footprint_area_sqft",
757
+ "maximum_roof_height_ft",
742
758
  "number_of_residential_units",
743
759
  "building_types",
744
- "window_area",
745
- "wall_area",
746
- "roof_area"
760
+ "window_area_sqft",
761
+ "wall_area_sqft",
762
+ "roof_area_sqft"
747
763
  ],
748
764
  "additionalProperties": false
749
765
  },
@@ -873,4 +889,4 @@
873
889
  }
874
890
  }
875
891
  }
876
- }
892
+ }
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt (tm), Copyright (c) 2019-2020, 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,
@@ -61,7 +61,7 @@ module URBANopt
61
61
  @@schema ||= @@validator.schema
62
62
 
63
63
  # initialize @@logger
64
- @@logger ||= URBANopt::Scenario::DefaultReports.logger
64
+ @@logger ||= URBANopt::Reporting::DefaultReports.logger
65
65
  end
66
66
 
67
67
  ##
@@ -1,5 +1,5 @@
1
1
  # *********************************************************************************
2
- # URBANopt, Copyright (c) 2019-2020, Alliance for Sustainable Energy, LLC, and other
2
+ # URBANopt (tm), Copyright (c) 2019-2020, 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,
@@ -66,7 +66,7 @@ module URBANopt
66
66
  @@schema ||= @@validator.schema
67
67
 
68
68
  # initialize @@logger
69
- @@logger ||= URBANopt::Scenario::DefaultReports.logger
69
+ @@logger ||= URBANopt::Reporting::DefaultReports.logger
70
70
  end
71
71
 
72
72
  ##