WOLFRAM SYSTEM MODELER

ExecutionPaths

Example to demonstrate parallel and alternative execution paths

Diagram

Wolfram Language

In[1]:=
SystemModel["Modelica.StateGraph.Examples.ExecutionPaths"]
Out[1]:=

Information

This information is part of the Modelica Standard Library maintained by the Modelica Association.

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]).

Components (23)

step0

Type: InitialStep

Description: Initial step (= step that is active when simulation starts)

transition1

Type: Transition

Description: Transition where the fire condition is set by a modification of variable condition

step1

Type: Step

Description: Ordinary step (= step that is not active when simulation starts)

transition2

Type: Transition

Description: Transition where the fire condition is set by a modification of variable condition

step6

Type: Step

Description: Ordinary step (= step that is not active when simulation starts)

step2

Type: Step

Description: Ordinary step (= step that is not active when simulation starts)

transition3

Type: Transition

Description: Transition where the fire condition is set by a modification of variable condition

transition4

Type: Transition

Description: Transition where the fire condition is set by a modification of variable condition

step3

Type: Step

Description: Ordinary step (= step that is not active when simulation starts)

step4

Type: Step

Description: Ordinary step (= step that is not active when simulation starts)

transition5

Type: Transition

Description: Transition where the fire condition is set by a modification of variable condition

transition6

Type: Transition

Description: Transition where the fire condition is set by a modification of variable condition

step5

Type: Step

Description: Ordinary step (= step that is not active when simulation starts)

setReal

Type: RealExpression

Description: Set output signal to a time varying Real expression

transition7

Type: TransitionWithSignal

Description: Transition where the fire condition is set by a Boolean input signal

setCondition

Type: BooleanExpression

Description: Set output signal to a time varying Boolean expression

transition4a

Type: Transition

Description: Transition where the fire condition is set by a modification of variable condition

step4a

Type: Step

Description: Ordinary step (= step that is not active when simulation starts)

transition6a

Type: Transition

Description: Transition where the fire condition is set by a modification of variable condition

NumericValue1

Type: RealValue

Description: Show Real value from numberPort or from number input field in diagram layer dynamically

alternative

Type: Alternative

Description: Alternative splitting of execution path (use component between two steps)

Parallel1

Type: Parallel

Description: Parallel splitting of execution path (use component between two transitions)

stateGraphRoot

Type: StateGraphRoot

Description: Root of a StateGraph (has to be present on the highest level of a StateGraph)