-
Notifications
You must be signed in to change notification settings - Fork 43
Description
Description
During our Modelica library development at Bosch Rexroth we stumbled across the problem of initialization variables being shown in the parameter dialogue based on different conditions in different tools.
I read through existing issues regarding the default choice of Dialog.showStartAttribute
#2823 and the usage of this Dialog annotation in the MSL modelica/ModelicaStandardLibrary#1855, modelica/ModelicaStandardLibrary#2896, modelica/ModelicaStandardLibrary#2897.
All those issues are still open or marked as a wontfix until a completely new initialization approach is developed for the MSL from my understanding.
We do not want to debate those issues since we do not think that we are qualified to do so even though we would be highly interested in a solution.
For us, the most important thing is a coherent appearance in the parameter dialogue of different Modelica tools.
As shown by @beutlich in a comment to one of the above tickets modelica/ModelicaStandardLibrary#2896 (comment)_ the non-uniform handling of initialization leads to different visualizations in Dymola and SimulationX. Four years later this is still the case and now a problem in our development process as well.
Our two pain points, which result in different visualizations are:
- If only a start modifier and no Dialog (thus, also no showStartAttribute) annotation is present Dymola (and OMEdit) will show the variable's start value in the parameter dialogue and SimulationX won't.
SI.Acceleration a(start=0) "Absolute acceleration of component";
- If a start modifier and a
showStartAttribute=false
annotation is present, Dymola won't show the variable in the dialogue and SimulationX will show the variable (but not its start value, which is correct according to the specification section 18.7).
SI.Position spoolPos(start=0) "Spool position" annotation (Dialog(showStartAttribute=false));
Way forward
We hope that there is a solution with a clarified specification regarding visualization that results in equally looking parameter dialogues without the need to redo the initialization concept in the tools and the MSL itself.
In the Modelica specification 3.6 I did not find a formulation regarding the appearance of variables in the user interface. I specifically searched in sections 4.4 (Component declarations) and 18.7 (annotations for graphical user interface). If I missed something, please let me know.
We expect that formulations like the two below would help to create a more uniform picture across different tools. (These formulations would obviously be overwritten by prefixes like final
).
- A variable with no dialogue annotation and a start modifier should (or should not) be displayed in the user interface. Tackles first pain point. Here the variable's start value should be displayed.
- A variable with a dialogue annotation always has to appear in the user interface. Tackles second paint point. (The variable itself or its start value is shown depending on the value of Dialog.showStartAttribute).
Thanks for considering this
Aaron Buntrock - Bosch Rexroth