A significant feature when using Enterprise Architect's SysML simulation is the ability to generate MATLAB Stateflow diagrams to be run under Simulink, allowing you to guide your SysML simulations using StateMachines modeled in Enterprise Architect that are translated to Stateflow diagrams.
The Stateflow diagrams use elements and connectors that have close equivalents to the OMG StateMachine standard, such as States and Transitions. Enterprise Architect supports all the Stateflow features; however, Stateflow only uses a subset of the OMG StateMachine standards.
This is an example of a StateMachine diagram in Enterprise Architect:
This is an example of how the code generated by Enterprise Architect, from the diagram above, is rendered as a Stateflow diagram:
Supported Element Types
The SysML element types that can be translated to StateFlow objects are:
- Choice (converted to Stateflow Junction)
Supported Connector Types
The key SysML StateMachines connector type does have a direct translation to the Simulink connector type 'Transition'.