Calculate J¶
Calculate J answers one question: how much slower is the edited service plan than the fastest service the physical infrastructure could theoretically support?
flowchart LR
graph[Edited infrastructure] --> ideal[Ideal physical times T_G]
graph --> service[Edited directional routes and schedules]
service --> actual[Routed service times T_G,P]
demand[Station OD demand F] --> stretch[Demand-weighted stretch]
ideal --> stretch
actual --> stretch
stretch --> score[J]
The result is a dimensionless excess-travel score. Lower is better, and \(J=0\) would mean every rider travels at the physical ideal.
Notation¶
| Symbol | Meaning |
|---|---|
| \(t\) | One of the seven service periods |
| \(i,j\) | Ordered origin and destination station complexes |
| \(F_{tij}\) | Modeled subway trips from \(i\) to \(j\) in period \(t\) |
| \(T_{G,P,tij}\) | Routed time through service plan \(P\) on infrastructure graph \(G\) |
| \(T_{G,tij}\) | Fastest physical time through \(G\), without service waits or transfer penalties |
| \(w_t\) | Policy weight assigned to period \(t\) |
Same-complex journeys are excluded. The shipped baseline also excludes Staten Island Railway complexes because they have no rail connection to the subway network being edited.
1. Routed service time¶
The browser routes every explicitly authored directional route separately for each period. A line family may contain routes with different stops, tracks, and schedules; no reverse route is inferred. A route with frequency \(f_{rt}\) trains/hour has headway
The time reported as \(T_{G,P,tij}\) includes:
- segment running times;
- 30 seconds at every intermediate stop;
- walking transfers;
- an initial wait of \(h_{rt}/4=900/f_{rt}\); and
- a transfer wait of \(h_{rt}/2=1800/f_{rt}\).
The quarter-headway initial wait is the project's boarding convention. It is intentionally lower than the half-headway random-arrival wait used after a transfer. This is station-complex-to-station- complex time; neighborhood access and egress affect demand allocation, not \(T_{G,P,tij}\) itself.
Route choice versus reported time¶
The router chooses a path using generalized cost
with at most eight transfers. The 240-second transfer penalty affects which route wins, but is not included in the reported \(T_{G,P,tij}\). Thus the score measures the travel time of the route selected under transfer-averse behavior, not the mathematically shortest raw-time path.
2. Ideal physical time¶
\(T_{G,tij}\) is the all-pairs shortest path through the infrastructure available in period \(t\). It includes segment times, walking connections between platforms, and the same 30-second cost at each intermediate platform. It includes no line patterns, frequencies, waits, or 240-second transfer penalty.
Several platforms may belong to one station complex. The ideal keeps the fastest platform-to- platform route for each ordered complex pair.
Correcting the ideal after an edit¶
The exported ideal came from a richer pipeline graph than the browser displays. Replacing it with a fresh browser calculation would therefore move J even with no edit. For an existing station pair, the browser instead applies only the edit's delta:
This cancels the browser graph's fixed approximation error. A pair involving a new station uses the edited browser ideal directly. A pair disconnected by the edit is omitted from the scored support.
3. Period stretch¶
Let \(R_t\) be the pairs in period \(t\) with positive demand and finite routed and ideal times. The reachable demand total is
The period's demand-weighted stretch is
The ratio is 1 for an ideal trip and greater than 1 when service, waits, or transfers make the trip slower than the infrastructure ideal.
The toolbar tooltip separately reports demand coverage:
This matters because \(S_t\) renormalizes over reachable demand. Disconnecting trips does not give them an infinite stretch; it lowers coverage and removes them from the average. Coverage must therefore be read alongside J.
4. Combine periods into J¶
The raw period weights are \((3,2,3,2,1,2,2)\) for AM Peak, Midday, PM Peak, Evening, Overnight, Saturday, and Sunday. Dividing by 15 gives \(w_t\), so the weights sum to one.
Subtracting 1 turns ordinary stretch into excess stretch. For example, \(J=0.25\) means the demand-weighted service time is 25% above the physical ideal under these period weights. If a period has no finite stretch, the browser omits that period's term without renormalizing the other weights; normal published networks have finite stretch in every period.
5. The improvement percentage¶
The toolbar also scores the initially published graph and reports
A positive percentage is an improvement. This is a percentage reduction in excess stretch, not a percentage reduction in minutes.
Which demand does J use?¶
When the graph contains no served station absent from the exported artifact base, J holds the shipped station-to-station OD demand \(F_{tij}\) fixed. Line, frequency, and track edits then change routed and ideal times but not the trip matrix.
When a served station is added, the tract mode-choice and station-choice model recomputes station OD demand so the new station can receive trips. The resulting \(F_{tij}\), including redistributed and new subway trips, is then used in the same stretch equations. The Compare page derives that demand model and reports its changes separately.
What J does not include
J is not a construction-cost, operating-cost, capacity, or land-use score. Track capacity is an editor constraint, while infrastructure effort and graph-dependent ridership are separate outputs in Compare.