Skip to content

ForwardTranslate to new E+ SpaceLoad Instances + Definitions (opt-out possible) - #5651

Open
jmarrec wants to merge 11 commits into
developfrom
SpaceLoadInstance
Open

ForwardTranslate to new E+ SpaceLoad Instances + Definitions (opt-out possible)#5651
jmarrec wants to merge 11 commits into
developfrom
SpaceLoadInstance

Conversation

@jmarrec

@jmarrec jmarrec commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Pull request overview

Behavior is that it will now by default translate to these new object pairs. But you can opt-out

  • There is a new CLI flag
          --space-load-instances, --no-space-load-instances{false} 
                                   Translate SpaceLoads (People, Lights, ElectricEquipment, etc) to
                                   the E+ Instance / Definition object pairs [Default: True]

OpenStudio-resources

and confirm there are no failing tests and no EUI deviations.

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

…uipment or the new ElectricEquipment:Instance + Definition

- ForwardTranslateElectricEquipmentDefinition.cpp (new): translates ElectricEquipmentDefinition → ElectricEquipment:Definition (raw, unmultiplied values).
- ForwardTranslateElectricEquipment.cpp: translateElectricEquipment is now a 2-line dispatcher on m_forwardTranslatorOptions.excludeSpaceLoadInstances(); translateElectricEquipmentLegacy is the untouched original body (→ ElectricEquipment); translateElectricEquipmentInstance is new (→ ElectricEquipment:Instance, references the shared Definition via translateAndMapModelObject, which dedups automatically).
- ForwardTranslator.hpp: forward-declared model::ElectricEquipmentDefinition, added the three new method declarations.
- ForwardTranslator.cpp: OS_ElectricEquipment_Definition switch case now dispatches to translateElectricEquipmentDefinition instead of no-op (only exercised when the new path calls translateAndMapModelObject(definition), so legacy behavior is unaffected when the flag is off).
- CMakeLists.txt: registered the new source file.
- New tests

Default behavior (excludeSpaceLoadInstances() == true) is unchanged — this is purely additive and opt-in.
…ElectricEquipment:ITE:AirCooled:Instance + Definition
…-load-instances`

Existing tests that specifically target the legacy translation now opt-in explicitly via `ft.setExcludeSpaceLoadInstances(true)`
@jmarrec jmarrec self-assigned this Sep 10, 2026
@jmarrec jmarrec added Enhancement Request component - IDF Translation Pull Request - Ready for CI This pull request if finalized and is ready for continuous integration verification prior to merge. labels Sep 10, 2026
@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

🧪 Test Results Dashboard

Summary

Metric Value
Total Tests 0
Passed 0
Failed 0
Errors 0
Skipped 0
Success Rate 0.0%
Generated 2026-09-10 11:47:43 UTC

❌ Significant Test Failures

📊 Test Run Information

Run XML File Status
- No XML files found ❌ Missing

… (caught in OS-resources)

The model (like the legacy ElectricEquipment:ITE:AirCooled object) stores 'Watts/Unit', but the new ElectricEquipment:ITE:AirCooled:Definition object renamed that choice to 'EquipmentLevel' to match the other *:Definition objects.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component - IDF Translation Enhancement Request 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.

1 participant