Skip to content

Latest commit

 

History

History
92 lines (54 loc) · 4.16 KB

README_statistics.md

File metadata and controls

92 lines (54 loc) · 4.16 KB

Statistics results

While running a simulation statistical data is recorded automatically. Statistical data can refer to a station or to a group of clients. Station statistical data is recorded directly at the corresponding stations. Client based data is recorded on the stations where the clients leave the system, i.e. at Dispose stations.

If there is a single client type passing through a single process station the station data recorded at the process station and the client data recorded at the dispose station will match. But if there are multiple client types passing the system on different paths (for example sent to different paths by Decide, DecideCondition or DecideCondition stations) the waiting times and processing times that occur at the individual stations and the waiting and processing time for the individual client type will differ.

Statistic recording classes

There are three classes for recording statistical data:

RecordDiscrete

Objects of this class collect data that can be recorded as individual values, for example the waiting or processing times of the individual clients.

The RecordDiscrete class offers these properties: count, mean, sd, cv, min, max, histogram and histogram_stepwide. While most of them are of the type float, histogram is list[float] and histogram_stepwide is int.

RecordContinuous

Objects of this class collect information on performance indicator offer an continuous available value (but which changes at discrete points in time). For example the number of clients at a station or at a station queue will be recorded using a RecordContinuous object.

The RecordContinuous object offers these properties: time, mean, min and max (all of type float). If value recording is activated, they can be accessed via values (tuple of two lists: time stamps and values).

RecordOptions

Objects of the class RecordOptions are used to record how many clients at a process station with impatience are successful.

The RecordOptions class offers these properties: count and data. count is of type int and data of type collections.Counter.

Statistical data at Process stations

The data recorded at Process stations is available via these properties:

  • process.statistic_station_waiting (type: RecordDiscrete)
  • process.statistic_station_service (type: RecordDiscrete)
  • process.statistic_station_post_processing (type: RecordDiscrete)
  • process.statistic_station_residence (type: RecordDiscrete)
  • process.statistic_success (type: RecordOptions)
  • process.statistic_queue_length (type: RecordContinuous)
  • process.statistic_wip (type: RecordContinuous)
  • process.statistic_workload (type: RecordContinuous)

Statistical data at Dispose stations

The client-based data recorded at Dispose stations is available via these properties:

  • dispose.statistic_client_waiting (type: RecordDiscrete)
  • dispose.statistic_client_service (type: RecordDiscrete)
  • dispose.statistic_client_residence (type: RecordDiscrete)

Examples

If you have model containing a Process station which can be accessed via the variable process and a Dispose station which can be accessed via the variable dispose you can output the mean queue length a the process station by writing:

print("E[N_Q]=", process.statistic_queue_length.mean)

The mean waiting time of the clients leaving the system at dispose (summed up over all process stations the clients have passed) can be output by:

print("E[W]=", dispose.statistic_client_waiting.mean)

Helper functions

If you have a model Dict containing the keys Source, Process and Dispose like this

model={'Source': source, 'Process': process, 'Dispose': dispose}

you can generate a string containing all statistical data by writing:

from queuesim.models import mmc_results

model={'Source': source, 'Process': process, 'Dispose': dispose}
print(mmc_results(model))

A model Dict like described above will be created for example by the helper functions

  • mmc_model
  • mmc_model_priorities
  • impatience_and_retry_model_build

from queuesim.models.