============================================================================
|| _____ _______ _ _ __ __ _____ ||
|| |_ _|__ __| \ | | \/ |/ ____| ||
|| | | | | | \| | \ / | (___ ||
|| | | | | | . ` | |\/| |\___ \ ||
|| _| |_ | | | |\ | | | |____) | ||
|| |_____| |_| |_| \_|_| |_|_____/ ||
|| ||
|| Intelligent Transport Network Management System ||
============================================================================
A Complete Data Structures & Algorithms Implementation in C++
A semester project for CS 221 - Data Structures & Algorithms
GIKI - Ghulam Ishaq Khan Institute
- Overview
- Features
- Project Structure
- Data Structures Implemented
- Algorithms Implemented
- Installation & Usage
- Screenshots
- Technical Details
- Contributors
ITNMS is a comprehensive transport network management system that demonstrates the practical application of fundamental data structures and algorithms. The system manages stations, routes, vehicles, passengers, and tickets while providing advanced graph algorithms for route optimization.
- β 100% Custom Implementation - No STL containers used
- β 10+ Data Structures - All built from scratch
- β 13+ Algorithms - Including graph traversals and sorting
- β Interactive CLI - Beautiful ASCII art interface
- β Analytics Dashboard - Traffic predictions and insights
- Add, delete, and view stations
- Track passenger counts per station
- Location-based organization
- Create routes between stations
- Distance tracking in kilometers
- Bidirectional route support
- Register vehicles with capacity
- Speed-based assignment
- Automatic fastest vehicle selection
- FIFO queue-based passenger processing
- Automated ticket generation
- Journey tracking with station names
- Most crowded station analysis
- Busiest route identification
- Traffic density prediction
- Daily usage trends
- BFS - Breadth-First Search traversal
- DFS - Depth-First Search traversal
- Dijkstra's Algorithm - Shortest path finding
- Prim's MST - Minimum Spanning Tree
- Cycle Detection - Network integrity check
- Linear Search & Binary Search
- Bubble, Selection, Insertion Sort
- Quick Sort, Merge Sort, Heap Sort
ITNMS/
βββ π README.md
βββ π LICENSE
βββ π CPP/
β βββ π main.cpp # Main application entry
β β
β βββ π ds/ # Data Structures
β β βββ array.h # Dynamic Array
β β βββ linkedlist.h # Singly Linked List
β β βββ stack.h # Stack (Array-based)
β β βββ queue.h # Queue (Linked List-based)
β β βββ hashtable.h # Hash Table with chaining
β β βββ heap.h # Min Heap
β β βββ trees.h # Binary Search Tree
β β βββ graph.h # Weighted Graph
β β βββ pair.h # Pair utility
β β βββ orderedmap.h # Ordered Map
β β βββ searching.h # Search algorithms
β β βββ sorting.h # Sorting algorithms
β β
β βββ π models/ # Domain Models
β β βββ station.h # Station entity
β β βββ route.h # Route entity
β β βββ vehicle.h # Vehicle entity
β β βββ passenger.h # Passenger entity
β β βββ ticket.h # Ticket entity
β β
β βββ π system/ # System Managers
β βββ route_manager.h # Station & Route operations
β βββ vehicle_manager.h # Vehicle operations
β βββ ticket_manager.h # Ticket & Queue operations
β βββ history_manager.h # Undo functionality
β βββ analytics.h # Data analytics
| # | Data Structure | File | Description |
|---|---|---|---|
| 1 | Dynamic Array | array.h |
Resizable array with amortized O(1) insertion |
| 2 | Linked List | linkedlist.h |
Singly linked list with head/tail pointers |
| 3 | Stack | stack.h |
LIFO structure for undo operations |
| 4 | Queue | queue.h |
FIFO structure for passenger management |
| 5 | Hash Table | hashtable.h |
Chained hashing for O(1) lookups |
| 6 | Min Heap | heap.h |
Priority queue for Dijkstra's algorithm |
| 7 | Binary Search Tree | trees.h |
Ordered data storage |
| 8 | Graph | graph.h |
Weighted adjacency list representation |
| 9 | Pair | pair.h |
Generic tuple utility |
| 10 | Ordered Map | orderedmap.h |
Key-value storage with ordering |
| Algorithm | Complexity | Use Case |
|---|---|---|
| BFS | O(V + E) | Level-order traversal |
| DFS | O(V + E) | Deep exploration |
| Dijkstra | O((V + E) log V) | Shortest path |
| Prim's MST | O(E log V) | Minimum spanning tree |
| Cycle Detection | O(V + E) | Network validation |
| Algorithm | Best | Average | Worst |
|---|---|---|---|
| Bubble Sort | O(n) | O(nΒ²) | O(nΒ²) |
| Selection Sort | O(nΒ²) | O(nΒ²) | O(nΒ²) |
| Insertion Sort | O(n) | O(nΒ²) | O(nΒ²) |
| Quick Sort | O(n log n) | O(n log n) | O(nΒ²) |
| Merge Sort | O(n log n) | O(n log n) | O(n log n) |
| Heap Sort | O(n log n) | O(n log n) | O(n log n) |
| Algorithm | Complexity | Requirement |
|---|---|---|
| Linear Search | O(n) | None |
| Binary Search | O(log n) | Sorted array |
- C++11 compatible compiler (g++, clang++, MSVC)
- Windows / Linux / macOS
# Navigate to CPP directory
cd CPP
# Compile with g++
g++ -std=c++11 -o transport_system main.cpp
# Run the application
./transport_system.exe # Windows
./transport_system # Linux/macOS- Add Stations - Create transport network nodes
- Add Routes - Connect stations with distances
- Register Vehicles - Add transport vehicles
- Process Passengers - Queue and issue tickets
- Run Analytics - View insights and predictions
- Explore Algorithms - Test graph and sorting demos
============================================================================
|| _____ _______ _ _ __ __ _____ ||
|| |_ _|__ __| \ | | \/ |/ ____| ||
|| | | | | | \| | \ / | (___ ||
|| | | | | | . ` | |\/| |\___ \ ||
|| _| |_ | | | |\ | | | |____) | ||
|| |_____| |_| |_| \_|_| |_|_____/ ||
|| ||
|| Intelligent Transport Network Management System ||
|| Version 1.0 ||
============================================================================
==================== MAIN MENU ====================
|| ||
|| 1. Manage Stations ||
|| 2. Manage Routes ||
|| 3. Manage Vehicles ||
|| 4. Manage Passengers & Tickets ||
|| 5. View System Information ||
|| 6. Graph Algorithms & Analysis ||
|| 7. History & Undo ||
|| 8. Searching & Sorting Demos ||
|| 9. Exit ||
====================================================
- No STL Containers - All data structures implemented from scratch
- Header-Only - Single compilation unit for simplicity
- Modular Architecture - Separated concerns (models, DS, managers)
- Memory Management - Proper allocation/deallocation
- β
Custom Dynamic Array (replaces
std::vector) - β
Custom Linked List (replaces
std::list) - β
Custom Hash Table (replaces
std::unordered_map) - β
Custom Queue (replaces
std::queue) - β
Custom Stack (replaces
std::stack) - β
Custom Heap (replaces
std::priority_queue)
| Name | Role |
|---|---|
| Misbah Ullah | Developer |
| Abdul Rauf | Developer |
| Syed Ahsan | Developer |
This project is licensed under the MIT License - see the LICENSE file for details.
Made with β€οΈ for CS 221 - Data Structures & Algorithms
GIKI - Ghulam Ishaq Khan Institute of Engineering Sciences and Technology
β Star this repository if you found it helpful!