Professional Documents
Culture Documents
Sim2 RD11
Sim2 RD11
Assignment - 2
Q1) Discuss in Detail Queuing and its significance in Data Analytics. Queueing
If all of the „servers‟ are busy when new customers arrive, these will generally wait in
line for the next available server. Simple queueing systems are defined by specifying the
following (a) the arrival pattern, (b) the service mechanism, and (c) queue discipline.
From the probabilistic point of view, properties of queues are usually derived from the
properties of stochastic processes associated with them.
However, in all but the simplest queues, determination of the state probabilities is
extremely difficult. Often, however, it is possible to determine their large time limit,
the so-called equilibrium or steady-state distribution. This distribution does not depend
on the initial conditions of the system and it is stationary.
The ergodic conditions give the restrictions on the parameters under which the system
will eventually reach the equilibrium. For the most part, queueing theory deals with
computations of the steady-state probabilities and their use in computing other (steady-
state) measures of performance of the queue. When only the expected values are
required, an extremely useful formula for systems in equilibrium is Little's law.
Most of the vast effort in queueing theory has been devoted to the probabilistic
development of queueing models and to the study of its mathematical properties; that
is, the parameters governing the models are, for the most part, assumed given.
Statistical analyses, in which uncertainty is introduced, are comparatively very scarce.
Since Bayesian analyses are insensitive to (no informative) stopping rules, all that it is
required from the data is a likelihood function, which combined with the prior
distribution on the parameters produces the posterior distribution from which
inferences are derived.
However, it is also possible to keep the parallelism with a likelihood analysis and to avoid the
incorporation of further subjective inputs, by carrying out a Bayesian analysis usually called
„objective‟ because the prior distribution used is of the „non-informative‟ or „objective‟ type.
From the posterior distribution, computation of estimates and standard errors is immediate.
Also ,probabilities of direct interest( like the probability that the ergodic condition
holds)can be computed.
Most importantly, restrictions in the parameter space imposed by the assumption of
equilibrium are readily incorporated into the analysis. Prediction of measures of congestion of
the system (number of customers waiting, time spent queuing, number of busy servers, and so
on) is carried out from the corresponding predictive distributions which are also very useful for
design and intervention in the system.
Data Generation A simulation model of a multi-server system with a single queue is built
using the simulation software ARENA (Kelton et al. 2010). The objective is to create a generic
model that mimics the behavior of real systems that operate with opening and closing of the
system. While a number of empirical studies have shown that service times are lognormal with
different coefficients of variation, there is no similar evidence on the arrival times
(Mandelbaum and Schwartz 2002; Cayirli and Veral 2003).
Inter-arrival times of customers are thus still often assumed to be exponential given the
dearth of empirical evidence to suggest otherwise (Law and Kelton 2000). Therefore, in this
study, we model inter-arrival times as exponential and service times as lognormal. Our
model can however be extended fairly easily to include non-exponential inter-arrival times
and/or systems with non-stationary mean arrival and service rates. Following the results of
a previous study (Yang et al. 2014), four independent factors are chosen to represent systems
with opening and closing of the system: (i) number of servers, (ii) mean arrival load, (iii) target
session length, and
(iv) service time variability (i.e., coefficient of variation).
To consider their impact on the system performance, these factors are modeled at 10 different
values. The number of identical servers is examined from 1 to 10 servers. The mean arrival load
isexaminedfrom60to100%ofthetotalservers‟capacitytorepresentsystemsthatoperateat
different utilization.
The target session length is examined from 10μ to 50μ time units per session. Once this target
session length is reached, new arrivals are denied entry into the system but the actual session
ends only after the last customer in the system is served. With no loss of generalizability to
other μ, the service times of customers are assumed with a mean of μ= 1 and a coefficient of
variation (CV) of 0 to 0.8.
The simulation model is run to collect performance measures of the multi-server
system for 750 environments that are represented by combinations of the four
independent variables, namely the number of servers in the system (NS), mean arrival load
(AL), target session length (SL), and coefficient of variation of service times (CV),
Page|4
as shown in Table 1. For each environment, the simulation model is run for 20,000 clinical
sessions to collect the mean performance measures within 1% of the point estimates at 95%
confidence level. The three collected performance measures, i.e. dependent variables, include
the mean queue length 2 , probability of no waiting on arrival 3 , and mean overtime per
customer served 4 .
Arrival process: describes how the customers arrive to the system, and the
distribution of the customers‟ arrival
Queue discipline: refers to the rule that a server uses to choose the
next customer from the queue when the server completes the service of the
current customer (e.g. FIFO: first-in, first-out; LIFO: last-in, first-out; priority-
based; random selection)
MforaPoissonarrivaldistribution(thus,exponentialinterarrivaldistribution)
or an exponential service time distribution
D for a deterministic or constant value
Ek fo r an Erlang distribution of order k
G for a general distribution with known mean and
are infinite.
The queueing R package contains multiple functions for analyzing queueing systems.
For the following example, let‟s consider the simplest queueing system: M/M/1, with
a Poisson arrival rate of 3 customers per minute, an exponential service time of 4
customers per minute and a single server. Let‟s take a look at the R code
Page|6
X: system throughput
Wqq: long-run average time spent in queue when there is queue in aqueueing model
Page|7
Lqq: long-run average number of customers in queue when there is queue in a queueing
model
Now that we have obtained the most relevant performance measures with the Report function,
it would be interesting to plot the distributions of the arrival and service processes. Once again,
let‟s take a look at the following R code!
Concluding Thoughts
Building mathematical models to predict queue lengths and waiting times might be a
challenging task depending on the complexity of the system under study.
The queueing R package allows studying and obtaining results from multiple queueing systems
with just a few lines of code, as in the example previously analyzed. While there are other
P a g e | 10
simulation software available that might require you to purchase a license (e.g. Arena, SIMIO),
R represents another effective tool for performing basic simulation studies.
Ans –
Single-server model - There is one server (clerk, machine), behind which forms a queue (line)
for arriving customers to wait in. The n th customer is denoted by Cn and arrives at time tn,
where 0 = t0 < t1 < t2 < · · · < tn < · · · , with limn→∞ tn = ∞. Tn def = tn+1 − tn denotes the
n the inter arrival time ,the length of time between arrival of the successive customers‟
Cn and Cn+1. Cn requires a service time of length Sn, which is the length of time Cn spends in
service with the server.
We assume that the server processes service times at rate 1, meaning that, for example, if Cn
enters service now with Sn = 6, then 4 units of time later there are 2 units of service time
remaining to process. Dn, called the delay of Cn, denotes the length of time that Cn waits
inthe queue (line) before entering service; if Cn arrives finding the system empty, then Cn
enters service immediately and so Dn = 0. Summarizing: Cn arrives at time tn, waits in the
queuefor Dn units of time, then spends Sn units of time with the server before departing at
time t d n = tn + Dn + Sn, the n th departure time.
Weare inherently assuming here that customers join the end of the queue uponarrival an
enter service oneata time, and this is known asfirst-in-first-out (FIFO). Butother service
disciplines are useful in other applications, such as in computer processing, where processor
sharing(PS) might beemployed: If there are k≥1 “jobs” in the system, theyall are in service
together, buteach is served at rate 1/k. Wewill discuss disciplines later on, so for nowwe
assume FIFO.
Two Server – A discrete-time, two-server queueing system is studied in this paper. The service
time of a customer (cell) is fixed and equal to one-time unit. Server 1 provides for periodic
service of the queue (period).
Server 2 provides for service only when server 1 is unavailable and provided that the
associated service credit is nonzero.The resulting system is shown to model the queueing
behavior of a network user which is subject to traffic regulation for congestion avoidance in
high speed ATMnetworks.
A general methodology is developed for the study of this queueing system, based on renewal
theory. The dimensionality of the developed model is independent ofT;T increases with the
network speed. The cell loss probabilities are computed in the case of finite capacity queue.
P a g e | 11
Ans –
Arrival and Departure as with all transitions, arrival and departure time can sometimes be
difficult for children; often the same child who doesn‟t want to go to child care in the morning
won‟t want to go home at night. These arrival and departure tips can help smooth the
transitionforyouandyourchild.EasingArrivaland DepartureTransitions Everydayyouand
your child will say good-bye in the morning and hello again in the afternoon. Learning to
handle "hellos" and"goodbyes" takes time; it'snot somethingthat can bemastered in thefirst
week, month, or even year of child care. In fact, despite years of experience, we adults
sometimes struggle with separating from and being reunited with people we love.
Arrival Procedures
Amy & Kids Co. opens promptly at 7:00 a.m. Each morning before opening the premises
are prepared for the children's arrival, so I am unable to accept any children for care
before 7:00 a.m. without prior arrangements.
Children must be brought into the center by an adult, unless arriving on foot from
school and the appropriate form is onfile. For the safety of your child, please donot
leavehim/herat Amy&KidsCo.untilpersonalcontactwithmyself orasubstitutehas
been made.
Anattendance form is located on the cabinet near the cubbies. Licensingregulations
mandate that I keep a current and accurate written record of each child's arrival and
departure, therefore each child must be signed in by the person whobrings him/her to
the center. Remember to list a phone number where a parent can be reached every day.
Uponarrivalpleasegiveanymedications(includinglotionsandlip balms)tomeandfill
outaMedication Authorization Form. Youcan downloadthisformaheadof time,orfind
one located underneath the attendance form. Licensing regulations specify how
medications must be stored; donot leave anymedications, lotions or lip balms in your
child‟s pocket, cubby or bag Departure Procedures
Amy & Kids Co. closes promptly at 5:00 p.m. Please plan ahead so you can arrive in time
to have your child ready to leave by closing time. If you are unavoidably delayed please
let me know so I can let your child know when to expect you, and keep him/her from
worrying about you.
Be sure to allow a few minutes at departure to let your child “wind down” from the
activities of thedayand reconnect with you. Iunderstand that this maybehard for tired
parents, but it makes the transition home easier for your child.
Actively listen toyour child ashe/she talks about the daytogain an insight into his/her
worldatchildcare.Beenthusiasticaboutprojectsthatcomehome; yourapprovaland
interest are important for the development of your child‟s self-esteem.
P a g e | 12
Remember to check your child‟s folder and cubby for important information, artwork,
andotheritems.Forsafety‟ssakepleasekeepyourchildnearyouduringdeparture -
especially on the way to your car.
Although I care for your child when you are away, you are the most important person in your
child‟s life. Continuing toact asyour child‟s primary caregiver during arrival anddeparture
eases the transition and reinforces your connection with your child. Parents are responsible for
theirchildrenduringarrival anddeparture,and anyothertime theyareonthecenterpremises.
Please keep your child in sight toensure your child's safety and that his/her interaction with
other children, toys, and equipment is safe and appropriate.
For the safety of everyone, do not leave your vehicle‟s engine running while you are inside the
center, andbesure tokeepyour keys with you. Under no circumstances maya child be left
unattended on the premises; this includes a child on foot, in a stroller or wagon, in a car or
other vehicle, or in any other situation.
Please use the center entrance located on the back porch during arrival and departure. This
entrance opens directly into the classroom where your child‟s cubby is located, is close to the
outdoor classroom in case we are outside in the afternoon.
Inaddition, this entrance is more secure since it's hidden from thestreet. Inorder to keep your
child safe, Iwill only release a child tohis/her parents and topersons listed on the enrollment
form. If anyone other than the child's parent oraperson listed on the enrollment form is topick
up a child, Ineed tobe notified in advance in writing or bya phone call. Anyperson other than
a parent may be required to show a picture ID before the child will be released to his/her
custody.