-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Violations of protected #1320
Comments
Although I don't see an actual problem in using the protected variable in these example models, it's true that Modelica does not allow the use of protected variables outside the model where it is defined and therefore we could try to circumvent this somehow. I see two (straightforward) solutions for this:
However, I already noticed this happens in quite some other components, so it will probably require a thorough review to implement this everywhere. @Mathadon, what's your opinion on this? |
This is a recurring problem. We're using variables that are protected in specific situations where it makes sense to use them for development purposes but where we do not want these variables to show up in every user's result file. In the CavityAirFlow it would make sense to unprotect the variable. In I think it's a developer choice at the moment whether or not |
Of course it is always up to the library developer to choose how to develop their libraries. As a Modelica tool developer that wants to figure out if we support a certain library, the examples in the library are often the main way to test this, especially for the vast majority of libraries where there is no test library available. If the examples do not work because of illegal Modelica, our message to our customers then has to be "we can't say we support this library because it uses illegal Modelica". And of course people who try the library by trying to run the examples will get the (correct) impression that the library is broken, since the examples won't build. |
Indeed, the examples are quite important in that respect.. Unfortunately this library is developed by volunteers so bandwidth is a bit limited to polish things :) But I'll leave it up to the active developers to decide how to proceed! |
I will discuss with the other active developers whether or not we can find the time to fix the 'incorrect' Modelica spec. (@JavierArroyoBastida, @lucasverleyen, FYI) @maltelenz the examples in the |
Thank you, this is helpful information in our testing. |
Validating models in Wolfram System Modeler, I get errors about violations of
protected
in multiple classes, as reported below:IDEAS.Buildings.Components.BaseClasses.ConvectiveHeatTransfer.Examples.CavityAirflow
:IDEAS.Experimental.Electric.Examples.TestGridAndPVFromFile
:IDEAS.Experimental.Electric.Examples.TestGridAndPVSystemGeneral
:IDEAS.LIDEAS.Validation.Case900ValidationLinearInputs
:The text was updated successfully, but these errors were encountered: