Commit Graph

1527 Commits

Author SHA1 Message Date
Dustin Carlino
a4906a2953 More flag-guarded color scheme progress towards #715:
- choosing some building colors
- proper unzoomed road/intersection outlines
- adjusting curb color based on road rank (for arterials, it was the
  same grey!)
2021-07-28 12:12:01 -07:00
Dustin Carlino
d6936c5535 Refine the trimming rules -- insist on short roads, and leave borders alone.
Not regenerating everything yet, but spot-checked downtown where some
things broke previously.
2021-07-28 10:55:47 -07:00
Dustin Carlino
ffcf0a8d66 Fix a bug in transit snapping introduced by 163244ace9. Regenerating all maps, also bringing in a Tempe OSM fix...
The deadend trimming is too enthusiastic, getting rid of some unsnapped
cycleways and things connecting to the map border. Will iterate on it
this week; net benefit for now.
2021-07-27 16:56:11 -07:00
Dustin Carlino
9e68c22d67 Try to collapse degenerate intersections that happen near snapped cyclepaths. #330
The udistrict is shaping up...!
2021-07-27 12:39:44 -07:00
Dustin Carlino
1bde8c5345 Start turning cycle separation OSM tags (https://wiki.openstreetmap.org/wiki/Proposed_features/cycleway:separation) into buffer lanes. Only attempting for cycleways tagged on the road right now, since we're going to be snapping separated ways anyway... #330
And start experimenting with this in the snapper. Quick tests with the
Roosevelt PBL in the udistrict.
2021-07-27 12:12:10 -07:00
Dustin Carlino
4547395067 Move the cycleway snapping step to happen just before RawMap->Map, so we can play with it in the map_editor. #330 2021-07-27 11:20:57 -07:00
Dustin Carlino
163244ace9 Trim dead-end cycleway and service road stubs. Not regenerating yet, but
spot checked in Tempe and the UDistrict.
2021-07-27 11:13:47 -07:00
Dustin Carlino
3e26c6489a Run merging in the map editor, to reproduce the order that'll happen when importing. #654 2021-07-27 09:53:51 -07:00
Dustin Carlino
c5e769d276 Start a very basic binary classifier for high-stress cycling road, with a layer to check it. Use this to filter the mode shift dashboard -- effectively revealing PCT-esque gaps in the infrastructure. #448, #494 2021-07-26 10:48:00 -07:00
Dustin Carlino
06429d0d5f In the mode shift dashboard, show roads that might be highly used by converted trips... but that're missing bike infrastructure. #448 2021-07-26 10:41:51 -07:00
Dustin Carlino
1a8eecb2ac Remove old color scheme experiments. They're no longer interesting and just clutter the codebase, making big changes like #715 harder to manage 2021-07-23 19:20:36 -07:00
Dustin Carlino
b45f9e0134
Create new lane types to express different types of buffers for prote… (#704)
* Create new lane types to express different types of buffers for protected bike lanes. They're only created manually right now, to explore rendering.

* Update planter rendering

* Update planter - simplify

* fmt after merge

* Fixing up existing rendering

* Add curb buffer

* Adjust stripes

Co-authored-by: Robin Lovelace <rob00x@gmail.com>
2021-07-23 11:31:36 -07:00
Dustin Carlino
2538309c76 Automatically look for short roads near traffic signals and opt them into merging! #654
Manually invoked heuristic for the moment, and has some issues, but a
start.
2021-07-21 11:34:04 -07:00
Dustin Carlino
1f4124ee64 Handle clusters of merging short roads in the "interior" of a complex
intersection. This often happens with a group of 4 intersections (two
divided highways), and there may be many small segments embedded in the
middle for street car tracks and such.

Also bring in fresh OSM for Tempe, with one such intersection now
consolidated! #654, #672
2021-07-20 14:22:00 -07:00
Dustin Carlino
c5210e9887 Actually, keep the broken list of ways, to manually run with backtraces 2021-07-20 11:36:53 -07:00
Dustin Carlino
6f549e5747 Debug how roads are being ordered around an intersection, and restore map_editor's ability to preview one intersection with the debugging geometry. #654 2021-07-20 10:08:02 -07:00
Dustin Carlino
d10d8ceb33 Clean up code and regenerate everything with new the consolidation algorithm... #654
Phinney gridlocks again; 68daa6884a was
too ambitious. Otherwise all fine!
2021-07-19 15:07:10 -07:00
Dustin Carlino
c7b6c11e37 Fix the wacky endpoint order for Montlake/520 with a more careful definition of center. 2021-07-19 15:07:10 -07:00
Dustin Carlino
c28fef1752 By the power of my Mammal Hands, I will figure this out. #654 2021-07-19 15:07:10 -07:00
Dustin Carlino
e6f72449f4 Some fixes to get the Arboretum trails connected.
- Grab fresh Seattle OSM, picking up https://www.openstreetmap.org/changeset/108071529
- Treat highway=footway, bicycle=dismount as a cyclepath, for now
- Treat service=driveway, bicycle=designated as a cyclepath

Since this requires regenerating all maps anyway, also include some
stuff to improve Aurora near Green Lake:

- stop making highway lanes super wide by default; they just make
  divided highways overlap themselves
- filter out service roads with access=customers

But note the bridge from the Arboretum to Lynn is still disconnected,
because of detailed footway mapping that isn't tagged as
bike-accessible.
2021-07-18 20:52:41 -07:00
Dustin Carlino
db435cd56d Use the quick fix to https://github.com/easbar/fast_paths/issues/34 to
dramatically improve time to import and edit maps.

The fix helps all maps that use extremely high edge weights to prevent
people from cutting through private roads. There may be a more robust
fast_paths fix later, but I want to reap the benefits for tomorrow's
release.

The dramatic numbers:

- importing huge_seattle: 893s down to 108s
- editing huge_seattle: 102s down to 19s

Query speeds didn't appear to substantially change.
2021-07-17 22:33:01 -07:00
Dustin Carlino
4cfb06da97 Make the Map cloneable, by being careful with the thread-local pathfinder state.
I think this will help simplify calculate_unedited_map. But even if not,
this is bound to come in handy.
2021-07-15 18:34:42 -07:00
Dustin Carlino
062f38aca3 Speed up the previous by caching road_to_buildings in Map. 2021-07-15 18:12:15 -07:00
Dustin Carlino
b3ce53aa5f Draw building driveways per zoomed-in road, rather than as one map-wide batch. Otherwise, every single edit to road width needs to redraw all driveways. This doesn't scale with larger maps!
When zoomed in on just a building but not its road, this means the driveway won't show up until the road is in view. Acceptable trade-off.
2021-07-15 18:05:04 -07:00
Dustin Carlino
10fdaa8e92 estimate_duration already knows the mode, from the PathRequest 2021-07-14 12:38:19 -07:00
Dustin Carlino
03d21c4fe9 A first mode-shift experiment: create a table of trips showing expected
time to drive/bike, the elevation profile, and the distance. #448
2021-07-14 12:17:03 -07:00
Dustin Carlino
9237afb439 Revive cyclepath snapping. #330
Several ways to output the results:

1) just write OSM tags to debug stuff, but keep the ways
2) write a KML file to visualize the perpendicular line checks
3) delete the cycleway and make it an attribute of roads instead

