0% found this document useful (0 votes)
9 views14 pages

Simulation 2 Chapter Two

Chapter two discusses queuing systems and discrete-event simulation, highlighting key elements such as customers, servers, and system capacity. It explains the characteristics of queuing systems, including arrival processes and the importance of inter-arrival and service times. The chapter also details how to simulate a single-channel queue, using random numbers to model customer arrivals and service times effectively.

Uploaded by

henok maneda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views14 pages

Simulation 2 Chapter Two

Chapter two discusses queuing systems and discrete-event simulation, highlighting key elements such as customers, servers, and system capacity. It explains the characteristics of queuing systems, including arrival processes and the importance of inter-arrival and service times. The chapter also details how to simulate a single-channel queue, using random numbers to model customer arrivals and service times effectively.

Uploaded by

henok maneda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 14

Chapter two Queuing System & Discrete- Event Simulation

Queuing System & Discrete- Event Simulation


A queuing system is described by its calling population, the nature of the
arrivals, the service mechanism, the system capacity, and the queuing
discipline. A single-channel queuing system is portrayed in the following figure.

Characteristics of Queuing Systems


 The key elements, of a queuing system are the customers and servers.
The term "customer" can refer to people, machines, trucks, mechanics,
patients—anything that arrives at a facility and requires service
 The term "server" might refer to receptionists, repairpersons, CPUs in a
computer, or washing machines…any resource (person, machine,) etc.
which provides the requested service.
Table-1: Lists a number of different Queuing systems (Examples of Queuing system)

System Customers Server(s)


Computer Jobs CPU, Disk, Tapes
Hospital Patients Nurse
Telephone Calls Exchange
Garage Trucks Mechanic
Airport Airplanes Runway
Laundry Dirty linen Washing machines/dryers
Repair facility Machines Repairperson
Reception desk People Receptionist
Grocery Shoppers Checkout Station
Warehouse Orders Order Picker

The Elements of a Queuing System are:


DBU Page 1
Chapter two Queuing System & Discrete- Event Simulation

The Calling Population


 The population of potential customers, referred to as the calling population, may be
assumed to be finite or infinite.
 For example, consider a bank of 5 machines that are curing tires. After an interval of time,
a machine automatically opens and must be attended by a worker who removes the tire
and puts an uncured tire into the machine.
 The machines are the "customers", who "arrive" at the instant they automatically open.
The worker is the "server", who "serves" an open machine as soon as possible.
 The calling population is finite, and consists of the five machines.
 In systems with a large population of potential customers, the calling population is usually
assumed to be finite or infinite. Examples of infinite populations include the potential
customers of a restaurant, bank, etc.
 The main difference between finite and infinite population models is how the arrival rate
is defined. In an infinite-population model, the arrival rate is not affected by the number of
customers who have left the calling population and joined the queuing system. On the
other hand, for finite calling population models, the arrival rate to the queuing system does
depend on the number of customers being served and waiting.
System Capacity
 In many queuing systems there is a limit to the number of customers that may be in the
waiting line or system. For example, an automatic car wash may have room for only 10
cars to wait in line to enter the mechanism.
 An arriving customer who finds the system full does not enter but returns immediately to
the calling population.
 Some systems, such as concert ticket sales for students, may be considered as having
unlimited capacity. There are no limits on the number of students allowed to wait to
purchase tickets.
 When a system has limited capacity, a distinction is made between the arrival rate (i.e.,
the number of arrivals per time unit) and the effective arrival rate (i.e., the number who
arrive and enter the system per time unit).

DBU Page 2
Chapter two Queuing System & Discrete- Event Simulation

The Arrival Process


 Arrival process for infinite-population models is usually characterized in terms of inter-
arrival times of successive customers. Arrivals may occur at scheduled times or at
random times. When at random times, the inter-arrival times are usually characterized by
a probability distribution.
Queuing System

 In the single-channel queue, the calling population is infinite; that is, if a


