Tags and keywords
The inheritance from block
Spring
shown in the following is not shown in the spec but it's pretty clear from the context:
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;