Skip to content

Navigation Menu

Sign in
Sign up

Proper usage of the mustBeConnected annotation #4224

Unanswered
tobolar asked this question in Q&A
Discussion options

Regarding #4204 (which is fine), I'm not sure where to used it properly - and not to "overuse" it.

Shall mustBeConnected be used e.g. also for conditional connectors like axis and support in Modelica.Mechanics.MultiBody.Joints.Revolute?
Or e.g. for frame_resolve in multibody sensors? Ok, it is easier to decide here since the documentation says "...to which frame_resolve is connected. Note, if this connector is enabled, it must be connected."

You must be logged in to vote

Replies: 2 comments

Comment options

Regarding #4204 (which is fine), I'm not sure where to used it properly - and not to "overuse" it. Shall mustBeConnected be used e.g. also for conditional connectors like axis and support in Modelica.Mechanics.MultiBody.Joints.Revolute?

The basic question is - "does it make sense to leave it unconnected (if enabled)?"
If so the annotation shall not be used.

For support in Revolute it is clear that it makes sense to leave it unconnected, it is used e.g., in Modelica.Mechanics.MultiBody.Examples.Rotational3DEffects.BevelGear1D (as far as I can tell even if enabled it is internally connected to the fixed mounting, in contrast to the 1D-rotational components). => No annotation

For axis it requires more analysis, but as far as I can tell it also makes sense as well - and having it enabled and unconnected gives the same result as having it disabled (right?). => No annotation
Added: And the same for Prismatic.

For frame_resolve the documentation gives the answer as you indicate.

Note that Modelica.Mechanics.MultiBody.Joints.GearConstraint can also use it for the bearing - if that is non-conditional.

You must be logged in to vote
0 replies
Comment options

tobolar
Nov 7, 2023
Collaborator Author

The basic question is - "does it make sense to leave it unconnected (if enabled)?"

This brings me to the question of non-conditional connectors. In multibody, there is widely applied an approach of "cardinality assertion" for frames 'a' and 'b' (both non-conditional) to assure they are both connected.
Shall this approach be retained when changing the assertion to mustBeConnected annotation? Probably not since then it could be applied to every model having connectors. Right?

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /