Simulation and ModelingUnit 38 min read
Queuing Systems: Models, Metrics & Real-World Applications
Unit 3 of Simulation and Modeling explores queuing theory fundamentals—arrival processes, service disciplines, performance metrics (Little’s Law, utilization), and classic models (M/M/1, M/M/c)—with Nepalese examples like eSewa payment queues and Pathao driver dispatch, plus hands-on calculations and validation techniq
Core Concepts
What is a Queuing System?
A queuing system is a mathematical model of a real-world scenario where customers (jobs, people, data packets) arrive, wait in a queue, and receive service from one or more servers. Key components:
Real-world analogy: A Khalti payment queue at a bank ATM:
- Customers (you) arrive randomly.
- Queue forms if the server (ATM) is busy.
- Service time depends on transaction complexity (fixed or variable).
- Departure: you leave after payment confirmation.
Key Definitions and Metrics
1. Arrival Process
Describes how customers enter the system. Common models:
- Poisson Process: Arrivals are random, independent, and occur at a constant average rate λ (customers/hour). Example: eSewa users logging in during peak hours (6–9 PM).
- Deterministic: Fixed time intervals (e.g., buses arriving every 15 minutes at a bus stop).
2. Service Discipline
Rules for selecting the next customer to serve:
| Discipline | Description | Example |
|---|---|---|
| FIFO | First-In-First-Out (fair) | Pathao driver dispatch |
| LIFO | Last-In-First-Out (stack-like) | Call-center callbacks |
| Priority | High-priority customers first | Emergency room triage |
| Random | Served in random order | Lottery system |
| Shortest Job First (SJF) | Shortest service time first | CPU scheduling in OS |
3. Performance Metrics
Critical for evaluating system efficiency:
- λ (Lambda): Arrival rate (customers/unit time).
- μ (Mu): Service rate (customers/unit time per server).
- ρ (Rho): Utilization factor = λ/μ (must be < 1 to avoid infinite queues).
- L: Average number of customers in the system (queue + service).
- Lq: Average number of customers in the queue (waiting).
- W: Average time a customer spends in the system.
- Wq: Average waiting time in the queue.
Little’s Law (the golden rule): Example: If 100 customers arrive/hour (λ = 100) and average wait time is 5 minutes (W = 5/60 hours), then customers in the system.
Classic Queuing Models
1. M/M/1 Model
- M: Markovian (Poisson arrivals, exponential service times).
- 1: Single server.
- Assumptions:
- Arrivals follow Poisson process (rate λ).
- Service times are exponentially distributed (rate μ).
- Infinite queue capacity (no customer is turned away).
- FIFO discipline.
Key Formulas:
Worked Example: NTC Customer Service Call Center
- Given:
- Calls arrive at 12/hour (λ = 12).
- Agent handles 15 calls/hour (μ = 15).
- Single agent (M/M/1).
- Calculate: Interpretation: On average, a caller waits 20 minutes before their call is answered, and there are 4 calls (including the one being served) in the system.
2. M/M/c Model
- c: Multiple servers (e.g., multiple ATMs at a bank).
- Key Formulas (for ): where is the probability of an empty system:
Worked Example: Daraz Order Fulfillment Center
- Given:
- Orders arrive at 20/hour (λ = 20).
- Each of 3 workers (c = 3) processes 10 orders/hour (μ = 10).
- Poisson arrivals, exponential service.
- Calculate:
- Utilization per server:
- Probability of empty system ():
- Average orders in system (): Interpretation: On average, 2.33 orders are in the system (queued or being processed).
In the Real World
eSewa Payment Queues:
- Idea Used: M/M/c model for handling multiple payment requests.
- How: During Diwali, eSewa’s servers act as "c" servers processing transactions (service rate μ). If λ (transactions/minute) exceeds , queues form, increasing . eSewa uses load balancing (adding more servers) to keep low.
Pathao Driver Dispatch:
- Idea Used: Priority-based queuing (SJF-like for nearby riders).
- How: Pathao’s algorithm prioritizes riders closest to available drivers (shortest "service time" to match). This reduces for urgent trips.
Nepal Traffic at Kathmandu Ring Road:
- Idea Used: M/M/1 with finite queue (traffic lights as servers).
- How: Vehicles arrive at rate λ (cars/minute) at a signal. If the green light (service rate μ) is busy, cars queue. During peak hours (7–9 AM), approaches 1, causing gridlock. Solutions: add more lanes (increase μ) or optimize signal timing (reduce λ spikes).
Validation and Limitations
When to Use Queuing Models?
| Scenario | Suitable Model | Why? |
|---|---|---|
| Single ATM at a bank | M/M/1 | Single server, random arrivals |
| Call center with 5 agents | M/M/c | Multiple servers, Poisson calls |
| Emergency room triage | Priority Queuing | Life-critical prioritization |
| Online exam proctoring (e.g., TU) | M/G/1 | Variable service times (cheating checks) |
Limitations:
- Assumptions: Real systems rarely fit Poisson/exponential perfectly (e.g., traffic has patterns).
- Complexity: Models like M/G/1 (general service time) require numerical methods.
- Human Behavior: Customers may abandon queues (e.g., Daraz shoppers leaving if > 5 minutes).
Exam Tip
Memorize Little’s Law: Always relate , , and . Examiners love questions like: "If a bank has 20 customers on average and each spends 5 minutes, what’s the arrival rate?" Answer: customers/hour.
Stability Check: Always ensure . If , the queue grows infinitely—instant fail if you ignore this.
Real-World Mapping:
- Single server: ATM, toll booth.
- Multiple servers: Hospital wards, Daraz fulfillment centers.
- Priority queues: ICU patients, VIP customers.
Graphical Questions:
- Sketch a queueing system diagram (like the Mermaid graph above) to explain scenarios.
- Plot vs. to show how queues explode as approaches 1.
Numerical Traps:
- Watch units! Convert minutes to hours or vice versa.
- For M/M/c, calculate step-by-step—examiners test this.
Based on the TU BIT syllabus for Simulation and Modeling, unit 3.
Discussion
Loading…