SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Simulation Examples
 Three steps of the simulations
 Determine the characteristics of each of the inputs to
the simulation. Quite often, these may be modeled as
probability distributions, either continuous or discrete.
 Construct a simulation table. Each simulation table is
different, for each is developed for the problem at
hand.
 For each repetition i, generate a value for each of the
p inputs, and evaluate the function, calculating a value
of the response yi. The input values may be computed
by sampling values from the distributions determined
in step 1. A response typically depends on the inputs
and one or more previous responses.
Inputs Response
Xi1 Xi2 Xip yiRepetition
s
Xij
 The simulation table provides a systematic
method for tracking system state over time.
… …
1
2
n
·
·
·
2.1 Simulation of Queueing Systems (1)
 A queuing system is described by its calling population, the
nature of the arrivals, the service mechanism, the system
capacity, and the queuing discipline.
Calling population
Waiting Line
Server
Fig. 2.1 Queueing System
2.1 Simulation of Queueing Systems (2)
 In the single-channel queue, the calling population is infinite.
 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.
 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 (often
called FIFO: First In, First out) by a single server or channel.
2.1 Simulation of Queueing Systems (3)
 Arrivals and services are defined by the
distribution 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.
 In some systems, the condition about arrival rate
being less than service rate may not guarantee
stability
2.1 Simulation of Queueing Systems (4)
 System state : the number of units in the system and the
status of the server(busy or idle).
 Event : a set of circumstances that cause an instantaneous
change in the state of the system.
 In a single-channel queueing system there are only two
possible events that can affect the state of the system.
 the arrival event : the entry of a unit into the system
 the departure event : the completion of service on a unit.
 Simulation clock : used to track simulated time.
2.1 Simulation of Queueing Systems (5)
 If a unit has just completed service, the
simulation proceeds in the manner shown in the
flow diagram of Figure 2.2.
 Note that the server has only two possible states : it
is either busy or idle.
Departure
Event
Remove the waiting unit
from the queue
Begin servicing the unit
Begin server
idle time
Another unit
waiting?
YesNo
Fig. 2.2 Service-just-completed flow diagram
2.1 Simulation of Queueing Systems (6)
 The arrival event occurs when a unit enters the
system.
 The unit may find the server either idle or busy.
 Idle : the unit begins service immediately
 Busy : the unit enters the queue for the server.
Arrival
Event
Server
busy?
Unit enters queue
for service
Unit enters
service
YesNo
Fig. 2.3 Unit-entering-system flow diagram
2.1 Simulation of Queueing Systems (7)
Fig. 2.4 Potential unit actions upon arrival
Fig. 2.5 Server outcomes after service completion
2.1 Simulation of Queueing Systems (8)
 Simulations of queueing systems generally require
the maintenance of an event list for determining
what happens next.
 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,
the randomness imitating uncertainty in real life.
 Random numbers are distributed uniformly and
independently on the interval (0, 1).
 Random digits are uniformly distributed on the set
{0, 1, 2, … , 9}.
 The proper number of digits is dictated by the
accuracy of the data being used for input purposes.
2.1 Simulation of Queueing Systems (9)
 Pseudo-random numbers : the numbers are generated using a
procedure.
 Table 2.2. Interarrival and Clock Times
 Assume that the times between arrivals were generated by
rolling a die five times and recording the up face.
2.1 Simulation of Queueing Systems (10)
 Table 2.3. Service Times
 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.
 The only possible service
times are one, two, three,
and four time units.
2.1 Simulation of Queueing Systems (11)
 The interarrival times and service times must be meshed to simulate
the single-channel queueing system.
 Table 2.4 was designed specifically for a single-channel queue which
serves customers on a first-in, first-out (FIFO) basis.
2.1 Simulation of Queueing Systems (12)
 Table 2.4 keeps track of the clock
time at which each event occurs.
 The occurrence of the two types of
