Skip to content

vinodbgit/Emergency-Routing-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸš‘ Emergency Vehicle Routing System

This mini-project demonstrates how graph algorithms (BFS & DFS) can be applied to real-world problems like emergency vehicle routing in urban cities. It helps simulate how ambulances, fire trucks, or police vehicles can find the shortest path in a road network using Breadth-First Search (BFS) and compare it with Depth-First Search (DFS).


πŸ“Œ Features

  • Visualize the city road network as a graph (nodes = locations, edges = roads).
  • Input start and goal locations through GUI.
  • BFS Path β†’ Finds & animates the shortest path.
  • DFS Path β†’ Finds & animates a possible path (not always shortest).
  • Best Path β†’ Compares BFS vs DFS paths.
  • Ambulance animation showing the route step-by-step.

πŸ› οΈ Tools & Technologies

  • Language: Python 3.x

  • Libraries:

    • Tkinter β†’ GUI development
    • NetworkX β†’ Graph creation & visualization
    • Matplotlib β†’ Graph plotting & animation
    • Collections (deque) β†’ Efficient BFS queue
  • IDE: VS Code / PyCharm / Jupyter Notebook

  • OS: Windows / Linux / Mac


πŸ“‚ Project Structure

πŸ“¦ Emergency-Vehicle-Routing
 ┣ πŸ“œ main.py              # Project source code
 ┣ πŸ“œ README.md            # Project documentation
 β”— πŸ“‚ screenshots          # Output screenshots

πŸ—οΈ System Architecture

  1. Graph Representation

    • Nodes β†’ Locations (Hospital, School, Mall, Fire Station, etc.)
    • Edges β†’ Roads between locations
  2. Algorithms

    • BFS β†’ Finds shortest path in unweighted graphs
    • DFS β†’ Explores a path (not always shortest)
  3. GUI Components

    • Start & Goal input fields
    • Buttons: BFS Path | DFS Path | Best Path | Clear
    • Ambulance route animation

▢️ How to Run

  1. Clone the repository

    git clone https://github.com/your-username/emergency-routing-system.git
    cd emergency-routing-system
  2. Install dependencies

    pip install matplotlib networkx
  3. Run the project

    python main.py

πŸ“š References


βœ… Conclusion

This project shows the practical application of graph algorithms in real-life emergency routing. It highlights why BFS is preferred over DFS for shortest-path problems in unweighted graphs, while also providing an interactive and educational GUI simulation.

About

It is mini project developed based on Data Structure in Python to find Best Path between locations in a City.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages