Yuanhao Feng

Back

Lumen

Cooler, calmer walks and what-if shade planning for Melbourne's Cremorne precinct.

Opens the Console; the phone app is at /m

Why#

Cremorne is a small precinct next to Richmond in Melbourne, home to about 700 businesses. Many of the people who work there arrive by train or tram and walk the last stretch from the station. On a 35°C afternoon it makes a real difference whether that walk is in shade or full sun, and in the morning rush the footpaths on Swan Street fill up within minutes of a train arriving. Yet the precinct has almost no data: the City of Yarra has six smart poles there, and their data isn’t published.

Instead of relying on council infrastructure, Lumen gets its data from the precinct’s tenants: a counter in an office window that reports numbers only, combined with open data on buildings, street trees and footpaths, makes a digital twin of the precinct whose results go both to the people walking it and to the people planning it. The system has three layers, Sense → Understand → Act, and runs offline on a single machine with no cloud APIs.

1 · SENSE Window nodes Counters in tenants' office windows Webcam + YOLOv8n + ByteTrack Counts over HTTP / MQTT every 10 s Numbers only: a payload with an image → 422 Or ESP32-S3 + mmWave, no camera Open data OSM: 2,835 buildings, 153 km of footpaths Yarra street trees + OSM: 2,180 trees Train, tram and bus stops Kerb ramps, signalised crossings, steps Shops, gyms and other places 2 · UNDERSTAND Shade model Sun position from the NOAA algorithm Swept building and canopy shadows Crowd model Pulses of people after train arrivals Fruin level of service on every footpath Access and comfort Steps, raised kerbs and signalised crossings A 0–100 Comfort Score per segment 3 · ACT Shade Router Shortest / coolest / least crowded, step-free Console Precinct hub and council: what-if, reports Phone PWA Commuters, drivers (SMS), merchants Morning Brief and Ask Lumen A local LLM only polishes the wording FastAPI · Shapely · NetworkX · NumPy Runs offline on one machine, no cloud APIs Vite · React · MapLibre GL · Ollama

Shade that follows the sun#

The shade model computes the sun’s position at any moment with the NOAA algorithm and casts the shadows of 2,835 buildings and 2,180 trees onto 153 km of footpaths, taking the shadier side of each segment. Building heights come from OSM levels; canopy radii are estimated from trunk diameters in the City of Yarra street tree data.

On top of that, the router gives three routes for any start, destination and time: shortest, coolest and least crowded, each with a 0–100 Comfort Score. Turn-by-turn directions say which side of the street to keep to for shade.

A day from morning to evening: shadows sweep the precinct and the coolest route follows them.

The Comfort Score looks at two things only, sun and crowding. Full sun at 34°C or above costs 60 points; level of service E or worse costs 40:

Comfort = 100 − 60 × sun_fraction × min(H, 1) − 40 × min(LOS_penalty, 2) / 2
H       = max(0, (T − 24) / 10)
plaintext

Below 24°C sun costs nothing, so on a mild day the coolest route is the shortest one and nobody is sent on a pointless detour.

When the trains arrive#

The crowd model turns train arrivals into pulses of people, divides peak-minute flow by the footpath’s effective width, and grades every segment on Fruin’s level of service (LOS A–F). At 8:45, after trains reach Richmond, Swan Street and Cremorne Street hit LOS D.

The 8:45 rush: Swan Street turns LOS D and the least crowded route skirts it.

From Richmond Station to Dover House, the least crowded route adds 0.8 minutes and cuts time on crowded footpaths from 3.0 minutes to 0.2.

What-if scenarios#

The What-if panel is for the precinct manager and council, to compare where shade spending would help most. You can plant trees (small, medium or large), put up shade sails and awnings, remove a tree, or close a footpath for works on the map, and immediately see the before and after across all 304 station-to-office walks: minutes in the sun, routes that benefit, Comfort Score, detours, and an indicative cost.

