RL Lab
Explore how the reinforcement learning policy balances demand, energy costs, and grid constraints. Compare pre-configured strategies, adjust policy weights with sliders, and watch the simulation respond in real time.
Ingest
Pull TomTom corridor delays, stop-level demand priors, and grid availability.
Simulate
Run 180 reinforcement-learning ticks across three policy variants and the baseline to compare reward and reliability.
Deploy
Write the updated hotspot plan, highlighting charging windows and spare capacity for the pitch deck.
What powers this reinforcement learner?
Gymnasium environment
A Python `IngolstadtEnv` recreates corridor demand, tariffs, and depot capacity. FastAPI exposes it to the Next.js frontend.
Stable Baselines3 PPO
A PPO agent trains on startup and fine-tunes whenever you request `retrain`, so weight tweaks come back with stronger reactions.
Instant feedback
The Next.js API proxies the Python service; if it is offline the TypeScript simulator kicks in as a fallback so the UI never stalls.
Policy profiles
Compare each reinforcement learning setting against the baseline blend. These averages come straight from the simulated 180-minute episodes.
Demand vs supply timeline
Scrub across the 24-hour loop to see how the chosen policy handles peaks. The vertical bar marks the currently selected scenario hour.
Tune the policy
Adjust individual levers to see how reward, reliability, and energy spend react. The chart re-simulates on every tweak.
Higher values chase hotspots faster but risk empty batteries elsewhere.
Penalise charging when tariffs peak to protect the grid.
Battery ratio that triggers a charging decision.
Probability of trying a different neighbour to learn new patterns.
Traffic callouts
Route taps highlight the map above.
Fleet deployment visualization
The map shows real Ingolstadt corridors with live traffic data. The grid below simulates vehicle movements: blue icons serve demand, green icons charge at depots. Hover priority zone cards to highlight coverage.
Grid simulation
Each cell represents a 500m zone. Vehicle icons show real-time policy decisions (blue = serving demand, green = charging at depot).
Simulation logic:
Vehicles serve high-demand zones (top 3 ranked cells). When battery drops, they route to the nearest depot (green background), charge, then return to their zone. This mirrors real fleet operations.
Priority zones
Top 3 demand hotspots. Hover to highlight vehicle allocation on the grid.
Quick guide
- → Brighter cells = higher demand
- → Blue vehicles = serving riders
- → Green vehicles = charging
- → Depots (green background) = fixed hubs