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: casella Owned by: perost
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 Changed 6 years ago by casella

  • Cc nytsch@… added

comment:2 Changed 6 years ago by perost

  • Resolution set to invalid
  • Status changed from new to closed

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 Changed 6 years ago by nytsch@…

@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 Changed 6 years ago by casella

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.

Last edited 6 years ago by casella (previous) (diff)
Note: See TracTickets for help on using tickets.