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

EnergyPlus v24.2.0: add model and FT tests #5265

Merged
merged 16 commits into from
Oct 3, 2024

Conversation

joseph-robertson
Copy link
Collaborator

@joseph-robertson joseph-robertson commented Oct 3, 2024

Pull request overview

Checklist:

  • Model
    • SizingZone
    • ChillerElectricEIR
    • ChillerElectricReformulatedEIR
    • Site
  • FT
    • SizingZone
    • ChillerElectricEIR
    • ChillerElectricReformulatedEIR
    • Site

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 the Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. label Oct 3, 2024
@joseph-robertson joseph-robertson self-assigned this Oct 3, 2024
@joseph-robertson joseph-robertson mentioned this pull request Oct 3, 2024
19 tasks
joseph-robertson and others added 4 commits October 3, 2024 12:13
Add Getters/Setters and fuelTypes test for the CHillers (they didn't have one), remove harcoding in Ctor when the IDD has a default with the same value. Implement a missing validXXXValues method for the Reformulated one
@jmarrec jmarrec self-assigned this Oct 3, 2024
@ci-commercialbuildings
Copy link
Collaborator

ci-commercialbuildings commented Oct 3, 2024

CI Results for 1fb339a:

@joseph-robertson joseph-robertson marked this pull request as ready for review October 3, 2024 18:19
@joseph-robertson joseph-robertson merged commit a984d95 into v24.2.0-IOFreeze Oct 3, 2024
0 of 4 checks passed
@joseph-robertson joseph-robertson deleted the v24.2.0-tests branch October 3, 2024 18:20
@@ -49,6 +49,6 @@ TEST_F(EnergyPlusFixture, ForwardTranslator_Site) {
EXPECT_EQ(0.0, idf_site.getDouble(Site_LocationFields::Longitude).get());
EXPECT_EQ(0.0, idf_site.getDouble(Site_LocationFields::TimeZone).get());
EXPECT_EQ(0.0, idf_site.getDouble(Site_LocationFields::Elevation).get());
EXPECT_EQ("Suburbs", idf_site.getString(Site_LocationFields::Terrain).get());
// EXPECT_EQ("Suburbs", idf_site.getString(Site_LocationFields::Terrain).get()); not in FT
Copy link
Collaborator

Choose a reason for hiding this comment

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

Terrain is on the Building Objects, should test for that

Copy link
Collaborator

Choose a reason for hiding this comment

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

The comment here is confusing.

But at least this is already tested here:

Building building = model.getUniqueModelObject<Building>();
building.setName("Building");
building.setNorthAxis(20);
building.setNominalFloortoFloorHeight(5);
Site site = model.getUniqueModelObject<Site>();
site.setTerrain("Ocean");
auto simulationControl = model.getUniqueModelObject<SimulationControl>();
simulationControl.setLoadsConvergenceToleranceValue(0.2);
simulationControl.setTemperatureConvergenceToleranceValue(0.2);
simulationControl.setSolarDistribution("FullInteriorAndExteriorWithReflections");
simulationControl.setMaximumNumberofWarmupDays(2);
ForwardTranslator forwardTranslator;
Workspace workspace = forwardTranslator.translateModel(model);
ASSERT_EQ(1u, workspace.getObjectsByType(IddObjectType::Building).size());
ASSERT_EQ(1u, workspace.getObjectsByType(IddObjectType::Site_Location).size());
ASSERT_EQ(1u, workspace.getObjectsByType(IddObjectType::SimulationControl).size());
WorkspaceObject object = workspace.getObjectsByType(IddObjectType::Building)[0];
ASSERT_TRUE(object.getString(BuildingFields::Name));
EXPECT_EQ("Building", object.getString(BuildingFields::Name).get());
ASSERT_TRUE(object.getDouble(BuildingFields::NorthAxis));
EXPECT_EQ(20, object.getDouble(BuildingFields::NorthAxis).get());
ASSERT_TRUE(object.getString(BuildingFields::Terrain));
EXPECT_EQ("Ocean", object.getString(BuildingFields::Terrain).get());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3 participants