Commit Graph

1354 Commits

Author SHA1 Message Date
Dustin Carlino
601d367c32 Import highway=track as a separate cycle+footway. We identified https://www.openstreetmap.org/way/842138587 that really affects the Poundbury site. 2021-02-25 12:59:48 -08:00
Dustin Carlino
5577021ee5 When merging intersections and preserving simple turn restrictions, pay
attention to which intersection is being destroyed. Fixes #527 --
montlake and phinney both look correct now.

Regenerating everything. Actually, Phinney now runs, so adding a 4th
prebaked map!!! But Rainier regressed -- there's an issue with the
signal heuristics that's now a problem; I'll fix later.
2021-02-24 15:16:12 -08:00
Dustin Carlino
b36ebec0b9 Penalize unprotected left turns at the routing layer. #494
I experimented on the Rainier Valley map, which recently started
gridlocking due to too many cars doing this, to tune the value. Got it
running again! The two other maps keep running, with some trips on
average getting a little slower.
2021-02-23 19:32:00 -08:00
Dustin Carlino
03989bf3a6 Don't allow u-turns on really short deadends. This problem started happening when more service roads were imported, and caused gridlock in lakeslice. This gets montlake and lakeslice running again, but rainier_valley remains gridlocked with service roads. 2021-02-22 14:48:49 -08:00
Dustin Carlino
6ceac88cbe Import most service roads, except driveways. #449
Added an extra step to classify service roads as running through a
parking lot, to prevent them from being treated as regular roads.

Had to fix up a few prebaked traffic signals. lakeslice falls back into
gridlock; will fix separately -- too much effort behind this change to
stop.
2021-02-21 18:27:34 -08:00
Dustin Carlino
5139a88a66 Also sort city districts by zorder when creating them from many maps. Noticed this issue in Leeds. 2021-02-19 10:26:51 -08:00
Dustin Carlino
64d150690a When building the contraction hierarchies for different vehicle types,
be more careful with nodes representing uber-turns. Even if that vehicle
type doesn't use an uber-turn, we still need to force the nodes to exist
and match up between input graphs.

Although this really only fixes gb/charleville_mezieres/secteur4, it
potentially affects all maps, because the node map changes. So
regenerate everything...
2021-02-17 14:17:27 -08:00
Dustin Carlino
1fa57a1e17 Import Charleville-Mézières. So many new places from Twitter!
Few workarounds based on importing crashes found.
2021-02-15 16:35:24 -08:00
Dustin Carlino
bc2767b89e Refactor lots of places that construct paths to the data/input dir, which is always organized by city. This would've made the previous change way easier. #326 2021-02-13 18:30:01 -08:00
Dustin Carlino
65b1f24d5d Automatically patch edits using the old MapName. And fix the 3
built-in proposals. #326
2021-02-13 17:01:24 -08:00
Dustin Carlino
39f5d50fcd The grand country split. #326
City names are now disambiguated by a two-letter country code. This
commit handles almost everything needed to make this transition. Main
next steps are fixing up map edits automatically and making the city
picker UI understand the extra level of hierarchy.

