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

Coil:Heating:*: on and off cycle name changes #4970

Merged
merged 19 commits into from Sep 20, 2023
Merged

Conversation

joseph-robertson
Copy link
Collaborator

Pull request overview

  • "Parasitic Electric Load" -> "On Cycle Parasitic Electric Load":
    • Coil:Heating:Gas
    • Coil:Heating:Gas:MultiStage
    • Coil:Heating:Desuperheater
  • "Parasitic Gas Load" -> "Off Cycle Parasitic Gas Load":
    • Coil:Heating:Gas
    • Coil:Heating:Gas:MultiStage

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

@joseph-robertson joseph-robertson added Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. IDDChange labels Sep 18, 2023
@joseph-robertson joseph-robertson self-assigned this Sep 18, 2023
@joseph-robertson joseph-robertson mentioned this pull request Sep 18, 2023
26 tasks
src/model/CoilHeatingGasMultiStage_Impl.hpp Outdated Show resolved Hide resolved
src/model/CoilHeatingGas.hpp Show resolved Hide resolved
src/model/CoilHeatingGas.cpp Show resolved Hide resolved
src/osversion/test/VersionTranslator_GTest.cpp Outdated Show resolved Hide resolved
src/model/CoilHeatingGasMultiStageStageData_Impl.hpp Outdated Show resolved Hide resolved
src/osversion/VersionTranslator.cpp Outdated Show resolved Hide resolved
Comment on lines 8312 to 8325
// Change Parasitic Electric Load to On Cycle Parasitic Electric Load
// Change Parasitic Gas Load to Off Cycle Parasitic Gas Load

auto iddObject = idd_3_7_0.getObject(iddname);
IdfObject newObject(iddObject.get());

for (size_t i = 0; i < object.numFields(); ++i) {
if ((value = object.getString(i))) {
newObject.setString(i, value.get());
}
}

m_refactored.push_back(RefactoredObjectData(object, newObject));
ss << newObject;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think you need VT at all actually. The VT Test, good, we want to make sure.

But this is nothing but a name change, the fields stay the same. Try removing VT and check the test.

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 thought about that... but if we weren't changing them in the cpp get/set methods, so then how would the field names be changing because of default vt?

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 tried commenting out the new vt. And all tests seems to pass. So I'm pretty confused - default vt is or isn't changing the names of the fields?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Alright, so, if you do nothing, the object is serialized as is.

Then the stringstream is reloaded with the 3.7.0 IDD. The IddObject is just gotten by its name, and the field values go to the idf object (no issue there),. The IddObject is the the bit that carries the field names (and field properties). And that's gotten from the new idd, so the field names are "updated".

Let me know if this isn't clear (I fear it isn't, but I'm aiming for quickness here).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So, before, model tests were passing (even before changing in model cpp from, e.g., OS_Coil_Heating_GasFields::ParasiticElectricLoad to OS_Coil_Heating_GasFields::OnCycleParasiticElectricLoad) because was using old idd. Now it's using new idd, and vt serializes to it by default.

src/osversion/VersionTranslator.cpp Outdated Show resolved Hide resolved
src/osversion/test/VersionTranslator_GTest.cpp Outdated Show resolved Hide resolved
@jmarrec
Copy link
Collaborator

jmarrec commented Sep 20, 2023

Ok, don't worry about the failing SQLtests, I fixed those on #4972

@jmarrec jmarrec marked this pull request as ready for review September 20, 2023 09:57
@jmarrec jmarrec merged commit c3a9fb2 into v23.2.0-IOFreeze Sep 20, 2023
0 of 4 checks passed
@jmarrec jmarrec deleted the parasitic-load branch September 20, 2023 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IDDChange Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants