8.4 Storyboard element execution

8.4.1 Execution of an action

An Action instance enters runningState when the parent Event enters runningState. An Action transfers into completeState either when its execution is stopped or when it ends regularly, as shown in Figure 39. stopTransition may be used for different reasons.

image
Figure 39. State diagram for an action

8.4.2 Execution of an event

An Event enters standbyState when its enclosing Maneuver is started and enters runningState, as shown in Figure 40. When the start trigger of the Event is executed and the priority allows execution, the Event enters runningState. An Event that lacks its own start trigger inherits the start trigger from its parent Act.

While in runningState, the Event ends regularly when every nested Action is completed. The Event transfers to completeState with stopTransition under two conditions:

  • A stop trigger is issued by the enclosing Act or Storyboard.

  • It is overridden by another Event in the same scope (Maneuver).

image
Figure 40. State diagram for an event

8.4.2.1 Execution count

The number of executions of an Event is represented as the sum of the number of startTransitions and skipTransitions.

When the Event is about to transfer out of runningState with endTransition, two things may happen:

  • The Event transfers to completeState if the number of executions is equal to maximumExecutionCount.

  • The Event transfers to standbyState if the number of executions is lower than the defined maximumExecutionCount.

If in standbyState and the number of executions is equal to the number stated by maximumExecutionCount, the Event transfers to completeState with skipTransition.

8.4.2.2 Event priority

  • Override: A triggered Event with priority override terminates any running Event in the same scope (Maneuver), when it moves to runningState. A terminated Event moves to completeState with stopTransition, regardless of the number of executions left.

  • Skip: A triggered Event with priority skip does not move to runningState and instead moves to completeState if no number of executions is defined, or there is an execution left. If there is an execution left, the Event increases the number of executions by one.

  • Parallel: A triggered Event with priority parallel moves to the runningState regardless of the states of other Event instances in the same scope (Maneuver).

8.4.3 Execution of a maneuver

A Maneuver enters runningState as soon as its enclosing ManeuverGroup is started. In this state, all nested Event instances are set to standbyState and wait for their start trigger, as shown in Figure 41.

The Maneuver completes when all nested Event instances have entered the completeState or when the Maneuver is stopped by an issued stop trigger from the enclosing Act or Storyboard.

image
Figure 41. State diagram for a maneuver

8.4.4 Execution of a ManeuverGroup

ManeuverGroup instances are set to runningState when their enclosing Act enters runningState. At this point, the nested Maneuver instances are set to runningState.

A ManeuverGroup ends regularly when all its Maneuvers are completed.

The number of executions of a ManeuverGroup corresponds to the number of startTransitions performed from the standbyState to the runningState. The ManeuverGroup transfers out of the runningState depending on the number of executions:

  • If the number of executions is smaller than maximumExecutionCount, the ManeuverGroup transfers from runningState into standbyState and waits until the start trigger is executed. The start trigger is inherited from the enclosing Act.

  • If the number of executions is equal to the maximumExecutionCount, the ManeuverGroup transfers from runningState into completeState.

When the ManeuverGroup resides either in runningState or in standbyState, it may be stopped by a stop trigger that is issued by its enclosing Act or its Storyboard. When stopped, the ManeuverGroup transfers to completeState regardless of the number of execution counts left.

ASAM OpenSCENARIO allows empty ManeuverGroup instances. Figure 42 clarifies that in this case, the ManeuverGroup ends instantly and directly transfers to completeState without being started.
image
Figure 42. State diagram for a maneuver group

8.4.5 Execution of an act

An Act is set into standbyState as soon as its enclosing Story is started. When the start trigger of the Act is executed, the Act enters runningState, as shown in Figure 43. The nested ManeuverGroup instances transfer to runningState. If no start trigger is defined, the act starts when its enclosing Storyboard enters runningState.

The Act may be stopped by its stop trigger or by the stop trigger in the enclosing Storyboard and let the Act transfer to completeState.

The Act ends regularly and enters completeState when all nested ManeuverGroup instances are completed.

image
Figure 43. State diagram for an act

8.4.6 Execution of a story

A Story is started and set into runningState when its enclosing Storyboard starts and enters runningState, as shown in Figure 44. Nested Act instances with start triggers are set to standbyState, while nested Act instances without start triggers are set to runningState.

The execution of a Story is stopped when the enclosing Storyboard issues a stop trigger. The execution transfers from runningState into completeState when all nested instances of Act are completed.

image
Figure 44. State diagram for an Story

8.4.7 Execution of a storyboard

The Storyboard enters runningState when the simulation starts, as shown in Figure 45. This marks the start of the simulation time. Nested Story instances are started and set into runningState. A Storyboard does not transfer to completeState when all its nested stories are complete. A Storyboard only transfers to completeState with a stopTransition when its stop trigger is executed. If no stop trigger is defined, the storyboard will never enter completeState. Simulation tools can use this behavior to explicitly stop the simulation.

A Storyboard instance is able to run without defined stories, for example, when it is empty.

image
Figure 45. State diagram for a storyboard