Assigning Process Variables

Parent Previous Next

Goals of this lesson


Model 3.a explains how to use exclusive gateways for a simulation. Contrary to parallel gateways a branching exclusive gateway needs a condition on every outgoing sequence flow depending on (a) process variable(s). During the simulation the conditions on the outgoing edges will be evaluated to determine exactly one edge as the next path element. You have to ensure that the conditions will determine exactly one sequence flow, otherwise (two or more edges meet the conditions) the simulation results will be useless due to this modeling fault.

But first we will learn how to setup variables and conditions.

Figure 1: Model 3a from the Simulation Tutorial


Setting up variables

To set up conditions you need at least one process variable. We will create two variables called x and y to make the decision at e. g. an exclusive gateway:

  1. Click any activity
  2. Click the Edit button next to the Expression property under the Optional Simulation Properties of the activity
  3. IYOPRO's Expression Editor will show up. Here you can define your variables.
  4. To give an example we will define the variables x and y by putting the following lines into the expression editor (See Figure 2)
    1. x=1; which defines the variable x with a value of 1
    2. y=1; which defines the variable y with a value of 1
  5. These variables are now known to the simulation

Figure 2: Expression Editor - Defining variables

Changing the variables' values

Since our both variables contain the same value, we will alter them

  1. Repeat the steps 1 to 3 for the second activity of the model depicted above
  2. We will now increment x by one and define the new variable z that takes its value from y (See Figure 3)
    1. x=x+1; which increments x's value by 1
    2. z=y; which defines a new variable z that will be given y's value
  3. Our variables have now these values: x = 2, y = 1, z = 1

We can now use them in logical conditions to make decisions at exclusive or inclusive gateways

Figure 3: Expression Editor - Changing variables' values

Creating Stochastic Attributes

Stochastic attributes will increase your model's dynamics and by that make it more realistic. Since they base on a Stochastic Distribution, their values will always change (except for the Constant Distribution).

To use a stochastic variable, we need to define it at an activity:

  1. Make sure, you selected the Simulation option from the Property Set drop-down-box
  2. Click the activity
  3. Click the button right to the Stochastic Attribute Assignment property under Optional Simulation Properties
  4. The Process Attribute Editor shows up (see the picture below)
  5. Click the Add button to add a new stochastic attribute
  6. The Distribution Editor shows up. You will notice, that it is the same Distribution Editor that you already got to know by assigning durations of activities or inter-arrival times of start events.
  7. Now e. g. select the normal distribution with a mean value of 10 and a standard deviation of 3
  8. The variable will be given a name (something like "v1"). You can change this by double-clicking into the Name field. Rename it to X.
  9. You can the use it in decision making at gateways just like the simple variables from above

Figure 4: IYOPRO'S Simulation Process Attribute Editor