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 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 connected to the nearest package of the SysML requirement. Each SysML requirement should be connected to each Simulink requirement.
1c (Multiple DnD): Drag and drop multiple SysML requirements and drop 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. This is odd but you can take the nearest package of the first SysML requirement to derive the name of the Simulink requirement set.
1d: Drag and drop a SysML package and drop to a folder. This will collect all the “immediate requirements” in the folder and do the same as S1c. The SysML package should be linked to the resulting requirement set. Note the package may have other elements too but we just collect the immediate requirements
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 R2019b or later installed correctly on his or her machine with a valid license for use.
In this tutorial, we will use the Rhapsody SysML model available as Syndeia_Simulink_Examples_Rhapsody.zip
1a. Drag and drop a single SysML requirement to a folder in Simulink.
The steps are for this exercise are as follows.
1 Open Syndeia Simulink Examples.zip in Rhapsody.
2 Locate the Model Generation Package::Requirement_Sim Package.
3 Launch 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.
5 Select a single requirement Autonomous Flight and drag and drop to folder S1a as shown above. Select Model Transform. Select Yes.
6 Observe the newly created Simulink Requirement Autonomous Flight in Simulink. Right-click and select Open to Launch Simulink and view the requirements.
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.
8 Open in Simulink, the requirement Autonomous Flight can now be seen in Simulink, as shown below.
1b: Drag and drop a single SysML requirement with multiple levels of nested requirements to a folder.
The steps 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 on the local machine. Select Model Transform. Select Yes.
3 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.
4 Open in Simulink, the requirement Payload Mass and the two nested requirements can now be seen in Simulink, as shown below.
1c (Multiple DnD): Drag and drop multiple SysML requirements and drop to a folder
The steps for this exercise are as follows.
1 Select all the requirements in the Requirement_Sim 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 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.
3 Open the Simulink requirements model in Simulink, as shown below to see all requirements.
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:: Requirement_Sim in SysML Model and drag and drop the package in your local file system, e.g. folder S1d as shown below. Select Model Transform. Select Yes.
2 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.
3 In Simulink, a Requirement_Sim is generated and is as shown below.