#5372 closed defect (invalid)
Issue with NFInst.instExpressions and protected elements
Reported by: | Francesco Casella | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | 2.0.0 |
Component: | New Instantiation | Version: | |
Keywords: | Cc: | nytsch@… |
Description
Please check BuildingSystems.Applications.AirConditioningSystems.PhotovoltaicCoolingSystem. The following error is reported by the NF:
[BuildingSystems 2.0.0-beta/Technologies/ThermalStorages/BaseClasses/BuoyancyModels/PartialBuoyancy.mo:7:3-9:119:writable] Error: Illegal access of protected element port_b. [BuildingSystems 2.0.0-beta/Technologies/ThermalStorages/FluidStorage.mo:356:5-359:29:writable] Error: Variable HeatBuoyancy.port_b[i] not found in scope $IMPLICIT.
There are some protected elements in class FluidStorage, but I cannot understand why port_b
should be.
Change History (4)
comment:1 by , 6 years ago
Cc: | added |
---|
comment:2 by , 6 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:3 by , 6 years ago
@casella: The protected section in model BuildingSystems.Technologies.ThermalStorages.BaseClasses.BuoyancyModels.Bouyancy1
was not necessary, so I removed it (unfortunately the caused failure was not detected by Dymola and JModelica ...)
comment:4 by , 6 years ago
Thank you all, it was late in the evening and I didn't have much sleep on the night before, so my analysis was a bit shallow, sorry about that.
First problem hopefully solved :)
@nytsch, please check the link in the description tomorrow, and if it works you may close the ticket.
PhotovoltaicCoolingSystem
contains a componentstorage
, which contains a componentHeatBuoyancy
of typeBuildingSystems.Technologies.ThermalStorages.BaseClasses.BuoyancyModels.Bouyancy1
.Bouyancy1
extends fromPartialBouyancy
in a protected section, which means that everything it inherits also becomes protected. Thestorage
model then tries to useHeatBouyancy.port_b
in a connect equation, which is illegal sinceport_b
is protected insideHeatbouyancy
due to the protected extends.