SimQueue — Supermarket Queue Simulation System
SimQueue is a full-stack supermarket queue simulation system built with Java Spring Boot for the backend and HTML/CSS/JavaScript for the frontend.
It models how customers move through supermarket checkout lines, simulating arrivals, service times, cashier behavior, and overall system performance.
Built for a Modeling & Simulation course, this project demonstrates modular OOP design and real-world queueing behavior.

⭐ Features
- Customer arrival simulation with random or scheduled intervals
- Multiple cashier queues with independent service behavior
- Event-driven architecture (Arrival, Service Start, Service End)
- Performance statistics: wait times, service duration, queue lengths, throughput
- Expandable design (priority queues, different strategies, additional cashier types)
- Optional front-end visualization using HTML/CSS/JavaScript or JavaFX
🛠️ Tech Stack
- Java, Spring Boot — core simulation logic
- Object-Oriented Programming (OOP) — cashiers, events, queues, simulation manager
- Git/GitHub — version control and documentation
- HTML/CSS/JavaScript (optional) — visualization layer
⚙️ How It Works
1. Customer Arrival
- Customers enter based on random intervals or a fixed schedule
- They join a queue using a selected strategy (shortest line, assigned line, etc.)
2. Cashier Behavior
- Each cashier processes customers independently
- Uses FIFO (first-in, first-out) ordering
- Updates occupancy status when starting/ending service
3. Event Handling System
Events drive the entire simulation:
- Arrival Event — adds customer to a queue
- Service Start Event — a cashier begins serving
- Service End Event — logs service statistics and frees cashier
4. Statistics Engine
Tracks:
- Total customers served
- Average customer wait time
- Queue length distribution
- System throughput over time
📚 Lessons Learned
- Strengthened understanding of event-driven simulation models
- Improved ability to design modular OOP systems for real processes
- Learned how to structure classes for clean interaction between events, queues, and entities
- Built experience debugging timing issues and multi-object interactions
- Explored connecting a simulation backend to a visual UI layer
🚧 Planned Improvements
- Add priority queue support
- Add animated visualization of customers entering/leaving lines
- Add CSV export for simulation metrics
- Add web dashboard for interactive controls and graphing
- Improve UI responsiveness and simulation configuration controls