A little bit of fallout: lakeslice gridlocks again; this regression is
actually from the recent traffic signal changes, but I'm just now
regenerating everything. Will fix soon.
2021-02-13 15:45:59 -08:00
Dustin Carlino
03538faf3f
A few traffic signal cleanups: (#512)
- Stop alerting when slow pedestrians can't make it through the minimum
  crosswalk time
- Simpler iteration style in lagging_green.rs
- Totally delete the old brute force signal config code; it never worked
  well, and the improved heuristics eliminate the need for it anyway
- Make a Duration::max function and use it in one case
2021-02-12 15:10:32 -08:00
Dustin Carlino
aacc0fa4d5 Fix a crash that happens when you load edits that transformed a stop
sign into a traffic signal.

And fix a few cargo fmt issues
2021-02-12 13:47:10 -08:00
Bruce
6cb4cea624
Ts refactor (#511)
* Create module from make/traffic_signals.rs

Most things are in mod.rs, lagging_green and brute_force are moved into their own .rs files

* pull more into brute_force.rs
2021-02-11 18:24:17 -08:00
Bruce
121377467a
Lagging green (#510)
Add a template for lagging green

Lagging green is variable. Crosswalks are also variable.
convert_to_ped_scramble() is refactored to allow a call that doesn't promote yield to protected; as this could unintentionally extend a variable phase.
2021-02-11 13:21:26 -08:00
Dustin Carlino
68e406d26b Swap left/right turns when generating traffic signal policies in the UK.
Verified by trying the "four-stage" template at some intersections. Now
regenerating data.
2021-02-08 17:06:32 -08:00
Dustin Carlino
6f0751111e Derp, crosswalks on left-handed driving maps were always just outside the intersections. This made for some crazy traffic signals, since the crosswalk never conflicted with any turn.
Don't regenerate yet, because I have one more of these...
2021-02-08 16:50:17 -08:00
Dustin Carlino
73e405e382 Upgrade most dependencies 2021-02-03 18:13:06 -08:00
Dustin Carlino
ba2500c131 Create the path cost tuner. #237, #494
This lets you live-tune routing parameters, then see how it affects the
total number of routes that cross every road, relative to the baseline
of the original parameters. We can also use it in the future to do the
same thing, comparing before/after some map edits.
2021-02-03 11:34:15 -08:00
Dustin Carlino
a2b4dcb64f Store RoutingParams in the Map. Add a method for the debug UI to override the defaults, rebuilding the CHs. This is in preparation for #237, and part of #494 2021-02-03 10:59:02 -08:00
Dustin Carlino
32bcfbe738 Plumb in the tuned routing params. When they're not the defaults, automatically fallback from CH to Dijkstra's. #494 2021-02-02 15:20:06 -08:00
Dustin Carlino
3e40686a6b Fix a bunch of links after the repository renaming. 2021-01-31 15:50:48 -08:00
Dustin Carlino
341ce834e3 Based on startup params, display an extra 'study area' on the map. cyipt/actdev#44 2021-01-27 13:00:48 -08:00
Bruce
cf5ce637f3
Skip all-walk if no demand (#442)
* Skip all-walk if no demand

If you create an all-walk stage and make it adaptive, if there is no demand it will be skipped. Fixed crosswalks are never skipped, as they may be necessary for queue management.
2021-01-27 11:13:19 -08:00
Dustin Carlino
37a25c0fcb Improve turn type classification. Really sharp turns get classified as
u-turns, but recently, they're forced to left turns if the road names
don't match. Now be more specific and revert either a left or right
turn.

This fixes up https://www.openstreetmap.org/node/53089011, which now
acts like a 4-way intersection for signal heuristics!

Not regenerating everything yet.
2021-01-27 09:28:12 -08:00
Dustin Carlino
92b1f92d54 Define a second ranking for roads, beyond the 3 tiers. Just use for the NACTO max cycle length heuristic. #446 2021-01-26 14:39:17 -08:00
Dustin Carlino
cad336d493 Tighten up the definition of u-turns, requiring the from/to road names
to match.

Originally these were introduced to deal with merging intersections
between dual carriageways. But inadvertently, lots of left turns got
reclassified as u-turns. That's caused various headaches, most recently
the lakeslice gridlock. That's fixed again!
2021-01-25 17:19:48 -08:00
Dustin Carlino
fa70816bfa Attempt some transformation of sidewalk:{left,right} tags for #449.
Fix a bug with the previous commit (lanes=1 on a two-way). Now regenerate.

... Unfortunately lakeslice now gridlocks due to a turn generation bug.
Temporarily removing the prebaked results there so I can push these last
few changes through. Will resolve this before the next release.
2021-01-25 15:31:01 -08:00
Dustin Carlino
a8f6ea2462 More carefully handle an odd number of lanes in OSM
Still not regenerating
2021-01-25 14:19:10 -08:00
Dustin Carlino
08a1a75127 Fix bug with cycleway:right and left-hand driving. #330
Not regenerating yet
2021-01-25 14:12:58 -08:00
Dustin Carlino
f69335edf0 Let individual maps override the street parking length. #457
Now regenerate all map data, because the schema changed. Also had to
revert part of the last commit to unbreak transit route snapping in
Berlin.
2021-01-25 12:36:49 -08:00
Dustin Carlino
c9c6f240ae Remove timer.{note, warn, error} in favor of the log crate. #262
Originally, the intention of the deleted calls was to not interrupt
Timer progress bars with warnings. But the output of things like the
importer is impossible to read anyway. Strongly considering explicitly
sending logs and timing info to separate places and using something like
multitail for live progress.

Unplumb timer from LOADS of places that just needed it for logging.
2021-01-21 19:22:02 -08:00
Dustin Carlino
af07de5d8e Fix deserializing a map in JSON. #392 2021-01-19 11:27:56 -08:00
Dustin Carlino
4c6d7af76d Bring in linear pedestrian highways as cycleways+shoulders. #458
Also give living_streets in Krakow shoulders, so foot routing works
better there.

Now regenerate everything. Actually messes up routing for Trumpington;
71 cancelled trips up to 101. And have to intervene to keep lakeslice
not gridlocking, as usual.
2021-01-16 17:03:13 -08:00
Dustin Carlino
ec8c37ab05 Import pedestrian plaza areas, just for rendering. #458
Not regenerating everything yet.
2021-01-16 15:16:14 -08:00
Dustin Carlino
322fb81a9d Add more (still disabled) heuristics for automatically merging short roads. Look for roads between dual carriageways. #457 2021-01-16 10:24:03 -08:00
Dustin Carlino
df16c30b77 Add shoulders for foot traffic on separate cycleways. #330
For the moment, this is the simplest way to allow foot traffic. This
breaks down in places like
https://www.openstreetmap.org/way/49207928, where the road gets an
inferred sidewalk and the separate cycleway on each side is
bidirectional with shoulders on each side.

Down to 71 cancelled trips in the baseline for cyipt/actdev#32.
2021-01-16 09:30:22 -08:00
Dustin Carlino
3cdbe74948 Use a queue to merge short roads, instead of a potentially quadratic scan. #114 2021-01-15 20:52:11 -08:00
Dustin Carlino
8ec1e5a807 Automatically merge roads based on the inferred length. For now, the
threshold is hardcoded to 0 to disable this, but it can be more easily
changed when experimenting locally.

I tried this out in a few maps manually and saw that it helps sometimes,
but breaks strangely other times. My plan is to work through the bugs
that result and eventually enable this for all imports. #114
2021-01-15 16:53:12 -08:00
Dustin Carlino
48a60c965b For extremely short roads (under 2 meters after calculating intersection
geometry), don't generate crosswalks or stop signs. In reality, these
usually represent the middle of a complicatd intersection. Ideally these
cases would be merged into a single intersection, but before that's
feasible, at least improve some of the inferred things nearby. #457
2021-01-15 15:32:01 -08:00
Dustin Carlino
3fc349844b Introduce traffic signal plans that change at defined points in time. Make the changes at the permanent JSON level only. #447 2021-01-15 10:02:13 -08:00
Dustin Carlino
a7f3e998b7 Start to generate two simple scenario from actdev desire lines. https://github.com/cyipt/actdev/issues/32 2021-01-14 10:31:21 -08:00
Dustin Carlino
7ffb2d108f Treat cyclepaths as lower priority at intersections with regular roads,
to more realistically guess stop signs. #330, #450
2021-01-13 16:56:55 -08:00
Dustin Carlino
a1988f269c Based on importer config, try using separate cyclepaths directly. #330
Small adjustments to unzoomed rendering and stop sign placement.

Regenerate all maps because of the format change, but only Cambridge
changes. Since we're doing this anyway, also pull in leisure=garden.
2021-01-12 11:13:45 -08:00
Dustin Carlino
243a4b3410 Fix cycleway:left with left-hand driving. #449 2021-01-12 09:41:51 -08:00
Dustin Carlino
ddc49e14b4 Add a signal editor tool to adjust the timing to some approximation of https://nacto.org/publication/urban-street-design-guide/intersection-design-elements/traffic-signals/signal-cycle-lengths/ for #446 2021-01-11 17:16:01 -08:00
Dustin Carlino
a34a776b2d Allow manually specified signals to become out-of-date when dealing with edits. b487678ee0 was too strict -- we only want to detect out-of-date config when importing the map, not when editing! 2021-01-11 13:43:38 -08:00
Dustin Carlino
084a8941ab Woops, the include_dir change yesterday broke manually specified traffic
signals. Also they weren't being fully validated, so added that paranoia
check.
2021-01-10 18:19:12 -08:00
Dustin Carlino
b487678ee0 Delete all out-of-date manual overrides for traffic signals, and make it
a hard error when they become out-of-date going forward.

Better heuristics make some of these unnecessary. And now the the JSON
files are in this repo, updating files manually when pulling down new
OSM data becomes less tedious.
2021-01-07 12:24:07 -08:00
Dustin Carlino
6346302338 Remove the adaptive traffic signal experiment, now that Bruce's variable signals work. The adaptive case was added as a proof-of-concept, and its behavior is subsumed by the variable ones. Fixes #124 2021-01-05 13:06:44 -08:00