Skip to content

misbah-ullah01/ITNMS-GIKI-SEM3-project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

23 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš‡ ITNMS - Intelligent Transport Network Management System

  ============================================================================
  ||   _____ _______ _   _ __  __  _____                                    ||
  ||  |_   _|__   __| \ | |  \/  |/ ____|                                   ||
  ||    | |    | |  |  \| | \  / | (___                                     ||
  ||    | |    | |  | . ` | |\/| |\___ \                                    ||
  ||   _| |_   | |  | |\  | |  | |____) |                                   ||
  ||  |_____|  |_|  |_| \_|_|  |_|_____/                                    ||
  ||                                                                        ||
  ||        Intelligent Transport Network Management System                 ||
  ============================================================================

A Complete Data Structures & Algorithms Implementation in C++

C++11 Build License DS Algorithms


A semester project for CS 221 - Data Structures & Algorithms
GIKI - Ghulam Ishaq Khan Institute


πŸ“‹ Table of Contents


🎯 Overview

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.

🌟 Key Highlights

  • βœ… 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

✨ Features

🏒 Station Management

  • Add, delete, and view stations
  • Track passenger counts per station
  • Location-based organization

πŸ›€οΈ Route Management

  • Create routes between stations
  • Distance tracking in kilometers
  • Bidirectional route support

🚌 Vehicle Management

  • Register vehicles with capacity
  • Speed-based assignment
  • Automatic fastest vehicle selection

🎫 Ticket & Passenger System

  • FIFO queue-based passenger processing
  • Automated ticket generation
  • Journey tracking with station names

πŸ“Š Analytics & Insights

  • Most crowded station analysis
  • Busiest route identification
  • Traffic density prediction
  • Daily usage trends

πŸ”¬ Graph Algorithms

  • 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

πŸ” Searching & Sorting Demos

  • Linear Search & Binary Search
  • Bubble, Selection, Insertion Sort
  • Quick Sort, Merge Sort, Heap Sort

πŸ“ Project Structure

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 Structures Implemented

# 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

⚑ Algorithms Implemented

Graph Algorithms

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

Sorting Algorithms

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)

Searching Algorithms

Algorithm Complexity Requirement
Linear Search O(n) None
Binary Search O(log n) Sorted array

πŸš€ Installation & Usage

Prerequisites

  • C++11 compatible compiler (g++, clang++, MSVC)
  • Windows / Linux / macOS

Compilation

# 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

Quick Start

  1. Add Stations - Create transport network nodes
  2. Add Routes - Connect stations with distances
  3. Register Vehicles - Add transport vehicles
  4. Process Passengers - Queue and issue tickets
  5. Run Analytics - View insights and predictions
  6. Explore Algorithms - Test graph and sorting demos

πŸ“Έ Screenshots

Main Menu

  ============================================================================
  ||   _____ _______ _   _ __  __  _____                                    ||
  ||  |_   _|__   __| \ | |  \/  |/ ____|                                   ||
  ||    | |    | |  |  \| | \  / | (___                                     ||
  ||    | |    | |  | . ` | |\/| |\___ \                                    ||
  ||   _| |_   | |  | |\  | |  | |____) |                                   ||
  ||  |_____|  |_|  |_| \_|_|  |_|_____/                                    ||
  ||                                                                        ||
  ||        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                                      ||
  ====================================================

πŸ”¬ Technical Details

Design Principles

  • 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

Constraints Met

  • βœ… 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)

πŸ‘¨β€πŸ’» Contributors

Name Role
Misbah Ullah Developer
Abdul Rauf Developer
Syed Ahsan Developer

πŸ“„ License

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!

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages