Tags and keywords
The Dependency in the following is for illustration only, to show how an InstanceSpecification
b0:B
assigned as the defaultValue of b:B
within block A
carries the "initial values" override for val:Real
.
SysPhS-1.1: 'The following Modelica code corresponds to Figure 15 [ERROR]. It has a model B with a val component. The val component has a start value of 10. A class A is defined with a component b of type B. A component modification indicates that the start value of b.val is 20.0.'
model B
Real val(start = 10.0, fixed = true);
end B;
model A
B b(val.start = 20.0, val.fixed = true);
end A;
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 b(val.start=20.0,val.fixed=true);
end A;
model B
Real val(start=10.0,fixed=true);
end B;
end A;
To learn more about SysML initial values (a.k.a. context-specific values) visit also this separate trail: 08:04: Deep configuration using SysML context-specific values