Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #5101 - Update monthly reports for DistrictHeatingWater #5106

Merged
merged 3 commits into from
Apr 9, 2024

Conversation

jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented Mar 12, 2024

Pull request overview

  • Note for the name of the Output:Table:Monthly: AFAIK, this is OpenStudio::EndUseFuelType::valueDescription that is used by reporting measures so I made the change as well, perhaps some of them harcoded it to "District Heating", I'm not sure
  • Electricity Peak Demand was missing Refrigeration EUT

To see the actual changes to the Output:Table:Monthly, just look at 8d3ff63?file-filters%5B%5D=.hpp&show-viewed-files=true

Pull Request Author

  • Model API Changes / Additions
  • Any new or modified fields have been implemented in the EnergyPlus ForwardTranslator (and ReverseTranslator as appropriate)
  • Model API methods are tested (in src/model/test)
  • EnergyPlus ForwardTranslator Tests (in src/energyplus/Test)
  • If a new object or method, added a test in NREL/OpenStudio-resources: Add Link
  • If needed, added VersionTranslation rules for the objects (src/osversion/VersionTranslator.cpp)
  • Verified that C# bindings built fine on Windows, partial classes used as needed, etc.
  • All new and existing tests passes
  • If methods have been deprecated, update rest of code to use the new methods

Labels:

  • If change to an IDD file, add the label IDDChange
  • If breaking existing API, add the label APIChange
  • If deemed ready, add label Pull Request - Ready for CI so that CI builds your PR

Review Checklist

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • Code Style, strip trailing whitespace, etc.
  • All related changes have been implemented: model changes, model tests, FT changes, FT tests, VersionTranslation, OS App
  • Labeling is ok
  • If defect, verify by running develop branch and reproducing defect, then running PR and reproducing fix
  • If feature, test running new feature, try creative ways to break it
  • CI status: all green or justified

Test logically fails

```
Note: Google Test filter = *RunPreProcessMonthlyReports*
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from WorkflowFixture
[ RUN      ] WorkflowFixture.RunPreProcessMonthlyReports
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:96: Failure
Value of: false
  Actual: false
Expected: true
District Heating is not a valid EndUseFuelType
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "InteriorLights"
  meterName
    Which is: "InteriorLights:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group InteriorLights:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group InteriorLights:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "ExteriorLights"
  meterName
    Which is: "ExteriorLights:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group ExteriorLights:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group ExteriorLights:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "InteriorEquipment"
  meterName
    Which is: "InteriorEquipment:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group InteriorEquipment:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group InteriorEquipment:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "ExteriorEquipment"
  meterName
    Which is: "ExteriorEquipment:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group ExteriorEquipment:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group ExteriorEquipment:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "Fans"
  meterName
    Which is: "Fans:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Fans:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Fans:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "Pumps"
  meterName
    Which is: "Pumps:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Pumps:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Pumps:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "Heating"
  meterName
    Which is: "Heating:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Heating:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Heating:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "Cooling"
  meterName
    Which is: "Cooling:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Cooling:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Cooling:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "HeatRejection"
  meterName
    Which is: "HeatRejection:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group HeatRejection:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group HeatRejection:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "Humidifier"
  meterName
    Which is: "Humidifier:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Humidifier:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Humidifier:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "HeatRecovery"
  meterName
    Which is: "HeatRecovery:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group HeatRecovery:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group HeatRecovery:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "WaterSystems"
  meterName
    Which is: "WaterSystems:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group WaterSystems:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group WaterSystems:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "Cogeneration"
  meterName
    Which is: "Cogeneration:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Cogeneration:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Cogeneration:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:96: Failure
Value of: false
  Actual: false
Expected: true
District Heating is not a valid EndUseFuelType
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "Heating"
  meterName
    Which is: "DistrictHeating:Facility"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group DistrictHeating:Facility
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:117: Failure
Value of: eut
  Actual: true
Expected: false
EndUseType should not be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group DistrictHeating:Facility
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:118: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group DistrictHeating:Facility
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "InteriorLights"
  meterName
    Which is: "InteriorLights:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group InteriorLights:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group InteriorLights:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "ExteriorLights"
  meterName
    Which is: "ExteriorLights:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group ExteriorLights:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group ExteriorLights:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "InteriorEquipment"
  meterName
    Which is: "InteriorEquipment:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group InteriorEquipment:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group InteriorEquipment:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "ExteriorEquipment"
  meterName
    Which is: "ExteriorEquipment:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group ExteriorEquipment:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group ExteriorEquipment:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "Fans"
  meterName
    Which is: "Fans:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Fans:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Fans:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "Pumps"
  meterName
    Which is: "Pumps:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Pumps:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Pumps:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "Heating"
  meterName
    Which is: "Heating:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Heating:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Heating:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "Cooling"
  meterName
    Which is: "Cooling:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Cooling:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Cooling:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "HeatRejection"
  meterName
    Which is: "HeatRejection:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group HeatRejection:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group HeatRejection:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "Humidifier"
  meterName
    Which is: "Humidifier:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Humidifier:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Humidifier:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "HeatRecovery"
  meterName
    Which is: "HeatRecovery:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group HeatRecovery:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group HeatRecovery:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "WaterSystems"
  meterName
    Which is: "WaterSystems:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group WaterSystems:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group WaterSystems:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:113: Failure
Expected equality of these values:
  reconstructedMeterName
    Which is: "Cogeneration"
  meterName
    Which is: "Cogeneration:DistrictHeating"
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Cogeneration:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:129: Failure
Value of: ft
  Actual: false
Expected: true
FuelType should be present
Google Test trace:
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:104: Processing extensible group Cogeneration:DistrictHeating
/home/julien/Software/Others/OpenStudio/src/workflow/test/RunPreProcessMonthlyReports_GTest.cpp:75: Processing Building Energy Performance - District Heating Peak Demand
========================================
```
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This openstudio script will directly generate RunPreprocessMonthlyReports.hpp
and can also save the OpenStudio-workflow-gem/lib/openstudio/workflow/jobs/resources/monthly_report.idf directly (yes, we do have these in both the legacy ruby workflow and the C++ workflow.)

