Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Objectives

In this tutorial, we demonstrate

Changing SysML requirements and doing compare/sync with Simulink Requirement

1a: SysML requirement - Simulink requirement connection

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

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

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

1b: SysML package - Simulink requirement set connection

  • 1b1: Adding new requirements to the SysML package comparing, and synchronizing.

  • 1b2: Removing existing requirements from SysML package, 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.

  • For this tutorial, we are using the MagicDraw model Syndeia_Simulink_Examples.mdzip (get it here - SysML Models, Profiles and Mappings).

1a: SysML requirement - Simulink requirement connection

The steps for this exercise are as follows.

1 Launch the Syndeia Dashboard from the Model Generation package in SysML Magicdraw/Cameo. It will appear as follows.

2 Drag and drop the requirement Payload Mass from the Requirements package in SysML to a folder in your local file system, e.g. folder S1a. This has two nested requirements Select Model Transform. Select Yes.

3 In the Syndeia Dashboard you can observe the new Simulink requirements file Model_Generation_Requirements.

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

5 Open the Simulink requirements model in Simulink, as shown below.

6 Compare the connection for Payload Mass and the nested requirements in the Connection Search tab.

7 In Comparison Result, it will show everything is matched as shown below.


1a1: Adding new child requirements on SYSML side, comparing, and synchronizing

1 Now we add a new nested requirement on Payload Mass on SysML Side such as Average Mass.

2 Again In Connections Search, click the Get All. The connections are generated and can be seen below. Compare the connection with Payload Mass as shown below.

3 The Comparison Result tab shows the difference between SysML (Source) And Simulink Requirement (Target). The result is shown below.

4 Now Sync Source-->Target in Syndeia. Click Yes when prompted.

5 After Sync click the Get All in the Connection Search tab. Here Average Mass connection is generated and can be seen as below.

6 Once Sync is over do compare again for Payload Mass in the Connection Search tab.

7 Click Yes.

8 Here the Sync is complete.

9 Open Simulink Requirements by Reloading the set - for this first Close the already opened Set.

10 Re-open the Requirement Set in Simulink Requirements again.

11 In Simulink, we can see that Average Mass has been synced and added.


1a2: Removing existing child requirements on SYSML side, comparing, and synchronizingFr

The steps for this exercise are as follows.

1 In Requirements package in SysML remove 4.1 Maximum Mass from Payload Mass.

2 Click Delete.

3 In the Connection Search tab, click the Get All button. Compare Source and Target for the Payload Connection as shown below.

4 This Comparison Result does not show Maximum Mass on the SysML side as can been seen in the result for Comparison Result.

5 Sync Source--> Target for the Connection for Payload Mass in the Connection Search tab as shown below.

6 In the Connection Search tab, click the Get All button. Compare the Connection for Payload Mass again.

7 The Compare Result shows Maximum Mass is removed

8 In Simulink, the result is as follows where Maximum Mass requirement is removed.


1a3: Updating text of requirements on SYSML side, comparing, and synchronizing

The steps for this exercise are as follows

1 In the Requirements package in SysML, change the Maximum Mass from 50 kg to 100 kg as shown below.

2 In the Connection Search tab, Click the Get All button. Compare Source and Target for Payload Mass Connection.

3 Comparison Result shows the difference between 100 Kg and 50 kg in the Comparison Result tab.

4 Sync the Payload Mass Connection as shown below in the Connection Search tab.

5 Now Compare Source and Target again for the Payload Mass connection in the Connection Search tab as shown below.

6 In the Comparison Result tab the result is shown below.

7 Open Simulink Requirement Set, Maximum Mass is updated to 100 kg same as the SysML Model value.


1b: SysML package - Simulink requirement set connection

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

  • 1b2: Removing existing requirements from SysML package, comparing, and synchronizing.

1b1: Adding new requirements to SysML package comparing, and synchronizing

The steps for this exercise are as follows

1 Launch Syndeia Dashboard from Model Generation.

2 Select the Model Generation:: Requirements Package in SysML Model and drag and drop the package in your local file system, e.g. folder S1c as shown below. Select Model Transform. Select Yes.

3 Observe the newly created Simulink requirements file Model_Generation_Requirements in the Syndeia Dashboard.

4 In the Connection Search tab, Click the Get ALL button. The connections generated between the SysML requirements and Simulink requirements in the previous step can now be seen, as shown below.

5 In Simulink, the new Simulink Requirement Set is generated as seen below.

6 Now update the SysML Requirement by adding a new Requirement ' Altitude as shown' under the Requirements package.

7 In Connection Search tab for Package “Requirements- Model Generation_Requirements “ package do Compare Source and Target as shown below.

8 In Comparison Result tab result shows that Altitude Connection is not there in Simulink Requirements.

9 Sync the connection for Package “Requirements- Model Generation_Requirements “ in the Connection Search tab as shown below.

10 Compare Source and Target once again on the connection for Package “Requirements- Model Generation_Requirements “.

11 In Comparison Result the result shows the requirement Altitude is updated.

12 In Simulink Requirements the set Simulink_Requirements_for_MagicDraw.slreqx (get it here - SysML Models, Profiles and Mappings) is updated with Altitude.


1b2: Removing existing requirements from the SysML package, comparing, and synchronizing

The steps for this exercise are as follows

We use the steps continuing from above exercise 1b1 Step 12 onwards.

1 Delete the Payload Data Rate requirement from the Requirements package in SysML.

2 In the Syndeia Dashboard Connections Search tab, Click the Get All button. For connection for package ”Requirements- Model Generation_Requirements “ select Compare Source and Target.

3 The Comparison Result tab shows the result as below where Payload Data Rate is present only in Simulink Requirements.

4 Sync the connection for Package ”Requirements- Model Generation_Requirements “ as Sync Source to Target as shown below.

5 Compare again the connection for package ”Requirements- Model Generation_Requirements as shown below.

6 In the Comparison Result tab the result is shown below where Payload Data Rate is not there now.

7 The Simulink Requirement shows no Payload Data Rate requirement.


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 file, and orphan the Syndeia connection. This use case is not supported.

  • No labels