Skip to content

Central Heat Pump Refactor - #11787

Open
mitchute wants to merge 20 commits into
developfrom
central-hp-refactor
Open

Central Heat Pump Refactor#11787
mitchute wants to merge 20 commits into
developfrom
central-hp-refactor

Conversation

@mitchute

@mitchute mitchute commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Pull request overview

  • Fixes ....

Description of the purpose of this PR

Will update the description soon

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
  • If adding/removing any output files (e.g., eplustbl.*)
    • Update ..\scripts\Epl-run.bat
    • Update ..\scripts\RunEPlus.bat
    • Update ..\src\EPLaunch\ MainModule.bas, epl-ui.frm, and epl.vbp (VersionComments)
    • Update ...github\workflows\energyplus.py

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

  Add energy and three-loop routing contracts for all operating modes.
  Cover final PLR and cycling behavior, sequential flow allocation, and
  water/glycol node heat transfer.
  - capture thermodynamic, routing, curve, flow, and unmet-load state
  - derive legacy reports, nodes, and wrapper aggregation from module results
  - preserve simultaneous cooling snapshots explicitly
  - add result routing, synchronization, energy, and reset tests
  Use final operating temperatures for cooling and heating performance
  curves and replace heating post-scaling with a bounded PLR and cycling
  solution. Support bicubic EIRFPLR curves and an optional heating
  leaving-water limit, with transition, documentation, and energy-balance
  regressions.
  - solve modes 3-5 from one converged thermodynamic operating point
  - route recovered and source heat without dropping useful loads
  - stage heterogeneous modules sequentially using actual remaining demand
  - derive dominance from aggregate source transfer
  - add balanced, dominant, and deterministic staging regressions
  - initialize each plant connection using its design flow and loop fluid
  - allocate actual finite wrapper flow sequentially across modules
  - centralize result-based bypass mixing and node reporting
  - add fixed-flow, variable-flow, glycol, and source-routing regressions
  - report useful heating and bidirectional source capacity envelopes
  - use independently stageable minimums for heterogeneous module banks
  - preserve calculated sizes for hard-size diagnostics
  - use source sizing data and register direction-safe design flows
  - validate static performance inputs and PLR curve domains
  - resolve flow modes per wrapper and default blank ancillary schedules
  - honor RunFlag, fail unresolved plant scans, and clear cached results
  - remove unreachable legacy aggregation and add regression coverage
  - document final thermodynamics, dispatch, and heat routing
  - align IOR and IDD inputs, outputs, units, and curve conventions
  - clarify blank ancillary schedule behavior in example files
  Clear only the cached load and flow request associated with an inactive
  useful-load connection. Preserve active cooling or heating state during
  inactive source and opposite-load callbacks, and reset the wrapper only
  after both useful-load connections are off.

  Add three-loop regression coverage for active-load preservation and final
  off-state cleanup.
  Delete the unreferenced pre-correction chiller and chiller-heater
  calculation pipelines, their helper and update methods, and exclusive
  scratch state.

  Remove tests tied only to the retired private implementation while
  retaining active thermodynamic and integration coverage. Both
  CentralChillerHeaterSystem examples remain numerically identical.
  - parse performance objects directly from canonical epJSON fields
  - retain defaults, Autosize handling, diagnostics, and unused-object tracking
  - treat object iteration order as an implementation detail
  - add native epJSON and name-based IDF equivalence coverage
  - retain immutable performance definitions and bind modules by index and schedule
  - isolate per-module sizing, warning, flow-mode, and result state
  - replace mutable solver aliases and array operating points with named views
  - bind outputs to the authoritative result and remove legacy shadow state
  Replace the 20 fixed wrapper groups with a normalized extensible
  module_groups schema and parse wrapper input directly from epJSON.

  Resolve performance definitions and schedules while expanding modules
  once, remove redundant wrapper association bookkeeping, and require at
  least one module group.

  Add IDF/native equivalence, beyond-former-limit, schedule, reference,
  duplicate-name, and schema-validation coverage.
  Move the implementation, header, and unit tests to names matching the
  CentralHeatPumpSystem object, and update CMake, global state, plant factory,
  and equipment enum wiring.

  Use cooling, heating, source, evaporator, and condenser terminology
  throughout the model. Expand abbreviated performance and report names,
  remove unused state and a no-op initialization override, and retain the
  current input and output schema.
  - stop part-load bisection on bracket and load tolerances
  - record solver status, residuals, iterations, and curve evaluations
  - report stable recurring diagnostics for exhausted solvers
  - cover tiny loads, convergence, work limits, and exhaustion
  Replace module-owned Array1D and state EPVector storage with zero-based
  std::vector containers. Remove duplicate count and performance-index
  state while preserving stable immutable performance references.

  Add container reset, boundary, multiple-definition, and expanded-group
  regression coverage.
@mitchute mitchute self-assigned this Sep 9, 2026
@mitchute mitchute added Defect Includes code to repair a defect in EnergyPlus Refactoring Includes code changes that don't change the functionality of the program, just perform refactoring labels Sep 9, 2026
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

⚠️ Regressions detected on macos-14 for commit c9fe99a

Regression Summary
  • BND: 2
  • EIO: 2
  • ERR: 2
  • ESO Big Diffs: 2
  • MTR Big Diffs: 2
  • Table Big Diffs: 2
  • Table String Diffs: 2

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 Refactoring Includes code changes that don't change the functionality of the program, just perform refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants