-
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
Improve inheritance of classes in MultiBody #4091
base: master
Are you sure you want to change the base?
Conversation
…ne, better understandable)
This reverts commit 9a00453 since the two classes are being obsolete. For more details see modelica#2534
(Similar to inheritance of TransformRelativeVector)
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.
Happy to see #3725 (comment) addressed finally. Thanks!
@MartinOtter would you please review the fix? |
1 similar comment
@MartinOtter would you please review the fix? |
@MartinOtter kindly review the fix |
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.
ZeroForceAndTorque inherits from the new partial model Interfaces.PartialOneFrame_a which includes outer world. Howerver, in ZeroForceAndTorque, world is not used.
Therefore, it would be better to not inherit from a class, where elements are not used
The same holds for PartialTwoFrames: Again world is included, but submodels such as joints or force elements usually do not need world - so why include it?
The background is that the base classes shall cover the following options:
which would require a sum of 4 base classes for each "frame_a"-classes, "frame_b"-classes and "two_frames"-classes. So I tried to reduce the number of it but the drawback is there could be redundant elements. I will try to improve the concept. A related question: is it meaningful to introduce a base class which contains only "frame_a" and use it in nearly all components of the library? |
What about to utilize the "selective model extension" and use (I know, MSL is not yet fully compatible to Modelica Spec 3.6, but being just curious.) |
Nevertheless, that you bring up this question supports the idea of not formulating any constraints on how Modelica 3.6 may be used in #4208. Also, if you are interested in getting access to selective model extension in the MSL, then the best way to do it in my opinion is to set up a PR introducing the use of it, and then see how tool vendors react. The sooner the PR is created (and maybe even merged), the more time tool vendors will have to react before the code freeze, in turn increasing chances of not having to withdraw the change. |
As far as I recall from the MAP-Lib meeting the idea for MSL 4.1.0 is to "Switch to Modelica Language 3.6 - but only use 3.6 annotations, and no other features (no new syntax, but new annotations)." #4175 Trying out "selective model extension" in a PR is still a good idea, even if it will not be included in that version. |
@HansOlsson @henrikt-ma Thanks for motivating myself to try this approach. I believe the approach is possible, but is this also a case which was intended / expected when adding "selective model extension"? If yes, we will in the future iterate a ballance between a lot of simple base classes and a one mega-base-class. |
I realized I have to prepare several particular PRs first. |
@tobolar it seems to me that this PR is still not mature enough to get into MSL 4.1.0. I am moving it to 4.2.0. |
Closes #3739