Figure 24: Connectors in SysML

Gallery
Tutorial
The inheritance from block Spring shown in the following is not shown in the spec but it's pretty clear from the context:
Click on the image to view it full size
That last bit should probably say: 'The model for Example ...' or just 'The model ...'.

model Example
  SpringA s1;
  SpringB s2;
equation
  connect(s1.p2, s2.p1);
end Example;
Export of block Example to Modelica from the MagicDraw SysML Plugin or Magic Cyber-Systems Engineer® (Cameo Systems Modeler®) gives:

model Example
  Example _Example;
  model Example
    SpringA s1;
    SpringB s2;
  equation
    connect(s2.p1,s1.p2);
  end Example;
  model SpringA
    extends Spring;
  end SpringA;
  model SpringB
    extends Spring;
  end SpringB;
  connector Flange
    flow Force f;
    Velocity lV;
  end Flange;
  model Spring
    Flange p1;
    Flange p2;
  end Spring;
  type Force=Real(unit="N");
  type Velocity=Real(unit="m/s");
end Example;
Up next
Notes
Snippets (quotes/extracts)
Visit also
Visit also (backlinks)
Related slides (includes other tutorials)
Related slides (backlinks, includes other tutorials)