A C++ terminal application that models the Hyderabad Metro network and computes the most optimal routes between stations using Dijkstra's Algorithm.
- 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.txtfile with your complete itinerary.
- 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.
- Make sure you have a C++ compiler (like
g++) installed. - Clone this repository.
- Open your terminal in the project directory.
- Compile the code:
g++ *.cpp -o metro - Run the executable:
- On Windows:
metro.exe - On Linux/Mac:
./metro
- On Windows:
Select 0 on the main menu and enter password admin123 to test the dynamic disruption system (closing/opening stations).