Skip to content

Repository files navigation

Hyderabad Metro Routing System 🚇

A C++ terminal application that models the Hyderabad Metro network and computes the most optimal routes between stations using Dijkstra's Algorithm.

Features

  • Route Calculation: Finds the shortest path or fewest transfers between any two stations.
  • Via Routing: Route from point A to point C via point B.
  • Admin Disruption System: Simulate real-world metro disruptions by temporarily closing specific stations and re-routing traffic dynamically.
  • Live Fare & ETA: Accurately computes travel time (based on distance and stops) and exact fares according to HMRL fare slabs.
  • Fuzzy Station Search: Implements Levenshtein distance to catch typos and suggest the correct station name if a user misspells it.
  • Ticket Generation: Generates a physical ticket.txt file with your complete itinerary.

Data Structures & Algorithms Used

  • Dijkstra's Algorithm: For calculating the shortest path in a weighted graph.
  • Priority Queue: To optimize node exploration in Dijkstra's algorithm.
  • Levenshtein Distance: (Dynamic Programming) For fuzzy string matching and typo tolerance.

How to Compile & Run

  1. Make sure you have a C++ compiler (like g++) installed.
  2. Clone this repository.
  3. Open your terminal in the project directory.
  4. Compile the code:
    g++ *.cpp -o metro
  5. Run the executable:
    • On Windows: metro.exe
    • On Linux/Mac: ./metro

Demo / Admin Mode

Select 0 on the main menu and enter password admin123 to test the dynamic disruption system (closing/opening stations).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages