Project Overview
This project simulates and analyzes transport connectivity between major cities in Southern Africa using graph-based algorithms. The system models cities as nodes and transport routes as weighted edges, allowing efficient analysis of connectivity and shortest paths.
Why I Built This Project
I built this project to better understand how real-world transport and logistics systems are modeled in software. Southern Africa has long-distance transport routes that are critical for trade, emergency response, and regional development.
The project allowed me to apply graph theory concepts learned in class to a practical scenario, bridging the gap between theory and real system design.
Problem Statement
Analyzing transport connectivity across multiple cities manually is inefficient and error-prone. Decision-making in logistics, infrastructure planning, and emergency response requires fast and accurate route analysis.
This project addresses the problem by using graph algorithms to automatically analyze connectivity, identify reachable cities, and compute optimal routes based on distance.
Technologies Used
- C++ for core system implementation
- STL data structures (vector, queue, priority_queue)
- Graph algorithms (BFS and Dijkstra)
- Adjacency matrix for graph representation
Challenges Faced
- Correctly implementing Dijkstra’s algorithm using priority queues
- Avoiding revisiting nodes during BFS traversal
- Designing a graph structure that accurately represents real transport distances
- Debugging logical errors in path reconstruction
What I Learned
- How real-world transport networks can be modeled using graph theory
- Practical differences between BFS and Dijkstra’s algorithm
- Efficient use of STL containers for algorithm-heavy applications
- How algorithm efficiency impacts performance in large networks
- The relevance of graph algorithms in GPS, logistics, and smart city systems
Skills Highlighted
- Algorithm design and analysis
- Graph traversal and optimization
- Problem solving using data structures
- System modeling and abstraction
Project Access
The complete source code for this project is hosted on GitHub and can be accessed using the link below.
- GitHub Repository: View Source Code
The project is implemented in C++ and can be compiled and executed locally using any standard C++ compiler.
How to Run the Project
git clone https://github.com/Phumudzo2006/Transport-Connectivity-in-SA.git cd Transport-Connectivity-in-SA g++ main.cpp -o transport ./transport
Sample Output
TRANSPORT CONNECTIVITY IN SOUTHERN AFRICA ----------------------------------------- Adjacency Matrix Loaded: Johannesburg → Windhoek: 1400 km Gaborone → Johannesburg: 350 km Harare → Gaborone: 950 km BFS Traversal: Johannesburg → Windhoek → Gaborone → Harare → Maputo Dijkstra Shortest Path (Johannesburg to Harare): Johannesburg → Gaborone → Harare Total Distance: 1300 km