events(arrival and departure event)
in chronological order is shown in
Table 2.5 and Figure 2.6.
 Figure 2.6 is a visual image of the
event listing of Table 2.5.
 The chronological ordering of events
is the basis of the approach to
discrete-event simulation described
in Chapter 3.
2.1 Simulation of Queueing Systems (13)
 Figure 2.6 depicts the number of customers in the
system at the various clock times.
2.1 Simulation of Queueing Systems (14)
 Example 2.1 Single-Channel Queue
 Assumptions
• Only one checkout counter.
• Customers arrive at this checkout counter at random from 1 to 8
minutes apart. Each possible value of interarrival time has the same
probability of occurrence, as shown in Table 2.6.
• The service times vary from 1 to 6 minutes with the probabilities shown
in Table 2.7.
• The problem is to analyze the system by simulating the arrival and
service of 20 customers.
Checkout Counter
Arrival Departure
2.1 Simulation of Queueing Systems (15)
2.1 Simulation of Queueing Systems (16)
 Example 2.1 (Cont.)
 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 properties:
 The set of random numbers is uniformly distributed between 0 and 1.
 Successive random numbers are independent.
 Random digits are converted to random numbers by placing a
decimal point appropriately.
 The rightmost two columns of Tables 2.6 and 2.7 are used to
generate random arrivals and random service times.
2.1 Simulation of Queueing Systems (17)
 Example 2.1 (Cont.) Table 2.8
 The first random digits are 913. To obtain the corresponding time
between arrivals, enter the fourth column of Table 2.6 and read 8 minutes
from the first column of the table.
2.1 Simulation of Queueing Systems (18)
 Example 2.1 (Cont.) Table 2.9
 The first customer's service time is 4 minutes because the
random digits 84 fall in the bracket 61-85
2.1 Simulation of Queueing Systems (19)
 Example 2.1 (Cont.)
 The essence of a manual simulation is the simulation table.
 The simulation table for the single-channel queue, shown in
Table 2.10, is an extension of the type of table already seen in
Table 2.4.
 Statistical measures of performance can be obtained form the
simulation table such as Table 2.10.
 Statistical measures of performance in this example.
 Each customer's time in the system
 The server's idle time
 In order to compute summary statistics, totals are formed as
shown for service times, time customers spend in the system,
idle time of the server, and time the customers wait in the
queue.
2.1 Simulation of Queueing Systems (20)
 The probability that a customer has to wait in the queue : 0.65
