In /home/jovyan/advent-of-sysml-v2/lesson12/models/L12_ReindeerDrawnSleighAssembly_Solution.sysml on line 46 there seems to be a connection without name:
connection : Drives connect [1] santa to [1] sleigh;
And, while the visualisation works, the “Go to source definition” won’t take you from the diagram back to the source of this connection. Adding a name like this:
connection drives : Drives connect [1] santa to [1] sleigh;
enables the tool to “Go to source definition”. Also the connection shows up in the outline view now.
Is this a mistake, or is there a reason to use unnamed connections?
I wondered about the same. According to Claude, connection names are optional, and these are their pros and cons:
Advantages of Named Connections (like connection drives : Drives)
Referenceability - You can reference the connection elsewhere in your model (e.g., for constraints, subsetting, redefinition)
Documentation - The name provides semantic meaning (e.g., harnesses, drives) that clarifies the relationship
Debugging - Named connections are easier to identify in error messages and visualization tools
Reuse - You can subset or specialize a named connection in more specific contexts (like you do with harnesses on lines 55-90, note: this is where I have the other 8 reindeer)
Advantages of Anonymous Connections (like connection : Drives)
Conciseness - Less verbose when the connection type name is self-explanatory
Simplicity - Avoids the cognitive overhead of inventing names when they don’t add value
One-off connections - When you’ll never reference the connection again, naming it is unnecessary