Skip to content

Conversation

@joseph-robertson
Copy link
Collaborator

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

@joseph-robertson joseph-robertson self-assigned this Jul 21, 2025
@joseph-robertson joseph-robertson added severity - Minor Bug component - Model Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. labels Jul 21, 2025
auto ghClone = gh.clone(m).cast<GroundHeatExchangerHorizontalTrench>();
EXPECT_EQ(2u, m.getConcreteModelObjects<GroundHeatExchangerHorizontalTrench>().size());
EXPECT_EQ(1u, m.getConcreteModelObjects<SiteGroundTemperatureUndisturbedKusudaAchenbach>().size());
EXPECT_EQ(2u, m.getConcreteModelObjects<SiteGroundTemperatureUndisturbedKusudaAchenbach>().size());
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should clone into the same model create a new SGT object here? If not, how can this be prevented?

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 don't see a precedent for determining whether to clone based on the model that the GHE is in. And I don't see an issue with just cloning into the same model.

auto ghClone = gh.clone(m).cast<GroundHeatExchangerHorizontalTrench>();
EXPECT_EQ(2u, m.getConcreteModelObjects<GroundHeatExchangerHorizontalTrench>().size());
EXPECT_EQ(1u, m.getConcreteModelObjects<SiteGroundTemperatureUndisturbedKusudaAchenbach>().size());
EXPECT_EQ(2u, m.getConcreteModelObjects<SiteGroundTemperatureUndisturbedKusudaAchenbach>().size());
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 don't see a precedent for determining whether to clone based on the model that the GHE is in. And I don't see an issue with just cloning into the same model.

Comment on lines +272 to +278
std::vector<ModelObject> GroundHeatExchangerHorizontalTrench_Impl::children() const {
std::vector<ModelObject> result;

result.push_back(undisturbedGroundTemperatureModel());

return result;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It this new children method necessary? I'm still not really sure how this method gets used downstream.

@ci-commercialbuildings
Copy link
Collaborator

ci-commercialbuildings commented Jul 22, 2025

CI Results for 786f151:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

GroundHeatExchangerHorizontalTrench: cloning to another model doesn't bring the Site:GroundTemperature:Undisturbed:XXX object

3 participants