Many problems with the snapping heuristics, but enough progress to
commit disabled!
2021-07-13 15:33:07 -07:00
Dustin Carlino
2224dccda9 Add a tool in the main UI to try to merge junctions. #654
It maintains a JSON file of ways to merge that the importer also uses.
For maps fast to import, this is the nicest workflow. Unlike map_editor,
turns and trimmed roads can also be checked.
2021-07-11 13:19:00 -07:00
Dustin Carlino
843dd38f7e Support multi starts/ends in the Dijkstra pathfinding engine. [rebuild] [release] 2021-07-11 10:11:50 -07:00
Dustin Carlino
7b98dd72e2 Backfill the implementation of all_costs_from. 2021-07-10 17:32:06 -07:00
Dustin Carlino
8be065c1b8 Finally regenerate all data. Trip times got slower, because now pedestrians can't zoom up one side of a steep hill.
Temporarily leaving all_costs_from as the only thing broken by the
refactor. Will fix it before the release tomorrow.
2021-07-10 17:14:10 -07:00
Dustin Carlino
6128ab5ed5 Fix an issue with init order and transit::make_stops_and_routes 2021-07-10 17:14:10 -07:00
Dustin Carlino
0edc0cb279 Fix the Dijkstra pathfinding, by using DiGraph, which is serializable 2021-07-10 17:14:10 -07:00
Dustin Carlino
2d16f5d878 Get the crazy pathfinding revamp to work
- initialization order
- reusing node ordering and applying edits