Six large trees along Swan Street, with the maturity slider moved from year 1 to year 15.

Trees follow a growth curve: a new tree gives almost no shade in year 1 and takes about 15 years to reach full canopy, and the maturity slider compares the years. Sails and awnings shade from the day they go up, and the panel marks which measures can be delivered within 12 months.

Each change recomputes only what it touches. Lumen re-tests only the sample points inside added or removed shade, and re-routes only the origin–destination pairs whose best path crosses a changed segment, typically 20–60 of the 304. A recompute takes about 0.1–0.5 s. Scenarios can be named, saved, compared side by side and exported as CSV. Every result is labelled as a model estimate, and costs are planning ranges, not quotes.

Step-free routes#

Stations, tram and bus stops, kerb ramps, signalised crossings, steps, accessible parking and toilets all come from OpenStreetMap. With the Step-free switch on, every route avoids steps and raised kerbs and prefers signalised crossings, and Lumen warns when a tram stop has no level-access platform.

East Richmond Station to The Comfort Shop: Step-free avoids a flight of steps for 0.7 minutes more walking.

On the phone#

The Console is for the precinct hub and council. Everyone else gets a phone PWA whose home screen shows only the one or two things that matter to them today. There’s no login and no location access; settings stay on the phone and each request carries only place IDs.

From left: the Today card, Nearby and Ask Lumen.

  • Today card: when to leave the station and which way to walk, with how many minutes less sun and crowding and how many extra minutes of walking than the shortest route. Switch between Auto, Shortest, Shadiest and Quietest, then follow it step by step.
  • Nearby: pick what you need (coffee, a quick bite, a shady spot to sit, toilets, cash…) and how long you have, and Lumen lists only the places you can walk to, use and get back from in time. Rest spots are ranked by how much shade they get while you’re sitting there.
  • Lumen Local: Cremorne’s independent shops, gyms and classes, chains left out. The Today card points out one or two right beside your walk, such as “Abbotsford Cycles · 1.6 min off route”.
  • Other roles: delivery drivers see all-day crowding bands and the best unloading windows for their usual streets, also over SMS (a simulated conversation for now); merchants see hourly foot traffic outside their door against the same day last week.

Privacy and a local LLM#

Window nodes send counts, never images. The server rejects any payload with an image field with HTTP 422. The current counter uses a webcam with YOLOv8n + ByteTrack; the hardware could equally be an ESP32-S3 with a 24 GHz mmWave sensor and no camera at all.

The Morning Brief (styled as a workplace Slack message for tenant staff) and Ask Lumen can use a local Ollama model. The model only rewords text and calls tools; every number comes from the backend, and if the model changes any number, Lumen falls back to a deterministic template. Without Ollama the Brief uses the template and Ask Lumen uses rule-based routing, and every feature still works.

Results#

The offline evaluation covers 304 walks from 4 stations to 76 office buildings:

ScenarioSun exposure cut by coolest route (median)Median detourTrips improved
Hot day 35°C · 15:30−41% (1.8 min less sun)0.5 min80%
Hot day · 8:45 (26.9°C)−46% (2.1 min less sun)0.2 min87%
Mild control day 21°C · 15:300% (no detour, by design)00%

On crowding, 94 trips pass through LOS D or worse at 8:45 on the hot day. The least crowded route cuts median time on crowded footpaths for those trips by 93%, for a median detour of 0.8 minutes.

To be clear about the limits: no window node is actually deployed, so the readings for all 13 nodes on the map are simulated by the crowd model; missing building heights are estimated from levels or building type; and train headways are a static approximation. All of this is labelled in the UI.

Technical details#

The backend is Python and FastAPI, with Shapely for geometry, NetworkX for the path network and NumPy for the numbers; live readings stream over SSE, with optional MQTT. The frontend is Vite + React + TypeScript + MapLibre GL: / is the Console and /m is the phone PWA. A single FastAPI process serves the API, the frontend and the PWA, and runs offline.