unit leaves the calling population and joins the waiting line or enters
service, there is no change in the arrival rate of other units that may need
service.
 Arrivals for service occur one at a time in a random fashion; once they
join the waiting line, they are eventually served. In addition, service times
are of some random length according to a probability distribution which
does not change over time.
 The system capacity; has no limit, meaning that any number of units can
wait in line.
 Finally, units are served in the order of their arrival by a single server or
channel.
 Arrivals and services are defined by the distributions of the time between
arrivals and the distribution of service times, respectively.
 For any simple single or multi-channel queue, the overall effective arrival
rate must be less than the total service rate, or the waiting line will grow
without bound. When queues grow without bound, they are termed
“explosive” or unstable.
 The state of the system is the number of units in the system and the
status of the server, busy or idle.
 An event is a set of circumstances that cause an instantaneous change in
the state of the system. In a single –channel queuing system there are
only two possible events that can affect the state of the system .
 They are the entry of a unit into the system.

DBU Page 3
Chapter two Queuing System & Discrete- Event Simulation

 The completion of service on a unit.


 The queuing system includes the server, the unit being serviced, and
units in the queue. The simulation clock is used to track simulated time. If
a unit has just completed service, the simulation proceeds in the manner
shown in the flow diagram. Note that the server has only two possible
states: it is either busy or idle.

 The arrival event occurs when a unit enters the system. The flow diagram
for the arrival event is shown in figure 3. The unit may find the server
either idle or busy; therefore, either the unit begins service immediately,
or it enters the queue for the server. The unit follows the course of action
shown in fig 4.

DBU Page 4
Chapter two Queuing System & Discrete- Event Simulation

 If the server is busy, the unit enters the queue. If the server is idle and the
queue is empty, the unit begins service. It is not possible for the server to
be idle and the queue to be nonempty

 After the completion of a service the service may become idle or remain
busy with the next unit. The relationship of these two outcomes to the
status of the queue is shown in fig 5. If the queue is not empty, another
unit will enter the server and it will be busy. If the queue is empty, the
server will be idle after a service is completed. These two possibilities are
shown as the shaded portions of fig 5. It is impossible for the server to
become busy if the queue is empty when a service is completed.
Similarly, it is impossible for the server to be idle after a service is
completed when the queue is not empty.

DBU Page 5
Chapter two Queuing System & Discrete- Event Simulation

Simulation clock times for arrivals and departures are computed in a simulation
table customized for each problem. In simulation, events usually occur at
random times. In these cases, a statistical model of the data is developed from
either data collected and analyzed, or subjective estimates and assumptions.
 Random numbers are distributed uniformly and independently on the
interval (0, 1). Random digits are uniformly distributed on the set {0, 1,
2… 9}. Random digits can be used to form random numbers by selecting
the proper number of digits for each random number and placing a
decimal point to the left of the value selected. The proper number of
digits is dictated by the accuracy of the data being used for input
purposes. If the input distribution has values with two decimal places, two
digits are taken from a random-digits table and the decimal point is
placed to the left to form a random number.
 When numbers are generated using a procedure, they are often referred
to as pseudorandom numbers. Since the method is known, it is always
possible to know the sequence of numbers that will be generated prior to
the simulation.
 In a single-channel queuing system, interarrival times and service times
are generated from the distributions of these random variables. The
examples that follow show how such times are generated. For simplicity,
assume that the times between arrivals were generated by rolling a die
five times and recording the up face. Table 1 contains a set of five
interarrival times are used to compute the arrival times of six customers
at the queuing system

DBU Page 6
Chapter two Queuing System & Discrete- Event Simulation

customer Service time


1 2
2 1
3 3
4 2
5 1
6 4

 The first customer is assumed to arrive at clock time 0. This starts the
clock in operation. The second customer arrives two time units later, at a
click time of 2. The third customer arrives four time units later, at a clock
time of 6; and so on.
 The second time of interest is the service time. The only possible service
times are one, two, three, and four time units. Assuming that all four
values are equally likely to occur, these values could have been
generated by placing the numbers one through four on chips and drawing
the chips from a hat with replacement, being sure to record the numbers
selected
 Now, the interarrival times and service times must be meshed to simulate
