When you want to calculate how long an entity spent between two points in your model. By capturing the elapsed time to a variable, you can plot the results in a Time Series plot (as shown after simulating this model object).
Where to Find the Model Object
The following model object can be found in the model objects directory:
- Reporting \ Calculate Elapsed Time
Difficulty Level
- Ease of Use: Easy
- Ease of Modification: Easy
How to Use the Model Object
- Open Your Model: Open your model or create a new blank model.
- Insert the Model Object into Your Model
- Locate the model object Calculate Elapsed Time and select the insert button.
- Move the cursor to the point of insertion and left mouse-click. The upper left corner of the model object will be inserted at the location of the mouse-click.
- Connect to Your Model: You should see two percentage route routes copied to your model a route to the left and a route to the right.
- Connect the arrival part of the percentage route on the left to the part of your model where you would like to start collecting time information / start tracking time.
- Connect the exit part of the percentage route on the left to the rest of your model.
- Connect the arrival part of the percentage route on the right to the part of your model where you would like to stop collecting time information / stop tracking time.
- Connect the exit part of the percentage route on the right to the rest of your model. The location of the action logic used in this model object can be moved to any location you like. For example, you could assign the start time in an activity and calculate the elapsed time in another activity. Just be aware that in this case, the start time will begin “after” the entity has left the input queue of the first activity. Therefore, any waiting time in the input queue will not be included in the elapsed time.
If you calculate the elapsed time in an activity rather than on the route leaving it, make sure you use a TIME statement in that activity’s action tab because any time assigned on the General tab for that activity will occur “after” the action logic has been executed. Also be aware that, in this case, the calculation will occur “before” entering the activity’s output queue (if you have one assigned).
- Connect the exit part of the percentage route on the right to the rest of your model. The location of the action logic used in this model object can be moved to any location you like. For example, you could assign the start time in an activity and calculate the elapsed time in another activity. Just be aware that in this case, the start time will begin “after” the entity has left the input queue of the first activity. Therefore, any waiting time in the input queue will not be included in the elapsed time.
- Connect the arrival part of the percentage route on the left to the part of your model where you would like to start collecting time information / start tracking time.
- Review Output Report
- Simulate the model.
- Open the Output Report for information on v_Elapsed_Time1 variable.
- Export the variable data by clicking the second Excel icon that will Export Variable Report to Excel.