Queueing — Discrete Event Simulator

Interactive, event-driven, animated — seedable RNG, distributions, routing policies, CSV export.
Controls
Mode: Real-time
Presets & validation
Presets fill inputs to common test cases. Input validation warns on impossible values.
Live Visuals
Sim time: 0.00 sec
Legend:
Customer
Busy
Idle
Event log:

How to Use the Queueing Simulator

Getting Started

This discrete event simulator models queueing operations with various configurations. Follow these steps to begin:

  1. Configure Parameters: Set the number of queue counters, arrival and service distributions, and routing policy.
  2. Choose Distributions: Select probability distributions for customer arrivals and service times.
  3. Set Parameters: Adjust distribution parameters based on your selected distributions.
  4. Start Simulation: Click "Start" to begin the real-time simulation.

Understanding the Interface

The simulator is divided into three main panels:

Distribution Types Explained

Exponential Distribution

Models random events with a constant average rate. Commonly used for arrival processes where events occur independently.

Uniform Distribution

Events occur with equal probability within a specified range.

Normal Distribution

Models events that cluster around a mean value with symmetric variation.

Deterministic Distribution

Fixed, predictable intervals between events.

Routing Policies

Single Shared Queue

All customers join one queue, and go to the next available server. This typically minimizes average waiting time.

Separate Queues

Customers are assigned to specific servers (often round-robin) and must wait in that queue even if other servers are free.

Shortest Queue

Customers join the queue with the fewest waiting customers. This attempts to balance load across servers dynamically.

Interpreting the Metrics

Key Performance Indicators

Metric Interpretation Ideal Range
Avg Waiting Time (Wq) Time customers spend waiting in queue As low as possible
Avg System Time (W) Total time from arrival to departure Close to service time
Throughput Customers served per second Higher is better
System Utilization Percentage of server capacity being used 70-90% (balance efficiency vs. wait times)

Practical Scenarios to Explore

1. Light Load Scenario

Use the "Light load" preset to see a system with ample capacity. Notice how customers are served immediately with minimal waiting.

2. Heavy Load Scenario

The "Heavy load" preset demonstrates a system near capacity. Observe how queues build up and waiting times increase significantly.

3. Burst Arrivals

This scenario uses a normal distribution with high variability. Watch how the system handles sudden rushes of customers.

4. Comparing Routing Policies

Try the same parameters with different routing policies. Notice how single queue typically outperforms separate queues.

Queueing Theory Concepts

Little's Law

This fundamental principle states: L = λW, where:

You can verify this relationship in the simulator by comparing the metrics.

Traffic Intensity (ρ)

This measures how busy the system is: ρ = λ/(cμ), where:

When ρ approaches 1, the system becomes unstable with growing queues.

Tips for Effective Simulation

  1. Run Long Enough: Allow the simulation to run for sufficient time to reach steady state
  2. Use Seeds: Specify a seed value to reproduce exact scenarios for comparison
  3. Export Data: Use the CSV export to analyze performance metrics in detail
  4. Adjust Time Scale: Speed up or slow down the simulation to observe patterns

Troubleshooting Common Issues

Simulation Runs Too Fast/Slow

Adjust the "Time scale" parameter. Lower values slow down the simulation for better observation.

Unrealistic Results

Check that your arrival rate isn't significantly higher than your service capacity. The system needs λ < cμ to remain stable.

No Customers Appearing

Verify that arrival parameters are reasonable (not extremely large values). Try resetting with a preset.

Advanced Features

Event Logging

Toggle the event log to see a detailed timeline of customer arrivals, service starts, and departures.

Step-by-Step Execution

Use the "Step" button to advance the simulation one event at a time for detailed analysis.

Performance Charts

Monitor the queue length and average waiting time charts to identify trends and patterns over time.

Educational Value: This simulator demonstrates key queueing theory concepts that apply to many real-world systems beyond grocery stores, including call centers, computer networks, and manufacturing processes.