A project by KΓΌbra Temel
This project simulates an autonomous metro system and optimizes routes using graph-based algorithms. It provides two main functionalities:
- Finding the Least Transfer Route using Breadth-First Search (BFS)
- Finding the Fastest Route using A (A-Star) Algorithm*
This simulation helps visualize how metro networks can be optimized for efficiency, reducing transfer times and overall travel duration.
- Python π
- Jupyter Notebook π
- Graph Algorithms (BFS & A*)
KubraTemel_MetroSimulation/
βββ KubraTemel_MetroSimulation.ipynb # Jupyter Notebook with code & explanations
βββ README.md # Project documentation
- Clone the repository:
git clone https://github.com/kubtem/KubraTemel_MetroSimulation.git
cd KubraTemel_MetroSimulation
- Open Jupyter Notebook:
jupyter notebook KubraTemel_MetroSimulation.ipynb
- Run all cells to execute the simulation and test different metro routes! Algorithms Used
β’ Uses queue-based traversal to explore paths level by level. β’ Prioritizes paths with the fewest line transfers rather than the shortest distance.
β’ Uses priority queues to find the most time-efficient route. β’ Heuristic-based approach for faster pathfinding.
Stations and connections modeled in the project:
(A) --5min-- (B) --7min-- (C) --3min-- (D)
| |
10min 4min
| |
(E) ----------------------------------
route = metro.find_least_transfer_route("A", "D")
print("Least transfer route from A to D:", route)
π‘ Created by KΓΌbra Temel π§ Email: kubra.temel@outlook.it π GitHub: github.com/kubtem