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 #10190 - Zero DistrictHeatingStream reported in ABUPS #10212

Merged
merged 3 commits into from
Sep 13, 2023

Conversation

jmarrec
Copy link
Contributor

@jmarrec jmarrec commented Sep 8, 2023

Pull request overview

Pull Request Author

Add to this list or remove from it as applicable. This is a simple templated set of guidelines.

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

This will not be exhaustively relevant to every PR.

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • 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
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

@jmarrec jmarrec added the Defect Includes code to repair a defect in EnergyPlus label Sep 8, 2023
@jmarrec jmarrec requested a review from Myoldmopar September 8, 2023 14:31
@jmarrec jmarrec self-assigned this Sep 8, 2023
@dareumnam
Copy link
Collaborator

Thanks so much for the quick fix! @jmarrec

ort->resourceTypeNames(2) = Constant::eResourceNames[static_cast<int>(Constant::eResource::NaturalGas)];
ort->resourceTypeNames(3) = Constant::eResourceNames[static_cast<int>(Constant::eResource::DistrictCooling)];
ort->resourceTypeNames(4) = Constant::eResourceNames[static_cast<int>(Constant::eResource::DistrictHeatingWater)];
ort->resourceTypeNames(5) = Constant::eResourceNames[static_cast<int>(Constant::eResource::DistrictHeatingSteam)];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rely on eResourceNames, to avoid typos

Copy link
Member

Choose a reason for hiding this comment

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

I love that.

Comment on lines +12590 to +12593
TEST_F(SQLiteFixture, OutputReportTabular_DistrictHeating)
{
// Test for #10190 - District Heating Steam is empty
state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Unit test

@jmarrec
Copy link
Contributor Author

jmarrec commented Sep 8, 2023

With MCVE on dev support:

Before fix

image

image

After fix

image

image

Copy link
Member

@Myoldmopar Myoldmopar left a comment

Choose a reason for hiding this comment

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

This is obviously a good step forward. It was a clear typo before, and now that we are relying on the built-in names, it will be much harder for a typo to sneak in. I do wonder if you intentionally put a typo in the PR name though, or if that's simply a bit of irony?

ort->resourceTypeNames(2) = Constant::eResourceNames[static_cast<int>(Constant::eResource::NaturalGas)];
ort->resourceTypeNames(3) = Constant::eResourceNames[static_cast<int>(Constant::eResource::DistrictCooling)];
ort->resourceTypeNames(4) = Constant::eResourceNames[static_cast<int>(Constant::eResource::DistrictHeatingWater)];
ort->resourceTypeNames(5) = Constant::eResourceNames[static_cast<int>(Constant::eResource::DistrictHeatingSteam)];
Copy link
Member

Choose a reason for hiding this comment

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

I love that.

@Myoldmopar
Copy link
Member

The MCVE is a bit funny that the steam and water energy are the same, and they add up? Is something being double counted? I may just be misunderstanding the MCVE. Anyway, I am not blaming anything on this PR, it was obviously a typo before and is now fixed. CI is completely happy, no issues or diffs. I'm going to test this out and merge if ready with develop pulled in.

Tahnks @jmarrec !

@Myoldmopar
Copy link
Member

Yep, everything is happy. If this still needs anything else, we can address it later, but I'm merging this now. Thanks @jmarrec

@Myoldmopar Myoldmopar merged commit 890e78a into develop Sep 13, 2023
@Myoldmopar Myoldmopar deleted the 10190_DistrictHeatingSteam_report branch September 13, 2023 16:25
@jmarrec
Copy link
Contributor Author

jmarrec commented Sep 14, 2023

The MCVE uses two objects, one steam one water, with the same inputs.

@Myoldmopar
Copy link
Member

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Includes code to repair a defect in EnergyPlus
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Zero DistrictHeatingSteam for ExteriorLightsAndEq.idf in eplusout.sql
9 participants