The aim of the following implementation is not a better speed of execution,
but a better understanding of what is undertaken.
The next to come cha:M/M-Queues will be devoted to M/M
queues. One cannot understand how these queues are special without
a former knowledge of what happens with other laws of service and
arrival. Additionally, U-shaped services are not so uncommon. In all
the following examples, the average inter-arrival is
(say : minutes), and the average service is
.
Example 5.3.1
With very small variances, no waiting process occurs at all. When
using
![$ a\in\left[20\pm2\right]$](img332.png)
and
![$ b\in\left[15\pm1\right]$](img333.png)
, the
successive values of the agenda looks like:
In this example, even the largest service time can't overflow
the shortest inter-arrival time.
Example 5.3.2
When using
![$ a\in\left[20\pm4\right]$](img340.png)
and
![$ b\in\left[15\pm2\right]$](img341.png)
,
there is a (very small) probability that an arrival occurs during
a service, inducing a (small) waiting time for the arriving customer.
In a simulation of

events, concerning

customers,
the following durations have been registered :

in the

state (empty system),

in the

state (one customer being served while the waiting room is empty)
and

in the

state (one customer being served,
while another waits). The corresponding frequency vector is therefore:
Definition 5.3.3
This vector will be referred as the (experimental) occupancy distribution
of the queue. Each entry of this vector gives the ratio of the time
elapsed while a given number of customers were sojourning in the system
by the total time of the observation.
Exercise 5.3.4
Obtain the (exact value of the) probability that an arrival occurs
during a service in the preceeding exercise.
Example 5.3.5
When using
![$ a\in\left[20\pm10\right]$](img351.png)
and
![$ b\in\left[15\pm7\right]$](img352.png)
,
the waiting process increases and one obtained occupancy vector is:
Example 5.3.6
We will now examine with more details the case
![$ a\in\left[20\pm15\right]$](img354.png)
and
![$ b\in\left[15\pm10\right]$](img355.png)
. A simulation
of

customers has given a total duration of

and the following occupancy vector:
On the other hand, the numbers of formerly arrived customers, as registered
by the incoming client (and the corresponding frequencies) were:
The histograms of both frequencies are drawn in fig:Server-versus-customer
where the customer point of view is in light grey, the server one
in medium grey, and the common part in dark grey. This figure shows
how these two points of view are strongly different and appear as
being contradictory, giving an illustration of the number/time paradox
(that will be discussed in sec:number-vs-mass).
FIG. 5.2:
Server side and customer side points of view
|
|
The distribution of the waiting time is given fig:uu-waiting,
where the Dirac relative to
has been drawn as an ordinary
bar, labeled "none".
FIG. 5.3:
Waiting time distribution
|
|
Exercise 5.3.7
In the simulation described above, the following values have been
obtained. Check them for consistency with hypotheses :
Exercise 5.3.8
Check data from exa:uu-simul against Little's theorem.
5.4 The number vs time paradox
Definition 5.4.1
The length of the queue is the total number of customers present in
the system. Period.
Remark 5.4.2
The number of waiting customers is not the length of the queue,
since the later is the number of sojourning customers.
Theorem 5.4.3 (Little)
For any iid arrivals, define
as
the average length of the queue over the time,
as the average
sojourn time of a customer and
as the arrival flow. Then
FIG. 5.4:
Graphical proof of the Little's theorem (from Sinclair, 2006).
|
|
Definition 5.4.4
The "number average" of a quantity related to a
queuing system is what is obtained when using a "one customer,
one vote" scheme (i.e. acting as when computing the average
sojourn time

in thm:Little). On the other hand,
the "time average" of the same quantity is what
is obtained when using a "one time tick, one vote"
(i.e. acting as when computing the average occupancy

in thm:Little).
Definition 5.4.5
Let

be a positive random variable, with probability distribution
function

:
![$ Pr\left(x\in\left[t,\, t+\, \mathrm{d}t\right]\right)=f\left(t\right)\,\, \mathrm{d}t$](img386.png)
.
The "weight distribution" is the pdf of a new positive
variable

, characterized by
In this context, the original pdf will be referred as the "number
distribution" of the variable.
Remark 5.4.6
The normalization factor

in the above formula comes from

.
Proposition 5.4.7 (polydispersity)
Let
be the weight expectation of
(using pdf
) and
be the number expectation
of
(using pdf
). Then:
Preuve.
Obvious from definitions and the well known:

.
Largely in use (
Melcion, 2000), this is nevertheless
a worshiped formula among polymerists.
Definition 5.4.8
When a customer arrives in a busy queue, another customer is being
served. The residual service is the random variable defined as the
delay, observed by the incoming customer, that remains before completion
of the service that was running.
Example 5.4.9
In exa:uu-simul, the data of tab:uu-cumulated-quantities
have been recorded. For example, when a customer arrives in a queue
where 3 clients are yet sojourning, then incoming, busy and yet-waiting
are, respectively, increased by 1, 1, 2.
Therefore, the cumulated sojourn time can be split in two parts :
on the one hand, the sum of
ordinary services (mean
)
and, on the other hand, the sum
residual services. This leads
to
as the (experimental) value of the average residual service,
and to fig:uu-residual for the whole experimental distribution
of the residual service.
TAB. 5.1:
Cumulated quantities (as observed by customers)
|
|
TAB. 5.2:
Cumulated quantities (without makeimage)
| cumulated quantities |
incoming customers |
|
FIG. 5.5:
Experimental distribution of the residual service
|
|
Exercise 5.4.10
When

is great enough, the incoming customer arrive quite uniformly
during the running service, and the weight distribution can be applied.
Determine this distribution when the number distribution is uniform.
Exercise 5.4.11
Determine the distribution to use when assuming that the incoming
customer arrives in an U/U queue when a service is running, but the
waiting room is empty.
Previous: 4. Méthodes de simulation
Up: Aide à la décision
Next: 6. M/M Queues
 
Contents
douillet@ensait.fr
2007-12-26