the single channel queuing system. As shown in table 2, the first
DBU Page 7
Chapter two Queuing System & Discrete- Event Simulation

customer arrives at clock time 0 and immediately begins service, which


requires two minutes. Service is completed at clock time 2. The second
customer arrives at clock time 2 and is a finished at clock time 3. Note
that the fourth customer arrived at clock time 7, but service could not
begin until clock time 9. This occurred because customer 3 did not finish
service until clock time 9
 Table 2 was designed specifically for a single-channel queue which serves
customers on a first-in, first-out (FIFO) basis. It keeps track of the clock
time at which each event occurs. The second column of table 2 records
the clock time of each arrival event, while the last column records the
clock time of each departure event

Event Customer Clock time


type number
Arrival 1 0
EXAMPLE 1: Single- Channel
Departure 1 2
Queue
Arrival 2 2
A small grocery store Departure 2 3 has only one
Arrival 3 6
checkout counter. Arrival 4 7 Customers
arrive at this checkout Departure 3 9 counter at
Arrival 5 9
random from 1 to 8 minutes
Departure 4 11
apart. Each possible Departure 5 12 value of
Arrival 6 15
interarrival time has the same
Departure 6 19
DBU Page 8
Chapter two Queuing System & Discrete- Event Simulation

probability of occurrence. The service times vary from 1 to 6 minutes with the
probabilities shown in table 5. The problem is to analyze the system by
simulating the arrival and service of 20 customers

 A simulation of a grocery store that starts with an empty system is not


realistic unless the intention is to model the system from startup or to
model until steady state operation is reached.
 A set of uniformly distributed random numbers is needed to generate the
arrivals at the checkout counter. Random numbers have the following
property
1. The set of random numbers is uniformly distributed between 0 and
1.
2. Successive random numbers are independent.
 The time-between-arrival determination is shown in table 6. Note that the
first random digits are 913. To obtain the corresponding time between
arrivals, enter the fourth column of table 4 and read 8 minutes from the
first column of the table. Alternatively, we see that 0.913 is between the
cumulative probabilities 0.876 and 1.000, again resulting in 8 minutes as
the generated time

DBU Page 9
Chapter two Queuing System & Discrete- Event Simulation

Service times for all 20 customers are shown in table 7. These service times
were generated based on the methodology described above, together with the
aid of table 5. The first customer’s service time is 4 minutes because the
random digits 84 fall in the bracket 61-85, or alternatively because the derived
random number 0.84 falls between the cumulative probabilities 0.61 and 0.85 .

 The essence of a manual simulation is the simulation table. These tables


are designed for the problem at hand, with columns added to answer the
questions posed. The simulation table for the single-channel queue,
shown, in table 8 that is an extension of table 2. The first step is to
initialize the table by filling in cells for the first customer .
 The first customer is assumed to arrive at time 0. Service begins
immediately and finishes at time 4. The customer was in the system for 4
minutes. After the first customer, subsequent rows in the table are based

DBU Page 10
Chapter two Queuing System & Discrete- Event Simulation

on the random numbers for interarrival time and service time and the
completion time of the previous customer. For example, the second
customer arrives at time 8. Thus, the server was idle for 4 minutes.
Skipping down to the fourth customer, it is seen that this customer
arrived at time 15 but could not be served until time 18. This customer
had to wait in the queue for 3 minutes. This process continues for all 20
customers

DBU Page 11
Chapter two Queuing System & Discrete- Event Simulation

DBU Page 12
Chapter two Queuing System & Discrete- Event Simulation

DBU Page 13
Chapter two Queuing System & Discrete- Event Simulation

A decision maker would be interested in results of this type, but a longer simulation
would increase the accuracy of the findings. However, some subjective inference can
be drawn at this point. Most customers have to wait; however, the average waiting
time is not excessive. The server does not have an undue amount of idle time.

DBU Page 14

You might also like