Commit Graph

6864 Commits

Author SHA1 Message Date
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
184593094e Also round up the X axis for the elevation plot, and lower the number of
line plot labels by default
2021-07-09 09:23:56 -07:00
Dustin Carlino
2fad01d729 Use a fixed maximum for the Y scale of the elevation profile, based on a
map's max height. This helps compare elevation profiles before/after map
edits.
2021-07-09 09:23:56 -07:00
Dustin Carlino
1539091453 Import Loop 101, adding an option to skip local roads to cut down map
size.
2021-07-08 10:25:36 -07:00
Dustin Carlino
c5113b868c Let one vehicle attempt to lane-change around another vehicle on every
lane that they're stuck behind them. Only record a risk exposure event
the first time, but let passing happen anywhere. #382

Also add scenario name to PrebakeSummary, to disambiguate the Poundbury
results.
2021-07-07 21:20:06 -07:00
Dustin Carlino
fffd323cb4 Refactor the monstrosity that is App setup 2021-07-07 11:26:55 -07:00
Dustin Carlino
2d1368fe13 Revive some form of the ancient A/B test mode, where two maps can be swapped quickly. Using this for more rapidly testing intersection consolidation algorithms. #654 2021-07-07 10:14:48 -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
ed59a8a386 Reimport all actdev scenarios, and restore Poundbury prebaked data. This was temporarily broken by a JSON format change (a-b-street/abstr#29) 2021-07-06 15:29:51 -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
fe49a093e6 Add a revert button to the road editor. #597 2021-07-06 13:00:11 -07:00
Dustin Carlino
3a53380c46 Don't block after launching JSON viewer. Often I want to find an ID in
the JSON somewhere, then warp to it.
2021-07-06 11:49:44 -07:00
Dustin Carlino
d1a7ae4418 Start importing a piece of Sao Paulo for a collaboration.
No elevation data until the next big round of regeneration; having
trouble getting Docker set up on my resurrected machine.
2021-07-06 10:57:53 -07:00
Dustin Carlino
3db4c827b8 Draw building outlines in unzoomed view also. It's a subtle effect, but important in dense areas like Sao Paulo. 2021-07-06 09:53:13 -07:00
Dustin Carlino
06ec73b67f Fix a bug with both regular and infinite parking. If two cars enter a
lane and both want to park in the same building or parking lot, they're
assigned the same spot. When the second one tries to use it, they pick
another. Now the second will still consider spots that they're directly
next to. #688
2021-07-05 22:27:21 -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
bae86bf885 Add a debug tool to visualize equiv_pos, before trying to improve this for curvy roads. 2021-07-05 10:16:39 -07:00
Dustin Carlino
b4c776c0fa new release 2021-07-04 16:33:14 -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
d314163f13 Finally regenerate prebaked data, with left turns out of driveways fully
supported!

- Had to skip over center turn lanes -- we're approaching the point where
  we can model those realistically.
- Carefully deal with static blockages near the start of a lane to avoid
  spillover. Observed near b3810 in greenlake. It's time to make equiv_pos
  smarter...
2021-07-04 14:34:20 -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
646e85d278 Optionally draw static and dynamic blockages. This is immensely useful
for working on exiting from driveways and lane-changing. #382
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
bf316fa99c Fix a crash in the trip info panel. If you happen to open a trip of a
car waiting to spawn, its total path distance is briefly 0.

Also silence the lane-changing info for the moment, until work resumes
there.
2021-07-03 08:28:16 -07:00
Dustin Carlino
160d65ca28 Try loading a built-in proposal with --edits, if player data is missing. 2021-07-02 13:14:08 -07:00
Dustin Carlino
d36c2b2d40 Fix broken links on the github homepage 2021-07-02 12:53:54 -07:00
Dustin Carlino
6c1c6a3235 Fix crash when changing speed limit. At some point, we started changing lane IDs for every road edit and never updated this. Closes #685 2021-07-02 11:54:59 -07:00
Dustin Carlino
4fd86c8a41 Entering edit mode is slow on large maps, because clearing the simulation recreates parking state for every building. Parallelize it to speed it up at least a bit. 2021-07-02 11:47:05 -07:00
Dustin Carlino
866ecd5f88 Fix a bug in efaf6085e4 that was using walking paths for vehicles. Now prebaked data doesn't budge.
And add some more timing to demonstrate why editing a single lane in a
huge map is so slow...
2021-07-02 11:25:02 -07:00
Dustin Carlino
f4c8a508da Keep a JSON file with a summary of prebaked simulations, to more easily detect regressions with broken trips. 2021-07-02 10:07:37 -07:00
Dustin Carlino
1b8d05b264 Upload data for Brooklyn. Also grabbed fresh NYC OSM data for the Manhattan maps too 2021-07-01 13:11:14 -07:00
Trevor Nederlof
3faf9893a9 Add downtown brooklyn as a nyc map 2021-07-01 12:27:58 -07:00
Dustin Carlino
9f4fac58a7 Workaround a crash trying to render building 4582 in Green Lake, which
has a short driveway that's crashing make_polygons.

This is more fallout from the f64 serialization change. I don't
understand the root cause yet...
2021-07-01 10:43:42 -07:00
Dustin Carlino
4f00c8d2bb Phinney runs without gridlock again, so re-enable it. Pretty sure
f57278e9cd fixed it.
2021-06-30 16:51:03 -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
Dustin Carlino
137e9a0c2c Fix up some places affected by the f64 serialization:
- offstreet_parking_length in importer config
- backwards compatibility for map edits
- fixing up the baked-in proposals
- working around a few PolyLine bugs that happen with the new rounding
- Don't regenerate actdev scenarios yet -- the upstream JSON format is
  out of date, will have to fix separately.
2021-06-30 06:35:42 -07:00
Dustin Carlino
057ac5d020 Serialize trimmed f64's in the geom crate as i32, since the f64's are
trimmed to 4 decimal places anyway. Do this for Pt2D, Distance,
Duration, Speed, Time.

Regenerating everything...
2021-06-30 06:35:42 -07:00
Dustin Carlino
70a9508415 Change the CityPicker to merge the list of maps and cities from the local filesystem and the manifest.
This fixes various problems when importing local maps (in new or
existing cities) and getting out of sync with the manifest.
2021-06-25 19:37:42 -07:00
Dustin Carlino
126c62d6ba Simplify CityPicker logic: just use the optional city.bin to draw districts. Always use the filesystem to create the buttons. 2021-06-25 19:11:37 -07:00
Dustin Carlino
8546eb4b5f Make the timer hierarchy for --regen_all or any city with many maps more easy to understand 2021-06-25 15:29:28 -07:00
Dustin Carlino
3cda1342ab Fix nondeterminism in z-ordering for lanes, hopefully removing noise from the screenshot diff test.
(Ideally there'd be no overlapping lanes in the first place, but that's
quite hard)
2021-06-25 12:29:55 -07:00
Dustin Carlino
5161474955 Stop building huge_seattle twice in the importer workflow
I have some fuzzy vision of declaring all importer pieces as a dependency graph, with optional caching of some input, that would express this kind of thing better. But... in the meantime.

Now regenerating everything...
2021-06-25 12:18:04 -07:00
Dustin Carlino
f57278e9cd Enable the new walking turn algorithm for consolidated intersections
only. It has much simpler logic and produces correct results for these
intersections, but it has degradations in some cases -- so limit where
we use it.

But in the meantime, this makes realistic crosswalks over Aurora,
fixing crazy walking detours there.

Not regenerating yet.
2021-06-24 12:41:38 -07:00
Dustin Carlino
c0ce76a92a Two slight adjustments to speed up the map importer development
workflow.
2021-06-24 12:13:47 -07:00