A discrete-event queueing model simulator built for the Dr. Essa Diagnostic Laboratory. Models patient flow at the front desk during peak hours (9:00 AM – 11:00 AM) using analytical queueing theory formulas.
The system allows users to configure queueing parameters and instantly compute key performance metrics such as average waiting time, queue length, server utilization, idle time, and lab throughput — for five queueing models with full multi-server support.
| Model | Arrival | Service | Multi-Server Support |
|---|---|---|---|
| M/M/s | Exponential | Exponential | ✅ Exact (Erlang-C) |
| M/G/s | Exponential | General | ✅ Cosmetatos Approximation |
| G/G/s | General | General | ✅ Extended Kingman Approximation (Whitt) |
| M/M/1 | Exponential | Exponential | (Single-server case of M/M/s) |
| M/G/1 | Exponential | General | (Single-server case of M/G/s) |
| G/G/1 | General | General | (Single-server case of G/G/s) |
- Uniform — parameterized by Minimum and Maximum
- Normal — parameterized by Mean and Variance
- Gamma — parameterized by Mean and Variance
- λ — Arrival rate (patients/min)
- μ — Service rate (patients/min)
- ρ — Server utilization (per server)
- Idle Time — Fraction of time servers are idle
- Lq — Average number of patients waiting in queue
- L — Average number of patients in the system
- Wq — Average waiting time in queue (minutes)
- W — Average total time in system (minutes)
- Throughput — Expected patients served in 120 minutes
- Stability Status — Whether the system is stable (ρ < 1)
Make sure you have the following installed on your system before running the project:
- .NET 8 SDK — required to build and run the backend API. Verify with
dotnet --version. - Node.js (v18 or higher) — required for the Next.js frontend
- npm (comes with Node.js)
git clone https://github.com/developer-kamran/Diagnostic-Lab-Simulator.git
cd Diagnostic-Lab-Simulatorcd backend/DLSimulator.API
dotnet runThe API will start at http://localhost:5000.
Swagger UI is available at http://localhost:5000/swagger.
Open a new terminal:
cd frontend
npm install
npm run devThe frontend will start at http://localhost:3000.
Request Body Example (M/M/s — Multi-server):
{
"modelType": 0, // 0 = M/M/s, 1 = M/G/s, 2 = G/G/s
"arrivalDistribution": 0, // 0 = Exponential
"arrivalMean": 5,
"serviceDistribution": 0, // 0 = Exponential
"serviceMean": 3,
"numberOfServers": 3,
"simulationDuration": 120
}Request Body Example (G/G/s with Uniform distributions):
{
"modelType": 2, // 0 = M/M/s, 1 = M/G/s, 2 = G/G/s
"arrivalDistribution": 1, // 1 = Uniform, 2 = Normal, 3 = Gamma
"arrivalMin": 2,
"arrivalMax": 8,
"serviceDistribution": 1, // 1 = Uniform, 2 = Normal, 3 = Gamma
"serviceMean": 4,
"serviceVariance": 2,
"numberOfServers": 2,
"simulationDuration": 120
}Response:
{
"modelType": 0, // 0 = M/M/s, 1 = M/G/s, 2 = G/G/s
"numberOfServers": 1,
"lambda": 0.2,
"mu": 0.3333,
"rho": 0.6,
"idleTime": 0.4,
"lq": 0.9,
"l": 1.5,
"wq": 4.5,
"w": 7.5,
"throughput": 24.0,
"isStable": true,
"stabilityMessage": null
}| Layer | Technology |
|---|---|
| Backend | C# ASP.NET Core 8 Web API |
| Frontend | Next.js 14, Tailwind CSS |
This project was developed for academic purposes as part of CSSE-607 — Modeling and Simulation.