Skip to content

chaykup/interactive-map-navigator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Campus Navigation System

An interactive campus navigation system that uses BFS and DFS algorithms to find paths between buildings on a virtual campus map. This project lets you create a virtual campus map by adding buildings and connecting them with paths. You can then use two different search algorithms (BFS and DFS) to find routes between buildings. The system visualizes how each algorithm explores the campus to find a path.

Features

  • Create Buildings: Click on the canvas to add buildings to your campus
  • Connect Paths: Link buildings together with paths that have distance, travel time, and accessibility properties
  • Find Routes: Use BFS (shortest path) or DFS (any valid path) to navigate between buildings
  • Simulate Real Conditions:
    • Randomize weights to simulate traffic changes
    • Close paths to simulate construction
    • Filter for accessible-only routes
  • Visual Feedback: See the path-finding process with color-coded edges:
    • 🟩 Green = Found path
    • 🔴 Red = Closed path
    • 🟧 Orange = Non-accessible path
    • ⚫ Black = Regular path

Algorithms

BFS (Breadth-First Search): Finds the shortest path by exploring level by level. Guarantees the minimum number of hops between buildings.

DFS (Depth-First Search): Explores as far as possible down each path before backtracking. Finds a valid route but not necessarily the shortest.

Installation

Requirements

  • Python 3.7 or higher

Setup

  1. Download the project files:

    • apply.py
    • requirements.txt
  2. Since this project only uses Python's built-in libraries, no additional packages need to be installed. Just make sure you have Python installed:

    python --version
  3. If you don't have tkinter (rare), install it:

    • Ubuntu/Debian: sudo apt-get install python3-tk
    • macOS: brew install python-tk
    • Windows: Included with Python installer

How to Run

  1. Open a terminal or command prompt

  2. Navigate to the project folder:

    cd path/to/project
  3. Run the program:

    python apply.py

How to Use

  1. Add Buildings: Click anywhere on the white canvas and enter a building name

  2. Connect Buildings:

    • Click the "Add Path" button
    • Enter the names of two buildings to connect
    • Enter distance (in feet) and time (in minutes)
    • Choose if the path is accessible
  3. Find a Route:

    • Click "Run BFS" or "Run DFS"
    • Enter the start building name
    • Enter the destination building name
    • Watch the algorithm find and animate the path
  4. Try Different Scenarios:

    • Use "Randomize Weights" to simulate traffic changes
    • Use "Toggle Path" to close/open specific paths
    • Check "Accessible Only" to find wheelchair-accessible routes only
    • Use "Reset Route" to clear the visualization
    • Use "Clear Map" to start over

Example

1. Click on the canvas and add: "Library", "Cafeteria", "Gym"
2. Click "Add Path" to connect Library → Cafeteria (distance: 200, time: 5)
3. Click "Add Path" to connect Cafeteria → Gym (distance: 150, time: 3)
4. Click "Add Path" to connect Library → Gym (distance: 400, time: 10)
5. Click "Run BFS" and search from "Library" to "Gym"
6. See the shortest path highlighted in green!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages