-
Notifications
You must be signed in to change notification settings - Fork 167
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
Make propagation final of lifted parameter 'c' in Spring #4407
base: master
Are you sure you want to change the base?
Conversation
By the way, the discussion in MO-2748 didn't take us much further. It gives us a language to express initialization problems more clearly in Base Modelica, but doesn't provide a full specification of how full Modelica initialization should be turned into Base Modelica. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change is ok, but I don't know if part of preferred style of Modelica.Mechanics - so I leave the decision to relevant library officers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, This makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing is that I Joe Engineer would never come to the idea c
is final due to a clear initialization.
@MartinOtter could you review here?
It seems like we are not getting the attention of @MartinOtter on this one. @casella or @AHaumer, may I kindly ask for your help to step in and drive this forward? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine with me
@tobolar I don't understand your comment.
c
is a simple parameter that is propagated. It is not a good idea to let the user change Spring.spring.c to a different value than Spring.c. What do you mean by "initialization"?
Indeed, the common user would be right to wonder. If also the modification of If that helps, I'd gladly also add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about the other lifted parameters of the lineForce component? Seems arbitrary to me to have final modifications at some place but not at other. I asked the same question in #2307 with @MartinOtter's reply to go for final parameter modifications consistently.
…ponent Even though the modification of lineShapeType is not parameter lifting, it would make little sense to make it non-final when all other modifications are final.
…e SpringDamperParallel
Done. Also addressed a similar issue in Once this PR is merged, it can serve as a starting point that other PR's can refer to as motivation for doing similar cleanup in other models. |
Fixes #3707.
As there wasn't any arguments agains making the propagation of
c
final in #3707, I suggest that we go with this solution.One could argue that there are more parameters whose propagation should be final, but I'm starting with this one which is sufficient to fix the issue.