Atomox / mta-delays

API to provide smarter MTA Service Messages.
http://nyc.bhelmer.com
0 stars 0 forks source link

MTAD-001 -- Line Changes -- Detect A Subway Rerouting Over Another Line #1

Closed Atomox closed 6 years ago

Atomox commented 6 years ago

When a subway is traveling over another line, detect which line it reroutes over, include starting and ending station.

This ticket is only for LINE CHANGES, not local vs Express.

E.X.

Patterns:

A-overC

[E] trains are rerouted in both directions via the [F] between Jackson Hts-Roosevelt Av and West 4 St
Some northbound [E] trains are stopping long the [C] line from [Mn162-A25] to [Mn605-A09].

A-overC-thenD

Southbound [D] trains are stopping along the [C] line from [Mn614-A24] to [Mn167-A32] then along the [F] line to [Bk58-D43].
Some northbound [R] trains are stopping on the [Q] line from [Mn9-R14] to [Mn223-B08], then over the [F] line from [Mn223-B08] to [Qs616-G14]
Northbound [F] trains are stopping along the [A] line from Jay St-MetroTech to 42 St-Port Authority, then stopping along the [E] line to Jackson Heights-Roosevelt Av.

AB-overC

Some northbound [A] and [C] trains are stopping along the [F] line from [Bk636-A41] to [Mn167-A32]

A-overC-D-overE

Southbound [R] trains are stopping along the [Q] line from [Mn623-R23] to [Bk26-R30]. Some southbound [R] trains are stopping along the [F] line from [Qs272-G20] to [Mn167-A32] then via the [D] line to [Bk26-R30]

AB-overC-D-overE

[A] and [C] trains are stopping along the [D] line between [Mn167-A32] and [Mn614-125] in both directions. [E] Trains are stopping along the [F] line between [Qs616-G14] and [Mn167-A32] in both directions.

Acceptance Criteria:

Atomox commented 6 years ago

Working for some messages. Need to handle multiple redirect messages in a single message, such as: A ov C. Also, R over F.

Atomox commented 6 years ago

Broke out archives and assembled an archive of just route changes.

Atomox commented 6 years ago

Test data updated with expected structure. Added new route diversions to archive route-change-only json data.

Atomox commented 6 years ago

E.G.

Atomox commented 6 years ago

Some wonky line change patterns:

Atomox commented 6 years ago

Standard patterns for two different lines now work in tandem.

E.G.:

Atomox commented 6 years ago

Some tests fail because of station alias issues. Shifting focus to address the 36 St / 36 St problem in MTAD-05 first.

Atomox commented 6 years ago

When parsing A(B) over C (then over D). After stations in C, group .* with manditory D, but make the entire capture group optional.

Atomox commented 6 years ago

Everything has test, and is working, except:

Atomox commented 6 years ago

Broke out 2 remaining patterns (trains end / trains operate between, then). So, everything passing for MTAD-001. Closing.