-
Notifications
You must be signed in to change notification settings - Fork 425
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
Conversation
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)]; |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love that.
TEST_F(SQLiteFixture, OutputReportTabular_DistrictHeating) | ||
{ | ||
// Test for #10190 - District Heating Steam is empty | ||
state->dataSQLiteProcedures->sqlite->createSQLiteSimulationsRecord(1, "EnergyPlus Version", "Current Time"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit test
There was a problem hiding this 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)]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love that.
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 ! |
Yep, everything is happy. If this still needs anything else, we can address it later, but I'm merging this now. Thanks @jmarrec |
The MCVE uses two objects, one steam one water, with the same inputs. |
👍 |
Pull request overview
Pull Request Author
Add to this list or remove from it as applicable. This is a simple templated set of guidelines.
Reviewer
This will not be exhaustively relevant to every PR.