Model 12 - Scripted Delay

Parent Previous Next

Goals of this lesson


Model 12 shows a work day process. The work starts at 9 a.m. and has several pauses. After each pause the branching Gateway checks, whether the simulation time is past 5 p.m. If this condition evaluates to true the process terminates at the end event, otherwise the process will return to the task.


With the tools described until now, we are not able to define an exact time (or date), to start a process. That's what Scripted Delay was developed for. It enables the user to define a point in time, when something should happen depending on the simulation time. The denotation Scripted Delay originates from the programming language Python, that is used here.


How-to


Figure 1: Model 12 - Scripted Delay / IYOPRO-Link


Approach

  1. We will define the scripted inter-arrival time at the start event first.
  2. Parametrize the two timer events, that are attached to the activity "Work"
  3. Create the conditions for the branching gateway


Scripted inter-arrival time


Figure 2 - Assigning the starting time for the start event



Configuring the attached events


Figure 3 - Assigning the arrival time of event "Quit working for today"



The conditions at the exclusive gateway


Figure 4 - The conditions at the branching exclusive gateway



Explanation

As described in the introduction of this lesson, we modeled a simple work-from-9-5-process.

  1. The process starts at 9 o'clock
  2. The "Work" activity is being executed for 8 hours
  3. There are two events attached to the activity
    1. "Have a break" will be executed 1 hour after the activity has been started
      1. The process then executes the "Have a break" activity
      2. Afterwards (at the gateway) it decides whether to work on
      3. This again depends on the current time. If it is past 17 o'clock the process will finish
      4. 'Elsewise it will return to the "Work" activity
    2. At the "Quit working for today" event the simulation checks the Python script
      1. If the time is past 17 o'clock, the event will be executed instantaneously
      2. Else it will be scheduled to 17 o'clock