Commit Graph

1424 Commits

Author SHA1 Message Date
Dustin Carlino
8722c102b9 Fix bug moving lanes left/right where the width of different lanes
wasn't getting updated, due to the code-path handling the old case...
2021-04-22 10:22:06 -07:00
Dustin Carlino
2112736a1f Polish UI of new road editor 2021-04-22 07:57:23 -07:00
Dustin Carlino
4b5bea1f10 Fix dumb bug from 18589cb083 2021-04-22 07:57:23 -07:00
Dustin Carlino
acfe095a3f Handle editing just the width of one lane 2021-04-22 07:57:23 -07:00
Dustin Carlino
c73ceebd35 MVP of Yuwen's new road editor! 2021-04-22 07:57:23 -07:00
Dustin Carlino
bc2a21ca89 Refactor some methods in Traversable 2021-04-19 14:50:51 -07:00
Dustin Carlino
c62cf1c90c Refine the detection for when a car wants to over-take a bike, and expose it in the UI as a problem. #81, #600 2021-04-19 14:44:42 -07:00
Dustin Carlino
96d2f35779 Refactor handling of the fast_paths unused-last-node problem.
Now regenerating everything...
2021-04-16 20:14:16 -07:00
Dustin Carlino
c1d95a2cf4 Handle adding/deleting sidewalks. This needs more caution at the pathfinding layer. #597
Tested by adding a sidewalk to 28th and Madison in the Arboretum map.
Not regenerating maps yet.
2021-04-16 17:00:50 -07:00
Dustin Carlino
72c48cb1f9 Address misc PR feedback for #604 2021-04-13 15:13:36 -07:00
Dustin Carlino
9923c1270a Repair parking lot connections after road widening. #597 2021-04-13 15:13:36 -07:00
Dustin Carlino
b9a9e8e5c5 Redraw building paths when needed 2021-04-13 15:13:36 -07:00
Dustin Carlino
a649e0be77 Repair building connections after road widening. #597
Don't redraw the paths yet, or try to deal with failures to snap.
2021-04-13 15:13:36 -07:00
Dustin Carlino
c16f185019 The new intersection polygon usually changes the trimming of all connected road center lines. #597 2021-04-10 11:56:05 -07:00
Dustin Carlino
10255c2835 Recalculate intersection geometry when road width changes. #579
No effect on the road geometry yet, though...
2021-04-10 11:56:05 -07:00
Dustin Carlino
e8b7019ef7 Use LaneSpec in map edits, letting width of each lane be modified too. #597 2021-04-09 14:35:49 -07:00
Dustin Carlino
68661f0efd Actually, to keep all of the existing editing UIs from breaking, preserve LaneIDs when just editing lane types. #597 2021-04-09 14:35:49 -07:00
Dustin Carlino
3beb153bbf Support adding lanes. #597
And in fact, unify the cases of deleting lanes, adding lanes, or just
modifying them in place.
2021-04-09 14:35:49 -07:00
Dustin Carlino
14609ab157 Fix lane geometry after changing the number of lanes. #597 2021-04-09 14:35:49 -07:00
Dustin Carlino
584c1be9e0 A humble start to deleting lanes. #597 2021-04-09 14:35:49 -07:00
Dustin Carlino
c6906f6153 Change Vec<Lane> to BTreeMap<LaneID, Lane> to prepare for
adding/deleting lanes. #597

Not regenerating all maps yet. Haven't evaluated performance impact yet.
2021-04-09 14:35:49 -07:00
Dustin Carlino
b367fdcb27 Fix Road::get_half_polygon for left-hand driving. 2021-04-09 09:01:05 -07:00
Dustin Carlino
204d13177d Make the 15m tool respect access-restricted zones. 2021-04-08 10:28:52 -07:00
Dustin Carlino
3060f94989
Start a pathfinding v2 API. #555 (#596)
The v1 path that all callers need is available by transforming PathV2 to
v1. The plan is to now gradually change callers to natively use PathV2
instead.
2021-04-08 08:57:59 -07:00
Dustin Carlino
618fcdad62 Collapse some methods for creating walking paths. This is leftover from
before the zone pathfinding simplification. #555
2021-04-07 15:52:03 -07:00
Dustin Carlino
1b5d9d7108 Remove _broken_path_v2_to_v1 for now. #555 2021-04-07 15:06:47 -07:00
Dustin Carlino
defcbf1bb9 Just splitting the v1 PathStep, Path, PathRequest into a separate module, so the transition to pathfinding v2 is easier to understand. #555 2021-04-07 12:05:39 -07:00
Dustin Carlino
23132a16f8 Now that the old code to build and cost graphs for pathfindng v1 is deleted, rename the v2 methods. #555 2021-04-07 11:06:57 -07:00
Dustin Carlino
e471000395 Remove the old zone_cost method. #555 2021-04-07 11:04:42 -07:00
Dustin Carlino
da3272e2ee Convert the alternative path debugger to use directed roads, not lanes. #555
This lets us clean up some of the old pathfinding v1 code, removing some
duplicate code!

