...
- In the Blocks package in MagicDraw, create a new block B11 with an input flow port in1 and output flow port out1, both typed by Integer value type.
- In the Internal Block Diagram for the block PartB1, add a new part property pb11 typed by the new block B11, and create connectors as shown below.
Figure 155: Add part property pb11 (of type PartB11) in the block PartB1 - Click on the Connection Browser tab, select the connection under PartB1, right click and select Compare SysML and Target, as shown below in Figure 156.
Figure 156: Compare the connection between PartB1 and corresponding Simulink model. - The Comparison Result tab will open and show the comparison table, as shown in Figure 157. This may take few seconds as Syndeia launches Simulink and queries the model. Green rows indicate in-sync and red rows indicate out-of-sync elements. The table shows that property pb11 is new in SysML (does not exist in Simulink) and so are the 2 connectors added in the IBD in Figure 155.
Figure 157: Comparison results - Next, we will make changes to the activity model. In the Activity package in MagicDraw, create a new activity Mission B11 in with one input activity parameter b11In1 and one output activity parameter b11Out1, both typed by Integer.
- In the activity diagram for the existing activity Mission B1, add a call behavior action mb11 typed by the activity Mission B11, and create new object flows as shown below.
Figure 158: Add call behavior action mb11 (of type Mission B11) in Mission B1 activity - Click on the Connection Browser tab, select the connection under Activity::Mission B1, right click and select Compare SysML and Target, as shown below.
Figure 159: Compare the connection between MissionB1 and corresponding Simulink model - The Comparison Result tab will open and show the comparison table. This may take few seconds as Syndeia launches MATLAB/Simulink and queries the model. Green rows indicate in-sync and red rows indicate out-of-sync elements. The table shows that call behavior action mb11 is new in SysML (does not exist in Simulink) and so are the 2 object flows in Mission B1—added in the activity model shown in Figure 158.
Figure 160: Comparison results
In general, Syndeia can detect the following types of changes in the SysML model when comparing with a connected Simulink model:
...
- Create a new Simulink model PartC11 with:
- two inports with names and types as in1: double and in2: int32
- two outports with names and types as out1: double and out2: boolean
- In the existing Simulink model PartC1, add a new model reference block pointing to the new model PartC11, and connect lines between ports, as shown below. Save the PartC1 Simulink model.
Figure 161: Add a new model reference block for PartC11 in the Simulink model for PartC1
- In the Syndeia Dashboard, click on the Connection Browser tab, select the connection under Blocks::PartC1 block, right click, and select Compare SysML & Target.
Figure 162: Run compare on the connection between PartC1 and corresponding Simulink model - The Comparison Result tab will open and show the comparison table. This may take few seconds as Syndeia launches MATLAB/Simulink and queries the model. Green rows indicate in-sync and red rows indicate out-of-sync elements. The table shows the new block pc11:PartC11 added to the Simulink model that does not exist in SysML, and the 4 new lines added to PartC1 Simulink model that do not exist in SysML.
Figure 163: Comparison results - Similarly, you can add repeat the steps 1-4 for a Simulink model connected to a SysML activity.
...