Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

...

Image Removed

47 Perimeter Ctr E, Suite 410
Atlanta, GA 303046, USA
Voice: +1-404-592-6897
Web: www.intercax.com
Email: info@intercax.com

...

Objectives

The new learning objectives of this exercise are to compare SysML and Simulink models, update a SysML block structure from a modified Simulink model, and update a Simulink model from a modified SysML block structure. The same processes apply to SysML activity models.

...

This exercise assumes the student has

...

  • _Hlk44840893_Hlk44840893

    IBM Rational Rhapsody 8.2 installed correctly on his or her machine with a valid license for use, and

  • Syndeia 3.3 installed as a plugin for Rhapsody with a valid license for use

  • Syndeia Simulink interface, correctly installed with a valid license for use,

  • MATLAB/Simulink R2016b or later, installed correctly on his or her machine with a valid license for use. We also assume the student is sufficiently familiar with Simulink to modify the Simulink model in Steps 6 and 7 below without detailed instructions.
    We will use the provided MagicDraw project Syndeia Tutorial Testbed.rpy. We assume the user has completed Exercise 10.1.

Exercise

...

Image Removed

...

  1. If not already open from the previous exercises, open Syndeia Tutorial Testbed.rpy and launch the Syndeia dashboard from the Simulink_Tutorial Part 2 package. Select a Syndeia Cloud project, if required.

  2. Navigate to the Connection Browser tab, expand the System block to see the connection, and right-click > Compare Source & Target as shown in Figure 1. Click yes to confirm. Be careful to work with models and connections in Simulink_Tutorial Part 2, those created in Exercise 10.2.

    Image Removed

    Anchor_Ref483917828_Ref483917828Image Added

    Figure 1 Syndeia Connection Browser, compare initial models

  3. Comparison Results tab should show that all elements are in sync, as shown in Figure 2.

    Image Removed

    Anchor_Ref483917971_Ref483917971Image Added

    Figure 2 Comparison results for initial SysML and Simulink models, before changes.

  4. Open the System Simulink model in MATLAB/Simulink environment (Figure 3).

    Image Removed

    Anchor_Ref484024488_Ref484024488Image Added

    Figure 3 System Simulink model before changes

  5. Add the following to System Simulink model.

    1. Port out3 with type Boolean (as a shortcut, copy/paste existing out2)

    2. Model Reference Block pD : PartD

      1. Copy/Paste Simulink model PartC in the folder, rename to PartD, open and delete all elements inside PartD except for in1 and out2 ports.

      2. In the System Simulink model, copy/paste pC, change name to pD, open its Parameters window and change Model name to PartD.

    3. Lines [pA.out1 – pD.in1] & [pD.out1 – out3]

    4. Save the intermediate model. It should appear similar to Figure 4.

      Image Removed

       

      Anchor_Ref483918560_Ref483918560Image Added

      Figure 4 System Simulink model, partially modified

       


  6. Delete the following from System Simulink model

    1. Lines to and from pB

    2. Model Reference Block pB : PartB

    3. Port in2 on the System block

    4. Save the final model. It should appear similar to Figure 5.

      Image Removed

      Anchor_Ref483918812_Ref483918812Image Added

      Figure 5 System Simulink model, fully modified

  7. Repeat Step 3 to Compare SysML & Target. The results should appear as in Figure 6.

    Image Removed

    Anchor_Ref484025784_Ref484025784Image Added

    Figure 6 Comparison results after Simulink model

    changes 

    changes 

  8. Update the SysML model from the modified Simulink model

    1. In the Connection Manager, right-click the System block connection (as in Step 8 above) and choose Sync Target -> Source.

    2. Go to the SysML IBD for the System block. Right-click inside the diagram and select Display Parts/Ports (Figure 7)

      .

      .

      Image Added

      Figure 7 Simulink model opened in Simulink

    3. Check pD:PartD, its ports in1 and out2, and the new System block port out3, as shown.

    4. After rearrangement, the SysML IBD should appear similar to Figure 8.

      Caution: When making changes in a multi-level block structure, you should sync leaf-level blocks BEFORE syncing parent models. For example, if you add and/or delete ports on PartC block, which is used as part property pC in System, you should compare and sync PartC to resolve changes, before comparing and syncing the parent block, System. This is not necessary for a new child being added that is not yet connected, as shown with pD : PartD in this example.

...


...

  1. Save and close the Simulink model.

  2. Add the following to the System block in the Rhapsody SysML model:

    1. Copy PartC to create PartC1 in the Syndeia_Simulink Part 2 package.

    2. Create a part pC1:PartC1 in System and drag into IBD.

    3. Create a connector between pC1.out2 and pC.in2

  3. Delete the following from the System block (be sure to delete them from the model, not just the diagram; Syndeia always works from the model):

    1. Part Property pA : PartA (three connectors: in1 - pA.in1, pA.out1 - pC.in1, and pA.out1-pD.in1, should be deleted automatically)

    2. The final System IBD should appear similar to Figure 8.

      Image Removed

      Anchor_Ref484028741_Ref484028741Image Added

      Figure 8 System SysML model, modified after completion of Step 11

  4. Repeat Step 3 to Compare Source & Target. The results should appear similar to Figure 9.

    Image Removed

    Anchor_Ref484028865_Ref484028865Image Added

    Figure 9 Comparison results after SysML model

    changes 

    changes 

  5. Update the Simulink model from the modified SysML model

    1. In the Connection Manager, right-click the System block connection (as in Step 8 above) and choose Sync Source to Target.

    2. Open the Simulink model which should appear similar to Figure 10.

      Image Added

      Figure 10 Simulink model, final

Caution: As noted before, when making changes in a multi-level block structure, you should sync leaf-level blocks BEFORE syncing parent models.

...

Image Removed

...