Skip to content

License

Notifications You must be signed in to change notification settings

Takshsingh313/UrbanFlow

Repository files navigation

UrbanFlow

UrbanFlow is a modern, high-performance web-based simulation platform for traffic flow analysis and urban planning. It provides real-time traffic simulation using cellular automata models, allowing users to experiment with different grid layouts, real-world maps (via OpenStreetMap), and traffic control parameters.

Mag Field Logo

Axiom

About

  • Try it here : link

Demo

  • Demo video of my project : Video

Features

  • Dual Simulation Modes:
    • Manual Mode: Create custom grid cities with adjustable rows, columns, and road options.
    • Real-World Mode: Select any city in the world using an interactive map and simulate traffic on actual road networks.
  • Real-Time Visualization:
    • Smooth, canvas-based rendering.
    • Realistic vehicle movement with acceleration, braking, and randomization.
    • Dynamic traffic lights with customizable timing.
  • Interactive Control:
    • Adjust vehicle spawn rates, initial vehicle counts, and traffic light durations on the fly.
    • Instant "Regenerate" and "Reset" functionality.
  • Analytics Dashboard:
    • Live charts visualizing Flow, Density, and Average Speed.
  • Templates:
    • Pre-built city layouts like Roundabouts, T-Intersections, round patterns.

Technology Stack

Backend (Python)

  • FastAPI
  • NumPy

Frontend

  • HTML5 / CSS3
  • JavaScript

Installation & Setupetup

  1. Prerequisites:

    • Python 3.8 or higher.
    • Modern Web Browser (Chrome, Firefox, Edge).
  2. Install Dependencies:

    pip install -r requirements.txt
  3. Run the Server:

    • Windows: Double-click run_simulation.bat.
    • Manual:
      python -m uvicorn backend.server:app --reload
  4. Access the Application:

    • Open your browser and navigate to: http://localhost:8000

Project Structure

UrbanFlow/
├── backend/
│   ├── core.py             
│   ├── model.py           
│   ├── server.py          
│   ├── map_loader.py      
│   └── osm_generator.py   
├── static/               
│   ├── images/
│   ├── js/                
│   │   ├── charts.js     
│   │   ├── main.js        
│   │   ├── theme.js       
│   │   └── visualizer.js  
│   ├── style.css           
│   ├── simulation.html     
│   ├── index.html          
│   ├── landing.html       
│   ├── data.html           
│   ├── docs.html          
│   ├── usage.html          
│   ├── config.html               
├── requirements.txt       
          
txt       
          

Author

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published