Objectives
...
SysML state behaviors and transition effects must be modeled as opaque behaviors.
SysML transition triggers must be time events.
SysML transition guards are strings.
Figure 1 SysML Starter Model
The SysML model ThreeStates Plus is found in the Syndeia Tutorial Testbed.mdzip (get it here -SysML Models, Profiles and Mappings) file in the Three State Model with Behaviors package and may be inspected for the exact treatment of these features.
Exercise
If not already open, open the Syndeia Tutorial Testbed.mdzip(get it here -SysML Models, Profiles and Mappings) model and launch the Syndeia dashboard from the Three State Model with Behaviors package. Select a Syndeia Cloud project if necessary. Go to the Settings tab. Check the Generate/compare state and transition behaviors and Synchronize state and transition behaviors checkboxes, as shown in Figure 2.
Figure 2 Syndeia Settings tab
Go to the Connection Manager tab. Expand your SysML model in the left column to show the ThreeStates Plus state machine and your local operating system on the right side to show the empty destination folder (1_Demo_ Stateflow with Behaviors in Figure 3).
Figure 3 Syndeia Dashboard, Connection Manager tab
Select Model Transform for Connection Type in the central column. Drag and drop the ThreeStates Plus state machine onto the destination folder in the local operating system. Click Yes to confirm. When complete, expand the newly-created Simulink Model to view new Stateflow State Chart and its contents, as shown in Figure 4.
Figure 4 Syndeia Dashboard, Connection Manager tab, after generation of state machine structure in the local file system (red highlight shows ThreeStates Plus.slx Simulink model).
In the Connection Manager, right-click the ThreeStates Plus.slx Simulink model (see red highlight in Figure 4) and choose Open. Double-click the state chart symbol to see the states and transitions (Figure 5).
Figure 5 ThreeStates Plus Statechart
In the Syndeia dashboard Connection Browser tab, expand the SysML model to show the connections for the ThreeStates Plus state machine, as highlighted in Figure 6. Right-click the row and select Compare Source & Target.
Figure 6 Syndeia dashboard, Connection Browser tab, new connection between state machines
The Comparison Results are shown in Figure 7.
Figure 7 Syndeia Comparison Results after model transform.
Make some changes to the state behaviors or transition characteristics and repeat Compare Source & Target. The differences should appear similar to Figure 8.
Figure 8 Syndeia Comparison Results after minor changes to Stateflow model
...