Generating Simulink model from SysML activity

Follow the instructions below to generate Simulink model structure from a SysML activity structure.

  1. Open the model Syndeia Simulink Examples.

  2. The Model Generation package is the main package and it contains the following three sub-packages, each of which have a SysML block model (Blocks package) and SysML activity model (Activity package).
    1. Basic Models – SysML block and activity models with primitive / atomic flows
    2. Bus Models – SysML block and activity models with complex / non-atomic flows
    3. LibBlock Models – SysML block and activity models using Simulink library blocks



  3. The instructions presented below are for generating Simulink models from SysML block model in Model Generation::Basic Models::Activity package.

  4. Double click on the Overall Mission activity model to open the activity diagram. It is a multi-level activity structure where Mission A, Mission B, and Mission C activities are further decomposed.



  5. Launch the Syndeia Dashboard for the Activity package. Select a Local File System Repository on the RHS.

  6. Select Model Transform connection type (middle panel), and drag-n-drop the Overall Mission activity to a folder in the local file system repository (RHS).



  7. Click Yes to continue.



  8. Wait for Simulink model to be generated. The log window in the Syndeia dashboard will show several messages as shown below.



  9. Syndeia will finish generating Simulink model structure based on the activity structure of SysML activity. Expand top-level model file (Overall_Mission.slx) to view the structure of the Simulink model that is generated. Then expand the Simulink model Overall_Mission to see the internal details.

     

  10. Syndeia uses the following mapping to generate Simulink model structure from the SysML activity structure.
    1. SysML activity -> Simulink model
    2. SysML activity call behavior actions -> Simulink model references
    3. SysML activity parameter nodes -> Simulink ports
    4. SysML activity object flows -> Simulink lines with signal/bus flows

      Simulink models were generated for each SysML activities in the context of the Overall Mission activity. Call behavior actions ma, mb, and mc of the Overall Mission activity were generated as model references with the same name in the Simulink model. Activity parameter nodes were generated as Simulink ports, and object flows were generated as lines with signal flows.
       
  11.  Right click on the Overall_MIssion.slx file or the Overall_Mission Simulink model in the Syndeia Dashboard and select Open. This will open the newly generated Simulink model in Simulink—after re-arranging the layout to match SysML activity diagram.



  12. Click on the Connection Browser tab in the Syndeia Dashboard, right click on the Activity package and select Refresh. Then, right click on the Activity package again and select Expand All. You should see a model transform connection created between each activity in the structure and the corresponding Simulink model that has been generated. These connections can be used for downstream compare and (potentially) synchronization of SysML and Simulink models.