Comment on lines +23 to +137
result = openstudio::EndUseType(std::string(matches[2].first, matches[2].second));
}
}

return result;
};

auto fuelType = [&meterRegex](const std::string& name) -> boost::optional<openstudio::FuelType> {
boost::optional<openstudio::FuelType> result;
boost::smatch matches;
if (boost::regex_search(name, matches, meterRegex)) {
if (matches[3].matched) {
result = openstudio::FuelType(std::string(matches[3].first, matches[3].second));
}
}

return result;
};

auto installLocationType = [&meterRegex](const std::string& name) -> boost::optional<openstudio::InstallLocationType> {
boost::optional<openstudio::InstallLocationType> result;
boost::smatch matches;
if (boost::regex_search(name, matches, meterRegex)) {
if (matches[4].matched) {
result = openstudio::InstallLocationType(std::string(matches[4].first, matches[4].second));
}
}

return result;
};

for (auto meter : c_monthlyReports) {
auto idfObject_ = openstudio::IdfObject::load(std::string{meter});

ASSERT_TRUE(idfObject_);
auto idfObject = std::move(*idfObject_);
auto name = idfObject.nameString();
SCOPED_TRACE("Processing " + name + "\n========================================");
const auto n = name.find(" - ");
auto tableFuelType = name.substr(n + 3);

EXPECT_NE(n, std::string::npos);
auto prefix = name.substr(0, n);
EXPECT_EQ(expectedPrefix, prefix);

auto demandN = tableFuelType.find(peakDemandSuffix);
bool isDemand = false;
if (demandN != std::string::npos) {
isDemand = true;
++n_demand;
tableFuelType = tableFuelType.substr(0, tableFuelType.size() - peakDemandSuffix.size());
} else {
++n_regular;
}
try {
auto tableEUFT = openstudio::EndUseFuelType(tableFuelType);
EXPECT_EQ(tableFuelType, tableEUFT.valueDescription());
} catch (...) {
EXPECT_TRUE(false) << tableFuelType << " is not a valid EndUseFuelType";
}

EXPECT_EQ(2, idfObject.getInt(1).get());
const std::string aggregrationType = isDemand ? "ValueWhenMaximumOrMinimum" : "SumOrAverage";
bool is_first = true;
for (const auto& eg : idfObject.extensibleGroups()) {
const auto meterName = eg.getString(0).get();
SCOPED_TRACE("Processing extensible group " + meterName);

const auto eut = endUseType(meterName);
const auto ft = fuelType(meterName);
const auto loc = installLocationType(meterName);

const auto reconstructedMeterName = openstudio::model::OutputMeter::getName(boost::none, eut, ft, loc, boost::none);

// This is the definitive test
EXPECT_EQ(reconstructedMeterName, meterName);

if (isDemand && is_first) {
// Electricity:Facility : Maximum
EXPECT_FALSE(eut) << "EndUseType should not be present";
EXPECT_TRUE(ft) << "FuelType should be present";
ASSERT_TRUE(loc) << "InstallLocationType should be present";
EXPECT_EQ("Facility", loc->valueName());

EXPECT_EQ("Maximum", eg.getString(1).get());

is_first = false;
continue;
}

EXPECT_TRUE(eut) << "EndUseType should be present";
EXPECT_TRUE(ft) << "FuelType should be present";
EXPECT_FALSE(loc) << "InstallLocationType should not be present";

EXPECT_EQ(aggregrationType, eg.getString(1).get());
}
}

