SysPhS: GOTCHA: By default PhSConstant maps to a Modelica parameter (not to a Modelica constant)

Icon class
icon_class
far fa-sticky-note
icon_class_computed
far fa-sticky-note
Note kind
Policy level
Specification keywords
SysMLv1.x keywords
Modelica keywords
SysPhS Keywords
Keywords
Click on the image to view it full size
Because of the name PhSConstant one might expect it to map to Modelica constant, but it maps to a Modelica parameter (and can therefore be changed in between runs).

If you export to Modelica the block A shown from the MagicDraw SysML Plugin or Magic Cyber-Systems Engineer ® (Cameo Systems Modeler®) v19SP3 it generates:


model A
  A _A;
  model A
    Real v1;
    discrete Real v2;
    parameter Real v3;
  end A;
end A;
Note that as of SysPhS-1.1 there are no additional attributes on PhSConstant, so there's no obvious way to indeed generate a Modelica constant.
Relates to
Related notes
Related notes (backlinks)
Related snippets (extracts)
Visit also
Visit also (backlinks)
External links