# Model 7a - Multiple Sequential Activity

## Goals of this lesson

• Learn how to set up the prerequisites for multiple sequential activities

## How-to

Model 7a represents a process which mainly consists of two activities. The first one declares a variable x, which we then use to define the number of iterations for the second activity that will be executed sequentially. This means that the number assigned to x determines how often the sequential activity will be executed.

Figure 1. Model 7a - Multiple Sequential Activity / IYOPRO-Link

### Approach

• First we will define a variable called x which will serve our purposes to determine the number of executions of the sequential activity

• Click the first activity and define the variable x with a value of 5

• Now we set the second activity to be Sequential

• Click the second activity

• Select Sequential from the drop-down-box next to the Multiple Instances property

• To go on make sure you selected Simulation from the Property Set drop-down-box

• Now we need to specify the Number of Iterations of our sequential activity

• Click the Edit button next to the Number of Iterations property under the Must-Have Simulation Parameters

• Enter the variable’s name that we defined in the first activity (x)

### Explanation

We defined a variable x with a value of 5. The Variable x is used to determine the number of the second activity’s iterations. This means the second (sequential) activity will be executed 5 times, before the process proceeds to the end event.

 The Number of Iterations property can contain either a variable (which holds an integer value) or an expression (that evaluates to an integer value). You can assign the value 5 directly or use expressions like `x + 2`, which would be evaluated to 7.

## Report

See below for the run configuration, which we set up to receive the report statistics from below.

### Run configuration

• Stochastic Seed: 12345

• Simulation start date: 1/1/2014 12:00:00 a.m.

• Simulation stop time: 240

• Simulation stop time unit: Hours

### Report statistics

• As we already explained in the model description, the sequential activity will be executed 5 times (depending on our model configuration)

• You can recognize this correlation in the process cycle times

• Each of the two activities last 1 hours (constantly)

• The process' lead time is 6 hours.

• Also check out the activity details in Figure 3

• The run-times of the sequential activity is almost exactly 5 times as big as the run-times of the 1st activity

• Also the concurrently existing activities statistics show that there have been almost 5 sequential activities executed at the same time

• Note that this assumption is only valid, because the bottom process instances start each hour and because the sequential activity lasts one hour

Figure 2. The processing times
Figure 3. The report’s activity details