-
Notifications
You must be signed in to change notification settings - Fork 193
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."
All reactions
Replies: 2 comments
Regarding #4204 (which is fine), I'm not sure where to used it properly - and not to "overuse" it. Shall
mustBeConnectedbe used e.g. also for conditional connectors likeaxisandsupportinModelica.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.
All reactions
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?