When Will You Need This?
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).
The following model object can be found in the model objects directory: Reporting \ Calculate Elapsed Time.
Ease of Use: Easy
Ease of Modification: Easy
How to Use the Model Object
1. Open Your Model
Open your model or create a new blank model.
2. Insert the Model Object into Your Model
1. Locate the model object Calculate Elapsed Time and select the insert button.
2. 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.
3. 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.
1. 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.
1.1. Connect the exit part of the percentage route on the left to the rest of your model.
2. 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.
2.1. 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).
4. Review Output Report
1. Simulate the model.
2. Open the Output Report for information on v_Elapsed_Time1 variable.
3. Export the variable data by clicking the second Excel icon that will Export Variable Report to Excel.
3.1. Choose the location where you would like the Excel file to be saved.
3.2. Choose the variables you would like to export and click OK. Goto the location chosen at step 4.3.1 and open the Excel file.
The reason for using Output Report for exporting variable data is that ir can export more than one million rows of data (Excel limitation), while Output Detailed Report can only export upto 16,382 rows.
The model object is now integrated into your model, you should now be able to save and then simulate the model.
Attributes, Variables, Scenario Parameters and Scenarios Usage
1. a_Start: Do not change.Simulation clock time when the entity enters the Process activity.
1. v_Elapsed_Time1: Do not change. The difference between the current simulation clock time and the start time.