-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unexpected errors when curves used for multiple objects #4167
Comments
OpenStudio/src/model/Curve.cpp Lines 50 to 59 in 7252b1d
As you can see, it's been there since the first commit on github 8 years ago: OpenStudio/openstudiocore/src/model/Curve.cpp Lines 47 to 56 in c3a44f5
|
Lots more: (py39)julien@model (encodings=)$ grep -Ri "is referenced by "
InteriorPartitionSurface.cpp:265: LOG(Error, "InteriorPartitionSurface is referenced by more than one DaylightingDeviceShelf, returning first");
GeneratorFuelCellAirSupply.cpp:159: LOG(Error, briefDescription() << " is referenced by more than one GeneratorFuelCell, returning the first");
RefrigerationSubcoolerMechanical.cpp:138: LOG(Error, briefDescription() << " is referenced by more than one RefrigerationSystem, returning the first");
RefrigerationCondenserAirCooled.cpp:335: LOG(Error, briefDescription() << " is referenced by more than one RefrigerationSystem, returning the first");
GeneratorFuelCellAuxiliaryHeater.cpp:99: LOG(Error, briefDescription() << " is referenced by more than one GeneratorFuelCell, returning the first");
GeneratorFuelCellExhaustGasToWaterHeatExchanger.cpp:145: LOG(Error, briefDescription() << " is referenced by more than one GeneratorFuelCell, returning the first");
GeneratorFuelCellElectricalStorage.cpp:84: LOG(Error, briefDescription() << " is referenced by more than one GeneratorFuelCell, returning the first");
PhotovoltaicPerformance_Impl.hpp:60: /// do not allow this object to be removed if it is referenced by a PhotovoltaicGenerator
GeneratorFuelCellInverter.cpp:104: LOG(Error, briefDescription() << " is referenced by more than one GeneratorFuelCell, returning the first");
CoilCoolingDXMultiSpeedStageData.cpp:438: LOG(Error, briefDescription() << " is referenced by more than one CoilCoolingDXMultiSpeed, returning the first");
GeneratorFuelCellPowerModule.cpp:112: LOG(Error, briefDescription() << " is referenced by more than one GeneratorFuelCell, returning the first");
RefrigerationSubcoolerLiquidSuction.cpp:152: LOG(Error, briefDescription() << " is referenced by more than one RefrigerationSystem, returning the first");
RefrigerationCondenserEvaporativeCooled.cpp:603: LOG(Error, briefDescription() << " is referenced by more than one RefrigerationSystem, returning the first");
ThermalZone_Impl.hpp:336: /// If this zone is referenced by more than one space, then geometry from all spaces is added to a single zone.
GeneratorFuelCellWaterSupply.cpp:123: LOG(Error, briefDescription() << " is referenced by more than one GeneratorFuelCell, returning the first");
ShadingSurface.cpp:281: LOG(Error, "ShadingSurface is referenced by more than one DaylightingDeviceShelf, returning first");
AvailabilityManagerAssignmentList.cpp:275: LOG(Error, briefDescription() << " is referenced by more than one plantLoop, returning the first");
AvailabilityManagerAssignmentList.cpp:316: LOG(Error, briefDescription() << " is referenced by more than one zoneHVACFourPipeFanCoils, returning the first");
AvailabilityManagerAssignmentList.cpp:352: * LOG(Error, briefDescription() << " is referenced by more than one ZoneHVACComponent, returning the first");
RefrigerationCondenserWaterCooled.cpp:404: LOG(Error, briefDescription() << " is referenced by more than one RefrigerationSystem, returning the first");
GeneratorFuelSupply.cpp:154: LOG(Error, briefDescription() << " is referenced by more than one GeneratorFuelCell, returning the first");
ThermalZone.hpp:324: /// If this zone is referenced by more than one space, then geometry from all spaces is added to a single zone.
ThermalZone.cpp:1163: /// If this zone is referenced by more than one space, then geometry from all spaces is added to a single zone.
ThermalZone.cpp:2603: LOG(Error, briefDescription() << " is referenced by more than one ZonePropertyUserViewFactorsBySurfaceName, returning the first"); I'm very unclear about how to address this, and whether the parent() really needs to be implemented by this class (and whether it shouldn't have been |
I gotta say, I'm all kinds of confused about how 'children/resources' are supposed to work, specifically regarding curve objects. I found my way here while investigating why curves shared by AirConditionerVRF objects were unassigned after one of the ACVRF units was removed (e.g.:
edit: note this is with v3.2.1. I see there was an attempt to fix this (aad243b), but it doesn't? |
OpenStudio/src/model/AirConditionerVariableRefrigerantFlow.cpp Lines 1775 to 1911 in c93fb58
@kbenne I think you did that 8 years ago, I don't expect you to remember it, but does that make sense to you? |
The clone method is equally weird: OpenStudio/src/model/AirConditionerVariableRefrigerantFlow.cpp Lines 1647 to 1650 in c93fb58
The curves are listed in children() (I'm not sure they should: StraightComponent is a HVACComponent which is a ParentObject), and they are ResourceObject... |
Issue overview
Current Behavior
This shows up as error which is then caught by standards and makes some measures fail.
(msg.logMessage.include?('[openstudio.model.Curve] This Curve, Object of type ') && msg.logMessage.include?(' has multiple parents. Returning the first.'))
Expected Behavior
Either the API should not let you assign same curve to multiple objects or it should not reflect doing so as an Error.
Steps to Reproduce
Running measure test related to this issue in ext reproduces it
NREL/openstudio-extension-gem#95
Possible Solution
Decide if curve is resource or child and update all code to reflect that. Simpler fix it to keep it as a resource and just remove triggered errors.
The text was updated successfully, but these errors were encountered: