Simulation of a Random Queuing System with Buffer Size 10
- Login to Download
- 1 Credits
Resource Overview
A MATLAB-based simulation of a queuing system with a total buffer capacity of 10 (including the customer being served). The implementation features: (1) Poisson arrival process (rate Mu) with independent exponential service times (mean 1/Lambda). Simulations conducted for Mu/Lambda ratios of 0.2, 0.8, and 1.1 to calculate probability P(n) of n customers in the system (n=0,...,10), with comparisons to theoretical results. (2) Alternative configuration with uniform arrival process (rate Mu) and independent Rayleigh-distributed service times (mean 1/Lambda). The code utilizes event-driven simulation approach with proper random number generation for statistical accuracy.
Detailed Documentation
I developed a MATLAB program to simulate a random queuing system with a total buffer size of 10 (including the customer currently being served). The system implements a Poisson arrival process with rate Mu and independent exponential service times having a mean of 1/Lambda. Using an event-driven simulation approach with proper time advancement mechanisms, I simulated three different traffic intensity scenarios: Mu/Lambda = 0.2, Mu/Lambda = 0.8, and Mu/Lambda = 1.1. For each case, I computed the probability P(n) of having n customers in the system (where n ranges from 0 to 10) through statistical collection over multiple simulation runs. The implementation uses MATLAB's random number generators (exprnd for exponential distribution) and maintains system state variables to track queue length changes. The simulation results were compared with theoretical queuing model predictions for validation.
Additionally, I implemented an alternative configuration where the arrival process follows a uniform distribution with rate Mu, and service times obey an independent Rayleigh distribution with mean 1/Lambda. For this scenario, I employed raylrnd function for service time generation and unifrnd for arrival intervals, conducting similar simulations to calculate P(n) probabilities for n=0 to 10. The program architecture allows flexible parameter modifications through input variables, enabling simulations under different system configurations and requirements.
This simulation program provides valuable insights into stochastic queuing system behavior, facilitating performance evaluation and optimization of real-world systems. The modular code structure separates arrival processing, service completion events, and statistical collection functions, making it easily extensible for additional queuing models or performance metrics.
- Login to Download
- 1 Credits