EXPECT_EQ(n_regular, n_demand);
EXPECT_EQ(4, n_regular);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annoying to write in C++, but this test will ensure that this doesn't happen again.

Cogeneration:DistrictHeating,!- Variable or Meter 13 Name
SumOrAverage; !- Aggregation Type for Variable or Meter 13)idf",
Output:Table:Monthly,
Building Energy Performance - District Heating Water, !- Name
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed the table here. I think it's right, but would welcome comments from @DavidGoldwasser in particular

as indicated in the OP: AFAIK, this is OpenStudio::EndUseFuelType::valueDescription that is used by reporting measures so I made the change as well, perhaps some of them harcoded it to "District Heating", I'm not sure

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added @joseph-robertson on to review of this PR as well

Output:Table:Monthly,
Building Energy Performance - District Heating Water, !- Name
2, !- Digits After Decimal
InteriorLights:DistrictHeatingWater, !- Variable or Meter Name 1
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meter name is renamed to DistrictHeatingWater

Comment on lines +159 to +160
Refrigeration:Electricity, !- Variable or Meter Name 15
ValueWhenMaximumOrMinimum; !- Aggregation Type for Variable or Meter 15
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refrigeration Was missing from Electricity Peak, I think that was a mistake, and it IS present in the Electricity report (energy)

Comment on lines +183 to +188
Building Energy Performance - District Heating Water Peak Demand, !- Name
2, !- Digits After Decimal
DistrictHeatingWater:Facility, !- Variable or Meter Name 1
Maximum, !- Aggregation Type for Variable or Meter 1
InteriorLights:DistrictHeatingWater, !- Variable or Meter Name 2
ValueWhenMaximumOrMinimum, !- Aggregation Type for Variable or Meter 2
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same meter rename for the peak one

"Output:Meter:MeterFileOnly,NaturalGas:Facility,Daily;",
"Output:Meter:MeterFileOnly,Electricity:Facility,Timestep;",
"Output:Meter:MeterFileOnly,Electricity:Facility,Daily;",

// Always add in the timestep facility meters
"Output:Meter,Electricity:Facility,Timestep;",
"Output:Meter,NaturalGas:Facility,Timestep;",
"Output:Meter,DistrictHeatingWater:Facility,Timestep;",
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And it's needed in meters forced too.

Copy link
Collaborator

@joseph-robertson joseph-robertson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New script for generating RunPreprocessMonthlyReports.hpp 👍
New workflow tests for preventing future breaks 👍
Add missing Refrigeration:Electricity to Electricity Peak Demand 👍
Leaving it up to @DavidGoldwasser to comment on use of OpenStudio::EndUseFuelType::valueDescription in reporting measures.

@joseph-robertson joseph-robertson added this to the OpenStudio SDK 3.8.0 milestone Apr 2, 2024
@kbenne kbenne merged commit e1005ff into develop Apr 9, 2024
2 checks passed
@kbenne kbenne deleted the 5101_PreProcess_MonthlyTables branch April 9, 2024 14:31
@DavidGoldwasser
Copy link
Collaborator

I think reporting measure will be fine, but if a it breaks there I can make update before we release update to measures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DistrictHeating meter is renamed to DistrictHeatingWater
4 participants