Figure 18, 19, 20: Block, Part, Generalization, Redefinition.

Gallery
Tutorial
Click on the image to view it full size

model A
  B b1;
end A;
model B
end B
Export of block A to Modelica from the MagicDraw SysML Plugin or Magic Cyber-Systems Engineer ® (Cameo Systems Modeler®) gives:

model A
  A _A;
  model A
    B b1;
  end A;
  model B
  end B;
end A;


model A
  C c1;
end A;
model B
  extends A;
end B;
Export of block B to Modelica from the MagicDraw SysML Plugin or Magic Cyber-Systems Engineer ® (Cameo Systems Modeler®) gives:

model B
  B _B;
  model B
    extends A;
  end B;
  model A
    C c1;
  end A;
  model C
  end C;
end B;
Note that this additionally includes the full declaration of C.

model A
  replaceable C c1;
end A;
model B
  extends A;
  redeclare D c1;
end B;
Export of block B to Modelica from the MagicDraw SysML Plugin or Magic Cyber-Systems Engineer ® (Cameo Systems Modeler®) gives:

model B
  B _B;
  model B
    extends A(redeclare D c1);
  end B;
  model A
    replaceable C c1;
    Real v1;
    discrete Real v2;
    parameter Real v3;
  end A;
  model D
    extends C;
  end D;
  model C
  end C;
end B;
Note that this additionally includes the full declaration of C and D.
Up next
Notes
Snippets (quotes/extracts)
Visit also
Visit also (backlinks)
Related slides (includes other tutorials)
Related slides (backlinks, includes other tutorials)