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.
-
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.
- 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.
-
Captcha Verification
- Validates human interaction by identifying ASCII shapes (
triangle,diamond,hexagon).
- Validates human interaction by identifying ASCII shapes (
-
Role Selection
- Choose between
admin,customer, orexit.
- Choose between
-
Admin Panel
- Configure fares and the city map.
- Simulate traffic and manage roadblocks.
-
Customer Panel
- Find shortest routes.
- Estimate fares and generate random ticket numbers.
- Explore all possible paths between two cities.
-
Rating System
- Users can rate the service (1โ5 stars) with ASCII visualization.
| Role | Username | Password |
|---|---|---|
| Admin | admin | admin123 |
| Customer | customer | cust123 |
- C++ Standard Template Library (STL)
- Graph Theory Algorithms
- Random Number Generators (
<random>) - Terminal Text Coloring (ANSI Escape Codes)
- Compile the Code
g++ -o digiyatra main.cpp