**Classification tags**: business operations management, DES, next-event time progression, activity-based process modeling

The potentially relevant object types are:

- customers,
- service desks,
- service queues,
- service clerks.

Potentially relevant types of events are:

- customer arrivals,
- customers queuing up,
- customers being notified/invited to move forward to the service desk,
- service performances,
- customer departures.

Notice that *service performances* are * activities*, which consist of a start and an end event.

Both object types and event types, with their participation associations, can be visually described in a UML class diagram, as shown below.

ON (event type) | DO (event routine) |

customer arrival | if service desk is busy, then customer queues up else start a new service performance |

end of service performance | the served customer departs; if there are still customers waiting in the queue, then start next service performance |

In this 3rd variant of our Service Desk queuing model, we model a service performed
by the service desk as an ** activity** in the sense of a business process activity.
Activities are special types of events having some duration and using resources. Their duration may
be either preset to a fixed value or to a random value (in which case they have a scheduled end),
or it may be determined by the occurrence of an activity end event that is caused by another
simulation event (in which case they have an open end).

A computational design for the purpose of computing the two statistics *maximum queue length*
and *service utilization* is obtained by modeling the following types of objects, events and activities:

- One object type:
with one (integer-valued) attribute`ServiceDesk`

`queueLength`

. - One event type:
with a reference property`CustomerArrival`

`serviceDesk`

having the class`ServiceDesk`

as range. As an exogenous event type,`CustomerArrival`

has a`recurrence`

function representing a random variable for computing the time in-between two subsequent event occurrences. - One activity type:
having a resource association with the object type`PerformService`

`ServiceDesk`

and a function`randomDuration`

representing a random variable for computing the duration of a service (as a`PerformService`

activity).

By modeling the service as a `PerformService`

activity, we get the service desk utilization
statistics for free, since utilization statistics are computed automatically by a simulator supporting
activity modeling due to its implementation of the general semantics of activities.

The object types, event types and activity types described above, together with their participation associations, are visually described in the following UML class diagram:

Since both the `recurrence`

of `CustomerArrival`

events and the `serviceDuration`

of `ServicePerformance`

activities are *exponentially* distributed,
this model corresponds to what is called an M/M/1 queue in Queueing Theory.
It is well-known that for the variable *a* denoting the customer arrival rate and *s* denoting the service performance rate,

- the system is only stable if
*a < s*; - the utilization is
*a / s*; - the average cycle time (the average time a customer spends in the system) is
*T = 1 / (s - a)*; - the average number of customers in the system is
*N = aT*(this is Little's law).

Notice that these theoretical results can be used for validating the implemented simulation model, e.g., by comparing its computed utilization
with the theoretical utilization *a / s*, which would be 1 since in the model *a = s = 0.5*.

ON (event type) | DO (event routine) |

CustomerArrival( sd) @ t |
INCREMENT sd.queueLength IF sd.queueLength = 1 THEN SCHEDULE ActivityStart("PerformService", sd) @ (t+1) |

ActivityEnd("PerformService", sd) @ t |
DECREMENT sd.queueLength IF sd.queueLength > 0 THEN SCHEDULE ActivityStart("PerformService", sd) @ (t+1) |

- ServiceDesk-1: A service queue model
(one service and one queue) with two statistics:
*maximum queue length*and*service utilization*. The model abstracts away from individual customers and from the composition of the queue. - ServiceDesk-2: A service queue model
(one service and one queue) with one statistic: the Mean Response Time, which is the average length of time
a customer spends in the system from arrival to departure. For recording their arrival time, individual
customers are represented explicitly in a
*waitingCustomers*queue. - ServiceDesk-4: A service queue model where the
service desk is modeled as a processing node of a processing network that has an entry node and
an exit node for arriving and departing customers. The model is based on the pre-defined
*Processing Network*concepts: WorkObject, Arrival, EntryNode, ProcessingNode and ExitNode, such that processing objects 'flow through the system'. - ConsecutiveServices: An activity-based service queue model of two consecutive service providers with customer waiting lines.
- ProcessingNetwork-1: A service queue model
where service providers are modeled as processing nodes (with input queues) within a processing network
that has an entry node and an exit node for arriving and departing customers. The model is based on
the pre-defined
*Processing Network*concepts: WorkObject, Arrival, EntryNode, ProcessingNode and ExitNode, such that processing objects 'flow through the system'.

- Queueing_Simulation_Discrete_Event: This NetLogo simulation uses NetLogo's tick-advance primitive to advance simulation time by non-integral amounts. However, NetLogo's standard ticks display is unable to display non-integral values, so a custom ticks display has to be programmed. Copyright 2010, Nick Bennett.