Public Transport Queue System (C++)

A console-based simulation that models passenger arrivals, priority boarding, and taxi departures using queue-based scheduling and time-based events.

Built to strengthen my data structures and system modeling skills for software engineering internship roles.

Project Overview

This project simulates a public transport boarding environment where passengers arrive over time and are assigned to different taxi types. The system tracks queues, boarding, and departures, producing clear console logs to show how scheduling decisions affect flow and efficiency.

C++ STL Queues Simulation OOP

Why I Built This Project

I built this project to practice turning a real-world problem (crowded transport queues) into a structured software model. I wanted hands-on experience with queues, time-based logic, and writing clean, testable simulation code.

It also helped me improve how I explain system behavior through logs—something that’s important when debugging and presenting results.

Problem Statement

In real public transport systems, unmanaged queues can cause delays, unfair boarding, and confusion—especially when multiple vehicle types and passenger priorities exist. A structured queue-based approach can improve fairness and reduce congestion.

This simulation explores how queue rules, priorities, and vehicle capacity affect boarding efficiency and departure timing.

Technologies Used

Key Features

My Role in the Project

Challenges Faced

What I Learned

Project Access

The complete source code for this project is hosted on GitHub:

This is a C++ console application and can be compiled locally using a standard C++ compiler.

How to Run the Project

git clone https://github.com/Phumudzo2006/PublicTransportQueue.git
cd PublicTransportQueue

# If your main file is main.cpp:
g++ main.cpp -o transport
./transport

# If your project has multiple .cpp files:
# g++ *.cpp -o transport
# ./transport
      

If your main file is not main.cpp, replace it with the correct filename (or use the *.cpp option).

Sample Output

PUBLIC TRANSPORT QUEUE SYSTEM
-----------------------------
Time: 0 | Arrivals: S0(3) L0(5)
Taxi S: Boarding S0(3)
Taxi L: Boarding L0(5)

Time: 1 | Arrivals: C1(4)
Taxi C: Boarding C1(4)

Time: 5 | Taxi S FULL — Departing
Time: 6 | Taxi L FULL — Departing
Time: 7 | Taxi C FULL — Departing
      

Future Improvements

← Back to Portfolio