### Example 8.4

For our lathe example let us suppose we wish to record the total time each job spends in the system. This cannot be decided from the process_time alone because of the indefinite waiting time in the queue. We would modify the model as shown in Fig. 8.8 :

In the `ATTRIBUTES' element we would have to declare the attribute `time_in'.

It is also quite common to need to know the time interval between successive entities passing a `TALLY' block and a second special function `BETWEEN' (which can be shortened to `BET' is available for this purpose. No parameters are required for this function and the `TALLY' block only requires its ID.

To use the `TALLY' block also requires the experiment frame element `TALLIES'. This element requires the user to give each tally in the system a unique identifier in the form of a number and name. As with other ID's you can use the number and name interchangeably. The name serves also as the label for the summary report.

A second useful feature of the `TALLIES' element is the possibility to declare an output file which is an external disk file into which each individual observation and the simulation time at which it occurred can be recorded. You can use any DOS acceptable filename and extension but since the output processor automatically looks for the extension `.DAT' we recommend you use this if possible. The `TALLIES' element requires that you enclose the filename in quotation marks as in for example "SYSTIME.DAT". If you do not include a disk file name then only the summary statistics are recorded.

The `DSTATS' element, short for Discrete Statistics, is used to collect data about any time dependent ARENA attribute, variable or special function. The operation of the element is very simple with three basic editing options `Insert', `Change' and `Delete'. On selecting either `Insert' or `Change' five options are presented (Number, SIMAN expression, Name, Output file and `Report ID'). The SIMAN expression can be any valid expression involving attributes and variables or one of the special functions (see appendix B) such as NR(lathe) to record the number of active lathe resources.

It is tempting to use the output file to record time persistent statistics for all parameters but remember this can consume a very large quantity of disk space.