Importing, editing the map, and the basic scenario seem OK! --skip_ch
breaks, because of the lack of serialization
2021-07-10 17:14:10 -07:00
Dustin Carlino
c5369a10f4 Invert the structure of CH-vs-dijkstra pathfinding. Use a generic
"engine" that just operates on raw usize IDs. Embed that enum in each of
the particular pathfinders. This way, we don't have to keep duplicating
logic to delegate requests, handle one-step edge cases, etc. And it also
sets us up to more easily try out other CH implementations like osm_ch,
without having to move around tons of code.

Still use fast_path's InputGraph as the "universal" format, for now.

This is a huge change... got map_model compiling at least. Some stubbed
out stuff.
2021-07-10 17:14:10 -07:00
Dustin Carlino
74500a24dd Refactor pedestrian pathfinding, sharing input graphs between CH/dijkstra 2021-07-10 17:14:10 -07:00
Dustin Carlino
830c683009 Refactor vehicle pathfinding. Share input graphs between CH/dijkstra
impl.
2021-07-10 17:14:10 -07:00
Dustin Carlino
fe64501e6d Fix pedestrian speeds on inclines. Those walking contraflow on a
sidewalk were using the wrong incline!

Not regenerating data yet (need to regenerate all maps)
2021-07-10 17:14:10 -07:00
Dustin Carlino
da704b4546 Extend the parking thought bubbles to handle people climbing steep hills.
(And some clippy fixes)
2021-07-10 17:14:10 -07:00
Dustin Carlino
4aa971e34e Add a new importer mode to do Raw->Map in parallel. Occasionally useful
now that my faster machine works again.

Running importer jobs in parallel is actually super hard, because
there's async stuff thrown in there now to download files.
2021-07-06 16:21:42 -07:00
Dustin Carlino
964cc23df8 Improve 3-way signal timing by explicitly specifying crosswalks. This
fixes a very dramatic problem in the Green Lake map.

Regenerating everything...

Also added total trip time to the prebaked summary, to get a quick sense
if a change net helps or hurts and have a record in version control.
2021-07-06 14:37:50 -07:00
Dustin Carlino
f37e71236f Some fixups to the regenerated data from the past two commits:
- handle when the equiv_pos of a driveway gets too close to the edge of
  another lane
- make the updater workflow handle files from S3 that're a bit older
- remove pathfinding_avoiding_roads
- strip out old vehicle capping from map edit JSON, then fix up
  proposals
- delete old capping API example
- temporarily give up on phinney; it starts gridlocking
- add broadmoor proposal link in-game
2021-07-05 17:51:40 -07:00
Dustin Carlino
a0dcc255c3 Rip out all congestion capping code. #325
This collaboration is abandoned, the code slows down refactoring, and
if we started this idea again today, it'd be better to do it from
scratch anyway.

Regenerating everything.
2021-07-05 11:15:31 -07:00
Dustin Carlino
4d4cbdf525 Fix equiv_pos. Tested visually on curvy roads and by watching cars slide
into/out of parallel parking.

Not regenerating anything yet...
2021-07-05 11:02:27 -07:00
Dustin Carlino
6039063d28 Add a debug tool to dump JSON for different objects and open up with an external viewer. [rebuild] [release]
And fix some clippy problems
2021-07-04 15:32:49 -07:00
Dustin Carlino
382d890ac6 Switch to updated fast_paths 2021-07-04 14:34:20 -07:00
Dustin Carlino
0211094689 Create static blockages for off-side driveway exits. Verified correct
for all combinations of on/off-side exits and cutting across lanes by
using the static blockage visualizer.
2021-07-04 14:34:20 -07:00
Dustin Carlino
95ffa62218 Fix the unparking position. When we exit a driveway in EITHER direction,
we need to adjust the start position to account for the vehicle's
length.

Also add a very convenient debug tool to understand positions along
lanes.

This probably breaks static blockages; I'll check into that next.
2021-07-04 14:34:20 -07:00
Dustin Carlino
57feeada59 Allow vehicles to exit driveways onto the opposite side of the road. #555
- Adding an internal alt_start to PathRequest
- Using it for contraction hierarchy queries only (the Dijkstra
  implementation now diverges!)
- Figuring out which start position was used

TODO:

- Fix the unparking position
- Make sure the simulation inserts static blockages
- Carefully check the same start/end road case
- Evaluate impact on gridlock / cancelled trips
2021-07-04 14:34:20 -07:00
Dustin Carlino
efaf6085e4 Prepare for exiting driveways on the off-side by switching to
specialized PathRequest constructors
2021-06-30 12:35:22 -07:00