umlsysml

Can a block in an Internal Block Diagram connect to itself?


I want to describe the fact that the 4 cars in the system can communicate with each other. The multiplicity is specified to be 4 when defining the block diagram. This is how it looks like as an IBD. Does this make sense or should 4 separate instances of cars be created and connected? enter image description here


Solution

  • In short

    This IBD tells that each of the 4 car is connected to exactly one other car. But according to your narrative, each car should be connected to the 3 other ones. So you should put a 3 multiplicity at teach end of the connector.

    Some more explanations

    According to SysML section 8.3.1.2:

    An internal block diagram is based on the UML composite structure diagram, with restrictions and extensions as defined by SysML.

    Among these SysML extensions there is section 8.2.1.2.9:

    SysML defines a default multiplicity of 1 on each end of a connector. These multiplicities may be assumed if not shown on a diagram.

    In absence of more specific rules, the connector is then to be understood as in UML for the composite structure:

    For each instance playing a role in an internal structure, there will initially be as many links as indicated by the lower multiplicity of the opposite ends of Connectors attached to that role.

    With your default 1 multiplicity, this would lead to an array connector pattern (see UML 2.5.1, fig 11.7 page 188) and de facto, you'd have 2 pair of connected cars.

    With an explicit 3 multiplicity, your diagram would lead to a start connector pattern (see UML, fig.11.6 page 188). Note that in view of the self reference the multiplicity of 3 is sufficient.

    Of course, you could alternatively simply draw 4 blocks and draw the 6 connections existing between them. It's explcit, does require less brainpower to grasp the spririt of the design, but on the other side, it also makes the diagram a little more cluttered.