Skip to content

Kamilr616/ans-queue-algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📊 ANS Queue Algorithm — Queueing System Calculator

C++ Qt CMake License: MIT

🇵🇱 Polish version

🗓️ Project period: 2022–2023

📘 Technical documentation

A desktop application for analysing queueing systems, written in C++ with a Qt GUI. Given the parameters of a multi-server queueing model, the app computes its performance characteristics step by step.

Interface

The screenshot below comes from the built Qt application after calculating the example λ = 3, μ = 2, m = 2, N = 5.

Queue calculator with the example inputs and computed results

🧠 What is a queueing system?

Queueing theory describes systems where customers arrive, wait for a free server, get served, and leave — think checkout lines, call centers, or packets hitting a router. This app models an M/M/m/(m+N) system: Poisson arrivals, exponential service, m parallel servers, and N waiting places. The total system capacity is therefore m+N, and arrivals that find all those places occupied are rejected.

✨ Features

  • 🖥️ Qt GUI (mainwindow.ui) for entering parameters and reading results
  • 🧮 Model parameters:
    • λ (lambda) — arrival rate
    • μ (mu) — service rate
    • m — number of service channels (servers)
    • N — number of waiting places (total capacity: m+N)
  • 📈 Full set of computed characteristics (Steps class) — offered load ρ, idle probability p₀, the state-probability distribution p₁…p_(m+N), rejection probability, mean number of busy/idle channels, mean number in system and in queue, and mean times in the queue (T_f) and in the system (T_s)
  • 🔢 Numerically stable probabilities — state weights are normalized in logarithmic space, avoiding factorial overflow for larger inputs

🧪 Example

For example, entering λ = 3, μ = 2, m = 2, N = 5 describes a two-server system with five waiting places and a total capacity of seven customers. The app then reports, step by step:

  • the offered load ρ and the idle probability p₀,
  • the probability of each state p₁ … p₇ (and the rejection probability — the chance an arriving customer finds the system full),
  • the average number of customers in the system and waiting in the queue,
  • the average time a customer spends waiting (T_f) and in the system overall (T_s).

Change any parameter and every characteristic is recomputed.

📂 Repository structure

Path Description
src/main.cpp Application entry point
src/mainwindow.{h,cpp,ui} Qt main window — UI and event handling
src/Steps.{hpp,cpp} Queueing-model computation (all characteristics)
src/Factorial.{hpp,cpp} Legacy helper retained in the build; the current Steps calculations do not use factorials
src/global.hpp Shared constants and includes
Clocker.qss Legacy stylesheet asset (the current entry point does not load it)
docs/queue-calculator.png Screenshot from the built Qt application
CMakeLists.txt CMake build configuration

🚀 Building

Prerequisites

  • C++17 compiler (GCC/Clang/MSVC)
  • Qt 5/6 with Qt Widgets
  • CMake 3.5+

Build with CMake

git clone https://github.com/Kamilr616/ans-queue-algorithm.git
cd ans-queue-algorithm
cmake -B build -S . -DBUILD_TESTING=ON
cmake --build build --config Release
ctest --test-dir build -C Release --output-on-failure

The ctest command runs focused checks for the queueing calculations. Alternatively, open CMakeLists.txt directly in Qt Creator and press Run.

👥 Team

Member Role Links
Kamil Rataj Author & maintainer GitHub · LinkedIn
Dawid Co-author GitHub

📄 License

This project is licensed under the MIT License.

About

Qt desktop calculator for finite-capacity multi-server queueing systems, implemented in C++

Topics

Resources

License

Security policy

Stars

2 stars

Watchers

1 watching

Forks

Contributors