Skip to content

v2.12: infill stations, one-seat links, SH-114 realigned, Rail/BRT/All diagrams - #12

Merged
dgoodenough merged 9 commits into
mainfrom
claude/vigilant-knuth-loxal2
Oct 21, 2026
Merged

dgoodenough merged 9 commits into
mainfrom
claude/vigilant-knuth-loxal2

Conversation

@dgoodenough

Copy link
Copy Markdown
Owner

Transfers analysis and infill stations

  • Followed every modelled trip through the network: where people change, which trips need two or more transfers, and 148 places where two lines cross or pass close with no station (reports/TRANSFERS.md).
  • Tested ~40 candidate infill stops, walk links and short extensions one at a time in the ridership model, then together with each one left out in turn. Kept the 13 that still added riders next to the others:
    • Infill stations (plan and 2M): Red/Orange at Main / Sherman Street (downtown Richardson) and NW Highway / Shady Brook; Red/Blue/Orange at Central / Hall; Blue at Shiloh / Forest; Orange at John W Carpenter / Freeport; TRE at Rock Island / Briery and Airport / Beach (with FW Green); TEXRail extension and FW Berry at Pennsylvania / Henderson; Silver Line at Marsh / Arapaho; Midlothian at I-20 / Oriole.
    • One-seat links (2M): SH-114 trains run on over the Green Line to Victory (new run_over edit); the Stemmons-Brookhollow BRT starts at Victory.
    • Walk link (2M): Commerce / Harwood – Marilla / Pearl.
  • Result: more riders, but not fewer transfers. Holding the commutes fixed, transfers per commute stay about level (plan 0.33 → 0.34, 2M 0.47). With the model's 3-minute transfer penalty, a new interchange often wins riders by making a trip faster with one change. A longer transfer penalty is noted for a later round.

SH-114 Line (owner's hand-drawn realignment)

  • Runs in the LBJ/SH-114 freeway corridor without the loops at Las Colinas, Freeport North and Southlake.
  • Runs beside TEXRail through Grapevine.
  • New Trophy Club and Westlake stations on SH-114, replacing the Kirkwood / Dove Road / Westlake Solana detour.
  • Belt Line / Royal moves onto the SH-114 crossing (renamed Belt Line / SH-114).
  • gen_expansion: new road_weights option, and per-leg "follow": "rail" and "follow": "straight".

Diagram

  • Rail / BRT / All versions, each laid out for its own lines; Rail is the default.
  • New straightness rules: long runs laid on their axis, a cost per bend and more for zig-zags, straight-through lines kept opposite at junctions, and no run laid across another line.
  • The Rail diagram has about half the bends of the old all-modes diagram, with crossings equal to real geography (79). The All version is still bendier on the new network (known limitation).

Results (full build)

Plan 2M
Daily trips 2050 388k (was 370k) 1.06M (was 1.03M)
Daily trips 2100 788k (was 771k) 2.25M (was 2.23M); 2M reached 2077
Capital through 2100 $103.2B $136.6B (rescheduled: DNT East and I-20 earlier, I-30 and Las Colinas–Mesquite later)

Both plans stay within budget and no stage opens after 2100.

Testing

  • 70 unit tests pass, including new tests for run_over and the diagram layout rules.
  • python -m dfwt validate: no errors. The two errors in the archived v1/v2 scenarios are unchanged from main.
  • Full build, then a quick build for the diagram. Headless Chromium check of all three diagram versions (no page errors) and of two-station trip clicks.

Generated by Claude Code

Base network: ten infill stops found by a transfer analysis and tested one by one in the
model (Red/Orange at Main / Sherman and Northwest Highway, Red/Blue/Orange at
Central / Hall, Blue at Shiloh, Orange at SH-114 / Freeport, TRE at Belt Line and at
Riverside with FW Green, TEXRail extension x FW Berry, Silver Line at Marsh, Midlothian
at I-20). Belt Line / Royal moves onto the SH-114 crossing (Belt Line / SH-114).

2M: SH-114 Line follows the owner's hand-drawn alignment (freeway, beside TEXRail through
Grapevine, Trophy Club and Westlake stations) and runs on over the Green Line to Victory
(new run_over edit); Stemmons-Brookhollow BRT starts at Victory; a Commerce / Harwood -
Marilla / Pearl walk link. gen_expansion: road_weights, legs that follow rail or run
straight.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GsUvo7SNZomvEVjWUMuYvF
…ns; reschedule

run_over dates borrowed track from the borrowing line's opening (the host still owns it).
The station-name test checks stations open today, not every stop on today's lines.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GsUvo7SNZomvEVjWUMuYvF
The diagram view gets a version toggle beside Map / Diagram: Rail (metro,
regional rail, streetcar; the default), BRT (every BRT line, the 2M arterial
grid included) and All (rail and the plan's BRT corridors, as before). Each
version is laid out on its own, so the bus grid no longer bends the rail lines.
The choice is remembered per viewer and kept in the URL (#diagram/rail); a trip
that rides a mode the version leaves out says so and offers the version that
shows it.

Straightness rules in dfwt/schematic.py, applied to every version:
- strokes: at each station the edge ends that most lines run straight through
  are joined (the default plan's routings first);
- stations are pulled into line along their strokes, and every stroke that
  runs along one of the four axes in the real geography is laid exactly on it,
  heaviest first, edge by edge while that agrees with those laid already
  (Sherman-Morrison updates), so the Fort Worth trunk is drawn north-south;
- junction ports keep through lines opposite and axis edges on their axis;
- the chain DP charges per turn and extra for a turn straight back (zig-zag);
- phase 3 also straightens jogs, and never lets two stations swap places;
- the chaotic placement runs for two deterministic variants and keeps the one
  with the best quality() (bends, zig-zags, sharp turns, crossings beyond the
  geography's, edges drawn backwards).

2M lines, before (one all-modes diagram) -> after: rail lines 242 bends /
71 zig-zags -> 123 / 39 in the Rail version; all lines 309 / 88 -> 196 / 47
in the All version. Layouts run on one BLAS thread and are cached in the temp
folder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GsUvo7SNZomvEVjWUMuYvF
On the merged network (infill stations, the SH-114 Line run over the Green
Line's track, T&P Station and Fort Worth T&P now separate nodes) laying strokes
on their axes dragged whole stretches across other lines: the Rail version drew
101 crossings against 79 in the real geography (test_lines_are_straight).

- _smooth: after laying a stroke on its axis, count the crossings of the
  station-to-station segments (_n_crossings, vectorized); if the stroke added
  any, lay it again edge by edge and leave out the edges that would.
- Phase 3: a round is undone for crowding only where stations got closer than
  before the round, so one squeezed spot elsewhere no longer undoes every round.

Rail version, quality on the merged network: crossings 101 -> 79 (geography 79),
bends 322 -> 297, zig-zags 111 -> 102, score 845 -> 672; 2M lines 171 -> 154 bends.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GsUvo7SNZomvEVjWUMuYvF
@dgoodenough
dgoodenough merged commit 92b01b2 into main Oct 21, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants