Skip to content

Commit

Permalink
fix: Try just hard-hard coding station ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
jfabi committed Sep 3, 2023
1 parent 51124d8 commit 9443000
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 18 deletions.
37 changes: 19 additions & 18 deletions apps/state/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -367,25 +367,26 @@ config :state, :stops_on_route,
"place-qnctr",
"place-jfk"
]
],
{"CR-Haverhill", 0} => [
[
"place-north",
"place-ogmnl",
"place-WR-0062",
"place-WR-0067",
"place-WR-0075",
"place-WR-0085",
"place-WR-0099",
"place-NHRML-0127",
"place-WR-0120",
"place-WR-0205",
"place-WR-0228",
"place-WR-0264",
"place-WR-0325",
"place-WR-0329"
]
]
# ,
# {"CR-Haverhill", 0} => [
# [
# "place-north",
# "place-ogmnl",
# "place-WR-0062",
# "place-WR-0067",
# "place-WR-0075",
# "place-WR-0085",
# "place-WR-0099",
# "place-NHRML-0127",
# "place-WR-0120",
# "place-WR-0205",
# "place-WR-0228",
# "place-WR-0264",
# "place-WR-0325",
# "place-WR-0329"
# ]
# ]
}

# Stops that should never be considered to be "on" a given route
Expand Down
21 changes: 21 additions & 0 deletions apps/state/lib/state/stops_on_route.ex
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,27 @@ defmodule State.StopsOnRoute do
["Boat-Aquarium", "Boat-Fan", "Boat-Logan", "Boat-Quincy", "Boat-Winthrop"]}
]

defp gather_explicit_overrides(%{id: "CR-Haverhill"}, 0),
do: [
{"CR-Haverhill", 0, :all, "SPR23-N-Wdy-37", true,
[
"place-north",
"place-ogmnl",
"place-WR-0062",
"place-WR-0067",
"place-WR-0075",
"place-WR-0085",
"place-WR-0099",
"place-NHRML-0127",
"place-WR-0120",
"place-WR-0205",
"place-WR-0228",
"place-WR-0264",
"place-WR-0325",
"place-WR-0329"
]}
]

defp gather_explicit_overrides(_, _), do: []

defp do_gather_direction_group(route, global_order, {group_key, trip_group}) do
Expand Down

0 comments on commit 9443000

Please sign in to comment.