1 / 23

Simulating Single server queuing models

Simulating Single server queuing models. Simulating Single server queuing models. Consider the following sequence of activities that each customer undergoes: Customer arrives Customer waits for service if the server is busy. Customer receives service. Customer departs the system.

marek
Télécharger la présentation

Simulating Single server queuing models

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Simulating Single server queuing models

  2. Simulating Single server queuing models • Consider the following sequence of activities that each customer undergoes: • Customer arrives • Customer waits for service if the server is busy. • Customer receives service. • Customer departs the system.

  3. Analytical Solutions • Analytical solutions for W, L, Wq, Lq exist However, analytical solution exist at infinity which cannot be reached. • Therefore, Simulation is a most.

  4. Flowchart of an arrival event • IdleBusy An Arrival Status of Server Customer enters service Customer joins queue More

  5. Flowchart of a Departure event • NO Yes A Departure Queue Empty ? Remove customer from Queue and begin service Set system status to idle More

  6. An example of a hand simulation • Consider the following IAT’s and ST’s: • A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4, A9=1.9, … • S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6 • Want: Average delay in queue • Utilization

  7. System state Initialization Time = 0 system A Server 0 D Clock Eventlist 0 0 0 # in que Time Of Last event Server status 0 0 0 0 Area Under B(t) Total delay Area Under Q(t) Number delayed Times of Arrival Statistical Counters

  8. Arrival Time = 0.4 system System state A 0.4 D Clock 0.4 Eventlist 1 0 0.4 # in que Time Of Last event Server status 0 1 0 0 Area Under B(t) Total delay Area Under Q(t) Number delayed Times of Arrival Statistical Counters A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4 S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

  9. Arrival Time = 1.6 system System state A 1.6 D Clock 0.4 Eventlist 1 1 1.6 # in que Time Of Last event 1.6 Server status 1.2 1 0 0 Area Under B(t) Total delay Area Under Q(t) Number delayed Times of Arrival Statistical Counters A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4 S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

  10. Arrival Time = 2.1 System state A 2.1 D Clock 0.4 Eventlist 1 2 2.1 # in que Time Of Last event 1.6 Server status 1.7 1 0 0.5 2.1 Area Under B(t) Total delay Area Under Q(t) Number delayed Times of Arrival System Statistical Counters A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4 S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

  11. Departure Time = 2.4 System state A 2.4 D Clock 1.6 Eventlist 1 1 2.4 # in que Time Of Last event 2.1 Server status 2.0 2 0.8 1.1 Area Under B(t) Total delay Area Under Q(t) Number delayed Times of Arrival System Statistical Counters A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4 S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

  12. Departure Time = 3.1 System state A 3.1 D Clock 2.1 Eventlist 1 0 3.1 # in que Time Of Last event Server status 2.7 3 1.8 1.8 Area Under B(t) Total delay Area Under Q(t) Number delayed Times of Arrival System Statistical Counters A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4 S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

  13. Departure Time = 3.1 System state A 3.3 D Clock Eventlist 0 0 3.3 # in que Time Of Last event Server status 2.9 3 1.8 1.8 Area Under B(t) Total delay Area Under Q(t) Number delayed Times of Arrival System Statistical Counters A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4 S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

  14. Departure Time = 3.1 System state A 3.8 D Clock 3.8 Eventlist 1 0 3.8 # in que Time Of Last event Server status 2.9 4 1.8 1.8 Area Under B(t) Total delay Area Under Q(t) Number delayed Times of Arrival System Statistical Counters A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4 S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

  15. Departure Time = 3.1 System state A 4.0 D Clock 3.8 Eventlist 1 1 4.0 # in que Time Of Last event Server status 4.0 3.1 4 1.8 1.8 Area Under B(t) Total delay Area Under Q(t) Number delayed Times of Arrival System Statistical Counters A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4 S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

  16. Departure Time = 3.1 System state A 4.9 D Clock 4.0 Eventlist 1 0 4.9 # in que Time Of Last event Server status 4.0 5 2.7 2.7 Total delay Area Under Q(t) Area Under B(t) Number delayed Times of Arrival System Statistical Counters A1=0.4, A2=1.2, A3=0.5, A4=1.7, A5=0.2, A6=1.6, A7=0.2, A8=1.4 S1=2.0, S2=0.7, S3=0.2, S4=1.1, S5=3.7, S6=0.6

  17. Monte Carlo Simulation • Solving deterministic problems using stochastic models. • Example: estimate • It is efficient in solving multi dimensional integrals.

  18. Monte Carlo Simulation • To illustrate, consider a known region R with area A and R1 subset of R whose area A1 in unknown. • To estimate the area of R1 we can through random points in the region R. The ratio of points in the region R1 over the points in R approximately equals the ratio of A1/A. R R1

  19. Monte Carlo Simulation • To estimate the integral I. one can estimate the area under the curve of g. • Suppose that M = max {g(x) } on [a,b] 1. Select random numbers X1, X2, …,Xn in [a,b] And Y1, Y2, … ,Yn in [0,M] 2. Count how many points (Xi,Yi) in R1, say C1 3. The estimate of I is then C1M(b-a)/n M R R1 a b

  20. Advantages of Simulation • Most complex, real-world systems with stochastic elements that cannot be described by mathematical models. Simulation is often the only investigation possible • Simulation allow us to estimate the performance of an existing system under proposed operating conditions. • Alternative proposed system designs can be compared with the existing system • We can maintain much better control over the experiments than with the system itself • Study the system with a long time frame

  21. Disadvantages of Simulation • Simulation produces only estimates of performance under a particular set of parameters • Expensive and time consuming to develop • The Large volume of numbers and the impact of the realistic animation often create high level of confidence than is justified.

  22. Pitfalls of Simulation • Failure to have a well defined set of objectives at the beginning of the study • Inappropriate level of model details • Failure to communicate with manager during the course of simulation • Treating a simulation study as if it is a complicated exercise in computer programming • Failure to have well trained people familiar with operations research and statistical analysis • Using commercial software that may contain errors

  23. Pitfalls of Simulation cont. • Reliance on simulator that make simulation accessible to anyone • Misuse of animation • Failure to account correctly for sources of randomness in the actual system • Using arbitrary probability distributions as input of the simulation • Do output analysis un correctly • Making a single replication and treating the output as true answers • Comparing alternative designs based on one replication of each design • Using wrong measure of performance

More Related