Also improve that debugger to show a different cost for each side of the
road. The cost to turn around and reach a building on the other side of
the road may be high, so this really makes the debugger more
understandable.
2021-04-07 10:58:48 -07:00
Dustin Carlino
b381856bd5 Convert the 15m biking isochrone to internally use directed roads, not lanes. #555 2021-04-07 10:18:26 -07:00
Dustin Carlino
ad5c573a27 Change congestion capping to pathfind avoiding roads, not lanes. #555
Capping only happens when you edit a road and introduce a per-hour
vehicle cap.
2021-04-07 10:04:00 -07:00
Dustin Carlino
918e74ceba Change the Dijkstra's and CH walking pathfinders to use roads, not lanes. #555
No behavioral change here; this is a trivial transformation. If a
directed road has any walkable lane, then there's exactly 1 of them.  I
verified by manually checking paths and also seeing prebaked results
having zero diff.
2021-04-06 20:16:45 -07:00
Dustin Carlino
196af2a1f4 Refactor: store Direction for a Lane, simplifying Lane->DirectedRoadID. #555 2021-04-06 17:03:24 -07:00
Dustin Carlino
d0c82392e3 Restore the lane-changing penalties for the pathfinding v2->v1 transition. #555 2021-04-06 17:03:24 -07:00
Dustin Carlino
b9b5f63eb0 Convert the contraction hierarchy vehicle pathfinding to use roads, not lanes. #555
Not regenerating yet.
2021-04-06 17:03:24 -07:00
Dustin Carlino
680fd07a83 Restore huge_seattle map, which was deleted without me noticing in da60de0a09, likely due to the elevation bug fixed in de20a74f3a28b3370319436d5655b5be6f13367d... 2021-04-06 10:32:07 -07:00
Dustin Carlino
3badd7dd09 Fix typo 2021-04-06 10:04:16 -07:00
Dustin Carlino
281aabc63a
Convert the Dijkstra's vehicle pathfinding implementation to use road… (#594) 2021-04-06 10:02:07 -07:00
Dustin Carlino
b6d46db2ea Create map_model abstractions for representing uber-turns at the granularity of roads, not lanes, in preparation for pathfinding v2. #555
I was about to recreate a higher-level turn abstraction, but realized we
previously made Movements for traffic signal editing.
2021-04-05 10:29:59 -07:00
Dustin Carlino
1e3708f9b4 Remove UberTurnGroup and the prototype of editing a cluster of traffic
signals using uber turn groups. #555

This was an old half-baked experiment for handling a cluster of traffic
signals.  Since then, merging intersections (by manually tagging them in
OSM for now, maybe automatically in the future) has proven better.

Removing this old code in preparation for pathfinding v2.
2021-04-05 10:05:27 -07:00
Dustin Carlino
da60de0a09 Adjust walking speed for inclines, using Tobler's hiking function. #82
Now regenerating everything...
2021-04-02 19:54:33 -07:00
Dustin Carlino
acdbe0e753 Start adjusting cyclist speed for inclines, both in simulation and pathfinding, using calcultions from Valhalla. #82
Not regenerating data yet.
2021-04-02 19:54:33 -07:00
Dustin Carlino
20de91bae7 Also refactor walking speeds. #82 2021-04-01 15:03:20 -07:00
Dustin Carlino
892afddcd5 Refactor uses of biking speed between the sim and pathfinding, in preparation for incorporating incline. #82
(This was a bigger mess than I expected, so worth doing separately.)
2021-04-01 11:52:25 -07:00
Dustin Carlino
05c9134e92 Stop using contraction hierarchies for trains / light rail. The graph is
always tiny; Dijkstra's is fine. It costs a bit of file size to store
it. The huge leeds map goes from 160MB to 157MB -- not crazy savings,
but something.

Also fix a slight bug with 92d3a890ea that
caused some pedestrians to uselessly visit a bus stop node while
routing. (southbank crashes a few hours in otherwise)
2021-03-25 20:45:57 -07:00
Dustin Carlino
92d3a890ea
Express all pathfinding costs in units of seconds. #82, #494 (#587)
This is simpler to reason about, allows the penalty for entering a zone
or taking an unprotected turn to be expressed in terms of a time
penalty, and is a step towards adjusting bike/foot routing for elevation
data.

When we later add things like "safety/quietness" for cycling, maybe we
can switch to using a (time, quietness) tuple, and transform into a
single number with a linear combination parameterized by that agent's
preference for time/safety. This change is compatible with that future
idea.

There are behavior changes here, particularly for zones and unprotected
turns. No new maps start gridlocking, and in fact, Rainier starts
working again.
2021-03-25 12:59:36 -07:00
Dustin Carlino
4ef04f5bd1 Change road incline calculations to be stored in RawMap. Previously, the
"rise / run" calculation used the trimmed road center-lines, which don't
match up with the elevation at each original intersection point.

Also handle infinity in the output and reduce the resolution of the
query from every 1m to every 5m.

Regenerate all maps due to the map format change. Try bringing in
elevation data for all of Seattle using the LIDAR source, since
the data quality assessed in eldang/elevation_lookups#12 seems to be
similar, and LIDAR is way faster than contours.
2021-03-23 22:47:52 -07:00
Dustin Carlino
162f09a887 Import Tripoli for WeCode Libya, also adding an Arabic font 2021-03-23 06:51:47 -07:00
Dustin Carlino
4a704e3172 Filter out highway=pedestrian, bicycle=dismount unless separate footpaths are enabled. Removes Portugal Place from Cambridge. cyipt/actdev#151
Now regenerate everything
2021-03-22 21:30:10 -07:00