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.
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
ActorStoryboard. -
It is overridden by another
Eventin the same scope (Maneuver).
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
Eventtransfers tocompleteStateif the number of executions is equal tomaximumExecutionCount. -
The
Eventtransfers tostandbyStateif the number of executions is lower than the definedmaximumExecutionCount.
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
Eventwith priority override terminates any runningEventin the same scope (Maneuver), when it moves torunningState. A terminatedEventmoves tocompleteStatewithstopTransition, regardless of the number of executions left. -
Skip: A triggered
Eventwith priority skip does not move torunningStateand instead moves tocompleteStateif no number of executions is defined, or there is an execution left. If there is an execution left, theEventincreases the number of executions by one. -
Parallel: A triggered
Eventwith priority parallel moves to therunningStateregardless of the states of otherEventinstances 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.
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, theManeuverGrouptransfers fromrunningStateintostandbyStateand waits until the start trigger is executed. The start trigger is inherited from the enclosingAct. -
If the number of executions is equal to the
maximumExecutionCount, theManeuverGrouptransfers fromrunningStateintocompleteState.
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.
|
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.
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.
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.