Repository navigation
Conversation
Rename the "Heat Pumps" Library/My Model category to "Plant Loop Heat Pumps" and list the plant heat pump types the app was missing: HeatPump:PlantLoop:EIR Heating/Cooling, HeatPump:AirToWater:FuelFired Heating/Cooling, and HeatPump:AirToWater (wrapper plus its Heating and Cooling operation modes in My Model). Dropping a HeatPump:AirToWater wrapper on a plant loop asks whether to place its heating or cooling mode (preselected from the loop's sizing type) and places that mode, since the wrapper itself cannot go on a node. Placement logic lives in utilities/HeatPumpAirToWaterPlacement with unit tests. Add default instances of the new types to hvac_library.osm (EIR air source, fuel-fired, and an air-to-water wrapper with one speed per mode); verified to forward translate cleanly. Add icons for the new types and redraw the water-to-water icons so heating and cooling differ. The air-to-water wrapper and its modes share one icon. Icon tests check distinctness and no Catchall fallback. Translations: new strings hand-inserted into all .ts files. Note: the SVG sources for the new icons are held outside the repo for now, pending a decision on whether they should be published. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
My Model now lists only the HeatPump:AirToWater wrapper, not its heating and cooling operation modes. Selecting a mode on a loop opens an Edit tab that shows the owning HeatPump:AirToWater first, then the selected mode with its speed data, on one scrolling page (new HeatPumpAirToWaterModeInspectorView). A mode owned by a wrapper is not removable on its own in the SDK, so the loop diagram showed no delete button for it. It now gets one: clicking it takes the mode off that loop, and when neither mode is left on a loop the wrapper is removed along with both modes, their speed data, curves and lists, since the GUI has no other way to delete it. Translations: drop the two mode strings that are no longer listed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
macumber
left a comment
There was a problem hiding this comment.
Looks good, I left a few comments. I think it would be good to have the svgs so I would add them if you can.
There was a problem hiding this comment.
Do you think adding something like f(x) or something would be good to indicate the equation fit? I'll leave it up to you, just wanted to suggest it.
| libraryWidget->addModelObjectType(IddObjectType::OS_HeatPump_AirToWater_FuelFired_Heating, tr("Heat Pump - Air to Water Fuel Fired - Heating")); | ||
| libraryWidget->addModelObjectType(IddObjectType::OS_HeatPump_AirToWater_FuelFired_Cooling, tr("Heat Pump - Air to Water Fuel Fired - Cooling")); | ||
| libraryWidget->addModelObjectType(IddObjectType::OS_HeatPump_AirToWater, tr("Heat Pump - Air to Water")); | ||
| libraryWidget->addModelObjectCategoryPlaceholder(tr("Plant Loop Heat Pumps")); |
There was a problem hiding this comment.
Maybe it doesn't matter but shouldn't all the "Plant Loop Heat Pumps" be together?
| m_gadgetsLayout->insertWidget(insertIndex++, gadget); | ||
| }; | ||
|
|
||
| // The wrapper's own children are both operation modes, so hide them and show only the selected mode |
There was a problem hiding this comment.
I'm not sure I like this, wouldn't it be useful to see both children without having to switch views? Maybe you could order them so the current one is first?
| return modeComponent->addToNode(node.get()); | ||
| } | ||
|
|
||
| if (auto splitter = target.optionalCast<model::Splitter>()) { |
There was a problem hiding this comment.
I can't get this option to work?
| } | ||
|
|
||
| bool removeHeatPumpAirToWaterModeFromLoop(const model::ModelObject& modelObject) { | ||
| boost::optional<model::HeatPumpAirToWater> heatPump = heatPumpAirToWaterForMode(modelObject); |
There was a problem hiding this comment.
If there is any way to optimize this it would benefit HVACLayoutController::removeModelObject, I think comparisons based on IddObjectType would be faster.
There was a problem hiding this comment.
Maybe replacing HeatPumpAirToWaterMode with an enum that includes the wrapper and doing a lookup based on IddObjectType would give a better option than calling heatPumpAirToWaterForMode when you just want to know if you are dealing with one of the three types?
|
|
||
| ! Plant Loop Heat Pumps | ||
|
|
||
| OS:Curve:Biquadratic, |
There was a problem hiding this comment.
Would any of the curves in https://github.com/NatLabRockies/EnergyPlus/blob/develop/testfiles/PlantLoopHeatPump_EIR_AirSource_and_AWHP.idf be better than these for defaults?
Plant Loop Heat Pumps: missing types, library defaults, and icons
Problem
Several plant-side heat pump types supported by the SDK could not be dragged from a library or from My Model, because the HVAC Library and My Model lists didn't include them. For example, an
OS:HeatPump:PlantLoop:EIR:Heatingin a custom library OSM did not appear anywhere. The existing "Heat Pumps" category name was also vague, since the app has many non-plant heat pumps.Changes
Library / My Model lists (
MainRightColumnController.cpp)HeatPump:PlantLoop:EIR:Heating/:CoolingHeatPump:AirToWater:FuelFired:Heating/:CoolingHeatPump:AirToWater. Both lists show only the wrapper; its operation modes are not listed separately.Placing
HeatPump:AirToWater(HVACSystemsController.cpp, newutilities/HeatPumpAirToWaterPlacement)utilities, separate from the UI, so it can be unit tested.Editing
HeatPump:AirToWater(InspectorView.cpp)HeatPump:AirToWaterfirst, then the selected mode with its speed data, on one scrolling page. Selecting a mode that has no wrapper keeps the standard view.Default library instances (
hvac_library.osm)HeatPump:AirToWaterwrapper with Heating and Cooling modes (one speed each), plus their curves.HeatPump:AirToWateris emitted.Icons (
IconLibrary.cpp,openstudio.qrc,images/,images/mini_icons/)Translations
OpenStudioApp_*.tsfiles. I inserted them by hand rather than running a full lupdate pass, because develop's.tsfiles are out of sync with the sources and lupdate would add about 26k lines of unrelated location changes. A check run of lupdate found no missing strings, and lrelease reports 0 unfinished.Before:


After:
Tests
HeatPumpAirToWaterPlacement_GTest(new):IconLibrary_GTest(2 new tests):openstudioapp_utilities_tests: 12/12 passed.openstudio_lib_tests: everything passed except the known baselineAnalyticsHelperSecrets, which needs CI secrets.Notes for reviewers
🤖 Generated with Claude Code