Skip to content

sonmessia/GreenWave

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

120 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
GreenWave-Logo

GreenWave - Smart Traffic Management System

AI-Powered Traffic Optimization for Cleaner Cities

License: MIT FIWARE Docker


Documentation β€’ Quick Start β€’ Architecture β€’ Features


Overview

⚠️ Warning

Disclaimer: This example is for demo use only. It's not production-ready and may omit important features.

GreenWave is an intelligent traffic management system that uses Reinforcement Learning to simultaneously optimize traffic flow and reduce environmental pollution. Unlike traditional systems that only focus on minimizing wait times, GreenWave considers real-time air quality data to prevent pollution hotspots near schools, hospitals, and residential areas.

Key Highlights

🚦 Intelligent Control 🌱 Environmental Awareness
Multi-Objective Optimization
Balances traffic flow and air quality simultaneously
Pollution Prevention
Protects sensitive areas like schools and hospitals
AI-Driven Decision Making
Uses Reinforcement Learning (DQN) for adaptive signals
Real-Time Monitoring
Live dashboards with sub-second updates
Linked Data Integration
Fully NGSI-LD compliant for semantic interoperability
FIWARE-Based
Built on industry-standard IoT platform

Features

Intelligent Control

  • AI-Driven Traffic Coordination - DQN-based adaptive signal control
  • Multi-Objective Optimization - Balance traffic flow & air quality
  • Real-Time Decision Making - Sub-second response to traffic changes

Environmental Awareness

  • Air Quality Monitoring - PM2.5, CO, NO2 sensors at intersections
  • Emission Estimation - Traffic-based pollution prediction
  • Pollution Hotspot Prevention - Protect sensitive areas

Monitoring & Visualization

Admin Dashboard - Comprehensive control panel with AI/manual modes

  • Public Air Quality Portal - User-facing environmental metrics
  • Historical Analytics - Time-series data visualization
  • Real-Time Monitoring - Live dashboards and analytics for instant insights
  • Control Panel By Hand/AI - Manual and AI modes for traffic control
  • Manage Sensors - Add, remove, and configure sensors
  • Manage Subscriptions - Subscribe to real-time data streams

DevOps & Standards

  • CI/CD Pipeline - Automated testing & deployment
  • OpenAPI Documentation - Comprehensive API specs
  • Open Source Compliance - MIT License, Contributing Guidelines

Architecture

Architecture

Core Components

Component Technology Purpose
Context Broker Orion-LD Real-time context management (NGSI-LD)
AI Engine Python Reinforcement Learning traffic optimization
Simulation SUMO Urban mobility simulation
Time-Series DB CrateDB Historical data storage & analytics
Frontend React Admin dashboard & public portal
Database MongoDB Current state persistence

Getting Started

Prerequisites

Requirement Version Download
Docker 28.3.2+ Get Docker
Node.js 24.6.0+ Get Node.js
SUMO 1.25.0+ Get SUMO

Note: If you want to run SUMO on your local machine, you need to download and install it from the SUMO website.

πŸƒβ€β™‚οΈ Run the Application

Follow these steps to get GreenWave running locally:

# Clone the repository git clone https://github.com/sonmessia/GreenWave.git # Navigate to the project directory cd GreenWave # Copy the environment variables cp .env.example .env # Navigate to the project directory cd src/backend # Copy the environment variables cp .env.example .env

Launch All Services

# Start all services with Docker Compose docker compose up -d

Start Backend Only

# By Docker Compose # Start backend service with Docker Compose docker compose up -d backend # Stop backend service with Docker Compose docker compose down backend # By Python cd src/backend # Change directory to backend # Copy the environment variables cp .env.example .env pip install -r requirements.txt # Install dependencies uvicorn app.main:app --host 0.0.0.0 --port 8000 # Run backend

Start Frontend Only

# By Docker Compose # Start frontend service with Docker Compose docker compose up -d frontend # Stop frontend service with Docker Compose docker compose down frontend # By Node.js cd src/frontend # Change directory to frontend # Copy the environment variables cp .env.example .env npm install # Install dependencies npm run dev # Run frontend

Access Points

Once services are running, access them at:

Service URL Description
Frontend http://localhost:5173 User & Admin interfaces
Backend API http://localhost:8000 REST API endpoints
Context Broker http://localhost:1026 Orion-LD NGSI-LD API
Quantum Leap http://localhost:8668 Time-series data storage

Learn More

Explore detailed tutorials, API references, architecture guides, and more!

Contributing

πŸ“– Contributing Guidelines

We are excited that you are interested in contributing to this project! Before submitting your contribution, please make sure to take a moment and read through the following guidelines:

Read through our contributing guidelines to learn about our submission process, coding rules, and more.

πŸ’ Want to Help?

Want to report a bug, contribute some code, or improve the documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues labeled as help wanted or good first issue.

πŸ«‚ Code of Conduct

Help us keep GreenWave open and inclusive. Please read and follow our Code of Conduct.

Support and Organization

Hutech Hutech ICPC

License

This project is licensed under the terms of the MIT license.

About

🌿 GreenWave is an intelligent traffic management system that uses Reinforcement Learning to simultaneously optimize traffic flow and reduce environmental pollution

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors