Commit Graph

1368 Commits

Author SHA1 Message Date
Dustin Carlino
a0461e990d Workaround an issue with how the length of roads is measured and related
to the elevation measured at the original intersection point. #82

Upload montlake, downtown, and phinney with elevation data, as an
initial demo.
2021-03-18 19:04:15 -07:00
Dustin Carlino
b61291d905 Revive the elevation layer in the UI. Add some sanity checking around the inclines we're assigning to roads, but also, I realized a problem with how the elevation lookup not matching the trimmed roads. #82 2021-03-18 18:19:41 -07:00
Dustin Carlino
95b1d884cf Rename Map::new to be more clear that it should only be used in non-UI
tools. There's one place in the UI that doesn't work on the web!
2021-03-12 06:38:17 -08:00
Dustin Carlino
c6044fa54c Fix the debugging of map serialization sizes; Map::new isn't called
anymore, because of async map loading.
2021-03-11 19:46:09 -08:00
Dustin Carlino
f0de4e4583 Don't use Bezier curves for right/left turns at tiny intersections. They
wind up looping back on themselves in a nonsensical way, causing
vehicles to visually glitch when moving through.

This was started in 081819d86b, but it
used to gridlock 2 maps. All the recent roundabout fixes seems to have
resolved those! And adjusting offstreet parking for two maps.

But wallingford does regress; plunging forward for now.
2021-03-10 15:58:16 -08:00
Dustin Carlino
7e0f29fa9f Place stop signs at the entrances of roundabouts, so people already in there get precedence over new people entering. #75
This makes Poundbury run with baseline traffic, when previously it was
super gridlocked!
2021-03-08 20:43:48 -08:00
Dustin Carlino
350b75a8e5 Don't crash when tracing a path where the first step and request don't match. This happened for the LCID site when clicking on a building and finding nearest parking, because the buildings are in an access-restricted zone. 2021-03-07 11:06:32 -08:00
Dustin Carlino
d5d186dd37 Fix border arrows for left-handed maps. 2021-03-06 10:43:58 -08:00
Dustin Carlino
081819d86b ATTEMPT: Don't use Bezier curves for right/left turns at tiny
intersections. They wind up looping back on themselves in a nonsensical
way, causing vehicles to visually glitch when moving through.

This causes lakeslice and rainier to gridlock, due to the magic of
emergent behavior. I think I upstreamed an OSM fix for lakeslice, but I
need to work on rainier before enabling this code.
2021-03-01 18:30:24 -08:00
Dustin Carlino
c5cfe76b05 Fix turn type classification for four-way intersections that meet at
weird angles. This leads to really bad traffic signal heuristics, even
causing gridlock in Rainier Valley.
2021-03-01 10:57:27 -08:00
Dustin Carlino
bce3318605 Import halsnead for actdev. It needed a fix to not treat access=private
as a no-through-traffic zone for light rail tracks!
2021-02-27 14:35:26 -08:00
Dustin Carlino
9984648379 Treat bicycle=designated on footways the same as bicycle=yes. And update Seattle OSM data again to pick up my fixes from yesterday. #330 2021-02-27 13:01:37 -08:00
Dustin Carlino
3a63c11303 Treat footways that allow bikes the same as the other shared-use trails. #330
This gets most of the Burke (and other trails) imported, though there
are still some lingering connectivity problems.
2021-02-26 17:23:21 -08:00
Dustin Carlino
603717a560 Remove the separate_cycleways experiment flag. Always import cyclepaths
mapped as separate OSM ways in all maps!!! #330
2021-02-26 14:58:57 -08:00
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