-
-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Project: public transit #372
Comments
I'm confused. There are already buses aren't there? How are the current bus routes set up? |
A while ago, I started revamping how bus routes are interpreted, so that the vehicles don't make loops, but appear at the first stop ad vanish at the last: #190. I got distracted and dropped that effort, and in the current in-between state, most routes aren't imported properly. The importing is done mostly in https://github.com/dabreegster/abstreet/blob/master/convert_osm/src/transit.rs and https://github.com/dabreegster/abstreet/blob/master/map_model/src/make/transit.rs. I can go into more detail if anyone's interested in picking this up. Some of the work described in this issue is half-started, but none of it is to the point of being usable yet. |
What about: Step 1: implement support highway=footway highway=steps highway=path a-b-street/osm2streets#81 https://www.openstreetmap.org/query?lat=50.06501&lon=19.91663#map=18/50.08273/19.89345 https://www.openstreetmap.org/#map=19/50.08366/19.85961 https://www.openstreetmap.org/#map=19/50.08179/19.85769 look like a viable test cases |
Good point -- previously I was trying to associate the bus/train position and pedestrian platform position with the old sidewalk model, which ignores separate footpaths. This might be much easier to do after a-b-street/osm2streets#81 is solved and the test case areas have consistent footway tags. |
https://link.springer.com/chapter/10.1007/978-3-642-38527-8_6 could be nice for routing |
https://factorio.com/blog/post/fff-364 |
For when this work gets picked up, see some ideas/rationale in #500 |
https://osmus.slack.com/archives/C029HV951/p1619824463140400 |
https://epubs.siam.org/doi/pdf/10.1137/1.9781611975499.5 |
https://www.transit.land/routes/r-c23nb-48#export |
… grabs some schedule times from GTFS. #372 Not regenerating yet
Just found https://wiki.openstreetmap.org/wiki/Metro_Mapping by way of https://alexey-zakharenkov.github.io/subways/rapid/; great explanations of OSM's model there |
This code stopped working around July 2020 when I attempted to tackle #190. It's sat dormant since then, with most bus and light rail routes not imported correctly at all. I'm going to (eventually) start another attempt at public transit in A/B Street by treating GTFS as the main source of truth, not trying to understand route relations mapped in OSM. It's simplest to just rip out all this old code first. Some of it may be useful later, but version control preserves it. Regenerating everything; this is a binary format change.
This code stopped working around July 2020 when I attempted to tackle #190. It's sat dormant since then, with most bus and light rail routes not imported correctly at all. I'm going to (eventually) start another attempt at public transit in A/B Street by treating GTFS as the main source of truth, not trying to understand route relations mapped in OSM. It's simplest to just rip out all this old code first. Some of it may be useful later, but version control preserves it. Regenerating everything; this is a binary format change.
(#808) This code stopped working around July 2020 when I attempted to tackle #190. It's sat dormant since then, with most bus and light rail routes not imported correctly at all. I'm going to (eventually) start another attempt at public transit in A/B Street by treating GTFS as the main source of truth, not trying to understand route relations mapped in OSM. It's simplest to just rip out all this old code first. Some of it may be useful later, but version control preserves it. Regenerating everything; this is a binary format change.
Not uploading the downloaded files yet, on a weird connection.
I think this effort is slowly getting revived, so below is a bit of a project plan. My time is limited, but I'll aim to get the first part done myself in the next ~week, and then handover to a few people who've expressed interest in working on this. Current code statusCurrently:
Importing routesI'll try to crank this out in the next week to unblock the real work. The first attempt used OSM route relations, but there were lots of complications (described in other PRs and issues). I think just focusing on GTFS is a safer start. The final desired model for stops and routes:
Transit routes can get crazy: #190 (comment) So my plan to import from GTFS is this:
Actually maybe we don't need to hold onto the full polyline in RawMap. We could take that full shape and try to snap the entire path to roads. We'd have to check that it's a valid driveable path anyway. Should the map model store the exact path that a bus takes, or always just calculate it as needed? People will edit the map and possibly adjust roads to change the pathfinding costs and make a bus want to take a slightly different route between stops. If we want to give people the ability to force a bus to follow a route they specify that doesn't match what pathfinding says, then we should store the exact path in the model and initially snap using the full shape. But... I don't think that's the right thing to start with. Next steps coming... |
These're steps intended for other people to do (with my help of course!). No order / priority necessarily. SchedulesI'll just get the route shape and stops imported and ignore the schedule. Next step, somebody can figure out the right map model representation and import from GTFS. Pathfinding for transit usersabstreet/map_model/src/pathfind/walking.rs Line 137 in 258ed1c
Simulation layer transfersOnce pathfinding can tell us a route with transfers (maybe walking in between or maybe waiting at the same platform for a different bus), make the simulation layer use this. https://a-b-street.github.io/docs/tech/trafficsim/trips.html describes how stuff works now. Modeling transit stationsFor the importing work I'll do, I'm going to just snap vehicle and sidewalk positions to the map in the naive distance-based way. In reality, we often have train stations / platforms that're underground, spread over multiple connected buildings, have multiple entrances/exits, etc. OSM has lots of this stuff tagged. How should we represent this in A/B Street? How much detail do we want? At the very least, representing that it takes at least 3 minutes to go from the street entrance to the platform seems important. Do we want to try to render station interiors? Maybe just a simplified view that shows the progress each passenger is in the station between street entrance and platform? EditingThis is where it gets interesting! Once we can model public transit from real data reasonably, then we can let people change things. I'd think of this as a few stages:
MeasuringWhat metrics are interesting to study for how successful transit is? How can we make nice dataviz UIs? If we want to gamify some piece of the public transit work, how do we assign a score for improving a route? |
(Mostly renaming map_model code everywhere, not yet sim layer and above)
(Mostly renaming map_model code everywhere, not yet sim layer and above)
(Mostly renaming map_model code everywhere, not yet sim layer and above)
(Mostly renaming map_model code everywhere, not yet sim layer and above)
Back in #819, I broke things by creating the sidewalk+transit graph before transit routes had been set up. This causes immediate crashing when editing the 2 maps with transit (Arboretum and SF).
Transit stop IDs previously were tied to LaneIDs, but those can easily change with edits to the number of lanes on a road. We still may need to re-snap transit stops (if the driving position or sidewalk changes), but this prevents one more common type of problem. This requires regenerating everything, since it's a binary schema change...
For reference: @ThomasDagier has found https://bl.ocks.org/kaezarrex/7a100491d541031b6c24, a super useful tool to debug GTFS shapes.txt. Note it seems quite slow for large input, like San Francisco's shapes.txt |
https://www.youtube.com/watch?v=cKXoj6_LY2s a commercial tool in this space, UI examples |
On the hunt for tools to debug / create GTFS, link dump: |
to get this test to pass. #372 Now regenerate the maps with PT
…ease] The UX of bus info panels is terrible, but just unbreak this.
If anyone's interested, I've started walking + GTFS routing over in a-b-street/15m#4, an experimental rewrite of the 15-min neighbourhood tool. Plenty of project ideas, both frontend/design and backend. |
A/B Street has some modelling for public transit vehicles and riders, but it's quite incomplete. I'm not going to have any time to work on it soon, but I think it'd make a very fun project to jump in. I'm quite willing to mentor / help things along!
Some end goals could be:
Some of the tasks, in no particular order:
The text was updated successfully, but these errors were encountered: