 We did not cover gateway and resource details of the report, because our example model did not use any gateways or resources.
 That is why we extend our simulation model by gateways and resource demand now, see the figure below.
 The organization diagram (resources) is shown next to the model.
 Dave is the boss, Eugene is the project manager, and Jim and John are the programmers.


Figure 1: The example model

Figure 2: The Organization diagram

Process description:
 Our process starts at 8 o'clock every day.
 The first task is to check whether a task for a programmer and a boss is available.
 We use stochastic variables to accomplish this.
 We assume: there is a chance of 50% that a task for each of the resources is available.
 So all we need is a stochastic variable using a discrete uniform distribution with
 the minValue = 0 and the maxValue = 1.
 "0" stands for "not available"; "1" stands for "available".
 At the inclusive gateway we want work to be done depending on the task availability for both human resources.
 Therefore we add an expression (condition) to the nondefault sequence flows behind the gateway.
 At the top sequence flow we check whether our "taskProgr"variable equals "1".
 If it does, there is a task for a programmer available
 otherwise there is no task for a programmer.
 We do the same for the boss' task.
 If both expressions do not evaluate to true, the default sequence flow will be executed.
 Depending on the evaluation of the expressions at least one of the activities after the gateway will be carried out.
 The activities "Programmer working" and "Boss working" have also been assigned one participant each: Programmer and Boss.
 In the end the second inclusive gateway waits for all "live" tokens to reach it.
 The process finishes after this.
Check the Model parametrization from below and then advance to the Gateway and Resource details. Since we have already covered the first three sections of the report in the topics before, we will neglect those now. Instead we only focus on the new sections.
BPMN Element

Simulation Properties

Start event

Scripted Delay: "Result=time.GotoHour(8);" (enter this Pythonscript without the "")
This scripted delay starts the process every day at 8 o'clock.

Activity "Check available workers"

Duration: Constant Distribution with value = 0.25
Stochastic Attribute:
 progr = Discrete Uniform Distribution with the values for min = 0 and max =1
 boss = Discrete Uniform Distribution with the values for min = 0 and max = 1

Activity "Programmer working"

Duration: Poisson Distribution with a mean value of 8
Participant: Programmer

Activity "Boss working"

Duration: Continuous Uniform Distribution with LowerBorder = 6 and UpperBorder = 8
Participant: Boss

Activity "Note that nobody is working"

Duration: Constant Distribution with value = 0.25

Edge "Task for Programmer available"

Expression: f(x)= taskProgr==1;

Edge "Task for Boss available"

Expression: f(x)= taskBoss==1;

Edge "No task available"

Just a default sequence flow.

General Simulation Properties

Stochastic Seed

12345

Simulation stop time (hours)

240
