SCENARIOS / SC-002 / LONDON UNDERGROUND
SC-002 Transport Network

London Underground

A live tube graph — eleven lines, hundreds of trains, platforms held as a mutex.

Async Tick Spatial FSM
Service replay — a full tube day, line by line FULLSCREEN ⤢
Clock tick · 1 min/turn
Update Asynchronous
Lines 11
Topology Spatial graph
Coordination Platform mutex
OVERVIEW

The London Underground as a running simulation. Stations form a directed graph; trains move along it through a lifecycle of depot, dwelling, in-transit and terminus turnaround. Platform occupancy is enforced as a mutex — a departing train releases its current platform and claims the next one atomically, so trains can never overtake or double up. Each turn is one minute of wall-clock time, and passenger volumes shift with each station's demand level.

A large, spatial, asynchronous world that stresses routing, scheduling and contention reasoning. The platform mutex creates real knock-on delay: a held train backs up the ones behind it, exactly as signal congestion does on the real network. Every train and station resolves through foreign keys, so the whole timetable is queryable after the fact.

TRAITS
Async
Independent, event-driven timelines
Tick
Discrete fixed-step time
Spatial
Entities have position & topology
FSM
Entities are finite-state machines
SCHEMA

Linked tables with guaranteed referential integrity.

TABLECOLUMNSDESCRIPTION
station ID, station_name, line, demand_level, position, terminus_out, terminus_in, platform_out_occupied, platform_in_occupied, board_typical, board_rush, alight_typical, alight_rush, trains_served, next_out_id, next_in_id, current_state One row per station-platform: its line, position, demand band, the platform-occupancy locks and the next-station references in each direction.
train ID, line, direction, passengers, stops_made, boarded_total, alighted_total, trips_completed, held_at_signal, current_station_id, current_state One row per train: line, direction, occupancy, cumulative boardings/alightings, turns held at a signal and its current station.
LIVE API

Generated REST endpoints. Also exposed as MCP tools.

POST /scenarios/london-underground/experiments Seed a new world (an experiment)
POST /scenarios/london-underground/experiments/{eid}/run Advance N turns, or request an event
GET /scenarios/london-underground/experiments/{eid}/entities/train Query trains in service
GET /scenarios/london-underground/experiments/{eid}/events Append-only event log
GET /scenarios/london-underground/experiments/{eid}/dataset Download the exported dataset
SEMANTIC LAYER

OSI-compatible definition, emitted with the dataset.

# london-underground.osi.yaml — emitted automatically
semantic_model:
  name: "london-underground"
  source: "duckdb://london-underground.db"
  entities:
    - name: station
      primary_key: id
  dimensions:
    - name: state
      type: categorical
    - name: t
      type: time
  measures:
    - name: row_count
      agg: count
    - name: active
      agg: sum
      filter: "state = 'ACTIVE'"