-
Notifications
You must be signed in to change notification settings - Fork 169
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
replaceable data records #4494
Comments
Without having looked at tool behavior or your library yet (will do tomorrow), are you aware of the new (not really anymore) syntax |
System Modeler displays:
It is currently unclear (to me) in the specification if For |
Thanks a lot @maltelenz ! |
Dymola 2025x will display:
I haven't checked Dymola 2024x Refresh 1. And as far as I understand the The issue with |
Agreed! We should clarify this is OK in the spec. I'm leaning towards saying |
It is a clarification, since it already states that they are component-references and the quoted part includes it. See modelica/ModelicaStandardLibrary#4494
@AHaumer sorry, no time for this until we finalize MSL 4.1.0. Will look at it ASAP. |
I’m using replaceable data records to parametrize models: see enclosed Test-library.
It is desired to display the name of the used/redeclared data record or a string parameter of the used/redeclared data record on the icon of the model to help the user.
Update: I tried 6 different annotations (Thanks for your hint, @maltelenz):
Dymola 2024x displays:
OpenModelica v1.24.0 displays:
I have choosen redeclare Test.DataRecords.Data1 data, therefore I would expect a display of “Data1”.
Only Dymola no. 4 (DynamicSelect) is correct. I see now that no. 3 can’t be correct, it either displays the instance name of the model or the instance name of the data record. It seems that Dymola and OpenModelica interpret differently “editing state” and “non.editing state”.
18.6.6 “DynamicSelect has the syntax of a function call with two arguments, where the first argument specifies the value of the editing state and the second argument the value of the non-editing state. The first argument must be a literal expression. The second argument may contain references to variables to enable a dynamic behavior.“
I would be interested in the behavior of other tools (@maltelenz ), and what’s correct in terms of the specification (@HansOlsson ?).
I think one of the options should work, @casella what’s your opinion?
Test.zip
The text was updated successfully, but these errors were encountered: