Skip to content

Conversation

@RKStrand
Copy link
Contributor

@RKStrand RKStrand commented Aug 1, 2025

Pull request overview

Description of the purpose of this PR

It was noticed that when in the SimulationControl object that a user says "Yes" for the Do HVAC Sizing Simulation for Sizing Periods field without having any Sizing:Plant objects in the input that a hard crash results which is undesirable.

Now, when the user sets this field to "Yes" without any Sizing:Plant objects, one of two things happen. If the Do Plant Sizing Calculation field is set to "No", this overrides the user input for Do HVAC Sizing Simulation for Sizing Periods field and a warning error is produced. If the Do Plant Sizing Calculation field is set to "Yes", EnergyPlus will produce a severe/error warning stating that at least one Sizing:Plant object must be entered or these fields should both be set to "No".

A new unit test verifying the correct severe/fatal error is being produced under the correct conditions (both "Yes" and no Sizing:Plant objects). In addition, the description of the Do HVAC Sizing Simulation for Sizing Periods field was enhanced in the Input Output Reference so that it is clear what is required of the user.

Pull Request Author

  • Title of PR should be user-synopsis style (clearly understandable in a standalone changelog context)
  • Label the PR with at least one of: Defect, Refactoring, NewFeature, Performance, and/or DoNoPublish
  • Pull requests that impact EnergyPlus code must also include unit tests to cover enhancement or defect repair
  • Author should provide a "walkthrough" of relevant code changes using a GitHub code review comment process
  • If any diffs are expected, author must demonstrate they are justified using plots and descriptions
  • If changes fix a defect, the fix should be demonstrated in plots and descriptions
  • If any defect files are updated to a more recent version, upload new versions here or on DevSupport
  • If IDD requires transition, transition source, rules, ExpandObjects, and IDFs must be updated, and add IDDChange label
  • If structural output changes, add to output rules file and add OutputChange label
  • If adding/removing any LaTeX docs or figures, update that document's CMakeLists file dependencies

Reviewer

  • Perform a Code Review on GitHub
  • If branch is behind develop, merge develop and build locally to check for side effects of the merge
  • 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
  • Check that performance is not impacted (CI Linux results include performance check)
  • Run Unit Test(s) locally
  • Check any new function arguments for performance impacts
  • Verify IDF naming conventions and styles, memos and notes and defaults
  • If new idf included, locally check the err file and other outputs

Added code to trap for the conditions when E+ can crash.  When Do HVAC is YES but Do Plant is NO and there are no Sizing:Plant objects, a warning error is produced and Do HVAC is set to NO.  When there are no Sizing:Plant objects and both Do HVAC and Do Plant are YES, a severe/fatal error is produced.
Added a unit test, modified an existing one, and added a sentence to the IO Ref to complete the correct for Defect #10797
@RKStrand RKStrand added this to the EnergyPlus 25.2 IO Freeze milestone Aug 1, 2025
@RKStrand RKStrand requested review from Myoldmopar and mjwitte August 1, 2025 22:41
@RKStrand RKStrand self-assigned this Aug 1, 2025
@RKStrand RKStrand added the Defect Includes code to repair a defect in EnergyPlus label Aug 1, 2025
@github-actions
Copy link

github-actions bot commented Aug 1, 2025

⚠️ Regressions detected on macos-14 for commit 509428f

Regression Summary
  • Audit: 1
  • EIO: 1
  • ERR: 1
  • Table Big Diffs: 1
  • Table String Diffs: 1

@RKStrand
Copy link
Contributor Author

RKStrand commented Aug 2, 2025

FYI: The difference in the ci is in 5ZoneIceStorage which has a SimulationControl that assigns Do HVAC Sizing - yes and Do Plant Sizing - no. Now in this particular file, it avoided an error before because it actually had Sizing:Plant objects. If those objects were gone, then it likely would have crashed.

This file fails with the modified code because Do HVAC Sizing was set to Yes and Do Plant Sizing was set to No.  Now both are set to Yes.
@RKStrand
Copy link
Contributor Author

RKStrand commented Aug 6, 2025

I went back and corrected 5ZoneIceStorage to avoid the error. After ci finishes, this should be ready for review.

@github-actions
Copy link

github-actions bot commented Aug 6, 2025

⚠️ Regressions detected on macos-14 for commit 2c6d147

Regression Summary
  • EIO: 1
  • ERR: 1
  • Table String Diffs: 1

Copy link
Contributor

@mjwitte mjwitte left a comment

Choose a reason for hiding this comment

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

@RKStrand All good here, merging.

@mjwitte mjwitte merged commit acf7908 into develop Aug 18, 2025
9 checks passed
@mjwitte mjwitte deleted the 10797CorrectionToSimulationSizingFlags branch August 18, 2025 21:57
mdahlhausen added a commit to NREL/openstudio-standards that referenced this pull request Jan 2, 2026
EnergyPlus version 25.2 errors out if Plant Sizing is set to true in the simulation control object, but the model has no Sizing:Plant objects. NREL/EnergyPlus#11140
In model_run_sizing_run, do plant sizing if and only if there are Sizing:Plant objects in the model.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Defect Includes code to repair a defect in EnergyPlus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HVAC Sizing Simulation should be disabled if Plant Sizing is not active

4 participants