AI Decision System for Future Traffic Prediction โ Based on Deep Learning Fusion with Physics and Shockwave Theory
Real-time demonstration of the traffic shockwave warning system in action
| Achievement | Event | Date |
|---|---|---|
| ๐ฅ 2nd Place (1st Place Vacant) | National Expressway Intelligent Traffic Competition | Oct 2024 |
| ๐ค Invited Speaker | 2025 Chinese Institute of Transportation Annual Conference | Dec 2025 |
This project was presented at the 2025 Annual Meeting of the Chinese Institute of Transportation, sharing our innovative approach of combining deep learning with physics-based shockwave theory for highway traffic prediction.
|
Official Competition Poster |
2025 CIT Annual Conference |
Conference Presentation |
| Real-Time Monitoring | Shockwave Detection | AI Prediction | Smart Routing |
| 62 ETC stations across Taiwan | Sub-5 second alert latency | 10-60 min advance forecast | Dynamic route optimization |
| Level | Speed Drop | Visual | Action |
|---|---|---|---|
| ๐ข Mild | 10-20 km/h | Green | Minor delays expected |
| ๐ก Moderate | 20-30 km/h | Yellow | Consider alternative routes |
| ๐ด Severe | 30+ km/h | Red | Route change recommended |
Features Highlight
- Interactive traffic map with real-time congestion status
- Shockwave radar visualization with propagation animation
- AI-powered route suggestions
- Personalized departure time recommendations
Features Highlight
- Network-wide traffic monitoring
- MT-SWNet prediction visualization (90% confidence)
- AI decision support recommendations
- Historical trend analysis
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Frontend Layer โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Driver โ โ Admin โ โ Real-time Map โ โ
โ โ Dashboard โ โ Control โ โ (React + Leaflet) โ โ
โ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ WebSocket / REST API
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Backend Layer โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ FastAPI Server (Port 8000) โ โ
โ โ โข /api/traffic โข /api/shockwave โข /api/prediction โ โ
โ โ โข /api/location โข /api/rag โข /api/admin โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โ
โ โ MT-SWNet โ โ Shockwave โ โ RAG AI โ โ
โ โ Predictor โ โ Detector โ โ Assistant โ โ
โ โ (TensorFlow) โ โ (LWR Physics) โ โ (Ollama) โ โ
โ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Data Layer โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ TDX API โ โ TISC API โ โ SQLite + Graph Data โ โ
โ โ (Real-time)โ โ (Real-time)โ โ (62ร62 Adjacency) โ โ
โ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
| Model | MAE (veh/5min) | RMSE | MAPE (%) | Rยฒ |
|---|---|---|---|---|
| MT-SWNet | 12.3 | 18.7 | 8.5 | 0.912 |
| Graph-WaveNet | 13.2 | 19.8 | 8.9 | 0.903 |
| AGCRN | 13.8 | 21.2 | 9.3 | 0.895 |
| DCRNN | 14.5 | 22.1 | 9.8 | 0.887 |
| LSTM | 18.9 | 28.7 | 13.5 | 0.798 |
| ARIMA | 21.3 | 32.1 | 15.7 | 0.721 |
- Python 3.11+
- Node.js 18.0+
- TDX API credentials (Apply here)
- Google Maps API key (Get here)
# Clone repository
git clone https://github.com/timwei0801/Highway_trafficwave.git
cd Highway_trafficwave
# Backend setup
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -r requirements.txt
# Frontend setup
cd frontend && npm install && cd ..
# Configure environment
cp .env.example .env
# Edit .env with your API credentials# Option 1: One-command deployment
./deploy.sh
# Option 2: Manual startup
# Terminal 1 - Backend
cd api && python main.py
# Terminal 2 - Frontend
cd frontend && npm run dev| Interface | URL | Description |
|---|---|---|
| ๐ Driver Dashboard | http://localhost:3000/driver | Navigation & alerts |
| ๐๏ธ Admin Control | http://localhost:3000/admin | System management |
| ๐ API Docs | http://localhost:8000/docs | Swagger UI |
Get Active Shockwaves
import requests
response = requests.get('http://localhost:8000/api/shockwave/active')
shockwaves = response.json()
for sw in shockwaves['active_shockwaves']:
print(f"Severity: {sw['severity']}, Speed Drop: {sw['speed_drop']} km/h")Traffic Prediction
payload = {
"station_ids": ["01F0340N", "01F0360N"],
"prediction_steps": 12 # 60 minutes
}
response = requests.post('http://localhost:8000/api/prediction/traffic', json=payload)
predictions = response.json()AI Assistant Query
payload = {
"query": "Best time to travel from Taipei to Hsinchu?",
"context": {"origin": "Taipei", "destination": "Hsinchu"}
}
response = requests.post('http://localhost:8000/api/rag/chat', json=payload)
print(response.json()['response'])| Shockwave Detection Accuracy | Detection Latency | Prediction Confidence |
@article{zou2024mtstnet,
title={MT-STNet: A Novel Multi Task Spatiotemporal Network for Highway Traffic Flow Prediction},
author={Zou, Guojian and others},
journal={IEEE Transactions on Intelligent Transportation Systems},
year={2024},
doi={10.1109/TITS.2024.3411638}
}
@software{highway_shockwave_system,
title={Highway Intelligent Traffic Shockwave Warning System},
author={Wei, Tim},
year={2024},
url={https://github.com/timwei0801/Highway_trafficwave}
}Note: MT-SWNet is our team's enhanced version based on the original MT-STNet architecture.
This project is licensed under the MIT License - see LICENSE for details.
- MT-STNet Research Team - Original deep learning model architecture
- Taiwan Ministry of Transportation - TDX Open Data Platform
- TensorFlow, FastAPI, Next.js - Open source frameworks
AI-Powered Traffic Safety Based on Cutting-Edge Scientific Research













