How S9 is built

Author

Mohamed Gharbia

Published

October 17, 2026

Blueprint

flowchart TB
  S7[/"S7 commuters<br/>homes, modes, hour bands, stops"/]:::data --> W["WHO WALKS<br/>residents and workers,<br/>6 to 10 h"]:::step
  S4[/"S4 buildings<br/>business premises"/]:::data --> W
  LG["LEDGER<br/>every rule, with its source<br/>or marked as an assumption"]:::rule --> W
  W --> R1["shortest"]:::step
  W --> R2["open"]:::step
  W --> R3["straight"]:::step
  S1[/"S1 streets"/]:::data --> R1
  S8[/"S8 views"/]:::data --> R2
  S1 --> R3
  R1 --> F[/"flows on streets<br/>and junctions"/]:::out
  R2 --> F
  R3 --> F
  F --> C{"COMPARE<br/>only after"}:::test
  S5[/"S5 counts"/]:::data --> C
  S2[/"S2 space syntax"/]:::data --> C
  classDef data fill:none,stroke:#8a8a8a,color:#e6e6e6
  classDef rule fill:none,stroke:#8a8a8a,stroke-dasharray:4 3,color:#a6a6a6
  classDef step fill:none,stroke:#e6e6e6,color:#e6e6e6
  classDef out fill:none,stroke:#e6e6e6,stroke-width:2px,color:#ffffff
  classDef test fill:none,stroke:#fe83cc,color:#fe83cc

The ledger

Kind Rule Source or reason
E01 evidence How many residents of each building commute, and by which mode S7: census 2021 by tract, corrected once for working from home
E02 evidence When residents leave for work and when workers arrive, by mode S7: census 2021 hour bands by tract
E03 evidence The streets a person may walk, and the doors out of the area S1
E04 evidence Which buildings hold business premises, and how many S4: tax roll
E05 evidence How much can be seen from each walkable street S8
A01 assumption Residents who walk to work outside the area head for Place Ville Marie, through the door that makes the whole walk shortest downtown holds most of the jobs within walking distance; no open table says where Griffintown’s walkers work
A02 assumption The share of resident walkers who work inside the area is the people who walk to work here divided by the residents who walk to work (0.19) assumes everyone who walks to a job here lives here, so it is an upper bound
A03 assumption Inside the area, workers go to the buildings with business premises, in proportion to their number jobs per premises are not open
A04 assumption Riders walk to the metro entrance or bus stop nearest their home along S1 S7 measures it; nothing says which stop people choose
A05 assumption Workers who arrive by metro or bus come from the entrance or stop nearest their workplace as A04
A06 assumption Departures and arrivals spread evenly inside each census band; a walk falls in the hour it starts or ends the census gives bands only; most walks here last under 20 minutes
A07 assumption A walker who passes through a junction is counted there once the city counts crossings per crosswalk
A08 assumption Only these walks happen: no errands, school runs, dog walks, visitors or walks from parking this slice holds commuters only
A09 assumption Stops and doors are chosen by the shortest walk in every reading so that the readings differ in the route alone
A10 assumption Reading “open”: cost = length × (1 + 0.5 × (1 − rank of area seen)); a street S8 did not measure counts as middling a hypothesis drawn from isovist studies; the weight is a choice, tried from 0.25 to 2
A11 assumption Reading “straight”: the fewest degrees of turning, length breaking ties Hillier and Iida (2005)
A12 assumption Train, bicycle, car and other commuters do not walk in this slice their walks to a station or a car are short or unknown

The readings

All three readings walk on the same S1 streets, from the same starts to the same ends. A route is a chain of streets joined at junctions, and a walker may not turn back along the street just walked. The reading “shortest” adds up metres. The reading “open” adds up metres weighted by how enclosed each street is: the street with the smallest area seen in S8 counts 1.5 times its length, the most open one its length. The reading “straight” adds up the degrees turned at each junction, from the direction a walker arrives in to the direction of the next street; length only breaks ties.

The comparison

Only after the flows are made does S9 read the counts and space syntax. At each counted junction, it sets the commuters of each reading against the mean number of pedestrians the city counted there at 7 and 8 h. For every walkable street inside the area, it ranks the morning’s flow against walking choice and integration, and gives a rank correlation. The comparison describes; it chooses no reading.

Tests

Nine checks

Each check asks one plain question of what S9 wrote. Eight must pass, and all eight do; the ninth only reports.

Question Answer
T1 Do the walkers add up to what S7 says, kind by kind, worked out again from the S7 tables? yes, all six kinds
T2 Does every trip have a route in every reading, joined end to end, from where it starts to where it ends? yes, 16,958 trips × 3 readings
T3 Is the “shortest” route the shortest walk? yes, against S7’s own code, every 20th trip
T4 Does each reading win by its own rule? yes: “straight” never turns more than another reading, “open” never walks more than 1.5 times the shortest
T5 Are the flows on streets and junctions the sum of the routes that use them? yes
T6 Were the flows made without the counts and space syntax? yes: run again with both scrambled, no route moves
T7 Does the comparison with the counts follow from the flows and the S5 table? yes, 7 junctions × 2 hours
T8 Is every rule the code names in the ledger, once? yes, 12 assumptions and 5 pieces of evidence
T9 What does this slice give? report
TipTesting the tests

I added half a person to one street’s flow at 8 h, and T5 caught it. T6 first failed because it found the words “counts” and “space syntax” in the description at the top of the code; it now reads the code alone.

Stress tests

Change What moves
X1 the same input twice nothing: identical
X2 reading “open” with weights 0.25, 0.5, 1 and 2 12 to 18 % of walkers change route; the share of the count explained stays at 21 to 27 %
X3 walkers to work outside sent to Place Ville Marie, Square-Victoria or Peel the doors change; Robert-Bourassa at Saint-Jacques still gets no one
X4 share of resident walkers who work inside: 0, 0.19, 0.5, 1 share of the count explained 21 to 32 %; agreement with walking choice 0.16 to 0.31
X5 reading “straight” with each metre worth 0, 0.02 and 0.1 degrees walkers going over a quarter further fall from 15 % to 7 %

No setting tried brings the commuters above a third of the pedestrians counted, so the gap is in who walks, and the next slices of S9 have to add people (likely).