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 #4096 - RT error for ZoneControlThermostat #4097

Merged
merged 4 commits into from
Sep 29, 2020
Merged

Conversation

jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented Sep 28, 2020

Pull request overview

ZoneControl:Thermostat,
  Thermal Zone 1 Thermostat,              !- Name
  Thermal Zone 1,                         !- Zone or ZoneList Name
  Thermal Zone 1 Thermostat Schedule,     !- Control Type Schedule Name
  ThermostatSetpoint:DualSetpoint,        !- Control 1 Object Type
  Thermostat Setpoint Dual Setpoint 1,    !- Control 1 Name
+  ,                                       !- Control 2 Object Type  <=== Need to properly handle a blank field here
  ,                                       !- Control 2 Name
  ,                                       !- Control 3 Object Type
  ,                                       !- Control 3 Name
  ,                                       !- Control 4 Object Type
  ,                                       !- Control 4 Name
+  0;                                      !- Temperature Difference Between Cutout And Setpoint {deltaC}     <=== because of this numeric field

Pull Request Author

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

  • 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)
  • Checked behavior in OpenStudioApplication, adjusted policies as needed (src/openstudio_lib/library/OpenStudioPolicy.xml)
  • 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

@jmarrec jmarrec added severity - Normal Bug component - IDF Translation Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. labels Sep 28, 2020
@jmarrec jmarrec self-assigned this Sep 28, 2020
There is a numeric field after the Groups 1-4, so handle blanks correctly.
@jmarrec
Copy link
Collaborator Author

jmarrec commented Sep 29, 2020

520f146 has just the unit test, whcih throws:

Stacktrace
Running main() from gmock_main.cc
Note: Google Test filter = EnergyPlusFixture.ReverseTranslator_ZoneControlThermostat
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from EnergyPlusFixture
[ RUN      ] EnergyPlusFixture.ReverseTranslator_ZoneControlThermostat
/Users/jenkins/git/OpenStudioIncremental/develop/src/energyplus/Test/ThermalZone_GTest.cpp:862: Failure
Expected: rt.translateWorkspace(w) doesn't throw an exception.
  Actual: it throws.
[  FAILED  ] EnergyPlusFixture.ReverseTranslator_ZoneControlThermostat (10 ms)
[----------] 1 test from EnergyPlusFixture (10 ms total)
[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (11 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] EnergyPlusFixture.ReverseTranslator_ZoneControlThermostat

The 3f49e17 fixes it:

image

@jmarrec jmarrec requested a review from tijcolem September 29, 2020 08:18
@jmarrec jmarrec added this to the OpenStudio SDK 3.1.0 milestone Sep 29, 2020
@jmarrec jmarrec removed the Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. label Sep 29, 2020
@jmarrec
Copy link
Collaborator Author

jmarrec commented Sep 29, 2020

Removed "Pull Request - Ready for CI" label since it'll be built in #4100

@tijcolem tijcolem merged commit a715ab8 into develop Sep 29, 2020
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.

Round trip forward and reverse translation issue. 3.1.0 upgrade issues
3 participants