Opened 5 years ago
Closed 4 years ago
#5279 closed defect (fixed)
NF lookup error in redeclared package
Reported by: | casella | Owned by: | perost |
---|---|---|---|
Priority: | blocker | Milestone: | 2.0.0 |
Component: | New Instantiation | Version: | |
Keywords: | Cc: | mwetter |
Description
Please check Buildings.Applications.DataCenters.ChillerCooled.Examples.NonIntegratedPrimarySecondaryEconomizer. The following error is reported:
[OMCompiler/build/lib/omlibrary/Buildings latest/Fluid/Humidifiers/SprayAirWasher_X.mo:45:3-46:45:writable] Error: Function Medium.enthalpyOfLiquid not found in scope SprayAirWasher_X.
Medium is redeclared in SprayAirWasher_X.mo as a subclass of Modelica.Media.Interfaces.PartialCondensingGases (see the source code) which indeed contains such a function.
Change History (6)
comment:1 Changed 5 years ago by casella
- Cc mwetter added
comment:2 Changed 5 years ago by casella
- Priority changed from high to blocker
comment:3 follow-up: ↓ 4 Changed 4 years ago by casella
comment:4 in reply to: ↑ 3 Changed 4 years ago by perost
Replying to casella:
@perost, any idea why this happens?
It seems to be because the model CoolingCoilHumidifyingHeating indirectly inherits from the record PartialCoolingCoilHumidifyingHeating, which apparently is legal but not something I've thought about. The result is that the NF becomes confused and thinks that CoolingCoilHumidifyingHeating is also a record and tries to instantiate its constructor, which is where the reported error occurs. That shouldn't be the case, a model that inherits from a record is still a model.
comment:5 Changed 4 years ago by perost
Possibly fixed in #607. The model still fails due to expandable connector issues though.
comment:6 Changed 4 years ago by perost
- Resolution set to fixed
- Status changed from new to closed
Closing since the reported issue is fixed. The remaining expandable connector issue is probably covered by one of the existing tickets on that subject.
@perost, any idea why this happens?