65.0
20
13
)( ===
customersofnumberstotal
waitwhocustomersofnumber
waityprobabilit
 The fraction of idle time of the server : 0.21
21.0
86
18
===
simulationoftimeruntotal
serveroftimeidletotal
serveridleofyprobabilit
 The probability of the server being busy: 0.79 (=1-0.21)
Example 2.1 (Cont.)
 The average waiting time for a customer : 2.8 minutes
(min)8.2
20
56
===
customersofnumberstotal
queueinwaitcustomerstimetotal
timewaitngaverage
2.1 Simulation of Queueing Systems (21)
Example 2.1 (Cont.)
 The average service time : 3.4 minutes
(min)4.3
20
68
===
customersofnumberstotal
timeservicetotal
timeserviceaverage
This result can be compared with the expected service time by finding the
mean of the service-time distribution using the following equation.
∑
∞
=
=
0
)()(
s
sspSE
(min)2.3)05.0(6)10.0(5)25.0(4)30.0(3)20.0(2)10.0(1)( =+++++=SE
The expected service time is slightly lower than the average service time in
the simulation. The longer the simulation, the closer the average will be to
)(SE
2.1 Simulation of Queueing Systems (22)
 The average time between arrivals : 4.3 minutes
 The average waiting time of those who wait : 4.3 minutes
(min)3.4
13
56
===
wiatwhocustomersofnumberstotal
queueinwaitcustomerstimetotal
waitwhothoseoftimewaitingaverage
 This result can be compared to the expected time between arrivals by
finding the mean of the discrete uniform distribution whose endpoints are
a=1 and b=8.
(min)3.4
19
82
1
==
−
=
arrivalsofnumbers
arrivalsbetweentimesallofsum
arrivalsbetweentimeaverage
(min)5.4
2
81
2
)( =
+
=
+
=
ba
AE
The longer the simulation, the closer the average will be to )(AE
Example 2.1 (Cont.)
2.1 Simulation of Queueing Systems (23)
 The average time a customer spends in the system : 6.2 minutes
Example 2.1 (Cont.)
(min)2.6
20
124
===
customersofnumberstotal
systeminspendcustomerstimetotal
systemtheinspendscustomertimeaverage
average time
customer spends
in the system
average time
customer spends
waiting in the queue
average time
customer spends
in service
= +
∴ average time customer spends in the system = 2.8 + 3.4 = 6.2 (min)
2.4 Summary
 This chapter introduced simulation concepts via
examples in order to illustrate general areas of
application and to motivate the remaining chapters.
 Ad hoc simulation tables were used in completing the
example. Events in the tables were generated using
uniformly distributed random numbers and, in one case,
random normal numbers.
 The example illustrate the need for determining the
characteristics of the input data, generating random
variables from the input models, and analyzing the
resulting response.

Weitere ähnliche Inhalte

Was ist angesagt?

QUEUING THEORY
QUEUING THEORYQUEUING THEORY
QUEUING THEORYavtarsingh
 
Midsquare method- simulation system
Midsquare method- simulation systemMidsquare method- simulation system
Midsquare method- simulation systemArman Hossain
 
Telephone call-simulation
Telephone call-simulationTelephone call-simulation
Telephone call-simulationPrakash Poudel
 
Unit 4 queuing models problems
Unit 4 queuing models problemsUnit 4 queuing models problems
Unit 4 queuing models problemsraksharao
 
System modeling and simulation full notes by sushma shetty (www.vtulife.com)
System modeling and simulation full notes by sushma shetty (www.vtulife.com)System modeling and simulation full notes by sushma shetty (www.vtulife.com)
System modeling and simulation full notes by sushma shetty (www.vtulife.com)Vivek Maurya
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systemsleo3004
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed systemSunita Sahu
 
Queuing theory
Queuing theoryQueuing theory
Queuing theoryAbu Bashar
 
Synchronization in distributed systems
Synchronization in distributed systems Synchronization in distributed systems
Synchronization in distributed systems SHATHAN
 
Modeling & Simulation Lecture Notes
Modeling & Simulation Lecture NotesModeling & Simulation Lecture Notes
Modeling & Simulation Lecture NotesFellowBuddy.com
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure callsAshish Kumar
 
Amortized Analysis of Algorithms
Amortized Analysis of Algorithms Amortized Analysis of Algorithms
Amortized Analysis of Algorithms sathish sak
 
Dynamic and Static Modeling
Dynamic and Static ModelingDynamic and Static Modeling
Dynamic and Static ModelingSaurabh Kumar
 
Operating characteristics ofqueuing system
Operating characteristics ofqueuing systemOperating characteristics ofqueuing system
Operating characteristics ofqueuing systemAminul Tanvin
 

Was ist angesagt? (20)

QUEUING THEORY
QUEUING THEORYQUEUING THEORY
QUEUING THEORY
 
Midsquare method- simulation system
Midsquare method- simulation systemMidsquare method- simulation system
Midsquare method- simulation system
 
Queueing theory
Queueing theoryQueueing theory
Queueing theory
 
Telephone call-simulation
Telephone call-simulationTelephone call-simulation
Telephone call-simulation
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
Unit 4 queuing models problems
Unit 4 queuing models problemsUnit 4 queuing models problems
Unit 4 queuing models problems
 
System modeling and simulation full notes by sushma shetty (www.vtulife.com)
System modeling and simulation full notes by sushma shetty (www.vtulife.com)System modeling and simulation full notes by sushma shetty (www.vtulife.com)
System modeling and simulation full notes by sushma shetty (www.vtulife.com)
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systems
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
Queuing theory
Queuing theoryQueuing theory
Queuing theory
 
Naming in Distributed System
Naming in Distributed SystemNaming in Distributed System
Naming in Distributed System
 
Synchronization in distributed systems
Synchronization in distributed systems Synchronization in distributed systems
Synchronization in distributed systems
 
Modeling & Simulation Lecture Notes
Modeling & Simulation Lecture NotesModeling & Simulation Lecture Notes
Modeling & Simulation Lecture Notes
 
remote procedure calls
  remote procedure calls  remote procedure calls
remote procedure calls
 
Amortized Analysis of Algorithms
Amortized Analysis of Algorithms Amortized Analysis of Algorithms
Amortized Analysis of Algorithms
 
Dynamic and Static Modeling
Dynamic and Static ModelingDynamic and Static Modeling
Dynamic and Static Modeling
 
Operating characteristics ofqueuing system
Operating characteristics ofqueuing systemOperating characteristics ofqueuing system
Operating characteristics ofqueuing system
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
 

Ähnlich wie Simulation & Modeling - Smilulation Queuing System

Jerry banks introduction to simulation
Jerry banks   introduction to simulationJerry banks   introduction to simulation
Jerry banks introduction to simulationsarubianoa
 
Simulation analysis of single server queuing model
Simulation  analysis of single server queuing modelSimulation  analysis of single server queuing model
Simulation analysis of single server queuing modelijitjournal
 
Decision policies for production networks
Decision policies for production networksDecision policies for production networks
Decision policies for production networksSpringer
 
Systems modelling and simulation
Systems modelling and simulationSystems modelling and simulation
Systems modelling and simulationHassan Saif
 
queuingtheory-091005084417-phpapp01 (2).pdf
queuingtheory-091005084417-phpapp01 (2).pdfqueuingtheory-091005084417-phpapp01 (2).pdf
queuingtheory-091005084417-phpapp01 (2).pdfAditya Mane
 
Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...
Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...
Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...Andrea Tino
 
Simulation chapter 4
Simulation chapter 4Simulation chapter 4
Simulation chapter 4Hagos Guesh
 
Queuing theory and its applications
Queuing theory and its applicationsQueuing theory and its applications
Queuing theory and its applicationsDebasisMohanty37
 
Proposed pricing model for cloud computing
Proposed pricing model for cloud computingProposed pricing model for cloud computing
Proposed pricing model for cloud computingAdeel Javaid
 
Control Systems Lab 2
Control Systems Lab 2Control Systems Lab 2
Control Systems Lab 2Julia London
 
Implementation of the trinity of the control system based on OPC
Implementation of the trinity of the control system based on OPCImplementation of the trinity of the control system based on OPC
Implementation of the trinity of the control system based on OPCIJRES Journal
 
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault ToleranceParallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault ToleranceUniversity of Technology - Iraq
 
Foundations and methods of stochastic simulation
Foundations and methods of stochastic simulationFoundations and methods of stochastic simulation
Foundations and methods of stochastic simulationSpringer
 
Discrete Time Batch Arrival Queue with Multiple Vacations
Discrete Time Batch Arrival Queue with Multiple VacationsDiscrete Time Batch Arrival Queue with Multiple Vacations
Discrete Time Batch Arrival Queue with Multiple VacationsIJERDJOURNAL
 

Ähnlich wie Simulation & Modeling - Smilulation Queuing System (20)

Unit 3 des
Unit 3 desUnit 3 des
Unit 3 des
 
DES
DES DES
DES
 
Jerry banks introduction to simulation
Jerry banks   introduction to simulationJerry banks   introduction to simulation
Jerry banks introduction to simulation
 
Simulation analysis of single server queuing model
Simulation  analysis of single server queuing modelSimulation  analysis of single server queuing model
Simulation analysis of single server queuing model
 
Decision policies for production networks
Decision policies for production networksDecision policies for production networks
Decision policies for production networks
 
Sample final report
Sample final reportSample final report
Sample final report
 
2_2_Event_Mechanism_Chapter_2.pdf
2_2_Event_Mechanism_Chapter_2.pdf2_2_Event_Mechanism_Chapter_2.pdf
2_2_Event_Mechanism_Chapter_2.pdf
 
Systems modelling and simulation
Systems modelling and simulationSystems modelling and simulation
Systems modelling and simulation
 
queuingtheory-091005084417-phpapp01 (2).pdf
queuingtheory-091005084417-phpapp01 (2).pdfqueuingtheory-091005084417-phpapp01 (2).pdf
queuingtheory-091005084417-phpapp01 (2).pdf
 
Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...
Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...
Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...
 
Business Logistics Assignment Help
Business Logistics Assignment HelpBusiness Logistics Assignment Help
Business Logistics Assignment Help
 
Simulation chapter 4
Simulation chapter 4Simulation chapter 4
Simulation chapter 4
 
Final
FinalFinal
Final
 
Queuing theory and its applications
Queuing theory and its applicationsQueuing theory and its applications
Queuing theory and its applications
 
Proposed pricing model for cloud computing
Proposed pricing model for cloud computingProposed pricing model for cloud computing
Proposed pricing model for cloud computing
 
Control Systems Lab 2
Control Systems Lab 2Control Systems Lab 2
Control Systems Lab 2
 
Implementation of the trinity of the control system based on OPC
Implementation of the trinity of the control system based on OPCImplementation of the trinity of the control system based on OPC
Implementation of the trinity of the control system based on OPC
 
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault ToleranceParallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
 
Foundations and methods of stochastic simulation
Foundations and methods of stochastic simulationFoundations and methods of stochastic simulation
Foundations and methods of stochastic simulation
 
Discrete Time Batch Arrival Queue with Multiple Vacations
Discrete Time Batch Arrival Queue with Multiple VacationsDiscrete Time Batch Arrival Queue with Multiple Vacations
Discrete Time Batch Arrival Queue with Multiple Vacations
 

Kürzlich hochgeladen

Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxNikitaBankoti2
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesShubhangi Sonawane
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfPoh-Sun Goh
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 

Kürzlich hochgeladen (20)

Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Role Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptxRole Of Transgenic Animal In Target Validation-1.pptx
Role Of Transgenic Animal In Target Validation-1.pptx
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 

Simulation & Modeling - Smilulation Queuing System

  • 1. Simulation Examples  Three steps of the simulations  Determine the characteristics of each of the inputs to the simulation. Quite often, these may be modeled as probability distributions, either continuous or discrete.  Construct a simulation table. Each simulation table is different, for each is developed for the problem at hand.  For each repetition i, generate a value for each of the p inputs, and evaluate the function, calculating a value of the response yi. The input values may be computed by sampling values from the distributions determined in step 1. A response typically depends on the inputs and one or more previous responses.
  • 2. Inputs Response Xi1 Xi2 Xip yiRepetition s Xij  The simulation table provides a systematic method for tracking system state over time. … … 1 2 n · · ·
  • 3. 2.1 Simulation of Queueing Systems (1)  A queuing system is described by its calling population, the nature of the arrivals, the service mechanism, the system capacity, and the queuing discipline. Calling population Waiting Line Server Fig. 2.1 Queueing System
  • 4. 2.1 Simulation of Queueing Systems (2)  In the single-channel queue, the calling population is infinite.  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.  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 (often called FIFO: First In, First out) by a single server or channel.
  • 5. 2.1 Simulation of Queueing Systems (3)  Arrivals and services are defined by the distribution 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.  In some systems, the condition about arrival rate being less than service rate may not guarantee stability
  • 6. 2.1 Simulation of Queueing Systems (4)  System state : the number of units in the system and the status of the server(busy or idle).  Event : a set of circumstances that cause an instantaneous change in the state of the system.  In a single-channel queueing system there are only two possible events that can affect the state of the system.  the arrival event : the entry of a unit into the system  the departure event : the completion of service on a unit.  Simulation clock : used to track simulated time.
  • 7. 2.1 Simulation of Queueing Systems (5)  If a unit has just completed service, the simulation proceeds in the manner shown in the flow diagram of Figure 2.2.  Note that the server has only two possible states : it is either busy or idle. Departure Event Remove the waiting unit from the queue Begin servicing the unit Begin server idle time Another unit waiting? YesNo Fig. 2.2 Service-just-completed flow diagram
  • 8. 2.1 Simulation of Queueing Systems (6)  The arrival event occurs when a unit enters the system.  The unit may find the server either idle or busy.  Idle : the unit begins service immediately  Busy : the unit enters the queue for the server. Arrival Event Server busy? Unit enters queue for service Unit enters service YesNo Fig. 2.3 Unit-entering-system flow diagram
  • 9. 2.1 Simulation of Queueing Systems (7) Fig. 2.4 Potential unit actions upon arrival Fig. 2.5 Server outcomes after service completion
  • 10. 2.1 Simulation of Queueing Systems (8)  Simulations of queueing systems generally require the maintenance of an event list for determining what happens next.  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, the randomness imitating uncertainty in real life.  Random numbers are distributed uniformly and independently on the interval (0, 1).  Random digits are uniformly distributed on the set {0, 1, 2, … , 9}.  The proper number of digits is dictated by the accuracy of the data being used for input purposes.
  • 11. 2.1 Simulation of Queueing Systems (9)  Pseudo-random numbers : the numbers are generated using a procedure.  Table 2.2. Interarrival and Clock Times  Assume that the times between arrivals were generated by rolling a die five times and recording the up face.
  • 12. 2.1 Simulation of Queueing Systems (10)  Table 2.3. Service Times  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.  The only possible service times are one, two, three, and four time units.
  • 13. 2.1 Simulation of Queueing Systems (11)  The interarrival times and service times must be meshed to simulate the single-channel queueing system.  Table 2.4 was designed specifically for a single-channel queue which serves customers on a first-in, first-out (FIFO) basis.
  • 14. 2.1 Simulation of Queueing Systems (12)  Table 2.4 keeps track of the clock time at which each event occurs.  The occurrence of the two types of events(arrival and departure event) in chronological order is shown in Table 2.5 and Figure 2.6.  Figure 2.6 is a visual image of the event listing of Table 2.5.  The chronological ordering of events is the basis of the approach to discrete-event simulation described in Chapter 3.
  • 15. 2.1 Simulation of Queueing Systems (13)  Figure 2.6 depicts the number of customers in the system at the various clock times.
  • 16. 2.1 Simulation of Queueing Systems (14)  Example 2.1 Single-Channel Queue  Assumptions • Only one checkout counter. • Customers arrive at this checkout counter at random from 1 to 8 minutes apart. Each possible value of interarrival time has the same probability of occurrence, as shown in Table 2.6. • The service times vary from 1 to 6 minutes with the probabilities shown in Table 2.7. • The problem is to analyze the system by simulating the arrival and service of 20 customers. Checkout Counter Arrival Departure
  • 17. 2.1 Simulation of Queueing Systems (15)
  • 18. 2.1 Simulation of Queueing Systems (16)  Example 2.1 (Cont.)  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 properties:  The set of random numbers is uniformly distributed between 0 and 1.  Successive random numbers are independent.  Random digits are converted to random numbers by placing a decimal point appropriately.  The rightmost two columns of Tables 2.6 and 2.7 are used to generate random arrivals and random service times.
  • 19. 2.1 Simulation of Queueing Systems (17)  Example 2.1 (Cont.) Table 2.8  The first random digits are 913. To obtain the corresponding time between arrivals, enter the fourth column of Table 2.6 and read 8 minutes from the first column of the table.
  • 20. 2.1 Simulation of Queueing Systems (18)  Example 2.1 (Cont.) Table 2.9  The first customer's service time is 4 minutes because the random digits 84 fall in the bracket 61-85
  • 21. 2.1 Simulation of Queueing Systems (19)  Example 2.1 (Cont.)  The essence of a manual simulation is the simulation table.  The simulation table for the single-channel queue, shown in Table 2.10, is an extension of the type of table already seen in Table 2.4.  Statistical measures of performance can be obtained form the simulation table such as Table 2.10.  Statistical measures of performance in this example.  Each customer's time in the system  The server's idle time  In order to compute summary statistics, totals are formed as shown for service times, time customers spend in the system, idle time of the server, and time the customers wait in the queue.
  • 22.
  • 23. 2.1 Simulation of Queueing Systems (20)  The probability that a customer has to wait in the queue : 0.65 65.0 20 13 )( === customersofnumberstotal waitwhocustomersofnumber waityprobabilit  The fraction of idle time of the server : 0.21 21.0 86 18 === simulationoftimeruntotal serveroftimeidletotal serveridleofyprobabilit  The probability of the server being busy: 0.79 (=1-0.21) Example 2.1 (Cont.)  The average waiting time for a customer : 2.8 minutes (min)8.2 20 56 === customersofnumberstotal queueinwaitcustomerstimetotal timewaitngaverage
  • 24. 2.1 Simulation of Queueing Systems (21) Example 2.1 (Cont.)  The average service time : 3.4 minutes (min)4.3 20 68 === customersofnumberstotal timeservicetotal timeserviceaverage This result can be compared with the expected service time by finding the mean of the service-time distribution using the following equation. ∑ ∞ = = 0 )()( s sspSE (min)2.3)05.0(6)10.0(5)25.0(4)30.0(3)20.0(2)10.0(1)( =+++++=SE The expected service time is slightly lower than the average service time in the simulation. The longer the simulation, the closer the average will be to )(SE
  • 25. 2.1 Simulation of Queueing Systems (22)  The average time between arrivals : 4.3 minutes  The average waiting time of those who wait : 4.3 minutes (min)3.4 13 56 === wiatwhocustomersofnumberstotal queueinwaitcustomerstimetotal waitwhothoseoftimewaitingaverage  This result can be compared to the expected time between arrivals by finding the mean of the discrete uniform distribution whose endpoints are a=1 and b=8. (min)3.4 19 82 1 == − = arrivalsofnumbers arrivalsbetweentimesallofsum arrivalsbetweentimeaverage (min)5.4 2 81 2 )( = + = + = ba AE The longer the simulation, the closer the average will be to )(AE Example 2.1 (Cont.)
  • 26. 2.1 Simulation of Queueing Systems (23)  The average time a customer spends in the system : 6.2 minutes Example 2.1 (Cont.) (min)2.6 20 124 === customersofnumberstotal systeminspendcustomerstimetotal systemtheinspendscustomertimeaverage average time customer spends in the system average time customer spends waiting in the queue average time customer spends in service = + ∴ average time customer spends in the system = 2.8 + 3.4 = 6.2 (min)
  • 27. 2.4 Summary  This chapter introduced simulation concepts via examples in order to illustrate general areas of application and to motivate the remaining chapters.  Ad hoc simulation tables were used in completing the example. Events in the tables were generated using uniformly distributed random numbers and, in one case, random normal numbers.  The example illustrate the need for determining the characteristics of the input data, generating random variables from the input models, and analyzing the resulting response.