Open AntoineGautier opened 7 months ago
Another occurrence of this issue appears with commit 6036d14d2d3a12376dab886a62a40d3f475f68ab of MBL and the following declaration within Buildings.Templates.AirHandlersFans.VAVMultiZone
.
inner replaceable Buildings.Templates.AirHandlersFans.Components.OutdoorReliefReturnSection.MixedAirWithDamper
secOutRel(
redeclare final package MediumAir = MediumAir,
final typCtlFanRet=ctl.typCtlFanRet,
final typCtlEco=ctl.typCtlEco,
The input fields for typCtlFanRet
and typCtlEco
are enabled in the configuration dialog despite the final
keyword.
Here, adding a constraining clause with the class that contains the original declarations of typCtlFanRet
and typCtlEco
solves the issue, i.e.
inner replaceable Buildings.Templates.AirHandlersFans.Components.OutdoorReliefReturnSection.MixedAirWithDamper
secOutRel constrainedby Buildings.Templates.AirHandlersFans.Components.Interfaces.PartialOutdoorReliefReturnSection(
redeclare final package MediumAir = MediumAir,
final typCtlFanRet=ctl.typCtlFanRet,
final typCtlEco=ctl.typCtlEco,
@AntoineGautier when running the app in staging.ctrl-flow.lbl.gov, I cannot see the entry for the outdoor air section. See below the screenshot in the ctrl-flow.lbl.gov:
How can I see the screenshot as you are showing here?
To see the screenshot from above with the incorrect entries for the OA section, you have to locally rebuild the server app with the referenced MBL commit 30fd0f3d1f.
In more recent MBL commits (such as the one currently used on the staging branch), a workaround was implemented where final assignments for typDamOut
and typDamOutMin
are made within the interface class (as opposed to the derived class as above). See the diff at https://github.com/lbl-srg/modelica-buildings/compare/30fd0f3d1f004812b9b468b547d27d120db2bb14...master#diff-cf424f8df0b9ff39c6a6b4986c14a10c865ee3b5ae1fa3e3956e630aaa0bbb34R12-R27.
What is currently visible on the staging branch is the other occurrence of this issue, described at https://github.com/lbl-srg/ctrl-flow-dev/issues/360#issuecomment-1772326895.
In this case, the workaround proposed in https://github.com/lbl-srg/ctrl-flow-dev/pull/369 uses __ctrlFlow(enable=false)
annotation.
Note that the current issue shall remain open as these two workarounds do not solve the original problem, which is that ctrl-flow disregards some final assignments for some specific constructs.
Using commit 30fd0f3d1f of MBL, the final keyword in the following bindings is disregarded.
When running the app, we get the following input fields for the OA dampers, that should be disabled due to the final keyword.
This is surprising because this pattern is used elsewhere. For example, the type of an equipment is declared in the interface class, e.g.
and assigned with the final keyword in the derived class, e.g.
And in this case, the app does not generate an input field for the equipment type, which is as expected.
A propable cause is that in the case of
typDamOut*
, the final assignment is made in an intermediary child class.Workaround
Use
__ctrlFlow(enable=false)
annotation. Or make final assignments fortypDamOut
andtypDamOutMin
within the interface class if possible.