/
Exercise 10.7 - SysML Requirements -> Simulink Requirements

Exercise 10.7 - SysML Requirements -> Simulink Requirements

Objectives

In this tutorial, we shall cover the following scenarios

  • 1a: Drag and drop a single SysML requirement to a folder. This should generate a requirement model file with a requirement set with a single requirement. The Simulink requirement set should have the same name and be connected to the nearest package of the SysML requirement. Each SysML requirement should be connected to each Simulink requirement.

  • 1b: Drag and drop a single SysML requirement with multiple levels of nested requirements to a folder. This should generate a requirement model file with a requirement set with a single requirement that then has all the multi-level nested requirements. The Simulink requirement set should have the same name and be connected to the nearest package of the SysML requirement. Each SysML requirement should be connected to each Simulink requirement.

  • 1c (Multiple drag and drop): Drag and drop multiple SysML requirements and drop them to a folder. This is an extension of the first two scenarios. A single requirement model with a single requirement set should be created. Now, the user may select SysML requirements from multiple packages.

  • 1d: Drag and drop a SysML package and drop it to a folder. This will collect all the “immediate requirements” in the folder and do the same as S1c. The SysML package should be connected to the resulting requirement set. Note that the package may have other elements too but we just collect the immediate requirements

Preparation

This exercise assumes the student has the following

  • 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 R2019b 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. Drag and drop a single SysML requirement to a folder in Simulink.

Steps are for this exercise are as follows

1 Open Syndeia_Simulink_Examples.mdzip (get it here - SysML Models, Profiles and Mappings)in MagicDraw/Cameo.

2 Locate the Model Generation Package::Requirements Package

3 Launch Syndeia Dashboard from the Model Generation package.

Figure 1: Launching Syndeia Dashboard from the Model Generation package

 

4 In the Connection Manager tab of Syndeia Dashboard, select SysML Repository on the LHS and a folder in your local file system on RHS, eg. SimulinkReqts folder.

Figure 2: Connection Manager tab of Syndeia Dashboard

5 Select a single requirement Autonomous Flight and drag and drop to folder S1a as shown above. Select Model Transform. Select Yes.

Figure 3: Model transform Autonomous Flight requirement to folder S1a

 

6 Observe the newly created Simulink requirements file Model_Generation_Requirements and right-click and Select Open to Launch Simulink and view the requirements.

Figure 4: Newly created requirements file shown in Syndeia dashboard

7 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.

Figure 5: Connection Search tab after clicking Get All

8 Open in Simulink, the requirement Autonomous Flight can now be seen in Simulink, as shown below.

Figure 6: New requirement in Simulink

 

 


1b: Drag and drop a single SysML requirement with multiple levels of nested requirements to a folder.

Steps are for this exercise are as follows

1 Select the Payload Mass requirement as shown in the figure below. It has two nested requirements.

2 Drag and drop to folder S1b in the SimulinkReqts folder on the local machine.

3 Select Model Transform. Select Yes.

Figure 7: Model transform Payload Mass requirement to folder S1b

 

4 In the Syndeia Dashboard, you can observe the new Simulink requirements file generated, as shown below.

Figure 8: Syndeia Dashboard showing new requirements file

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

Figure 9: Connection Search tab after clicking Get All

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

Figure 10: Payload Mass requirement and its the two nested requirements shown in Simulink

1c (Multiple DnD): Drag and drop multiple SysML requirements and drop them to a folder

The steps for this exercise are as follows.

1 Select all the requirements in the Requirements package, and drag and drop them to a folder in your local file system, e.g. folder S1c as shown below. Select Model Transform. Select Yes.

2 This will generate a Simulink requirements file with a requirement set containing the four requirements that were generated. This is seen below in Syndeia Dashboard on RHS.

Figure 11: Syndeia dashboard showing multiple requirements generated in S1c folder

3 In the Connection Search tab, Click the Get All button. The connections generated in the previous step are seen below.

Figure 12: Connection Search tab after clicking Get All

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

Figure 13: New requirements model shown in Simulink

1d: Drag and drop a SysML package and drop to a folder

The steps for this exercise are as follows.

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

Figure 14: Model Transform Requirements package from SysML to folder S1d

2 Select Yes in the dialog box that opens.

Figure 15: Select Yes to generate Simulink requirements from SysML requirements

 

3 Once the model transform is complete in the Syndeia Dashboard below you can see on the RHS that a Simulink requirement Model_Generation_Requirements has been generated.

Figure 16: Syndeia dashboard showing requirements generated

4 In the Syndeia Connection Search tab these connections are generated and can be seen.

5 In Simulink, a Model_Generation_Requirements Set is generated and is as shown below.

Figure 17: Simulink showing new requirements set

 

Related content