Exercise 10.10 - Changing Simulink Requirements and doing Compare/Sync

Objectives

In this tutorial, we demonstrate

Changing Simulink requirements and doing compare/sync with SysML Requirements

1a: Simulink Requirement - SysML Requirement connection

  • 1a1: Adding new child requirements on the Simulink side, comparing, and synchronizing.

  • 1a2: Removing existing child requirements on the Simulink side, comparing, and synchronizing.

  • 1a3: Updating text of requirements on the Simulink side, comparing, and synchronizing.

1b: Simulink Requirement - SysML Package set connection

  • 1b1: Adding new requirements to Simulink Requirements package comparing, and synchronizing.

  • 1b2: Removing existing requirements from Simulink Requirements, comparing, and synchronizing.

Preparation

This exercise assumes the student has

  • Cameo System Modeler 18.0 - 19.0 (or MagicDraw with SysML plug-in) installed correctly on his or her machine with a valid license for use.

  • Syndeia 3.3 installed as a plugin for Cameo/MagicDraw 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.

The steps for this exercise are as follows

1 Continue using the Simulink Requirements Set as generated in 1d from https://intercax.atlassian.net/wiki/spaces/SYN34/pages/2409171518 Step 5 where we generated a Simulink Requirement Set by Dropping a SysML Package.

2 In SysML we have six packages to demonstrate the above features. Open Syndeia Simulink Examples.mdzip model in MagicDraw/Cameo.

Figure 1: Syndeia Simulink Examples SysML model

3 In Simulink Requirement Set we have Simulink_Requirements_for_MagicDraw.slreqx (get it here - https://intercax.atlassian.net/wiki/spaces/SYN34/pages/2407364009)

Figure 2: Simulink requirements set Model_Generation__Requirements

4 We will now drag and drop the Simulink Requirement to SysML Package 2a and create the connections as shown below in Syndeia Dashboard.

5 Launch Syndeia Dashboard from Model Generation package in SysML.

 

6 In Syndeia Dashboard, select the Simulink requirements set Model_Generation_Requirements from the local file folder S2a1 and drag and drop this requirement set to Package 2a1 in Model Generation:: From Simulink Requirements in SysML. Select Model Transform. Select Yes.

7 In the Syndeia Dashboard you can observe the new SysML requirements package Model_Generation_Requirements generated as shown below.

8 In SysML in the Containment Tree the requirement package Model_Generation_Requirements and all requirements generated can be seen.

9 In the Connections Search tab, Click click Get All. The connections between SysML requirements and Simulink requirements generated in the previous step can be seen, as shown below.

Connection Search tab click Get All,

 

10 Now in Simulink Add a new nested requirement Average Mass with the below details.

11 In the Connection Search tab, select Compare Source and Target on Payload Mass connection as shown below.

12 Now Sync the connection above. Choose Sync Target (Simulink Requirements) and Source (SysML).

13 In SysML we see this is added new requirement Average Mass is added under Payload Mass.

14 New Connection is also established as shown in the Connection Search tab.

 


The steps for this exercise are as follows.

1 In the Simulink requirement set remove Minimum Mass.

 

2 This Model_Generation_Requirements set in Simulink will be as below with no Minimum Mass requirement.

3 Now again in Connection Search, click the Get ALL button and do Compare Source and Target for the connection for Payload Mass as shown below.

 

4 Comparison Result tab shows the result where Minimum Mass is present on the SysML side and not on the Simulink Requirement side.

5 Now Sync Target to Source on the above Payload Mass connection in the Connection Search tab as shown below.

6 In the Containment Tree of SysML, Minimum Mass is now not present on the SysML side.

 


The steps for this exercise are as follows.

1 In Simulink Requirement set Model_Generation_Requirements, change the Average Mass Value from 25 kg to 15 kg as shown below.

2 In the Connection Search tab, click the Get All button. Compare Source, and Target on the Payload Mass Connection as shown below.

 

3 Now Sync Payload Mass Connection Target to Source.

4 This will update the value of the Average Mass requirement to 15 Kg in SysML as shown below in the Containment Tree.

 


The steps for this exercise are as follows.

1 In Simulink, we add a new requirement Maximum Altitude to the Simulink Requirement Set Model_Generation_Requirements as shown below continuing from above 1a3 step 4.

2 Compare Source, and Target on Model_Generation_Requirements package connection as shown below.

 

3 Sync the above connection for the Model_Generation_Requirements package as shown below in the Connection Search tab as shown below.

4 Thus in SysML package 2b1 below Maximum Altitude is added.

 


The steps for this exercise are as follows.

1 In Simulink Requirement Set Model_Generation_Requirements remove the requirement Payload Data Rate as shown below continuing from above 1b1 step 4.

2 The Model_Generation_Requirements set in Simulink is now as below with no Payload Data Rate.

3 In the Connection Search tab, Compare the Package Connection for Model_Generation_Requirements as below.

4 Compare Results shows that Payload Data Rate is not present in Simulink Requirement Set.

5 Now, Sync Target to Source for the above the Connection for Package Model_Generation_Requirements as shown below.

6 The Payload Data Rate is removed from package Model_Generation_Requirements as seen in the Containment Tree in SysML below.


Note to User: Simulink does not allow us to change the name of the requirement set without changing the parent file name. Changing the Simulink requirement file name will change the path to the path, and orphan the Syndeia connection. This use case is not supported.