Package Modelica.​StateGraph.​Examples
Examples to demonstrate the usage of the components of the StateGraph library

Information

This icon indicates a package that contains executable examples.

Extends from Modelica.​Icons.​ExamplesPackage (Icon for packages containing runnable examples).

Package Contents

NameDescription
ControlledTanksDemonstrating the controller of a tank filling/emptying system
ExecutionPathsExample to demonstrate parallel and alternative execution paths
FirstExampleA first simple StateGraph example
FirstExample_Variant2A variant of the first simple StateGraph example
FirstExample_Variant3A variant of the first simple StateGraph example
ShowCompositeStepExample to demonstrate parallel activities described by a StateGraph
ShowExceptionsExample to demonstrate how a hierarchically structured StateGraph can suspend and resume actions on different levels
UtilitiesUtility components for the examples

Model Modelica.​StateGraph.​Examples.​FirstExample
A first simple StateGraph example

Information

This icon indicates an example. The play button suggests that the example can be executed.

Extends from Modelica.​Icons.​Example (Icon for runnable examples).


Model Modelica.​StateGraph.​Examples.​FirstExample_Variant2
A variant of the first simple StateGraph example

Information

This icon indicates an example. The play button suggests that the example can be executed.

Extends from Modelica.​Icons.​Example (Icon for runnable examples).


Model Modelica.​StateGraph.​Examples.​FirstExample_Variant3
A variant of the first simple StateGraph example

Information

This icon indicates an example. The play button suggests that the example can be executed.

Extends from Modelica.​Icons.​Example (Icon for runnable examples).


Model Modelica.​StateGraph.​Examples.​ExecutionPaths
Example to demonstrate parallel and alternative execution paths

Information

This is an example to demonstrate in which way parallel activities can be modelled by a StateGraph. When transition1 fires (after 1 second), two branches are executed in parallel. After 6 seconds the two branches are synchronized in order to arrive at step6.

Before simulating the model, try to figure out whether which branch of the alternative sequence is executed. Note, that alternatives have priorities according to the port index (alternative.split[1] has a higher priority to fire as alternative.split[2]).

Extends from Modelica.​Icons.​Example (Icon for runnable examples).