Skip to content

codeurge123/DIJI-YATRA

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš† Digi-Yatra: Smart City Travel Simulator

Digi-Yatra is a C++ based command-line application simulating a travel management system between multiple cities. It incorporates Dijkstra's algorithm to determine the shortest path between cities, dynamic traffic condition simulation, and real-time fare estimation based on selected travel modes. Admins can configure city distances, set fares, and simulate roadblocks, while customers can explore travel options interactively.


๐Ÿ› ๏ธ Features

๐Ÿ‘ค Role-based System

  • Admin (password: admin123)

    • Set/update bus, train, and metro fares.
    • Input distance (graph) between cities.
    • Apply traffic conditions (simulate real-world congestion).
    • Visualize the graph and connectivity matrix.
    • Introduce roadblocks (remove edges).
    • Rank cities by connectivity.
  • Customer (password: cust123)

    • Find the shortest path between cities.
    • Get fare estimates based on mode of travel.
    • View all possible routes between cities.
    • Apply traffic conditions for real-time simulations.

๐Ÿ”ข Algorithms and Concepts Used

  • Dijkstraโ€™s Algorithm โ€“ for shortest path computation.
  • Graph Representation โ€“ using adjacency matrix.
  • Randomized Traffic Simulation โ€“ edges are altered by ยฑ20%.
  • Graph Traversal โ€“ DFS to find all routes.
  • Priority Queue โ€“ implemented using STL for Dijkstraโ€™s optimization.
  • Connectivity Matrix โ€“ shows the binary connectivity of cities.
  • City Ranking โ€“ based on the number of direct connections.

๐Ÿ–ฅ๏ธ User Interface Flow

  1. Captcha Verification

    • Validates human interaction by identifying ASCII shapes (triangle, diamond, hexagon).
  2. Role Selection

    • Choose between admin, customer, or exit.
  3. Admin Panel

    • Configure fares and the city map.
    • Simulate traffic and manage roadblocks.
  4. Customer Panel

    • Find shortest routes.
    • Estimate fares and generate random ticket numbers.
    • Explore all possible paths between two cities.
  5. Rating System

    • Users can rate the service (1โ€“5 stars) with ASCII visualization.

๐Ÿ” Default Credentials

Role Username Password
Admin admin admin123
Customer customer cust123

๐Ÿ“Š Technologies Used

  • C++ Standard Template Library (STL)
  • Graph Theory Algorithms
  • Random Number Generators (<random>)
  • Terminal Text Coloring (ANSI Escape Codes)

๐ŸŽฎ How to Run

  1. Compile the Code
    g++ -o digiyatra main.cpp

About

This is the project on Data structure and algorithm that help a user to find a shortest path from it source to destination and also optimize the path based on traffic codnition and give fare needed to reach to destination and it also include admin section where admin can update the traffic condition and also add more path

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages