/
Exercise 10.9 - Simulink Requirements -> SysML Requirements.

Exercise 10.9 - Simulink Requirements -> SysML Requirements.

Objectives

In this tutorial, we shall cover the following scenarios

  • 1a: Drag and drop a single Simulink requirement (has no child requirements) to a SysML package. This will generate a requirement in SysML (with nested requirements if the Simulink requirement had nested requirements). The SysML package will be connected to the requirement set, and each SysML requirement will be connected to the Simulink requirement.

  • 1b: Drag and drop a single Simulink requirement (with multiple levels of nested child requirements) to a SysML package. This will generate a requirement in SysML with nested requirements The SysML package will be connected to the requirement set, and each SysML requirement will be connected to the Simulink requirement.

  • 1c (Multiple DnD): Drag and drop multiple Simulink requirements in a requirement set to a SysML package. This will generate corresponding requirements in SysML (with nested requirements if Simulink requirement had nested requirements). The SysML package will be connected to the requirement set, and each SysML requirement will be connected to the Simulink requirement.

  • 1d: Drag and drop a Simulink requirement set to a SysML package. This will generate a new SysML package corresponding to the Simulink requirement set. The SysML package will be connected to the requirement set, and each SysML requirement will be connected to the Simulink requirement.

Preparation

This exercise assumes the student has

  • Rhapsody 8.4 installed correctly on his or her machine with a valid license for use.

  • Syndeia 3.3 installed as a plugin for Rhapsody 8.4 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.

  • In this tutorial, we will use the Simulink requirement model generated in https://intercax.atlassian.net/wiki/spaces/SYN34/pages/2409183839

1a: Drag and drop a single Simulink requirement

The steps for this exercise are as follows

1 Open Syndeia Simulink Examples (Get it here - https://intercax.atlassian.net/wiki/spaces/SYN34/pages/2409179289) in SysML Rhapsody.

2 Locate the package Model Generation:: FromSimR and see package S1d.

3 This appears as shown below.

Figure 1: Package S1d in SysML

4 Launch Syndeia Dashboard from Model Generation Package.

Figure 2: Connection Manager in Syndeia Dashboard

5 In Simulink, we have Requirement_Sim Set which we have obtained from Feature 1c Step 4 of Tutorial https://intercax.atlassian.net/wiki/spaces/SYN34/pages/2409183839

From the Simulink Requirements folder on the local computer for eg here S1c, from the Requirement_Sim set we drag and drop a single requirement Autonomous Flight requirement to S1d Package in Rhapsody.

Figure 3: Requirement_Sim set in Simulink

6 Observe the newly created SysML requirement Autonomous Flight in SysML package S1d in from Simulink Requirements.

Figure 4: New Autonomous Flight SysML requirement shown in Connection Manager

7 In the Connection Search tab, click Get ALL, and a new connection for Autonomous Flight is created and can be seen here.

Figure 5: Connections shown in Connection Search tab

8 In SysML Rhapsody this appears as shown below.

Figure 6: New Requirement in SysML Containment Tree

1b: Drag and drop a single Simulink requirement (with multiple levels of nested child requirements) to a SysML package

The steps for this exercise are as follows

1 In Syndeia Dashboard, select Payload Mass from Simulink requirements Requirement_Sim set from the local folder for eg S1c here, and drag and drop this to the S1e package of SysML Rhapsody as shown below. Select Model Transform. Select Yes.

Figure 7: Model Transform Payload Mass requirement from Simulink requirements to Package S1e

2 In the Syndeia Dashboard you can observe the new SysML requirement Payload Mass and the two nested requirements also generated.

Figure 8: New SysML requirement Payload Mass and nested requirements shown in Syndeia Dashboard

3 In the Connection Search tab, click the Get All button. The connections between SysML requirements and Simulink requirements generated in the previous step can be seen.

4 In SysML Rhapsody requirement Payload Mass and the two nested requirements can be seen. This appears as shown below.

Figure 9: SysML containment tree showing new requirement Payload Mass and nested requirements

1c (Multiple DnD): Drag and drop multiple Simulink requirements in a requirement set to a SysML

The steps for this exercise are as follows

1 Continuing with the same Simulink Requirements Requirement_Sim set from the local folder for eg S1c here, we select multiple requirements, and drag and drop them to package S1F in SysML Rhapsody Model.

Select Model Transform. Select Yes.

Figure 10: Model transform all requirements from Simulink requirements set Requirement_Sim to package S1f

2 In the Syndeia Dashboard you can observe the new SysML requirements generated.

Figure 11: Syndeia dashboard showing new requirements in SysML

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

4 In SysML Rhapsody all the requirements generated can be seen. this appears as shown below.

Figure 12: New requirements shown in SysML containment tree

1d: Drag and drop a Simulink requirement set to a SysML package.

The steps for this exercise are as follows

1 Here we drop the entire Requirement_Sim set from Simulink Requirements from the local folder for eg here S1c, to the SyML Rhapsody Package S1g as shown below.

Figure 13: Model transform Simulink requirements set Requirement_Sim to package S1g

2 In the Syndeia Dashboard you can observe the new SysML requirements package Requirement_Sim with all requirements.

Figure 14: Syndeia dashboard showing new requirements

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

4 In the SysML Rhapsody model all the requirements and the Requitement_Sim package generated can be seen. This appears as shown below.

Figure 15: SysML containment tree showing new requirements

 

Related content