Skip to content

Conversation

@jmarrec
Copy link
Collaborator

@jmarrec jmarrec commented May 27, 2025

Pull request overview

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

jmarrec added 2 commits May 27, 2025 09:58
```
Note: Google Test filter = ModelFixture.ControllerMechanicalVentilation_SystemOutdoorAirMethod
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from ModelFixture
[ RUN      ] ModelFixture.ControllerMechanicalVentilation_SystemOutdoorAirMethod
/media/DataExt4/Software/Others/OpenStudio3/src/model/test/ControllerMechanicalVentilation_GTest.cpp:64: Failure
Expected equality of these values:
  "Standard62.1VentilationRateProcedure"
  controller_mv.systemOutdoorAirMethod()
    Which is: "Standard62.1SimplifiedProcedure"

[  FAILED  ] ModelFixture.ControllerMechanicalVentilation_SystemOutdoorAirMethod (8 ms)
[----------] 1 test from ModelFixture (8 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (9 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] ModelFixture.ControllerMechanicalVentilation_SystemOutdoorAirMethod

```
…gSystem's OA Method if not common option
@jmarrec jmarrec self-assigned this May 27, 2025
@jmarrec jmarrec added severity - Minor Bug component - HVAC component - Model Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. labels May 27, 2025
Comment on lines +61 to +64
// System Outdoor Air Method is NOT common to both ControllerMechanicalVentilation and SizingSystem
EXPECT_TRUE(sz.setSystemOutdoorAirMethod("Standard62.1SimplifiedProcedure"));
EXPECT_TRUE(controller_mv.isSystemOutdoorAirMethodDefaulted());
EXPECT_EQ("Standard62.1VentilationRateProcedure", controller_mv.systemOutdoorAirMethod());
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Before fix

[ RUN      ] ModelFixture.ControllerMechanicalVentilation_SystemOutdoorAirMethod
/media/DataExt4/Software/Others/OpenStudio3/src/model/test/ControllerMechanicalVentilation_GTest.cpp:64: Failure
Expected equality of these values:
  "Standard62.1VentilationRateProcedure"
  controller_mv.systemOutdoorAirMethod()
    Which is: "Standard62.1SimplifiedProcedure"

Comment on lines +112 to +118
const auto sizingSystemOAMethod = airLoop->sizingSystem().systemOutdoorAirMethod();
const auto possible_vals = systemOutdoorAirMethodValues();
if (std::find_if(possible_vals.cbegin(), possible_vals.cend(),
[&sizingSystemOAMethod](const std::string& val) { return openstudio::istringEqual(val, sizingSystemOAMethod); })
!= possible_vals.cend()) {
result = sizingSystemOAMethod;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Simple fix: do not inherit the SizingSystem's System Outdoor Air Method value if this option isn't one available in Controller:MV.

image

@jmarrec jmarrec merged commit a083969 into develop May 27, 2025
2 of 6 checks passed
@jmarrec jmarrec deleted the 5397_SystemOutdoorAirMethod branch May 27, 2025 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component - HVAC component - Model Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. severity - Minor Bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ControllerMechanicalVentilation.systemOutdoorAirMethod = SizingSystem.systemOutdoorAirMethod causing fatal error

3 participants