Improve inheritance in MultiBody using selective model extension#4231
Improve inheritance in MultiBody using selective model extension#4231tobolar wants to merge 22 commits intomodelica:masterfrom
Conversation
|
It seems MapleSim's moparser can yet not deal with the "selective model extension". |
|
The new version of MapleSim's moparser allows it. But I do not know how to upload it. The github page for it was archived. I sent an email to @dietmarw. |
PRs are now accepted again. Thanks! It is appreciated. |
(Similar to inheritance of TransformRelativeVector)
a41db46 to
5c306d5
Compare
|
Syntax checks still fail with MapleSim Stand-Alone Modelica Parser 3.6 (after branch rebase). |
|
@beutlich what version of moparser is used for the checks? It works for me. To double check, I downloaded the latest version from the github page and the files from this PR. Tested on Linux64 and Windows 64. Both returned no errors. Note that 32 bit platforms are no longer built, so the files were not updated (only 3.4 grammar) and just moved to the Obsolete folder. |
MapleSim Stand-Alone Modelica Parser 3.6, see https://github.com/modelica/ModelicaStandardLibrary/actions/runs/6912730662/job/18808801660?pr=4231 |
|
If you click on the triangle next to "Run echo "::add-matcher::./.github/moparser.json"" in that link, it looks like the version for
The workflow would need to be updated to call |
The confusing is, MapleSim reports in right that link that it is 3.6:
|
Thanks, see #4235. |


A first draft for #3739 using "selective model extension" introduced in ModelicaSpec 3.6.
See also comment #4091 (comment).
The approach implemented here is to reduce the number of possible base classes for variants of connector interfaces by introducing just one (or significantly less number of) extended base class containing more/all the concerned connectors at once and to disable selected unused connectors in extending classes.
This PR-draft is about MultiBody library. It introduces base classes
Interfaces.PartialTwoFramesResolve(which can be renamed for final PR): it contains connectors frame_a, frame_b and frame_resolve, and the "world".Interfaces.PartialFrameResolveConditional: since several classes utilizes conditionalframe_resolveconnector, the idea is to disable the non-conditional frame_resolve in the inheritedPartialTwoFramesResolveand to inheritePartialFrameResolveConditionaladditionally as followsSome notes:
Interfaces.PartialOneFrame_aandInterfaces.PartialOneFrame_b.ForcesandSensors. After the proof-of-concept, it shall be extended to other multibody classes as well.Forces.WorldTorque, the diagram and icon layout was changed, since in thePartialTwoFramesResolvethe frame_resolve connector is placed at the icon's bottom boundary (instead of the top).assert(cardinality(frame_a) > 0,...)is no more used.