Changelog
All notable changes to the AI-Driven Predictive Traffic Flow Optimisation System will be documented in this file.
[2.2.0] - 2026-04-10
Added
GET /api/traffic/model_info(Java Gateway): New endpoint proxying to Python/model_info. Returns MAPPO model architecture, junction configuration, and agent indices.POST /api/traffic/resetandGET /api/traffic/model_infonow require JWT authentication.
Changed
- RL Inference
main.py: Replaced old PPO/Stable-Baselines3 implementation with MAPPORNNAgent(GRU). Service now usestorchdirectly — no SB3 dependency. - RL Inference
requirements.txt: Removedstable-baselines3andgymnasium;torch==2.2.1used directly for MAPPO inference. - RL Inference
Dockerfile: Multi-stage build to reduce image size. CPU-only PyTorch via--extra-index-url https://download.pytorch.org/whl/cpu. Final image ~500 MB (down from 1.35 GB). - Java Gateway
RlInferenceClient: AddedgetModelInfo()method proxying to Python/model_info. - Config reference: Updated from
mappo_sumo_v4.yamltomappo_sumo_v5.yamlin README and service documentation. index.html: Updated inference engine description fromPPO RL Agent (SB3)toMAPPO RL Agent (EPyMARL).
Documentation
- Java Gateway
README.md: Updated protected endpoints list — removed incorrectGET /api/traffic/action, addedPOST /api/traffic/resetandGET /api/traffic/model_info. - Java Gateway
README.md: Fixed curl and PowerShell examples forPOST /api/traffic/action— added requiredjunctionIdfield and corrected observation vector to 19 floats. - RL Inference
README.md: Updated config reference frommappo_sumo_v4.yamltomappo_sumo_v5.yaml.
[2.1.0] - 2026-04-09
Added
- JWT Authentication: Implemented stateless token-based security in Java API Gateway
- HS256 HMAC signing for bearer tokens
- Configurable token expiration (default 60 minutes)
- Protected endpoints:
/api/traffic/action(GET/POST),/api/traffic/reset - Public endpoints:
/api/auth/login,/api/traffic/health, Swagger UI -
New DTOs:
LoginRequest,LoginResponse,ErrorResponse -
LSTM Traffic Predictor Framework: Foundation for time-series forecasting service
- Architecture defined with FastAPI endpoints (
/health,/forecast,/model_info) - Data pipeline ready (loader, preprocessor modules)
- Configured for SUMO integration (edgeData.xml input)
- Target: 15-minute ahead forecasting with MAE < 10%
-
Supports all 5 major junctions
-
SUMO Documentation: Comprehensive service documentation added
docs/sumo/architecture.md— Network structure, file organization, data flow-
docs/sumo/key-features.md— Traffic flows, route configuration, output formats -
Enhanced Test Suite:
test_api.pyupdated with improved usability - Color-coded output (green/red/blue) for better readability
- Test result tracking (e.g., "4/4 tests passed")
- Boolean status returns for each test function
-
Requires:
coloramapackage -
Documentation Updates:
docs/index.md— Added service documentation section, LSTM quick link, security sectiondocs/features.md— Updated feature matrix with JWT checkmarks and LSTM/SUMO statusdocs/api-gateway/index.md— Added JWT authentication section with config tabledocs/api-gateway/endpoints.md— Added/api/auth/loginendpoint documentationdocs/lstm/architecture.md— Complete LSTM service architecture documentationdocs/lstm/endpoints.md— LSTM API endpoints (health, model_info, forecast)docs/lstm/key-features.md— LSTM service features and capabilities- README.md files updated to reflect JWT integration in main branch
Changed
- System Architecture Description: Updated to emphasize JWT authentication and LSTM forecasting
- Feature Matrix: Reorganized to reflect current implementation status
- JWT moved from "optional" to "implemented"
- LSTM endpoints marked as framework-ready (awaiting model training)
-
SUMO status clarified: "fully operational as standalone, not yet live-integrated with RL"
-
Java API Gateway README: Enhanced testing section with colorama dependency and color output documentation
Security
- JWT authentication now production-ready on main branch (previously in A00163691-JWTAuth branch)
- Stateless token management with configurable expiration
- Bearer token validation on all protected endpoints
[2.0.0] - 2026-03-31
Changed
- RL Model: Replaced single-agent PPO (Stable-Baselines3,
model.zip) with MAPPO v4 (EPyMARL,agent.th) — shared GRU RNNAgent controlling 5 junctions simultaneously. - Python inference service:
main.pyrewritten to load EPyMARLRNNAgent(PyTorch) instead of SB3 PPO. Architecture:fc1(24→128) → GRUCell(128→128) → fc2(128→4). - POST
/predict_actionpayload: Now requiresjunction_id(string) andobs_data(float[]). Previously onlyobs_datawas needed. - POST
/api/traffic/actionpayload (Java): Now requiresjunctionId(string) andobservations(float[], max 19). Previously onlyobservationswas needed. - Response payload: Both services now include
junctionId/junction_idin the prediction response. - Environment variable:
MODEL_PATH,OBSERVATION_SHAPE_DIM,NUM_AGENTSreplaced byMAPPO_AGENT_PATH. - Observation dimension: 9 → up to 19 (padded to max junction obs size internally).
- Agent count: 1 → 5 (one per controlled junction).
- Docker images: Versioned as
rl-inference-service:2.0.0andtraffic-api-gateway:2.0.0.
Added
- POST
/reset_hidden(Python) and POST/api/traffic/reset(Java): Reset MAPPO GRU hidden states between simulation runs. - GET
/model_info: Now returns full junction map with agent indices and action masks. - GRU hidden state management: Per-junction recurrent state maintained between
/predict_actioncalls within a simulation run.
Removed
stable-baselines3andshimmydependencies fromrequirements.txt.MODEL_PATH,OBSERVATION_SHAPE_DIM,NUM_AGENTSenvironment variables.
Performance
- Mean waiting time reduced 69.8% vs fixed-time baseline (28.8 s → 8.7 s) with MAPPO v4 model.
- 100% episode completion rate (vs 13.3% for previous IPPO model).
[1.0.0] - 2026-03-21
Added
- Microservices Architecture: Integrated Java Spring Boot API Gateway and Python RL-Inference service.
- ML Pipeline: Support for PPO (Proximal Policy Optimization) model inference.
- Simulation Environment: Integrated SUMO (Simulation of Urban MObility) configurations for the Athlone "Orange Loop".
Changed
- Monorepo Consolidation: Merged standalone API branch into the main branch to establish a cohesive pipeline.
- Dependency Management: Updated Python requirements to include FastAPI, Pydantic v2, and Stable-Baselines3.
Security
- Data Integrity: Initial implementation of TLS 1.3 for telemetry ingestion.
- Authentication: Added digital signature placeholders in
OpenApiConfig.javato prevent data injection attacks.