#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 , 7 years ago
| Cc: | added |
|---|
comment:2 by , 7 years ago
| Resolution: | → invalid |
|---|---|
| Status: | new → closed |
comment:3 by , 7 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 , 7 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, when the libraries have been updated in the server and the testsuite has run again, and if it works you may close the ticket.

PhotovoltaicCoolingSystemcontains a componentstorage, which contains a componentHeatBuoyancyof typeBuildingSystems.Technologies.ThermalStorages.BaseClasses.BuoyancyModels.Bouyancy1.Bouyancy1extends fromPartialBouyancyin a protected section, which means that everything it inherits also becomes protected. Thestoragemodel then tries to useHeatBouyancy.port_bin a connect equation, which is illegal sinceport_bis protected insideHeatbouyancydue to the protected extends.