8.5 Init section execution

The init section of a scenario defines actions to set entity states or global states providing initialization to a simulation. These actions are handled in the init phase prior to the execution of the StoryboardElement instances.

The order of the actions in the InitActions section is not translated into an execution order at runtime. All actions in init shall run concurrently and conflicts shall be handled according to the conflict solving guidelines provided in Section 7.5.1, "Conflicting actions".

8.5.1 Running actions in the init phase

The actions defined in init are handled prior to the execution of the Storyboard. Because the simulation time starts with the execution of the Storyboard (see Section 8.4.7, "Execution of a storyboard"), the init phase does not consume simulation time. All types of Action may be used in init, even those that require elapsed simulation time to fulfill their designated goal, meaning that they cannot be executed instantaneously.

8.5.1.1 Handling of instantaneous actions

During the init phase, those actions that may be applied instantaneously are instantiated, executed, and reach the completeState.

image
Figure 46. State machine evolution for instantaneous actions during the init phase

Figure 46 shows how instantaneous actions transition through the init phase.

8.5.1.2 Handling of non-instantaneous actions

During the init phase, those actions that require elapsed time to fulfill their goals, for example, instances of non-instantaneous actions, are instantiated and moved to runningState. These actions are left in runningState and are applied once the simulation starts with the execution of the Storyboard. During Storyboard execution, they shall be treated like any other actions that are instantiated during event execution. They may create conflicts with any newly created action and may be overridden by such an action. Non-instantaneous motion control actions shall assign the motion control strategy in the init phase.

image
Figure 47. State machine evolution for non-instantaneous Actions during the init phase

Figure 47 shows how non-instantaneous actions transition through the init phase.