Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#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 Francesco Casella, 6 years ago

Cc: nytsch@… added

comment:2 by Per Östlund, 6 years ago

Resolution: invalid
Status: newclosed

PhotovoltaicCoolingSystem contains a component storage, which contains a component HeatBuoyancy of type BuildingSystems.Technologies.ThermalStorages.BaseClasses.BuoyancyModels.Bouyancy1. Bouyancy1 extends from PartialBouyancy in a protected section, which means that everything it inherits also becomes protected. The storage model then tries to use HeatBouyancy.port_b in a connect equation, which is illegal since port_b is protected inside Heatbouyancy due to the protected extends.

comment:3 by nytsch@…, 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 Francesco Casella, 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.

Version 0, edited 6 years ago by Francesco Casella (next)
Note: See TracTickets for help on using tickets.