On this page

The State Machine simulation sample projects are available in the built-in Small Tests samples,  in <modeling_tool_installation_directory>\samples\simulation\SmallTestSamples.mdzip or from the Welcome screen under the Simulation group of the modeling tool. In this topic, the focus is on the State Tests section for the State Machine simulation sample projects as follows:

The State Tests section of the Small Tests samples.
  • Do Activity in State

    This test is designed to demonstrate how to use the Do Behavior in model execution. Run the TestState_DoActivity simulation configuration to see how it works.

    The Do Activity in State sample.
  • Guard

    This test is designed to demonstrate how to use Guards on Transitions in model execution. Run the TestState_Guard simulation configuration to see how it works.

    The Guard sample.
  • History

    This test is designed to demonstrate how to use the Composite State with Shallow History and Deep History in model execution. Click the Run button on the diagram toolbar to see how it works.

    The History sample.
  • Regions

    This test is designed to demonstrate how to use the Orthogonal State with Parallel Regions and Entry and Exit Activities in model execution. The Entry Activity is executed immediately after the State Machine is activated before any States in the inner regions. Next, all Initial States in the regions are activated simultaneously. The Regions sample demonstrates that multiple active States are executed at the same time. The Event list in the Simulation Console contains Triggers of all outgoing Transitions of all active States. If one of the parent States’ outgoing Transitions is triggered, the Exit Activity will be executed before the State Machine is deactivated. Click the Run with Context button on the diagram toolbar to see how it works.

    The Regions sample.
  • Timing Events

    This test is designed to demonstrate how to use timing Events in model execution. Both relative time and absolute time are supported (Is Relative=true/false). Click the Run button on the diagram toolbar to see how it works.

    The Timing Events sample.