Project Goal: Target 15-20% reduction in urban traffic congestion for the Athlone "Orange Loop" using Reinforcement Learning, measured by:
- Average Travel Time (ATT): -15%
- Mean Queue Length (MQL): -20%
- Data Integrity: TLS 1.3 secured telemetry pipeline
- API Gateway β REST API service on Render
- Inference Service β RL model inference on Render
- LSTM Predictor Service - LSTM Predictor Service on Render
- API Gateway Swagger UI β Interactive API docs
- Inference Service Swagger UI β Interactive API docs
- LSTM Predictor Service Swagger UI β Interactive API docs
- Mappo Simulation v2 - Mappo Traffic Flow Simulation v2 demo
- Detailed MkDocs Documentation - Complete mkdocs site
- System Architecture β Detailed system design
- API Endpoints β Quick reference and full API specifications
- API Gateway - Detailed Java API Gateway documentation
- RL Inference - Detailed RL Inference service documentation
- LSTM Predictor - Detailed LSTM Predictor service documentation
- Quick Start Guide β Get up and running quickly
- Gateway JWT Authentication Guide β JWT configuration and usage
πRunning the System
You can start all three microservices (API Gateway, RL Inference, and LSTM Predictor) using the provided startup scripts:
start.bat./start.shπ οΈ API Setup β Docker, Environment Variables, Components, Examples, Monitoring
π API Reference β Quick Reference & Detailed Specifications
π¬ Support β Contact, Contributing, Issues
βββββββββββββββββββββββββββββββββββ
β CLIENT LAYER β
β Web β’ Mobile β’ External API β
ββββββββββββββββββ¬βββββββββββββββββ
β
β HTTPS (TLS 1.3)
β
ββββββββββββββββββββΌβββββββββββββββββββ
β JAVA API GATEWAY (Port 8080) β
β Spring Boot 3.2.3 β
βββββββββββββββββββββββββββββββββββββββ€
β β’ JWT Authentication (HS256) β
β β’ Request Validation β
β β’ Fallback Logic (RED signal) β
β β’ Circuit Breaker Pattern β
ββββββββββββββββββββ¬βββββββββββββββββββ
β
βββββββββββββ΄ββββββββββββββ
β β
βββββββββββββΌβββββββββ ββββββββββββββΌβββββββββββ
β HEALTH CHECK β β PREDICTION REQUESTS β
β /health β β /traffic/action β
ββββββββββββββββββββββ ββ¬βββββββββββββββββββββββ
β
βββββββββββββΌββββββββββββ
β INFERENCE SERVICE β
β (Port 8000) β
β Python/FastAPI β
βββββββββββββββββββββββββ€
β β’ MAPPO RL Model β
β β’ 5-Junction Support β
β β’ GRU State Mgmt β
β β’ Action Masking β
βββββββββββββ¬ββββββββββββ
β
βββββββββββββββ΄ββββββββββββ
β β
βββββββββββββΌββββββββββ βββββββββββββΌββββββββββββ
β LSTM PREDICTOR β β ACTION SELECTION β
β (Port 8001) β β (MAPPO Output) β
β Python/FastAPI β β β
βββββββββββββββββββββββ€ β Actions: β
β β’ Time-series LSTM β β 0: RED β
β β’ 15-min Forecast β β 1: YELLOW β
β β’ MAE < 10% β β 2: GREEN β
β β’ Data Pipeline β β 3: GREEN_EXTENDED β
βββββββββββββββββββββββ βββββββββββββ¬ββββββββββββ
β
β Signal State
β
βββββββββββββΌββββββββββββ
β RESPONSE TO CLIENT β
β { β
β action: 0-3, β
β signalState: "RED", β
β confidence: 0.87 β
β } β
βββββββββββββββββββββββββ
This repository implements a Cloud-Native Microservices Pipeline designed for the Athlone "Orange Loop" case study.
-
Traffic Monitoring Gateway (Java/Spring Boot): Manages secure telemetry ingestion and orchestrates service communication.
- JWT authentication: Stateless token-based security with HS256 signing
- Exception handling: Dedicated exception package for RL service communication errors
- See Java API Gateway README for configuration and usage examples
-
RL Inference Service (Python/FastAPI): Hosts a trained MAPPO (Multi-Agent Proximal Policy Optimization) model to predict optimal signal timings based on real-time traffic observations from 5 junctions
-
LSTM Predictor Service (Python/FastAPI): Forecasts vehicle flow 15 minutes ahead using historical traffic patterns from SUMO simulations, targeting MAE < 10% accuracy
-
Simulation Layer (SUMO): Integrated high-fidelity traffic simulation environment for testing adaptive signal logic against baseline fixed-time controllers. YouTube Demo.
This system is specifically modeled to address the saturation flow rates and signal-timing patterns of the Athlone 'Orange Loop' corridor, providing a scalable template for Smart City traffic management in regional Irish hubs.
Two FastAPI microservices:
RL Inference Service (Port 8000)
- MAPPO agent for signal prediction
- Full docs
LSTM Predictor Service (Port 8001)
- LSTM for traffic density forecasting
- Full docs
Start both services in separate terminals:
cd rl-inference-service
python -m uvicorn app.main:app --host 0.0.0.0 --port 8000 --reloadcd lstm-predictor-service
python -m uvicorn app.main:app --host 0.0.0.0 --port 8001 --reloadTest integration:
python lstm-predictor-service/test_rl_integration.pyTUS-26-ETP-AI-Traffic-Optimisation/
βββ java-api-gateway/ # Spring Boot Edge Service (JWT Auth, LSTM/RL Orchestration)
βββ rl-inference-service/ # Python FastAPI (MAPPO Multi-Agent RL Inference)
βββ lstm-predictor-service/ # Python FastAPI (Time-Series Traffic Density Forecasting)
βββ SUMO/ # Traffic Simulation (Athlone 'Orange Loop' Network & Results)
βββ docs/ # Central Documentation (MkDocs source & guides)
βββ docker-compose.yml # Container orchestration for all services
βββ start.bat / start.sh # Multi-platform quickstart scripts
βββ README.md # This file
For a detailed breakdown of every file, please refer to our detailed Project Structure documentation.
2026 β’ Edgars Peskaitis β’ Joe O'Regan β’ David Claffey β’ Adam O Neill Mc Knight